From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 061E1159C9B for ; Wed, 31 Jul 2024 19:46:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 32650E2A27; Wed, 31 Jul 2024 19:46:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 09FC1E2A27 for ; Wed, 31 Jul 2024 19:46:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E31E6335CAF for ; Wed, 31 Jul 2024 19:46:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 82E411AA7 for ; Wed, 31 Jul 2024 19:46:26 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1722455156.b2d0246fbfdeb088c4de598e4897bfa3fe9c0363.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/sol2/, dev-cpp/sol2/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-cpp/sol2/files/sol2-3.3.1-fix-emplace.patch dev-cpp/sol2/sol2-3.3.1-r1.ebuild X-VCS-Directories: dev-cpp/sol2/files/ dev-cpp/sol2/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b2d0246fbfdeb088c4de598e4897bfa3fe9c0363 X-VCS-Branch: master Date: Wed, 31 Jul 2024 19:46:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 96bfffb2-341e-4972-a9ab-f1ecb41c015c X-Archives-Hash: 7b395028a20b9c8c0c49cf6d0362f1dd commit: b2d0246fbfdeb088c4de598e4897bfa3fe9c0363 Author: Christopher Fore posteo net> AuthorDate: Wed Jul 31 19:37:26 2024 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jul 31 19:45:56 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2d0246f 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 posteo.net> Closes: https://github.com/gentoo/gentoo/pull/37886 Signed-off-by: Sam James gentoo.org> dev-cpp/sol2/files/sol2-3.3.1-fix-emplace.patch | 18 +++++++ dev-cpp/sol2/sol2-3.3.1-r1.ebuild | 68 +++++++++++++++++++++++++ 2 files changed, 86 insertions(+) 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?= +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::value, "T must be constructible with Args"); + + *this = nullopt; +- this->construct(std::forward(args)...); ++ new (static_cast(this)) optional(std::in_place, std::forward(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 +}