From 95db7663b9c4f29911962fe8d300fc1c6644ddae Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Thu, 28 Oct 2021 12:26:38 -0700 Subject: [PATCH] [brigand] Fix pkgconfig file and modernize portfile.cmake. (#21009) * [brigand] Fix pkgconfig file and modernize portfile.cmake. * Undo patch patch and add version. * Depend only on boost-fusion and boost-variant, as suggested by PhoebeHui Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> * Update version database. Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> --- ports/brigand/fix-install-targets.patch | 14 ------- ports/brigand/portfile.cmake | 23 ++++------- ports/brigand/remove-tests.patch | 55 +++++++++++++++++++++++++ ports/brigand/vcpkg.json | 9 +++- versions/b-/brigand.json | 5 +++ versions/baseline.json | 2 +- 6 files changed, 76 insertions(+), 32 deletions(-) delete mode 100644 ports/brigand/fix-install-targets.patch create mode 100644 ports/brigand/remove-tests.patch diff --git a/ports/brigand/fix-install-targets.patch b/ports/brigand/fix-install-targets.patch deleted file mode 100644 index 248948ab1a..0000000000 --- a/ports/brigand/fix-install-targets.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 13ea689..9d20700 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -292,3 +292,9 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/brigand - install(FILES ${CMAKE_BINARY_DIR}/libbrigand.pc - DESTINATION lib/pkgconfig - ) -+ -+install(TARGETS brigand -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+) diff --git a/ports/brigand/portfile.cmake b/ports/brigand/portfile.cmake index 22b7dc08fc..1e50b92aad 100644 --- a/ports/brigand/portfile.cmake +++ b/ports/brigand/portfile.cmake @@ -6,22 +6,15 @@ vcpkg_from_github( REF 1.3.0 SHA512 538d288d84265cc9a4563f1e84d55a174db461ffd1e4f510bfdaef04af9fbf8e7ca79817f9118378bf7d58d578699aae3072bbffa3fd727b2d93ee783337aea6 HEAD_REF master - PATCHES fix-install-targets.patch + PATCHES + remove-tests.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") +vcpkg_cmake_install() +vcpkg_fixup_pkgconfig() -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pkgconfig) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/brigand/remove-tests.patch b/ports/brigand/remove-tests.patch new file mode 100644 index 0000000000..a50f4b0e5e --- /dev/null +++ b/ports/brigand/remove-tests.patch @@ -0,0 +1,55 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13ea689..e723f85 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,11 +24,6 @@ else() + endif() + + # Install pre-commit git hook +-execute_process(COMMAND ${CMAKE_COMMAND} -E copy +- ${PROJECT_SOURCE_DIR}/script/pre-commit +- ${PROJECT_SOURCE_DIR}/.git/hooks +- ) +- + set ( STANDALONE_GROUP + script/embed.py + ) +@@ -204,17 +199,6 @@ source_group(brigand\\sequences FILES ${SEQUENCES_GROUP}) + source_group(brigand\\types FILES ${TYPES_GROUP}) + source_group(placeholder FILES ${PLACEHOLDER_GROUP}) + +-add_library(brigand +- ${BRIGAND_GROUP} +- ${ADAPTED_GROUP} +- ${ALGORITHMS_GROUP} +- ${ALGORITHMS_DETAIL_GROUP} +- ${FUNCTIONS_GROUPS} +- ${SEQUENCES_GROUP} +- ${TYPES_GROUP} +- ${PLACEHOLDER_GROUP} +-) +- + set(test_files + test/always.cpp + test/apply.cpp +@@ -276,10 +260,6 @@ endif() + + source_group(tests FILES ${test_files}) + +-add_executable(brigand_test ${test_files}) +- +-add_test(brigand brigand_test) +- + configure_file(libbrigand.pc.in + libbrigand.pc + @ONLY +diff --git a/libbrigand.pc.in b/libbrigand.pc.in +index 2ed570e..218215b 100644 +--- a/libbrigand.pc.in ++++ b/libbrigand.pc.in +@@ -6,5 +6,4 @@ Name: Brigand + Description: Light-weight, fully functional, instant-compile time C++ 11 meta-programming library + URL: https://github.com/edouarda/brigand + Version: 1.2.0 +-Libs: + Cflags: -I${includedir} diff --git a/ports/brigand/vcpkg.json b/ports/brigand/vcpkg.json index 4f9d994120..99a5e0219c 100644 --- a/ports/brigand/vcpkg.json +++ b/ports/brigand/vcpkg.json @@ -1,10 +1,15 @@ { "name": "brigand", "version-string": "1.3.0", - "port-version": 1, + "port-version": 2, "description": "Brigand is a light-weight, fully functional, instant-compile time C++ 11 meta-programming library.", "homepage": "https://github.com/edouarda/brigand", "dependencies": [ - "boost" + "boost-fusion", + "boost-variant", + { + "name": "vcpkg-cmake", + "host": true + } ] } diff --git a/versions/b-/brigand.json b/versions/b-/brigand.json index f43f2cf925..d5b9f4b2ff 100644 --- a/versions/b-/brigand.json +++ b/versions/b-/brigand.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a27641e46efb007b46792b7bd803f32437fe4178", + "version-string": "1.3.0", + "port-version": 2 + }, { "git-tree": "99395d0e7569b8b32f76d99cf2183a2a92679a7d", "version-string": "1.3.0", diff --git a/versions/baseline.json b/versions/baseline.json index fcc35ca426..46e6ba7f5f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1138,7 +1138,7 @@ }, "brigand": { "baseline": "1.3.0", - "port-version": 1 + "port-version": 2 }, "brotli": { "baseline": "1.0.9",