Index: branches/2018Q1/net-p2p/libtorrent/Makefile =================================================================== --- branches/2018Q1/net-p2p/libtorrent/Makefile (revision 461449) +++ branches/2018Q1/net-p2p/libtorrent/Makefile (revision 461450) @@ -1,68 +1,68 @@ # $FreeBSD$ PORTNAME= libtorrent PORTVERSION= 0.13.6 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= net-p2p MASTER_SITES= http://rtorrent.net/downloads/ MAINTAINER= pipfstarrd@openmailbox.org COMMENT= BitTorrent Library written in C++ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING CONFLICTS_INSTALL= rblibtorrent-[0-9]* rblibtorrent-devel-[0-9]* USES= compiler:c++11-lang libtool pathfix pkgconfig ssl GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-debug CONFIGURE_ENV= OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto" OPENSSL_CFLAGS="-I\ ${OPENSSLINC}" INSTALL_TARGET= install-strip USE_LDCONFIG= yes OPTIONS_DEFINE= IPV6 KQUEUE OPTIONS_DEFAULT=KQUEUE KQUEUE_DESC= Use kqueue(2) support # This makes sure that /usr/local/lib appears before /usr/lib when # linking libtorrent to avoid linking with base's libcrypto. MAKE_ARGS= LDFLAGS="${LDFLAGS}" IPV6_CONFIGURE_ENABLE= ipv6 KQUEUE_CONFIGURE_WITH= kqueue .include .if ${SSL_DEFAULT:Mopenssl-devel} BROKEN= Does not build with openssl-devel .endif # Disable instrumentation, which requires 64-bit atomic ops, on i386 (when # using gcc) and powerpc to avoid linking errors: # /usr/local/lib/libtorrent.so: undefined reference to `__sync_add_and_fetch_8' # /usr/local/lib/libtorrent.so: undefined reference to `__sync_fetch_and_and_8' .if ${ARCH} == i386 && ${CHOSEN_COMPILER_TYPE} == gcc || ${ARCH} == powerpc CONFIGURE_ARGS+=--disable-instrumentation .endif # Workaround to build on >= 10.x .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000 USE_CXXSTD= c++11 EXTRA_PATCHES+= ${FILESDIR}/extra-clang .endif post-patch: .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000 @${FIND} ${WRKSRC} \( -name '*.h' -o -name '*.cc' \) -type f \ -exec ${REINPLACE_CMD} -e 's/tr1::/std::/g' {} \; \ -exec ${REINPLACE_CMD} -e 's/std::std::/std::/g' {} \; \ -exec ${REINPLACE_CMD} -e '/namespace tr1/d' {} \; \ -exec ${REINPLACE_CMD} -e '/include/s,tr1/,,' {} \; @${REINPLACE_CMD} -e 's/\.assign/.fill/' \ ${WRKSRC}/src/torrent/utils/extents.h \ ${WRKSRC}/src/torrent/utils/log.cc .endif .include Index: branches/2018Q1/net-p2p/libtorrent/distinfo =================================================================== --- branches/2018Q1/net-p2p/libtorrent/distinfo (revision 461449) +++ branches/2018Q1/net-p2p/libtorrent/distinfo (revision 461450) @@ -1,2 +1,3 @@ +TIMESTAMP = 1518295243 SHA256 (libtorrent-0.13.6.tar.gz) = 2838a08c96edfd936aff8fbf99ecbb930c2bfca3337dd1482eb5fccdb80d5a04 SIZE (libtorrent-0.13.6.tar.gz) = 781253 Index: branches/2018Q1/net-p2p/libtorrent/files/patch-fix-build-bencoders-callers-crash =================================================================== --- branches/2018Q1/net-p2p/libtorrent/files/patch-fix-build-bencoders-callers-crash (nonexistent) +++ branches/2018Q1/net-p2p/libtorrent/files/patch-fix-build-bencoders-callers-crash (revision 461450) @@ -0,0 +1,45 @@ +# https://github.com/rakshasa/libtorrent/pull/99/files + +--- src/protocol/extensions.cc.orig 2015-08-08 17:01:32.000000000 +0200 ++++ src/protocol/extensions.cc 2017-12-02 01:46:38.522736000 +0100 +@@ -394,7 +394,7 @@ + if (m_download->info()->is_meta_download() || piece >= pieceEnd) { + // reject: { "msg_type" => 2, "piece" => ... } + m_pendingType = UT_METADATA; +- m_pending = build_bencode(40, "d8:msg_typei2e5:piecei%zuee", piece); ++ m_pending = build_bencode(sizeof(size_t) + 36, "d8:msg_typei2e5:piecei%zuee", piece); + return; + } + +@@ -407,7 +407,7 @@ + // data: { "msg_type" => 1, "piece" => ..., "total_size" => ... } followed by piece data (outside of dictionary) + size_t length = piece == pieceEnd - 1 ? m_download->info()->metadata_size() % metadata_piece_size : metadata_piece_size; + m_pendingType = UT_METADATA; +- m_pending = build_bencode(length + 128, "d8:msg_typei1e5:piecei%zue10:total_sizei%zuee", piece, metadataSize); ++ m_pending = build_bencode((2 * sizeof(size_t)) + length + 120, "d8:msg_typei1e5:piecei%zue10:total_sizei%zuee", piece, metadataSize); + + memcpy(m_pending.end(), buffer + (piece << metadata_piece_shift), length); + m_pending.set(m_pending.data(), m_pending.end() + length, m_pending.owned()); +--- src/protocol/handshake.cc.orig 2015-08-08 17:01:49.000000000 +0200 ++++ src/protocol/handshake.cc 2017-12-02 01:46:38.523093000 +0100 +@@ -738,7 +738,7 @@ + break; + + if (m_readBuffer.remaining() > m_encryption.length_ia()) +- throw internal_error("Read past initial payload after incoming encrypted handshake."); ++ throw handshake_error(ConnectionManager::handshake_failed, e_handshake_invalid_value); + + if (m_encryption.crypto() != HandshakeEncryption::crypto_rc4) + m_encryption.info()->set_obfuscated(); +--- src/torrent/object_stream.cc.orig 2015-08-08 17:01:32.000000000 +0200 ++++ src/torrent/object_stream.cc 2017-12-02 01:46:38.523350000 +0100 +@@ -104,7 +104,8 @@ + while (first != last && *first >= '0' && *first <= '9') + length = length * 10 + (*first++ - '0'); + +- if (length + 1 > (unsigned int)std::distance(first, last) || *first++ != ':') ++ if (length + 1 > (unsigned int)std::distance(first, last) || *first++ != ':' ++ || length + 1 == 0) + throw torrent::bencode_error("Invalid bencode data."); + + return raw_string(first, length); Property changes on: branches/2018Q1/net-p2p/libtorrent/files/patch-fix-build-bencoders-callers-crash ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1 =================================================================== --- branches/2018Q1 (revision 461449) +++ branches/2018Q1 (revision 461450) Property changes on: branches/2018Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r461437