From c75c27c95c49e64a14afad7b63632c55c123e03b Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 31 Aug 2022 18:16:22 -0500 Subject: gdk-pixbuf: only build tests when requested (#32452) The building of tests is optional [as of 2.42.9](https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/801eef111df624f4377baed9a90c94b6a2d4340c). This applies this option in the build. The reason the option was added was to deal with test build failures in sandboxed environments and with certain glibc versions (caused by glib gresources). For example, with the latest version glibc and in the latest version of docker these tests [cannot be built](https://github.com/moby/moby/issues/43595). --- var/spack/repos/builtin/packages/gdk-pixbuf/package.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py index 153f04b8c5..2affe5fae9 100644 --- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py +++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py @@ -91,6 +91,9 @@ class GdkPixbuf(Package): def install(self, spec, prefix): with working_dir("spack-build", create=True): meson_args = std_meson_args + ["-Dman={0}".format("+man" in spec)] + # Only build tests when requested + if self.version >= Version("2.42.9"): + meson_args += ["-Dtests={0}".format(self.run_tests)] # Based on suggestion by luigi-calori and the fixup shown by lee218llnl: # https://github.com/spack/spack/pull/27254#issuecomment-974464174 if "+x11" in spec: -- cgit v1.2.3-60-g2f50