summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-20 09:57:21 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-20 10:25:10 -0800
commit8ddb2ebd6b4922dd89dbaf2551f64fa5bb809f1b (patch)
tree4e8f029b46d69888bedb70c4817cd3f9ceef33d0 /packaging
parentb5c30971b60b340c76d02108dbd529c080b08549 (diff)
downloadsubsurface-8ddb2ebd6b4922dd89dbaf2551f64fa5bb809f1b.tar.gz
iOS build: hack to build and install libsqlite3.a
Building the iOS command line utility fails. But frankly, we don't need that, anyway. I cannot figure out how to tell sqlite that all I want is the library, so I'm working around that by first building the library, then pretending that sqlite3 was indeed built in order to be able to run make install. Horrible, ugly, stupid. But it seems to work. Also cleaned up the whitespace. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/ios/build.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index 99b2798f7..f06ce6407 100644
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -1,6 +1,10 @@
#!/bin/bash
set -e
+PWD=$(pwd)
+
+mkdir -p $PWD/install-root/lib $PWD/install-root/bin $PWD/install-root/include
+
# Build architecture, [armv7|armv7s|arm64|i386|x86_64]
export ARCH=i386
@@ -14,7 +18,7 @@ export SDKVERSION=$(xcrun --sdk $SDK --show-sdk-version) # current version
export SDKROOT=$(xcrun --sdk $SDK --show-sdk-path) # current version
#make subsurface set this to a saner value
-export PREFIX=/usr
+export PREFIX=$PWD/install-root
# Binaries
export CC=$(xcrun --sdk $SDK --find gcc)
@@ -58,11 +62,17 @@ if [ ! -e $PKG_CONFIG_LIBDIR/sqlite3.pc ] ; then
CFLAGS="${CFLAGS} -DSQLITE_ENABLE_LOCKING_STYLE=0"
../sqlite-autoconf-${SQLITE_VERSION}/configure \
- --prefix="$PREFIX" \
- --host="$CHOST" \
- --enable-static \
- --disable-shared
- make
+ --prefix="$PREFIX" \
+ --host="$CHOST" \
+ --enable-static \
+ --disable-shared \
+ --disable-readline \
+ --disable-dynamic-extensions
+
+ # running make tries to build the command line executable which fails
+ # so let's hack around that
+ make libsqlite3.la
+ touch sqlite3
make install
popd
fi