diff --git a/ports/portaudio/fix-library-can-not-be-found.patch b/ports/portaudio/fix-library-can-not-be-found.patch deleted file mode 100644 index 7ef3e581d9..0000000000 --- a/ports/portaudio/fix-library-can-not-be-found.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 122fe93..b571c38 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -360,11 +360,6 @@ ENDIF() - # embedded builds this is not an issue as they will only build the configuration - # used in the host application. - MARK_AS_ADVANCED(PA_LIBNAME_ADD_SUFFIX) --IF(MSVC AND PA_BUILD_STATIC AND PA_BUILD_SHARED AND NOT PA_LIBNAME_ADD_SUFFIX) -- MESSAGE(WARNING "Building both shared and static libraries, and avoiding the suffix _static will lead to a name conflict") -- SET(PA_LIBNAME_ADD_SUFFIX ON CACHE BOOL "Forcing use of suffix _static to avoid name conflict between static and import library" FORCE) -- MESSAGE(WARNING "PA_LIBNAME_ADD_SUFFIX was set to ON") --ENDIF() - - SET(PA_TARGETS "") - diff --git a/ports/portaudio/framework_link.patch b/ports/portaudio/framework_link.patch deleted file mode 100644 index 658ca122c2..0000000000 --- a/ports/portaudio/framework_link.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 8fe2958d3202b409f7d54f53b41fca7b225c3f0e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= -Date: Thu, 27 Jul 2023 15:06:24 +0200 -Subject: [PATCH] Don't use apsolute path when linking to macOS frameworks - ---- - CMakeLists.txt | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 87d0bb832..75aa89e7b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -261,13 +261,13 @@ ELSE() - SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_COREAUDIO_INCLUDES}) - SET(PA_SOURCES ${PA_SOURCES} ${PA_COREAUDIO_SOURCES}) - -- FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio REQUIRED) -- FIND_LIBRARY(AUDIOTOOLBOX_LIBRARY AudioToolbox REQUIRED) -- FIND_LIBRARY(AUDIOUNIT_LIBRARY AudioUnit REQUIRED) -- FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED) -- FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices REQUIRED) -- MARK_AS_ADVANCED(COREAUDIO_LIBRARY AUDIOTOOLBOX_LIBRARY AUDIOUNIT_LIBRARY COREFOUNDATION_LIBRARY CORESERVICES_LIBRARY) -- SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${COREAUDIO_LIBRARY} ${AUDIOTOOLBOX_LIBRARY} ${AUDIOUNIT_LIBRARY} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY}) -+ SET(PA_LIBRARY_DEPENDENCIES -+ ${PA_LIBRARY_DEPENDENCIES} -+ -Wl,-framework,CoreAudio -+ -Wl,-framework,AudioToolbox -+ -Wl,-framework,AudioUnit -+ -Wl,-framework,CoreFoundation -+ -Wl,-framework,CoreServices) - SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_COREAUDIO) - SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices") - ENDIF() diff --git a/ports/portaudio/jack.diff b/ports/portaudio/jack.diff new file mode 100644 index 0000000000..d7a06b27cb --- /dev/null +++ b/ports/portaudio/jack.diff @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 122fe93..8983f85 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -288,7 +288,8 @@ ELSE() + SET(PA_SOURCES ${PA_SOURCES} ${PA_JACK_SOURCES}) + SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_JACK) + SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${JACK_LIBRARIES}) +- SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -ljack") ++ SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${CMAKE_DL_LIBS}) ++ SET(PA_PKGCONFIG_REQUIRES_PRIVATE "${PA_PKGCONFIG_REQUIRES_PRIVATE} jack") + ENDIF() + + FIND_PACKAGE(ALSA) +diff --git a/cmake_support/portaudio-2.0.pc.in b/cmake_support/portaudio-2.0.pc.in +index 738803d..24b211c 100644 +--- a/cmake_support/portaudio-2.0.pc.in ++++ b/cmake_support/portaudio-2.0.pc.in +@@ -6,6 +6,7 @@ includedir=${prefix}/include + Name: PortAudio + Description: Portable audio I/O + Requires: ++Requires.private: @PA_PKGCONFIG_REQUIRES_PRIVATE@ + Version: @PA_PKGCONFIG_VERSION@ + + Libs: -L${libdir} -lportaudio @PA_PKGCONFIG_LDFLAGS@ diff --git a/ports/portaudio/portfile.cmake b/ports/portaudio/portfile.cmake index 65c5bcb04a..de9546e365 100644 --- a/ports/portaudio/portfile.cmake +++ b/ports/portaudio/portfile.cmake @@ -4,26 +4,43 @@ vcpkg_from_github( REF 147dd722548358763a8b649b3e4b41dfffbcfbb6 SHA512 0f56e5f5b004f51915f29771b8fc1fe886f1fef5d65ab5ea1db43f43c49917476b9eec14b36aa54d3e9fb4d8bdf61e68c79624d00b7e548d4c493395a758233a PATCHES - fix-library-can-not-be-found.patch - framework_link.patch + jack.diff ) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" PA_DLL_LINK_WITH_STATIC_RUNTIME) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PA_BUILD_SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PA_BUILD_STATIC) -# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided -# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src +vcpkg_list(SET options) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_list(APPEND options + -DPA_USE_ASIOSDK=OFF + -DPA_DLL_LINK_WITH_STATIC_RUNTIME=${PA_DLL_LINK_WITH_STATIC_RUNTIME} + -DPA_LIBNAME_ADD_SUFFIX=OFF + ) +elseif(VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_OSX) + vcpkg_list(APPEND options + # avoid absolute paths + -DCOREAUDIO_LIBRARY:STRING=-Wl,-framework,CoreAudio + -DAUDIOTOOLBOX_LIBRARY:STRING=-Wl,-framework,AudioToolbox + -DAUDIOUNIT_LIBRARY:STRING=-Wl,-framework,AudioUnit + -DCOREFOUNDATION_LIBRARY:STRING=-Wl,-framework,CoreFoundation + -DCORESERVICES_LIBRARY:STRING=-Wl,-framework,CoreServices + ) +else() + vcpkg_list(APPEND options + -DPA_USE_JACK=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_Jack=ON + -DPA_USE_ALSA=OFF + ) +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DPA_USE_DS=ON - -DPA_USE_WASAPI=ON - -DPA_USE_WDMKS=ON - -DPA_USE_WMME=ON - -DPA_LIBNAME_ADD_SUFFIX=OFF + ${options} -DPA_BUILD_SHARED=${PA_BUILD_SHARED} -DPA_BUILD_STATIC=${PA_BUILD_STATIC} - -DPA_DLL_LINK_WITH_STATIC_RUNTIME=OFF OPTIONS_DEBUG -DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON ) @@ -31,15 +48,12 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) vcpkg_copy_pdbs() - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") -endif() - -# Handle copyright -file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) - vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/share/doc" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/ports/portaudio/vcpkg.json b/ports/portaudio/vcpkg.json index 8ed40572a4..b55b7d6514 100644 --- a/ports/portaudio/vcpkg.json +++ b/ports/portaudio/vcpkg.json @@ -1,11 +1,16 @@ { "name": "portaudio", "version": "19.7", - "port-version": 5, + "port-version": 6, "description": "PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.", "homepage": "http://www.portaudio.com", + "license": "MIT", "supports": "!uwp", "dependencies": [ + { + "name": "jack2", + "platform": "!ios & !osx & !windows" + }, { "name": "vcpkg-cmake", "host": true diff --git a/versions/baseline.json b/versions/baseline.json index 074eb6f516..566a73e4e9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7178,7 +7178,7 @@ }, "portaudio": { "baseline": "19.7", - "port-version": 5 + "port-version": 6 }, "portmidi": { "baseline": "2.0.4", diff --git a/versions/p-/portaudio.json b/versions/p-/portaudio.json index 557e48435d..51ed75b464 100644 --- a/versions/p-/portaudio.json +++ b/versions/p-/portaudio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b355b107dec4037485783b2f1ae56e4e991220a3", + "version": "19.7", + "port-version": 6 + }, { "git-tree": "34d770f3357878c7b7668acf63e7a3095f1b5afc", "version": "19.7",