2018-08-13 11:14:15 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
brew update
|
2018-08-13 14:24:40 -04:00
|
|
|
brew install jq zip
|
2018-08-13 11:14:15 -04:00
|
|
|
else
|
2018-08-31 10:53:36 -04:00
|
|
|
sudo apt-get update
|
2019-12-09 14:40:37 -05:00
|
|
|
sudo apt-get install -y fakeroot jq
|
2019-12-10 10:28:28 -05:00
|
|
|
triplet=
|
|
|
|
case $BUILDARCH in
|
|
|
|
arm)
|
|
|
|
arch=armhf
|
|
|
|
triplet=arm-linux-gnueabihf
|
|
|
|
;;
|
|
|
|
|
|
|
|
arm64)
|
|
|
|
arch=arm64
|
|
|
|
triplet=aarch64-linux-gnu
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [[ -n "$triplet" ]]; then
|
2019-12-09 14:40:37 -05:00
|
|
|
sed 's/^deb /deb [arch=amd64] '/g -i /etc/apt/sources.list
|
2019-12-10 10:28:28 -05:00
|
|
|
echo "deb [arch=$arch] http://ports.ubuntu.com/ubuntu-ports/ trusty main" | sudo tee -a /etc/apt/sources.list.d/$arch.list >/dev/null
|
|
|
|
sudo dpkg --add-architecture $arch
|
2018-11-04 16:05:53 -05:00
|
|
|
sudo apt-get update
|
2019-12-10 10:28:28 -05:00
|
|
|
sudo apt-get install libc6-dev-$arch-cross gcc-$triplet g++-$triplet `apt-cache search x11proto | grep ^x11proto | cut -f 1 -d ' '` xz-utils pkg-config
|
2019-12-09 14:40:37 -05:00
|
|
|
mkdir -p dl
|
|
|
|
cd dl
|
2019-12-10 10:28:28 -05:00
|
|
|
apt-get download libx11-dev:$arch libx11-6:$arch libxkbfile-dev:$arch libxkbfile1:$arch libxau-dev:$arch libxdmcp-dev:$arch libxcb1-dev:$arch libsecret-1-dev:$arch libsecret-1-0:$arch libpthread-stubs0-dev:$arch libglib2.0-dev:$arch libglib2.0-0:$arch libffi-dev:$arch libffi6:$arch zlib1g:$arch libpcre3-dev:$arch libpcre3:$arch
|
2019-12-09 14:40:37 -05:00
|
|
|
for i in *.deb; do ar x $i; sudo tar -C / -xf data.tar.*; rm -f data.tar.*; done
|
|
|
|
cd ..
|
2019-12-10 10:28:28 -05:00
|
|
|
export CC=/usr/bin/$triplet-gcc
|
|
|
|
export CXX=/usr/bin/$triplet-g++
|
2018-11-04 16:05:53 -05:00
|
|
|
export CC_host=/usr/bin/gcc
|
|
|
|
export CXX_host=/usr/bin/g++
|
2019-12-10 10:28:28 -05:00
|
|
|
export PKG_CONFIG_LIBDIR=/usr/lib/$triplet/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
|
2019-02-14 19:40:11 -05:00
|
|
|
else
|
2019-12-09 14:40:37 -05:00
|
|
|
sudo apt-get install libx11-dev libxkbfile-dev libsecret-1-dev rpm
|
2018-10-04 18:05:05 -04:00
|
|
|
fi
|
2018-10-10 11:20:56 -04:00
|
|
|
fi
|