diff --git a/devel/simpleini/Makefile b/devel/simpleini/Makefile index a09698fda3a6..5275e60d32db 100644 --- a/devel/simpleini/Makefile +++ b/devel/simpleini/Makefile @@ -1,39 +1,33 @@ PORTNAME= simpleini DISTVERSIONPREFIX= v DISTVERSION= 4.22 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= amdmi3@FreeBSD.org COMMENT= C++ library providing a simple API to INI-style configuration files WWW= https://github.com/brofield/simpleini LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENCE.txt +USES= cmake:testing USE_GITHUB= yes GH_ACCOUNT= brofield -NO_BUILD= yes NO_ARCH= yes CMAKE_ON= SIMPLEINI_USE_SYSTEM_GTEST PORTDOCS= * -PLIST_FILES= include/SimpleIni.h - OPTIONS_DEFINE= TEST DOCS -TEST_USES= pkgconfig TEST_BUILD_DEPENDS= googletest>=0:devel/googletest -do-install: - ${INSTALL_DATA} ${WRKSRC}/SimpleIni.h ${STAGEDIR}${PREFIX}/include +post-patch-TEST-off: + @${REINPLACE_CMD} -e '/add_subdirectory(tests/ d' ${WRKSRC}/CMakeLists.txt -do-install-DOCS-on: +post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}/ -do-test-TEST-on: - cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} ${TEST_ENV} \ - ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} test - .include diff --git a/devel/simpleini/files/patch-CMakeLists.txt b/devel/simpleini/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..835b583840f6 --- /dev/null +++ b/devel/simpleini/files/patch-CMakeLists.txt @@ -0,0 +1,10 @@ +--- CMakeLists.txt.orig 2023-12-29 02:44:28 UTC ++++ CMakeLists.txt +@@ -34,6 +34,7 @@ add_library(${EXPORT_NAMESPACE}${PROJECT_NAME} ALIAS $ + + add_library(${PROJECT_NAME} INTERFACE) + add_library(${EXPORT_NAMESPACE}${PROJECT_NAME} ALIAS ${PROJECT_NAME}) ++target_compile_definitions(${PROJECT_NAME} INTERFACE SI_NO_CONVERSION) + + include(GNUInstallDirs) + diff --git a/devel/simpleini/files/patch-cmake-targets b/devel/simpleini/files/patch-cmake-targets new file mode 100644 index 000000000000..966b2529a634 --- /dev/null +++ b/devel/simpleini/files/patch-cmake-targets @@ -0,0 +1,41 @@ +From aeacf861a8ad8add5f4974792a88ffea393e41db Mon Sep 17 00:00:00 2001 +From: Alexandre Bouvier +Date: Tue, 2 Jan 2024 08:42:03 +0100 +Subject: [PATCH] cmake: fix namespace and include dir (#74) + +--- + CMakeLists.txt | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git CMakeLists.txt CMakeLists.txt +index 8f09295..7804947 100644 +--- CMakeLists.txt ++++ 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() diff --git a/devel/simpleini/pkg-plist b/devel/simpleini/pkg-plist new file mode 100644 index 000000000000..36349f911b1b --- /dev/null +++ b/devel/simpleini/pkg-plist @@ -0,0 +1,4 @@ +include/SimpleIni.h +share/cmake/SimpleIni/SimpleIniConfig.cmake +share/cmake/SimpleIni/SimpleIniConfigVersion.cmake +share/cmake/SimpleIni/SimpleIniTargets.cmake