mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
libraries/libwebp: Added optional python 3 support.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
671735d433
commit
b72a6a7b1c
1 changed files with 21 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue