diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2016-03-06 06:46:26 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-06 11:02:48 -0800 |
commit | 710b3615fe875cd99a78f643790201b587ffef97 (patch) | |
tree | 8cdf544c07bb6e7a67135b60479bac0a77616800 /packaging/ios/configure-for-ios.sh | |
parent | 74e6e0ed3798863ccffb39ab46dd88e67b4b460c (diff) | |
download | subsurface-710b3615fe875cd99a78f643790201b587ffef97.tar.gz |
iOS build: add various support files
It's unclear why the build fails if we don't add the sample app files as
well.
[Dirk Hohndel: refactored the patches]
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/ios/configure-for-ios.sh')
-rwxr-xr-x | packaging/ios/configure-for-ios.sh | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/packaging/ios/configure-for-ios.sh b/packaging/ios/configure-for-ios.sh deleted file mode 100755 index 1624bc391..000000000 --- a/packaging/ios/configure-for-ios.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh -set -e - -usage () { - echo "Usage: [VARIABLE...] $(basename $0) architecture" - echo "" - echo " architecture Target architecture. [armv7|armv7s|arm64|i386|x86_64]" - echo "" - echo " VARIABLEs are:" - echo " SDKVERSION Target a specific SDK version." - echo " PREFIX Custom install prefix, useful for local installs." - echo " CHOST Configure host, set if not deducable by ARCH." - echo " SDK SDK target, set if not deducable by ARCH. [iphoneos|iphonesimulator]" - echo "" - echo " CFLAGS CPPFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH" - echo "" - echo " All additional parameters are passed to the configure script." - exit 1 -} - -# Sanity checks -if [ "$#" -lt 1 ]; then - echo "Please supply an architecture name." - usage -fi - -if [ ! -x "./configure" ] ; then - echo "No configure script found." - usage -fi - -# Build architecture -export ARCH=$1 - -# Export supplied CHOST or deduce by ARCH -if [ ! -z "$CHOST" ]; then - export CHOST -else - case $ARCH in - armv7 | armv7s ) - export CHOST=arm-apple-darwin* - ;; - arm64 ) - export CHOST=aarch64-apple-darwin* - ;; - i386 | x86_64 ) - export CHOST=$ARCH-apple-darwin* - ;; - * ) - usage - ;; - esac -fi - -# Export supplied SDK or deduce by ARCH -if [ ! -z "$SDK" ]; then - export SDK -else - case $ARCH in - armv7 | armv7s | arm64 ) - export SDK=iphoneos - ;; - i386 | x86_64 ) - export SDK=iphonesimulator - ;; - * ) - usage - ;; - esac -fi - -# Export supplied SDKVERSION or use system default -if [ ! -z "$SDKVERSION" ]; then - SDKNAME=$(basename $(xcrun --sdk $SDK --show-sdk-platform-path) .platform) - export SDKVERSION - export SDKROOT=$(xcrun --sdk $SDK --show-sdk-platform-path)"/Developer/SDKs/$SDKNAME.$SDKVERSION.sdk" -else - export SDKVERSION=$(xcrun --sdk $SDK --show-sdk-version) # current version - export SDKROOT=$(xcrun --sdk $SDK --show-sdk-path) # current version -fi - -export PREFIX - -# Binaries -export CC=$(xcrun --sdk $SDK --find gcc) -export CPP=$(xcrun --sdk $SDK --find gcc)" -E" -export CXX=$(xcrun --sdk $SDK --find g++) -export LD=$(xcrun --sdk $SDK --find ld) - -# Flags -export CFLAGS="$CFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -miphoneos-version-min=$SDKVERSION" -export CPPFLAGS="$CPPFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -miphoneos-version-min=$SDKVERSION" -export CXXFLAGS="$CXXFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include" -export LDFLAGS="$LDFLAGS -arch $ARCH -isysroot $SDKROOT -L$PREFIX/lib" -export PKG_CONFIG_PATH="$PKG_CONFIG_PATH":"$SDKROOT/usr/lib/pkgconfig":"$PREFIX/lib/pkgconfig" - -# Remove script parameters -shift 1 - -# Run configure -./configure \ - --prefix="$PREFIX" \ - --host="$CHOST" \ - --enable-static \ - --disable-shared \ - $@ |