homebrew-core/Formula/gdk-pixbuf.rb

61 lines
2.1 KiB
Ruby
Raw Normal View History

require 'formula'
class GdkPixbuf < Formula
homepage 'http://gtk.org'
url 'http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.30/gdk-pixbuf-2.30.7.tar.xz'
2014-03-28 17:35:13 +00:00
sha256 '0aafc365eab1083a53f15e4828333b968219ffcb1a995ac6289c0147c9ffad06'
2014-02-22 18:38:39 +00:00
bottle do
2014-03-28 17:38:32 +00:00
sha1 "722cf4d155826a0bd0b994ae85063c876ff87ab0" => :mavericks
sha1 "fb42d6ef6dfd6c4ecbc65e03567229f9041e7ccb" => :mountain_lion
sha1 "fe4483a180ab582a8c6bd9e06bda9f3c9b0f9581" => :lion
2014-02-22 18:38:39 +00:00
end
2012-08-10 04:57:05 +00:00
option :universal
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'
def install
2012-08-10 04:57:05 +00:00
ENV.universal_binary if build.universal?
system "./configure", "--disable-dependency-tracking",
"--disable-maintainer-mode",
"--enable-debug=no",
"--prefix=#{prefix}",
"--enable-introspection=yes",
"--disable-Bsymbolic",
"--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
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