summaryrefslogtreecommitdiff
path: root/dev-cpp/sol2
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/sol2')
-rw-r--r--dev-cpp/sol2/Manifest2
-rw-r--r--dev-cpp/sol2/files/sol2-3.3.1-fix-emplace.patch18
-rw-r--r--dev-cpp/sol2/sol2-3.3.1-r1.ebuild68
3 files changed, 88 insertions, 0 deletions
diff --git a/dev-cpp/sol2/Manifest b/dev-cpp/sol2/Manifest
index 59216791adbe..b02b3d8f07bb 100644
--- a/dev-cpp/sol2/Manifest
+++ b/dev-cpp/sol2/Manifest
@@ -3,6 +3,8 @@ AUX sol2-3.3.0-catch-depend.patch 376 BLAKE2B 7db0a0697e42a6045319636157f31ecf47
AUX sol2-3.3.0-cmake-dir.patch 1065 BLAKE2B 906ea8df35dfb8908bf114ac9fc6fbcfae9de6e3168a3d8eff437248ed071cb58a4d6c6a28430a5d4a9e4cf01080a13a62c30f37120339eabf0da2d58aabc9a2 SHA512 10a850a5376838217686ce748d6d99b85d1859c0d8a8bb7fc0d24f5158c3456d8774ad739eb881d58e7396199df8873877e4bc9a1143b3a4b9c568906b86c293
AUX sol2-3.3.0-dont-install-tests.patch 289 BLAKE2B fc82c80a6b5fcc651b43308d1604414249ee462c406554b9b61aece253983c76cce1ee691d404e6486bbd566e521953ce076206053e2bf4bee9ee7f2944434d2 SHA512 bd43744581315bab42b603a3b1e163a86f36936bc444eb1c67504a710323978b53d00bb5b9fb8865e4d5831c80f713a52cc4bd4e02c2dd054840dd47153461c6
AUX sol2-3.3.0-werror.patch 854 BLAKE2B 4ba8febe3e225a904501a61d0bf7bb5a8539b1c8dca65e67ce5b335116851549ab31321126eecc3b8b9c9439491fd8c097430b15fce17c42a8ddc73f50a4fd0d SHA512 00b267ab451cfa9210db5a3ce5de67b33c58438a46be8178cce4dcf1ffd31ca2e5bde0015ccb72e2e641b7a0a59996d88154acc765b6eb3891bb092bec0bf46b
+AUX sol2-3.3.1-fix-emplace.patch 660 BLAKE2B b36439910c10c2bb3c86d5911c3aaf20906e411d7fddc40ad2c201c685cf8feea4c49e4e5835396c4d6d1447ea672b55e2f55e7291e74d0eb7f4add9bab7e91f SHA512 3563d2d272bb5d281c4d9875b5ec0cc94548adc0b3ca58f648a20e26e0d180fbb0b35e21d3b6a0ca51808b4744aff4796ef599c6cd17bcc44697e20ff951fb61
DIST sol2-3.3.1.tar.gz 8453954 BLAKE2B f9fced4f001a5f681598e45bf74cdf064f655c950be5b91789d2bf66c0180b5048610d3d4416c024a07db11d41fceaee786800c5ca1412811cbc1a449a894a9e SHA512 4404b124a4f331d77459c01a92cd73895301e7d3ef829a0285980f0138b9cc66782de3713d54f017d5aad7d8a11d23eeffbc5f3b39ccb4d4306a955711d385dd
+EBUILD sol2-3.3.1-r1.ebuild 1404 BLAKE2B f4b7ca3ba02f29728b5ecf0ddcaec5722d07a185ce780812456b3ba0a9a69ed92062622ddf9245ff2b8f834a9f5a2597f89fd6d24bcdc342ecd3ee9b5d77c39f SHA512 69792db4cce41f83202a82dfe1b938ae6fcc5d82a2c42a6dcab9488396c03b3f7aa46f0b641541ed0eeefcda069922b146575165d411f53e2a1366058d6ddb6f
EBUILD sol2-3.3.1.ebuild 1360 BLAKE2B a0a619ce293f9c658142ba6cac3a28da9359ca658391be51ac7049a8e65e81a2a805654426601bc9503c389efa2e00a11163e66a382d8bb9017baf6ecdef332d SHA512 de9b08a6c6c557f2acc702b3aea402a9c094f441e79ffa8f13a1f05cfbb844c3420b901e17a98d23480047956d65d7435fd7548fa765736138a61510bbb7ee3c
MISC metadata.xml 594 BLAKE2B 911a1123a653118d9c19c3ff1a42a979a696d034500eda29a18c72e6f89bcc2f7c4d28977c76a40f61b79649c3f4aa63439cda96311e2cdd2bc9495ad1a85db1 SHA512 5c8252373ee8bdefe9b2863df048616beec0d00dcf1cd7845302721f78158db48729d9ab412dbcf4bed49130518acd2071ca3e5880488a882117ec5728e26b9a
diff --git a/dev-cpp/sol2/files/sol2-3.3.1-fix-emplace.patch b/dev-cpp/sol2/files/sol2-3.3.1-fix-emplace.patch
new file mode 100644
index 000000000000..5d926a700979
--- /dev/null
+++ b/dev-cpp/sol2/files/sol2-3.3.1-fix-emplace.patch
@@ -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.
diff --git a/dev-cpp/sol2/sol2-3.3.1-r1.ebuild b/dev-cpp/sol2/sol2-3.3.1-r1.ebuild
new file mode 100644
index 000000000000..04c86b3588ee
--- /dev/null
+++ b/dev-cpp/sol2/sol2-3.3.1-r1.ebuild
@@ -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
+}