diff options
| author | Adam Vandenberg | 2010-03-29 12:46:53 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-03-29 12:51:23 -0700 |
| commit | 8701df03a715c70b4f3cef019a578010c2a6ad1e (patch) | |
| tree | 2b6b15fd8d931dd0a293bca9b376f3c802a4c556 /Library/Formula | |
| parent | c5ce05e41636efdcd6060dbe7e3a94fc1e565032 (diff) | |
| download | homebrew-8701df03a715c70b4f3cef019a578010c2a6ad1e.tar.bz2 | |
PostgreSQL - Python build fixes
* Allow building w/o Python or Perl support.
* Warn if a Framework Python is detected that is missing x64.
Fixes #73.
Fixes #671.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/postgresql.rb | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb index 7fe7744c3..cee035260 100644 --- a/Library/Formula/postgresql.rb +++ b/Library/Formula/postgresql.rb @@ -11,24 +11,41 @@ class Postgresql <Formula aka 'postgres' + def options + [ + ['--no-python', 'Build without Python support.'], + ['--no-perl', 'Build without Perl support.'] + ] + end + def install ENV.libxml2 # wouldn't compile for justinlilly otherwise configure_args = [ "--enable-thread-safety", "--with-bonjour", - "--with-python", - "--with-perl", "--with-gssapi", "--with-krb5", "--with-openssl", "--with-libxml", "--with-libxslt", "--prefix=#{prefix}", - "--disable-debug", + "--disable-debug" ] - configure_args << "ARCHFLAGS='-arch x86_64'" if bits_64? + configure_args << "--with-python" unless ARGV.include? '--no-python' + configure_args << "--with-perl" unless ARGV.include? '--no-perl' + + if bits_64? and not ARGV.include? '--no-python' + configure_args << "ARCHFLAGS='-arch x86_64'" + + 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 "You may experience linker problems. See:" + puts "http://osdir.com/ml/pgsql-general/2009-09/msg00160.html" + end + end # Fails on Core Duo with O4 and O3 ENV.O2 if Hardware.intel_family == :core |
