aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ossp-uuid.rb
blob: 4bd97607b647e505e0f1095444084e960f717c4a (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
31
32
require 'formula'

class OsspUuid < Formula
  url 'ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz'
  mirror 'http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz'
  homepage 'http://www.ossp.org/pkg/lib/uuid/'
  md5 '5db0d43a9022a6ebbbc25337ae28942f'

  def options
    [
      ["--32-bit", "Build 32-bit only."],
      ["--universal", "Build with universal binaries and libraries."],
    ]
  end

  def install
    if ARGV.build_universal?
      ENV.universal_binary
    elsif ARGV.include? '--32-bit'
      ENV.append 'CFLAGS', '-arch i386'
      ENV.append 'LDFLAGS', '-arch i386'
    end

    system "./configure", "--disable-debug",
                          "--without-perl",
                          "--without-php",
                          "--without-pgsql",
                          "--prefix=#{prefix}"
    system "make"
    system "make install"
  end
end