diff options
| author | Max Howell | 2009-09-17 20:10:15 +0100 |
|---|---|---|
| committer | Max Howell | 2009-09-17 22:01:27 +0100 |
| commit | 01b640a8404c1bdd4130bfa693c39e9f0bc04606 (patch) | |
| tree | b8e95c15c7ab1c7f4165fdd0addc2d6d24c9cc26 /Library/Formula | |
| parent | 89283db693e9380ccc2e4abc4fa0ad14b4790202 (diff) | |
| download | homebrew-01b640a8404c1bdd4130bfa693c39e9f0bc04606.tar.bz2 | |
Fixes glib
It compiles, but I am not sure this is safe frankly. The problem is that the OS X iconv is bugged and doesn't have a 64 bit symbol for libiconv_open.
Now we must build 64 bit as otherwise everything that links to iconv must be 32 bit too. So we build a static libiconv and link glib to that. This fills in the missing symbol.
However glib still dynamically links to /usr/lib/libiconv.dylib, this is the bit I'm not happy with. It can be fixed but I'm guessing it's ok. At least at this stage of Homebrew.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/glib.rb | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/Library/Formula/glib.rb b/Library/Formula/glib.rb index 9befe40c1..dd7f26dfb 100644 --- a/Library/Formula/glib.rb +++ b/Library/Formula/glib.rb @@ -1,5 +1,12 @@ require 'brewkit' +class Libiconv <Formula + @url='http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz' + @homepage='http://www.gnu.org/software/libiconv/' + @md5='7ab33ebd26687c744a37264a330bbe9a' +end + + class Glib <Formula @url='http://ftp.acc.umu.se/pub/gnome/sources/glib/2.20/glib-2.20.5.tar.bz2' @md5='4c178b91d82ef80a2da3c26b772569c0' @@ -11,13 +18,32 @@ class Glib <Formula end def install + + # 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 + system "./configure", "--prefix=#{iconvd}", "--disable-debug", "--disable-dependency-tracking", + "--enable-static", "--disable-shared" + system "make install" + end + # indeed, amazingly, -w causes gcc to emit spurious errors for this package! ENV.enable_warnings + # basically we are going to statically link to the symbols that glib doesn't + # find in the bugged GNU libiconv that ships with 10.6 + ENV['LDFLAGS'] += " #{iconvd}/lib/libiconv.a" + system "./configure", "--disable-debug", "--prefix=#{prefix}", "--disable-dependency-tracking", - "--disable-rebuilds" + "--disable-rebuilds", + "--with-libiconv=gnu" system "make" system "make install" |
