mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-cpp/sol2: Fix compilation on GCC 15
- Tests pass - Patch taken from upstream Closes: https://bugs.gentoo.org/936924 Signed-off-by: Christopher Fore <csfore@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/37886 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
552c69b05b
commit
b2d0246fbf
18
dev-cpp/sol2/files/sol2-3.3.1-fix-emplace.patch
Normal file
18
dev-cpp/sol2/files/sol2-3.3.1-fix-emplace.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
https://github.com/ThePhD/sol2/commit/d805d027e0a0a7222e936926139f06e23828ce9f
|
||||
|
||||
From: =?UTF-8?q?=E2=80=9CPaulo?= <paulo@ubook.com>
|
||||
Date: Sat, 25 May 2024 01:52:59 -0300
|
||||
Subject: [PATCH] fix emplace
|
||||
|
||||
--- a/include/sol/optional_implementation.hpp
|
||||
+++ b/include/sol/optional_implementation.hpp
|
||||
@@ -2191,7 +2191,8 @@ namespace sol {
|
||||
static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");
|
||||
|
||||
*this = nullopt;
|
||||
- this->construct(std::forward<Args>(args)...);
|
||||
+ new (static_cast<void*>(this)) optional(std::in_place, std::forward<Args>(args)...);
|
||||
+ return **this;
|
||||
}
|
||||
|
||||
/// Swaps this optional with the other.
|
||||
68
dev-cpp/sol2/sol2-3.3.1-r1.ebuild
Normal file
68
dev-cpp/sol2/sol2-3.3.1-r1.ebuild
Normal file
@@ -0,0 +1,68 @@
|
||||
# Copyright 2021-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LUA_COMPAT=( lua5-{1,3,4} luajit )
|
||||
inherit cmake lua
|
||||
|
||||
DESCRIPTION="Header-only C++ <-> Lua API wrapper"
|
||||
HOMEPAGE="https://github.com/ThePhD/sol2"
|
||||
SRC_URI="https://github.com/ThePhD/sol2/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
|
||||
IUSE="test"
|
||||
REQUIRED_USE="${LUA_REQUIRED_USE}"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
${LUA_DEPS}
|
||||
test? (
|
||||
>=dev-cpp/catch-3
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/sol2-3.3.0-werror.patch
|
||||
"${FILESDIR}"/sol2-3.2.2-luajit-pkgconf.patch
|
||||
"${FILESDIR}"/sol2-3.3.0-catch-depend.patch
|
||||
"${FILESDIR}"/sol2-3.3.0-cmake-dir.patch
|
||||
"${FILESDIR}"/sol2-3.3.0-dont-install-tests.patch
|
||||
"${FILESDIR}"/sol2-3.3.1-fix-emplace.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
sol2_configure_wrapper() {
|
||||
local mycmakeargs=(
|
||||
-DSOL2_BUILD_LUA=no
|
||||
-DSOL2_TESTS=$(usex test)
|
||||
-DSOL2_LUA_VERSION="${ELUA}"
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
lua_foreach_impl sol2_configure_wrapper
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
lua_foreach_impl cmake_src_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
sol2_test_wrapper() {
|
||||
if [[ ${ELUA} == luajit ]]; then
|
||||
einfo "Skipping test due to https://github.com/ThePhD/sol2/issues/1221"
|
||||
else
|
||||
cmake_src_test
|
||||
fi
|
||||
}
|
||||
lua_foreach_impl sol2_test_wrapper
|
||||
}
|
||||
|
||||
src_install() {
|
||||
lua_foreach_impl cmake_src_install
|
||||
}
|
||||
Reference in New Issue
Block a user