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

class Libffi < Formula
  url 'http://mirrors.kernel.org/sources.redhat.com/libffi/libffi-3.0.10.tar.gz'
  mirror 'ftp://sourceware.org/pub/libffi/libffi-3.0.10.tar.gz'
  homepage 'http://sourceware.org/libffi/'
  sha1 '97abf70e6a6d315d9259d58ac463663051d471e1'

  keg_only :provided_by_osx, "Some formulae require a newer version of libffi."

  def patches
    # both of these are fixed upstream
    { :p0 => ["https://trac.macports.org/export/88691/trunk/dports/devel/libffi/files/patch-configure.diff",
              "https://trac.macports.org/export/88691/trunk/dports/devel/libffi/files/patch-configure-darwin11.diff"] }
  end

  def install
    ENV.universal_binary
    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    system "make install"
  end
end