From 08898a2ad7c4579ff9b0c08c4e97cde11c0d4601 Mon Sep 17 00:00:00 2001 From: Gregory Lee Date: Thu, 26 Dec 2019 14:20:16 -0800 Subject: patch cairo build files for build without fontconfig fixes #14112 (#14296) * patch cairo build files for build without fontconfig * added build dependencies for cairo --- .../repos/builtin/packages/cairo/fontconfig.patch | 36 ++++++++++++++++++++++ var/spack/repos/builtin/packages/cairo/package.py | 13 ++++++++ 2 files changed, 49 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cairo/fontconfig.patch diff --git a/var/spack/repos/builtin/packages/cairo/fontconfig.patch b/var/spack/repos/builtin/packages/cairo/fontconfig.patch new file mode 100644 index 0000000000..dc550abda5 --- /dev/null +++ b/var/spack/repos/builtin/packages/cairo/fontconfig.patch @@ -0,0 +1,36 @@ +diff --git a/test/Makefile.am b/test/Makefile.am +index e3c42ea88..7b5568d85 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -158,8 +158,10 @@ ps-features \ + svg-clip \ + svg-surface \ + toy-font-face \ +-font-variations \ + user-data ++#if CAIRO_HAS_FT_FONT ++NOLOG_TESTS += font-variations ++#endif + + # A target to summarise the failures + check-summary: +diff --git a/test/Makefile.sources b/test/Makefile.sources +index c47131faf..8568f7cf8 100644 +--- a/test/Makefile.sources ++++ b/test/Makefile.sources +@@ -144,7 +144,6 @@ test_sources = \ + font-face-get-type.c \ + font-matrix-translation.c \ + font-options.c \ +- font-variations.c \ + glyph-cache-pressure.c \ + get-and-set.c \ + get-clip.c \ +@@ -399,6 +398,7 @@ pthread_test_sources = \ + + ft_font_test_sources = \ + bitmap-font.c \ ++ font-variations.c \ + ft-font-create-for-ft-face.c \ + ft-show-glyphs-positioning.c \ + ft-show-glyphs-table.c \ diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index 6cc9779ad0..95ec7d44b9 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -35,6 +35,10 @@ class Cairo(AutotoolsPackage): depends_on('librsvg', when='+svg') depends_on('glib') depends_on('pixman') + depends_on('automake', type='build') + depends_on('autoconf', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') depends_on('freetype', when='+ft') depends_on('pkgconfig', type='build') depends_on('fontconfig@2.10.91:', when='+fc') # Require newer version of fontconfig. @@ -42,6 +46,15 @@ class Cairo(AutotoolsPackage): conflicts('+png', when='platform=darwin') conflicts('+svg', when='platform=darwin') + # patch from https://gitlab.freedesktop.org/cairo/cairo/issues/346 + patch('fontconfig.patch', when='@1.16.0') + + def setup_build_environment(self, env): + env.set('NOCONFIGURE', "1") + + def autoreconf(self, spec, prefix): + which('sh')('./autogen.sh') + def configure_args(self): args = [ '--disable-trace', # can cause problems with libiberty -- cgit v1.2.3-70-g09d2