diff options
| author | Jack Nagel | 2012-03-08 20:31:32 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-03-08 20:40:26 -0600 |
| commit | b3964fe988c10e79dbf3a8c793023060f0729cc2 (patch) | |
| tree | e179b3b2e35905b3564fbbbcaf9984812a45b76e /Library | |
| parent | 1a0f4739b92164e4785f8c3daedddfae694d2cf8 (diff) | |
| download | homebrew-b3964fe988c10e79dbf3a8c793023060f0729cc2.tar.bz2 | |
Fix gdk-pixbuf module installation
When other packages install gdk-pixbuf modules, they get installed into
the gdk-pixbuf keg. To avoid this, we explicitly create the top level
lib directories for gdk-pixbuf and hack the pkgconfig file to point at
the top-level directories instead of the keg.
This results in other packages installing modules into the top-level
directory and as such they are "lost" and treated as unbrewed files, but
that is still better than losing them during upgrades of gdk-pixbuf
itself.
If we had a post-link hook, we could keep everything confined to its own
keg, linked into the top-level modules directory, and then run
gdk-pixbuf-query-loaders --update-cache
ourselves. In the abscence of that, I think this is the best compromise.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/gdk-pixbuf.rb | 9 | ||||
| -rw-r--r-- | Library/Homebrew/keg.rb | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Library/Formula/gdk-pixbuf.rb b/Library/Formula/gdk-pixbuf.rb index 236ff8e72..d1012931c 100644 --- a/Library/Formula/gdk-pixbuf.rb +++ b/Library/Formula/gdk-pixbuf.rb @@ -11,6 +11,7 @@ class GdkPixbuf < Formula depends_on 'jasper' depends_on 'libtiff' + # 'loaders.cache' must be writable by other packages skip_clean 'lib/gdk-pixbuf-2.0' def options @@ -29,5 +30,13 @@ class GdkPixbuf < Formula "--without-gdiplus" system "make" system "make install" + + # Other packages should use the top-level modules directory + # rather than dumping their files into the gdk-pixbuf keg. + inreplace lib/'pkgconfig/gdk-pixbuf-2.0.pc' do |s| + libv = s.get_make_var 'gdk_pixbuf_binary_version' + s.change_make_var! 'gdk_pixbuf_binarydir', + HOMEBREW_PREFIX/'lib/gdk-pixbuf-2.0'/libv + end end end diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index edc948f76..0d31136eb 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -88,6 +88,7 @@ class Keg < Pathname # pkg-config database gets explicitly created when 'pkgconfig' then :mkpath # lib/language folders also get explicitly created + when /^gdk-pixbuf/ then :mkpath when 'ghc' then :mkpath when 'lua' then :mkpath when 'node' then :mkpath |
