libraries/libtorrent-rasterbar: Update for 1.2.16

- New maintainer (L.A. Rathbone <poprocks@gmail.com>)
- Use python3 to build bindings (needed for deluge)
- Migrate to CMake (prep. for 2.x and to make python3 work)

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Logan Rathbone 2022-04-26 01:00:28 -04:00 committed by Willy Sudiarto Raharjo
parent 0d8292b1a5
commit b558d13d82
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 25 additions and 38 deletions

View file

@ -2,6 +2,7 @@
# Slackware build script for libtorrent (rasterbar)
# Copyright 2022 Logan Rathbone, Province of Ontario, Canada
# Copyright 2019-2020 Donald Cooley, South Haven, Indiana, USA
# Copyright 2009-2015 Erik W. Hanson, Minneapolis, MN, USA
# All rights reserved.
@ -23,15 +24,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220420 bkw: Modified by SlackBuilds.org, BUILD=3:
# - fix PRINT_PACKAGE_NAME when ARCH not set in environment.
# - strip python shared lib.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=libtorrent-rasterbar
VERSION=${VERSION:-1.2.11}
BUILD=${BUILD:-3}
VERSION=${VERSION:-1.2.16}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -81,40 +78,32 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# https://github.com/qbittorrent/qBittorrent/issues/6383#issuecomment-281535787
sed -i -e "s/+ target_specific(),/+ target_specific() + ['-std=c++14'],/" \
bindings/python/setup.py
EXAMPLES=${EXAMPLES:-no}
[ "$EXAMPLES" = "yes" ] && examples="--enable-examples"
[ "$EXAMPLES" = "yes" ] && examples="-Dbuild_examples=ON"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS -std=c++14" \
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var/lib \
--disable-static \
--enable-python-binding \
--enable-encryption \
$examples \
--with-boost-libdir=/usr/lib${LIBDIRSUFFIX} \
--disable-debug \
--build=$ARCH-slackware-linux
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR:PATH=lib${LIBDIRSUFFIX} \
-Dpython-bindings=ON \
-Dpython-egg-info=ON \
-DCMAKE_BUILD_TYPE=Release ..
make
make install/strip DESTDIR=$PKG
cd ..
make
make install-strip DESTDIR=$PKG
strip $PKG/usr/lib*/python*/site-packages/*.so
# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog NEWS docs/ tools/ \
cp -a AUTHORS COPYING LICENSE ChangeLog NEWS README* docs/ tools/ \
$PKG/usr/doc/$PRGNAM-$VERSION
if [ "$EXAMPLES" = "yes" ]; then
cp -a examples/ $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ed25519/ $PKG/usr/doc/$PRGNAM-$VERSION
fi
find $PKG \
@ -123,8 +112,6 @@ find $PKG \
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
rm -f $PKG/usr/lib*/*.la
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

View file

@ -1,10 +1,10 @@
PRGNAM="libtorrent-rasterbar"
VERSION="1.2.11"
VERSION="1.2.16"
HOMEPAGE="https://libtorrent.org/"
DOWNLOAD="https://github.com/arvidn/libtorrent/releases/download/v1.2.11/libtorrent-rasterbar-1.2.11.tar.gz"
MD5SUM="12a329a8a51b793fd21c3a03bb70459e"
DOWNLOAD="https://github.com/arvidn/libtorrent/releases/download/v1.2.16/libtorrent-rasterbar-1.2.16.tar.gz"
MD5SUM="783e5f636114ec173640104f879deede"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Donald Cooley"
EMAIL="chytraeu@sdf.org"
MAINTAINER="Logan Rathbone"
EMAIL="poprocks@gmail.com"