summaryrefslogtreecommitdiff
path: root/graphics/webp-pixbuf-loader/webp-pixbuf-loader.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/webp-pixbuf-loader/webp-pixbuf-loader.SlackBuild')
-rw-r--r--graphics/webp-pixbuf-loader/webp-pixbuf-loader.SlackBuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/graphics/webp-pixbuf-loader/webp-pixbuf-loader.SlackBuild b/graphics/webp-pixbuf-loader/webp-pixbuf-loader.SlackBuild
new file mode 100644
index 0000000000..d93e42fb70
--- /dev/null
+++ b/graphics/webp-pixbuf-loader/webp-pixbuf-loader.SlackBuild
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+# Slackware build script for webp-pixbuf-loader
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=webp-pixbuf-loader
+VERSION=${VERSION:-20191003.fb04954}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+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
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# this stuff is for making meson/ninja update the loaders, we do that
+# in doinst.sh instead.
+sed -i '/gdk_pb_query_loaders/d' meson.build
+
+mkdir build
+cd build
+ CFLAGS="-Wl,-s $SLKCFLAGS" \
+ CXXFLAGS="-Wl,-s $SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc
+ ninja
+ DESTDIR=$PKG ninja install
+cd ..
+
+DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $DOCDIR
+cat $CWD/README > $DOCDIR/README
+cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$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:-tgz}