xserver: Branch 'master' - 2 commits

Eric Anholt anholt at kemper.freedesktop.org
Sun Sep 24 06:07:46 UTC 2017


 .travis.yml                      |   14 ++++++++++++--
 include/meson.build              |    2 +-
 test/scripts/build-travis-osx.sh |   31 +++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 3 deletions(-)

New commits:
commit 0b00440678fa22c1c1ca4a292b67db3ab8676969
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Fri Sep 22 15:25:05 2017 +0100

    travis: Also build on OSX
    
    Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Eric Anholt <eric at anholt.net>

diff --git a/.travis.yml b/.travis.yml
index edeed0d90..a70b55f4c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,19 @@
 language: c
 cache: ccache
-dist: trusty
-services: docker
+
+matrix:
+ include:
+   - os: linux
+     dist: trusty
+     services: docker
+   - os: osx
 
 before_install:
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull anholt/xserver-travis ; fi
 
+install:
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache ; fi
+
 before_script:
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM anholt/xserver-travis:v6 > Dockerfile ; fi
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi
@@ -13,3 +21,5 @@ before_script:
 
 script:
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --volume $HOME/.ccache:/root/.ccache withgit /bin/sh -c "cd /root && ./test/scripts/build-travis-deps.sh" ; fi
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./test/scripts/build-travis-osx.sh ; fi
+  - ccache -s
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
commit c30eca688781deb06b25a6a08297cb855aeb6ed2
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Fri Sep 22 13:54:01 2017 +0100

    meson: Make it possible to build for 32-bit targets
    
    Setting glx_align64 to '' gives a null string in the arguments list passed
    to the compiler.  This is taken as an input filename, leading to:
    
    "cc: error: : No such file or directory"
    
    Instead, assign an empty list to glx_align64, which gets flattened to
    nothing in the arguments list.
    
    Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Eric Anholt <eric at anholt.net>

diff --git a/include/meson.build b/include/meson.build
index 5eefc5f07..5cea8bbcf 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -31,7 +31,7 @@ else
     conf_data.set('X_BYTE_ORDER', 'X_BIG_ENDIAN')
 endif
 
-glx_align64 = ''
+glx_align64 = []
 if cc.sizeof('unsigned long') == 8
    conf_data.set('_XSERVER64', '1')
    glx_align64 = '-D__GLX_ALIGN64'


More information about the xorg-commit mailing list