aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/libtorrent
diff options
context:
space:
mode:
authorDanilo G. Baio <dbaio@FreeBSD.org>2019-07-30 23:36:22 +0000
committerDanilo G. Baio <dbaio@FreeBSD.org>2019-07-30 23:36:22 +0000
commite8aab5b796e8faffac42a1e431a65c45dd44f0b5 (patch)
tree5805af2b043a98afcda2ad02bbfc0edfb4bee447 /net-p2p/libtorrent
parent3cdcb4abe71208699ea7dcf513f139dc654215b5 (diff)
downloadports-e8aab5b796e8faffac42a1e431a65c45dd44f0b5.tar.gz
ports-e8aab5b796e8faffac42a1e431a65c45dd44f0b5.zip
net-p2p/libtorrent: Update to 0.13.8
Patches removed were incorporated upstream. Reported by: tj@mrsk.me (email)
Notes
Notes: svn path=/head/; revision=507684
Diffstat (limited to 'net-p2p/libtorrent')
-rw-r--r--net-p2p/libtorrent/Makefile6
-rw-r--r--net-p2p/libtorrent/distinfo6
-rw-r--r--net-p2p/libtorrent/files/patch-openssl-1.1.x107
-rw-r--r--net-p2p/libtorrent/files/patch-socket-issue47
-rw-r--r--net-p2p/libtorrent/pkg-plist4
5 files changed, 8 insertions, 162 deletions
diff --git a/net-p2p/libtorrent/Makefile b/net-p2p/libtorrent/Makefile
index 8d546b50cf8d..6a88a818129c 100644
--- a/net-p2p/libtorrent/Makefile
+++ b/net-p2p/libtorrent/Makefile
@@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= libtorrent
-PORTVERSION= 0.13.7
-PORTREVISION= 4
+PORTVERSION= 0.13.8
CATEGORIES= net-p2p
MASTER_SITES= https://rtorrent.net/downloads/
@@ -13,6 +12,7 @@ LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
USES= autoreconf compiler:c++11-lang libtool localbase:ldflags pathfix pkgconfig ssl
+
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-debug
CONFIGURE_ENV= OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto" OPENSSL_CFLAGS="-I\
@@ -40,6 +40,6 @@ CONFIGURE_ARGS+=--disable-instrumentation
.endif
post-install:
- @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtorrent.so.20.0.0
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtorrent.so.21.0.0
.include <bsd.port.post.mk>
diff --git a/net-p2p/libtorrent/distinfo b/net-p2p/libtorrent/distinfo
index c6264faa2a3a..801604c43205 100644
--- a/net-p2p/libtorrent/distinfo
+++ b/net-p2p/libtorrent/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1529447240
-SHA256 (libtorrent-0.13.7.tar.gz) = c738f60f4d7b6879cd2745fb4310bf24c9287219c1fd619706a9d5499ca7ecc1
-SIZE (libtorrent-0.13.7.tar.gz) = 782854
+TIMESTAMP = 1564447515
+SHA256 (libtorrent-0.13.8.tar.gz) = ed115a28f4ae8cfcd33b94a597c076ca74fd549867a26e4fac9505c27288e983
+SIZE (libtorrent-0.13.8.tar.gz) = 834027
diff --git a/net-p2p/libtorrent/files/patch-openssl-1.1.x b/net-p2p/libtorrent/files/patch-openssl-1.1.x
deleted file mode 100644
index 6e22dec999ed..000000000000
--- a/net-p2p/libtorrent/files/patch-openssl-1.1.x
+++ /dev/null
@@ -1,107 +0,0 @@
-https://github.com/rakshasa/libtorrent/commit/7b29b6bd2547e72e22b9b7981df27092842d2a10
-
-From 7b29b6bd2547e72e22b9b7981df27092842d2a10 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 5b1ea237..b885714d 100644
---- configure.ac
-+++ configure.ac
-@@ -71,12 +71,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
-@@ -87,6 +90,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
---- src/utils/diffie_hellman.cc
-+++ 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-p2p/libtorrent/files/patch-socket-issue b/net-p2p/libtorrent/files/patch-socket-issue
deleted file mode 100644
index db662c6901e3..000000000000
--- a/net-p2p/libtorrent/files/patch-socket-issue
+++ /dev/null
@@ -1,47 +0,0 @@
-https://github.com/rakshasa/libtorrent/pull/181
-
-From 0f957c2576d0d0c4c227e4453d92f67884e608af Mon Sep 17 00:00:00 2001
-From: Vladyslav Movchan <vladislav.movchan@gmail.com>
-Date: Sat, 3 Nov 2018 19:52:56 +0200
-Subject: [PATCH] Prevent loss of 'm_ipv6_socket' attribute which led to
- execution of setsockopt(..., IPPROTO_IP, IP_TOS, ...) on IPv6 socket
-
----
- src/net/socket_fd.cc | 4 ++--
- src/net/socket_fd.h | 1 +
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/net/socket_fd.cc b/src/net/socket_fd.cc
-index 54cb6ded..f04059f6 100644
---- src/net/socket_fd.cc
-+++ src/net/socket_fd.cc
-@@ -251,7 +251,7 @@ SocketFd::accept(rak::socket_address* sa) {
- socklen_t len = sizeof(rak::socket_address);
-
- if (sa == NULL) {
-- return SocketFd(::accept(m_fd, NULL, &len));
-+ return SocketFd(::accept(m_fd, NULL, &len), m_ipv6_socket);
- }
-
- int fd = ::accept(m_fd, sa->c_sockaddr(), &len);
-@@ -260,7 +260,7 @@ SocketFd::accept(rak::socket_address* sa) {
- *sa = sa->sa_inet6()->normalize_address();
- }
-
-- return SocketFd(fd);
-+ return SocketFd(fd, m_ipv6_socket);
- }
-
- // unsigned int
-diff --git a/src/net/socket_fd.h b/src/net/socket_fd.h
-index ca765e88..2329b4e9 100644
---- src/net/socket_fd.h
-+++ src/net/socket_fd.h
-@@ -51,6 +51,7 @@ class SocketFd {
-
- SocketFd() : m_fd(-1) {}
- explicit SocketFd(int fd) : m_fd(fd) {}
-+ SocketFd(int fd, bool ipv6_socket) : m_fd(fd), m_ipv6_socket(ipv6_socket) {}
-
- bool is_valid() const { return m_fd >= 0; }
-
diff --git a/net-p2p/libtorrent/pkg-plist b/net-p2p/libtorrent/pkg-plist
index 9cf5ee2c90e8..14be7ef3c739 100644
--- a/net-p2p/libtorrent/pkg-plist
+++ b/net-p2p/libtorrent/pkg-plist
@@ -63,6 +63,6 @@ include/torrent/utils/thread_base.h
include/torrent/utils/thread_interrupt.h
include/torrent/utils/uri_parser.h
lib/libtorrent.so
-lib/libtorrent.so.20
-lib/libtorrent.so.20.0.0
+lib/libtorrent.so.21
+lib/libtorrent.so.21.0.0
libdata/pkgconfig/libtorrent.pc