diff --git a/files/brews/postgresql.rb b/files/brews/postgresql.rb index 3102e72..21cb3c3 100644 --- a/files/brews/postgresql.rb +++ b/files/brews/postgresql.rb @@ -2,9 +2,9 @@ class Postgresql < Formula homepage 'http://www.postgresql.org/' - url 'http://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.bz2' - sha1 '75b53c884cb10ed9404747b51677358f12082152' - version '9.2.4-boxen2' + url 'http://ftp.postgresql.org/pub/source/v9.3.1/postgresql-9.3.1.tar.bz2' + sha256 '8ea4a7a92a6f5a79359b02e683ace335c5eb45dffe7f8a681a9ce82470a8a0b8' + version '9.3.1-boxen' depends_on 'readline' depends_on 'ossp-uuid' @@ -18,7 +18,6 @@ def options ] end - # Fix PL/Python build: https://github.com/mxcl/homebrew/issues/11162 # Fix uuid-ossp build issues: http://archives.postgresql.org/pgsql-general/2012-07/msg00654.php def patches DATA @@ -52,17 +51,13 @@ def install args << "--with-ossp-uuid" unless ARGV.include? '--no-ossp-uuid' args << "--with-python" unless ARGV.include? '--no-python' args << "--with-perl" unless ARGV.include? '--no-perl' + args << "--with-tcl" unless ARGV.include? '--no-tcl' args << "--enable-dtrace" if ARGV.include? '--enable-dtrace' ENV.append 'CFLAGS', `uuid-config --cflags`.strip ENV.append 'LDFLAGS', `uuid-config --ldflags`.strip ENV.append 'LIBS', `uuid-config --libs`.strip - if not ARGV.build_32_bit? and MacOS.prefer_64_bit? and not ARGV.include? '--no-python' - args << "ARCHFLAGS='-arch x86_64'" - check_python_arch - end - if ARGV.build_32_bit? ENV.append 'CFLAGS', '-arch i386' ENV.append 'LDFLAGS', '-arch i386' @@ -74,45 +69,9 @@ def install system "./configure", *args system "make install-world" end - - def check_python_arch - # 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" - return unless framework_python.exist? - unless (archs_for_command framework_python).include? :x86_64 - 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" version, and not the system-provided version which is in: - /System/Library/Frameworks/Python.framework - EOS - end - end end __END__ ---- a/src/pl/plpython/Makefile 2011-09-23 08:03:52.000000000 +1000 -+++ b/src/pl/plpython/Makefile 2011-10-26 21:43:40.000000000 +1100 -@@ -24,8 +24,6 @@ - # Darwin (OS X) has its own ideas about how to do this. - ifeq ($(PORTNAME), darwin) - shared_libpython = yes --override python_libspec = -framework Python --override python_additional_libs = - endif - - # If we don't have a shared library and the platform doesn't allow it --- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 +++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 @@ -9,6 +9,8 @@ diff --git a/manifests/params.pp b/manifests/params.pp index 925681a..bc5d8ca 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -6,12 +6,12 @@ include boxen::config $executable = "${boxen::config::home}/homebrew/bin/postgres" - $datadir = "${boxen::config::datadir}/postgresql" - $logdir = "${boxen::config::logdir}/postgresql" + $datadir = "${boxen::config::datadir}/postgresql-9.3" + $logdir = "${boxen::config::logdir}/postgresql-9.3" $port = 15432 $package = 'boxen/brews/postgresql' - $version = '9.2.4-boxen2' + $version = '9.3.1-boxen' $service = 'dev.postgresql' diff --git a/spec/classes/postgresql__config_spec.rb b/spec/classes/postgresql__config_spec.rb index 79aa58e..2ebae49 100644 --- a/spec/classes/postgresql__config_spec.rb +++ b/spec/classes/postgresql__config_spec.rb @@ -6,7 +6,7 @@ it do should include_class('boxen::config') - %w(data/postgresql log/postgresql).each do |d| + %w(data/postgresql-9.3 log/postgresql-9.3).each do |d| should contain_file("/test/boxen/#{d}").with_ensure(:directory) end diff --git a/spec/classes/postgresql__service_spec.rb b/spec/classes/postgresql__service_spec.rb index e66f6db..e458fa7 100644 --- a/spec/classes/postgresql__service_spec.rb +++ b/spec/classes/postgresql__service_spec.rb @@ -6,7 +6,7 @@ it do should contain_service("com.boxen.postgresql").with_ensure(:stopped) - should contain_exec("init-postgresql-db").with_creates("/test/boxen/data/postgresql/PG_VERSION") + should contain_exec("init-postgresql-db").with_creates("/test/boxen/data/postgresql-9.3/PG_VERSION") should contain_service("dev.postgresql").with_ensure(:running) should contain_exec("wait-for-postgresql").with_unless("nc -z 127.0.0.1 15432") end diff --git a/spec/defines/postgresql_db_spec.rb b/spec/defines/postgresql_db_spec.rb index 5304638..4ba016b 100644 --- a/spec/defines/postgresql_db_spec.rb +++ b/spec/defines/postgresql_db_spec.rb @@ -9,7 +9,6 @@ should contain_exec("postgresql-db-#{title}").with({ :command => "createdb -p15432 -E UTF-8 -O testuser #{title}", - :require => 'Exec[wait-for-postgresql]', :unless => "psql -aA -p15432 -t -l | cut -d \\| -f 1 | grep -w '#{title}'" }) end