2017-11-11 17:38:41 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# Travis only pulls shallow repos. But that messes with git describe.
|
|
|
|
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
|
|
git fetch --unshallow
|
|
|
|
git pull --tags
|
2023-12-07 12:00:32 +00:00
|
|
|
git describe --match "v[0-9]*"
|
2017-11-11 17:38:41 +00:00
|
|
|
|
|
|
|
# grab our own custom MXE environment
|
2019-03-07 20:58:52 +00:00
|
|
|
pushd ${TRAVIS_BUILD_DIR}/..
|
2017-11-11 17:38:41 +00:00
|
|
|
echo "Downloading prebuilt MXE environment from Subsurface-divelog.org"
|
|
|
|
wget -q http://subsurface-divelog.org/downloads/mxe-994ad473.tar.xz
|
|
|
|
mkdir -p mxe
|
2019-03-13 20:57:18 +00:00
|
|
|
tar xJ -C mxe -f mxe-994ad473.tar.xz
|
2017-11-11 17:38:41 +00:00
|
|
|
|
|
|
|
# hack around path dependency - needs to be fixed
|
|
|
|
sudo mkdir -p /data/winqt551/
|
|
|
|
sudo ln -s ${TRAVIS_BUILD_DIR}/../mxe /data/winqt551/mxe-current
|
|
|
|
ls -l /data/winqt551/mxe-current/usr
|
2018-02-15 20:45:58 +00:00
|
|
|
sudo ln -s ${TRAVIS_BUILD_DIR}/../mxe /usr/src/mxe
|
2019-03-07 20:58:52 +00:00
|
|
|
popd
|
2017-11-11 17:38:41 +00:00
|
|
|
|
|
|
|
# now set up our other dependencies
|
|
|
|
|
|
|
|
CURRENT_LIBZIP="1.2.0"
|
|
|
|
CURRENT_HIDAPI="hidapi-0.7.0"
|
|
|
|
CURRENT_LIBUSB="v1.0.21"
|
|
|
|
CURRENT_LIBGIT2="v0.26.0"
|
|
|
|
|
2017-12-03 19:52:48 +00:00
|
|
|
# make sure we have libdivecomputer
|
2017-11-11 17:38:41 +00:00
|
|
|
echo "Get libdivecomputer"
|
2017-12-03 19:52:48 +00:00
|
|
|
cd ${TRAVIS_BUILD_DIR}
|
|
|
|
git submodule update --recursive
|
2017-12-03 20:53:56 +00:00
|
|
|
cd libdivecomputer
|
|
|
|
autoreconf --install
|
|
|
|
autoreconf --install
|
2017-11-11 17:38:41 +00:00
|
|
|
|
|
|
|
echo "Get libusb"
|
|
|
|
cd ${TRAVIS_BUILD_DIR}/..
|
|
|
|
git clone https://github.com/libusb/libusb
|
|
|
|
cd libusb
|
|
|
|
if ! git checkout $CURRENT_LIBUSB ; then
|
|
|
|
echo "Can't find the right tag in libusb - giving up"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Get libgit2"
|
|
|
|
cd ${TRAVIS_BUILD_DIR}/..
|
|
|
|
git clone https://github.com/libgit2/libgit2.git
|
|
|
|
cd libgit2
|
|
|
|
if ! git checkout $CURRENT_LIBGIT2 ; then
|
|
|
|
echo "Can't find the right tag in libgit2 - giving up"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Get googlemaps"
|
|
|
|
cd ${TRAVIS_BUILD_DIR}/..
|
2020-04-26 23:36:27 +00:00
|
|
|
git clone https://github.com/Subsurface/googlemaps.git
|
2017-11-11 17:38:41 +00:00
|
|
|
|
2018-02-15 20:45:58 +00:00
|
|
|
echo "Get mdbtools"
|
|
|
|
cd ${TRAVIS_BUILD_DIR}/..
|
|
|
|
git clone https://github.com/brianb/mdbtools.git
|
|
|
|
|
|
|
|
# get prebuilt mxe libraries for mdbtools and glib.
|
|
|
|
# do not overwrite upstream prebuilt mxe binaries if there is any coincidence.
|
|
|
|
wget https://www.dropbox.com/s/842skyusb96ii1u/mxe-static-minimal-994ad473.tar.xz
|
|
|
|
[[ ! -f mxe-static-minimal-994ad473.tar.xz ]] && exit 1
|
|
|
|
cd mxe
|
|
|
|
tar -xJf ../mxe-static-minimal-994ad473.tar.xz --skip-old-files
|
|
|
|
ls -al usr/
|