From 34a9432e2ba94bb4aa9bbbeb2a92aa3c0b1717a0 Mon Sep 17 00:00:00 2001 From: evpobr Date: Fri, 22 Jan 2021 23:29:41 +0500 Subject: [libsamplerate] Upgrade to 0.2.0 (#15797) * [libsamplerate] Upgrade to 0.2.0 * Add missiong OPTIONS * Use share/${PORT} instead of share/libsamplerate * Remove SYSTEM_LIBRARIES m argument Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update version * Update version Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: Jonliu1993 <13720414433@163.com> --- ports/libsamplerate/CMakeLists.txt | 14 -------- ports/libsamplerate/Use-the-lrintf-intrinsic.patch | 39 ---------------------- ports/libsamplerate/portfile.cmake | 19 ++++++----- ports/libsamplerate/vcpkg.json | 5 ++- versions/baseline.json | 4 +-- versions/l-/libsamplerate.json | 5 +++ 6 files changed, 20 insertions(+), 66 deletions(-) delete mode 100644 ports/libsamplerate/CMakeLists.txt delete mode 100644 ports/libsamplerate/Use-the-lrintf-intrinsic.patch diff --git a/ports/libsamplerate/CMakeLists.txt b/ports/libsamplerate/CMakeLists.txt deleted file mode 100644 index 44ba2277a..000000000 --- a/ports/libsamplerate/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -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/Use-the-lrintf-intrinsic.patch b/ports/libsamplerate/Use-the-lrintf-intrinsic.patch deleted file mode 100644 index cf69b0d46..000000000 --- a/ports/libsamplerate/Use-the-lrintf-intrinsic.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/float_cast.h b/src/float_cast.h -index 0318427..8499e69 100644 ---- a/src/float_cast.h -+++ b/src/float_cast.h -@@ -117,6 +117,9 @@ - ** most likely both WIN32 and WIN64 will be defined in 64-bit case. - */ - -+/* MSVC pre 16.8 do not have lrintf */ -+#if defined(_MSC_VER) && _MSC_VER < 1928 -+ - #include - - /* Win64 doesn't seem to have these functions, nor inline assembly. -@@ -136,12 +139,16 @@ - { - return _mm_cvtss_si32(_mm_load_ss(&flt)); - } -+#endif - - #elif (defined (WIN32) || defined (_WIN32)) - - #undef HAVE_LRINT_REPLACEMENT - #define HAVE_LRINT_REPLACEMENT 1 - -+/* MSVC pre 16.8 do not have lrintf */ -+#if defined(_MSC_VER) && _MSC_VER < 1928 -+ - #include - - /* -@@ -172,6 +179,7 @@ - - return intgr ; - } -+#endif - - #elif (defined (__MWERKS__) && defined (macintosh)) - diff --git a/ports/libsamplerate/portfile.cmake b/ports/libsamplerate/portfile.cmake index 25a0d6a3b..1085ef269 100644 --- a/ports/libsamplerate/portfile.cmake +++ b/ports/libsamplerate/portfile.cmake @@ -1,24 +1,27 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libsndfile/libsamplerate - REF f6730d03c3e7660bb6ecad8816f1b09c5825142a # v0.1.9 - SHA512 6a349c9144d024212fc78dc0d9e39bdc1a43abaf590fcfbf84396af22834545962d5ef10176b48b21fcae2ce62d12277b682059383805d059f4dd2b9f6708478 + REF 0.2.0 + SHA512 6a12506ad391a557fcc354c7bb5767ae71349da26bf31753b806a36449cfc879ef97e4d25adab5722a9540ec1539203c6155b4581e42bdb8b6708dca1f089d11 HEAD_REF master - PATCHES Use-the-lrintf-intrinsic.patch ) -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 + SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DLIBSAMPLERATE_EXAMPLES=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SampleRate TARGET_PATH share/SampleRate) +vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsamplerate RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/libsamplerate/vcpkg.json b/ports/libsamplerate/vcpkg.json index 295d4ef5e..6b4bd48fe 100644 --- a/ports/libsamplerate/vcpkg.json +++ b/ports/libsamplerate/vcpkg.json @@ -1,7 +1,6 @@ { "name": "libsamplerate", - "version-string": "0.1.9.0", - "port-version": 3, + "version-string": "0.2.0", "description": "Sample Rate Converter for audio", - "homepage": "https://www.mega-nerd.com/SRC" + "homepage": "http://libsndfile.github.io/libsamplerate/" } diff --git a/versions/baseline.json b/versions/baseline.json index a932781ef..4ed65a246 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3289,8 +3289,8 @@ "port-version": 0 }, "libsamplerate": { - "baseline": "0.1.9.0", - "port-version": 3 + "baseline": "0.2.0", + "port-version": 0 }, "libsass": { "baseline": "3.6.4", diff --git a/versions/l-/libsamplerate.json b/versions/l-/libsamplerate.json index 2456512f6..09d9618d7 100644 --- a/versions/l-/libsamplerate.json +++ b/versions/l-/libsamplerate.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5247f6ff1ca88bae029dc84a18a5a6333e561a85", + "version-string": "0.2.0", + "port-version": 0 + }, { "git-tree": "ec1fec464998f298385bf9afe0ac63cdbc8adda2", "version-string": "0.1.9.0", -- cgit v1.2.3