aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclvn <clvn@users.noreply.github.com>2018-01-04 08:04:54 +0100
committerclvn <clvn@users.noreply.github.com>2018-01-04 08:04:54 +0100
commit11aba184957066a4d14d64bb047155c5b6c11b6c (patch)
tree34e75006b5b6f5fd59fc286dc9b563920036c0f4
parent273f35372c7960dbbcaf78ffcf02b36470e77b16 (diff)
downloadvcpkg-11aba184957066a4d14d64bb047155c5b6c11b6c.tar.gz
vcpkg-11aba184957066a4d14d64bb047155c5b6c11b6c.zip
[libsamplerate] Initial port
-rw-r--r--ports/libsamplerate/CMakeLists.txt14
-rw-r--r--ports/libsamplerate/CONTROL3
-rw-r--r--ports/libsamplerate/portfile.cmake26
3 files changed, 43 insertions, 0 deletions
diff --git a/ports/libsamplerate/CMakeLists.txt b/ports/libsamplerate/CMakeLists.txt
new file mode 100644
index 000000000..44ba2277a
--- /dev/null
+++ b/ports/libsamplerate/CMakeLists.txt
@@ -0,0 +1,14 @@
+add_library(libsamplerate-0
+ samplerate.c
+ src_sinc.c
+ src_zoh.c
+ src_linear.c
+ ../Win32/libsamplerate-0.def
+)
+
+install(TARGETS libsamplerate-0
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+install(FILES samplerate.h DESTINATION include)
diff --git a/ports/libsamplerate/CONTROL b/ports/libsamplerate/CONTROL
new file mode 100644
index 000000000..d8a8f5f4e
--- /dev/null
+++ b/ports/libsamplerate/CONTROL
@@ -0,0 +1,3 @@
+Source: libsamplerate
+Version: 0.1.9.0
+Description: Sample Rate Converter for audio
diff --git a/ports/libsamplerate/portfile.cmake b/ports/libsamplerate/portfile.cmake
new file mode 100644
index 000000000..87712f6d2
--- /dev/null
+++ b/ports/libsamplerate/portfile.cmake
@@ -0,0 +1,26 @@
+include(vcpkg_common_functions)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsamplerate-0.1.9)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz"
+ FILENAME "libsamplerate-0.1.9.tar.gz"
+ SHA512 78596657963cbf06785e3e6e1190b093df71da52ca340e75bd8246a962cd79dd1c90fa5527c607cebcb296e2c1ee605015278b274e3b768f2f3fbeb0eadfb728
+)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src)
+file(COPY ${SOURCE_PATH}/Win32/config.h DESTINATION ${SOURCE_PATH}/src)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}/src
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsamplerate RENAME copyright)
+
+vcpkg_copy_pdbs()