diff --git a/dev-cpp/simpleini/files/simpleini-4.22-disable-tests.patch b/dev-cpp/simpleini/files/simpleini-4.22-disable-tests.patch new file mode 100644 index 0000000000000..380c50d587e77 --- /dev/null +++ b/dev-cpp/simpleini/files/simpleini-4.22-disable-tests.patch @@ -0,0 +1,25 @@ +From f7862c3dd7ad35becc2741f268e3402e89a37666 Mon Sep 17 00:00:00 2001 +From: Alexandre Bouvier +Date: Tue, 2 Jan 2024 10:54:44 +0100 +Subject: [PATCH 2/2] cmake: really disable tests (#75) + +--- + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7804947..4b360ad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,5 +72,7 @@ target_include_directories(${PROJECT_NAME} INTERFACE + + if(IS_TOPLEVEL_PROJECT) + include(CTest) +- add_subdirectory(tests) ++ if(BUILD_TESTING) ++ add_subdirectory(tests) ++ endif() + endif() +-- +2.43.2 + diff --git a/dev-cpp/simpleini/files/simpleini-4.22-include-dir.patch b/dev-cpp/simpleini/files/simpleini-4.22-include-dir.patch new file mode 100644 index 0000000000000..78fba987bc0ad --- /dev/null +++ b/dev-cpp/simpleini/files/simpleini-4.22-include-dir.patch @@ -0,0 +1,44 @@ +From aeacf861a8ad8add5f4974792a88ffea393e41db Mon Sep 17 00:00:00 2001 +From: Alexandre Bouvier +Date: Tue, 2 Jan 2024 08:42:03 +0100 +Subject: [PATCH 1/2] cmake: fix namespace and include dir (#74) + +--- + CMakeLists.txt | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8f09295..7804947 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -48,7 +48,7 @@ configure_package_config_file(${PROJECT_NAME}Config.cmake.in + ) + + install(FILES SimpleIni.h +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + + install(TARGETS ${PROJECT_NAME} +@@ -62,12 +62,15 @@ install(FILES + ) + install(EXPORT ${PROJECT_NAME}Targets + DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME} +- NAMESPACE EXPORT_NAMESPACE ++ NAMESPACE ${EXPORT_NAMESPACE} + ) + +-target_include_directories(${PROJECT_NAME} INTERFACE $) ++target_include_directories(${PROJECT_NAME} INTERFACE ++ $ ++ $ ++) + + if(IS_TOPLEVEL_PROJECT) +- enable_testing() ++ include(CTest) + add_subdirectory(tests) + endif() +-- +2.43.2 + diff --git a/dev-cpp/simpleini/simpleini-4.22-r1.ebuild b/dev-cpp/simpleini/simpleini-4.22-r1.ebuild new file mode 100644 index 0000000000000..e5b4c147bbb9e --- /dev/null +++ b/dev-cpp/simpleini/simpleini-4.22-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="C++ library providing a simple API to read and write INI-style files" +HOMEPAGE="https://github.com/brofield/simpleini/" +SRC_URI="https://github.com/brofield/simpleini/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND="test? ( dev-cpp/gtest )" +BDEPEND="test? ( virtual/pkgconfig )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.20-pkgconfig-var.patch + "${FILESDIR}"/${P}-include-dir.patch + "${FILESDIR}"/${P}-disable-tests.patch +) + +src_configure() { + local mycmakeargs=( + -DBUILD_TESTING=$(usex test) + -DSIMPLEINI_USE_SYSTEM_GTEST=ON + ) + cmake_src_configure +}