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"
|
2014-06-11 11:39:27 +00:00
|
|
|
url "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.10.6/src/nspr-4.10.6.tar.gz"
|
|
|
|
sha1 "9f3f278f7f31574b2cdbb99d9703c58e51cd3e1c"
|
2009-09-01 14:17:44 +00:00
|
|
|
|
2014-03-21 16:45:01 +00:00
|
|
|
bottle do
|
2014-06-11 19:25:12 +00:00
|
|
|
cellar :any
|
|
|
|
sha1 "defd1ff9cccc8b64599c22734757648d031dd2ec" => :mavericks
|
|
|
|
sha1 "f72fbe6a2e2d45bc493faf9798060df4cc588a5e" => :mountain_lion
|
|
|
|
sha1 "a09af6bd5def1c714bb68dc95909a2fd9019e861" => :lion
|
2014-03-21 16:45:01 +00:00
|
|
|
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
|