aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Withaar <thijs.withaar@gmail.com>2019-05-16 18:30:43 +0200
committerThijs Withaar <thijs.withaar@gmail.com>2019-06-27 18:41:28 +0200
commitf362309178c05c3acde238f2eb2dbc816a195704 (patch)
tree2073d6e09a93e2a9e6c71243fcb0a3841224351e
parenta6fe726ebb7fa39023342a91803d9c5de51d7c54 (diff)
downloadvcpkg-f362309178c05c3acde238f2eb2dbc816a195704.tar.gz
vcpkg-f362309178c05c3acde238f2eb2dbc816a195704.zip
[soxr] initial commit
-rw-r--r--ports/soxr/CONTROL3
-rw-r--r--ports/soxr/disable_cmake_settings.patch25
-rw-r--r--ports/soxr/portfile.cmake51
3 files changed, 79 insertions, 0 deletions
diff --git a/ports/soxr/CONTROL b/ports/soxr/CONTROL
new file mode 100644
index 000000000..ebf120c06
--- /dev/null
+++ b/ports/soxr/CONTROL
@@ -0,0 +1,3 @@
+Source: soxr
+Version: 0.1.3.
+Description: High quality audio resampling
diff --git a/ports/soxr/disable_cmake_settings.patch b/ports/soxr/disable_cmake_settings.patch
new file mode 100644
index 000000000..192e7bf54
--- /dev/null
+++ b/ports/soxr/disable_cmake_settings.patch
@@ -0,0 +1,25 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -40,10 +40,10 @@
+ "Build type, one of: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
+ endif ()
+
+-option (BUILD_TESTS "Build sanity-tests." ON)
++option (BUILD_TESTS "Build sanity-tests." OFF)
+ option (BUILD_EXAMPLES "Build examples." OFF)
+-option (WITH_OPENMP "Include OpenMP threading." ON)
+-option (WITH_LSR_BINDINGS "Include a `libsamplerate'-like interface." ON)
++option (WITH_OPENMP "Include OpenMP threading." OFF)
++option (WITH_LSR_BINDINGS "Include a `libsamplerate'-like interface." OFF)
+
+ cmake_dependent_option (BUILD_SHARED_LIBS
+ "Build shared (dynamic) soxr libraries." ON
+@@ -75,7 +75,7 @@
+ option (WITH_HI_PREC_CLOCK "Enable high-precision time-base." ON)
+ option (WITH_FLOAT_STD_PREC_CLOCK
+ "Use floating-point for standard-precision time-base." OFF)
+-option (WITH_DEV_TRACE "Enable developer trace capability." ON)
++option (WITH_DEV_TRACE "Enable developer trace capability." OFF)
+ option (WITH_DEV_GPROF "Enable developer grpof output." OFF)
+ mark_as_advanced (WITH_HI_PREC_CLOCK WITH_FLOAT_STD_PREC_CLOCK
+ WITH_DEV_TRACE WITH_DEV_GPROF)
diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake
new file mode 100644
index 000000000..c7c624caa
--- /dev/null
+++ b/ports/soxr/portfile.cmake
@@ -0,0 +1,51 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://netcologne.dl.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz"
+ FILENAME "soxr-0.1.3-Source.tar.xz"
+ SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag).
+ # REF 1.0.0
+ # (Optional) Read the docs for how to generate patches at:
+ # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md
+ # PATCHES
+ # 001_port_fixes.patch
+ # 002_more_port_fixes.patch
+ disable_cmake_settings.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+
+vcpkg_install_cmake()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soxr RENAME copyright)
+
+# Post-build test for cmake libraries
+# vcpkg_test_cmake(PACKAGE_NAME soxr)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)