diff options
Diffstat (limited to 'libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild')
-rw-r--r-- | libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild | 57 |
1 files changed, 22 insertions, 35 deletions
diff --git a/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild b/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild index 6f0109e8d5..550b1d7ab6 100644 --- a/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild +++ b/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild @@ -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" - -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 - -make -make install-strip DESTDIR=$PKG -strip $PKG/usr/lib*/python*/site-packages/*.so +[ "$EXAMPLES" = "yes" ] && examples="-Dbuild_examples=ON" + +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 .. + +# 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 |