2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-06 22:54:52 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gettext < Formula
|
2010-07-20 14:30:47 +00:00
|
|
|
url 'http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.1.1.tar.gz'
|
|
|
|
md5 '3dd55b952826d2b32f51308f2f91aa89'
|
2010-04-07 05:58:35 +00:00
|
|
|
homepage 'http://www.gnu.org/software/gettext/'
|
2009-09-17 20:10:39 +00:00
|
|
|
|
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."
|
|
|
|
|
|
|
|
def options
|
2011-06-05 02:51:51 +00:00
|
|
|
[
|
|
|
|
['--with-examples', 'Keep example files.'],
|
|
|
|
['--universal', 'Build universal binaries.']
|
|
|
|
]
|
2010-08-10 20:05:20 +00:00
|
|
|
end
|
2009-09-17 20:10:39 +00:00
|
|
|
|
2011-06-05 02:51:51 +00:00
|
|
|
|
2011-06-05 02:51:00 +00:00
|
|
|
def patches
|
|
|
|
unless ARGV.include? '--with-examples'
|
|
|
|
# Use a MacPorts patch to disable building examples at all
|
|
|
|
# rather than build them and remove them afterwards.
|
|
|
|
{:p0 =>
|
|
|
|
"https://trac.macports.org/export/79183/trunk/dports/devel/gettext/files/patch-gettext-tools-Makefile.in"
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2009-06-06 22:54:52 +00:00
|
|
|
def install
|
2009-08-07 14:41:43 +00:00
|
|
|
ENV.libxml2
|
2010-02-11 23:02:11 +00:00
|
|
|
ENV.O3 # Issues with LLVM & O4 on Mac Pro 10.6
|
|
|
|
|
2011-06-05 02:51:51 +00:00
|
|
|
ENV.universal_binary if ARGV.build_universal?
|
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking", "--disable-debug",
|
2009-08-07 14:41:43 +00:00
|
|
|
"--prefix=#{prefix}",
|
2010-04-07 05:58:35 +00:00
|
|
|
"--without-included-gettext",
|
|
|
|
"--without-included-glib",
|
|
|
|
"--without-included-libcroco",
|
2011-03-19 18:42:27 +00:00
|
|
|
"--without-included-libxml",
|
2011-06-05 02:51:00 +00:00
|
|
|
"--without-emacs",
|
|
|
|
# Don't use VCS systems to create these archives
|
|
|
|
"--without-git",
|
|
|
|
"--without-cvs"
|
2009-06-06 22:54:52 +00:00
|
|
|
system "make"
|
2009-08-07 14:41:43 +00:00
|
|
|
ENV.deparallelize # install doesn't support multiple make jobs
|
2009-06-06 22:54:52 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|