diff options
Diffstat (limited to 'multimedia/gnash/gnash.SlackBuild')
-rw-r--r-- | multimedia/gnash/gnash.SlackBuild | 99 |
1 files changed, 54 insertions, 45 deletions
diff --git a/multimedia/gnash/gnash.SlackBuild b/multimedia/gnash/gnash.SlackBuild index 99a4c07c84..f39d2ffaad 100644 --- a/multimedia/gnash/gnash.SlackBuild +++ b/multimedia/gnash/gnash.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for gnash -# Copyright 2012-2016 Kyle Guinn <elyk03@gmail.com>, USA +# Copyright 2012-2022 Kyle Guinn <elyk03@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=gnash -VERSION=${VERSION:-0.8.10} -BUILD=${BUILD:-7} +VERSION=${VERSION:-0.8.11dev_20190130} +SRCVER=${SRCVER:-583ccbc1275c7701dc4843ec12142ff86bb305b4} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$(uname -m)" in @@ -35,17 +39,18 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README* TODO" +DOCS="AUTHORS COPYING ChangeLog NEWS README* TODO" -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i586" ]; then +if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then @@ -59,17 +64,25 @@ else LIBDIRSUFFIX="" fi -# Set $KLASH to "no" to disable Klash, the Konqueror plugin. -if [ "${KLASH:-yes}" = "yes" ]; then - KLASH_OPT="\ - --with-kde4-incl=/usr/include \ - --with-kde4-configdir=/usr/share/config \ +# TODO: Test the KPARTS3 plugin with KDE3/Trinity. +if [ "${KPARTS3:-no}" != "no" ]; then + KPARTS3_OPT="" +else + KPARTS3_OPT="--disable-kparts3" +fi + +# Set $KPARTS4 to "yes" to enable the KDE4 Konqueror plugin. +if [ "${KPARTS4:-no}" != "no" ]; then + KPARTS4_OPT=" \ --with-kde4-prefix=/usr \ + --with-kde4-incl=/usr/include \ --with-kde4-lib=/usr/lib${LIBDIRSUFFIX} \ - --with-kde-appsdatadir=/usr/share/apps/klash \ - --with-kde4-servicesdir=/usr/share/kde4/services" + --with-kde4-plugindir=/usr/lib${LIBDIRSUFFIX}/kde4 \ + --with-kde4-servicesdir=/usr/share/kde4/services \ + --with-kde4-configdir=/usr/share/config \ + --with-kde-appsdatadir=/usr/share/apps/klash" else - KLASH_OPT="--disable-kparts3 --disable-kparts4" + KPARTS4_OPT="--disable-kparts4" fi set -e @@ -77,33 +90,27 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$SRCVER +tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz +cd $PRGNAM-$SRCVER chown -R root:root . chmod -R u+w,go-w,a+rX-st . -# Fix compilation with GCC 4.7. -patch -p1 < $CWD/patch/gcc47.patch - -# Fix a boost linking error, paths for kde plugin, and a cve patch. -# Ripped from gentoo -patch -p1 < $CWD/patch/gnash-0.8.10-boost-1.50.patch -patch -p1 < $CWD/patch/gnash-0.8.10-klash.patch -patch -p1 < $CWD/patch/gnash-0.8.10-kde4-libdir.patch -patch -p1 < $CWD/patch/gnash-0.8.10-cve-2012-1175.patch +# jemalloc(3) wants <jemalloc/jemalloc.h>, not <jemalloc.h> +sed -i 's|jemalloc.h|jemalloc/jemalloc.h|' \ + libbase/jemalloc_gnash.c \ + configure.ac -# Fix building with giflib-5.0 -# Also ripped from gentoo :-) -patch -p1 < $CWD/patch/58dcdd9338d965e54c8f03ce3d2757388d82b7a3.patch -patch -p1 < $CWD/patch/cc22f2d0597f3a9547980f4786d918f8b5635472.patch +# Fix giflib version check for API change +sed -i 's|GIFLIB_MINOR==1|GIFLIB_MINOR>=1|' \ + libbase/GnashImageGif.cpp -# Fix build with new Boost -# Taken from ARCH -patch -p1 < $CWD/patch/gnash-boost.patch +# Consider using --enable-media=... to disable ffmpeg +# if this isn't sufficient for compatibility with latest ffmpeg +sed -i 's|FF_INPUT_BUFFER_PADDING_SIZE|AV_INPUT_BUFFER_PADDING_SIZE|' \ + libmedia/ffmpeg/MediaHandlerFfmpeg.cpp \ + libmedia/ffmpeg/MediaParserFfmpeg.cpp -# The FFmpeg engine doesn't compile with FFmpeg 0.11.1. Patches welcome. -# In the meantime, set --enable-media=gst to avoid autodetecting FFmpeg. autoreconf -vif ./configure \ --prefix=/usr \ @@ -115,17 +122,16 @@ autoreconf -vif --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux \ --disable-dependency-tracking \ - --enable-media=gst \ --enable-python \ --enable-ssh \ --enable-ssl \ - --enable-write \ --without-gconf \ --with-plugins-install=system \ - --with-speexdsp-incl=/usr/include/speex \ - $KLASH_OPT \ + --disable-npapi \ + $KPARTS3_OPT \ + $KPARTS4_OPT \ CFLAGS="$SLKCFLAGS" \ - CXXFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS -std=c++14" \ make make install-strip install-plugins DESTDIR=$PKG @@ -139,6 +145,9 @@ find $PKG/usr/lib${LIBDIRSUFFIX} -name '*.la' -delete find $PKG/etc -type f -exec mv {} {}.new \; find $PKG/usr/man -type f -exec gzip -9 {} + +mkdir -p $PKG/etc/gconf/schemas +mv $PKG/usr/share/applications/gnash.schemas $PKG/etc/gconf/schemas + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -148,4 +157,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |