mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 22:27:17 -08:00
dev-cpp/websocketpp: fix build with boost 1.87 (#946365)
Also add a patch that fixes C++20 errors from #939739 and bump to EAPI=8. Closes: https://bugs.gentoo.org/946365 Closes: https://bugs.gentoo.org/946516 Bug: https://bugs.gentoo.org/939739 Signed-off-by: Louis Sautier <sbraz@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST websocketpp-0.8.2-boost-1.87-compat.patch.xz 17316 BLAKE2B 11f43ba92b9e8c10c7833fa2a423cfc0ca6d66721db388c6f08003a1141669bed0aec790a41964ddd9399eb18c627e01054b7c0247cbedfca7111869e4909ddf SHA512 21ee3e279722c3761328475b437ce57e38455df83ef9e291802520047164c7cb879430b541623212e320d1a55b10d17b77fe97b73d1846069a240032b7b82db7
|
||||
DIST websocketpp-0.8.2.tar.gz 701364 BLAKE2B dacee33832f493d465afe208f9edea1393414a22c8db8f8c86b8f913521d0d8d68b95673a2e82b7479acfbab1ac541eda2d713a55d5de387b3879461d5884df7 SHA512 b2afc63edb69ce81a3a6c06b3d857b3e8820f0e22300ac32bb20ab30ff07bd58bd5ada3e526ed8ab52de934e0e3a26cad2118b0e68ecf3e5e9e8d7101348fd06
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
From 3197a520eb4c1e4754860441918a5930160373eb Mon Sep 17 00:00:00 2001
|
||||
From: Peter Thorson <git@zaphoyd.com>
|
||||
Date: Tue, 29 Jun 2021 09:13:12 -0500
|
||||
Subject: [PATCH] [core] Remove the use of simple template ids as they have
|
||||
been removed in c++20.
|
||||
https://timsong-cpp.github.io/cppwp/n4861/diff.cpp17.class#2 references #991
|
||||
|
||||
--- a/websocketpp/endpoint.hpp
|
||||
+++ b/websocketpp/endpoint.hpp
|
||||
@@ -111,7 +111,7 @@ class endpoint : public config::transport_type, public config::endpoint_base {
|
||||
|
||||
|
||||
/// Destructor
|
||||
- ~endpoint<connection,config>() {}
|
||||
+ ~endpoint() {}
|
||||
|
||||
#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
|
||||
// no copy constructor because endpoints are not copyable
|
||||
--- a/websocketpp/logger/basic.hpp
|
||||
+++ b/websocketpp/logger/basic.hpp
|
||||
@@ -58,33 +58,33 @@ namespace log {
|
||||
template <typename concurrency, typename names>
|
||||
class basic {
|
||||
public:
|
||||
- basic<concurrency,names>(channel_type_hint::value h =
|
||||
+ basic(channel_type_hint::value h =
|
||||
channel_type_hint::access)
|
||||
: m_static_channels(0xffffffff)
|
||||
, m_dynamic_channels(0)
|
||||
, m_out(h == channel_type_hint::error ? &std::cerr : &std::cout) {}
|
||||
|
||||
- basic<concurrency,names>(std::ostream * out)
|
||||
+ basic(std::ostream * out)
|
||||
: m_static_channels(0xffffffff)
|
||||
, m_dynamic_channels(0)
|
||||
, m_out(out) {}
|
||||
|
||||
- basic<concurrency,names>(level c, channel_type_hint::value h =
|
||||
+ basic(level c, channel_type_hint::value h =
|
||||
channel_type_hint::access)
|
||||
: m_static_channels(c)
|
||||
, m_dynamic_channels(0)
|
||||
, m_out(h == channel_type_hint::error ? &std::cerr : &std::cout) {}
|
||||
|
||||
- basic<concurrency,names>(level c, std::ostream * out)
|
||||
+ basic(level c, std::ostream * out)
|
||||
: m_static_channels(c)
|
||||
, m_dynamic_channels(0)
|
||||
, m_out(out) {}
|
||||
|
||||
/// Destructor
|
||||
- ~basic<concurrency,names>() {}
|
||||
+ ~basic() {}
|
||||
|
||||
/// Copy constructor
|
||||
- basic<concurrency,names>(basic<concurrency,names> const & other)
|
||||
+ basic(basic<concurrency,names> const & other)
|
||||
: m_static_channels(other.m_static_channels)
|
||||
, m_dynamic_channels(other.m_dynamic_channels)
|
||||
, m_out(other.m_out)
|
||||
@@ -97,7 +97,7 @@ class basic {
|
||||
|
||||
#ifdef _WEBSOCKETPP_MOVE_SEMANTICS_
|
||||
/// Move constructor
|
||||
- basic<concurrency,names>(basic<concurrency,names> && other)
|
||||
+ basic(basic<concurrency,names> && other)
|
||||
: m_static_channels(other.m_static_channels)
|
||||
, m_dynamic_channels(other.m_dynamic_channels)
|
||||
, m_out(other.m_out)
|
||||
--- a/websocketpp/roles/server_endpoint.hpp
|
||||
+++ b/websocketpp/roles/server_endpoint.hpp
|
||||
@@ -75,11 +75,11 @@ class server : public endpoint<connection<config>,config> {
|
||||
}
|
||||
|
||||
/// Destructor
|
||||
- ~server<config>() {}
|
||||
+ ~server() {}
|
||||
|
||||
#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
|
||||
// no copy constructor because endpoints are not copyable
|
||||
- server<config>(server<config> &) = delete;
|
||||
+ server(server<config> &) = delete;
|
||||
|
||||
// no copy assignment operator because endpoints are not copyable
|
||||
server<config> & operator=(server<config> const &) = delete;
|
||||
@@ -87,7 +87,7 @@ class server : public endpoint<connection<config>,config> {
|
||||
|
||||
#ifdef _WEBSOCKETPP_MOVE_SEMANTICS_
|
||||
/// Move constructor
|
||||
- server<config>(server<config> && o) : endpoint<connection<config>,config>(std::move(o)) {}
|
||||
+ server(server<config> && o) : endpoint<connection<config>,config>(std::move(o)) {}
|
||||
|
||||
#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
|
||||
// no move assignment operator because of const member variables
|
||||
@@ -0,0 +1,56 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="C++/Boost Asio based websocket client/server library"
|
||||
HOMEPAGE="https://www.zaphoyd.com/websocketpp"
|
||||
SRC_URI="
|
||||
https://github.com/zaphoyd/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://dev.gentoo.org/~sbraz/${P}-boost-1.87-compat.patch.xz
|
||||
"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="examples test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="test? ( dev-libs/boost )"
|
||||
RDEPEND="dev-libs/boost"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.7.0-cmake-install.patch
|
||||
# disable tests that are timing sensitive
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1461069
|
||||
"${FILESDIR}"/${PN}-0.8.1-disable-test_transport-test_transport_asio_timers.patch
|
||||
# https://github.com/zaphoyd/websocketpp/commit/36b73da8958927f975b3d01a062aa6c0e149d97f
|
||||
"${FILESDIR}"/${P}-fix-boost_find_component.patch
|
||||
# https://github.com/zaphoyd/websocketpp/commit/2c355d9ef0f3ed73fa96d0c6c31293086df36d74
|
||||
"${FILESDIR}"/${P}-fix-clang.patch
|
||||
# C++20 support from https://github.com/zaphoyd/websocketpp/commit/3197a520eb4c1e4754860441918a5930160373eb
|
||||
# Fixes https://github.com/zaphoyd/websocketpp/issues/991 / https://bugs.gentoo.org/939739
|
||||
"${FILESDIR}/${P}-c++20-compat.patch"
|
||||
# From https://github.com/zaphoyd/websocketpp/pull/1164
|
||||
"${WORKDIR}/${P}-boost-1.87-compat.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DENABLE_CPP11=ON
|
||||
-DBUILD_TESTS="$(usex test)"
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use examples; then
|
||||
dodoc -r examples
|
||||
docompress -x /usr/share/doc/${PF}/examples
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user