aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/ios
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-12-20 18:05:52 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-20 12:16:12 -0800
commit63b01b75101136c021ac0435cfce5916878a4d71 (patch)
tree5658c456ca7c5302c1cb2dab2160e9a08772567d /packaging/ios
parent813e49d202a799090aa6524f805209b9b3e83096 (diff)
downloadsubsurface-63b01b75101136c021ac0435cfce5916878a4d71.tar.gz
iOS build: make it possible to compile openssl
It compiles but the link stage fails because of a missing -LSystem but its a baby step. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/ios')
-rw-r--r--packaging/ios/build.sh49
1 files changed, 24 insertions, 25 deletions
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index f5442e7b5..4ee64de16 100644
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -100,7 +100,7 @@ if [ ! -e libxslt-${LIBXSLT_VERSION}.tar.gz ] ; then
fi
if [ ! -e libxslt-${LIBXSLT_VERSION} ] ; then
tar -zxf libxslt-${LIBXSLT_VERSION}.tar.gz
- # libxslt have too old config.sub
+ # libxslt have too old config.sub
cp libxml2-${LIBXML2_VERSION}/config.sub libxslt-${LIBXSLT_VERSION}
fi
if [ ! -e $PKG_CONFIG_LIBDIR/libxslt.pc ] ; then
@@ -127,30 +127,29 @@ if [ ! -e $PKG_CONFIG_LIBDIR/libzip.pc ] ; then
popd
fi
-# if [ ! -e openssl-${OPENSSL_VERSION}.tar.gz ] ; then
-# wget -O openssl-${OPENSSL_VERSION}.tar.gz http://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
-# fi
-# if [ ! -e openssl-build-$ARCH ] ; then
-# tar -zxf openssl-${OPENSSL_VERSION}.tar.gz
-# mv openssl-${OPENSSL_VERSION} openssl-build-$ARCH
-# fi
-# if [ ! -e $PKG_CONFIG_LIBDIR/libssl.pc ] ; then
-# pushd openssl-build-$ARCH
-# perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.org
-# # Use env to make all these temporary, so they don't pollute later builds.
-# env SYSTEM=android \
-# CROSS_COMPILE="${BUILDCHAIN}-" \
-# MACHINE=$OPENSSL_MACHINE \
-# HOSTCC=gcc \
-# CC=gcc \
-# ANDROID_DEV=$PREFIX \
-# bash -x ./config shared no-ssl2 no-ssl3 no-comp no-hw no-engine --openssldir=$PREFIX
-# make depend
-# make
-# make install
-# popd
-# fi
-#
+if [ ! -e openssl-${OPENSSL_VERSION}.tar.gz ] ; then
+ wget -O openssl-${OPENSSL_VERSION}.tar.gz http://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
+fi
+if [ ! -e openssl-build-$ARCH ] ; then
+ tar -zxf openssl-${OPENSSL_VERSION}.tar.gz
+ mv openssl-${OPENSSL_VERSION} openssl-build-$ARCH
+fi
+if [ ! -e $PKG_CONFIG_LIBDIR/libssl.pc ] ; then
+ pushd openssl-build-$ARCH
+ perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.org
+ if [[ "${ARCH}" != "i386" && "${ARCH}" != "x86_64" ]]; then
+ sed -ie "s!static volatile sig_atomic_t intr_signal;!static volatile intr_signal;!" "crypto/ui/ui_openssl.c"
+ fi
+ ./Configure iphoneos-cross --openssldir="/tmp/$PREFIX"
+ sed -ie "s!^CFLAG=!CFLAG=-isysroot ${BUILDCHAIN} -miphoneos-version-min=${SDKVERSION} !" "Makefile"
+ # Use env to make all these temporary, so they don't pollute later builds.
+# bash -x ./config shared no-ssl2 no-ssl3 no-comp no-hw no-engine --openssldir=$PREFIX
+ make depend
+ make
+ make install
+ popd
+fi
+
# if [ ! -e libssh2-${LIBSSH2_VERSION}.tar.gz ] ; then
# wget http://www.libssh2.org/download/libssh2-${LIBSSH2_VERSION}.tar.gz
# fi