Updates vendored mason to v0.4 for LLVM 3.9.1

This commit is contained in:
Daniel J. Hofmann
2017-01-09 14:26:44 +05:30
105 changed files with 1873 additions and 1000 deletions
+19
View File
@@ -0,0 +1,19 @@
language: generic
matrix:
include:
- os: osx
osx_image: xcode8
compiler: clang
- os: linux
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-5-dev
script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
+96
View File
@@ -0,0 +1,96 @@
diff --git a/build/configure.ac.tools b/build/configure.ac.tools
index a24dbce..aaf0e5d 100644
--- a/build/configure.ac.tools
+++ b/build/configure.ac.tools
@@ -10,16 +10,3 @@ AC_C_INLINE
dnl ===========================================================================
-PKG_PROG_PKG_CONFIG()
-if test "x$PKG_CONFIG" = x; then
- AC_MSG_ERROR([pkg-config >= $PKGCONFIG_REQUIRED required but not found (http://pkgconfig.freedesktop.org/)])
-fi
-
-dnl Check for recent pkg-config which supports Requires.private
-case `$PKG_CONFIG --version` in
-[0.?|0.?.?|0.1[0-7]|0.1[0-7].?]) PKGCONFIG_REQUIRES="Requires"; ;;
-*) PKGCONFIG_REQUIRES="Requires.private"; ;;
-esac
-
-AC_SUBST(PKGCONFIG_REQUIRES)
-
diff --git a/configure.ac b/configure.ac
index 2ce1959..87c71ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,26 +321,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(gallium, Gallium3D, no, [
dnl ===========================================================================
CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
- use_png=no
- AC_ARG_VAR([png_REQUIRES], [module name for libpng to search for using pkg-config])
- if test "x$png_REQUIRES" = x; then
- # libpng13 is GnuWin32's libpng-1.2.8 :-(
- for l in libpng libpng14 libpng12 libpng13 libpng10; do
- if $PKG_CONFIG --exists $l ; then
- png_REQUIRES=$l
- use_png=yes
- break
- fi
- done
- else
- use_png=yes
- fi
-
- if test "x$use_png" = "xyes" ; then
- PKG_CHECK_MODULES(png, $png_REQUIRES, , : )
- else
- AC_MSG_WARN([Could not find libpng in the pkg-config search path])
- fi
+ use_png=yes
])
dnl ===========================================================================
@@ -495,10 +476,6 @@ FREETYPE_MIN_RELEASE=2.1.9
FREETYPE_MIN_VERSION=9.7.3
CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
-
- PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION,
- [freetype_pkgconfig=yes],
- [freetype_pkgconfig=no])
if test "x$freetype_pkgconfig" = "xyes"; then
ft_REQUIRES="freetype2 >= $FREETYPE_MIN_VERSION $ft_REQUIRES"
@@ -662,18 +639,12 @@ CAIRO_ENABLE(test_surfaces, test surfaces, no)
dnl ===========================================================================
CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [
- pixman_REQUIRES="pixman-1 >= 0.30.0"
- PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, ,
- [use_image="no (requires $pixman_REQUIRES http://cairographics.org/releases/)"])
+ use_image=yes
image_REQUIRES=$pixman_REQUIRES
image_CFLAGS=$pixman_CFLAGS
image_LIBS=$pixman_LIBS
])
-if pkg-config --exists 'pixman-1 >= 0.27.1'; then
- AC_DEFINE([HAS_PIXMAN_GLYPHS], 1, [Enable pixman glyph cache])
-fi
-
dnl ===========================================================================
diff --git a/test/Makefile.am b/test/Makefile.am
index 950629b..f733dd9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -75,7 +75,6 @@ endif
endif
test_sources += $(test)
-noinst_PROGRAMS = cairo-test-suite$(EXEEXT) # always build
noinst_SCRIPTS = check-refs.sh
TESTS += cairo-test-suite$(EXEEXT)
+88
View File
@@ -0,0 +1,88 @@
#!/usr/bin/env bash
MASON_NAME=cairo
MASON_VERSION=1.14.6
MASON_LIB_FILE=lib/libcairo.a
. ${MASON_DIR}/mason.sh
function mason_load_source {
mason_download \
http://cairographics.org/releases/${MASON_NAME}-${MASON_VERSION}.tar.xz \
b19d7d7b4e290eb6377ddc3688984cb66da036cb
mason_extract_tar_xz
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION}
}
function mason_prepare_compile {
cd $(dirname ${MASON_ROOT})
${MASON_DIR}/mason install libpng 1.6.24
MASON_PNG=$(${MASON_DIR}/mason prefix libpng 1.6.24)
${MASON_DIR}/mason install freetype 2.6.5
MASON_FREETYPE=$(${MASON_DIR}/mason prefix freetype 2.6.5)
${MASON_DIR}/mason install pixman 0.34.0
MASON_PIXMAN=$(${MASON_DIR}/mason prefix pixman 0.34.0)
}
function mason_compile {
mason_step "Loading patch"
patch -N -p1 < ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff
CFLAGS="${CFLAGS} -Wno-enum-conversion -I${MASON_PIXMAN}/include/pixman-1 -I${MASON_FREETYPE}/include/freetype2 -I${MASON_PNG}/include/"
LDFLAGS="-L${MASON_PIXMAN}/lib -lpixman-1 -L${MASON_FREETYPE}/lib -lfreetype -L${MASON_PNG}/lib -lpng"
CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} ./autogen.sh \
--prefix=${MASON_PREFIX} \
${MASON_HOST_ARG} \
--enable-static --disable-shared \
--enable-pdf=yes \
--enable-ft=yes \
--enable-png=yes \
--enable-svg=yes \
--enable-ps=yes \
--enable-fc=no \
--enable-script=no \
--enable-interpreter=no \
--enable-quartz=no \
--enable-quartz-image=no \
--enable-quartz-font=no \
--enable-trace=no \
--enable-gtk-doc=no \
--enable-qt=no \
--enable-win32=no \
--enable-win32-font=no \
--enable-skia=no \
--enable-os2=no \
--enable-beos=no \
--enable-drm=no \
--enable-gallium=no \
--enable-gl=no \
--enable-glesv2=no \
--enable-directfb=no \
--enable-vg=no \
--enable-egl=no \
--enable-glx=no \
--enable-wgl=no \
--enable-test-surfaces=no \
--enable-tee=no \
--enable-xml=no \
--disable-valgrind \
--enable-gobject=no \
--enable-xlib=no \
--enable-xlib-xrender=no \
--enable-xcb=no \
--enable-xlib-xcb=no \
--enable-xcb-shm=no \
--enable-full-testing=no \
--enable-symbol-lookup=no \
--disable-dependency-tracking
# The -i and -k flags are to workaround make[6]: [install-data-local] Error 1 (ignored)
make V=1 -j${MASON_CONCURRENCY} -i -k
make install -i -k
}
function mason_clean {
make clean
}
mason_run "$@"