summaryrefslogtreecommitdiff
path: root/net-libs/libtorrent
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-05-20 20:14:27 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-05-20 20:14:27 +0100
commit2bacbb3374587799c77a999f56352233a353b19e (patch)
tree1bcd1ca794782a57f9ab99006e97da5b785e042a /net-libs/libtorrent
parent97967bbbae8f43c98315b079178f1717f130e302 (diff)
gentoo resync : 20.05.2018
Diffstat (limited to 'net-libs/libtorrent')
-rw-r--r--net-libs/libtorrent/Manifest9
-rw-r--r--net-libs/libtorrent/files/libtorrent-0001-Fix-the-DH-parameters-generation-with-OpenSSL-1.1.patch105
-rw-r--r--net-libs/libtorrent/files/libtorrent-cppunit.patch36
-rw-r--r--net-libs/libtorrent/files/libtorrent-openssl-1.1-part2.patch57
-rw-r--r--net-libs/libtorrent/files/libtorrent-openssl-1.1-part3.patch68
-rw-r--r--net-libs/libtorrent/libtorrent-0.13.6-r1.ebuild4
-rw-r--r--net-libs/libtorrent/libtorrent-0.13.6-r2.ebuild69
-rw-r--r--net-libs/libtorrent/libtorrent-0.13.6.ebuild4
8 files changed, 346 insertions, 6 deletions
diff --git a/net-libs/libtorrent/Manifest b/net-libs/libtorrent/Manifest
index a288ee9dada9..2498749b0309 100644
--- a/net-libs/libtorrent/Manifest
+++ b/net-libs/libtorrent/Manifest
@@ -1,4 +1,9 @@
+AUX libtorrent-0001-Fix-the-DH-parameters-generation-with-OpenSSL-1.1.patch 3172 BLAKE2B 2a56ba61b9516b3cf430a79c146c81bd2934449fd46f85bc41ecfc5032faba58cdde86233790bf9d456b28f6760132096188afaeca5b8356ce586e6ad9fbd494 SHA512 e427b4b96a92e1dbbb8883d84688984b9ec7c6815f333bca8a0ad0a8a32b25766100a8182a3d11720563d376501f64b71d86d92379450e41da706dd47e0381d5
+AUX libtorrent-cppunit.patch 1023 BLAKE2B 3d9b3191c1207e1a38a55aeb233e13f8a84e0fcb34e5b8b13801224dac916e730a2c9d1620ca3ebe559a44d04a0d0051e7383071f25a5d5e560a5e141f81e93d SHA512 0f4c22c647a13a3ef80f79f12b04b08f797cbb3a50be48102a7258b7167e943dcc26f5ae26e3ff827b74709d2a6e2981fa131f7baefb6cf79467930e9533113f
+AUX libtorrent-openssl-1.1-part2.patch 1902 BLAKE2B 1d0e405a0a72be250c7a79e410860d8a0afefda3f574d3854469620157d1a3184d63d902af9694d27c786728beb45d93225c09a8b427edf630675fe251d63298 SHA512 baee88e7609fe3976d59bd220c545473a336765fe9f618502cbc6450b43f8c384b56afeea379d42b2f2ee748ab088badb841140d2ea82a91b9f34cd25ff05ef3
+AUX libtorrent-openssl-1.1-part3.patch 1882 BLAKE2B ad7b62d238ad57966c91e38f32b2d45673d9caa1bb4347788cde366a5235c1a02b0b290c3b4e010c0c19baf36c0e2ad7b2651c9bed67a51714b877924f0e6c22 SHA512 aa83d4e636b3327cf78e9eb4bab14e3254d90829549020240e4498d78308cdc6e058035457341d51a1d5d6cd9b89364ebad33f6d46364f9b72171abb49c954f0
DIST libtorrent-0.13.6.tar.gz 781253 BLAKE2B f5293309b0e6b64a3659ea839528f94b346e1698f6892383b11f30b6d10d161d88582159ac9f4b1864d47e5f8c84cb3830376dde531d84c47327e7c342c75bbb SHA512 b8aea4060357a8a40d15d42f1f698ef6f3ebdc885000bfbfa5bf9c81af8c88b5503a107e05c214e3e8489126928d336356c5e7e0eaf836b6b84a3cf74633b050
-EBUILD libtorrent-0.13.6-r1.ebuild 1718 BLAKE2B 3f5b85fafe53d650f06febd011ece9671e286f017cdf32e562b6769c554d2d47ddd62e5b341fa33325b7fbfa28873ab835647170a9a2c6e7b6cfa2a31043479f SHA512 3e6049020a7edcb88c521e6e2dd6a563393fa34c136708a774b4353736379c96f4cbd5674d44a69e11f470f997ecf9929cd3beb06440ce6d247ccc66c3438bb6
-EBUILD libtorrent-0.13.6.ebuild 1331 BLAKE2B ec48bafe6a21de31d1db0fcb808fcffc28e3d9c775636dba71d95c42283912cdbd447f00cc97bb87f0e1922f9ad689c715ff128698fb872ab77f0c36192f9eb4 SHA512 2d10363590b0e224fa814964a3ff8adaf3e43f2e2ee1feb7ccf4d3ff524577aeb295e10f5fe5270bbf694f035440078c7e2caf1e3f6ca1e0231aac03ad81bac2
+EBUILD libtorrent-0.13.6-r1.ebuild 1723 BLAKE2B e44859672997bfa57b8023b77a8ed5a3242c54399e36796efabab19f0aef05190b4824c50bd85cb93abad7ce61162d50fe77020b87e491212c62dbf03a04e81a SHA512 77536744824d8fdd01e80a8c3ccba6e2f94b6f225939da940aeb092efe939b117756add5874cedbcabd23e2e17c69d10472cd63f1dbf56864b09c1df7ad94f3d
+EBUILD libtorrent-0.13.6-r2.ebuild 1944 BLAKE2B 978da5af4a45f8b93b3d8b7c16f03f52ef44d9f4c4300d8a1403e9b3b43e4581b37c445d8223f814981fa37f8bdf0d40fb592d7063a868346e3bd799bee5d90f SHA512 28f45a819da82ec6af8c51ab7713f8f32a19486f7836fc0affe8859a846515467b9498987e6af44cac3d2f6e90b81a333dedd513e9323d980e2af5844d071739
+EBUILD libtorrent-0.13.6.ebuild 1336 BLAKE2B e98ec085623bfc322acd68dd2367b7e6bedb497b3ccdf914e19089108468db1ad16cef264b5423e2c8ea355e1eca398a418f9ecfa877a5d7865b0d2f1c740af3 SHA512 2e240a54774583deb1a43e3b26eb58f209885b894fc9dab5469b10d06e80cbf8aa94de57184c3be3faf60a7839b6003687c1c5bb463bf9594e688fb791e97bfa
MISC metadata.xml 443 BLAKE2B 2a25f3804cf9c29cd16835e22dd67e7a94fe2dbce0c7c4a85e0a9042a79f798349a55f1282d6c92b19afbb10120d9e9b5a30e03f082d90b622593ee7d8fa5e67 SHA512 32c9f1b9d21fb99768d60d842a49a80a844f8a6ea94c012a97fa94369916a2fd6df0965dbb394e0de2360c79c01355f8a4872b2d0032b3eef5c6a4490c53ef82
diff --git a/net-libs/libtorrent/files/libtorrent-0001-Fix-the-DH-parameters-generation-with-OpenSSL-1.1.patch b/net-libs/libtorrent/files/libtorrent-0001-Fix-the-DH-parameters-generation-with-OpenSSL-1.1.patch
new file mode 100644
index 000000000000..55d0cb901b71
--- /dev/null
+++ b/net-libs/libtorrent/files/libtorrent-0001-Fix-the-DH-parameters-generation-with-OpenSSL-1.1.patch
@@ -0,0 +1,105 @@
+From 4607bbf78040789dee29266878ce109136b984ef Mon Sep 17 00:00:00 2001
+From: rakshasa <sundell.software@gmail.com>
+Date: Tue, 20 Dec 2016 19:51:02 +0900
+Subject: [PATCH] Added support for openssl 1.1.
+
+---
+ configure.ac | 4 ++++
+ src/utils/diffie_hellman.cc | 36 ++++++++++++++++++++++++++++++++++--
+ 2 files changed, 38 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 65e34872..27e33570 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -69,12 +69,15 @@ AC_ARG_ENABLE(openssl,
+ [ --disable-openssl Don't use OpenSSL's SHA1 implementation.],
+ [
+ if test "$enableval" = "yes"; then
++dnl move to scripts.
+ PKG_CHECK_MODULES(OPENSSL, libcrypto,
+ CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS";
+ LIBS="$LIBS $OPENSSL_LIBS")
+
+ AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
+ AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
++ AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
++
+ else
+ AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.)
+ fi
+@@ -85,6 +88,7 @@ AC_ARG_ENABLE(openssl,
+
+ AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
+ AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
++ AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
+ ]
+ )
+
+diff --git a/src/utils/diffie_hellman.cc b/src/utils/diffie_hellman.cc
+index aa653d45..7ec13165 100644
+--- a/src/utils/diffie_hellman.cc
++++ b/src/utils/diffie_hellman.cc
+@@ -54,11 +54,23 @@ DiffieHellman::DiffieHellman(const unsigned char *prime, int primeLength,
+ m_secret(NULL), m_size(0) {
+
+ #ifdef USE_OPENSSL
++
+ m_dh = DH_new();
++
++#ifdef USE_OPENSSL_1_1
++ BIGNUM * const dh_p = BN_bin2bn(prime, primeLength, NULL);
++ BIGNUM * const dh_g = BN_bin2bn(generator, generatorLength, NULL);
++
++ if (dh_p == NULL || dh_g == NULL ||
++ !DH_set0_pqg(m_dh, dh_p, NULL, dh_g))
++ throw internal_error("Could not generate Diffie-Hellman parameters");
++#else
+ m_dh->p = BN_bin2bn(prime, primeLength, NULL);
+ m_dh->g = BN_bin2bn(generator, generatorLength, NULL);
++#endif
+
+ DH_generate_key(m_dh);
++
+ #else
+ throw internal_error("Compiled without encryption support.");
+ #endif
+@@ -74,7 +86,19 @@ DiffieHellman::~DiffieHellman() {
+ bool
+ DiffieHellman::is_valid() const {
+ #ifdef USE_OPENSSL
++ if (m_dh == NULL)
++ return false;
++
++#ifdef USE_OPENSSL_1_1
++ const BIGNUM *pub_key;
++
++ DH_get0_key(m_dh, &pub_key, NULL);
++
++ return pub_key != NULL;
++#else
+ return m_dh != NULL && m_dh->pub_key != NULL;
++#endif
++
+ #else
+ return false;
+ #endif
+@@ -103,8 +127,16 @@ DiffieHellman::store_pub_key(unsigned char* dest, unsigned int length) {
+ #ifdef USE_OPENSSL
+ std::memset(dest, 0, length);
+
+- if ((int)length >= BN_num_bytes(m_dh->pub_key))
+- BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
++ const BIGNUM *pub_key;
++
++#ifdef USE_OPENSSL_1_1
++ DH_get0_key(m_dh, &pub_key, NULL);
++#else
++ pub_key = m_dh->pub_key;
++#endif
++
++ if ((int)length >= BN_num_bytes(pub_key))
++ BN_bn2bin(pub_key, dest + length - BN_num_bytes(pub_key));
+ #endif
+ }
+
diff --git a/net-libs/libtorrent/files/libtorrent-cppunit.patch b/net-libs/libtorrent/files/libtorrent-cppunit.patch
new file mode 100644
index 000000000000..eed21733b29c
--- /dev/null
+++ b/net-libs/libtorrent/files/libtorrent-cppunit.patch
@@ -0,0 +1,36 @@
+From b8b24b58a9bed6db1c886ea71a9bb407fb41fc2f Mon Sep 17 00:00:00 2001
+From: rakshasa <sundell.software@gmail.com>
+Date: Sun, 23 Oct 2016 08:54:11 +0900
+Subject: [PATCH] Use pkg-config for cppunit.
+
+---
+ configure.ac | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2b3eb7ab..65e34872 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,6 @@ AC_SUBST(LIBTORRENT_INTERFACE_VERSION_NO)
+
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS(config.h)
+-AM_PATH_CPPUNIT(1.9.6)
+
+ AC_PROG_CXX
+
+@@ -60,9 +59,11 @@ CC_ATTRIBUTE_VISIBILITY
+ AX_PTHREAD
+ AX_CHECK_ZLIB
+
+-CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+-CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
+-LIBS="$PTHREAD_LIBS $LIBS"
++PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
++
++CFLAGS="$PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CFLAGS"
++CXXFLAGS="$PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CXXFLAGS"
++LIBS="$PTHREAD_LIBS $CPPUNIT_LIBS $LIBS"
+
+ AC_ARG_ENABLE(openssl,
+ [ --disable-openssl Don't use OpenSSL's SHA1 implementation.],
diff --git a/net-libs/libtorrent/files/libtorrent-openssl-1.1-part2.patch b/net-libs/libtorrent/files/libtorrent-openssl-1.1-part2.patch
new file mode 100644
index 000000000000..60542e4b4464
--- /dev/null
+++ b/net-libs/libtorrent/files/libtorrent-openssl-1.1-part2.patch
@@ -0,0 +1,57 @@
+From 43213fecfad863e2c9e47accde9b76496ff6d1e5 Mon Sep 17 00:00:00 2001
+From: rakshasa <sundell.software@gmail.com>
+Date: Sun, 25 Dec 2016 11:58:04 +0900
+Subject: [PATCH] Cleaned up openssl automake script.
+
+---
+ configure.ac | 37 ++-----------------------------------
+ 1 file changed, 2 insertions(+), 35 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 27e33570..33f755c9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -65,41 +65,8 @@ CFLAGS="$PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CFLAGS"
+ CXXFLAGS="$PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CXXFLAGS"
+ LIBS="$PTHREAD_LIBS $CPPUNIT_LIBS $LIBS"
+
+-AC_ARG_ENABLE(openssl,
+- [ --disable-openssl Don't use OpenSSL's SHA1 implementation.],
+- [
+- if test "$enableval" = "yes"; then
+-dnl move to scripts.
+- PKG_CHECK_MODULES(OPENSSL, libcrypto,
+- CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS";
+- LIBS="$LIBS $OPENSSL_LIBS")
+-
+- AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
+- AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
+- AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
+-
+- else
+- AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.)
+- fi
+- ],[
+- PKG_CHECK_MODULES(OPENSSL, libcrypto,
+- CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS";
+- LIBS="$LIBS $OPENSSL_LIBS")
+-
+- AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
+- AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
+- AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
+- ]
+-)
+-
+-AC_ARG_ENABLE(cyrus-rc4,
+- [ --enable-cyrus-rc4=PFX Use Cyrus RC4 implementation.],
+- [
+- CXXFLAGS="$CXXFLAGS -I${enableval}/include";
+- LIBS="$LIBS -lrc4 -L${enableval}/lib"
+- AC_DEFINE(USE_CYRUS_RC4, 1, Using Cyrus RC4 implementation.)
+- ]
+-)
++TORRENT_ARG_OPENSSL
++TORRENT_ARG_CYRUS_RC4
+
+ AC_CHECK_FUNCS(posix_memalign)
+
diff --git a/net-libs/libtorrent/files/libtorrent-openssl-1.1-part3.patch b/net-libs/libtorrent/files/libtorrent-openssl-1.1-part3.patch
new file mode 100644
index 000000000000..3fc338d8b088
--- /dev/null
+++ b/net-libs/libtorrent/files/libtorrent-openssl-1.1-part3.patch
@@ -0,0 +1,68 @@
+From d36561c8cc91698f3075c264af6d7d99e13cbff0 Mon Sep 17 00:00:00 2001
+From: rakshasa <sundell.software@gmail.com>
+Date: Sun, 25 Dec 2016 12:09:35 +0900
+Subject: [PATCH] More stuff.
+
+---
+ Makefile.am | 1 +
+ scripts/ssl.m4 | 39 +++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 40 insertions(+)
+ create mode 100644 scripts/ssl.m4
+
+diff --git a/Makefile.am b/Makefile.am
+index f175e634..9507b9ea 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -8,6 +8,7 @@ EXTRA_DIST= \
+ scripts/checks.m4 \
+ scripts/common.m4 \
+ scripts/attributes.m4 \
++ scripts/ssl.m4 \
+ doc/main.xml \
+ doc/http.xml \
+ doc/torrent.xml \
+diff --git a/scripts/ssl.m4 b/scripts/ssl.m4
+new file mode 100644
+index 00000000..e9cf6303
+--- /dev/null
++++ b/scripts/ssl.m4
+@@ -0,0 +1,39 @@
++AC_DEFUN([TORRENT_CHECK_OPENSSL],
++ [
++ PKG_CHECK_MODULES(OPENSSL, libcrypto,
++ CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS";
++ LIBS="$LIBS $OPENSSL_LIBS")
++
++ AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
++ AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
++ AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
++ ]
++)
++
++AC_DEFUN([TORRENT_ARG_OPENSSL],
++ [
++ AC_ARG_ENABLE(openssl,
++ [ --disable-openssl Don't use OpenSSL's SHA1 implementation.],
++ [
++ if test "$enableval" = "yes"; then
++ TORRENT_CHECK_OPENSSL
++ else
++ AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.)
++ fi
++ ],[
++ TORRENT_CHECK_OPENSSL
++ ])
++ ]
++)
++
++AC_DEFUN([TORRENT_ARG_CYRUS_RC4],
++ [
++ AC_ARG_ENABLE(cyrus-rc4,
++ [ --enable-cyrus-rc4=PFX Use Cyrus RC4 implementation.],
++ [
++ CXXFLAGS="$CXXFLAGS -I${enableval}/include";
++ LIBS="$LIBS -lrc4 -L${enableval}/lib"
++ AC_DEFINE(USE_CYRUS_RC4, 1, Using Cyrus RC4 implementation.)
++ ])
++ ]
++)
diff --git a/net-libs/libtorrent/libtorrent-0.13.6-r1.ebuild b/net-libs/libtorrent/libtorrent-0.13.6-r1.ebuild
index 7cc8363c3714..402b6608920d 100644
--- a/net-libs/libtorrent/libtorrent-0.13.6-r1.ebuild
+++ b/net-libs/libtorrent/libtorrent-0.13.6-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -24,7 +24,7 @@ RDEPEND="
sys-libs/zlib
>=dev-libs/libsigc++-2.2.2:2
ssl? (
- !libressl? ( dev-libs/openssl:0= )
+ !libressl? ( <dev-libs/openssl-1.1:0= )
libressl? ( dev-libs/libressl:= )
)"
DEPEND="${RDEPEND}
diff --git a/net-libs/libtorrent/libtorrent-0.13.6-r2.ebuild b/net-libs/libtorrent/libtorrent-0.13.6-r2.ebuild
new file mode 100644
index 000000000000..52019c36aa2e
--- /dev/null
+++ b/net-libs/libtorrent/libtorrent-0.13.6-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="BitTorrent library written in C++ for *nix"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+
+# The README says that the library ABI is not yet stable and dependencies on
+# the library should be an explicit, syncronized version until the library
+# has had more time to mature. Until it matures we should not include a soname
+# subslot.
+SLOT="0"
+
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="debug ipv6 libressl ssl test"
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-libs/libsigc++-2.2.2:2
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-util/cppunit"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-cppunit.patch"
+ "${FILESDIR}/${PN}-0001-Fix-the-DH-parameters-generation-with-OpenSSL-1.1.patch"
+ "${FILESDIR}/${PN}-openssl-1.1-part2.patch"
+ "${FILESDIR}/${PN}-openssl-1.1-part3.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # bug 518582
+ local disable_instrumentation
+ echo -e "#include <inttypes.h>\nint main(){ int64_t var = 7; __sync_add_and_fetch(&var, 1); return 0;}" > "${T}/sync_add_and_fetch.c" || die
+ $(tc-getCC) ${CFLAGS} -o /dev/null -x c "${T}/sync_add_and_fetch.c" >/dev/null 2>&1
+ if [[ $? -ne 0 ]]; then
+ disable_instrumentation="--disable-instrumentation"
+ fi
+
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ --enable-aligned \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable ssl openssl) \
+ ${disable_instrumentation} \
+ --with-posix-fallocate
+}
+
+src_install() {
+ default
+
+ find "${D}" -name '*.la' -delete
+}
diff --git a/net-libs/libtorrent/libtorrent-0.13.6.ebuild b/net-libs/libtorrent/libtorrent-0.13.6.ebuild
index 49cf4e570c4e..90e62d00ecf0 100644
--- a/net-libs/libtorrent/libtorrent-0.13.6.ebuild
+++ b/net-libs/libtorrent/libtorrent-0.13.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -24,7 +24,7 @@ RDEPEND="
sys-libs/zlib
>=dev-libs/libsigc++-2.2.2:2
ssl? (
- !libressl? ( dev-libs/openssl:0= )
+ !libressl? ( <dev-libs/openssl-1.1:0= )
libressl? ( dev-libs/libressl:= )
)"
DEPEND="${RDEPEND}