|
2 | 2 |
|
3 | 3 | class Postgresql < Formula
|
4 | 4 | homepage 'http://www.postgresql.org/'
|
5 |
| - url 'http://ftp.postgresql.org/pub/source/v9.3.1/postgresql-9.3.1.tar.bz2' |
6 |
| - sha256 '8ea4a7a92a6f5a79359b02e683ace335c5eb45dffe7f8a681a9ce82470a8a0b8' |
7 |
| - version '9.3.1-boxen' |
| 5 | + url 'http://ftp.postgresql.org/pub/source/v9.3.2/postgresql-9.3.2.tar.bz2' |
| 6 | + sha256 '700da51a71857e092f6af1c85fcd86b46d7d5cd2f2ba343cafb1f206c20232d7' |
| 7 | + version '9.3.2-boxen' |
| 8 | + |
| 9 | + option '32-bit' |
| 10 | + option 'no-perl', 'Build without Perl support' |
| 11 | + option 'no-tcl', 'Build without Tcl support' |
| 12 | + option 'enable-dtrace', 'Build with DTrace support' |
8 | 13 |
|
9 | 14 | depends_on 'readline'
|
10 |
| - depends_on 'ossp-uuid' |
| 15 | + depends_on 'ossp-uuid' => :recommended |
11 | 16 |
|
12 |
| - def options |
13 |
| - [ |
14 |
| - ['--32-bit', 'Build 32-bit only.'], |
15 |
| - ['--no-python', 'Build without Python support.'], |
16 |
| - ['--no-perl', 'Build without Perl support.'], |
17 |
| - ['--enable-dtrace', 'Build with DTrace support.'] |
18 |
| - ] |
| 17 | + conflicts_with 'postgres-xc', |
| 18 | + :because => 'postgresql and postgres-xc install the same binaries.' |
| 19 | + |
| 20 | + fails_with :clang do |
| 21 | + build 211 |
| 22 | + cause 'Miscompilation resulting in segfault on queries' |
19 | 23 | end
|
20 | 24 |
|
21 | 25 | # Fix uuid-ossp build issues: http://archives.postgresql.org/pgsql-general/2012-07/msg00654.php
|
22 | 26 | def patches
|
23 | 27 | DATA
|
24 | 28 | end
|
25 | 29 |
|
26 |
| - skip_clean :all |
27 |
| - |
28 |
| - fails_with :clang do |
29 |
| - build 211 |
30 |
| - cause 'Miscompilation resulting in segfault on queries' |
31 |
| - end |
32 |
| - |
33 | 30 | def install
|
34 |
| - ENV.libxml2 if MacOS.snow_leopard? |
| 31 | + ENV.libxml2 if MacOS.version >= :snow_leopard |
35 | 32 |
|
36 |
| - args = [ |
37 |
| - "--disable-debug", |
38 |
| - "--prefix=#{prefix}", |
39 |
| - "--datadir=#{share}/#{name}", |
40 |
| - "--docdir=#{doc}", |
41 |
| - "--enable-thread-safety", |
42 |
| - "--with-bonjour", |
43 |
| - "--with-gssapi", |
44 |
| - "--with-krb5", |
45 |
| - "--with-openssl", |
46 |
| - "--with-libxml", |
47 |
| - "--with-libxslt", |
48 |
| - "--with-libedit" |
| 33 | + args = %W[ |
| 34 | + --disable-debug |
| 35 | + --prefix=#{prefix} |
| 36 | + --datadir=#{share}/#{name} |
| 37 | + --docdir=#{doc} |
| 38 | + --enable-thread-safety |
| 39 | + --with-bonjour |
| 40 | + --with-gssapi |
| 41 | + --with-krb5 |
| 42 | + --with-ldap |
| 43 | + --with-openssl |
| 44 | + --with-pam |
| 45 | + --with-libxml |
| 46 | + --with-libxslt |
49 | 47 | ]
|
50 | 48 |
|
51 |
| - args << "--with-ossp-uuid" unless ARGV.include? '--no-ossp-uuid' |
52 |
| - args << "--with-python" unless ARGV.include? '--no-python' |
53 |
| - args << "--with-perl" unless ARGV.include? '--no-perl' |
54 |
| - args << "--with-tcl" unless ARGV.include? '--no-tcl' |
55 |
| - args << "--enable-dtrace" if ARGV.include? '--enable-dtrace' |
56 |
| - |
57 |
| - ENV.append 'CFLAGS', `uuid-config --cflags`.strip |
58 |
| - ENV.append 'LDFLAGS', `uuid-config --ldflags`.strip |
59 |
| - ENV.append 'LIBS', `uuid-config --libs`.strip |
| 49 | + args << "--with-ossp-uuid" if build.with? 'ossp-uuid' |
| 50 | + args << "--with-perl" unless build.include? 'no-perl' |
| 51 | + args << "--with-tcl" unless build.include? 'no-tcl' |
| 52 | + args << "--enable-dtrace" if build.include? 'enable-dtrace' |
60 | 53 |
|
61 |
| - if ARGV.build_32_bit? |
62 |
| - ENV.append 'CFLAGS', '-arch i386' |
63 |
| - ENV.append 'LDFLAGS', '-arch i386' |
| 54 | + if build.with? 'ossp-uuid' |
| 55 | + ENV.append 'CFLAGS', `uuid-config --cflags`.strip |
| 56 | + ENV.append 'LDFLAGS', `uuid-config --ldflags`.strip |
| 57 | + ENV.append 'LIBS', `uuid-config --libs`.strip |
64 | 58 | end
|
65 | 59 |
|
66 |
| - # Fails on Core Duo with O4 and O3 |
67 |
| - ENV.O2 if Hardware.intel_family == :core |
| 60 | + if build.build_32_bit? |
| 61 | + ENV.append 'CFLAGS', "-arch #{MacOS.preferred_arch}" |
| 62 | + ENV.append 'LDFLAGS', "-arch #{MacOS.preferred_arch}" |
| 63 | + end |
68 | 64 |
|
69 | 65 | system "./configure", *args
|
70 | 66 | system "make install-world"
|
71 | 67 | end
|
72 | 68 | end
|
73 | 69 |
|
74 | 70 | __END__
|
75 |
| ---- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 |
76 |
| -+++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 |
| 71 | +--- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 |
| 72 | ++++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 |
77 | 73 | @@ -9,6 +9,8 @@
|
78 | 74 | *-------------------------------------------------------------------------
|
79 | 75 | */
|
|
0 commit comments