Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rubberband] add overlayed rubberband v3 #48

Merged
merged 6 commits into from
Aug 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 42 additions & 34 deletions overlay/ports/rubberband/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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
)
29 changes: 22 additions & 7 deletions overlay/ports/rubberband/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
]
}
}
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions versions/r-/rubberband.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "5a88d8114ee2e769860aae2d477053bbeeaec1eb",
"version": "3.0.0",
"port-version": 0
}
]
}