2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-01 14:17:44 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Nspr < Formula
|
2014-03-21 02:06:30 +00:00
|
|
|
homepage "https://developer.mozilla.org/docs/Mozilla/Projects/NSPR"
|
|
|
|
url "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.10.4/src/nspr-4.10.4.tar.gz"
|
|
|
|
sha1 "43b2029d990515f952c89d2921397c064fbbe2e7"
|
2009-09-01 14:17:44 +00:00
|
|
|
|
2014-03-21 16:45:01 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "329f42e5f9b3110234770423792c0c87e18c4d53" => :mavericks
|
|
|
|
sha1 "44a02dcd84912019fdc68398c4e23c1c303dac8b" => :mountain_lion
|
|
|
|
sha1 "33050ee6f28f92be7d7c63a385827db3e0ae8712" => :lion
|
|
|
|
end
|
|
|
|
|
2009-09-01 14:17:44 +00:00
|
|
|
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
|
|
|
|
2012-11-14 06:44:44 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--enable-strip
|
|
|
|
--enable-pthreads
|
|
|
|
--enable-ipv6
|
2013-11-11 05:56:31 +00:00
|
|
|
--enable-macos-target=#{MacOS.version}
|
2012-11-14 06:44:44 +00:00
|
|
|
]
|
2011-03-18 17:30:47 +00:00
|
|
|
args << "--enable-64bit" if MacOS.prefer_64_bit?
|
2010-08-08 04:04:37 +00:00
|
|
|
system "./configure", *args
|
2010-07-07 20:02:40 +00:00
|
|
|
# Remove the broken (for anyone but Firefox) install_name
|
2010-11-02 16:09:10 +00:00
|
|
|
inreplace "config/autoconf.mk", "-install_name @executable_path/$@ ", "-install_name #{lib}/$@ "
|
2010-01-24 13:57:44 +00:00
|
|
|
|
2009-09-01 14:17:44 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
2013-08-02 17:58:00 +00:00
|
|
|
|
2014-03-21 02:06:30 +00:00
|
|
|
(bin/"compile-et.pl").unlink
|
|
|
|
(bin/"prerr.properties").unlink
|
2009-09-01 14:17:44 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|