summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index c7536922e6..5180973e26 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -94,6 +94,18 @@ class Glib(Package):
url = 'http://ftp.gnome.org/pub/gnome/sources/glib'
return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version)
+ def patch(self):
+ """A few glib tests have external dependencies / try to access the X server"""
+ # Surgically disable tests which we cannot make pass in a spack build
+ gio_tests = FileFilter('gio/tests/meson.build')
+ gio_tests.filter('if not glib_have_cocoa', 'if false')
+ gio_tests.filter("'contenttype' : {},", '')
+ gio_tests.filter("'file' : {},", '')
+ gio_tests.filter("'gdbus-peer'", "'file'")
+ gio_tests.filter("'gdbus-address-get-session' : {},", '')
+ filter_file("'mkenums.py',*", '', 'gobject/tests/meson.build')
+ filter_file("'fileutils' : {},", '', 'glib/tests/meson.build')
+
@property
def libs(self):
return find_libraries(['libglib*'], root=self.prefix, recursive=True)