summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2008-03-26 14:01:25 +0000
committerCaleb Tennis <caleb@gentoo.org>2008-03-26 14:01:25 +0000
commitee5581ee6ddde07902452ae86b6c5e22816eef9e (patch)
treea8b3fe3a0c4f0282df853e508921c8f7f11e5d45 /dev-db/postgresql
parentVersion bump (diff)
downloadhistorical-ee5581ee6ddde07902452ae86b6c5e22816eef9e.tar.gz
historical-ee5581ee6ddde07902452ae86b6c5e22816eef9e.tar.bz2
historical-ee5581ee6ddde07902452ae86b6c5e22816eef9e.zip
Version bump, with ebuidls and modifications from 206725
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'dev-db/postgresql')
-rw-r--r--dev-db/postgresql/ChangeLog10
-rw-r--r--dev-db/postgresql/Manifest9
-rw-r--r--dev-db/postgresql/files/postgresql-8.3.1-gentoo.patch59
-rw-r--r--dev-db/postgresql/files/postgresql-8.3.1-regress_su.patch13
-rw-r--r--dev-db/postgresql/files/postgresql-8.3.1-sh.patch35
-rw-r--r--dev-db/postgresql/files/postgresql.conf-8.339
-rw-r--r--dev-db/postgresql/files/postgresql.init-8.357
-rw-r--r--dev-db/postgresql/postgresql-8.3.1.ebuild226
8 files changed, 446 insertions, 2 deletions
diff --git a/dev-db/postgresql/ChangeLog b/dev-db/postgresql/ChangeLog
index 5a06b8f8749f..035a6d9d68ba 100644
--- a/dev-db/postgresql/ChangeLog
+++ b/dev-db/postgresql/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-db/postgresql
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.374 2008/03/26 13:17:58 caleb Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.375 2008/03/26 14:01:24 caleb Exp $
+
+*postgresql-8.3.1 (26 Mar 2008)
+
+ 26 Mar 2008; Caleb Tennis <caleb@gentoo.org> +files/postgresql.conf-8.3,
+ +files/postgresql.init-8.3, +files/postgresql-8.3.1-gentoo.patch,
+ +files/postgresql-8.3.1-regress_su.patch,
+ +files/postgresql-8.3.1-sh.patch, +postgresql-8.3.1.ebuild:
+ Version bump, with ebuilds and modifications from 206725
*postgresql-8.2.7 (26 Mar 2008)
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index e58d3567a877..69942b4e419e 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -19,27 +19,34 @@ AUX postgresql-8.2.7-python-threads.patch 1634 RMD160 2b7b7656c96e5294b619acd68d
AUX postgresql-8.2.7-regress_fix.patch 1405 RMD160 268d2bd60d1abb12e7d42f1f8a98f064eda05f46 SHA1 7d7d826c14a3c6a00e29c2e4edb1e7d33812a978 SHA256 217a588720f9e20ab1db5f4eb4cda6189cb471477901a9e281d0cca0a1ed2862
AUX postgresql-8.2.7-regress_su.patch 898 RMD160 509319d82d263d903197f645c6db9fb3c020e11c SHA1 d090aa9870cda00ade6a53380ce95cdb416523e1 SHA256 953e4e2667fae709f764c81a6c3f176fb20692071fc00341a869cfbfab4a5977
AUX postgresql-8.2.7-sh.patch 771 RMD160 10fed524ffd10845a59c7764a5eebe4d6fb2047f SHA1 e53700e73d98e863e7930b4ef0409ca45a004039 SHA256 14c917eaabf3c02033a2ce148f3aadb1c71b6ac3deb7147757bc06116cfd5413
+AUX postgresql-8.3.1-gentoo.patch 1709 RMD160 7bae85c083a4ec0321afbe77d2653e058d0853ff SHA1 69ae1e8eaaa71ba05ed75f2802281f3597a9c638 SHA256 acbc543a5c8a6da1163686805fe0144f9587b2c7038bc6724f93aa1ad71ef2c4
+AUX postgresql-8.3.1-regress_su.patch 983 RMD160 305a9d0c6c85ed4ee1867ff3c3a1982301e69482 SHA1 979bf810741f1a0575e1450d7c278efc1045d37a SHA256 3c2ad22a5afdc4c127e1a6dd025f7b1c833d0fe92ca12cb222f192498f231582
+AUX postgresql-8.3.1-sh.patch 774 RMD160 fa0ff9932451830dba2ea9c6929d5e18b4d64699 SHA1 c8ef69be9c93e9370397d624250613e06982f794 SHA256 d14f4fa9d32bc0d87bb1055eeac82a6317ad60fe4fccf06b7f1a4f8db0feb417
AUX postgresql.conf-7.3 391 RMD160 08437cac48aa9fc5d5b2840cf23395cb71fc270b SHA1 5a627c9f3d7f41df9e3228a2301f6ee0daf5f16f SHA256 b935682b39bf139f7d0a20a5901dd084476e4cc17189c0fc979f17334063701e
AUX postgresql.conf-7.4 609 RMD160 eeee59a542da3f1f4f8ea06f344e75764a141a14 SHA1 19e59878bfee0be66af1ad35dd46cbc70e761844 SHA256 f906adea9223b0d03455d4a27a09639212ef8576d59c1148dccf9596c0c42683
AUX postgresql.conf-8.0 1501 RMD160 000cf1b34d89eaa84abd24743f16e9cb97ab3c47 SHA1 a4cbcd665213739fc95adb879dbb68d1dde2fa60 SHA256 d3d2c3f72fae8470274b754656f2fadba1937d5246c14c0e258c9d59eb6073fd
AUX postgresql.conf-8.1 1501 RMD160 000cf1b34d89eaa84abd24743f16e9cb97ab3c47 SHA1 a4cbcd665213739fc95adb879dbb68d1dde2fa60 SHA256 d3d2c3f72fae8470274b754656f2fadba1937d5246c14c0e258c9d59eb6073fd
AUX postgresql.conf-8.2 1498 RMD160 7e6777f5d794bf207f9e4838c5d06a61974c0f75 SHA1 d00c7e6c9ca415962eba95b8448d1b4ae878c33d SHA256 f0fe5599b4850f476fa23b9e663b83b1bcc46fb343fea2db1625375e4e7121f8
+AUX postgresql.conf-8.3 1229 RMD160 d91c3df78f57d7dd24df57f22b3bbdd372dd08c1 SHA1 d56d661220e24d599f708672198dde984612e4e4 SHA256 01f0ee1e830717ac2525e346dbb18ad63851b6aa4ec7a8ae733575423f645f9c
AUX postgresql.init-7.3 1332 RMD160 deb0bbb69d96ec21ac9b9b636f62fb47f5d997ab SHA1 571fc01d85a37061baef8f7e291cae481f6cf87a SHA256 15296b663506b9840990a08d592adda16acbb1b59b57b81484808e5486b35ab4
AUX postgresql.init-7.4 1348 RMD160 6fbb9aeff7137cc15a58b7bc957d4b6025a03b82 SHA1 445397c698f30ecc8124f7d65b3f92b13f5e4e97 SHA256 5f7d16795081250a2f97f4ad3b2cfee8bcbd822c83c10cc168d31cdd28eff7dc
AUX postgresql.init-8.0 1427 RMD160 5c986fd26088de238209f87b286e6ed03ea66de1 SHA1 20d33878df08a12e89e9402f6f9c0610a6336c92 SHA256 15539a700866cec666bdd692749ccdec2dd538f61500c0d5e6c024e8a8db106f
AUX postgresql.init-8.1 1427 RMD160 5dd0d8e818d26e296d9b81f754043597bda02901 SHA1 47814beca16af4e2f03df3e810b50c2b71bc0d1a SHA256 f315e1c54f7b7d1d94fa4a2229bd49aac38534a44fb6d9d8c08c21c27c39b199
AUX postgresql.init-8.2 1427 RMD160 74393b4eb2b851c01deaa3dea10757c9bb74bd73 SHA1 2b0365f9c8d1121f948a7e6c83d3f10dfa568a87 SHA256 c42e7ba85638a31826b4ed7a92a9f95cd242bbe7c846e52a8b87e0db28c17da5
+AUX postgresql.init-8.3 1425 RMD160 7c8d544fb947f274495ff7eb4ff3c84d42aafb7f SHA1 d828fa856d0036e5dbcf68d997040d20d9d9eadd SHA256 2eb563677d111054369e8e8c7ba18adb39bcaad1e5002208f6ab1a3b149597dd
DIST postgresql-7.3.21.tar.bz2 9284558 RMD160 f9de4676b4fbe3d96e6d1462b8bc3c05600d6525 SHA1 bdfa3bddc483c6642cc2ee271d076bfaa4c20c92 SHA256 bf44e0ac259e9f6e14ac102f2977496b6996ecea2fd227fbdcea5fa70e342888
DIST postgresql-7.4.19.tar.bz2 10307396 RMD160 c9a1c7dc8e7bf9ce93c3b4f061af0563b1cc2627 SHA1 19c563d47b0d5deeef03b5ca7707c9f1917853ce SHA256 447ac7070aa0a547f17a307e842734fc27e2716cb4a251fa9a810b178d44c389
DIST postgresql-8.0.15.tar.bz2 11253897 RMD160 6aff5c63dce73eea609f0b6e013cd043ae8b7a37 SHA1 66a6fef7749afb91471200005511c04fc1ac2706 SHA256 59408a00db1c73e638a11af10438a827507b7a72b53916d58f2d44c477718714
DIST postgresql-8.1.11.tar.bz2 11735420 RMD160 9fb98eadc4f1015205970f26b31b68ea0378bda9 SHA1 73c0f09754fc8e3c7f8d7de49d70244b76927416 SHA256 3e91cdfc1353fa9c6416d9fc8ae9d6ab3171565f00aeb6c882214c2f08a03e2e
DIST postgresql-8.2.6.tar.bz2 12559117 RMD160 fa12ce310919cb52be3558d38a7e329bc73bbe33 SHA1 8934dfbd4c1d8c4f2945cb80f02072611681f967 SHA256 ee41327e821f933de2894d6e0c319edc4b63e80cb902e673b490b7eaf4ead114
DIST postgresql-8.2.7.tar.bz2 12576126 RMD160 96700e91c3b9e733c686b0fe377c7ba661710942 SHA1 0be0dbaa488810ebcba77ac7246180c5b2a9b669 SHA256 39528d1ba50f5abc51569e8b9bdeb47d0d4650d289a2c2e465621864b1ff3584
+DIST postgresql-8.3.1.tar.bz2 13995572 RMD160 075efb67126f2b308d2a5fe4f9097fdbfbe94c89 SHA1 7397e0d8fd3c420ee845d9ae4995ae347bfaea1d SHA256 7ccf1e5c987920e4d6eb98b8589939e29d3a361d285055d5af35ddd8e1a2d992
EBUILD postgresql-7.3.21.ebuild 8221 RMD160 793fd99850e80795f51ce5d85a19bddfd9256e40 SHA1 2576a0b48b6caa4315a47d93b45de7510a9d3b82 SHA256 71a8e87bb014459b13993bf6f71c19763868d6b36cf641c780370d299fba8091
EBUILD postgresql-7.4.19.ebuild 9633 RMD160 5be32050f70857d97c350a6e554141e673bbff33 SHA1 2e698da801adbfdfa874377780eb034e9b8d8430 SHA256 5d120c241c55b1382863b3ed7ffb67bf2eb9c53ad95f10ab533f14bf4d9d4b1f
EBUILD postgresql-8.0.15.ebuild 9607 RMD160 664c5ec32c87b24dc47664222196e49609f2542e SHA1 4d3163083ec554b377b818738b0c893a272fc6c3 SHA256 9c2b6305e85c71c5864b205e88f35703797c1285eb0d680a883efb5ab0d13d5e
EBUILD postgresql-8.1.11.ebuild 8512 RMD160 fd1e3e761658f1fa937fb72f085269c66c10d027 SHA1 0c3c0b85675184cde28e45fcbce42b26a47cc60d SHA256 b971c804c88ba3960087cf21b538117506582ba75bf8fcf97b826f0c563634b9
EBUILD postgresql-8.2.6.ebuild 8105 RMD160 bd276f9f2146e9f2cd8ee4b5f8268a44f4910f64 SHA1 254240fbcac35d4f0cbc532b722125f19e480550 SHA256 acd5a1244c989880082430ea1343789d8f7990ce046172758a99cffb1b6ac7eb
EBUILD postgresql-8.2.7.ebuild 8091 RMD160 674452e1b11e778233f11e15ea6954e2940c5cd6 SHA1 0065dba34526a3daf24fbeb8907dcda63b75db7f SHA256 0f74050256c31a6d28d855d3b8d6b53bf481d3363e9b0d0d1ce4d162b84f415b
-MISC ChangeLog 79512 RMD160 24068ff468b9b2b98bb1f3cc6317b7d732a70ccd SHA1 40ae6191d834f174d92d868ac90d2251759c95b3 SHA256 5c6d9aeb79bff59ca31f88da05672457041f3ad15b8fad982faa0fbfcf6c2f8a
+EBUILD postgresql-8.3.1.ebuild 8003 RMD160 f15373c35bff24060210fd82124d67e426bd5ba3 SHA1 bc9fe695b97dfd6a74b5d6ccdd8421167445061f SHA256 1540ad9ea2e7214ba8a2ef3defa42d2ac468d2a1394875de88d421701072f464
+MISC ChangeLog 79854 RMD160 ae1c8e85c6285b0321748e3ac1a5a81d656b0abb SHA1 e5fa67267e12c1a90b04e4851e4fc7e00d8dba75 SHA256 2deb975b2747bc2e58871ea93f6cd1783db1525311a8811a7aff0eb8c3db36fa
MISC metadata.xml 164 RMD160 becfe652663bd65719dd11fa6ffb588b3d5b4ecc SHA1 f67b7ac1c5e6e65ef5a19a589d4759c84918f86c SHA256 7e8e8126bc8701c4a42c7dfed8bb755ac6040fe3d0e3f994d888f8b2b4fa7d8b
diff --git a/dev-db/postgresql/files/postgresql-8.3.1-gentoo.patch b/dev-db/postgresql/files/postgresql-8.3.1-gentoo.patch
new file mode 100644
index 000000000000..0d32b4bf6c9c
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-8.3.1-gentoo.patch
@@ -0,0 +1,59 @@
+--- postgresql-8.3RC1.orig/src/bin/Makefile 2006-03-05 16:58:50.000000000 +0100
++++ postgresql-8.3RC1/src/bin/Makefile 2007-03-29 12:12:26.000000000 +0200
+@@ -14,7 +14,7 @@
+ include $(top_builddir)/src/Makefile.global
+
+ DIRS = initdb ipcclean pg_ctl pg_dump \
+- psql scripts pg_config pg_controldata pg_resetxlog
++ psql scripts pg_controldata pg_resetxlog
+ ifeq ($(PORTNAME), win32)
+ DIRS+=pgevent
+ endif
+--- postgresql-8.3RC1.orig/src/interfaces/Makefile 2004-04-20 02:33:51.000000000 +0200
++++ postgresql-8.3RC1/src/interfaces/Makefile 2007-03-29 12:14:01.000000000 +0200
+@@ -12,7 +12,7 @@
+ top_builddir = ../..
+ include $(top_builddir)/src/Makefile.global
+
+-DIRS = libpq ecpg
++DIRS = ecpg
+
+ ALLDIRS = $(DIRS)
+
+--- postgresql-8.3RC1.orig/src/Makefile 2006-06-23 01:50:35.000000000 +0200
++++ postgresql-8.3RC1/src/Makefile 2007-03-29 12:54:59.000000000 +0200
+@@ -19,12 +19,10 @@
+ $(MAKE) -C backend $@
+ $(MAKE) -C backend/utils/mb/conversion_procs $@
+ $(MAKE) -C backend/snowball $@
+- $(MAKE) -C include $@
+ $(MAKE) -C interfaces $@
+ $(MAKE) -C bin $@
+ $(MAKE) -C pl $@
+ $(MAKE) -C makefiles $@
+- $(MAKE) -C test/regress $@
+
+ install: install-local
+
+@@ -49,7 +47,6 @@
+ $(MAKE) -C timezone $@
+ $(MAKE) -C backend $@
+ $(MAKE) -C backend/snowball $@
+- $(MAKE) -C include $@
+ $(MAKE) -C interfaces $@
+ $(MAKE) -C bin $@
+ $(MAKE) -C pl $@
+@@ -63,12 +60,10 @@
+ -$(MAKE) -C timezone $@
+ -$(MAKE) -C backend $@
+ -$(MAKE) -C backend/snowball $@
+- -$(MAKE) -C include $@
+ -$(MAKE) -C interfaces $@
+ -$(MAKE) -C bin $@
+ -$(MAKE) -C pl $@
+ -$(MAKE) -C makefiles $@
+- -$(MAKE) -C test $@
+ -$(MAKE) -C tutorial NO_PGXS=1 $@
+ -$(MAKE) -C test/thread $@
+ rm -f Makefile.port Makefile.global
+
diff --git a/dev-db/postgresql/files/postgresql-8.3.1-regress_su.patch b/dev-db/postgresql/files/postgresql-8.3.1-regress_su.patch
new file mode 100644
index 000000000000..49331d809236
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-8.3.1-regress_su.patch
@@ -0,0 +1,13 @@
+--- postgresql-8.3RC1.orig/src/test/regress/GNUmakefile 2008-01-20 00:22:49.000000000 +0200
++++ postgresql-8.3RC1/src/test/regress/GNUmakefile 2008-01-20 00:26:27.000000000 +0200
+@@ -141,7 +141,8 @@
+ ##
+
+ check: all
+- ./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) $(TEMP_CONF)
++ chown portage testtablespace .
++ su -s /bin/sh portage -c "./pg_regress --psqldir=`pwd`/../../bin/psql --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) $(TEMP_CONF)"
+
+ installcheck: all
+ ./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
+
diff --git a/dev-db/postgresql/files/postgresql-8.3.1-sh.patch b/dev-db/postgresql/files/postgresql-8.3.1-sh.patch
new file mode 100644
index 000000000000..a6d96bf1dc57
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-8.3.1-sh.patch
@@ -0,0 +1,35 @@
+--- postgresql-8.3RC1.orig/src/include/storage/s_lock.h 2006-06-08 00:24:45.000000000 +0200
++++ postgresql-8.3RC1/src/include/storage/s_lock.h 2007-03-29 12:25:56.000000000 +0200
+@@ -299,6 +299,31 @@
+ #endif /* __s390__ || __s390x__ */
+
+
++#if defined(__sh__)
++#define HAS_TEST_AND_SET
++
++typedef unsigned char slock_t;
++
++#define TAS(lock) tas(lock)
++
++static __inline__ int
++tas(volatile slock_t *lock)
++{
++ register int _res = 1;
++
++ __asm__ __volatile__(
++ "tas.b @%1\n\t"
++ "movt %0\n\t"
++ "xor #1,%0"
++: "=z"(_res)
++: "r"(lock)
++: "t","memory");
++ return _res;
++}
++
++#endif /* __sh__ */
++
++
+ #if defined(__sparc__) /* Sparc */
+ #define HAS_TEST_AND_SET
+
+
diff --git a/dev-db/postgresql/files/postgresql.conf-8.3 b/dev-db/postgresql/files/postgresql.conf-8.3
new file mode 100644
index 000000000000..7ceb3077f31c
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.conf-8.3
@@ -0,0 +1,39 @@
+# PostgreSQL's Database Directory
+PGDATA="/var/lib/postgresql/data"
+
+# PostgreSQL User
+PGUSER="postgres"
+
+# PostgreSQL Group
+PGGROUP="postgres"
+
+# Extra options to run postmaster with
+PGOPTS=""
+
+
+# SERVER SHUTDOWN:
+# The server will receive 3 signals in the worst case:
+# 1. SIGTERM
+# This signals the server to ignore new connections and to
+# wait for all clients to end their transactions before shutting down.
+# Use WAIT_FOR_DISCONNECT to control how much time the clients
+# should have until the next signal is being sent.
+# 2. SIGINT
+# Tell the server to forcefully disconnect all clients.
+# Terminating a client results in a rollback of the open transactions for this client.
+# Use WAIT_FOR_CLEANUP to determine how much time the server has
+# for cleanup. (Set it to "forever" if you want to wait forever.)
+# 3. SIGQUIT
+# This will terminate the server immediately and results in a recovery run for the next start.
+
+# Wait for clients to disconnect (seconds or "forever")
+WAIT_FOR_DISCONNECT=10
+
+# Time the server has to clean up (seconds or "forever")
+WAIT_FOR_CLEANUP=10
+
+# If you have to export environment variables for the database process,
+# this can be done here.
+# Example:
+# export R_HOME="/usr/lib/R"
+
diff --git a/dev-db/postgresql/files/postgresql.init-8.3 b/dev-db/postgresql/files/postgresql.init-8.3
new file mode 100644
index 000000000000..c7a4221b0b15
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.init-8.3
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/files/postgresql.init-8.3,v 1.1 2008/03/26 14:01:25 caleb Exp $
+
+opts="${opts} reload"
+
+depend() {
+ use net
+}
+
+checkconfig() {
+ if [ ! -d "$PGDATA" ] ; then
+ eerror "Directory not found: $PGDATA"
+ eerror "Please make sure that PGDATA points to the right path."
+ eerror "You can run 'emerge postgresql --config' to setup a new database cluster."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting PostgreSQL"
+
+ if [ -f "$PGDATA/postmaster.pid" ] ; then
+ rm -f "$PGDATA/postmaster.pid"
+ fi
+
+ start-stop-daemon --start \
+ --pidfile "${PGDATA}/postmaster.pid" \
+ --chuid ${PGUSER}:${PGGROUP} \
+ --exec /usr/bin/postmaster \
+ -- \
+ -D "${PGDATA}" \
+ --silent-mode=true \
+ ${PGOPTS}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PostgreSQL"
+ # Note: we have to do --oknodo here, otherwise it will always fail
+ # when there are open transactions. This bug has been corrected
+ # in baselayout-1.13.0_alpha8.
+ start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \
+ --retry -TERM/${WAIT_FOR_DISCONNECT}/-INT/${WAIT_FOR_CLEANUP}/-QUIT --oknodo
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PostgreSQL configuration"
+ start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" --signal HUP --oknodo
+ eend $?
+}
+
diff --git a/dev-db/postgresql/postgresql-8.3.1.ebuild b/dev-db/postgresql/postgresql-8.3.1.ebuild
new file mode 100644
index 000000000000..d1eefdc1013d
--- /dev/null
+++ b/dev-db/postgresql/postgresql-8.3.1.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.3.1.ebuild,v 1.1 2008/03/26 14:01:24 caleb Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs versionator
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+
+MY_PV="${PV/_rc/RC}"
+DESCRIPTION="Sophisticated and powerful Object-Relational DBMS."
+HOMEPAGE="http://www.postgresql.org/"
+SRC_URI="mirror://postgresql/source/v${MY_PV}/${PN}-${MY_PV}.tar.bz2"
+LICENSE="POSTGRESQL"
+SLOT="0"
+IUSE="debug doc kerberos kernel_linux nls pam perl pg-intdatetime python readline selinux ssl tcl test xml zlib"
+RESTRICT="mirror"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+RDEPEND="~dev-db/libpq-${PV}
+ >=sys-libs/ncurses-5.2
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )
+ perl? ( >=dev-lang/perl-5.6.1-r2 )
+ python? ( >=dev-lang/python-2.2 dev-python/egenix-mx-base )
+ readline? ( >=sys-libs/readline-4.1 )
+ selinux? ( sec-policy/selinux-postgresql )
+ ssl? ( >=dev-libs/openssl-0.9.6-r1 )
+ tcl? ( >=dev-lang/tcl-8 )
+ xml? ( dev-libs/libxml2 dev-libs/libxslt )
+ zlib? ( >=sys-libs/zlib-1.1.3 )"
+DEPEND="${RDEPEND}
+ sys-devel/autoconf
+ >=sys-devel/bison-1.875
+ nls? ( sys-devel/gettext )
+ xml? ( dev-util/pkgconfig )"
+
+PG_DIR="/var/lib/postgresql"
+[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512"
+
+pkg_setup() {
+ if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then
+ if [[ $(cat "${PG_DIR}/data/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then
+ eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must"
+ eerror "use pg_dump to export your existing databases to a file, and then"
+ eerror "pg_restore to import them when you have upgraded completely."
+ eerror "You must remove your entire database directory to continue."
+ eerror "(database directory = ${PG_DIR})."
+ die "Remove your database directory to continue"
+ fi
+ fi
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/bash /var/lib postgres
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-${PV}-gentoo.patch"
+ epatch "${FILESDIR}/${PN}-${PV}-sh.patch"
+
+ # Prepare package for future tests
+ if use test ; then
+ # Fix sandbox violation; note that we're stripping redundant slashes
+ # from ${S}, because otherwise the test would fail.
+ sed -e "s|/no/such/location|${S/\/\//\/}/src/test/regress/tmp_check/no/such/location|g" -i src/test/regress/{input,output}/tablespace.source
+
+ # We need to run the tests as a non-root user, portage seems the most fitting here,
+ # so if userpriv is enabled, we use it directly. If userpriv is disabled, we need to
+ # su - to a valid user, portage again, so we patch the test-scripts to do that.
+ mkdir -p "${S}/src/test/regress/tmp_check"
+ chown portage "${S}/src/test/regress/tmp_check"
+ einfo "Tests will be run as user portage."
+ if ! hasq userpriv ${FEATURES} ; then
+ mkdir -p "${S}/src/test/regress/results"
+ chown portage "${S}/src/test/regress/results"
+ epatch "${FILESDIR}/${PN}-${PV}-regress_su.patch"
+ fi
+ fi
+}
+
+src_compile() {
+ filter-flags -ffast-math -feliminate-dwarf2-dups
+
+ econf --prefix=/usr \
+ --includedir=/usr/include/postgresql/pgsql \
+ --sysconfdir=/etc/postgresql \
+ --mandir=/usr/share/man \
+ --host=${CHOST} \
+ --with-docdir=/usr/share/doc/${PF} \
+ --libdir=/usr/$(get_libdir) \
+ --enable-depend \
+ $(use_enable debug ) \
+ $(use_with kerberos krb5) \
+ $(use_enable nls ) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_enable pg-intdatetime integer-datetimes ) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(use_with tcl) \
+ $(use_with xml libxml) \
+ $(use_with zlib) \
+ --with-system-tzdata=/usr/share/zoneinfo \
+ || die "configure failed"
+
+ emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "main emake failed"
+ emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" -C contrib all || die "contrib emake failed"
+}
+
+src_install() {
+ if use perl ; then
+ mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
+ sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
+ "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
+ fi
+
+ cd "${S}"
+ emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "main emake install failed"
+ emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" -C contrib install || die "contrib emake install failed"
+
+ cd "${S}"
+ dodoc README HISTORY
+
+ cd "${S}/doc"
+ dodoc FAQ* README.* TODO bug.template
+
+ if use doc ; then
+ cd "${S}/doc"
+ docinto FAQ_html
+ dodoc src/FAQ/*
+ docinto sgml
+ dodoc src/sgml/*.{sgml,dsl}
+ docinto sgml/ref
+ dodoc src/sgml/ref/*.sgml
+ docinto TODO.detail
+ dodoc TODO.detail/*
+ fi
+
+ newinitd "${FILESDIR}/postgresql.init-${PV%[._]*}" postgresql || die "Inserting init.d-file failed"
+ newconfd "${FILESDIR}/postgresql.conf-${PV%[._]*}" postgresql || die "Inserting conf.d-file failed"
+}
+
+pkg_postinst() {
+ elog "Execute the following command to setup the initial database environment:"
+ elog
+ elog "emerge --config =${PF}"
+ elog
+ elog "The autovacuum function, which was in contrib, has been moved to the main"
+ elog "PostgreSQL functions starting with 8.1."
+ elog "You can enable it in ${ROOT}/etc/postgresql/postgresql.conf."
+ elog
+ elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc/postgresql/'."
+}
+
+pkg_config() {
+ einfo "Creating the data directory ..."
+ mkdir -p "${PG_DIR}/data"
+ chown -Rf postgres:postgres "${PG_DIR}"
+ chmod 0700 "${PG_DIR}/data"
+
+ einfo "Initializing the database ..."
+ if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then
+ eerror "PostgreSQL ${PV} cannot upgrade your existing databases."
+ eerror "You must remove your entire database directory to continue."
+ eerror "(database directory = ${PG_DIR})."
+ die "Remove your database directory to continue"
+ else
+ if use kernel_linux ; then
+ local SEM=`sysctl -n kernel.sem | cut -f-3`
+ local SEMMNI=`sysctl -n kernel.sem | cut -f4`
+ local SEMMNI_MIN=`expr \( ${PG_MAX_CONNECTIONS} + 15 \) / 16`
+ local SHMMAX=`sysctl -n kernel.shmmax`
+ local SHMMAX_MIN=`expr 500000 + 30600 \* ${PG_MAX_CONNECTIONS}`
+
+ if [ ${SEMMNI} -lt ${SEMMNI_MIN} ] ; then
+ eerror "The current value of SEMMNI is too low"
+ eerror "for PostgreSQL to run ${PG_MAX_CONNECTIONS} connections!"
+ eerror "Temporary setting this value to ${SEMMNI_MIN} while creating the initial database."
+ echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem
+ fi
+
+ su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data"
+
+ if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then
+ echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem
+ ewarn "Restoring the SEMMNI value to the previous value."
+ ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf"
+ ewarn "and set it to at least ${SEMMNI_MIN}:"
+ ewarn
+ ewarn " kernel.sem = ${SEM} ${SEMMNI_MIN}"
+ ewarn
+ fi
+
+ if [ ${SHMMAX} -lt ${SHMMAX_MIN} ] ; then
+ eerror "The current value of SHMMAX is too low for postgresql to run."
+ eerror "Please edit /etc/sysctl.conf and set this value to at least ${SHMMAX_MIN}:"
+ eerror
+ eerror " kernel.shmmax = ${SHMMAX_MIN}"
+ eerror
+ fi
+ else
+ su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data"
+ fi
+
+ einfo
+ einfo "You can use the '${ROOT}/etc/init.d/postgresql' script to run PostgreSQL instead of 'pg_ctl'."
+ einfo
+ fi
+}
+
+src_test() {
+ einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
+ if ! emake -j1 check ; then
+ hasq test ${FEATURES} && die "Make check failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make check failed. See above for details."
+ fi
+
+ einfo "Yes, there are other tests which could be run."
+ einfo "... and no, we don't plan to add/support them."
+ einfo "For now, the main regressions tests will suffice."
+ einfo "If you think other tests are necessary, please submit a"
+ einfo "bug including a patch for this ebuild to enable them."
+}
+