From 11e2082642581d78e13d5cdf920dad21002d358e Mon Sep 17 00:00:00 2001 From: sunpoet Date: Sat, 21 Nov 2015 02:10:04 +0000 Subject: - Update LICENSE - Use CONFLICTS_INSTALL instead of CONFLICTS - Use USE_CXXSTD - Cosmetic change - Pet portlint: fix diff header of patch files --- net-p2p/libtorrent/Makefile | 30 +++++++++++--------- .../files/patch-src_data_memory__chunk.cc | 32 ++++++++-------------- .../libtorrent/files/patch-src_net_socket__set.h | 4 +-- .../files/patch-src_torrent_connection__manager.h | 2 +- .../files/patch-src_torrent_poll__kqueue.cc | 4 +-- 5 files changed, 34 insertions(+), 38 deletions(-) (limited to 'net-p2p') diff --git a/net-p2p/libtorrent/Makefile b/net-p2p/libtorrent/Makefile index 7ec2cf1037a6..73bbbec69339 100644 --- a/net-p2p/libtorrent/Makefile +++ b/net-p2p/libtorrent/Makefile @@ -8,22 +8,26 @@ MASTER_SITES= http://rtorrent.net/downloads/ MAINTAINER= ports@FreeBSD.org COMMENT= BitTorrent Library written in C++ -LICENSE= GPLv2 # or later -LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE= GPLv2 GPLv3 +LICENSE_COMB= dual +LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING + +CONFLICTS_INSTALL= rblibtorrent-[0-9]* rblibtorrent-devel-[0-9]* + +OPTIONS_DEFINE= IPV6 KQUEUE +OPTIONS_DEFAULT=KQUEUE +KQUEUE_DESC= Use kqueue(2) support -USES= compiler:c++11-lang libtool pathfix pkgconfig -USE_OPENSSL= yes -USE_LDCONFIG= yes -GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-debug CONFIGURE_ENV= OPENSSL_LIBS="-L${OPENSSLBASE}/lib -ssl -crypto" OPENSSL_CFLAGS="-I${OPENSSLBASE}/include" +GNU_CONFIGURE= yes INSTALL_TARGET= install-strip +USE_LDCONFIG= yes +USE_OPENSSL= yes +USES= compiler:c++11-lang libtool pathfix pkgconfig -OPTIONS_DEFINE= KQUEUE IPV6 -OPTIONS_DEFAULT= KQUEUE -KQUEUE_DESC= Use kqueue(2) support -KQUEUE_CONFIGURE_ON= --with-kqueue -IPV6_CONFIGURE_ON= --enable-ipv6 +IPV6_CONFIGURE_ENABLE= ipv6 +KQUEUE_CONFIGURE_WITH= kqueue .include @@ -31,12 +35,12 @@ IPV6_CONFIGURE_ON= --enable-ipv6 # undefined reference to __sync_add_and_fetch_8 # undefined reference to __sync_fetch_and_and_8 .if ${ARCH} == "i386" && ${COMPILER_TYPE} == "gcc" -CONFIGURE_ARGS+= --disable-instrumentation +CONFIGURE_ARGS+=--disable-instrumentation .endif # Workaround to build on >= 10.x .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000 -CXXFLAGS+= -std=c++11 +USE_CXXSTD= c++11 EXTRA_PATCHES+= ${FILESDIR}/extra-clang .endif diff --git a/net-p2p/libtorrent/files/patch-src_data_memory__chunk.cc b/net-p2p/libtorrent/files/patch-src_data_memory__chunk.cc index 5e35bd2c6d45..b447785ddd2c 100644 --- a/net-p2p/libtorrent/files/patch-src_data_memory__chunk.cc +++ b/net-p2p/libtorrent/files/patch-src_data_memory__chunk.cc @@ -1,20 +1,12 @@ -*** src/data/memory_chunk.cc.orig Wed Feb 10 09:55:42 2010 ---- src/data/memory_chunk.cc Wed Feb 10 09:56:26 2010 -*************** -*** 78,87 **** ---- 78,90 ---- - void - MemoryChunk::unmap() { - if (!is_valid()) - throw internal_error("MemoryChunk::unmap() called on an invalid object"); - -+ if (msync(m_ptr, m_end - m_ptr,MS_INVALIDATE) != 0) -+ throw internal_error("MemoryChunk::unmap() - msync() system call failed"); -+ - if (munmap(m_ptr, m_end - m_ptr) != 0) - throw internal_error("MemoryChunk::unmap() system call failed: " + std::string(rak::error_number::current().c_str())); - } - - void - - +--- src/data/memory_chunk.cc.orig 2010-02-10 09:55:42 UTC ++++ src/data/memory_chunk.cc +@@ -86,6 +86,9 @@ + if (!is_valid()) + throw internal_error("MemoryChunk::unmap() called on an invalid object"); + ++ if (msync(m_ptr, m_end - m_ptr,MS_INVALIDATE) != 0) ++ throw internal_error("MemoryChunk::unmap() - msync() system call failed"); ++ + if (munmap(m_ptr, m_end - m_ptr) != 0) + throw internal_error("MemoryChunk::unmap() system call failed: " + std::string(rak::error_number::current().c_str())); + } diff --git a/net-p2p/libtorrent/files/patch-src_net_socket__set.h b/net-p2p/libtorrent/files/patch-src_net_socket__set.h index 417682ad42eb..257dbf235766 100644 --- a/net-p2p/libtorrent/files/patch-src_net_socket__set.h +++ b/net-p2p/libtorrent/files/patch-src_net_socket__set.h @@ -1,5 +1,5 @@ ---- src/net/socket_set.h.orig 2012-01-19 11:19:26.000000000 +0100 -+++ src/net/socket_set.h 2014-02-02 19:05:15.000000000 +0100 +--- src/net/socket_set.h.orig 2012-01-19 10:19:26 UTC ++++ src/net/socket_set.h @@ -53,12 +53,12 @@ // Propably should rename to EventSet... diff --git a/net-p2p/libtorrent/files/patch-src_torrent_connection__manager.h b/net-p2p/libtorrent/files/patch-src_torrent_connection__manager.h index d6c50ed6f46c..1f7b51e39681 100644 --- a/net-p2p/libtorrent/files/patch-src_torrent_connection__manager.h +++ b/net-p2p/libtorrent/files/patch-src_torrent_connection__manager.h @@ -1,4 +1,4 @@ ---- src/torrent/connection_manager.h +--- src/torrent/connection_manager.h.orig 2012-04-20 06:42:32 UTC +++ src/torrent/connection_manager.h @@ -42,6 +42,7 @@ diff --git a/net-p2p/libtorrent/files/patch-src_torrent_poll__kqueue.cc b/net-p2p/libtorrent/files/patch-src_torrent_poll__kqueue.cc index d0d718b680c4..213806e717b5 100644 --- a/net-p2p/libtorrent/files/patch-src_torrent_poll__kqueue.cc +++ b/net-p2p/libtorrent/files/patch-src_torrent_poll__kqueue.cc @@ -1,5 +1,5 @@ ---- src/torrent/poll_kqueue.cc.orig 2008-12-09 10:47:34.000000000 +0000 -+++ src/torrent/poll_kqueue.cc 2008-12-09 10:48:10.000000000 +0000 +--- src/torrent/poll_kqueue.cc.orig 2008-12-09 10:47:34 UTC ++++ src/torrent/poll_kqueue.cc @@ -52,6 +52,8 @@ #include #include -- cgit