2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-06 22:54:52 +00:00
|
|
|
|
2013-06-06 20:07:10 +00:00
|
|
|
class Emacs < Requirement
|
|
|
|
fatal true
|
|
|
|
satisfy { which('emacs') }
|
|
|
|
|
|
|
|
def message
|
|
|
|
"Emacs support requires Emacs to be installed."
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gettext < Formula
|
2012-02-26 05:00:28 +00:00
|
|
|
homepage 'http://www.gnu.org/software/gettext/'
|
2013-01-31 03:18:59 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/gettext/gettext-0.18.2.tar.gz'
|
|
|
|
mirror 'http://ftp.gnu.org/gnu/gettext/gettext-0.18.2.tar.gz'
|
|
|
|
sha256 '516a6370b3b3f46e2fc5a5e222ff5ecd76f3089bc956a7587a6e4f89de17714c'
|
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."
|
|
|
|
|
2013-01-31 05:06:21 +00:00
|
|
|
bottle do
|
|
|
|
sha1 'f5347eea2def6a8649075fe2ca306ce5fa2a5338' => :mountain_lion
|
|
|
|
sha1 '003ba77411550fd471b599c2694bba36d343e98f' => :lion
|
|
|
|
sha1 '976ec00f7046b639b8a687b3316a575031859114' => :snow_leopard
|
|
|
|
end
|
|
|
|
|
2012-08-10 04:58:02 +00:00
|
|
|
option :universal
|
2013-06-06 20:07:10 +00:00
|
|
|
option 'with-emacs', 'Build with emacs support'
|
2012-08-10 04:58:02 +00:00
|
|
|
option 'with-examples', 'Keep example files'
|
2009-09-17 20:10:39 +00:00
|
|
|
|
2013-06-06 20:07:10 +00:00
|
|
|
depends_on Emacs if build.include? "with-emacs"
|
|
|
|
|
2011-06-05 02:51:00 +00:00
|
|
|
def patches
|
2012-08-10 04:58:02 +00:00
|
|
|
unless build.include? 'with-examples'
|
2011-06-20 21:07:08 +00:00
|
|
|
# Use a MacPorts patch to disable building examples at all,
|
2011-06-05 02:51:00 +00:00
|
|
|
# rather than build them and remove them afterwards.
|
2013-01-31 03:18:59 +00:00
|
|
|
{:p0 => ['https://trac.macports.org/export/102008/trunk/dports/devel/gettext/files/patch-gettext-tools-Makefile.in']}
|
2011-06-05 02:51:00 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2009-06-06 22:54:52 +00:00
|
|
|
def install
|
2009-08-07 14:41:43 +00:00
|
|
|
ENV.libxml2
|
2012-08-10 04:58:02 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2011-06-05 02:51:51 +00:00
|
|
|
|
2013-06-06 20:07:10 +00:00
|
|
|
args = ["--disable-dependency-tracking",
|
|
|
|
"--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-included-gettext",
|
|
|
|
"--with-included-glib",
|
|
|
|
"--with-included-libcroco",
|
|
|
|
"--with-included-libunistring",
|
|
|
|
# Don't use VCS systems to create these archives
|
|
|
|
"--without-git",
|
|
|
|
"--without-cvs"]
|
|
|
|
if build.include? "with-emacs"
|
|
|
|
args << "--with-emacs"
|
|
|
|
else
|
|
|
|
args << "--without-emacs"
|
|
|
|
end
|
|
|
|
system "./configure", *args
|
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
|