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

[portaudio] Add patch that fixes framework linking #32882

Merged
merged 1 commit into from
Aug 2, 2023
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
34 changes: 34 additions & 0 deletions ports/portaudio/framework_link.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 8fe2958d3202b409f7d54f53b41fca7b225c3f0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= <daschuer@mixxx.org>
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()
1 change: 1 addition & 0 deletions ports/portaudio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ vcpkg_from_github(
SHA512 0f56e5f5b004f51915f29771b8fc1fe886f1fef5d65ab5ea1db43f43c49917476b9eec14b36aa54d3e9fb4d8bdf61e68c79624d00b7e548d4c493395a758233a
PATCHES
fix-library-can-not-be-found.patch
framework_link.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PA_BUILD_SHARED)
Expand Down
2 changes: 1 addition & 1 deletion ports/portaudio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "portaudio",
"version": "19.7",
"port-version": 4,
"port-version": 5,
"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",
"supports": "!uwp",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6462,7 +6462,7 @@
},
"portaudio": {
"baseline": "19.7",
"port-version": 4
"port-version": 5
},
"portmidi": {
"baseline": "2.0.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/portaudio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "34d770f3357878c7b7668acf63e7a3095f1b5afc",
"version": "19.7",
"port-version": 5
},
{
"git-tree": "25fb6802e88b978f349df2e6af0ecfadb85e9e9b",
"version": "19.7",
Expand Down