2011-03-25 20:02:55 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class GdkPixbuf < Formula
|
|
|
|
homepage 'http://gtk.org'
|
2014-04-03 14:25:42 +00:00
|
|
|
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'
|
2011-03-25 20:02:55 +00:00
|
|
|
|
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
|
|
|
|
|
2014-04-28 08:52:55 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "glib"
|
|
|
|
depends_on "jpeg"
|
|
|
|
depends_on "libtiff"
|
|
|
|
depends_on "libpng"
|
|
|
|
depends_on "gobject-introspection"
|
2011-03-29 10:33:33 +00:00
|
|
|
|
2012-03-09 02:31:32 +00:00
|
|
|
# 'loaders.cache' must be writable by other packages
|
2012-03-08 23:52:05 +00:00
|
|
|
skip_clean 'lib/gdk-pixbuf-2.0'
|
|
|
|
|
2011-03-25 20:02:55 +00:00
|
|
|
def install
|
2012-08-10 04:57:05 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2012-02-04 06:07:45 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--disable-maintainer-mode",
|
|
|
|
"--enable-debug=no",
|
|
|
|
"--prefix=#{prefix}",
|
2013-10-13 18:23:47 +00:00
|
|
|
"--enable-introspection=yes",
|
2012-02-04 06:07:45 +00:00
|
|
|
"--disable-Bsymbolic",
|
|
|
|
"--without-gdiplus"
|
2011-10-14 06:10:21 +00:00
|
|
|
system "make"
|
2014-04-28 08:52:55 +00:00
|
|
|
system "make", "install"
|
2012-03-09 02:31:32 +00:00
|
|
|
|
|
|
|
# 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
|
2011-03-25 20:02:55 +00:00
|
|
|
end
|
2014-04-28 08:52:55 +00:00
|
|
|
|
|
|
|
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
|
2011-03-25 20:02:55 +00:00
|
|
|
end
|