diff options
| author | Max Howell | 2011-08-05 13:18:11 +0100 |
|---|---|---|
| committer | Max Howell | 2011-08-05 13:55:25 +0100 |
| commit | 9fa2a4a38e411c1271c8d3b4ddc1c5f722473d51 (patch) | |
| tree | 591aec47f4f56aa64d84ad90c33f0d4dac98730f /Library/Formula | |
| parent | 8fc3cc59a3999bdaeb376becafd667c7d7f68815 (diff) | |
| download | homebrew-9fa2a4a38e411c1271c8d3b4ddc1c5f722473d51.tar.bz2 | |
Statically building our own iconv into formula deemed unnecessary
Now we have our libiconv formula.
Sadly Lion still lacks the iconv_open symbol in 64 bit flavour. Sucks.
Fixes #6066. Indirectly.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/glib.rb | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/Library/Formula/glib.rb b/Library/Formula/glib.rb index 50f5bbeeb..7318bac75 100644 --- a/Library/Formula/glib.rb +++ b/Library/Formula/glib.rb @@ -1,11 +1,5 @@ require 'formula' -class Libiconv < Formula - homepage 'http://www.gnu.org/software/libiconv/' - url 'http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz' - md5 '7ab33ebd26687c744a37264a330bbe9a' -end - def build_tests?; ARGV.include? '--test'; end class Glib < Formula @@ -17,6 +11,11 @@ class Glib < Formula depends_on 'gettext' fails_with_llvm "Undefined symbol errors while linking" + # Lion and Snow Leopard don't have a 64 bit version of the iconv_open + # function. The fact that Lion still doesn't is ridiculous. But we're as + # much to blame. Nobody reported the bug FFS. And I'm still not going to + # because I'm in a hurry here. + depends_on 'libiconv' def patches mp = "https://svn.macports.org/repository/macports/trunk/dports/devel/glib2/files/" @@ -42,31 +41,9 @@ class Glib < Formula def install ENV.universal_binary if ARGV.build_universal? - # Snow Leopard libiconv doesn't have a 64bit version of the libiconv_open - # function, which breaks things for us, so we build our own - # http://www.mail-archive.com/gtk-list@gnome.org/msg28747.html - - iconvd = Pathname.getwd+'iconv' - iconvd.mkpath - - Libiconv.new.brew do - # Help out universal builds - # TODO - do these lines need to be here? - # ENV["ac_cv_func_malloc_0_nonnull"]='yes' - # ENV["gl_cv_func_malloc_0_nonnull"]='1' - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{iconvd}", - "--enable-static", "--disable-shared" - system "make install" - end - # indeed, amazingly, -w causes gcc to emit spurious errors for this package! ENV.enable_warnings - # Statically link to libiconv so glib doesn't use the bugged version in 10.6 - ENV['LDFLAGS'] += " #{iconvd}/lib/libiconv.a" - args = ["--disable-dependency-tracking", "--disable-rebuilds", "--prefix=#{prefix}", "--with-libiconv=gnu"] |
