diff options
| author | Paul J. Davis | 2010-01-23 16:38:59 -0500 |
|---|---|---|
| committer | Max Howell | 2010-01-24 13:38:51 +0000 |
| commit | 26b760ba4f92d67edadae5d3e6b70ff98867fcef (patch) | |
| tree | 61b1fb147a86874de247a7c3d43410ac661c38a8 /Library | |
| parent | 16dc9ebc292a6644b7d1c47b7121b28062c7fc3e (diff) | |
| download | homebrew-26b760ba4f92d67edadae5d3e6b70ff98867fcef.tar.bz2 | |
Make the build libmozjs threadsafe.
Needed to avoid a bug in OS X when a library was linked against
CoreFoundation without having it initialized in the main thread.
http://openradar.appspot.com/7209349
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/nspr.rb | 8 | ||||
| -rw-r--r-- | Library/Formula/spidermonkey.rb | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/Library/Formula/nspr.rb b/Library/Formula/nspr.rb index 100173c7a..9e3ed76bc 100644 --- a/Library/Formula/nspr.rb +++ b/Library/Formula/nspr.rb @@ -8,7 +8,13 @@ class Nspr <Formula def install ENV.deparallelize Dir.chdir "mozilla/nsprpub" do - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--enable-strip" + inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", "" + system "./configure", "--prefix=#{prefix}", + "--disable-debug", + "--enable-strip", + "--enable-optimize", + "--enable-64bit" + inreplace "config/autoconf.mk", "-install_name @executable_path/$@ ", "" system "make" system "make install" end diff --git a/Library/Formula/spidermonkey.rb b/Library/Formula/spidermonkey.rb index 962fac587..7a2c86000 100644 --- a/Library/Formula/spidermonkey.rb +++ b/Library/Formula/spidermonkey.rb @@ -13,6 +13,7 @@ class Spidermonkey <Formula head 'hg://http://hg.mozilla.org/tracemonkey' depends_on 'readline' + depends_on 'nspr' depends_on 'autoconf213' def install @@ -25,6 +26,9 @@ class Spidermonkey <Formula 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" # Remove the broken *(for anyone but FF) install_name inreplace "config/rules.mk", "-install_name @executable_path/$(SHARED_LIBRARY) ", "" @@ -34,7 +38,9 @@ class Spidermonkey <Formula Dir.chdir "brew-build" do system "../js/src/configure", "--prefix=#{prefix}", - "--enable-readline" + "--enable-readline", + "--enable-threadsafe", + "--with-system-nspr" inreplace "js-config", /JS_CONFIG_LIBS=.*?$/, "JS_CONFIG_LIBS=''" |
