summaryrefslogtreecommitdiff
path: root/libraries/libtorrent-rasterbar
diff options
context:
space:
mode:
authorDave Woodfall <dave@tty1.uk>2019-03-04 18:24:04 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-03-16 06:51:54 +0700
commit38931025e41e7d4ac7e67c85a3a789e63f685db5 (patch)
treec1b1e6754f51b98468d6266d036887a623788c99 /libraries/libtorrent-rasterbar
parentdf4d946d1632133a1ec36de73ad9021cb4d1f2b0 (diff)
downloadslackbuilds-38931025e41e7d4ac7e67c85a3a789e63f685db5.tar.gz
libraries/libtorrent-rasterbar: Add support for examples & tools
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/libtorrent-rasterbar')
-rw-r--r--libraries/libtorrent-rasterbar/README17
-rw-r--r--libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild13
2 files changed, 29 insertions, 1 deletions
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