mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
b5c30971b6
commit
8ddb2ebd6b
1 changed files with 16 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue