summaryrefslogtreecommitdiffstats
path: root/libtorrent-rasterbar/build/libtorrent-rasterbar.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2018-04-03 20:49:28 +0000
committer Eric Hameleers <alien@slackware.com>2018-04-03 20:49:28 +0000
commitc21ac6068bcd12e47139d4121290efdfe25ddf65 (patch)
tree8ccd0a2e2fb20a72f11790e13c1e29433dabd5fc /libtorrent-rasterbar/build/libtorrent-rasterbar.SlackBuild
parentece0580d2bc8924bd124e69e47c222a8367740e0 (diff)
downloadasb-c21ac6068bcd12e47139d4121290efdfe25ddf65.tar.gz
asb-c21ac6068bcd12e47139d4121290efdfe25ddf65.tar.xz
libtorrent-rasterbar: updated to 1.1.6
Diffstat (limited to 'libtorrent-rasterbar/build/libtorrent-rasterbar.SlackBuild')
-rwxr-xr-xlibtorrent-rasterbar/build/libtorrent-rasterbar.SlackBuild112
1 files changed, 63 insertions, 49 deletions
diff --git a/libtorrent-rasterbar/build/libtorrent-rasterbar.SlackBuild b/libtorrent-rasterbar/build/libtorrent-rasterbar.SlackBuild
index 2d2b5552..cfde5933 100755
--- a/libtorrent-rasterbar/build/libtorrent-rasterbar.SlackBuild
+++ b/libtorrent-rasterbar/build/libtorrent-rasterbar.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -88,6 +88,8 @@
# * Updated to accompany qbittorrent 3.3.12.
# 1.0.11-2: 21/nov/2017 by Eric Hameleers <alien@slackware.com>
# * Patched and rebuilt for newer boost in -current.
+# 1.1.6-1: 03/apr/2018 by Eric Hameleers <alien@slackware.com>
+# * Updated to accompany qbittorrent 4.0.4.
#
# Run 'sh libtorrent-rasterbar.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
@@ -98,12 +100,12 @@
# Set initial variables:
PRGNAM=libtorrent-rasterbar
-VERSION=${VERSION:-1.0.11}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.1.6}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j4 "}
TAG=${TAG:-alien}
-DOCS="AUTHORS COPYING ChangeLog NEWS README docs/"
+DOCS="AUTHORS COPYING ChangeLog LICENSE NEWS README* docs/"
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -121,19 +123,18 @@ SRCURL="https://github.com/arvidn/libtorrent/releases/download/libtorrent-$(echo
##
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
@@ -180,7 +181,7 @@ if ! [ -f ${SOURCE} ]; then
if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi
if ! [ "x${SRCURL}" == "x" ]; then
echo "Will download file to $(dirname $SOURCE)"
- wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
+ wget --no-check-certificate -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
@@ -210,15 +211,6 @@ cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .
-# Fix for boost older than 1.48 (the patch is harmless if you do have a new
-# enough version of boost):
-cat $SRCDIR/patches/libtorrent-rasterbar_boost_asio.diff | patch -p1 --verbose \
- 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
-
-# Add support for boost 1.65
-cat $SRCDIR/patches/libtorrent-rasterbar_boost_165.diff | patch -p1 --verbose \
- 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
-
# If your boost libraries ship with separate multi-threaded libraries, use them:
if [ -f /usr/lib${LIBDIRSUFFIX}/libboost_system-mt.so ]; then
MT="-mt"
@@ -227,38 +219,60 @@ else
fi
echo Building ...
-LDFLAGS="$SLKLDFLAGS $(/usr/bin/pkg-config --libs python)" \
-CXXFLAGS="$SLKCFLAGS" \
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --localstatedir=/var/lib \
- --sysconfdir=/etc \
- --enable-python-binding \
- --with-boost-libdir=/usr/lib${LIBDIRSUFFIX} \
- --with-boost-system=boost_system$MT \
- --program-prefix= \
- --program-suffix= \
- --build=$TARGET \
- 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
-
-make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
-make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log
-
-# Also build the useful dump_torrent:
+build_ltr() {
+ LDFLAGS="$SLKLDFLAGS" \
+ CXXFLAGS="$SLKCFLAGS -std=c++11" \
+ CFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --localstatedir=/var/lib \
+ --sysconfdir=/etc \
+ --enable-python-binding \
+ --disable-static \
+ --with-boost-libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-boost-system=boost_system$MT \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$TARGET \
+ $*
+}
+
+# Prime the log files:
+echo > $OUTPUT/configure-${PRGNAM}.log
+echo > $OUTPUT/make-${PRGNAM}.log
+echo > $OUTPUT/install-${PRGNAM}.log
+
+# First, compile with python2 support:
+PYTHON=/usr/bin/python2 \
+build_ltr \
+ --with-boost-python=boost_python \
+ 2>&1 | tee -a $OUTPUT/configure-${PRGNAM}.log
+make $NUMJOBS 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
+make DESTDIR=$PKG install 2>&1 | tee -a $OUTPUT/install-${PRGNAM}.log
+
+# Also build and install the useful make_torrent and dump_torrent:
echo -e "\n**\n**\n" >> $OUTPUT/make-${PRGNAM}.log
-make -C examples dump_torrent 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
-
-# Install the dump_torrent binary manually:
+make -C examples dump_torrent make_torrent 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
install -d -m0755 $PKG/usr/bin
install -m0755 examples/dump_torrent $PKG/usr/bin/dump_torrent
+install -m0755 examples/make_torrent $PKG/usr/bin/make_torrent
+
+# If present, compile with python3 support:
+if which python3 1>/dev/null 2>/dev/null ; then
+ make clean
+ PYTHON=/usr/bin/python3 \
+ build_ltr \
+ --with-boost-python=boost_python3 \
+ 2>&1 | tee -a $OUTPUT/configure-${PRGNAM}.log
+ make $NUMJOBS 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
+ make DESTDIR=$PKG install 2>&1 | tee -a $OUTPUT/install-${PRGNAM}.log
+fi
-## Install missing asio includes; thanks to Heinz Wiesinger.
-## Note: no longer present in v0.15.0
-#cp -a include/libtorrent/asio $PKG/usr/include/libtorrent/
+# Remove .la files:
+find $PKG/usr -type f -name "*.la" -exec rm -f {} \; || true
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION