aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/postgresql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/postgresql.rb')
-rw-r--r--Library/Formula/postgresql.rb27
1 files changed, 19 insertions, 8 deletions
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb
index 70da0e6db..3f7f3a531 100644
--- a/Library/Formula/postgresql.rb
+++ b/Library/Formula/postgresql.rb
@@ -39,16 +39,27 @@ class Postgresql <Formula
if bits_64? and not ARGV.include? '--no-python'
configure_args << "ARCHFLAGS='-arch x86_64'"
+ # On 64-bit systems, we need to look for a 32-bit Framework Python.
+ # The configure script prefers this Python version, and if it doesn't
+ # have 64-bit support then linking will fail.
+
framework_python = Pathname.new "/Library/Frameworks/Python.framework/Versions/Current/Python"
if framework_python.exist? and not (archs_for_command framework_python).include? :x86_64
- opoo "Detected a framework Python that does not have 64-bit support:"
- puts " #{framework_python}"
- puts "You may experience linker problems. See:"
- puts "http://osdir.com/ml/pgsql-general/2009-09/msg00160.html"
- puts
- puts "To build plpython against a specific Python, set PYTHON prior to brewing:"
- puts " PYTHON=/usr/local/bin/python brew install postgresql"
- puts "See: http://www.postgresql.org/docs/8.4/static/install-procedure.html"
+ opoo "Detected a framework Python that does not have 64-bit support in:"
+ puts <<-EOS.undent
+ #{framework_python}
+
+ The configure script seems to prefer this version of Python over any others,
+ so you may experience linker problems as described in:
+ http://osdir.com/ml/pgsql-general/2009-09/msg00160.html
+
+ To fix this issue, you may need to either delete the version of Python
+ shown above, or move it out of the way before brewing PostgreSQL.
+
+ Note that a framework Python in /Library/Frameworks/Python.framework is
+ the "MacPython" verison, and not the system-provided version which is in:
+ /System/Library/Frameworks/Python.framework
+ EOS
end
end