From owner-svn-ports-head@freebsd.org Fri Nov 2 02:09:30 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D31E10E1421; Fri, 2 Nov 2018 02:09:30 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C84DD716E6; Fri, 2 Nov 2018 02:09:29 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F2232430A; Fri, 2 Nov 2018 02:09:29 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA229TOV053318; Fri, 2 Nov 2018 02:09:29 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA229TrS053317; Fri, 2 Nov 2018 02:09:29 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201811020209.wA229TrS053317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 2 Nov 2018 02:09:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r483766 - head/net-p2p/py-libtorrent-rasterbar/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/net-p2p/py-libtorrent-rasterbar/files X-SVN-Commit-Revision: 483766 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2018 02:09:30 -0000 Author: jbeich Date: Fri Nov 2 02:09:29 2018 New Revision: 483766 URL: https://svnweb.freebsd.org/changeset/ports/483766 Log: net-p2p/py-libtorrent-rasterbar: unbreak with boost 1.69 bindings/python/src/error_code.cpp:119:10: error: no matching member function for call to 'def' .def("message", &error_category::message) ~^~~ /usr/local/include/boost/python/class.hpp:229:11: note: candidate template ignored: couldn't infer template argument 'F' self& def(char const* name, F f) ^ /usr/local/include/boost/python/class.hpp:219:11: note: candidate function template not viable: requires single argument 'visitor', but 2 arguments were provided self& def(def_visitor const& visitor) ^ /usr/local/include/boost/python/class.hpp:238:11: note: candidate function template not viable: requires 3 arguments, but 2 were provided self& def(char const* name, A1 a1, A2 const& a2) ^ /usr/local/include/boost/python/class.hpp:245:11: note: candidate function template not viable: requires 4 arguments, but 2 were provided self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2) ^ /usr/local/include/boost/python/class.hpp:261:11: note: candidate function template not viable: requires 5 arguments, but 2 were provided self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2, A3 const& a3) ^ bindings/python/src/error_code.cpp:127:10: error: no matching member function for call to 'def' .def("message", &error_code::message) ~^~~ /usr/local/include/boost/python/class.hpp:229:11: note: candidate template ignored: couldn't infer template argument 'F' self& def(char const* name, F f) ^ /usr/local/include/boost/python/class.hpp:219:11: note: candidate function template not viable: requires single argument 'visitor', but 2 arguments were provided self& def(def_visitor const& visitor) ^ /usr/local/include/boost/python/class.hpp:238:11: note: candidate function template not viable: requires 3 arguments, but 2 were provided self& def(char const* name, A1 a1, A2 const& a2) ^ /usr/local/include/boost/python/class.hpp:245:11: note: candidate function template not viable: requires 4 arguments, but 2 were provided self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2) ^ /usr/local/include/boost/python/class.hpp:261:11: note: candidate function template not viable: requires 5 arguments, but 2 were provided self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2, A3 const& a3) ^ PR: 232525 Obtained from: upstream (libtorrent 1.1.11) Added: head/net-p2p/py-libtorrent-rasterbar/files/patch-boost-1.69 (contents, props changed) Added: head/net-p2p/py-libtorrent-rasterbar/files/patch-boost-1.69 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/py-libtorrent-rasterbar/files/patch-boost-1.69 Fri Nov 2 02:09:29 2018 (r483766) @@ -0,0 +1,201 @@ +https://github.com/arvidn/libtorrent/commit/512dc80fdd69 + +--- Jamfile.orig 2018-10-05 09:19:18 UTC ++++ Jamfile +@@ -12,8 +12,8 @@ BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ; + # this is used to make bjam use the same version of python which is executing setup.py + LIBTORRENT_PYTHON_INTERPRETER = [ modules.peek : LIBTORRENT_PYTHON_INTERPRETER ] ; + +-feature visibility : default hidden : composite ; +-feature.compose hidden : -fvisibility=hidden -fvisibility-inlines-hidden ; ++feature lt-visibility : default hidden : composite ; ++feature.compose hidden : -fvisibility=hidden -fvisibility-inlines-hidden ; + + feature libtorrent-link : shared static : composite propagated ; + feature libtorrent-python-pic : off on : composite propagated link-incompatible ; +@@ -100,7 +100,7 @@ rule libtorrent_linking ( properties * ) + || clang in $(properties) + || clang-darwin in $(properties) + { +- result += hidden ; ++ result += hidden ; + + if ( gcc in $(properties) ) + { +--- src/error_code.cpp.orig 2018-10-05 09:19:18 UTC ++++ src/error_code.cpp +@@ -112,11 +112,58 @@ namespace { + }; + } + ++struct category_holder ++{ ++ category_holder(boost::system::error_category const& cat) : m_cat(&cat) {} ++ char const* name() const { return m_cat->name(); } ++ std::string message(int const v) const { return m_cat->message(v); } ++ ++ friend bool operator==(category_holder const lhs, category_holder const rhs) ++ { return *lhs.m_cat == *rhs.m_cat; } ++ ++ friend bool operator!=(category_holder const lhs, category_holder const rhs) ++ { return *lhs.m_cat != *rhs.m_cat; } ++ ++ friend bool operator<(category_holder const lhs, category_holder const rhs) ++ { return *lhs.m_cat < *rhs.m_cat; } ++ ++ boost::system::error_category const& ref() const { return *m_cat; } ++ operator boost::system::error_category const&() const { return *m_cat; } ++private: ++ boost::system::error_category const* m_cat; ++}; ++ ++void error_code_assign(boost::system::error_code& self, int const v, category_holder const cat) ++{ ++ self.assign(v, cat.ref()); ++} ++ ++category_holder error_code_category(boost::system::error_code const& self) ++{ ++ return category_holder(self.category()); ++} ++ ++#define WRAP_CAT(name) \ ++ category_holder wrap_ ##name## _category() { return category_holder(name## _category()); } ++ ++WRAP_CAT(libtorrent) ++WRAP_CAT(upnp) ++WRAP_CAT(http) ++WRAP_CAT(socks) ++WRAP_CAT(bdecode) ++#if TORRENT_USE_I2P ++WRAP_CAT(i2p) ++#endif ++WRAP_CAT(generic) ++WRAP_CAT(system) ++ ++#undef WRAP_CAT ++ + void bind_error_code() + { +- class_("error_category", no_init) +- .def("name", &error_category::name) +- .def("message", &error_category::message) ++ class_("error_category", no_init) ++ .def("name", &category_holder::name) ++ .def("message", &category_holder::message) + .def(self == self) + .def(self < self) + .def(self != self) +@@ -124,39 +171,37 @@ void bind_error_code() + + class_("error_code") + .def(init<>()) +- .def("message", &error_code::message) ++ .def(init()) ++ .def("message", static_cast(&error_code::message)) + .def("value", &error_code::value) + .def("clear", &error_code::clear) +- .def("category", &error_code::category +- , return_internal_reference<>()) +- .def("assign", &error_code::assign) ++ .def("category", &error_code_category) ++ .def("assign", &error_code_assign) + .def_pickle(ec_pickle_suite()) + ; + +-typedef return_value_policy return_existing; +- +- def("libtorrent_category", &libtorrent_category, return_existing()); +- def("upnp_category", &upnp_category, return_existing()); +- def("http_category", &http_category, return_existing()); +- def("socks_category", &socks_category, return_existing()); +- def("bdecode_category", &bdecode_category, return_existing()); ++ def("libtorrent_category", &wrap_libtorrent_category); ++ def("upnp_category", &wrap_upnp_category); ++ def("http_category", &wrap_http_category); ++ def("socks_category", &wrap_socks_category); ++ def("bdecode_category", &wrap_bdecode_category); + #if TORRENT_USE_I2P +- def("i2p_category", &i2p_category, return_existing()); ++ def("i2p_category", &wrap_i2p_category); + #endif + + #ifndef TORRENT_NO_DEPRECATE +- def("get_libtorrent_category", &libtorrent_category, return_existing()); +- def("get_upnp_category", &upnp_category, return_existing()); +- def("get_http_category", &http_category, return_existing()); +- def("get_socks_category", &socks_category, return_existing()); +- def("get_bdecode_category", &bdecode_category, return_existing()); ++ def("get_libtorrent_category", &wrap_libtorrent_category); ++ def("get_upnp_category", &wrap_upnp_category); ++ def("get_http_category", &wrap_http_category); ++ def("get_socks_category", &wrap_socks_category); ++ def("get_bdecode_category", &wrap_bdecode_category); + #if TORRENT_USE_I2P +- def("get_i2p_category", &i2p_category, return_existing()); ++ def("get_i2p_category", &wrap_i2p_category); + #endif + #endif // TORRENT_NO_DEPRECATE + +- def("generic_category", &boost::system::generic_category, return_existing()); ++ def("generic_category", &wrap_generic_category); + +- def("system_category", &boost::system::system_category, return_existing()); ++ def("system_category", &wrap_system_category); + } + +--- ../../src/bdecode.cpp.orig 2018-10-05 09:19:18 UTC ++++ ../../src/bdecode.cpp +@@ -172,7 +172,7 @@ namespace libtorrent + + const char* bdecode_error_category::name() const BOOST_SYSTEM_NOEXCEPT + { +- return "bdecode error"; ++ return "bdecode"; + } + + std::string bdecode_error_category::message(int ev) const BOOST_SYSTEM_NOEXCEPT +--- ../../src/error_code.cpp.orig 2018-10-05 09:19:18 UTC ++++ ../../src/error_code.cpp +@@ -290,7 +290,7 @@ namespace libtorrent + struct TORRENT_EXPORT http_error_category : boost::system::error_category + { + virtual const char* name() const BOOST_SYSTEM_NOEXCEPT +- { return "http error"; } ++ { return "http"; } + virtual std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT + { + std::string ret; +--- ../../src/socks5_stream.cpp.orig 2018-10-05 09:19:18 UTC ++++ ../../src/socks5_stream.cpp +@@ -48,7 +48,7 @@ namespace libtorrent + struct socks_error_category : boost::system::error_category + { + virtual const char* name() const BOOST_SYSTEM_NOEXCEPT +- { return "socks error"; } ++ { return "socks"; } + virtual std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT + { + static char const* messages[] = +--- ../../src/upnp.cpp.orig 2018-10-05 09:19:18 UTC ++++ ../../src/upnp.cpp +@@ -1159,7 +1159,7 @@ struct upnp_error_category : boost::system::error_cate + { + virtual const char* name() const BOOST_SYSTEM_NOEXCEPT + { +- return "UPnP error"; ++ return "upnp"; + } + + virtual std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT +--- ../../test/test_bdecode.cpp.orig 2018-10-05 09:19:18 UTC ++++ ../../test/test_bdecode.cpp +@@ -338,7 +338,7 @@ TORRENT_TEST(bdecode_error) + { + error_code ec(bdecode_errors::overflow); + TEST_EQUAL(ec.message(), "integer overflow"); +- TEST_EQUAL(ec.category().name(), std::string("bdecode error")); ++ TEST_EQUAL(ec.category().name(), std::string("bdecode")); + ec.assign(5434, get_bdecode_category()); + TEST_EQUAL(ec.message(), "Unknown error"); + }