robbiehanson/XMPPFramework — pull request #254 by tgoyne (2013-09-23 17:43:59+00:00)
Title: Rebuild libidn with arm64 included

Built libidn 1.28 with the following script and Xcode 5. Closes #253.

set -e

export CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
export CPP="$CC -E"
export AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
IOS_SYSROOT='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk'
SIM_SYSROOT='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk'
CFLAGS_COMMON="-fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -Wunused-value -fvisibility=hidden -gdwarf-2 -mthumb"

./configure --host=arm-apple-darwin --disable-shared CFLAGS="-arch armv7 -miphoneos-version-min=5.1 -isysroot $IOS_SYSROOT $CFLAGS_COMMON"
make clean
make -j5
cp lib/.libs/libidn.a libidn-armv7.a

./configure --host=arm-apple-darwin --disable-shared CFLAGS="-arch armv7s -miphoneos-version-min=5.1 -isysroot $IOS_SYSROOT $CFLAGS_COMMON"
make clean
make -j5
cp lib/.libs/libidn.a libidn-armv7s.a

./configure --host=arm-apple-darwin --disable-shared CFLAGS="-arch arm64 -miphoneos-version-min=6.0 -isysroot $IOS_SYSROOT $CFLAGS_COMMON"
make clean
make -j5
cp lib/.libs/libidn.a libidn-arm64.a

./configure --host=arm-apple-darwin --disable-shared CFLAGS="-arch i386 -miphoneos-version-min=5.1 -isysroot $SIM_SYSROOT $CFLAGS_COMMON"
make clean
make -j5
cp lib/.libs/libidn.a libidn-i386.a

unset CC
unset CPP
./configure
make clean
make -j5
cp lib/.libs/libidn.a libidn-x86_64.a

lipo -create libidn-x86_64.a libidn-armv7.a libidn-armv7s.a libidn-arm64.a -output libidn.a