diff options
author | David Seifert <soap@gentoo.org> | 2019-12-07 13:23:13 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2019-12-07 13:23:13 +0100 |
commit | 4f02b955d2b1f4d08d7699431fc22f827bc52b54 (patch) | |
tree | 942dec565239b3515633deb445e5b427dd6d1e7c /net-vpn | |
parent | net-vpn/freelan: Remove old (diff) | |
download | gentoo-4f02b955d2b1f4d08d7699431fc22f827bc52b54.tar.gz gentoo-4f02b955d2b1f4d08d7699431fc22f827bc52b54.tar.bz2 gentoo-4f02b955d2b1f4d08d7699431fc22f827bc52b54.zip |
net-vpn/freelan: Fix building against >=boost-1.70
Closes: https://bugs.gentoo.org/688756
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r-- | net-vpn/freelan/files/freelan-2.2-boost-1.70-asio.patch | 25 | ||||
-rw-r--r-- | net-vpn/freelan/files/freelan-2.2-boost-1.70.patch | 50 | ||||
-rw-r--r-- | net-vpn/freelan/freelan-2.2.ebuild | 7 |
3 files changed, 81 insertions, 1 deletions
diff --git a/net-vpn/freelan/files/freelan-2.2-boost-1.70-asio.patch b/net-vpn/freelan/files/freelan-2.2-boost-1.70-asio.patch new file mode 100644 index 000000000000..2410ad06f6c5 --- /dev/null +++ b/net-vpn/freelan/files/freelan-2.2-boost-1.70-asio.patch @@ -0,0 +1,25 @@ +From a3e4150d6df690ea083a74f2e66894dc2af0cd9e Mon Sep 17 00:00:00 2001 +From: QuantumEntangledAndy <sheepchaan@gmail.com> +Date: Sat, 8 Jun 2019 10:10:10 +0700 +Subject: [PATCH] Fix for boost versions less than 1.66 + +--- + libs/fscp/include/fscp/server.hpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libs/fscp/include/fscp/server.hpp b/libs/fscp/include/fscp/server.hpp +index 2b18a595..1f4b30ee 100644 +--- a/libs/fscp/include/fscp/server.hpp ++++ b/libs/fscp/include/fscp/server.hpp +@@ -288,7 +288,11 @@ namespace fscp + */ + boost::asio::io_service& get_io_service() + { ++#if BOOST_ASIO_VERSION >= 101200 // Boost 1.66+ + return reinterpret_cast<boost::asio::io_context&>(get_socket().get_executor().context()); ++#else ++ return get_socket().get_io_service(); ++#endif + } + + /** diff --git a/net-vpn/freelan/files/freelan-2.2-boost-1.70.patch b/net-vpn/freelan/files/freelan-2.2-boost-1.70.patch new file mode 100644 index 000000000000..1fa2bb48d658 --- /dev/null +++ b/net-vpn/freelan/files/freelan-2.2-boost-1.70.patch @@ -0,0 +1,50 @@ +From d16490d00a47c8dcf008fa1b3219f54669716da3 Mon Sep 17 00:00:00 2001 +From: Sebastien Vincent <sebastien.vincent@cppextrem.com> +Date: Sun, 19 May 2019 17:57:07 +0200 +Subject: [PATCH] [build] Adds support for Boost >= 1.70. + +--- + libs/freelan/src/core.cpp | 2 +- + libs/fscp/include/fscp/server.hpp | 2 +- + libs/fscp/src/server.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libs/freelan/src/core.cpp b/libs/freelan/src/core.cpp +index 840a522a..969ae305 100644 +--- a/libs/freelan/src/core.cpp ++++ b/libs/freelan/src/core.cpp +@@ -777,7 +777,7 @@ namespace freelan + + boost::apply_visitor( + asiotap::endpoint_async_resolve_visitor( +- boost::make_shared<resolver_type>(boost::ref(m_io_service)), ++ boost::make_shared<resolver_type>(m_io_service), + to_protocol(m_configuration.fscp.hostname_resolution_protocol), + resolver_query::address_configured, + DEFAULT_SERVICE, +diff --git a/libs/fscp/include/fscp/server.hpp b/libs/fscp/include/fscp/server.hpp +index 3766b4a3..2b18a595 100644 +--- a/libs/fscp/include/fscp/server.hpp ++++ b/libs/fscp/include/fscp/server.hpp +@@ -288,7 +288,7 @@ namespace fscp + */ + boost::asio::io_service& get_io_service() + { +- return get_socket().get_io_service(); ++ return reinterpret_cast<boost::asio::io_context&>(get_socket().get_executor().context()); + } + + /** +diff --git a/libs/fscp/src/server.cpp b/libs/fscp/src/server.cpp +index cb717ec4..62b92dca 100644 +--- a/libs/fscp/src/server.cpp ++++ b/libs/fscp/src/server.cpp +@@ -1106,7 +1106,7 @@ namespace fscp + template <typename WaitHandler> + void server::ep_hello_context_type::async_wait_reply(boost::asio::io_service& io_service, uint32_t hello_unique_number, const boost::posix_time::time_duration& timeout, WaitHandler handler) + { +- const boost::shared_ptr<boost::asio::deadline_timer> timer = boost::make_shared<boost::asio::deadline_timer>(boost::ref(io_service), timeout); ++ const boost::shared_ptr<boost::asio::deadline_timer> timer = boost::make_shared<boost::asio::deadline_timer>(io_service, timeout); + + m_pending_requests[hello_unique_number] = pending_request_status(timer); + diff --git a/net-vpn/freelan/freelan-2.2.ebuild b/net-vpn/freelan/freelan-2.2.ebuild index d286ce106e25..5230dbc4e9a8 100644 --- a/net-vpn/freelan/freelan-2.2.ebuild +++ b/net-vpn/freelan/freelan-2.2.ebuild @@ -15,7 +15,7 @@ KEYWORDS="~amd64" IUSE="debug" DEPEND=" - <dev-libs/boost-1.70:=[threads] + dev-libs/boost:=[threads] dev-libs/openssl:0= net-misc/curl:= virtual/libiconv @@ -23,6 +23,11 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-2.2-boost-1.70.patch + "${FILESDIR}"/${PN}-2.2-boost-1.70-asio.patch +) + src_prepare() { export FREELAN_NO_GIT=1 export FREELAN_NO_GIT_VERSION=${PV} |