summaryrefslogtreecommitdiff
path: root/libraries/libwebp
diff options
context:
space:
mode:
authorpowtrix <powtrix@gmail.com>2015-01-04 08:43:12 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-01-04 08:43:12 +0700
commitb72a6a7b1c24b70c47d33d4da330c7737268b2b2 (patch)
treeec2d72ee90816545c28730acdf906b8e949822af /libraries/libwebp
parent671735d433257cef9320bddc608bcf82aa55e5e6 (diff)
downloadslackbuilds-b72a6a7b1c24b70c47d33d4da330c7737268b2b2.tar.gz
libraries/libwebp: Added optional python 3 support.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/libwebp')
-rw-r--r--libraries/libwebp/libwebp.SlackBuild25
1 files changed, 21 insertions, 4 deletions
diff --git a/libraries/libwebp/libwebp.SlackBuild b/libraries/libwebp/libwebp.SlackBuild
index 1adef44542..5a87653ff9 100644
--- a/libraries/libwebp/libwebp.SlackBuild
+++ b/libraries/libwebp/libwebp.SlackBuild
@@ -5,7 +5,7 @@
PRGNAM=libwebp
VERSION=${VERSION:-0.4.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -59,17 +59,34 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--disable-static \
+ --disable-silent-rules \
+ --enable-everything \
+ --enable-swap-16bit-csp \
+ --enable-experimental \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
+(
+ cd swig
+ # Fix temporary working directory.
+ sed -i "/^tmpdir/s|=.*|= 'tmpdir'|" setup.py
+ CFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
+ LDFLAGS="-L$PKG/usr/lib${LIBDIRSUFFIX} -lwebp" \
+ python setup.py install --root=$PKG
+ # Install the python3 module if python3 is installed
+ if $(python3 -c 'import sys' 2>/dev/null); then
+ CFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
+ LDFLAGS="-L$PKG/usr/lib${LIBDIRSUFFIX} -lwebp" \
+ python3 setup.py install --root=$PKG
+ fi
+)
+
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING ChangeLog NEWS PATENTS README \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog NEWS PATENTS README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install