homebrew-core/Formula/nspr.rb

28 lines
1.0 KiB
Ruby
Raw Normal View History

require 'formula'
class Nspr <Formula
2010-04-08 22:12:57 +00:00
url 'http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.4/src/nspr-4.8.4.tar.gz'
homepage 'http://www.mozilla.org/projects/nspr/'
2010-04-08 22:12:57 +00:00
md5 'a85bdbe1eb646aa32c785a37d8e3a2f5'
def install
ENV.deparallelize
Dir.chdir "mozilla/nsprpub" do
2010-07-07 20:02:40 +00:00
# Fixes a bug with linking against CoreFoundation, needed to work with SpiderMonkey
2010-04-08 22:12:57 +00:00
# See: http://openradar.appspot.com/7209349
2010-07-07 20:02:40 +00:00
target_frameworks = Hardware.is_32_bit? ? "-framework Carbon" : ""
inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", target_frameworks
2010-01-24 13:57:44 +00:00
2010-04-08 22:12:57 +00:00
conf = ["--prefix=#{prefix}", "--disable-debug", "--enable-strip", "--enable-optimize"]
2010-01-24 13:57:44 +00:00
conf << "--enable-64bit" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6
system "./configure", *conf
2010-07-07 20:02:40 +00:00
# Remove the broken (for anyone but Firefox) install_name
inreplace "config/autoconf.mk", "-install_name @executable_path/$@ ", ""
2010-01-24 13:57:44 +00:00
system "make"
system "make install"
end
end
end