pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/libtorrent libtorrent: updated to 0.13.7



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7389fc6baebf
branches:  trunk
changeset: 382260:7389fc6baebf
user:      adam <adam%pkgsrc.org@localhost>
date:      Sun Jun 24 16:57:58 2018 +0000

description:
libtorrent: updated to 0.13.7

0.13.7:
If you want news, watch CNN or something.

diffstat:

 net/libtorrent/Makefile                                   |    9 +-
 net/libtorrent/PLIST                                      |    5 +-
 net/libtorrent/distinfo                                   |   15 +-
 net/libtorrent/patches/patch-config.h.in                  |   17 ++
 net/libtorrent/patches/patch-configure                    |  106 ++++++++++++++
 net/libtorrent/patches/patch-src_torrent_poll__kqueue.cc  |   52 ++++++-
 net/libtorrent/patches/patch-src_utils_diffie__hellman.cc |   57 +++++++
 7 files changed, 244 insertions(+), 17 deletions(-)

diffs (truncated from 341 to 300 lines):

diff -r 9f2604d1fc8f -r 7389fc6baebf net/libtorrent/Makefile
--- a/net/libtorrent/Makefile   Sun Jun 24 16:54:59 2018 +0000
+++ b/net/libtorrent/Makefile   Sun Jun 24 16:57:58 2018 +0000
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile,v 1.58 2017/12/26 23:14:42 he Exp $
+# $NetBSD: Makefile,v 1.59 2018/06/24 16:57:58 adam Exp $
 
-DISTNAME=      libtorrent-0.13.6
-PKGREVISION=   2
+DISTNAME=      libtorrent-0.13.7
 CATEGORIES=    net
 MASTER_SITES=  http://rtorrent.net/downloads/
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      http://rakshasa.github.io/rtorrent/
+HOMEPAGE=      https://github.com/rakshasa/libtorrent
 COMMENT=       BitTorrent library written in C++ for *nix
 LICENSE=       gnu-gpl-v2
 
@@ -29,7 +28,7 @@
 
 # configure check is fooled by trap & emulate of unaligned access on alpha
 .if (${MACHINE_ARCH} == "alpha")
-CONFIGURE_ARGS+= --enable-aligned
+CONFIGURE_ARGS+=       --enable-aligned
 .endif
 
 .if !empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly" || ${OPSYS} == "Darwin"
diff -r 9f2604d1fc8f -r 7389fc6baebf net/libtorrent/PLIST
--- a/net/libtorrent/PLIST      Sun Jun 24 16:54:59 2018 +0000
+++ b/net/libtorrent/PLIST      Sun Jun 24 16:57:58 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.12 2014/06/15 22:44:15 tron Exp $
+@comment $NetBSD: PLIST,v 1.13 2018/06/24 16:57:58 adam Exp $
 include/torrent/bitfield.h
 include/torrent/chunk_manager.h
 include/torrent/common.h
@@ -28,6 +28,7 @@
 include/torrent/exceptions.h
 include/torrent/hash_string.h
 include/torrent/http.h
+include/torrent/net/socket_address_key.h
 include/torrent/object.h
 include/torrent/object_raw_bencode.h
 include/torrent/object_static_map.h
@@ -50,6 +51,7 @@
 include/torrent/tracker.h
 include/torrent/tracker_controller.h
 include/torrent/tracker_list.h
+include/torrent/utils/directory_events.h
 include/torrent/utils/extents.h
 include/torrent/utils/log.h
 include/torrent/utils/log_buffer.h
@@ -60,5 +62,6 @@
 include/torrent/utils/signal_bitfield.h
 include/torrent/utils/thread_base.h
 include/torrent/utils/thread_interrupt.h
+include/torrent/utils/uri_parser.h
 lib/libtorrent.la
 lib/pkgconfig/libtorrent.pc
diff -r 9f2604d1fc8f -r 7389fc6baebf net/libtorrent/distinfo
--- a/net/libtorrent/distinfo   Sun Jun 24 16:54:59 2018 +0000
+++ b/net/libtorrent/distinfo   Sun Jun 24 16:57:58 2018 +0000
@@ -1,10 +1,13 @@
-$NetBSD: distinfo,v 1.37 2017/12/26 23:14:42 he Exp $
+$NetBSD: distinfo,v 1.38 2018/06/24 16:57:58 adam Exp $
 
-SHA1 (libtorrent-0.13.6.tar.gz) = 493691929b701f4402f13c725840addf95231ad2
-RMD160 (libtorrent-0.13.6.tar.gz) = a143a0ef9e86cf989c2c7dff6c86a41d23ddc244
-SHA512 (libtorrent-0.13.6.tar.gz) = b8aea4060357a8a40d15d42f1f698ef6f3ebdc885000bfbfa5bf9c81af8c88b5503a107e05c214e3e8489126928d336356c5e7e0eaf836b6b84a3cf74633b050
-Size (libtorrent-0.13.6.tar.gz) = 781253 bytes
+SHA1 (libtorrent-0.13.7.tar.gz) = 2c859b5b382786646ba6001058faa07db67c5a48
+RMD160 (libtorrent-0.13.7.tar.gz) = 071f6311fd32e53447bdf7f6d97bc7585dbaff70
+SHA512 (libtorrent-0.13.7.tar.gz) = 7bf3e87dbd19eb4e6806dff8a01c3ec61ea960bbd809d4bcbee96a46e169f97d0baf0fc85ab4a1efbbab07850e9b1060bae46c453ea6c42f5c23f8d921295efb
+Size (libtorrent-0.13.7.tar.gz) = 782854 bytes
+SHA1 (patch-config.h.in) = 7ea6ef87727756afe3882aad769a48488fc22c86
+SHA1 (patch-configure) = 6c91606fc317d2d77c5b34d2b47d22a66a2f22c3
 SHA1 (patch-src_Makefile.am) = d965bdfd967a71d14ebcad6b32564a1c0908739d
 SHA1 (patch-src_Makefile.in) = 05f55223073fb57cc11fbb307708ba262899d85f
 SHA1 (patch-src_data_chunk__list.cpp) = 92a5f36d7ae993667123051b39e6033c73169f4e
-SHA1 (patch-src_torrent_poll__kqueue.cc) = b6158ea858f4a12db8c763ac77eb09d62c65f804
+SHA1 (patch-src_torrent_poll__kqueue.cc) = 1f98ec93dcaaa587351de9b239712504aef6374b
+SHA1 (patch-src_utils_diffie__hellman.cc) = 65c7e6e305d23504b6c0d07d9e78b8483676d8ee
diff -r 9f2604d1fc8f -r 7389fc6baebf net/libtorrent/patches/patch-config.h.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/libtorrent/patches/patch-config.h.in  Sun Jun 24 16:57:58 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-config.h.in,v 1.1 2018/06/24 16:57:58 adam Exp $
+
+Fix for OpenSSL 1.1.x.
+https://github.com/rakshasa/libtorrent/issues/171
+
+--- config.h.in.orig   2018-06-24 16:42:49.312535308 +0000
++++ config.h.in
+@@ -215,6 +215,9 @@
+ /* Using OpenSSL's SHA1 implementation. */
+ #undef USE_OPENSSL_SHA
+ 
++/* Using OpenSSL 1.1.x. */
++#undef USE_OPENSSL_1_1
++
+ /* posix_fallocate supported. */
+ #undef USE_POSIX_FALLOCATE
+ 
diff -r 9f2604d1fc8f -r 7389fc6baebf net/libtorrent/patches/patch-configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/libtorrent/patches/patch-configure    Sun Jun 24 16:57:58 2018 +0000
@@ -0,0 +1,106 @@
+$NetBSD: patch-configure,v 1.1 2018/06/24 16:57:58 adam Exp $
+
+Fix for OpenSSL 1.1.x.
+https://github.com/rakshasa/libtorrent/issues/171
+
+--- configure.orig     2018-06-24 16:28:58.830908273 +0000
++++ configure
+@@ -18494,6 +18494,49 @@ $as_echo "#define USE_OPENSSL 1" >>confd
+ 
+ $as_echo "#define USE_OPENSSL_SHA 1" >>confdefs.h
+ 
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_set0_pqg in -lcrypto" >&5
++$as_echo_n "checking for DH_set0_pqg in -lcrypto... " >&6; }
++if ${ac_cv_lib_crypto_DH_set0_pqg+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypto  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char DH_set0_pqg ();
++int
++main ()
++{
++return DH_set0_pqg ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_crypto_DH_set0_pqg=yes
++else
++  ac_cv_lib_crypto_DH_set0_pqg=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_DH_set0_pqg" >&5
++$as_echo "$ac_cv_lib_crypto_DH_set0_pqg" >&6; }
++if test "x$ac_cv_lib_crypto_DH_set0_pqg" = xyes; then :
++
++$as_echo "#define USE_OPENSSL_1_1 1" >>confdefs.h
++
++fi
++
++
+     else
+ 
+ $as_echo "#define USE_NSS_SHA 1" >>confdefs.h
+@@ -18601,6 +18644,48 @@ $as_echo "#define USE_OPENSSL 1" >>confd
+ 
+ $as_echo "#define USE_OPENSSL_SHA 1" >>confdefs.h
+ 
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_set0_pqg in -lcrypto" >&5
++$as_echo_n "checking for DH_set0_pqg in -lcrypto... " >&6; }
++if ${ac_cv_lib_crypto_DH_set0_pqg+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypto  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char DH_set0_pqg ();
++int
++main ()
++{
++return DH_set0_pqg ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_crypto_DH_set0_pqg=yes
++else
++  ac_cv_lib_crypto_DH_set0_pqg=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_DH_set0_pqg" >&5
++$as_echo "$ac_cv_lib_crypto_DH_set0_pqg" >&6; }
++if test "x$ac_cv_lib_crypto_DH_set0_pqg" = xyes; then :
++
++$as_echo "#define USE_OPENSSL_1_1 1" >>confdefs.h
++
++fi
++
+ 
+ 
+ fi
diff -r 9f2604d1fc8f -r 7389fc6baebf net/libtorrent/patches/patch-src_torrent_poll__kqueue.cc
--- a/net/libtorrent/patches/patch-src_torrent_poll__kqueue.cc  Sun Jun 24 16:54:59 2018 +0000
+++ b/net/libtorrent/patches/patch-src_torrent_poll__kqueue.cc  Sun Jun 24 16:57:58 2018 +0000
@@ -1,15 +1,57 @@
-$NetBSD: patch-src_torrent_poll__kqueue.cc,v 1.1 2017/12/26 23:14:42 he Exp $
+$NetBSD: patch-src_torrent_poll__kqueue.cc,v 1.2 2018/06/24 16:57:58 adam Exp $
 
 Add a cast so that this builds with the c++ in 8.0.
+https://github.com/rakshasa/libtorrent/issues/159
 
---- ./src/torrent/poll_kqueue.cc.orig  2015-08-08 15:01:32.000000000 +0000
-+++ ./src/torrent/poll_kqueue.cc
-@@ -111,7 +111,7 @@ PollKQueue::modify(Event* event, unsigne
+--- src/torrent/poll_kqueue.cc.orig    2018-06-07 04:24:45.000000000 +0000
++++ src/torrent/poll_kqueue.cc
+@@ -69,6 +69,12 @@ namespace torrent {
+ 
+ #ifdef USE_KQUEUE
+ 
++#if defined(__NetBSD__)
++#define LIBEV_UDATA(a) ((intptr_t)(a))
++#else
++#define LIBEV_UDATA(a) (a)
++#endif
++
+ inline uint32_t
+ PollKQueue::event_mask(Event* e) {
+   assert(e->file_descriptor() != -1);
+@@ -111,7 +117,7 @@ PollKQueue::modify(Event* event, unsigne
    struct kevent* itr = m_changes + (m_changedEvents++);
  
    assert(event == m_table[event->file_descriptor()].second);
 -  EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, event);
-+  EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, (intptr_t)event);
++  EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, LIBEV_UDATA(event));
  }
  
  PollKQueue*
+@@ -314,11 +320,11 @@ PollKQueue::close(Event* event) {
+ 
+   // Shouldn't be needed anymore.
+   for (struct kevent *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr)
+-    if (itr->udata == event)
++    if (itr->udata == LIBEV_UDATA(event))
+       itr->udata = NULL;
+ 
+   m_changedEvents = std::remove_if(m_changes, m_changes + m_changedEvents,
+-                                   rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes;
++                                   rak::equal(LIBEV_UDATA(event), rak::mem_ref(&kevent::udata))) - m_changes;
+ }
+ 
+ void
+@@ -340,11 +346,11 @@ PollKQueue::closed(Event* event) {
+ 
+   // Shouldn't be needed anymore.
+   for (struct kevent *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr)
+-    if (itr->udata == event)
++    if (itr->udata == LIBEV_UDATA(event))
+       itr->udata = NULL;
+ 
+   m_changedEvents = std::remove_if(m_changes, m_changes + m_changedEvents,
+-                                   rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes;
++                                   rak::equal(LIBEV_UDATA(event), rak::mem_ref(&kevent::udata))) - m_changes;
+ }
+ 
+ // Use custom defines for EPOLL* to make the below code compile with
diff -r 9f2604d1fc8f -r 7389fc6baebf net/libtorrent/patches/patch-src_utils_diffie__hellman.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/libtorrent/patches/patch-src_utils_diffie__hellman.cc Sun Jun 24 16:57:58 2018 +0000
@@ -0,0 +1,57 @@
+$NetBSD: patch-src_utils_diffie__hellman.cc,v 1.1 2018/06/24 16:57:58 adam Exp $
+
+Fix for OpenSSL 1.1.x.
+https://github.com/rakshasa/libtorrent/issues/171
+
+--- src/utils/diffie_hellman.cc.orig   2018-06-07 04:24:52.000000000 +0000
++++ src/utils/diffie_hellman.cc
+@@ -55,8 +55,16 @@ DiffieHellman::DiffieHellman(const unsig
+ 
+ #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))



Home | Main Index | Thread Index | Old Index