Skip to content

Commit cd86ac4

Browse files
committed
Merge pull request boxen#26 from DanielWright/master
Bump to 9.3.1
2 parents 638e9b6 + 320d2ac commit cd86ac4

File tree

5 files changed

+9
-51
lines changed

5 files changed

+9
-51
lines changed

files/brews/postgresql.rb

+4-45
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
class Postgresql < Formula
44
homepage 'http://www.postgresql.org/'
5-
url 'http://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.bz2'
6-
sha1 '75b53c884cb10ed9404747b51677358f12082152'
7-
version '9.2.4-boxen2'
5+
url 'http://ftp.postgresql.org/pub/source/v9.3.1/postgresql-9.3.1.tar.bz2'
6+
sha256 '8ea4a7a92a6f5a79359b02e683ace335c5eb45dffe7f8a681a9ce82470a8a0b8'
7+
version '9.3.1-boxen'
88

99
depends_on 'readline'
1010
depends_on 'ossp-uuid'
@@ -18,7 +18,6 @@ def options
1818
]
1919
end
2020

21-
# Fix PL/Python build: https://github.com/mxcl/homebrew/issues/11162
2221
# Fix uuid-ossp build issues: http://archives.postgresql.org/pgsql-general/2012-07/msg00654.php
2322
def patches
2423
DATA
@@ -52,17 +51,13 @@ def install
5251
args << "--with-ossp-uuid" unless ARGV.include? '--no-ossp-uuid'
5352
args << "--with-python" unless ARGV.include? '--no-python'
5453
args << "--with-perl" unless ARGV.include? '--no-perl'
54+
args << "--with-tcl" unless ARGV.include? '--no-tcl'
5555
args << "--enable-dtrace" if ARGV.include? '--enable-dtrace'
5656

5757
ENV.append 'CFLAGS', `uuid-config --cflags`.strip
5858
ENV.append 'LDFLAGS', `uuid-config --ldflags`.strip
5959
ENV.append 'LIBS', `uuid-config --libs`.strip
6060

61-
if not ARGV.build_32_bit? and MacOS.prefer_64_bit? and not ARGV.include? '--no-python'
62-
args << "ARCHFLAGS='-arch x86_64'"
63-
check_python_arch
64-
end
65-
6661
if ARGV.build_32_bit?
6762
ENV.append 'CFLAGS', '-arch i386'
6863
ENV.append 'LDFLAGS', '-arch i386'
@@ -74,45 +69,9 @@ def install
7469
system "./configure", *args
7570
system "make install-world"
7671
end
77-
78-
def check_python_arch
79-
# On 64-bit systems, we need to look for a 32-bit Framework Python.
80-
# The configure script prefers this Python version, and if it doesn't
81-
# have 64-bit support then linking will fail.
82-
framework_python = Pathname.new "/Library/Frameworks/Python.framework/Versions/Current/Python"
83-
return unless framework_python.exist?
84-
unless (archs_for_command framework_python).include? :x86_64
85-
opoo "Detected a framework Python that does not have 64-bit support in:"
86-
puts <<-EOS.undent
87-
#{framework_python}
88-
89-
The configure script seems to prefer this version of Python over any others,
90-
so you may experience linker problems as described in:
91-
http://osdir.com/ml/pgsql-general/2009-09/msg00160.html
92-
93-
To fix this issue, you may need to either delete the version of Python
94-
shown above, or move it out of the way before brewing PostgreSQL.
95-
96-
Note that a framework Python in /Library/Frameworks/Python.framework is
97-
the "MacPython" version, and not the system-provided version which is in:
98-
/System/Library/Frameworks/Python.framework
99-
EOS
100-
end
101-
end
10272
end
10373

10474
__END__
105-
--- a/src/pl/plpython/Makefile 2011-09-23 08:03:52.000000000 +1000
106-
+++ b/src/pl/plpython/Makefile 2011-10-26 21:43:40.000000000 +1100
107-
@@ -24,8 +24,6 @@
108-
# Darwin (OS X) has its own ideas about how to do this.
109-
ifeq ($(PORTNAME), darwin)
110-
shared_libpython = yes
111-
-override python_libspec = -framework Python
112-
-override python_additional_libs =
113-
endif
114-
115-
# If we don't have a shared library and the platform doesn't allow it
11675
--- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700
11776
+++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700
11877
@@ -9,6 +9,8 @@

manifests/params.pp

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
include boxen::config
77

88
$executable = "${boxen::config::home}/homebrew/bin/postgres"
9-
$datadir = "${boxen::config::datadir}/postgresql"
10-
$logdir = "${boxen::config::logdir}/postgresql"
9+
$datadir = "${boxen::config::datadir}/postgresql-9.3"
10+
$logdir = "${boxen::config::logdir}/postgresql-9.3"
1111
$port = 15432
1212

1313
$package = 'boxen/brews/postgresql'
14-
$version = '9.2.4-boxen2'
14+
$version = '9.3.1-boxen'
1515

1616
$service = 'dev.postgresql'
1717

spec/classes/postgresql__config_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
it do
77
should include_class('boxen::config')
88

9-
%w(data/postgresql log/postgresql).each do |d|
9+
%w(data/postgresql-9.3 log/postgresql-9.3).each do |d|
1010
should contain_file("/test/boxen/#{d}").with_ensure(:directory)
1111
end
1212

spec/classes/postgresql__service_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
it do
77
should contain_service("com.boxen.postgresql").with_ensure(:stopped)
88

9-
should contain_exec("init-postgresql-db").with_creates("/test/boxen/data/postgresql/PG_VERSION")
9+
should contain_exec("init-postgresql-db").with_creates("/test/boxen/data/postgresql-9.3/PG_VERSION")
1010
should contain_service("dev.postgresql").with_ensure(:running)
1111
should contain_exec("wait-for-postgresql").with_unless("nc -z 127.0.0.1 15432")
1212
end

spec/defines/postgresql_db_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
should contain_exec("postgresql-db-#{title}").with({
1111
:command => "createdb -p15432 -E UTF-8 -O testuser #{title}",
12-
:require => 'Exec[wait-for-postgresql]',
1312
:unless => "psql -aA -p15432 -t -l | cut -d \\| -f 1 | grep -w '#{title}'"
1413
})
1514
end

0 commit comments

Comments
 (0)