[vlc-devel] [PATCH 3/3] contrib: vpx: add patch to use macOS SDK on macOS aarch64

Marvin Scholz epirat07 at gmail.com
Mon Aug 10 19:04:12 CEST 2020


---
 contrib/src/vpx/libvpx-darwin-aarch64.patch | 20 ++++++++++++++++++++
 contrib/src/vpx/rules.mak                   |  5 +++++
 2 files changed, 25 insertions(+)
 create mode 100644 contrib/src/vpx/libvpx-darwin-aarch64.patch

diff --git a/contrib/src/vpx/libvpx-darwin-aarch64.patch b/contrib/src/vpx/libvpx-darwin-aarch64.patch
new file mode 100644
index 00000000000..b7e3efff568
--- /dev/null
+++ b/contrib/src/vpx/libvpx-darwin-aarch64.patch
@@ -0,0 +1,20 @@
+--- ./build/make/configure.sh.original  2020-08-10 15:46:20.000000000 +0200
++++ ./build/make/configure.sh   2020-08-10 15:54:53.000000000 +0200
+@@ -996,7 +996,7 @@ EOF
+ 
+         darwin*)
+           if ! enabled external_build; then
+-            XCRUN_FIND="xcrun --sdk iphoneos --find"
++            XCRUN_FIND="xcrun --find"
+             CXX="$(${XCRUN_FIND} clang++)"
+             CC="$(${XCRUN_FIND} clang)"
+             AR="$(${XCRUN_FIND} ar)"
+@@ -1015,7 +1015,7 @@ EOF
+             add_cflags -arch ${tgt_isa}
+             add_ldflags -arch ${tgt_isa}
+ 
+-            alt_libc="$(show_darwin_sdk_path iphoneos)"
++            alt_libc="$(show_darwin_sdk_path macosx)"
+             if [ -d "${alt_libc}" ]; then
+               add_cflags -isysroot ${alt_libc}
+             fi
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index 352a8625c0f..0f7e50dcdd4 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -20,6 +20,11 @@ ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/vpx/libvpx-android.patch
 	cp "${ANDROID_NDK}"/sources/android/cpufeatures/cpu-features.c $(UNPACK_DIR)/vpx_ports
 	cp "${ANDROID_NDK}"/sources/android/cpufeatures/cpu-features.h $(UNPACK_DIR)
+endif
+ifdef HAVE_MACOSX
+ifeq ($(ARCH),aarch64)
+	$(APPLY) $(SRC)/vpx/libvpx-darwin-aarch64.patch
+endif
 endif
 	# Disable automatic addition of -fembed-bitcode for iOS
 	# as it is enabled through --extra-cflags if necessary.
-- 
2.24.3 (Apple Git-128)



More information about the vlc-devel mailing list