summary refs log tree commit diff
path: root/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/ios-cross-compile/9.2_builder.sh')
-rw-r--r--pkgs/development/compilers/ios-cross-compile/9.2_builder.sh78
1 files changed, 39 insertions, 39 deletions
diff --git a/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh b/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh
index 4604b1fdea7..68ba3ed3a92 100644
--- a/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh
+++ b/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh
@@ -8,43 +8,43 @@ function extract
 
     case "$1" in
         *.tar.xz)
-	    xz -dc $1 | tar "$tarflags" - ;;
-	*)
-	    printf "Make sure you give a iPhoneOS9.2.sdk.tar.xz file \n" ;;
+        xz -dc $1 | tar "$tarflags" - ;;
+    *)
+        printf "Make sure you give a iPhoneOS9.2.sdk.tar.xz file \n" ;;
     esac
 }
 
 function verify_arch {
     case "$1" in
-	# Our good arches.
-	armv7|arm64) ;;
-	*)
-	    local
-	    acc="armv7 | arm64"
-	    error_message=$(
-		printf '%s is not an acceptable arch. Try one of %s' "$1" "$acc"
-			 )
-	    printf "$error_message\n"
-	    exit
+    # Our good arches.
+    armv7|arm64) ;;
+    *)
+        local
+        acc="armv7 | arm64"
+        error_message=$(
+        printf '%s is not an acceptable arch. Try one of %s' "$1" "$acc"
+             )
+        printf "$error_message\n"
+        exit
     esac
 }
 
 function verify_sdk_version {
     sdk_version=$(basename "$1" | grep -P -o "[0-9].[0-9]+")
     case "$sdk_version" in
-	# Make sure the SDK is correct.
-	[5-9].[0-9]) ;;
-	*)
-	    printf 'No iPhone SDK version in file name\n'
+    # Make sure the SDK is correct.
+    [5-9].[0-9]) ;;
+    *)
+        printf 'No iPhone SDK version in file name\n'
     esac
 }
 
 function do_build {
 
     if [ $# -lt 2 ]; then
-	printf "usage: $0 iPhoneOS.sdk.tar* <target cpu>\n" 1>&2
-	printf "i.e. $0 /path/to/iPhoneOS.sdk.tar.xz armv7\n" 1>&2
-	exit 1
+    printf "usage: $0 iPhoneOS.sdk.tar* <target cpu>\n" 1>&2
+    printf "i.e. $0 /path/to/iPhoneOS.sdk.tar.xz armv7\n" 1>&2
+    exit 1
     fi
 
     mkdir -p $out
@@ -54,7 +54,7 @@ function do_build {
     pushd "$cctools_port"/usage_examples/ios_toolchain &> /dev/null
 
     export LC_ALL=C
-    
+
     local
     triple='%s-apple-darwin11'
     target_dir="$PWD/target"
@@ -75,12 +75,12 @@ function do_build {
     extract "$1"
 
     local sys_lib=$(
-    	find $sdk_dir -name libSystem.dylib -o -name libSystem.tbd | head -n1
-    	  )
+        find $sdk_dir -name libSystem.dylib -o -name libSystem.tbd | head -n1
+          )
 
     if [ -z "$sys_lib" ]; then
-    	printf "SDK should contain libSystem{.dylib,.tbd}\n" 1>&2
-    	exit 1
+        printf "SDK should contain libSystem{.dylib,.tbd}\n" 1>&2
+        exit 1
     fi
 
     local sys_root=$(readlink -f "$(dirname $sys_lib)/../..")
@@ -96,18 +96,18 @@ function do_build {
     printf "int main(){return 0;}" | clang -xc -O2 -o "$target_dir"/bin/dsymutil -
 
     clang -O2 -std=c99 $alt_wrapper \
-    	  -DTARGET_CPU=$(printf '"%s"' "$2") \
-    	  -DNIX_APPLE_HDRS=$(
-    	printf '"%s"' "-I$out/$sdk/usr/include"
-    	  ) \
-    	  -DNIX_APPLE_FRAMEWORKS=$(
-    	printf '"%s"' "$out/$sdk/System/Library/Frameworks"
-    	  ) \
-    	  -DNIX_APPLE_PRIV_FRAMEWORKS=$(
-    	printf '"%s"' "$out/$sdk/System/Library/PrivateFrameworks"
-    	  ) \
-    	  -DOS_VER_MIN=$(printf '"%s"' "7.1") \
-    	  -o "$target_dir/bin/$triple-clang"
+          -DTARGET_CPU=$(printf '"%s"' "$2") \
+          -DNIX_APPLE_HDRS=$(
+        printf '"%s"' "-I$out/$sdk/usr/include"
+          ) \
+          -DNIX_APPLE_FRAMEWORKS=$(
+        printf '"%s"' "$out/$sdk/System/Library/Frameworks"
+          ) \
+          -DNIX_APPLE_PRIV_FRAMEWORKS=$(
+        printf '"%s"' "$out/$sdk/System/Library/PrivateFrameworks"
+          ) \
+          -DOS_VER_MIN=$(printf '"%s"' "7.1") \
+          -o "$target_dir/bin/$triple-clang"
 
     pushd "$target_dir"/bin &>/dev/null
 
@@ -141,8 +141,8 @@ function do_build {
     local me=`whoami`
 
     for d in bin libexec SDK; do
-    	chown -R $me:$me target/$d
-    	cp -R target/$d $out
+        chown -R $me:$me target/$d
+        cp -R target/$d $out
     done
 
     # Crucial piece