aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/nspr.rb8
-rw-r--r--Library/Formula/spidermonkey.rb8
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=''"