aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/nspr.rb
blob: bef0c3d984ea30ffcb612b6503832b714d02e2e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'formula'

class Nspr <Formula
  @url='https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.6/src/nspr-4.7.6.tar.gz'
  @homepage='http://www.mozilla.org/projects/nspr/'
  @md5='c78384602b4b466081a55025446641db'

  def install
    require 'hardware'

    ENV.deparallelize
    Dir.chdir "mozilla/nsprpub" do
      inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", ""

      conf = %W[--prefix=#{prefix} --disable-debug --enable-strip --enable-optimize]
      conf << "--enable-64bit" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6
      system "./configure", *conf

      inreplace "config/autoconf.mk", "-install_name @executable_path/$@ ", ""

      system "make"
      system "make install"
    end
  end
end