diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/ned14-internal-quickcpplib | |
Diffstat (limited to 'vcpkg/ports/ned14-internal-quickcpplib')
6 files changed, 187 insertions, 0 deletions
diff --git a/vcpkg/ports/ned14-internal-quickcpplib/fix-list_filter.patch b/vcpkg/ports/ned14-internal-quickcpplib/fix-list_filter.patch new file mode 100644 index 0000000..41d0e5c --- /dev/null +++ b/vcpkg/ports/ned14-internal-quickcpplib/fix-list_filter.patch @@ -0,0 +1,31 @@ +diff --git a/cmakelib/QuickCppLibUtils.cmake b/cmakelib/QuickCppLibUtils.cmake +index 3fdd0e8..0f6a272 100644 +--- a/cmakelib/QuickCppLibUtils.cmake ++++ b/cmakelib/QuickCppLibUtils.cmake +@@ -53,24 +53,8 @@ endfunction() + + # Emulate list(FILTER list INCLUDE|EXCLUDE REGEX regex) on cmake < 3.6 + function(list_filter listname op regexqualifer regex) +- if(CMAKE_VERSION VERSION_GREATER 3.59) +- list(FILTER ${ARGV}) +- else() +- set(out) +- foreach(item ${${listname}}) +- string(REGEX MATCH "${regex}" match ${item}) +- if("${op}" STREQUAL "INCLUDE") +- if(match) +- list(APPEND out ${item}) +- endif() +- else() +- if(NOT match) +- list(APPEND out ${item}) +- endif() +- endif() +- endforeach() +- set(${listname} ${out} PARENT_SCOPE) +- endif() ++ list(FILTER ${ARGV}) ++ set(${listname} ${${listname}} PARENT_SCOPE) + endfunction() + + # Escape a string into a regex matching that string diff --git a/vcpkg/ports/ned14-internal-quickcpplib/portfile.cmake b/vcpkg/ports/ned14-internal-quickcpplib/portfile.cmake new file mode 100644 index 0000000..0e2a87d --- /dev/null +++ b/vcpkg/ports/ned14-internal-quickcpplib/portfile.cmake @@ -0,0 +1,81 @@ +# QuickCppLib is composed of other third party libraries: +# <= quickcpplib +# <= byte-lite +# <= gsl-lite +# <= Optional +# +# byte-lite and gsl-lite are in vcpkg, but may not be versions +# known to be compatible with QuickCppLib. It has occurred in the +# past that newer versions were severely broken with QuickCppLib. + +include("${CURRENT_PORT_DIR}/sha_manifest.cmake") + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + INVERTED_FEATURES + polyfill-cxx17 QUICKCPPLIB_REQUIRE_CXX17 + polyfill-cxx20 QUICKCPPLIB_REQUIRE_CXX20 +) + +if (NOT QUICKCPPLIB_REQUIRE_CXX20) + message(WARNING [=[ + QuickCppLib and its downstream dependencies Outcome and LLFIO were tested against span-lite version 0.10.3 and byte-lite version 0.3.0. They are not guaranteed to work with newer versions, with failures experienced in the past up-to-and-including runtime crashes. You can pin the versions as verified to work in QuickCppLib's CI in your manifest file by adding: + "overrides": [ + { "name": "span-lite", "version": "0.10.3" }, + { "name": "byte-lite", "version": "0.3.0" } + ] + Do not report issues to upstream without first pinning these previous versions. + ]=]) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ned14/quickcpplib + REF ${QUICKCPPLIB_REF} + SHA512 ${QUICKCPPLIB_SHA512} + HEAD_REF master + PATCHES + quicklib-depheaders.patch + fix-list_filter.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH OPT_SOURCE_PATH + REPO akrzemi1/Optional + REF ${OPTIONAL_REF} + SHA512 ${OPTIONAL_SHA512} + HEAD_REF master +) + +file(COPY "${OPT_SOURCE_PATH}/." DESTINATION "${SOURCE_PATH}/include/quickcpplib/optional") + +# Because quickcpplib's deployed files are header-only, the debug build it not necessary +set(VCPKG_BUILD_TYPE release) + +# Use QuickCppLib's own build process, skipping examples and tests. +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dquickcpplib_IS_DEPENDENCY=ON + -DQUICKCPPLIB_USE_SYSTEM_BYTE_LITE=ON + -DQUICKCPPLIB_USE_SYSTEM_SPAN_LITE=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON + "-DCMAKE_INSTALL_DATADIR=${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib" + ${FEATURE_OPTIONS} + MAYBE_UNUSED_VARIABLES + CMAKE_DISABLE_FIND_PACKAGE_Doxygen +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME quickcpplib + CONFIG_PATH lib/cmake/quickcpplib +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/Licence.txt") diff --git a/vcpkg/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch b/vcpkg/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch new file mode 100644 index 0000000..de49af0 --- /dev/null +++ b/vcpkg/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch @@ -0,0 +1,25 @@ +diff --git a/cmake/headers.cmake b/cmake/headers.cmake
+index 3924a2a..f1e32d9 100644
+--- a/cmake/headers.cmake
++++ b/cmake/headers.cmake
+@@ -15,8 +15,6 @@ set(quickcpplib_HEADERS
+ "include/quickcpplib/boost/test/unit_test.hpp"
+ "include/quickcpplib/byte.hpp"
+ "include/quickcpplib/byte/include/nonstd/byte.hpp"
+- "include/quickcpplib/byte/test/byte-main.t.hpp"
+- "include/quickcpplib/byte/test/lest/lest_cpp03.hpp"
+ "include/quickcpplib/config.hpp"
+ "include/quickcpplib/console_colours.hpp"
+ "include/quickcpplib/cpp_feature.h"
+@@ -40,11 +38,7 @@ set(quickcpplib_HEADERS
+ "include/quickcpplib/ringbuffer_log.hpp"
+ "include/quickcpplib/scope.hpp"
+ "include/quickcpplib/signal_guard.hpp"
+- "include/quickcpplib/span-lite/example/nonstd/span.tweak.hpp"
+ "include/quickcpplib/span-lite/include/nonstd/span.hpp"
+- "include/quickcpplib/span-lite/test/lest/lest_cpp03.hpp"
+- "include/quickcpplib/span-lite/test/nonstd/span.tweak.hpp"
+- "include/quickcpplib/span-lite/test/span-main.t.hpp"
+ "include/quickcpplib/span.hpp"
+ "include/quickcpplib/spinlock.hpp"
+ "include/quickcpplib/spinlock.natvis"
diff --git a/vcpkg/ports/ned14-internal-quickcpplib/sha_manifest.cmake b/vcpkg/ports/ned14-internal-quickcpplib/sha_manifest.cmake new file mode 100644 index 0000000..9048e6c --- /dev/null +++ b/vcpkg/ports/ned14-internal-quickcpplib/sha_manifest.cmake @@ -0,0 +1,5 @@ +set(QUICKCPPLIB_REF 2af3839551eacd2152892d7197b27cd5b87deb38)
+set(QUICKCPPLIB_SHA512 7e58a4bfc2a9e0e0c4e77c6f6c597724d4824ff1255562ffcf6c903d840bdb6fe40ba96a43782fdb3ca0eb7ba4d794166fb7d7d0f76060179991682b8ae9b3d6)
+
+set(OPTIONAL_REF 2b43315458a99fc5de1da6e7bc0ddd364b26d643)
+set(OPTIONAL_SHA512 1952386cd3c7b963861f9634055e1baa4181d398d6f1b068a8a3f411368432bdcd42e47aadfa856584ed9a7c724a1c83369243ccb653e650af5c9155b42a84f4)
diff --git a/vcpkg/ports/ned14-internal-quickcpplib/usage b/vcpkg/ports/ned14-internal-quickcpplib/usage new file mode 100644 index 0000000..91f1dff --- /dev/null +++ b/vcpkg/ports/ned14-internal-quickcpplib/usage @@ -0,0 +1,2 @@ +You should NOT DIRECTLY USE quickcpplib in your own libraries!
+It is intended for internal use by ned14's vcpkg libraries only.
diff --git a/vcpkg/ports/ned14-internal-quickcpplib/vcpkg.json b/vcpkg/ports/ned14-internal-quickcpplib/vcpkg.json new file mode 100644 index 0000000..d22ca43 --- /dev/null +++ b/vcpkg/ports/ned14-internal-quickcpplib/vcpkg.json @@ -0,0 +1,43 @@ +{ + "name": "ned14-internal-quickcpplib", + "version-date": "2023-11-22", + "port-version": 1, + "maintainers": [ + "Niall Douglas <s_github@nedprod.com>", + "Henrik Gaßmann <henrik@gassmann.onl>" + ], + "description": "NOT FOR EXTERNAL CONSUMPTION, a set of internal scripts used by ned14's libraries.", + "homepage": "https://github.com/ned14/quickcpplib", + "license": "Apache-2.0 OR BSL-1.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "polyfill-cxx17": { + "description": "Polyfill std::byte with byte-lite", + "dependencies": [ + "byte-lite", + { + "name": "ned14-internal-quickcpplib", + "default-features": false, + "features": [ + "polyfill-cxx20" + ] + } + ] + }, + "polyfill-cxx20": { + "description": "Polyfill std::span with span-lite", + "dependencies": [ + "span-lite" + ] + } + } +} |