Przeglądaj źródła

patches: fix compilation of third party libraries deploying cmake when using a vanilla Mavericks installation

Patch is pending on vlc-devel
Felix Paul Kühne 11 lat temu
rodzic
commit
b5a7e66c17

+ 65 - 0
MobileVLCKit/patches/0024-contrib-fix-compilation-of-libraries-for-iOS-which-d.patch

@@ -0,0 +1,65 @@
+From 41e1c327a94a8f87131f330639578d10d11eed6d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Sat, 30 Nov 2013 20:05:58 +0100
+Subject: [PATCH 24/24] contrib: fix compilation of libraries for iOS which
+ deploy cmake
+
+---
+ contrib/bootstrap    | 19 +++++++++++++++++++
+ contrib/src/main.mak |  3 +++
+ 2 files changed, 22 insertions(+)
+
+diff --git a/contrib/bootstrap b/contrib/bootstrap
+index cc170a2..0604d75 100755
+--- a/contrib/bootstrap
++++ b/contrib/bootstrap
+@@ -151,6 +151,24 @@ add_make_enabled()
+ 	done
+ }
+ 
++check_ios_sdk()
++{
++   if test -z "$SDKROOT"
++   then
++      SDKROOT=`xcode-select -print-path`/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}${SDK_VERSION}.sdk
++      echo "SDKROOT not specified, assuming $SDKROOT"
++   else
++      SDKROOT="$SDKROOT"
++      fi
++
++   if [ ! -d "${SDKROOT}" ]
++   then
++      echo "*** ${SDKROOT} does not exist, please install required SDK, or set SDKROOT manually. ***"
++      exit 1
++   fi
++   add_make "IOS_SDK=${SDKROOT}"
++}
++
+ check_macosx_sdk()
+ {
+    [ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.7" && OSX_VERSION=10.7
+@@ -206,6 +224,7 @@ case "${OS}" in
+ 			check_macosx_sdk
+ 			add_make_enabled "HAVE_MACOSX" "HAVE_DARWIN_OS" "HAVE_BSD"
+ 		else
++			check_ios_sdk
+  			add_make_enabled "HAVE_IOS" "HAVE_DARWIN_OS" "HAVE_BSD" "HAVE_NEON"
+  			if [ "$ARCH" != "arm64" ]; then
+  				add_make_enabled "HAVE_ARMV7A"
+diff --git a/contrib/src/main.mak b/contrib/src/main.mak
+index 4e568ec..9562165 100644
+--- a/contrib/src/main.mak
++++ b/contrib/src/main.mak
+@@ -397,6 +397,9 @@ ifdef HAVE_DARWIN_OS
+ 	echo "set(CMAKE_LD_FLAGS $(LDFLAGS))" >> $@
+ ifdef HAVE_IOS
+ 	echo "set(CMAKE_AR ar CACHE FILEPATH "Archiver")" >> $@
++	echo "set(CMAKE_OSX_SYSROOT $(IOS_SDK))" >> $@
++else
++	echo "set(CMAKE_OSX_SYSROOT $(MACOSX_SDK))" >> $@
+ endif
+ endif
+ ifdef HAVE_CROSS_COMPILE
+-- 
+1.8.3.4 (Apple Git-47)
+