summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGeorge Hartzell <hartzell@alerce.com>2019-01-13 12:40:20 -0800
committerAdam J. Stewart <ajstewart426@gmail.com>2019-01-13 14:40:20 -0600
commit7abc2fb26d1a55268298edfdce240365747327b3 (patch)
treef486cad3a3578b71f1ebfe9ccd6a17b7b794c9f4 /var
parent9350db5665638a451cb23d33e441c3356f4a831f (diff)
downloadspack-7abc2fb26d1a55268298edfdce240365747327b3.tar.gz
spack-7abc2fb26d1a55268298edfdce240365747327b3.tar.bz2
spack-7abc2fb26d1a55268298edfdce240365747327b3.tar.xz
spack-7abc2fb26d1a55268298edfdce240365747327b3.zip
bugfix/gdk-pixbuf (#10312)
* docbook processing works correctly for gdk-pixbuf 1. The various bits of documentation in gdk-pixbuf include hardcoded references to dtd's and stuff at their canonical, Internet, locations. BUT, gdk-pixbuf runs xslt-proc with the `--nonet` option, which forbids it from using the network. Sadness ensues. Traditionally folks use XML Catalogs to map these to local copies. Our docbook-xsl package wasn't setting the appropriate env var in its dependents environments to use our catalog. Now it does. Less sadness ensues. 2. If we're going to use these things, we should depend on them. * Add gdk-pixbuf's bin to build environment The "post-install.sh" script uses gdk-pixbuf-query-loaders, which was installed earlier. If py-psyclone can set its own bin on its PATH, so can we... * Make gdk-pixbuf use recognizable docbook location Our docbook-xsl package assumes that the canonical location is `http://cdn.docbook.org/release/xsl/current/manpages/docbook.xsl`, but the gdk-pixbuf's meson build script uses `http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl`. This means that our XML Catalog doesn't fix the reference and sadness happens. Just patch the build that we see what we want to see, then we can make it all go away. * Add commentary re docbook patch * Make catalog helper a property Thanks @adamjstewart! * Run tests if/when run_tests is true Thanks @adamjstewart! * Tune up dependencies Thanks @adamjstewart! * Wordsmit commentary
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/docbook-xsl/package.py10
-rw-r--r--var/spack/repos/builtin/packages/gdk-pixbuf/docbook-cdn.patch11
-rw-r--r--var/spack/repos/builtin/packages/gdk-pixbuf/package.py17
3 files changed, 36 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/docbook-xsl/package.py b/var/spack/repos/builtin/packages/docbook-xsl/package.py
index 9606bb970a..99bfb06d66 100644
--- a/var/spack/repos/builtin/packages/docbook-xsl/package.py
+++ b/var/spack/repos/builtin/packages/docbook-xsl/package.py
@@ -22,6 +22,14 @@ class DocbookXsl(Package):
def install(self, spec, prefix):
install_tree('.', prefix)
+ @property
+ def catalog(self):
+ return os.path.join(self.prefix, 'catalog.xml')
+
def setup_environment(self, spack_env, run_env):
- catalog = os.path.join(self.prefix, 'catalog.xml')
+ catalog = self.catalog
run_env.set('XML_CATALOG_FILES', catalog, separator=' ')
+
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ catalog = self.catalog
+ spack_env.prepend_path("XML_CATALOG_FILES", catalog)
diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/docbook-cdn.patch b/var/spack/repos/builtin/packages/gdk-pixbuf/docbook-cdn.patch
new file mode 100644
index 0000000000..fdcbcb8303
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gdk-pixbuf/docbook-cdn.patch
@@ -0,0 +1,11 @@
+--- a/docs/meson.build 2019-01-10 17:55:09.573701375 -0800
++++ b/docs/meson.build 2019-01-10 17:56:03.672667410 -0800
+@@ -89,7 +89,7 @@
+ xsltproc,
+ xlstproc_flags,
+ '-o', '@OUTPUT@',
+- 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
++ 'http://cdn.docbook.org/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@',
+ ],
+ install: true,
diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py
index 688720a933..78d455242e 100644
--- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py
+++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py
@@ -27,13 +27,21 @@ class GdkPixbuf(Package):
depends_on('shared-mime-info', type='build', when='@2.36.8: platform=linux')
depends_on('shared-mime-info', type='build', when='@2.36.8: platform=cray')
depends_on('pkgconfig', type='build')
+ # Building the man pages requires libxslt and the Docbook stylesheets
+ depends_on('libxslt', type='build')
+ depends_on('docbook-xsl', type='build')
depends_on('gettext')
- depends_on('glib')
+ depends_on('glib@2.38.0:')
depends_on('jpeg')
depends_on('libpng')
+ depends_on('zlib')
depends_on('libtiff')
depends_on('gobject-introspection')
+ # Replace the docbook stylesheet URL with the one that our
+ # docbook-xsl package uses/recognizes.
+ patch('docbook-cdn.patch')
+
def url_for_version(self, version):
url = "https://ftp.acc.umu.se/pub/gnome/sources/gdk-pixbuf/{0}/gdk-pixbuf-{1}.tar.xz"
return url.format(version.up_to(2), version)
@@ -48,6 +56,8 @@ class GdkPixbuf(Package):
with working_dir('spack-build', create=True):
meson('..', *std_meson_args)
ninja('-v')
+ if self.run_tests:
+ ninja('test')
ninja('install')
def configure_args(self):
@@ -70,3 +80,8 @@ class GdkPixbuf(Package):
make('install')
if self.run_tests:
make('installcheck')
+
+ def setup_environment(self, spack_env, run_env):
+ # The "post-install.sh" script uses gdk-pixbuf-query-loaders,
+ # which was installed earlier.
+ spack_env.prepend_path('PATH', self.prefix.bin)