homebrew-core/Formula/gettext.rb

53 lines
1.9 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Gettext < Formula
homepage 'http://www.gnu.org/software/gettext/'
url 'http://ftpmirror.gnu.org/gettext/gettext-0.18.1.1.tar.gz'
mirror 'http://ftp.gnu.org/gnu/gettext/gettext-0.18.1.1.tar.gz'
sha1 '5009deb02f67fc3c59c8ce6b82408d1d35d4e38f'
2010-08-10 20:05:20 +00:00
keg_only "OS X provides the BSD gettext library and some software gets confused if both are in the library path."
2012-02-27 09:49:20 +00:00
bottle do
sha1 'd1ad5ad15bfe8fe813ee37e5d6b514fc79924b9a' => :mountainlion
2012-04-10 16:06:57 +00:00
sha1 'c75fdb192f1b49c9e7e2039c66e24f60f26bc027' => :lion
sha1 'b8958544542fc160b4c74db5d83cb441d12741c7' => :snowleopard
2012-02-27 09:49:20 +00:00
end
2012-08-10 04:58:02 +00:00
option :universal
option 'with-examples', 'Keep example files'
def patches
# Patch to allow building with Xcode 4; safe for any compiler.
p = {:p0 => ['https://trac.macports.org/export/79617/trunk/dports/devel/gettext/files/stpncpy.patch']}
2012-08-10 04:58:02 +00:00
unless build.include? 'with-examples'
# Use a MacPorts patch to disable building examples at all,
# rather than build them and remove them afterwards.
p[:p0] << 'https://trac.macports.org/export/79183/trunk/dports/devel/gettext/files/patch-gettext-tools-Makefile.in'
end
return p
end
def install
ENV.libxml2
2012-08-10 04:58:02 +00:00
ENV.universal_binary if build.universal?
2011-06-05 02:51:51 +00:00
system "./configure", "--disable-dependency-tracking",
"--disable-debug",
"--prefix=#{prefix}",
"--with-included-gettext",
"--with-included-glib",
"--with-included-libcroco",
"--with-included-libunistring",
"--without-emacs",
# Don't use VCS systems to create these archives
"--without-git",
"--without-cvs"
system "make"
ENV.deparallelize # install doesn't support multiple make jobs
system "make install"
end
end