aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/pixman.rb
blob: 6e77355965f4d01299d52564e3a81ef0bb2aa740 (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
26
27
28
29
30
require 'formula'

class Pixman < Formula
  homepage 'http://www.cairographics.org/'
  url 'http://cairographics.org/releases/pixman-0.24.2.tar.gz'
  sha1 'acfc724d8032d3c0677b4466807e120e0c867678'

  depends_on 'pkg-config' => :build

  def options
    [["--universal", "Build a universal binary."]]
  end

  def install
    ENV.universal_binary if ARGV.build_universal?
    if ENV.compiler == :llvm
      if MacOS.xcode_version >= "4.1"
        ENV.clang
      else
        ENV.gcc_4_2
      end
    end

    # Disable gtk as it is only used to build tests
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--enable-gtk=no"
    system "make install"
  end
end