diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/gdk-pixbuf.rb | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/Library/Formula/gdk-pixbuf.rb b/Library/Formula/gdk-pixbuf.rb index e0d46a369..a37aca02f 100644 --- a/Library/Formula/gdk-pixbuf.rb +++ b/Library/Formula/gdk-pixbuf.rb @@ -13,12 +13,12 @@ class GdkPixbuf < Formula option :universal - depends_on 'pkg-config' => :build - depends_on 'glib' - depends_on 'jpeg' - depends_on 'libtiff' - depends_on 'libpng' - depends_on 'gobject-introspection' + depends_on "pkg-config" => :build + depends_on "glib" + depends_on "jpeg" + depends_on "libtiff" + depends_on "libpng" + depends_on "gobject-introspection" # 'loaders.cache' must be writable by other packages skip_clean 'lib/gdk-pixbuf-2.0' @@ -33,7 +33,7 @@ class GdkPixbuf < Formula "--disable-Bsymbolic", "--without-gdiplus" system "make" - system "make install" + system "make", "install" # Other packages should use the top-level modules directory # rather than dumping their files into the gdk-pixbuf keg. @@ -43,4 +43,18 @@ class GdkPixbuf < Formula HOMEBREW_PREFIX/'lib/gdk-pixbuf-2.0'/libv end end + + def post_install + # Change the version directory below with any future update + ENV["GDK_PIXBUF_MODULEDIR"]="#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders" + system "#{bin}/gdk-pixbuf-query-loaders", "--update-cache" + end + + def caveats; <<-EOS.undent + Programs that require this module need to set the environment variable + export GDK_PIXBUF_MODULEDIR="#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders" + If you need to manually update the query loader cache + #{bin}/gdk-pixbuf-query-loaders --update-cache + EOS + end end |
