1#!/bin/sh 2 3set -e 4set -x 5 6# 7# based on instructions for building xorg-server in https://www.xquartz.org/Developer-Info.html 8# 9 10# install XQuartz for libraries, headers, etc. 11XQUARTZ_VERSION="2.7.11" 12wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg 13hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg 14sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target / 15hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION} 16 17# build environment 18export PATH="/opt/X11/bin:${PATH}" 19export PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}" 20export ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal" 21export CFLAGS="-Wall -O2 -ggdb3 -arch i386 -arch x86_64 -pipe" 22export CXXFLAGS=$CFLAGS 23export OBJCFLAGS=$CFLAGS 24export LDFLAGS=$CFLAGS 25 26# travis currently requires explicit ccache setup on OSX 27export PATH="/usr/local/opt/ccache/libexec:$PATH" 28 29# need newer xorgproto 30pushd $HOME 31git clone git://anongit.freedesktop.org/git/xorg/proto/xorgproto 32cd xorgproto 33autoreconf -fvi 34./configure --prefix=/opt/X11 35sudo make install 36popd 37 38# build 39autoreconf -fvi 40./configure --prefix=/opt/X11 --disable-dependency-tracking --with-apple-application-name=XQuartz --with-bundle-id-prefix=org.macosforge.xquartz 41make 42make check 43make install DESTDIR=$(pwd)/staging 44