summaryrefslogtreecommitdiffstats
path: root/packaging/ios
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@libreoffice.org>2018-06-08 17:52:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-06-09 17:18:41 +0200
commitec0511e824ca596ff16022f45b2c89763b71c250 (patch)
tree1d099254e2629499763869d2b30a8b93fd6ea908 /packaging/ios
parentfe7655155fdb24d47721c8167bed0f565131b251 (diff)
downloadsubsurface-ec0511e824ca596ff16022f45b2c89763b71c250.tar.gz
ios: concentrate build dirs
update build.sh to make all builds in build-ios to keep the git dir as clean as possible Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'packaging/ios')
-rw-r--r--packaging/ios/Subsurface-mobile.pro2
-rwxr-xr-xpackaging/ios/build.sh48
-rw-r--r--packaging/ios/translations.qrc46
3 files changed, 50 insertions, 46 deletions
diff --git a/packaging/ios/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile.pro
index 7686a454b..911557399 100644
--- a/packaging/ios/Subsurface-mobile.pro
+++ b/packaging/ios/Subsurface-mobile.pro
@@ -109,7 +109,7 @@ LIBS += ./install-root/lib/libdivecomputer.a \
./install-root/lib/libgit2.a \
./install-root/lib/libzip.a \
./install-root/lib/libxslt.a \
- ./googlemaps-build/libqtgeoservices_googlemaps.a \
+ ./build-ios/googlemaps-build/libqtgeoservices_googlemaps.a \
-liconv \
-lsqlite3 \
-lxml2
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index 6679992a0..7b29fa1ec 100755
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -39,6 +39,9 @@ pushd ${SUBSURFACE_SOURCE}/..
SSRF_CLONE=$(pwd)
popd
+# prepare build dir
+mkdir -p build-ios
+
IOS_QT=${TOP}/Qt
QT_VERSION=$(cd ${IOS_QT}; ls -d [1-9]* | awk -F. '{ printf("%02d.%02d.%02d\n", $1,$2,$3); }' | sort -n | tail -1 | sed -e 's/\.0/\./g;s/^0//')
@@ -84,7 +87,7 @@ for ARCH in $ARCHS; do
echo next building for $ARCH
- INSTALL_ROOT=$TOP/install-root-$ARCH
+ INSTALL_ROOT=$TOP/build-ios/install-root-$ARCH
mkdir -p $INSTALL_ROOT/lib $INSTALL_ROOT/bin $INSTALL_ROOT/include
PKG_CONFIG_LIBDIR=$INSTALL_ROOT/lib/pkgconfig
@@ -136,8 +139,8 @@ for ARCH in $ARCHS; do
autoreconf --install
popd
if [ ! -e $PKG_CONFIG_LIBDIR/libxslt.pc ] ; then
- mkdir -p libxslt-build-$ARCH_NAME
- pushd libxslt-build-$ARCH_NAME
+ mkdir -p build-ios/libxslt-build-$ARCH_NAME
+ pushd build-ios/libxslt-build-$ARCH_NAME
${SSRF_CLONE}/libxslt/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --without-python --without-crypto --enable-static --disable-shared
make
make install
@@ -145,8 +148,8 @@ for ARCH in $ARCHS; do
fi
if [ ! -e $PKG_CONFIG_LIBDIR/libzip.pc ] ; then
- mkdir -p libzip-build-$ARCH_NAME
- pushd libzip-build-$ARCH_NAME
+ mkdir -p build-ios/libzip-build-$ARCH_NAME
+ pushd build-ios/libzip-build-$ARCH_NAME
${SSRF_CLONE}/libzip/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared
make
make install
@@ -159,8 +162,8 @@ for ARCH in $ARCHS; do
popd
if [ ! -e $PKG_CONFIG_LIBDIR/libgit2.pc ] ; then
- mkdir -p libgit2-build-$ARCH
- pushd libgit2-build-$ARCH
+ mkdir -p build-ios/libgit2-build-$ARCH
+ pushd build-ios/libgit2-build-$ARCH
cmake ${SSRF_CLONE}/libgit2 \
-G "Unix Makefiles" \
-DBUILD_SHARED_LIBS="OFF" \
@@ -193,16 +196,16 @@ for ARCH in $ARCHS; do
autoreconf --install
popd
fi
- if [ ! -f libdivecomputer-${ARCH}.SHA ] ; then
- echo "" > libdivecomputer-${ARCH}.SHA
+ if [ ! -f build-ios/libdivecomputer-${ARCH}.SHA ] ; then
+ echo "" > build-ios/libdivecomputer-${ARCH}.SHA
fi
CURRENT_SHA=$(cd ../../libdivecomputer ; git describe)
- PREVIOUS_SHA=$(cat libdivecomputer-${ARCH}.SHA)
+ PREVIOUS_SHA=$(cat build-ios/libdivecomputer-${ARCH}.SHA)
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] ; then
- echo $CURRENT_SHA > libdivecomputer-${ARCH}.SHA
- mkdir -p libdivecomputer-build-$ARCH
- pushd libdivecomputer-build-$ARCH
- ../../../libdivecomputer/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi --enable-ble
+ echo $CURRENT_SHA > build-ios/libdivecomputer-${ARCH}.SHA
+ mkdir -p build-ios/libdivecomputer-build-$ARCH
+ pushd build-ios/libdivecomputer-build-$ARCH
+ ../../../../libdivecomputer/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi --enable-ble
make
make install
popd
@@ -211,19 +214,19 @@ for ARCH in $ARCHS; do
done
# build googlemaps
-mkdir -p googlemaps-build
-pushd googlemaps-build
+mkdir -p build-ios/googlemaps-build
+pushd build-ios/googlemaps-build
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ${SSRF_CLONE}/googlemaps/googlemaps.pro CONFIG+=release
make
popd
# now combine the libraries into fat libraries
rm -rf install-root
-cp -a install-root-x86_64 install-root
+cp -a build-ios/install-root-x86_64 install-root
if [ "$TARGET" = "iphoneos" ] ; then
pushd install-root/lib
for LIB in $(find . -type f -name \*.a); do
- lipo ../../install-root-armv7/lib/$LIB ../../install-root-arm64/lib/$LIB ../../install-root-x86_64/lib/$LIB -create -output $LIB
+ lipo ../../build-ios/install-root-armv7/lib/$LIB ../../build-ios/install-root-arm64/lib/$LIB ../../build-ios/install-root-x86_64/lib/$LIB -create -output $LIB
done
popd
fi
@@ -231,16 +234,17 @@ fi
pushd ${SUBSURFACE_SOURCE}/translations
SRCS=$(ls *.ts | grep -v source)
popd
-mkdir -p translations
+mkdir -p build-ios/translations
for src in $SRCS; do
- ${IOS_QT}/${QT_VERSION}/ios/bin/lrelease ${SUBSURFACE_SOURCE}/translations/$src -qm translations/${src/.ts/.qm}
+ ${IOS_QT}/${QT_VERSION}/ios/bin/lrelease ${SUBSURFACE_SOURCE}/translations/$src -qm build-ios/translations/${src/.ts/.qm}
done
# in order to be able to use xcode without going through Qt Creator
# call qmake directly
-mkdir -p build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE}
-cd build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE}
+BUILDX=build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE}
+mkdir -p ${BUILDX}
+cd ${BUILDX}
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../Subsurface-mobile.pro \
-spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=$DRCONFIG
diff --git a/packaging/ios/translations.qrc b/packaging/ios/translations.qrc
index 43f841814..85d7325f8 100644
--- a/packaging/ios/translations.qrc
+++ b/packaging/ios/translations.qrc
@@ -1,27 +1,27 @@
<RCC>
<qresource prefix="/">
- <file>translations/subsurface_bg_BG.qm</file>
- <file>translations/subsurface_cs.qm</file>
- <file>translations/subsurface_da_DK.qm</file>
- <file>translations/subsurface_de_CH.qm</file>
- <file>translations/subsurface_de_DE.qm</file>
- <file>translations/subsurface_en_GB.qm</file>
- <file>translations/subsurface_en_US.qm</file>
- <file>translations/subsurface_es_ES.qm</file>
- <file>translations/subsurface_et_EE.qm</file>
- <file>translations/subsurface_fi_FI.qm</file>
- <file>translations/subsurface_fr_FR.qm</file>
- <file>translations/subsurface_he.qm</file>
- <file>translations/subsurface_it_IT.qm</file>
- <file>translations/subsurface_nb_NO.qm</file>
- <file>translations/subsurface_nl_NL.qm</file>
- <file>translations/subsurface_pl_PL.qm</file>
- <file>translations/subsurface_pt_BR.qm</file>
- <file>translations/subsurface_pt_PT.qm</file>
- <file>translations/subsurface_ro_RO.qm</file>
- <file>translations/subsurface_ru_RU.qm</file>
- <file>translations/subsurface_sk_SK.qm</file>
- <file>translations/subsurface_sv_SE.qm</file>
- <file>translations/subsurface_zh_TW.qm</file>
+ <file>build-ios/translations/subsurface_bg_BG.qm</file>
+ <file>build-ios/translations/subsurface_cs.qm</file>
+ <file>build-ios/translations/subsurface_da_DK.qm</file>
+ <file>build-ios/translations/subsurface_de_CH.qm</file>
+ <file>build-ios/translations/subsurface_de_DE.qm</file>
+ <file>build-ios/translations/subsurface_en_GB.qm</file>
+ <file>build-ios/translations/subsurface_en_US.qm</file>
+ <file>build-ios/translations/subsurface_es_ES.qm</file>
+ <file>build-ios/translations/subsurface_et_EE.qm</file>
+ <file>build-ios/translations/subsurface_fi_FI.qm</file>
+ <file>build-ios/translations/subsurface_fr_FR.qm</file>
+ <file>build-ios/translations/subsurface_he.qm</file>
+ <file>build-ios/translations/subsurface_it_IT.qm</file>
+ <file>build-ios/translations/subsurface_nb_NO.qm</file>
+ <file>build-ios/translations/subsurface_nl_NL.qm</file>
+ <file>build-ios/translations/subsurface_pl_PL.qm</file>
+ <file>build-ios/translations/subsurface_pt_BR.qm</file>
+ <file>build-ios/translations/subsurface_pt_PT.qm</file>
+ <file>build-ios/translations/subsurface_ro_RO.qm</file>
+ <file>build-ios/translations/subsurface_ru_RU.qm</file>
+ <file>build-ios/translations/subsurface_sk_SK.qm</file>
+ <file>build-ios/translations/subsurface_sv_SE.qm</file>
+ <file>build-ios/translations/subsurface_zh_TW.qm</file>
</qresource>
</RCC>