mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
android-build: Simplify and correct
This simplifies the code and uses correct quoting for variables. This also fixes the sha1-stampfile handling so that we don't build libdivecomputer every time. Signed-off-by: Anton Lundin <glance@acc.umu.se>
This commit is contained in:
parent
a8c47cb75d
commit
05e6c2dfaa
1 changed files with 3 additions and 5 deletions
|
@ -366,21 +366,19 @@ if [ -e "$PREFIX/lib/libftdi1.so" ] ; then
|
|||
rm "$PREFIX"/lib/libftdi1.so*
|
||||
fi
|
||||
|
||||
if [ ! -f libdivecomputer-${ARCH}.SHA ] ; then
|
||||
echo "" > libdivecomputer-${ARCH}.SHA
|
||||
fi
|
||||
pushd "$SUBSURFACE_SOURCE"
|
||||
git submodule update --recursive
|
||||
popd
|
||||
CURRENT_SHA=$(cd "$SUBSURFACE_SOURCE"/libdivecomputer ; git describe)
|
||||
PREVIOUS_SHA=$(cat libdivecomputer-${ARCH}.SHA)
|
||||
if [[ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" || ! -e "$PKG_CONFIG_LIBDIR/libdivecomputer.pc" ]] ; then
|
||||
PREVIOUS_SHA=$(cat "libdivecomputer-${ARCH}.SHA" 2>/dev/null || echo)
|
||||
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] || [ ! -e "$PKG_CONFIG_LIBDIR/libdivecomputer.pc" ] ; then
|
||||
mkdir -p libdivecomputer-build-"$ARCH"
|
||||
pushd libdivecomputer-build-"$ARCH"
|
||||
"$SUBSURFACE_SOURCE"/libdivecomputer/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared --enable-examples=no
|
||||
make
|
||||
make install
|
||||
popd
|
||||
echo "$CURRENT_SHA" > "libdivecomputer-${ARCH}.SHA"
|
||||
fi
|
||||
|
||||
if [ ! -e qt-android-cmake ] ; then
|
||||
|
|
Loading…
Reference in a new issue