diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-09-22 15:25:05 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2017-09-23 22:47:36 -0700 |
commit | 0b00440678fa22c1c1ca4a292b67db3ab8676969 (patch) | |
tree | 7b70d4faf88e31039fdd9b4226bb9e0d9560d6d4 /test | |
parent | c30eca688781deb06b25a6a08297cb855aeb6ed2 (diff) |
travis: Also build on OSX
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'test')
-rwxr-xr-x | test/scripts/build-travis-osx.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/scripts/build-travis-osx.sh b/test/scripts/build-travis-osx.sh new file mode 100755 index 000000000..86e96e0c5 --- /dev/null +++ b/test/scripts/build-travis-osx.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# +# based on instructions for building xorg-server in https://www.xquartz.org/Developer-Info.html +# + +# install XQuartz for libraries, headers, etc. +XQUARTZ_VERSION="2.7.11" +wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg +hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg +sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target / +hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION} + +# build environment +export PATH="/opt/X11/bin:${PATH}" +export PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}" +export ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal" +export CFLAGS="-Wall -O0 -ggdb3 -arch i386 -arch x86_64 -pipe" +export CXXFLAGS=$CFLAGS +export OBJCFLAGS=$CFLAGS +export LDFLAGS=$CFLAGS + +# travis currently requires explicit ccache setup on OSX +export PATH="/usr/local/opt/ccache/libexec:$PATH" + +# build +autoreconf -fvi +./configure --prefix=/opt/X11 --disable-dependency-tracking --with-apple-application-name=XQuartz --with-bundle-id-prefix=org.macosforge.xquartz +make +make check +make install DESTDIR=$(pwd)/staging |