diff options
Diffstat (limited to 'vcpkg/ports/soxr')
| -rw-r--r-- | vcpkg/ports/soxr/001_initialize-resampler.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/soxr/002_disable_warning.patch | 12 | ||||
| -rw-r--r-- | vcpkg/ports/soxr/003_detect_arm.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/soxr/portfile.cmake | 40 | ||||
| -rw-r--r-- | vcpkg/ports/soxr/vcpkg.json | 21 |
5 files changed, 99 insertions, 0 deletions
diff --git a/vcpkg/ports/soxr/001_initialize-resampler.patch b/vcpkg/ports/soxr/001_initialize-resampler.patch new file mode 100644 index 0000000..6be5f29 --- /dev/null +++ b/vcpkg/ports/soxr/001_initialize-resampler.patch @@ -0,0 +1,13 @@ +diff --git a/src/soxr.c b/src/soxr.c
+index c2861ac..c95cfd4 100644
+--- a/src/soxr.c
++++ b/src/soxr.c
+@@ -815,7 +815,7 @@ soxr_error_t soxr_oneshot(
+ soxr_quality_spec_t const * q_spec,
+ soxr_runtime_spec_t const * runtime_spec)
+ {
+- soxr_t resampler;
++ soxr_t resampler = NULL;
+ soxr_error_t error = q_spec? q_spec->e : 0;
+ if (!error) {
+ soxr_quality_spec_t q_spec1;
diff --git a/vcpkg/ports/soxr/002_disable_warning.patch b/vcpkg/ports/soxr/002_disable_warning.patch new file mode 100644 index 0000000..fc85501 --- /dev/null +++ b/vcpkg/ports/soxr/002_disable_warning.patch @@ -0,0 +1,12 @@ +diff --git a/src/pffft.c b/src/pffft.c
+index 46c841e..0686bef 100644
+--- a/src/pffft.c
++++ b/src/pffft.c
+@@ -182,7 +182,6 @@ typedef float32x4_t v4sf;
+ # define VALIGNED(ptr) ((((long)(ptr)) & 0x3) == 0)
+ #else
+ # if !defined(PFFFT_SIMD_DISABLE)
+-# warning "building with simd disabled !\n";
+ # define PFFFT_SIMD_DISABLE /* fallback to scalar code */
+ # endif
+ #endif
diff --git a/vcpkg/ports/soxr/003_detect_arm.patch b/vcpkg/ports/soxr/003_detect_arm.patch new file mode 100644 index 0000000..90d3fd2 --- /dev/null +++ b/vcpkg/ports/soxr/003_detect_arm.patch @@ -0,0 +1,13 @@ +diff --git a/src/pffft.c b/src/pffft.c +index 0686bef..e4cb094 100644 +--- a/src/pffft.c ++++ b/src/pffft.c +@@ -157,7 +157,7 @@ typedef __m128 v4sf; + /* + ARM NEON support macros + */ +-#elif !defined(PFFFT_SIMD_DISABLE) && defined(__arm__) ++#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__arm__) || defined(_M_ARM) || defined(__aarch64__)) + # include <arm_neon.h> + typedef float32x4_t v4sf; + # define SIMD_SZ 4 diff --git a/vcpkg/ports/soxr/portfile.cmake b/vcpkg/ports/soxr/portfile.cmake new file mode 100644 index 0000000..e29f253 --- /dev/null +++ b/vcpkg/ports/soxr/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_from_sourceforge(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO soxr
+ FILENAME "soxr-0.1.3-Source.tar.xz"
+ SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8
+ PATCHES
+ 001_initialize-resampler.patch
+ 002_disable_warning.patch
+ 003_detect_arm.patch
+)
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ openmp WITH_OPENMP
+ lsr-bindings WITH_LSR_BINDINGS
+)
+
+string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" BUILD_SHARED_RUNTIME)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_TESTS=OFF
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_SHARED_RUNTIME=${BUILD_SHARED_RUNTIME}
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibAVUtil=TRUE
+ ${FEATURE_OPTIONS}
+)
+
+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")
+
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/soxr/vcpkg.json b/vcpkg/ports/soxr/vcpkg.json new file mode 100644 index 0000000..a2b8a91 --- /dev/null +++ b/vcpkg/ports/soxr/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "soxr", + "version": "0.1.3", + "port-version": 8, + "description": "High quality audio resampling", + "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." + } + } +} |