diff options
| author | Adam Vandenberg | 2012-02-03 22:04:59 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-02-03 22:11:20 -0800 |
| commit | 794d3408109025955fae9f2702d578f0d293ea65 (patch) | |
| tree | 789fddb0a19cdb44388b5485606edea9fecb460a /Library | |
| parent | ca6f3354d002270fde8a5f3dc5e84928afe54929 (diff) | |
| download | homebrew-794d3408109025955fae9f2702d578f0d293ea65.tar.bz2 | |
postgresql: add 32-bit only build
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/postgresql.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb index a4e41f745..6513670e6 100644 --- a/Library/Formula/postgresql.rb +++ b/Library/Formula/postgresql.rb @@ -12,6 +12,7 @@ class Postgresql < Formula def options [ + ['--32-bit', 'Build 32-bit only.'], ['--no-python', 'Build without Python support.'], ['--no-perl', 'Build without Perl support.'], ['--enable-dtrace', 'Build with DTrace support.'] @@ -45,11 +46,14 @@ class Postgresql < Formula ENV.append 'LDFLAGS', `uuid-config --ldflags`.strip ENV.append 'LIBS', `uuid-config --libs`.strip - if MacOS.prefer_64_bit? and not ARGV.include? '--no-python' + if not ARGV.include? '--32-bit' and MacOS.prefer_64_bit? and not ARGV.include? '--no-python' args << "ARCHFLAGS='-arch x86_64'" check_python_arch end + ENV.append 'CFLAGS', '-arch i386' if ARGV.include? '--32-bit' + ENV.append 'LDFLAGS', '-arch i386' if ARGV.include? '--32-bit' + # Fails on Core Duo with O4 and O3 ENV.O2 if Hardware.intel_family == :core @@ -150,6 +154,9 @@ EOS if MacOS.prefer_64_bit? then s << <<-EOS +To install postgresql ( and ossp-uuid ) in 32 bits mode; you may use --32-bit : + brew install postgresql --32-bit + If you want to install the postgres gem, including ARCHFLAGS is recommended: env ARCHFLAGS="-arch x86_64" gem install pg |
