Lines 1-6
Link Here
|
1 |
# Copyright 1999-2007 Gentoo Foundation |
1 |
# Copyright 1999-2007 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.2.4-r1.ebuild,v 1.2 2007/08/17 15:09:02 uberlord Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.2.4-r1.ebuild,v 1.1 2007/05/02 08:50:01 voxus Exp $ |
4 |
|
4 |
|
5 |
inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionator |
5 |
inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionator |
6 |
|
6 |
|
Lines 14-20
Link Here
|
14 |
test? ( mirror://postgresql/source/v${PV}/${PN}-test-${PV}.tar.bz2 )" |
14 |
test? ( mirror://postgresql/source/v${PV}/${PN}-test-${PV}.tar.bz2 )" |
15 |
LICENSE="POSTGRESQL" |
15 |
LICENSE="POSTGRESQL" |
16 |
SLOT="0" |
16 |
SLOT="0" |
17 |
IUSE="doc kerberos nls pam perl pg-intdatetime python readline selinux ssl tcl test xml zlib" |
17 |
IUSE="doc kerberos nls pam perl pg-intdatetime python readline selinux ssl tcl test xml zlib ldap" |
18 |
|
18 |
|
19 |
RDEPEND="~dev-db/libpq-${PV} |
19 |
RDEPEND="~dev-db/libpq-${PV} |
20 |
>=sys-libs/ncurses-5.2 |
20 |
>=sys-libs/ncurses-5.2 |
Lines 34-41
Link Here
|
34 |
nls? ( sys-devel/gettext ) |
34 |
nls? ( sys-devel/gettext ) |
35 |
xml? ( dev-util/pkgconfig )" |
35 |
xml? ( dev-util/pkgconfig )" |
36 |
|
36 |
|
|
|
37 |
KRB5_CONFIG="/usr/bin/krb5-config" |
38 |
append-ldflags -L`${KRB5_CONFIG} --libs |sed -e's/^-L\([^ ]*\)\($\| .*$\)/\1/'` |
39 |
append-flags -I`${KRB5_CONFIG} --cflags |sed -e's/^-I\([^ ]*\)\($\| .*$\)/\1/'` |
40 |
|
37 |
PG_DIR="/var/lib/postgresql" |
41 |
PG_DIR="/var/lib/postgresql" |
38 |
[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="40" |
42 |
[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512" |
39 |
|
43 |
|
40 |
pkg_setup() { |
44 |
pkg_setup() { |
41 |
if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then |
45 |
if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then |
Lines 56-66
Link Here
|
56 |
unpack ${A} |
60 |
unpack ${A} |
57 |
cd "${S}" |
61 |
cd "${S}" |
58 |
|
62 |
|
59 |
epatch "${FILESDIR}/${P}-gentoo.patch" |
63 |
epatch "${FILESDIR}/${PN}-${PV}-gentoo.patch" |
60 |
epatch "${FILESDIR}/${P}-sh.patch" |
64 |
epatch "${FILESDIR}/${PN}-${PV}-sh.patch" |
61 |
|
|
|
62 |
# Gentoo/FreeBSD's python is works fine with threading - unlike FreeBSD's |
63 |
epatch "${FILESDIR}/${P}-python-threads.patch" |
64 |
|
65 |
|
65 |
# Prepare package for future tests |
66 |
# Prepare package for future tests |
66 |
if use test ; then |
67 |
if use test ; then |
Lines 68-74
Link Here
|
68 |
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" -i src/test/regress/{input,output}/tablespace.source |
69 |
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" -i src/test/regress/{input,output}/tablespace.source |
69 |
|
70 |
|
70 |
# Fix broken tests |
71 |
# Fix broken tests |
71 |
epatch "${FILESDIR}/${P}-regress_fix.patch" |
72 |
epatch "${FILESDIR}/${PN}-${PV}-regress_fix.patch" |
72 |
|
73 |
|
73 |
# We need to run the tests as a non-root user, portage seems the most fitting here, |
74 |
# We need to run the tests as a non-root user, portage seems the most fitting here, |
74 |
# so if userpriv is enabled, we use it directly. If userpriv is disabled, we need to |
75 |
# so if userpriv is enabled, we use it directly. If userpriv is disabled, we need to |
Lines 79-85
Link Here
|
79 |
if ! hasq userpriv ${FEATURES} ; then |
80 |
if ! hasq userpriv ${FEATURES} ; then |
80 |
mkdir -p "${S}/src/test/regress/results" |
81 |
mkdir -p "${S}/src/test/regress/results" |
81 |
chown portage "${S}/src/test/regress/results" |
82 |
chown portage "${S}/src/test/regress/results" |
82 |
epatch "${FILESDIR}/${P}-regress_su.patch" |
83 |
epatch "${FILESDIR}/${PN}-${PV}-regress_su.patch" |
83 |
fi |
84 |
fi |
84 |
fi |
85 |
fi |
85 |
} |
86 |
} |
Lines 92-97
Link Here
|
92 |
|
93 |
|
93 |
cd "${S}" |
94 |
cd "${S}" |
94 |
|
95 |
|
|
|
96 |
append-ldflags -L`${KRB5_CONFIG} --libs |sed -e's/^-L\([^ ]*\)\($\| .*$\)/\1/'` |
97 |
append-flags -I`${KRB5_CONFIG} --cflags |sed -e's/^-I\([^ ]*\)\($\| .*$\)/\1/'` |
98 |
|
95 |
./configure --prefix=/usr \ |
99 |
./configure --prefix=/usr \ |
96 |
--includedir=/usr/include/postgresql/pgsql \ |
100 |
--includedir=/usr/include/postgresql/pgsql \ |
97 |
--sysconfdir=/etc/postgresql \ |
101 |
--sysconfdir=/etc/postgresql \ |
Lines 103-108
Link Here
|
103 |
$(use_with kerberos krb5) \ |
107 |
$(use_with kerberos krb5) \ |
104 |
$(use_enable nls ) \ |
108 |
$(use_enable nls ) \ |
105 |
$(use_with pam) \ |
109 |
$(use_with pam) \ |
|
|
110 |
$(use_with ldap) \ |
106 |
$(use_with perl) \ |
111 |
$(use_with perl) \ |
107 |
$(use_enable pg-intdatetime integer-datetimes ) \ |
112 |
$(use_enable pg-intdatetime integer-datetimes ) \ |
108 |
$(use_with python) \ |
113 |
$(use_with python) \ |