From: Jakub Bogusz Date: Mon, 29 Apr 2019 18:33:24 +0000 (+0200) Subject: - updated to 1.2.0 X-Git-Tag: auto/th/libtorrent-rasterbar-1.2.7-1^2~1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=3eab5e87d3c9b4c71778077a3f5e84bde16b222f;p=packages%2Flibtorrent-rasterbar.git - updated to 1.2.0 - updated boost patch --- diff --git a/libtorrent-rasterbar-boost.patch b/libtorrent-rasterbar-boost.patch index 25bf348..765d086 100644 --- a/libtorrent-rasterbar-boost.patch +++ b/libtorrent-rasterbar-boost.patch @@ -16,24 +16,23 @@ } #endif ---- libtorrent-rasterbar-1.1.11/include/libtorrent/io_service.hpp.orig 2019-04-28 16:35:33.779211874 +0200 -+++ libtorrent-rasterbar-1.1.11/include/libtorrent/io_service.hpp 2019-04-28 16:35:38.492519673 +0200 -@@ -58,14 +58,7 @@ - #undef Protocol - #endif - --namespace libtorrent --{ +--- libtorrent-rasterbar-1.2.0/include/libtorrent/io_service.hpp.orig 2019-04-28 21:20:37.963217224 +0200 ++++ libtorrent-rasterbar-1.2.0/include/libtorrent/io_service.hpp 2019-04-28 22:13:25.612723260 +0200 +@@ -41,13 +41,6 @@ + #include "libtorrent/aux_/disable_warnings_pop.hpp" + #endif // SIMULATOR + +-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 -} +#include "libtorrent/io_service_fwd.hpp" #endif - --- libtorrent-rasterbar-1.0.11/include/libtorrent/tracker_manager.hpp.orig 2017-02-04 19:16:33.000000000 +0100 +++ libtorrent-rasterbar-1.0.11/include/libtorrent/tracker_manager.hpp 2019-04-27 18:54:42.557868860 +0200 @@ -191,7 +191,7 @@ @@ -56,127 +55,175 @@ } lowest_layer_type& lowest_layer() ---- libtorrent-rasterbar-1.1.11/include/libtorrent/udp_socket.hpp.orig 2019-04-28 17:14:01.486709949 +0200 -+++ libtorrent-rasterbar-1.1.11/include/libtorrent/udp_socket.hpp 2019-04-28 17:34:30.006721152 +0200 -@@ -80,7 +80,7 @@ - }; +--- libtorrent-rasterbar-1.2.0/include/libtorrent/udp_socket.hpp.orig 2019-04-28 22:13:51.845914476 +0200 ++++ libtorrent-rasterbar-1.2.0/include/libtorrent/udp_socket.hpp 2019-04-28 22:15:48.195284157 +0200 +@@ -61,7 +61,7 @@ + static constexpr udp_send_flags_t dont_fragment = 3_bit; 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 libtorrent::get_io_service(m_ipv4_sock); } +- io_service& get_io_service() { return m_socket.get_io_service(); } ++ io_service& get_io_service() { return libtorrent::get_io_service(m_socket); } - void subscribe(udp_socket_observer* o); - void unsubscribe(udp_socket_observer* o); ---- libtorrent-rasterbar-1.1.11/src/http_connection.cpp.orig 2019-04-28 17:34:49.723281005 +0200 -+++ libtorrent-rasterbar-1.1.11/src/http_connection.cpp 2019-04-28 19:21:25.738630816 +0200 -@@ -150,7 +150,7 @@ + template + void async_read(Handler&& h) +--- libtorrent-rasterbar-1.2.0/src/http_connection.cpp.orig 2019-04-28 22:16:06.475185127 +0200 ++++ libtorrent-rasterbar-1.2.0/src/http_connection.cpp 2019-04-29 05:45:33.065761241 +0200 +@@ -148,7 +148,7 @@ if (ec) { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); +- m_timer.get_io_service().post(std::bind(&http_connection::callback ++ libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback + , me, ec, span{})); return; } -@@ -162,7 +162,7 @@ +@@ -160,7 +160,7 @@ ) { error_code err(errors::unsupported_url_protocol); -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, err, static_cast(NULL), 0)); +- m_timer.get_io_service().post(std::bind(&http_connection::callback ++ libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback + , me, err, span{})); return; } -@@ -263,7 +263,7 @@ +@@ -258,7 +258,7 @@ if (ec) { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); +- m_timer.get_io_service().post(std::bind(&http_connection::callback ++ libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback + , me, ec, span{})); return; } -@@ -303,7 +303,7 @@ - +@@ -297,7 +297,7 @@ + #if TORRENT_USE_I2P if (i2p_conn->proxy().type != settings_pack::i2p_proxy) { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, error_code(errors::no_i2p_router), static_cast(NULL), 0)); +- m_timer.get_io_service().post(std::bind(&http_connection::callback ++ libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback + , me, error_code(errors::no_i2p_router), span{})); return; } -@@ -337,7 +337,7 @@ +@@ -332,7 +332,7 @@ m_ssl_ctx->set_verify_mode(ssl::context::verify_none, ec); if (ec) { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); +- m_timer.get_io_service().post(std::bind(&http_connection::callback ++ libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback + , me, ec, span{})); return; } -@@ -349,7 +349,7 @@ +@@ -344,7 +344,7 @@ // assume this is not a tracker connection. Tracker connections that - // shouldn't be subject to the proxy should pass in NULL as the proxy + // shouldn't be subject to the proxy should pass in nullptr as the proxy // pointer. - instantiate_connection(m_timer.get_io_service() + instantiate_connection(libtorrent::get_io_service(m_timer) - , proxy ? *proxy : null_proxy, m_sock, userdata, NULL, false, false); + , proxy ? *proxy : null_proxy, m_sock, userdata, nullptr, false, false); if (m_bind_addr) -@@ -358,7 +358,7 @@ +@@ -353,7 +353,7 @@ m_sock.bind(tcp::endpoint(*m_bind_addr, 0), ec); if (ec) { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); +- m_timer.get_io_service().post(std::bind(&http_connection::callback ++ libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback + , me, ec, span{})); return; } -@@ -367,7 +367,7 @@ +@@ -362,7 +362,7 @@ setup_ssl_hostname(m_sock, hostname, ec); if (ec) { -- m_timer.get_io_service().post(boost::bind(&http_connection::callback -+ libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback - , me, ec, static_cast(NULL), 0)); +- m_timer.get_io_service().post(std::bind(&http_connection::callback ++ libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback + , me, ec, span{})); return; } ---- libtorrent-rasterbar-1.0.11/src/natpmp.cpp.orig 2017-02-04 19:16:33.000000000 +0100 -+++ libtorrent-rasterbar-1.0.11/src/natpmp.cpp 2019-04-27 20:27:53.220415927 +0200 -@@ -88,7 +88,7 @@ - mutex::scoped_lock l(m_mutex); +--- libtorrent-rasterbar-1.2.0/src/natpmp.cpp.orig 2019-04-29 05:46:02.395602348 +0200 ++++ libtorrent-rasterbar-1.2.0/src/natpmp.cpp 2019-04-29 05:47:21.881838401 +0200 +@@ -160,13 +160,13 @@ + // try to find one even if the listen socket isn't bound to a device + if (device.empty()) + { +- device = device_for_address(local_address, m_socket.get_io_service(), ec); ++ device = device_for_address(local_address, libtorrent::get_io_service(m_socket), ec); + // if this fails fall back to using the first default gateway in the + // routing table + ec.clear(); + } - error_code ec; -- address gateway = get_default_gateway(m_socket.get_io_service(), ec); -+ address gateway = get_default_gateway(libtorrent::get_io_service(m_socket), ec); - if (ec) +- auto const route = get_default_route(m_socket.get_io_service() ++ auto const route = get_default_route(libtorrent::get_io_service(m_socket) + , device, local_address.is_v6(), ec); + + if (!route) +@@ -194,7 +194,7 @@ + if (local_address.is_unspecified()) { - char msg[200]; ---- libtorrent-rasterbar-1.1.11/src/lsd.cpp.orig 2018-11-18 13:55:50.000000000 +0100 -+++ libtorrent-rasterbar-1.1.11/src/lsd.cpp 2019-04-28 19:35:37.014019062 +0200 -@@ -112,12 +112,12 @@ + std::vector const net = enum_net_interfaces( +- m_socket.get_io_service(), ec); ++ libtorrent::get_io_service(m_socket), ec); + + auto const it = std::find_if(net.begin(), net.end(), [&](ip_interface const& i) + { +--- libtorrent-rasterbar-1.2.0/src/lsd.cpp.orig 2019-04-29 05:46:02.395602348 +0200 ++++ libtorrent-rasterbar-1.2.0/src/lsd.cpp 2019-04-29 05:48:04.508274140 +0200 +@@ -100,11 +100,11 @@ void lsd::start(error_code& ec) { - m_socket.open(boost::bind(&lsd::on_announce, self(), _1, _2, _3) + m_socket.open(std::bind(&lsd::on_announce, self(), _1, _2) - , m_broadcast_timer.get_io_service(), ec); + , libtorrent::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_socket6.open(std::bind(&lsd::on_announce, self(), _1, _2) - , m_broadcast_timer.get_io_service(), ec); + , libtorrent::get_io_service(m_broadcast_timer), ec); - #endif } ---- libtorrent-rasterbar-1.1.11/src/upnp.cpp.orig 2018-11-18 13:55:54.000000000 +0100 -+++ libtorrent-rasterbar-1.1.11/src/upnp.cpp 2019-04-28 20:23:06.875246705 +0200 -@@ -135,7 +135,7 @@ - { + lsd::~lsd() = default; +--- libtorrent-rasterbar-1.2.0/src/upnp.cpp.orig 2019-04-29 05:46:02.395602348 +0200 ++++ libtorrent-rasterbar-1.2.0/src/upnp.cpp 2019-04-29 05:48:43.981393629 +0200 +@@ -121,7 +121,7 @@ + error_code ec; - m_socket.open(boost::bind(&upnp::on_reply, self(), _1, _2, _3) + m_socket.open(std::bind(&upnp::on_reply, self(), _1, _2) - , m_refresh_timer.get_io_service(), ec); + , libtorrent::get_io_service(m_refresh_timer), ec); m_mappings.reserve(10); } +--- libtorrent-rasterbar-1.2.0/src/disk_io_thread_pool.cpp.orig 2019-01-12 16:01:06.000000000 +0100 ++++ libtorrent-rasterbar-1.2.0/src/disk_io_thread_pool.cpp 2019-04-29 17:25:13.851665143 +0200 +@@ -174,7 +174,7 @@ + // buffer pool won't exist anymore, and crash. This prevents that. + m_threads.emplace_back(&pool_thread_interface::thread_fun + , &m_thread_iface, std::ref(*this) +- , io_service::work(m_idle_timer.get_io_service())); ++ , io_service::work(libtorrent::get_io_service(m_idle_timer))); + } + } + +--- libtorrent-rasterbar-1.2.0/src/udp_socket.cpp.orig 2019-01-12 16:01:06.000000000 +0100 ++++ libtorrent-rasterbar-1.2.0/src/udp_socket.cpp 2019-04-29 18:22:44.892969248 +0200 +@@ -492,7 +492,7 @@ + { + // connect to socks5 server and open up the UDP tunnel + +- m_socks5_connection = std::make_shared(m_socket.get_io_service()); ++ m_socks5_connection = std::make_shared(libtorrent::get_io_service(m_socket)); + m_socks5_connection->start(ps); + } + } +--- libtorrent-rasterbar-1.2.0/src/kademlia/dht_tracker.cpp.orig 2019-01-12 16:01:06.000000000 +0100 ++++ libtorrent-rasterbar-1.2.0/src/kademlia/dht_tracker.cpp 2019-04-29 19:30:02.651094835 +0200 +@@ -130,7 +130,7 @@ + // must use piecewise construction because tracker_node::connection_timer + // is neither copyable nor movable + auto n = m_nodes.emplace(std::piecewise_construct_t(), std::forward_as_tuple(s) +- , std::forward_as_tuple(m_key_refresh_timer.get_io_service() ++ , std::forward_as_tuple(libtorrent::get_io_service(m_key_refresh_timer) + , s, this, m_settings, nid, m_log, m_counters + , std::bind(&dht_tracker::get_node, this, _1, _2) + , m_storage)); diff --git a/libtorrent-rasterbar.spec b/libtorrent-rasterbar.spec index cadb0a9..01d6936 100644 --- a/libtorrent-rasterbar.spec +++ b/libtorrent-rasterbar.spec @@ -5,13 +5,13 @@ Summary: A C++ BitTorrent library Summary(hu.UTF-8): C++ BitTorrent könyvtár Summary(pl.UTF-8): Biblioteka BitTorrenta napisana w C++ Name: libtorrent-rasterbar -Version: 1.1.11 +Version: 1.2.0 Release: 1 Epoch: 2 License: BSD Group: Libraries Source0: https://github.com/arvidn/libtorrent/releases/download/libtorrent_%{tagver}/%{name}-%{version}.tar.gz -# Source0-md5: 80e76c6fe6a57cf262afe09583c4dda2 +# Source0-md5: 4bd50b9b773f2f206c90a77bd911fae5 Patch0: %{name}-boost.patch URL: http://www.rasterbar.com/products/libtorrent/ BuildRequires: GeoIP-devel @@ -170,7 +170,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc AUTHORS ChangeLog COPYING %attr(755,root,root) %{_libdir}/libtorrent-rasterbar.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libtorrent-rasterbar.so.9 +%attr(755,root,root) %ghost %{_libdir}/libtorrent-rasterbar.so.10 %files devel %defattr(644,root,root,755)