Index: net-p2p/libtorrent-rasterbar/Makefile =================================================================== --- net-p2p/libtorrent-rasterbar/Makefile +++ net-p2p/libtorrent-rasterbar/Makefile @@ -2,10 +2,9 @@ # $FreeBSD$ PORTNAME= libtorrent-rasterbar -DISTVERSION= 1.1.10 -PORTREVISION= 5 +DISTVERSION= 1_1_13 +DISTVERSIONPREFIX= libtorrent- CATEGORIES= net-p2p ipv6 -MASTER_SITES= https://github.com/arvidn/libtorrent/releases/download/libtorrent-${PORTVERSION:S/./_/g}/ MAINTAINER= yuri@FreeBSD.org COMMENT= C++ library implementing a BitTorrent client @@ -17,8 +16,14 @@ libboost_random.so:devel/boost-libs \ libboost_system.so:devel/boost-libs -USES= cmake compiler:c++14-lang iconv:wchar_t libtool pathfix pkgconfig ssl +USES= cmake compiler:c++14-lang iconv:wchar_t libtool pathfix pkgconfig python:2.7,test shebangfix ssl +LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB} +SHEBANG_FILES= test/socks.py test/web_server.py +USE_GITHUB= yes +GH_ACCOUNT= arvidn +GH_PROJECT= libtorrent USE_LDCONFIG= yes +TEST_TARGET= test SHLIB_VER= 9 PLIST_SUB+= SHLIB_VER="${SHLIB_VER}" @@ -27,18 +32,21 @@ PORTDOCS= ${DOCFILES} docs/* PORTEXAMPLES= *.cpp -OPTIONS_DEFINE= DEBUG DOCS EXAMPLES LOGGING +OPTIONS_DEFINE= DOCS EXAMPLES LOGGING TEST OPTIONS_DEFAULT=LOGGING OPTIONS_SUB= yes -LOGGING_DESC= Enable disk stat logging and logging to disk +LOGGING_DESC= Enable logging to disk -DEBUG_CONFIGURE_ENABLE= debug -EXAMPLES_CONFIGURE_ENABLE= examples -LOGGING_CONFIGURE_ENABLE= logging disk-stats +EXAMPLES_CMAKE_BOOL= build_examples +LOGGING_CMAKE_BOOL= logging +TEST_USES= python +TEST_CMAKE_BOOL= build_tests post-patch: @${REINPLACE_CMD} -e 's|/usr/local/include|${PREFIX}/include|' \ ${WRKSRC}/Jamfile + @${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' \ + ${WRKSRC}/test/setup_transfer.cpp post-install: @${RM} ${STAGEDIR}${PREFIX}/include/libtorrent/tommath.h.orig ${STAGEDIR}${PREFIX}/include/libtorrent/Makefile* @@ -54,10 +62,4 @@ ${INSTALL_DATA} ${WRKSRC}/examples/${PORTEXAMPLES} \ ${STAGEDIR}${EXAMPLESDIR} -do-test: # broken: https://github.com/arvidn/libtorrent/issues/3327 - @cd ${BUILD_WRKSRC} && \ - ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -Dbuild_tests=ON ${CMAKE_SOURCE_PATH} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test - .include Index: net-p2p/libtorrent-rasterbar/distinfo =================================================================== --- net-p2p/libtorrent-rasterbar/distinfo +++ net-p2p/libtorrent-rasterbar/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1538843172 -SHA256 (libtorrent-rasterbar-1.1.10.tar.gz) = 07b2b391e0d16bc693d793e352338488a0e41f3130b70884bb2e0270ea00b8c2 -SIZE (libtorrent-rasterbar-1.1.10.tar.gz) = 3902542 +TIMESTAMP = 1569866016 +SHA256 (arvidn-libtorrent-libtorrent-1_1_13_GH0.tar.gz) = b88d043a4f56eb5b48ae219783029d7f6cff24401161d2f054aef96286ce912b +SIZE (arvidn-libtorrent-libtorrent-1_1_13_GH0.tar.gz) = 2920826 Index: net-p2p/libtorrent-rasterbar/files/patch-CMakeLists.txt =================================================================== --- net-p2p/libtorrent-rasterbar/files/patch-CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ ---- CMakeLists.txt.orig 2018-10-06 18:06:13 UTC -+++ CMakeLists.txt -@@ -1,6 +1,6 @@ - cmake_minimum_required(VERSION 3.8) - project(libtorrent) --set (SOVERSION "8") -+set (SOVERSION "9") # https://github.com/arvidn/libtorrent/issues/3326 - set (VERSION "1.1.10") - - set(sources Index: net-p2p/libtorrent-rasterbar/files/patch-boost-1.69 =================================================================== --- net-p2p/libtorrent-rasterbar/files/patch-boost-1.69 +++ /dev/null @@ -1,53 +0,0 @@ -https://github.com/arvidn/libtorrent/commit/a5da48edd4be - ---- include/libtorrent/disk_io_job.hpp.orig 2018-10-05 09:19:18 UTC -+++ include/libtorrent/disk_io_job.hpp -@@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE. - #include - #include - #include --#include -+#include - - #include "libtorrent/aux_/disable_warnings_pop.hpp" - ---- include/libtorrent/kademlia/observer.hpp.orig 2018-10-05 09:19:18 UTC -+++ include/libtorrent/kademlia/observer.hpp -@@ -42,6 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. - #include - #include - #include -+#include - - #include "libtorrent/aux_/disable_warnings_pop.hpp" - ---- include/libtorrent/proxy_base.hpp.orig 2018-10-05 09:19:18 UTC -+++ include/libtorrent/proxy_base.hpp -@@ -42,6 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. - #include "libtorrent/aux_/disable_warnings_push.hpp" - #include - #include -+#include - #include "libtorrent/aux_/disable_warnings_pop.hpp" - - namespace libtorrent { ---- include/libtorrent/tracker_manager.hpp.orig 2018-10-05 09:19:21 UTC -+++ include/libtorrent/tracker_manager.hpp -@@ -50,6 +50,7 @@ POSSIBILITY OF SUCH DAMAGE. - #include - #include - #include -+#include - - #ifdef TORRENT_USE_OPENSSL - // there is no forward declaration header for asio ---- src/kademlia/dht_storage.cpp.orig 2018-10-05 09:19:18 UTC -+++ src/kademlia/dht_storage.cpp -@@ -38,6 +38,7 @@ POSSIBILITY OF SUCH DAMAGE. - #include - #include - #include -+#include - - #include "libtorrent/aux_/disable_warnings_pop.hpp" - Index: net-p2p/libtorrent-rasterbar/files/patch-boost-1.70 =================================================================== --- net-p2p/libtorrent-rasterbar/files/patch-boost-1.70 +++ /dev/null @@ -1,193 +0,0 @@ -https://github.com/arvidn/libtorrent/commit/76c2794923c4 - ---- include/libtorrent/io_service.hpp.orig 2018-10-05 09:19:18 UTC -+++ include/libtorrent/io_service.hpp -@@ -53,6 +53,7 @@ POSSIBILITY OF SUCH DAMAGE. - #endif - - #include "libtorrent/aux_/disable_warnings_pop.hpp" -+#include "libtorrent/io_service_fwd.hpp" - - #ifdef __OBJC__ - #undef Protocol ---- include/libtorrent/io_service_fwd.hpp.orig 2018-10-05 09:19:18 UTC -+++ include/libtorrent/io_service_fwd.hpp -@@ -65,10 +65,19 @@ namespace boost { namespace asio { - namespace libtorrent - { - #if defined TORRENT_BUILD_SIMULATOR -- typedef sim::asio::io_service io_service; -+ using io_service = sim::asio::io_service; - #else -- typedef boost::asio::io_service io_service; -+ using io_service = boost::asio::io_service; - #endif -+ -+#if BOOST_VERSION >= 107000 -+template -+io_service& get_io_service(T& o) { return static_cast(o.get_executor().context()); } -+#else -+template -+io_service& get_io_service(T& o) { return o.get_io_service(); } -+#endif -+ - } - - #endif ---- include/libtorrent/proxy_base.hpp.orig 2018-10-05 09:19:18 UTC -+++ include/libtorrent/proxy_base.hpp -@@ -249,7 +249,7 @@ class proxy_base : boost::noncopyable (public) - - io_service& get_io_service() - { -- return m_sock.get_io_service(); -+ return lt::get_io_service(m_sock); - } - - lowest_layer_type& lowest_layer() ---- include/libtorrent/tracker_manager.hpp.orig 2018-10-05 09:19:21 UTC -+++ include/libtorrent/tracker_manager.hpp -@@ -283,7 +283,7 @@ namespace libtorrent - virtual void on_timeout(error_code const& ec) = 0; - virtual ~timeout_handler() {} - -- io_service& get_io_service() { return m_timeout.get_io_service(); } -+ io_service& get_io_service() { return lt::get_io_service(m_timeout); } - - private: - ---- include/libtorrent/udp_socket.hpp.orig 2018-10-05 09:19:18 UTC -+++ include/libtorrent/udp_socket.hpp -@@ -80,7 +80,7 @@ namespace libtorrent - }; - - bool is_open() const { return m_abort == false; } -- io_service& get_io_service() { return m_ipv4_sock.get_io_service(); } -+ io_service& get_io_service() { return lt::get_io_service(m_ipv4_sock); } - - void subscribe(udp_socket_observer* o); - void unsubscribe(udp_socket_observer* o); ---- src/http_connection.cpp.orig 2018-10-05 09:19:18 UTC -+++ src/http_connection.cpp -@@ -150,7 +150,7 @@ void http_connection::get(std::string const& url, time - - if (ec) - { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ lt::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); - return; - } -@@ -162,7 +162,7 @@ void http_connection::get(std::string const& url, time - ) - { - error_code err(errors::unsupported_url_protocol); -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ lt::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, err, static_cast(NULL), 0)); - return; - } -@@ -263,7 +263,7 @@ void http_connection::start(std::string const& hostnam - - if (ec) - { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ lt::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); - return; - } -@@ -303,7 +303,7 @@ void http_connection::start(std::string const& hostnam - - if (i2p_conn->proxy().type != settings_pack::i2p_proxy) - { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ lt::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, error_code(errors::no_i2p_router), static_cast(NULL), 0)); - return; - } -@@ -337,7 +337,7 @@ void http_connection::start(std::string const& hostnam - m_ssl_ctx->set_verify_mode(ssl::context::verify_none, ec); - if (ec) - { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ lt::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); - return; - } -@@ -349,7 +349,7 @@ void http_connection::start(std::string const& hostnam - // assume this is not a tracker connection. Tracker connections that - // shouldn't be subject to the proxy should pass in NULL as the proxy - // pointer. -- instantiate_connection(m_timer.get_io_service() -+ instantiate_connection(lt::get_io_service(m_timer) - , proxy ? *proxy : null_proxy, m_sock, userdata, NULL, false, false); - - if (m_bind_addr) -@@ -358,7 +358,7 @@ void http_connection::start(std::string const& hostnam - m_sock.bind(tcp::endpoint(*m_bind_addr, 0), ec); - if (ec) - { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ lt::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); - return; - } -@@ -367,7 +367,7 @@ void http_connection::start(std::string const& hostnam - setup_ssl_hostname(m_sock, hostname, ec); - if (ec) - { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ lt::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); - return; - } ---- src/lsd.cpp.orig 2018-10-05 09:19:18 UTC -+++ src/lsd.cpp -@@ -112,12 +112,12 @@ void lsd::debug_log(char const* fmt, ...) const - void lsd::start(error_code& ec) - { - m_socket.open(boost::bind(&lsd::on_announce, self(), _1, _2, _3) -- , m_broadcast_timer.get_io_service(), ec); -+ , lt::get_io_service(m_broadcast_timer), ec); - if (ec) return; - - #if TORRENT_USE_IPV6 - m_socket6.open(boost::bind(&lsd::on_announce, self(), _1, _2, _3) -- , m_broadcast_timer.get_io_service(), ec); -+ , lt::get_io_service(m_broadcast_timer), ec); - #endif - } - ---- src/natpmp.cpp.orig 2018-10-05 09:19:18 UTC -+++ src/natpmp.cpp -@@ -89,7 +89,7 @@ void natpmp::start() - mutex::scoped_lock l(m_mutex); - - error_code ec; -- address gateway = get_default_gateway(m_socket.get_io_service(), ec); -+ address gateway = get_default_gateway(lt::get_io_service(m_socket), ec); - if (ec) - { - char msg[200]; ---- src/upnp.cpp.orig 2018-10-05 09:19:18 UTC -+++ src/upnp.cpp -@@ -135,7 +135,7 @@ void upnp::start() - { - error_code ec; - m_socket.open(boost::bind(&upnp::on_reply, self(), _1, _2, _3) -- , m_refresh_timer.get_io_service(), ec); -+ , lt::get_io_service(m_refresh_timer), ec); - - m_mappings.reserve(10); - } ---- test/test_fast_extension.cpp.orig 2018-10-05 09:19:21 UTC -+++ test/test_fast_extension.cpp -@@ -453,7 +453,7 @@ boost::shared_ptr setup_peer(tcp::socket - } - else - { -- tcp::acceptor l(s.get_io_service()); -+ tcp::acceptor l(lt::get_io_service(s)); - l.open(tcp::v4()); - l.bind(tcp::endpoint(address_v4::from_string("127.0.0.1") - , 3000 + rand() % 60000)); Index: net-p2p/libtorrent-rasterbar/pkg-plist =================================================================== --- net-p2p/libtorrent-rasterbar/pkg-plist +++ net-p2p/libtorrent-rasterbar/pkg-plist @@ -5,7 +5,6 @@ include/libtorrent/alert_manager.hpp include/libtorrent/alert_types.hpp include/libtorrent/alloca.hpp -include/libtorrent/allocator.hpp include/libtorrent/announce_entry.hpp include/libtorrent/assert.hpp include/libtorrent/aux_/alert_manager_variadic_emplace.hpp @@ -195,6 +194,12 @@ include/libtorrent/web_connection_base.hpp include/libtorrent/web_peer_connection.hpp include/libtorrent/xml_parse.hpp +lib/cmake/LibtorrentRasterbar/LibtorrentRasterbarConfig.cmake +lib/cmake/LibtorrentRasterbar/LibtorrentRasterbarConfigVersion.cmake +lib/cmake/LibtorrentRasterbar/LibtorrentRasterbarTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/LibtorrentRasterbar/LibtorrentRasterbarTargets.cmake lib/libtorrent-rasterbar.so +lib/libtorrent-rasterbar.so.1.1.13 lib/libtorrent-rasterbar.so.%%SHLIB_VER%% libdata/pkgconfig/libtorrent-rasterbar.pc +share/cmake/Modules/FindLibtorrentRasterbar.cmake