From 9533303d8ee58e0ff267f68c0932b6b63b0fe452 Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Sun, 11 Apr 2021 19:52:14 -0500 Subject: multimedia/gnash: Updated for version 0.8.11dev_20190130. Signed-off-by: Kyle Guinn Signed-off-by: Willy Sudiarto Raharjo --- multimedia/gnash/README | 12 ++-- multimedia/gnash/doinst.sh | 9 +++ multimedia/gnash/gnash.SlackBuild | 77 +++++++++++----------- multimedia/gnash/gnash.info | 8 +-- .../58dcdd9338d965e54c8f03ce3d2757388d82b7a3.patch | 25 ------- .../cc22f2d0597f3a9547980f4786d918f8b5635472.patch | 31 --------- multimedia/gnash/patch/gcc47.patch | 11 ---- .../gnash/patch/gnash-0.8.10-boost-1.50.patch | 24 ------- .../gnash/patch/gnash-0.8.10-cve-2012-1175.patch | 63 ------------------ .../gnash/patch/gnash-0.8.10-kde4-libdir.patch | 12 ---- multimedia/gnash/patch/gnash-0.8.10-klash.patch | 12 ---- multimedia/gnash/patch/gnash-boost.patch | 14 ---- 12 files changed, 58 insertions(+), 240 deletions(-) delete mode 100644 multimedia/gnash/patch/58dcdd9338d965e54c8f03ce3d2757388d82b7a3.patch delete mode 100644 multimedia/gnash/patch/cc22f2d0597f3a9547980f4786d918f8b5635472.patch delete mode 100644 multimedia/gnash/patch/gcc47.patch delete mode 100644 multimedia/gnash/patch/gnash-0.8.10-boost-1.50.patch delete mode 100644 multimedia/gnash/patch/gnash-0.8.10-cve-2012-1175.patch delete mode 100644 multimedia/gnash/patch/gnash-0.8.10-kde4-libdir.patch delete mode 100644 multimedia/gnash/patch/gnash-0.8.10-klash.patch delete mode 100644 multimedia/gnash/patch/gnash-boost.patch diff --git a/multimedia/gnash/README b/multimedia/gnash/README index 8b184d97eb..139c27d15c 100644 --- a/multimedia/gnash/README +++ b/multimedia/gnash/README @@ -1,9 +1,13 @@ Gnash is the GNU SWF movie player, which can be run standalone on the -desktop or an embedded device, as well as as a plugin for several browsers. +desktop or an embedded device, as well as a plugin for several browsers. -If you don't want to compile it or if you don't have KDE installed, -you can disable the Konqueror plugin ("Klash") like this: - KLASH=no ./gnash.SlackBuild +Plugins are now disabled by default due to browsers removing support. + +To enable the Mozilla NPAPI plugin, install xulrunner, then run + NPAPI=yes ./gnash.SlackBuild + +To enable the KDE4 Konqueror plugin, run + KPARTS4=yes ./gnash.SlackBuild Optional but recommended dependencies are speex, gst0-ffmpeg, and gst0-plugins-ugly. diff --git a/multimedia/gnash/doinst.sh b/multimedia/gnash/doinst.sh index 80505ba966..f33553f39b 100644 --- a/multimedia/gnash/doinst.sh +++ b/multimedia/gnash/doinst.sh @@ -11,9 +11,18 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } +schema_install() { + SCHEMA="$1" + GCONF_CONFIG_SOURCE="xml::etc/gconf/gconf.xml.defaults" \ + chroot . gconftool-2 --makefile-install-rule \ + /etc/gconf/schemas/$SCHEMA \ + 1>/dev/null +} + config etc/gnashpluginrc.new config etc/gnashthumbnailrc.new config etc/gnashrc.new +schema_install gnash.schemas if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 diff --git a/multimedia/gnash/gnash.SlackBuild b/multimedia/gnash/gnash.SlackBuild index 99a4c07c84..6e359cf86e 100644 --- a/multimedia/gnash/gnash.SlackBuild +++ b/multimedia/gnash/gnash.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for gnash -# Copyright 2012-2016 Kyle Guinn , USA +# Copyright 2012-2021 Kyle Guinn # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,8 +23,9 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 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} if [ -z "$ARCH" ]; then @@ -37,7 +38,7 @@ fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM +PKG=$TMP/package-$PRGNAM-$VERSION OUTPUT=${OUTPUT:-/tmp} DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README* TODO" @@ -59,17 +60,32 @@ 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 \ +# Set $NPAPI to "yes" to enable the Mozilla plugin. Requires xulrunner. +if [ "${NPAPI:-no}" != "no" ]; then + NPAPI_OPT="--enable-write" # This option no longer does anything? +else + NPAPI_OPT="--disable-npapi" +fi + +# 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 +93,12 @@ 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 - -# Fix building with giflib-5.0 -# Also ripped from gentoo :-) -patch -p1 < $CWD/patch/58dcdd9338d965e54c8f03ce3d2757388d82b7a3.patch -patch -p1 < $CWD/patch/cc22f2d0597f3a9547980f4786d918f8b5635472.patch - -# Fix build with new Boost -# Taken from ARCH -patch -p1 < $CWD/patch/gnash-boost.patch - -# 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,15 +110,14 @@ 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 \ + $NPAPI_OPT \ + $KPARTS3_OPT \ + $KPARTS4_OPT \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -139,6 +133,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 diff --git a/multimedia/gnash/gnash.info b/multimedia/gnash/gnash.info index 012dd88c5f..1d609651ed 100644 --- a/multimedia/gnash/gnash.info +++ b/multimedia/gnash/gnash.info @@ -1,10 +1,10 @@ PRGNAM="gnash" -VERSION="0.8.10" +VERSION="0.8.11dev_20190130" HOMEPAGE="https://www.gnu.org/software/gnash/" -DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gnash/0.8.10/gnash-0.8.10.tar.bz2" -MD5SUM="63e9f79c41d93d48c5a2fa94856548c4" +DOWNLOAD="https://git.savannah.gnu.org/cgit/gnash.git/snapshot/gnash-583ccbc1275c7701dc4843ec12142ff86bb305b4.tar.gz" +MD5SUM="44dec2747ea79fd6bd68a58dc8512821" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="agg xulrunner" +REQUIRES="agg" MAINTAINER="Kyle Guinn" EMAIL="elyk03@gmail.com" diff --git a/multimedia/gnash/patch/58dcdd9338d965e54c8f03ce3d2757388d82b7a3.patch b/multimedia/gnash/patch/58dcdd9338d965e54c8f03ce3d2757388d82b7a3.patch deleted file mode 100644 index b3242ce0d3..0000000000 --- a/multimedia/gnash/patch/58dcdd9338d965e54c8f03ce3d2757388d82b7a3.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 58dcdd9338d965e54c8f03ce3d2757388d82b7a3 Mon Sep 17 00:00:00 2001 -From: gustavo -Date: Thu, 11 Sep 2014 14:12:17 +0000 -Subject: Add support for giflib 5.1 - ---- -diff --git a/libbase/GnashImageGif.cpp b/libbase/GnashImageGif.cpp -index 84b09ce..2ae5ddb 100644 ---- a/libbase/GnashImageGif.cpp -+++ b/libbase/GnashImageGif.cpp -@@ -120,7 +120,11 @@ GifInput::GifInput(std::shared_ptr in) - GifInput::~GifInput() - { - // Clean up allocated data. -- DGifCloseFile(_gif); -+#if GIFLIB_MAJOR==5 && GIFLIB_MINOR==1 -+ DGifCloseFile(_gif, 0); -+#else -+ DGifCloseFile(_gif); -+#endif - } - - size_t --- -cgit v0.9.0.2 diff --git a/multimedia/gnash/patch/cc22f2d0597f3a9547980f4786d918f8b5635472.patch b/multimedia/gnash/patch/cc22f2d0597f3a9547980f4786d918f8b5635472.patch deleted file mode 100644 index 6e90737d51..0000000000 --- a/multimedia/gnash/patch/cc22f2d0597f3a9547980f4786d918f8b5635472.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cc22f2d0597f3a9547980f4786d918f8b5635472 Mon Sep 17 00:00:00 2001 -From: OBATA Akio -Date: Mon, 15 Jul 2013 07:16:39 +0000 -Subject: Add support fir GIFLIB-5.0 (bug #39482) - -Signed-off-by: Sandro Santilli ---- -diff --git a/libbase/GnashImageGif.cpp b/libbase/GnashImageGif.cpp -index eeba4b7..26865c1 100644 ---- a/libbase/GnashImageGif.cpp -+++ b/libbase/GnashImageGif.cpp -@@ -269,7 +269,17 @@ GifInput::processRecord(GifRecordType record) - void - GifInput::read() - { -+#if GIFLIB_MAJOR >= 5 -+ int errorCode; -+ _gif = DGifOpen(_inStream.get(), &readData, &errorCode); -+#else - _gif = DGifOpen(_inStream.get(), &readData); -+#endif -+ -+ if ( ! _gif ) { -+ // TODO: decode errorCode if available -+ throw ParserException("Could not open input GIF stream"); -+ } - - GifRecordType record; - --- -cgit v0.9.0.2 diff --git a/multimedia/gnash/patch/gcc47.patch b/multimedia/gnash/patch/gcc47.patch deleted file mode 100644 index 7886b097c9..0000000000 --- a/multimedia/gnash/patch/gcc47.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/plugin/klash4/klash_part.cpp b/plugin/klash4/klash_part.cpp ---- a/plugin/klash4/klash_part.cpp -+++ b/plugin/klash4/klash_part.cpp -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/multimedia/gnash/patch/gnash-0.8.10-boost-1.50.patch b/multimedia/gnash/patch/gnash-0.8.10-boost-1.50.patch deleted file mode 100644 index 23282d1e89..0000000000 --- a/multimedia/gnash/patch/gnash-0.8.10-boost-1.50.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ur a/macros/boost.m4 b/macros/boost.m4 ---- a/macros/boost.m4 2012-09-03 17:11:43.000000000 +0200 -+++ b/macros/boost.m4 2012-10-16 01:58:28.000000000 +0200 -@@ -37,7 +37,7 @@ - boost_headers="detail/lightweight_mutex.hpp thread/thread.hpp multi_index_container.hpp multi_index/key_extractors.hpp thread/mutex.hpp program_options/options_description.hpp iostreams/stream.hpp" - dnl this is a list of *required* libraries. If any of these are missing, this - dnl test will return a failure, and Gnash won't build. -- boost_libs="thread program_options iostreams" -+ boost_libs="thread program_options iostreams system" - - dnl this is a list of *recommended* libraries. If any of these are missing, this - dnl test will return a warning, and Gnash will build, but testing won't work. -diff -ur a/plugin/npapi/Makefile.am b/plugin/npapi/Makefile.am ---- a/plugin/npapi/Makefile.am 2012-09-03 17:11:43.000000000 +0200 -+++ b/plugin/npapi/Makefile.am 2012-10-16 01:58:57.000000000 +0200 -@@ -78,7 +78,7 @@ - - libgnashplugin_la_LIBADD = \ - $(GLIB_LIBS) \ -- -lboost_iostreams \ -+ $(BOOST_LIBS) \ - $(NULL) - - # Scriptable plugin support diff --git a/multimedia/gnash/patch/gnash-0.8.10-cve-2012-1175.patch b/multimedia/gnash/patch/gnash-0.8.10-cve-2012-1175.patch deleted file mode 100644 index 9a218d9216..0000000000 --- a/multimedia/gnash/patch/gnash-0.8.10-cve-2012-1175.patch +++ /dev/null @@ -1,63 +0,0 @@ -From bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527 Mon Sep 17 00:00:00 2001 -From: Benjamin Wolsey -Date: Sat, 10 Mar 2012 14:52:50 +0000 -Subject: Fix crash in GnashImage.cpp - ---- -diff --git a/libbase/GnashImage.cpp b/libbase/GnashImage.cpp -index 11c6956..03a6939 100644 ---- a/libbase/GnashImage.cpp -+++ b/libbase/GnashImage.cpp -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - - #ifdef USE_PNG - # include "GnashImagePng.h" -@@ -44,6 +45,21 @@ namespace image { - - namespace { - void processAlpha(GnashImage::iterator imageData, size_t pixels); -+ bool checkValidSize(size_t width, size_t height, size_t channels) { -+ -+ if (width == 0 || height == 0) return false; -+ -+ assert(channels > 0); -+ -+ boost::uint32_t maxSize = std::numeric_limits::max(); -+ if (width >= maxSize || height >= maxSize) return false; -+ -+ maxSize /= channels; -+ maxSize /= width; -+ maxSize /= height; -+ -+ return maxSize > 0; -+ } - } - - GnashImage::GnashImage(iterator data, size_t width, size_t height, -@@ -55,6 +71,8 @@ GnashImage::GnashImage(iterator data, size_t width, size_t height, - _height(height), - _data(data) - { -+ // Callers should check dimensions -+ assert(checkValidSize(_width, _height, channels())); - } - - /// Create an image allocating a buffer of height*pitch bytes -@@ -66,8 +84,9 @@ GnashImage::GnashImage(size_t width, size_t height, ImageType type, - _width(width), - _height(height) - { -- const size_t max = std::numeric_limits::max(); -- if (size() > max) { -+ // Constructed from external input, so restrict dimensions to avoid -+ // overflow in size calculations -+ if (!checkValidSize(_width, _height, channels())) { - throw std::bad_alloc(); - } - _data.reset(new value_type[size()]); --- -cgit v0.9.0.2 diff --git a/multimedia/gnash/patch/gnash-0.8.10-kde4-libdir.patch b/multimedia/gnash/patch/gnash-0.8.10-kde4-libdir.patch deleted file mode 100644 index b3279441d2..0000000000 --- a/multimedia/gnash/patch/gnash-0.8.10-kde4-libdir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur a/macros/kde4.m4 b/macros/kde4.m4 ---- a/macros/kde4.m4 2011-02-26 19:11:08.000000000 +0100 -+++ b/macros/kde4.m4 2011-11-25 18:09:25.000000000 +0100 -@@ -198,7 +198,7 @@ - if test -d ${KDE4_PREFIX}/lib64 -a -f /etc/redhat-release; then - KDE4_PLUGINDIR="${KDE4_PREFIX}/lib64/kde4" - else -- KDE4_PLUGINDIR="${KDE4_PREFIX}/lib/kde4" -+ KDE4_PLUGINDIR="${KDE4_PREFIX}/${acl_libdirstem}/kde4" - fi - fi - if test x"${with_kde4_servicesdir}" != x ; then diff --git a/multimedia/gnash/patch/gnash-0.8.10-klash.patch b/multimedia/gnash/patch/gnash-0.8.10-klash.patch deleted file mode 100644 index e6afec04d2..0000000000 --- a/multimedia/gnash/patch/gnash-0.8.10-klash.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur a/macros/kde4.m4 b/macros/kde4.m4 ---- a/macros/kde4.m4 2011-02-26 19:11:08.000000000 +0100 -+++ b/macros/kde4.m4 2011-03-21 00:04:38.845997945 +0100 -@@ -210,7 +210,7 @@ - KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config" - fi - if test x"${KDE4_APPSDATADIR}" = x ; then -- KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash" -+ KDE4_APPSDATADIR="${KDE4_PREFIX}/share/apps/klash" - fi - - if test x"${ac_cv_path_kde4_incl}" != x ; then diff --git a/multimedia/gnash/patch/gnash-boost.patch b/multimedia/gnash/patch/gnash-boost.patch deleted file mode 100644 index 55208f1ae3..0000000000 --- a/multimedia/gnash/patch/gnash-boost.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- gnash-0.8.10/libbase/accumulator.h.orig 2016-02-08 02:56:17.059694787 +0700 -+++ gnash-0.8.10/libbase/accumulator.h 2016-02-08 02:57:58.375615249 +0700 -@@ -61,6 +61,11 @@ - virtual unsigned min_tokens() const { return 0; } - virtual unsigned max_tokens() const { return 0; } - -+ #if BOOST_VERSION >= 105900 -+ /// There are no tokens, so this is indifferent. -+ virtual bool adjacent_tokens_only() const { return false; } -+ #endif -+ - /// Accumulating from different sources is silly. - virtual bool is_composing() const { return false; } - -- cgit v1.2.3