aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2012-02-03 22:04:59 -0800
committerAdam Vandenberg2012-02-03 22:11:20 -0800
commit794d3408109025955fae9f2702d578f0d293ea65 (patch)
tree789fddb0a19cdb44388b5485606edea9fecb460a /Library
parentca6f3354d002270fde8a5f3dc5e84928afe54929 (diff)
downloadhomebrew-794d3408109025955fae9f2702d578f0d293ea65.tar.bz2
postgresql: add 32-bit only build
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/postgresql.rb9
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