diff --git a/overlay/ports/rubberband/portfile.cmake b/overlay/ports/rubberband/portfile.cmake index 80be439cc48dda..f3148bf8372b3f 100644 --- a/overlay/ports/rubberband/portfile.cmake +++ b/overlay/ports/rubberband/portfile.cmake @@ -1,40 +1,48 @@ -vcpkg_from_git( - OUT_SOURCE_PATH SOURCE_PATH - URL https://github.com/be-ing/rubberband.git - REF 3abe9d2ce8ada8b1d087cfc9d6f2f5199c727e14 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO breakfastquay/rubberband + REF v3.0.0 + SHA512 384985e58a3fc5d9646428678ee6bcef2d232abed6d86b623302a78a4bf6e59e2fd5f5939e28bb988e82aa6f424fd1510e8e014a4ad1c96efe0010b61651a133 + HEAD_REF default ) -# Find cross-compiler prefix -if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) - include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") -endif() -if(CMAKE_C_COMPILER) - vcpkg_execute_required_process( - COMMAND ${CMAKE_C_COMPILER} -dumpmachine - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} - LOGNAME dumpmachine-${TARGET_TRIPLET} - ) - file(READ ${CURRENT_BUILDTREES_DIR}/dumpmachine-${TARGET_TRIPLET}-out.log RUBBERBAND_HOST) - string(REPLACE "\n" "" RUBBERBAND_HOST "${RUBBERBAND_HOST}") - message(STATUS "Cross-compiling with ${CMAKE_C_COMPILER}") - message(STATUS "Detected autoconf triplet --host=${RUBBERBAND_HOST}") - message(STATUS "Options ${RUBBERBAND_OPTIONS}") - set(RUBBERBAND_OPTIONS - --host=${RUBBERBAND_HOST} - ${RUBBERBAND_OPTIONS} - ) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS ${RUBBERBAND_OPTIONS} +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dfft=fftw # 'auto', 'builtin', 'kissfft', 'fftw', 'vdsp', 'ipp' 'FFT library to use. The default (auto) will use vDSP if available, the builtin implementation otherwise.') + -Dresampler=libsamplerate # 'auto', 'builtin', 'libsamplerate', 'speex', 'ipp' 'Resampler library to use. The default (auto) simply uses the builtin implementation.' + -Dipp_path= # 'Path to Intel IPP libraries, if selected for any of the other options.' + -Dextra_include_dirs= # 'Additional local header directories to search for dependencies.' + -Dextra_lib_dirs= # 'Additional local library directories to search for dependencies.' ) -vcpkg_install_cmake() +vcpkg_install_meson() + +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rubberband) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/rubberband RENAME copyright) -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/rubberband-program${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + # Rubberband uses a different executable name when compiled with msvc + # Just looking for that file is faster than detecting msvc builds + set(RUBBERBAND_PROGRAM_NAME rubberband-program) +else() + set(RUBBERBAND_PROGRAM_NAME rubberband) +endif() + +# Features cli and lv2 are build whenever suficient dependencies are installed, +# Remove them when not enabled. +if("cli" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES "${RUBBERBAND_PROGRAM_NAME}" AUTO_CLEAN) +else() + vcpkg_clean_executables_in_bin(FILE_NAMES "${RUBBERBAND_PROGRAM_NAME}") +endif() + +# lv2 feature is not supported yet because vcpkg can't isntall to +# %APPDATA%\LV2 or %COMMONPROGRAMFILES%\LV2 but also complains about dlls in "${CURRENT_PACKAGES_DIR}/lib/lv2" +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/lv2" "${CURRENT_PACKAGES_DIR}/debug/lib/lv2") + +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/overlay/ports/rubberband/vcpkg.json b/overlay/ports/rubberband/vcpkg.json index b0c6dcc3b9ce8f..1f3d905bad04e3 100644 --- a/overlay/ports/rubberband/vcpkg.json +++ b/overlay/ports/rubberband/vcpkg.json @@ -1,15 +1,30 @@ { "name": "rubberband", - "version-string": "1.9.0", - "port-version": 2, - "description": "A high quality software library for audio time-stretching and pitch-shifting", - "homepage": "https://breakfastquay.com/rubberband/", + "version": "3.0.0", + "description": "A high quality software library for audio time-stretching and pitch-shifting.", + "homepage": "https://www.breakfastquay.com/rubberband/", + "license": "GPL-2.0-or-later", + "supports": "!uwp & !(windows & static)", "dependencies": [ "fftw3", "libsamplerate", { - "name": "libsndfile", - "default-features": false + "name": "vcpkg-tool-meson", + "host": true } - ] + ], + "features": { + "cli": { + "description": "Build the command-line utility", + "dependencies": [ + { + "name": "libsndfile", + "default-features": false, + "features": [ + "external-libs" + ] + } + ] + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index df8f9b99b4c61b..b13db329821476 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6304,6 +6304,10 @@ "baseline": "0.9.6", "port-version": 4 }, + "rubberband": { + "baseline": "3.0.0", + "port-version": 0 + }, "rxcpp": { "baseline": "4.1.0", "port-version": 2 diff --git a/versions/r-/rubberband.json b/versions/r-/rubberband.json new file mode 100644 index 00000000000000..1f6786ebe071a8 --- /dev/null +++ b/versions/r-/rubberband.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "5a88d8114ee2e769860aae2d477053bbeeaec1eb", + "version": "3.0.0", + "port-version": 0 + } + ] +}