diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-10-28 07:15:20 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-30 12:24:36 -0700 |
commit | cdf1865246563fde47a1cf2a5fc3c0fd70b8e5ba (patch) | |
tree | c6fc40470cec021eb012b5fddcec1f829181e076 | |
parent | 0b13cbd81b8d55ef041bf92d1855e2b1497eb170 (diff) | |
download | subsurface-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>
-rw-r--r-- | .github/workflows/scripts/windows-container-prep.sh | 1 | ||||
-rwxr-xr-x | packaging/windows/mxe-based-build.sh | 22 | ||||
-rwxr-xr-x | scripts/get-dep-lib.sh | 4 |
3 files changed, 27 insertions, 0 deletions
diff --git a/.github/workflows/scripts/windows-container-prep.sh b/.github/workflows/scripts/windows-container-prep.sh index a71ee381f..a639604aa 100644 --- a/.github/workflows/scripts/windows-container-prep.sh +++ b/.github/workflows/scripts/windows-container-prep.sh @@ -5,3 +5,4 @@ echo "downloading sources for fresh build" bash subsurface/scripts/get-dep-lib.sh single . libzip bash subsurface/scripts/get-dep-lib.sh single . googlemaps +bash subsurface/scripts/get-dep-lib.sh single . libmtp 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) diff --git a/scripts/get-dep-lib.sh b/scripts/get-dep-lib.sh index b0cf2089a..ddeeb38f0 100755 --- a/scripts/get-dep-lib.sh +++ b/scripts/get-dep-lib.sh @@ -17,6 +17,7 @@ CURRENT_KIRIGAMI="v5.62.0" CURRENT_BREEZE_ICONS="4daac191fb33c8c03bba8356db9767816cb8ee02" CURRENT_MDBTOOLS="master" CURRENT_QT_ANDROID_CMAKE="master" +CURRENT_LIBMTP="master" # Checkout library from git # Ensure specified version is checked out, @@ -155,6 +156,9 @@ for package in "${PACKAGES[@]}" ; do libusb) git_checkout_library libusb $CURRENT_LIBUSB https://github.com/libusb/libusb.git ;; + libmtp) + git_checkout_library libmtp $CURRENT_LIBMTP https://github.com/libmtp/libmtp.git + ;; libxml2) git_checkout_library libxml2 $CURRENT_LIBXML2 https://github.com/GNOME/libxml2.git ;; |