diff options
| author | Max Howell | 2010-02-23 15:40:02 +0000 |
|---|---|---|
| committer | Max Howell | 2010-02-23 15:40:02 +0000 |
| commit | fbf398f3611a5e1b8bd893c6fe05f8bb5e06aaa2 (patch) | |
| tree | 11dc686ef136baa7853e3e8ce1001c223aefcf90 | |
| parent | 50493f6b85ce2f61f9a0afffb9eb9b38e64eadf0 (diff) | |
| download | homebrew-fbf398f3611a5e1b8bd893c6fe05f8bb5e06aaa2.tar.bz2 | |
Build disposable autoconf 213 for SpiderMonkey
Seeing as it's only SpiderMonkey that requires this specific version of Autoconf, lets not keep it around needlessly when it's also just a build dependency.
| -rw-r--r-- | Library/Formula/autoconf213.rb | 22 | ||||
| -rw-r--r-- | Library/Formula/spidermonkey.rb | 23 |
2 files changed, 20 insertions, 25 deletions
diff --git a/Library/Formula/autoconf213.rb b/Library/Formula/autoconf213.rb deleted file mode 100644 index 865240717..000000000 --- a/Library/Formula/autoconf213.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'formula' - -class Autoconf213 <Formula - url 'http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.13.tar.gz' - md5 '9de56d4a161a723228220b0f425dc711' - homepage 'http://www.gnu.org/software/autoconf/' - - def keg_only? - :provided_by_osx - end - - def install - inreplace 'configure', 'for ac_prog in mawk gawk nawk awk', 'for ac_prog in awk' - - system "./configure", "--disable-debug", - "--program-suffix=213", - "--prefix=#{prefix}", - "--infodir=#{info}", - "--datadir=#{prefix}/share/autoconf213" - system "make install" - end -end diff --git a/Library/Formula/spidermonkey.rb b/Library/Formula/spidermonkey.rb index 7a2c86000..2d47fe5f1 100644 --- a/Library/Formula/spidermonkey.rb +++ b/Library/Formula/spidermonkey.rb @@ -14,10 +14,8 @@ class Spidermonkey <Formula depends_on 'readline' depends_on 'nspr' - depends_on 'autoconf213' def install - if MACOS_VERSION == 10.5 # aparently this flag causes the build to fail for ivanvc on 10.5 with a # penryn (core 2 duo) CPU. So lets be cautious here and remove it. @@ -25,11 +23,23 @@ class Spidermonkey <Formula ENV['CFLAGS'] = ENV['CFLAGS'].gsub(/-msse[^\s]+/, '') end + # For some reason SpiderMonkey requires Autoconf-2.13 + ac213_prefix = Pathname.pwd.join('ac213').to_s + Autoconf213.new.brew do |f| + # probably no longer required, see issue #751 + inreplace 'configure', 'for ac_prog in mawk gawk nawk awk', 'for ac_prog in awk' + + system "./configure", "--disable-debug", + "--program-suffix=213", + "--prefix=#{ac213_prefix}" + system "make install" + end + Dir.chdir "js/src" do # Fixes a bug with linking against CoreFoundation. Tests all pass after # building like this. See: http://openradar.appspot.com/7209349 inreplace "configure.in", "LDFLAGS=\"$LDFLAGS -framework Cocoa\"", "" - system "autoconf213" + system "#{ac213_prefix}/bin/autoconf213" # Remove the broken *(for anyone but FF) install_name inreplace "config/rules.mk", "-install_name @executable_path/$(SHARED_LIBRARY) ", "" end @@ -54,3 +64,10 @@ class Spidermonkey <Formula end end + + +class Autoconf213 <Formula + url 'http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.13.tar.gz' + md5 '9de56d4a161a723228220b0f425dc711' + homepage 'http://www.gnu.org/software/autoconf/' +end |
