diff options
8 files changed, 67 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py index 1375f2d0f9..7605059850 100644 --- a/var/spack/repos/builtin/packages/atk/package.py +++ b/var/spack/repos/builtin/packages/atk/package.py @@ -38,8 +38,13 @@ class Atk(AutotoolsPackage): depends_on('glib') depends_on('pkg-config', type='build') + depends_on('gobject-introspection') def url_for_version(self, version): """Handle atk's version-based custom URLs.""" url = 'http://ftp.gnome.org/pub/gnome/sources/atk' return url + '/%s/atk-%s.tar.xz' % (version.up_to(2), version) + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.prepend_path("XDG_DATA_DIRS", + self.prefix.share) diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index 9df93ccddb..5d04bf29fa 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -40,6 +40,7 @@ class Cairo(AutotoolsPackage): depends_on('libxext', when='+X') depends_on('libxrender', when='+X') depends_on('libxcb', when='+X') + depends_on('python', when='+X', type='build') depends_on("libpng") depends_on("glib") depends_on("pixman") diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py index 2f3a0b0bd7..deb8b77819 100644 --- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py +++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py @@ -44,3 +44,8 @@ class GdkPixbuf(AutotoolsPackage): depends_on("jpeg") depends_on("libpng") depends_on("libtiff") + depends_on("gobject-introspection") + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.prepend_path("XDG_DATA_DIRS", + self.prefix.share) diff --git a/var/spack/repos/builtin/packages/gobject-introspection/package.py b/var/spack/repos/builtin/packages/gobject-introspection/package.py index e20688c9e9..5f147cccfc 100644 --- a/var/spack/repos/builtin/packages/gobject-introspection/package.py +++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +from spack import spack_root class GobjectIntrospection(Package): @@ -44,10 +45,35 @@ class GobjectIntrospection(Package): depends_on("bison", type="build") depends_on("flex", type="build") + # This package creates several scripts from + # toosl/g-ir-tool-template.in. In their original form these + # scripts end up with a sbang line like + # + # `#!/usr/bin/env /path/to/spack/python`. + # + # These scripts are generated and then used as part of the build + # (other packages also use the scripts after they've been + # installed). + # + # The path to the spack python can become too long. Because these + # tools are used as part of the build, the normal hook that fixes + # this problem can't help us. + # This package fixes the problem in two steps: + # - it rewrites the g-ir-tool-template so that its sbang line + # refers directly to spack's python (filter_file step below); and + # - it patches the Makefile.in so that the generated Makefile has an + # extra sed expression in its TOOL_SUBSTITUTION that results in + # an `#!/bin/bash /path/to/spack/bin/sbang` unconditionally being + # inserted into the scripts as they're generated. + patch("sbang.patch") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) # we need to filter this file to avoid an overly long hashbang line - filter_file('@PYTHON@', 'python', + filter_file('#!/usr/bin/env @PYTHON@', '#!@PYTHON@', 'tools/g-ir-tool-template.in') make() make("install") + + def setup_environment(self, spack_env, run_env): + spack_env.set('SPACK_SBANG', "%s/bin/sbang" % spack_root) diff --git a/var/spack/repos/builtin/packages/gobject-introspection/sbang.patch b/var/spack/repos/builtin/packages/gobject-introspection/sbang.patch new file mode 100644 index 0000000000..7d4b78a930 --- /dev/null +++ b/var/spack/repos/builtin/packages/gobject-introspection/sbang.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in 2016-09-13 01:23:59.000000000 -0700 ++++ b/Makefile.in 2017-02-22 10:26:31.824509512 -0800 +@@ -1475,7 +1475,7 @@ + gir_DATA = $(STATIC_GIRSOURCES) $(SUBSTITUTED_GIRSOURCES) $(BUILT_GIRSOURCES) + typelibsdir = $(libdir)/girepository-1.0 + typelibs_DATA = $(gir_DATA:.gir=.typelib) +-TOOL_SUBSTITUTIONS = -e s,@libdir\@,$(libdir), -e s,@datarootdir\@,$(datarootdir), -e s,@PYTHON\@,$(PYTHON), ++TOOL_SUBSTITUTIONS = -e s,@libdir\@,$(libdir), -e s,@datarootdir\@,$(datarootdir), -e s,@PYTHON\@,$(PYTHON), -e "1i\#!/bin/bash $(SPACK_SBANG)" + g_ir_compiler_SOURCES = tools/compiler.c + g_ir_compiler_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \ + -I$(top_srcdir)/girepository diff --git a/var/spack/repos/builtin/packages/gtkplus/no-demos.patch b/var/spack/repos/builtin/packages/gtkplus/no-demos.patch new file mode 100644 index 0000000000..5acc988c38 --- /dev/null +++ b/var/spack/repos/builtin/packages/gtkplus/no-demos.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in 2017-02-21 12:18:44.774922978 -0800 ++++ b/Makefile.in 2017-02-21 12:18:54.465965697 -0800 +@@ -564,7 +564,7 @@ + || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \ + && DISPLAY=:$$XID && export DISPLAY + +-SRC_SUBDIRS = gdk gtk modules demos tests perf ++SRC_SUBDIRS = gdk gtk modules tests perf + SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build + + # require automake 1.4 diff --git a/var/spack/repos/builtin/packages/gtkplus/package.py b/var/spack/repos/builtin/packages/gtkplus/package.py index 4664cfcbb2..227ecc3e09 100644 --- a/var/spack/repos/builtin/packages/gtkplus/package.py +++ b/var/spack/repos/builtin/packages/gtkplus/package.py @@ -46,6 +46,8 @@ class Gtkplus(AutotoolsPackage): depends_on("pango+X", when='+X') depends_on('gobject-introspection', when='+X') + patch('no-demos.patch') + def patch(self): # remove disable deprecated flag. filter_file(r'CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"', diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py index e5a8e8c57d..3c1c46e64b 100644 --- a/var/spack/repos/builtin/packages/pango/package.py +++ b/var/spack/repos/builtin/packages/pango/package.py @@ -48,6 +48,7 @@ class Pango(AutotoolsPackage): depends_on("cairo+X", when='+X') depends_on("libxft", when='+X') depends_on("glib") + depends_on('gobject-introspection') def configure_args(self): args = [] @@ -59,3 +60,7 @@ class Pango(AutotoolsPackage): def install(self, spec, prefix): make("install", parallel=False) + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.prepend_path("XDG_DATA_DIRS", + self.prefix.share) |