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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 510F6139345 for ; Wed, 14 Jul 2021 05:47:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 08543E0C32; Wed, 14 Jul 2021 05:47:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D18C4E0C32 for ; Wed, 14 Jul 2021 05:47:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 64151342ABF for ; Wed, 14 Jul 2021 05:47:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E813C25 for ; Wed, 14 Jul 2021 05:47:28 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1626241577.35da96df067a8a2cb5f983830b0f63f744000820.ionen@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/Manifest dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch dev-cpp/sol2/metadata.xml dev-cpp/sol2/sol2-3.2.2.ebuild X-VCS-Directories: dev-cpp/sol2/files/ dev-cpp/sol2/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 35da96df067a8a2cb5f983830b0f63f744000820 X-VCS-Branch: master Date: Wed, 14 Jul 2021 05:47:28 +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: 6ce84606-963d-48f1-a582-e57076eae7bb X-Archives-Hash: c6491c66730e5c8e975a250e1c3afcda commit: 35da96df067a8a2cb5f983830b0f63f744000820 Author: Alexey Sokolov asokolov org> AuthorDate: Sun Jul 11 23:29:46 2021 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Wed Jul 14 05:46:17 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35da96df dev-cpp/sol2: new package 3.2.2 games-engines/openmw-0.48 will depend on it Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: Alexey Sokolov asokolov.org> Signed-off-by: Ionen Wolkens gentoo.org> dev-cpp/sol2/Manifest | 2 + dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch | 27 +++++++ dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch | 17 +++++ dev-cpp/sol2/metadata.xml | 19 +++++ dev-cpp/sol2/sol2-3.2.2.ebuild | 83 ++++++++++++++++++++++ 5 files changed, 148 insertions(+) diff --git a/dev-cpp/sol2/Manifest b/dev-cpp/sol2/Manifest new file mode 100644 index 00000000000..b298932cab9 --- /dev/null +++ b/dev-cpp/sol2/Manifest @@ -0,0 +1,2 @@ +DIST sol2-3.2.2-gcc11.patch 24788 BLAKE2B bc50d638c6414d86af7a744c26c3eae05400d593caeca725d3d15e81a76bcb22817994cdbb884c795aaa157e8c3de0753e38c6352e57dc081e001e8e245aa9a7 SHA512 98bb29cf7e89306ed7e9d350dc924b5fa10d51cb7ff4eb3ac873775d17c3b8849a37d6c1566fe9eb18222b524d648b4268d513fb0a2e7d272a4a6032eda10930 +DIST sol2-3.2.2.tar.gz 8531029 BLAKE2B 65fd220f5109e4917d06d5ef906ceccb7e292276f69bd49dfd826089a77e566af1811fdf660ffbfbd2437dca4b86ef5c4790dace9029805926e1ee0445b2e965 SHA512 e5a739b37aea7150f141f6a003c2689dd33155feed5bb3cf2569abbfe9f0062eacdaaf346be523d627f0e491b35e68822c80e1117fa09ece8c9d8d5af09fdbec diff --git a/dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch b/dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch new file mode 100644 index 00000000000..2da3c00c161 --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch @@ -0,0 +1,27 @@ +Use catch library from system + +--- a/tests/runtime_tests/CMakeLists.txt ++++ b/tests/runtime_tests/CMakeLists.txt +@@ -22,12 +22,6 @@ + + # # # # sol3 tests - runtime tests + +-if (CMAKE_GENERATOR MATCHES "Visual Studio 14 2015") +- find_package(Catch 1.12.1 REQUIRED) +-else() +- find_package(Catch REQUIRED) +-endif() +- + file(GLOB SOL2_RUNTIME_TEST_SOURCES source/*.cpp) + source_group(test_sources FILES ${SOL2_RUNTIME_TEST_SOURCES}) + +@@ -38,7 +32,8 @@ function(CREATE_TEST test_target_name test_name target_sol) + OUTPUT_NAME ${test_name} + EXPORT_NAME sol2::${test_name}) + target_link_libraries(${test_target_name} +- PUBLIC Threads::Threads ${LUA_LIBRARIES} ${CATCH_LIBRARIES} ${target_sol}) ++ PUBLIC Threads::Threads ${LUA_LIBRARIES} ${target_sol}) ++ target_include_directories(${test_target_name} PRIVATE ${CATCH_INC_DIR}) + + if (MSVC) + if (NOT CMAKE_COMPILER_ID MATCHES "Clang") diff --git a/dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch b/dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch new file mode 100644 index 00000000000..9b9c9f10176 --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch @@ -0,0 +1,17 @@ +Use the lua version selected by lua eclass + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,7 +188,11 @@ if (SOL2_IS_TOP_LEVEL AND (SOL2_DO_TESTS OR SOL2_DO_EXAMPLES)) + + string(TOLOWER ${SOL2_LUA_VERSION} NORMALIZED_LUA_VERSION) + # Find way to get Lua: build if requested, or attempt to build if no matching version is found +- if (SOL2_BUILD_LUA) ++ if (TRUE) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(LUA REQUIRED lua IMPORTED_TARGET) ++ set(LUA_LIBRARIES PkgConfig::LUA) ++ elseif (SOL2_BUILD_LUA) + find_package(LuaBuild REQUIRED COMPONENTS ${SOL2_LUA_VERSION}) + elseif (NOT SOL2_LUA_VERSION) + find_package(LuaBuild REQUIRED) diff --git a/dev-cpp/sol2/metadata.xml b/dev-cpp/sol2/metadata.xml new file mode 100644 index 00000000000..4376dd4a461 --- /dev/null +++ b/dev-cpp/sol2/metadata.xml @@ -0,0 +1,19 @@ + + + + + alexey+gentoo@asokolov.org + Alexey Sokolov + + + proxy-maint@gentoo.org + Proxy Maintainers + + + games@gentoo.org + Gentoo Games Project + + + ThePhD/sol2 + + diff --git a/dev-cpp/sol2/sol2-3.2.2.ebuild b/dev-cpp/sol2/sol2-3.2.2.ebuild new file mode 100644 index 00000000000..4a8b270ac71 --- /dev/null +++ b/dev-cpp/sol2/sol2-3.2.2.ebuild @@ -0,0 +1,83 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 + https://github.com/ThePhD/sol2/commit/e5e6466e09b632677d24a8f204d6a0ea0a8862b1.patch -> ${P}-gcc11.patch +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +REQUIRED_USE="test? ( ${LUA_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + ${LUA_DEPS} + dev-cpp/catch:0 + ) +" +BDEPEND=" + test? ( + virtual/pkgconfig + ) +" + +PATCHES=( + "${DISTDIR}"/${P}-gcc11.patch + "${FILESDIR}"/${P}-luajit-pkgconf.patch + "${FILESDIR}"/${P}-catch-depend.patch +) + +src_prepare() { + # TODO: remove this sed on next bump + sed -i -e 's/-Werror//' \ + tests/runtime_tests/CMakeLists.txt \ + tests/regression_tests/1011/CMakeLists.txt \ + tests/config_tests/function_pointers/CMakeLists.txt \ + examples/customization/CMakeLists.txt \ + examples/CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + cmake_src_configure + + if use test; then + sol2_configure_wrapper() { + local mycmakeargs=( + -DSOL2_BUILD_LUA=no + -DSOL2_TESTS=yes + -DSOL2_LUA_VERSION="${ELUA}" + -DCATCH_INC_DIR="${ESYSROOT}/usr/include/catch2" + ) + cmake_src_configure + } + lua_foreach_impl sol2_configure_wrapper + fi +} + +src_compile() { + use test && 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 +}