0da74e36e8
All Gettext binaries fail at runtime with linking problems related to the environ variable. According to <http://www.mail-archive.com/bug-gnulib@gnu.org/msg09272.html> the environ variable is missing from some platforms (between them MacOS X), and autoconf test for it, and sets HAVE_ENVIRON_DECL accordingly. A common workaround was declaring "extern char** environ" in the code if the OS didn't provide the environ variable, but that doesn't work since 10.5. Since then you have to use _NSGetEnviron() function declared in crt_externs.h. This workaround works at least since 10.3. t Signed-off-by: Max Howell <max@methylblue.com> Closes Homebrew/homebrew#11
38 lines
1.3 KiB
Ruby
38 lines
1.3 KiB
Ruby
require 'brewkit'
|
|
|
|
class Gettext <Formula
|
|
@url='http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz'
|
|
@md5='58a2bc6d39c0ba57823034d55d65d606'
|
|
@homepage='http://www.gnu.org/software/gettext/'
|
|
|
|
def patches
|
|
{
|
|
:p1 => ['http://gist.github.com/raw/186336/2fe65fab894f94a03aab2f03349ae7f1febcd301/mac-osx-105-environ.patch']
|
|
}
|
|
end
|
|
|
|
def install
|
|
ENV.libxml2
|
|
# TODO seems like this package needs more optmisation
|
|
# maybe someone can tell me how glib depends on gettext, but gettext
|
|
# depends on glib and thus includes its own?!
|
|
system "./configure", "--disable-debug",
|
|
"--prefix=#{prefix}",
|
|
"--disable-dependency-tracking",
|
|
# '--disable-nls ',
|
|
'--without-emacs',
|
|
'--without-included-gettext',
|
|
'--without-included-glib',
|
|
'--without-included-libcroco',
|
|
'--without-included-libxml'
|
|
system "make"
|
|
ENV.deparallelize # install doesn't support multiple make jobs
|
|
system "make install"
|
|
|
|
(doc+'examples').rmtree unless ARGV.include? '--with-examples'
|
|
|
|
def caveats
|
|
"GNU gettext is bloated and manky, please try not to depend on it"
|
|
end
|
|
end
|
|
end
|