[vlc-commits] extras/ios: modernize build script

Felix Paul Kühne git at videolan.org
Thu Jan 23 13:21:49 CET 2014


vlc/vlc-2.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Jan 23 13:21:13 2014 +0100| [2e2efcd67bcdb78cff055da99162600e447c87a9] | committer: Felix Paul Kühne

extras/ios: modernize build script

Manual backport of 0eb37e84935763d7055eb08a3d28fb1b5231ae0a

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=2e2efcd67bcdb78cff055da99162600e447c87a9
---

 extras/package/ios/build.sh |   37 ++++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh
index 1f848f9..ae65a4b 100755
--- a/extras/package/ios/build.sh
+++ b/extras/package/ios/build.sh
@@ -3,7 +3,7 @@ set -e
 
 PLATFORM=OS
 VERBOSE=no
-SDK_VERSION=6.1
+SDK_VERSION=7.0
 SDK_MIN=5.1
 ARCH=armv7
 
@@ -76,8 +76,7 @@ fi
 info "Building libvlc for iOS"
 
 if [ "$PLATFORM" = "Simulator" ]; then
-    TARGET="i686-apple-darwin11"
-    ARCH="i386"
+    TARGET="${ARCH}-apple-darwin11"
     OPTIM="-O3 -g"
 else
     TARGET="arm-apple-darwin11"
@@ -110,9 +109,6 @@ PREFIX="${VLCROOT}/install-ios-${PLATFORM}/${ARCH}"
 
 export PATH="${VLCROOT}/extras/tools/build/bin:${VLCROOT}/contrib/${TARGET}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
 
-# contains gas-processor.pl
-export PATH=$PATH:${VLCROOT}/extras/package/ios/resources
-
 info "Building tools"
 spushd "${VLCROOT}/extras/tools"
 ./bootstrap
@@ -135,7 +131,10 @@ export PLATFORM=$PLATFORM
 export SDK_VERSION=$SDK_VERSION
 
 if [ "$PLATFORM" = "OS" ]; then
-export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -mcpu=cortex-a8 -miphoneos-version-min=${SDK_MIN} ${OPTIM}"
+export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -miphoneos-version-min=${SDK_MIN} ${OPTIM}"
+if [ "$ARCH" != "arm64" ]; then
+export CFLAGS="${CFLAGS} -mcpu=cortex-a8"
+fi
 else
 export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -miphoneos-version-min=${SDK_MIN} ${OPTIM}"
 fi
@@ -156,7 +155,10 @@ fi
 export LDFLAGS="-L${SDKROOT}/usr/lib -arch ${ARCH} -isysroot ${SDKROOT} -miphoneos-version-min=${SDK_MIN}"
 
 if [ "$PLATFORM" = "OS" ]; then
-    EXTRA_CFLAGS="-arch ${ARCH} -mcpu=cortex-a8"
+    EXTRA_CFLAGS="-arch ${ARCH}"
+if [ "$ARCH" != "arm64" ]; then
+    EXTRA_CFLAGS+=" -mcpu=cortex-a8"
+fi
     EXTRA_LDFLAGS="-arch ${ARCH}"
 else
     EXTRA_CFLAGS="-arch ${ARCH}"
@@ -175,15 +177,18 @@ mkdir -p "${VLCROOT}/contrib/iPhone${PLATFORM}-${ARCH}"
 cd "${VLCROOT}/contrib/iPhone${PLATFORM}-${ARCH}"
 
 if [ "$PLATFORM" = "OS" ]; then
-      export AS="gas-preprocessor.pl ${CC}"
-      export ASCPP="gas-preprocessor.pl ${CC}"
-      export CCAS="gas-preprocessor.pl ${CC}"
+    export AS="gas-preprocessor.pl ${CC}"
+    export ASCPP="gas-preprocessor.pl ${CC}"
+    export CCAS="gas-preprocessor.pl ${CC}"
+    if [ "$ARCH" = "arm64" ]; then
+        export GASPP_FIX_XCODE5=1
+    fi
 else
-  export AS="xcrun as"
-  export ASCPP="xcrun as"
+    export AS="xcrun as"
+    export ASCPP="xcrun as"
 fi
 
-../bootstrap --host=${TARGET} --build="i686-apple-darwin10" --prefix=${VLCROOT}/contrib/${TARGET}-${ARCH} --disable-gpl \
+../bootstrap --host=x86_64-apple-darwin11 --build=${TARGET} --prefix=${VLCROOT}/contrib/${TARGET}-${ARCH} --disable-gpl \
     --disable-disc --disable-sout \
     --disable-sdl \
     --disable-SDL_image \
@@ -213,8 +218,7 @@ fi
     --disable-fontconfig \
     --disable-gpg-error \
     --disable-lua \
-    --enable-taglib \
-    --disable-gnutls > ${out}
+    --enable-taglib > ${out}
 
 echo "EXTRA_CFLAGS += ${EXTRA_CFLAGS}" >> config.mak
 echo "EXTRA_LDFLAGS += ${EXTRA_LDFLAGS}" >> config.mak
@@ -262,7 +266,6 @@ ${VLCROOT}/configure \
     --disable-macosx-avfoundation \
     --enable-audioqueue \
     --enable-ios-audio \
-    --enable-ios-vout \
     --enable-ios-vout2 \
     --disable-shared \
     --enable-macosx-quartztext \



More information about the vlc-commits mailing list