summaryrefslogtreecommitdiff
path: root/bin/sbang
diff options
context:
space:
mode:
authorGeorge Hartzell <hartzell@alerce.com>2017-04-27 09:04:26 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2017-04-27 11:04:26 -0500
commit58567a218273885577a373e6aa8284847203e7d4 (patch)
treed2dcc6c058d65927086f4cb8ec447adf473af557 /bin/sbang
parent41e3e7dbffa5537b684d151e4fe3b96a898a45a6 (diff)
downloadspack-58567a218273885577a373e6aa8284847203e7d4.tar.gz
spack-58567a218273885577a373e6aa8284847203e7d4.tar.bz2
spack-58567a218273885577a373e6aa8284847203e7d4.tar.xz
spack-58567a218273885577a373e6aa8284847203e7d4.zip
Adjustments to get gtkplus to build (#3208)
* Hackery to get gtkplus to build PR #3077 broke gtkplus by introducing gobject-introspection. This big hack makes things work. It has problems. 1. Rather than deal with the nasty sbang fooey in the g-ir-tool-template.in derived scripts, it just adds a python dependency to each package that runs one of the scripts. This lets the `/usr/bin/env python` sbang do the right thing. 2. It stuffs a several directories on to the XDG_DATA_DIRS environment variable, which is used for (among other things) locating the .gir files. 3. It avoids building the gtkplus demos because I can't make the bit that calls `gdk-pixbuf-csource` work. It doesn't think that it can load `.png` files and all of the google hits I found suggest a bad `loader.cache` file. The file's fine and I can strace the command and watch it read it in... Many, many hours wasted here. In spite of the demo failing, the tests pass and an emacs built with this lib seems to work. * Fix sbang so everyone needn't depend_on python Rather than have every package that `depends_on('gobject-introspection')` also need to `depend_on('python')`, this commit fixes the scripts (e.g. `g-ir-scanner`). The interesting bit is in the gobject-introspection package. There is a beefy comment there that is included below. The commit also removes the now un-necessary dependencies from various packages. I have two reservations about this commit: 1. How portable is the "insertion" sed command? I'm particularly worried that some sed's might need the line to insert to be on a different line, which I can't imagine how to cram into the Makefile.in. The solution I see to this is rather than extending the existing sed command in the Makefile I could shim in another line in the rule and e.g. call a bit of Perl (or Python, I suppose) which would end up being much neater. 2. As written it always uses Spack's `.../bin/sbang`, which might or might not be a good idea. If I use "the solution" from number 1 above, then I can check the line length before I munge it. Otherwise??? --- 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. | * Cairo needs python when it's +X Cairo needs to depend_on python when it's +X. I think it's an indirect requirement that's coming in via libxcb). * Flake8 cleanup * Make cairo's dep on python be type=build This seems to be the right thing and seems to produce a result that works (I can build gtk+ and then emacs+X on top of it).
Diffstat (limited to 'bin/sbang')
0 files changed, 0 insertions, 0 deletions