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/ppqsort | |
Diffstat (limited to 'vcpkg/ports/ppqsort')
| -rw-r--r-- | vcpkg/ports/ppqsort/portfile.cmake | 40 | ||||
| -rw-r--r-- | vcpkg/ports/ppqsort/remove-cpm.patch | 16 | ||||
| -rw-r--r-- | vcpkg/ports/ppqsort/vcpkg.json | 22 |
3 files changed, 78 insertions, 0 deletions
diff --git a/vcpkg/ports/ppqsort/portfile.cmake b/vcpkg/ports/ppqsort/portfile.cmake new file mode 100644 index 0000000..7e72cec --- /dev/null +++ b/vcpkg/ports/ppqsort/portfile.cmake @@ -0,0 +1,40 @@ +set(VCPKG_BUILD_TYPE release) # header-only port + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GabTux/PPQSort + REF "v${VERSION}" + SHA512 404621a489cc530170196dca317cabf35ecb2f93e10465474a5af1a4e79352433ca57711236f1cc08a359ae40294d9dd62feed42ec1f6890fa5139473997c29c + HEAD_REF master + PATCHES + remove-cpm.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH PACKAGE_PROJECT_PATH + REPO TheLartians/PackageProject.cmake + REF "v1.11.1" + SHA512 cffd7b203c54f325b4604b909678425e0f63bed3f9d4fb5478b1eb885b532e682d3972595d0909ea2feb1aadd73736bd282931fa62fa47af27affb6b3f17a304 + HEAD_REF master +) +file(RENAME "${PACKAGE_PROJECT_PATH}" "${SOURCE_PATH}/cmake/packageproject.cmake") + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openmp PPQSORT_USE_OPENMP +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/PPQSort-${VERSION}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/ppqsort/remove-cpm.patch b/vcpkg/ports/ppqsort/remove-cpm.patch new file mode 100644 index 0000000..bee387d --- /dev/null +++ b/vcpkg/ports/ppqsort/remove-cpm.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ef7ff7a..d219662 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,10 +22,8 @@ endif() + # ---- Add dependencies via CPM ---- + # see https://github.com/TheLartians/CPM.cmake for more info + +-include(cmake/CPM.cmake) +- + # PackageProject.cmake will be used to make our target installable +-CPMAddPackage("gh:TheLartians/PackageProject.cmake@1.11.1") ++add_subdirectory(cmake/packageproject.cmake) + + # ---- Add source files ---- + diff --git a/vcpkg/ports/ppqsort/vcpkg.json b/vcpkg/ports/ppqsort/vcpkg.json new file mode 100644 index 0000000..49eaba9 --- /dev/null +++ b/vcpkg/ports/ppqsort/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "ppqsort", + "version": "1.0.5", + "description": "a efficient implementation of parallel quicksort algorithm", + "homepage": "https://gabtux.github.io/PPQSort/", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "openmp": { + "description": "Build with openmp, otherwise use native threads" + } + } +} |