homebrew-core/Formula/nspr.rb

36 lines
1.2 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Nspr < Formula
homepage 'http://www.mozilla.org/projects/nspr/'
2013-08-02 17:57:48 +00:00
url 'https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.10/src/nspr-4.10.tar.gz'
sha256 '0cfbe561676b92e5af3ddc7ac77452014e3da8885da66baec811e7354138cc16'
def install
ENV.deparallelize
2013-08-02 17:57:48 +00:00
cd "nspr" 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
2013-07-10 02:30:15 +00:00
target_frameworks = (Hardware.is_32_bit? or MacOS.version <= :leopard) ? "-framework Carbon" : ""
2010-07-07 20:02:40 +00:00
inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", target_frameworks
2010-01-24 13:57:44 +00:00
args = %W[
--disable-debug
--prefix=#{prefix}
--enable-strip
--enable-pthreads
--enable-ipv6
]
2011-03-18 17:30:47 +00:00
args << "--enable-64bit" if MacOS.prefer_64_bit?
system "./configure", *args
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/$@ ", "-install_name #{lib}/$@ "
2010-01-24 13:57:44 +00:00
system "make"
system "make install"
(bin/'compile-et.pl').unlink
(bin/'prerr.properties').unlink
end
end
end