From 824fbe62f6dc45ea17cb2b526f20d90eba16f5b9 Mon Sep 17 00:00:00 2001 From: chausner <15180557+chausner@users.noreply.github.com> Date: Wed, 20 Oct 2021 03:29:10 +0200 Subject: [PATCH] [soxr] Add features, fix VCRT runtime linkage (#20797) * Add features lsr-bindings and openmp to soxr, set BUILD_SHARED_RUNTIME * Update git-tree hash * Convert tabs to spaces * Update git-tree hash * Use string(COMPARE * Update git-tree hash Co-authored-by: chausner --- ports/soxr/portfile.cmake | 44 +++++++++++++++++++++++---------------- ports/soxr/vcpkg.json | 20 +++++++++++++++--- versions/baseline.json | 2 +- versions/s-/soxr.json | 5 +++++ 4 files changed, 49 insertions(+), 22 deletions(-) diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index 193eaecd48..15fbce5a26 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -3,27 +3,35 @@ vcpkg_from_sourceforge( REPO soxr FILENAME "soxr-0.1.3-Source.tar.xz" SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 - PATCHES - 001_initialize-resampler.patch - 002_disable_warning.patch - 003_detect_arm_on_windows.patch + PATCHES + 001_initialize-resampler.patch + 002_disable_warning.patch + 003_detect_arm_on_windows.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DBUILD_TESTS=OFF - -DBUILD_EXAMPLES=OFF - -DWITH_OPENMP=OFF - -DWITH_LSR_BINDINGS=OFF +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openmp WITH_OPENMP + lsr-bindings WITH_LSR_BINDINGS ) -vcpkg_install_cmake() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" BUILD_SHARED_RUNTIME) -file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soxr RENAME copyright) +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_SHARED_RUNTIME=${BUILD_SHARED_RUNTIME} + ${FEATURE_OPTIONS} +) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) +vcpkg_cmake_install() + +file(INSTALL "${SOURCE_PATH}/LICENCE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/doc") diff --git a/ports/soxr/vcpkg.json b/ports/soxr/vcpkg.json index acf2fc35cc..4887394e56 100644 --- a/ports/soxr/vcpkg.json +++ b/ports/soxr/vcpkg.json @@ -1,7 +1,21 @@ { "name": "soxr", - "version-string": "0.1.3", - "port-version": 4, + "version": "0.1.3", + "port-version": 5, "description": "High quality audio resampling", - "homepage": "https://sourceforge.net/projects/soxr/" + "homepage": "https://sourceforge.net/projects/soxr/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "lsr-bindings": { + "description": "Include a `libsamplerate'-like interface." + }, + "openmp": { + "description": "Include OpenMP threading." + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index 77ccf49594..aa4b943774 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6294,7 +6294,7 @@ }, "soxr": { "baseline": "0.1.3", - "port-version": 4 + "port-version": 5 }, "spaceland": { "baseline": "7.8.2", diff --git a/versions/s-/soxr.json b/versions/s-/soxr.json index f006217820..99dea5a0cf 100644 --- a/versions/s-/soxr.json +++ b/versions/s-/soxr.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0ea0e47df2ab6381e68ffae49c05c4de0a37f665", + "version": "0.1.3", + "port-version": 5 + }, { "git-tree": "5719977bf7a0fcc0ac88151327dcddda23648594", "version-string": "0.1.3",