From 38931025e41e7d4ac7e67c85a3a789e63f685db5 Mon Sep 17 00:00:00 2001 From: Dave Woodfall Date: Mon, 4 Mar 2019 18:24:04 +0000 Subject: libraries/libtorrent-rasterbar: Add support for examples & tools Signed-off-by: Willy Sudiarto Raharjo --- libraries/libtorrent-rasterbar/README | 17 +++++++++++++++++ .../libtorrent-rasterbar.SlackBuild | 13 ++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) (limited to 'libraries/libtorrent-rasterbar') diff --git a/libraries/libtorrent-rasterbar/README b/libraries/libtorrent-rasterbar/README index 1609f8e380..d4f79cb88d 100644 --- a/libraries/libtorrent-rasterbar/README +++ b/libraries/libtorrent-rasterbar/README @@ -4,3 +4,20 @@ featured client, although it comes with a working example client. *When upgrading, please removepkg the old version first or the python module will try to link against it* + + +OPTIONS + + To build examples and copy them to /usr/doc/...: + + EXAMPLES=yes ./libtorrent-rasterbar.SlackBuild + + +NOTE + +It is possible to build with bindings for python3 rather +than python2 by setting the $PYTHON environmental variable, +but this would involved rebuilding boost with bindings for +python3 first. + +Go ahead and make my day. diff --git a/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild b/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild index b6a0cb7830..25a72a68a5 100644 --- a/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild +++ b/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=libtorrent-rasterbar VERSION=${VERSION:-1.1.11} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -73,6 +73,9 @@ find -L . \ sed -i -e "s/+ target_specific(),/+ target_specific() + ['-std=c++11'],/" \ bindings/python/setup.py +EXAMPLES=${EXAMPLES:-no} +[ "$EXAMPLES" = "yes" ] && examples="--enable-examples" + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS -std=c++11" \ LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ @@ -84,6 +87,7 @@ LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ --disable-static \ --enable-python-binding \ --enable-encryption \ + $examples \ --with-boost-libdir=/usr/lib${LIBDIRSUFFIX} \ --with-libgeoip \ --disable-debug \ @@ -94,7 +98,14 @@ make install-strip DESTDIR=$PKG mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS COPYING ChangeLog NEWS docs/ \ + ed25519/ tools/ \ $PKG/usr/doc/$PRGNAM-$VERSION + +if [ "$EXAMPLES" = "yes" ]; then + rm -rf examples/.{deps,libs} + cp -a examples/ $PKG/usr/doc/$PRGNAM-$VERSION +fi + cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -- cgit v1.2.3