aboutsummaryrefslogtreecommitdiff
path: root/multimedia/gnash
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2022-02-26 14:10:17 -0600
committerRobby Workman <rworkman@slackbuilds.org>2022-02-27 13:16:31 -0600
commitb42ab7366adb5ce3d9d19e384f30ccf0ea2a5ba7 (patch)
tree27b5becbeb1f48f9a1387107e5863adb51bbb73d /multimedia/gnash
parent01ba2b350ae7a5e7e91647583c19eb112f8f7c5f (diff)
multimedia/gnash: Added (fixed build post-removal)
Resurrected from commit 6f4466a540f91075f144a6840fae96a928d7c972 by adding -std=c++14 to CXXFLAGS. Signed-off-by: Kyle Guinn <elyk03@gmail.com>
Diffstat (limited to 'multimedia/gnash')
-rw-r--r--multimedia/gnash/README6
-rw-r--r--multimedia/gnash/doinst.sh35
-rw-r--r--multimedia/gnash/gnash.SlackBuild160
-rw-r--r--multimedia/gnash/gnash.info10
-rw-r--r--multimedia/gnash/slack-desc19
5 files changed, 230 insertions, 0 deletions
diff --git a/multimedia/gnash/README b/multimedia/gnash/README
new file mode 100644
index 0000000000000..9e034fc885f9a
--- /dev/null
+++ b/multimedia/gnash/README
@@ -0,0 +1,6 @@
+Gnash is the GNU SWF movie player, which can be run standalone on the
+desktop or an embedded device, as well as a plugin for several browsers.
+
+Plugins are now disabled by default due to browsers removing support.
+
+Optional but recommended deps are gst0-ffmpeg and gst0-plugins-ugly.
diff --git a/multimedia/gnash/doinst.sh b/multimedia/gnash/doinst.sh
new file mode 100644
index 0000000000000..f33553f39b26f
--- /dev/null
+++ b/multimedia/gnash/doinst.sh
@@ -0,0 +1,35 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # 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
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/multimedia/gnash/gnash.SlackBuild b/multimedia/gnash/gnash.SlackBuild
new file mode 100644
index 0000000000000..2085970f10556
--- /dev/null
+++ b/multimedia/gnash/gnash.SlackBuild
@@ -0,0 +1,160 @@
+#!/bin/bash
+
+# Slackware build script for gnash
+
+# Copyright 2012-2022 Kyle Guinn <elyk03@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# 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.11dev_20190130}
+SRCVER=${SRCVER:-583ccbc1275c7701dc4843ec12142ff86bb305b4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$(uname -m) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM-$VERSION
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="AUTHORS COPYING ChangeLog NEWS README* TODO"
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+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-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
+ KPARTS4_OPT="--disable-kparts4"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+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 .
+
+# jemalloc(3) wants <jemalloc/jemalloc.h>, not <jemalloc.h>
+sed -i 's|jemalloc.h|jemalloc/jemalloc.h|' \
+ libbase/jemalloc_gnash.c \
+ configure.ac
+
+# Fix giflib version check for API change
+sed -i 's|GIFLIB_MINOR==1|GIFLIB_MINOR>=1|' \
+ libbase/GnashImageGif.cpp
+
+# 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
+
+autoreconf -vif
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --disable-dependency-tracking \
+ --enable-python \
+ --enable-ssh \
+ --enable-ssl \
+ --without-gconf \
+ --with-plugins-install=system \
+ --disable-npapi \
+ $KPARTS3_OPT \
+ $KPARTS4_OPT \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS -std=c++14" \
+
+make
+make install-strip install-plugins DESTDIR=$PKG
+
+# make install-plugins doesn't strip the plugins.
+find $PKG -exec file {} + | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+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
+
+mkdir -p $PKG/install
+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
diff --git a/multimedia/gnash/gnash.info b/multimedia/gnash/gnash.info
new file mode 100644
index 0000000000000..88f80575818f0
--- /dev/null
+++ b/multimedia/gnash/gnash.info
@@ -0,0 +1,10 @@
+PRGNAM="gnash"
+VERSION="0.8.11dev_20190130"
+HOMEPAGE="https://www.gnu.org/software/gnash/"
+DOWNLOAD="https://git.savannah.gnu.org/cgit/gnash.git/snapshot/gnash-583ccbc1275c7701dc4843ec12142ff86bb305b4.tar.gz"
+MD5SUM="44dec2747ea79fd6bd68a58dc8512821"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="agg gst0-plugins-base"
+MAINTAINER="Kyle Guinn"
+EMAIL="elyk03@gmail.com"
diff --git a/multimedia/gnash/slack-desc b/multimedia/gnash/slack-desc
new file mode 100644
index 0000000000000..293b57461442e
--- /dev/null
+++ b/multimedia/gnash/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+gnash: gnash (SWF movie player)
+gnash:
+gnash: Gnash is the GNU SWF movie player, which can be run standalone on the
+gnash: desktop or an embedded device, as well as as a plugin for several
+gnash: browsers.
+gnash:
+gnash:
+gnash:
+gnash:
+gnash:
+gnash: