diff --git a/ports/tobias-loew-flags/add-install-configuration.patch b/ports/tobias-loew-flags/add-install-configuration.patch new file mode 100644 index 0000000000..02e6710137 --- /dev/null +++ b/ports/tobias-loew-flags/add-install-configuration.patch @@ -0,0 +1,62 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 78d96ff..3215aca 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,7 +65,39 @@ endif() + ################################################## + add_library(boost_flags INTERFACE) + #target_include_directories(boost_flags PUBLIC ${Boost_INCLUDE_DIRS}) +-target_include_directories(boost_flags INTERFACE ${CMAKE_SOURCE_DIR}/include) ++target_include_directories(boost_flags ++ INTERFACE ++ $ ++ $ ++ ) ++set_target_properties(boost_flags PROPERTIES ++ EXPORT_NAME flags ++) ++include(CMakePackageConfigHelpers) ++ ++configure_package_config_file( ++ cmake/unofficial-tobias-loew-flags-config.cmake.in ++ "${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-tobias-loew-flags-config.cmake" ++ INSTALL_DESTINATION share/unofficial-tobias-loew-flags/ ++ NO_CHECK_REQUIRED_COMPONENTS_MACRO) ++ ++# Install. ++install(TARGETS boost_flags EXPORT unofficial-tobias-loew-flags) ++ ++install( ++ EXPORT unofficial-tobias-loew-flags ++ NAMESPACE unofficial::tobias-loew-flags:: ++ FILE unofficial-tobias-loew-flags-targets.cmake ++ DESTINATION share/unofficial-tobias-loew-flags/) ++ ++install(DIRECTORY include/boost DESTINATION include) ++ ++install( ++ FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-tobias-loew-flags-config.cmake" ++ DESTINATION share/unofficial-tobias-loew-flags) ++ ++if(0) + if (Boost_FOUND) + target_include_directories(boost_flags INTERFACE ${Boost_INCLUDE_DIRS}) + endif() +@@ -79,4 +111,5 @@ endif() + # Subdirectories + ################################################## + add_subdirectory(test) ++endif() + # add_subdirectory(example) +diff --git a/cmake/unofficial-tobias-loew-flags-config.cmake.in b/cmake/unofficial-tobias-loew-flags-config.cmake.in +new file mode 100644 +index 0000000..9a784e1 +--- /dev/null ++++ b/cmake/unofficial-tobias-loew-flags-config.cmake.in +@@ -0,0 +1,5 @@ ++ ++@PACKAGE_INIT@ ++ ++include("${CMAKE_CURRENT_LIST_DIR}/unofficial-tobias-loew-flags-targets.cmake") ++ diff --git a/ports/tobias-loew-flags/portfile.cmake b/ports/tobias-loew-flags/portfile.cmake new file mode 100644 index 0000000000..fa9806ccd8 --- /dev/null +++ b/ports/tobias-loew-flags/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tobias-loew/flags + REF 7a3cb950b79e7ab596ae22da30fa685c70ef497b + SHA512 a7835c3508830c1e215c301588ca26be84a6e1ca6ed4bfb5a3225bb390bf0637ac368bd7214e56809b24f6ac26a9e6f9478adf03d8e9140c2bd430c88f1c8f26 + HEAD_REF main + PATCHES add-install-configuration.patch +) + +set(VCPKG_BUILD_TYPE release) # header-only + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/tobias-loew-flags/vcpkg.json b/ports/tobias-loew-flags/vcpkg.json new file mode 100644 index 0000000000..36a7945941 --- /dev/null +++ b/ports/tobias-loew-flags/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "tobias-loew-flags", + "version-date": "2024-09-10", + "description": "type-safe bitwise operations in C++, to be proposed for Boost", + "homepage": "https://tobias-loew.github.io/flags/doc/html/flags.html", + "license": "BSL-1.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 311f305e7c..92707188ce 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9012,6 +9012,10 @@ "baseline": "2019-10-14", "port-version": 1 }, + "tobias-loew-flags": { + "baseline": "2024-09-10", + "port-version": 0 + }, "toml11": { "baseline": "4.2.0", "port-version": 0 diff --git a/versions/t-/tobias-loew-flags.json b/versions/t-/tobias-loew-flags.json new file mode 100644 index 0000000000..80f5eec7a4 --- /dev/null +++ b/versions/t-/tobias-loew-flags.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "2de8995b035f3c2fa68d55eaec02d657c835cfbd", + "version-date": "2024-09-10", + "port-version": 0 + } + ] +}