summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-28 07:15:20 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-30 12:24:36 -0700
commitcdf1865246563fde47a1cf2a5fc3c0fd70b8e5ba (patch)
treec6fc40470cec021eb012b5fddcec1f829181e076 /packaging
parent0b13cbd81b8d55ef041bf92d1855e2b1497eb170 (diff)
downloadsubsurface-cdf1865246563fde47a1cf2a5fc3c0fd70b8e5ba.tar.gz
build-system: add libmtp for our Windows builds
This uses latest master (as that's the only one that has the explicit Descent Mk2i support in it). Right now, unfortunately the MXE build fails. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/windows/mxe-based-build.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/packaging/windows/mxe-based-build.sh b/packaging/windows/mxe-based-build.sh
index ecae2e7e8..fc4c73db3 100755
--- a/packaging/windows/mxe-based-build.sh
+++ b/packaging/windows/mxe-based-build.sh
@@ -153,6 +153,28 @@ if [ ! -f libdivecomputer/configure ] ; then
autoreconf --install
fi
+# build libmtp as that isn't available via MXE
+cd "$BUILDDIR"
+if [[ ! -d libmtp || -f build.libmtp ]] ; then
+ rm -f build.libmtp
+ cd "$BASEDIR/libmtp"
+ export NOCONFIGURE=1
+ # crudely disable the interactive part of autogen.sh
+ sed --in-place=.bak 's/read IN/IN="N"/;s/echo "Auto/#echo "Auto/' autogen.sh
+ bash autogen.sh
+ mv autogen.sh.bak autogen.sh
+ cd "$BUILDDIR"
+ mkdir -p libmtp
+ cd libmtp
+ "$BASEDIR"/libmtp/configure \
+ CC="$MXEBUILDTYPE"-gcc \
+ --host="$MXEBUILDTYPE" \
+ --enable-shared \
+ --prefix="$BASEDIR"/"$MXEDIR"/usr/"$MXEBUILDTYPE"
+ make $JOBS
+ make install
+fi
+
cd "$BUILDDIR"
CURRENT_SHA=$(cd "$BASEDIR"/subsurface/libdivecomputer ; git describe)
PREVIOUS_SHA=$(cat "libdivecomputer.SHA" 2>/dev/null || echo)