From cdf1865246563fde47a1cf2a5fc3c0fd70b8e5ba Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 28 Oct 2020 07:15:20 -0700 Subject: 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 --- packaging/windows/mxe-based-build.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'packaging') 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) -- cgit v1.2.3-70-g09d2