--- /usr/portage/dev-db/postgresql/postgresql-8.2.4-r1.ebuild 2007-08-17 17:35:50.000000000 +0200 +++ postgresql-8.2.4-r1.ebuild 2007-08-21 21:39:10.000000000 +0200 @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $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 $ +# $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 $ inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionator @@ -14,7 +14,7 @@ test? ( mirror://postgresql/source/v${PV}/${PN}-test-${PV}.tar.bz2 )" LICENSE="POSTGRESQL" SLOT="0" -IUSE="doc kerberos nls pam perl pg-intdatetime python readline selinux ssl tcl test xml zlib" +IUSE="doc kerberos nls pam perl pg-intdatetime python readline selinux ssl tcl test xml zlib ldap" RDEPEND="~dev-db/libpq-${PV} >=sys-libs/ncurses-5.2 @@ -34,8 +34,12 @@ nls? ( sys-devel/gettext ) xml? ( dev-util/pkgconfig )" +KRB5_CONFIG="/usr/bin/krb5-config" +append-ldflags -L`${KRB5_CONFIG} --libs |sed -e's/^-L\([^ ]*\)\($\| .*$\)/\1/'` +append-flags -I`${KRB5_CONFIG} --cflags |sed -e's/^-I\([^ ]*\)\($\| .*$\)/\1/'` + PG_DIR="/var/lib/postgresql" -[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="40" +[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512" pkg_setup() { if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then @@ -56,11 +60,8 @@ unpack ${A} cd "${S}" - epatch "${FILESDIR}/${P}-gentoo.patch" - epatch "${FILESDIR}/${P}-sh.patch" - - # Gentoo/FreeBSD's python is works fine with threading - unlike FreeBSD's - epatch "${FILESDIR}/${P}-python-threads.patch" + epatch "${FILESDIR}/${PN}-${PV}-gentoo.patch" + epatch "${FILESDIR}/${PN}-${PV}-sh.patch" # Prepare package for future tests if use test ; then @@ -68,7 +69,7 @@ sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" -i src/test/regress/{input,output}/tablespace.source # Fix broken tests - epatch "${FILESDIR}/${P}-regress_fix.patch" + epatch "${FILESDIR}/${PN}-${PV}-regress_fix.patch" # 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 @@ -79,7 +80,7 @@ if ! hasq userpriv ${FEATURES} ; then mkdir -p "${S}/src/test/regress/results" chown portage "${S}/src/test/regress/results" - epatch "${FILESDIR}/${P}-regress_su.patch" + epatch "${FILESDIR}/${PN}-${PV}-regress_su.patch" fi fi } @@ -92,6 +93,9 @@ cd "${S}" + append-ldflags -L`${KRB5_CONFIG} --libs |sed -e's/^-L\([^ ]*\)\($\| .*$\)/\1/'` + append-flags -I`${KRB5_CONFIG} --cflags |sed -e's/^-I\([^ ]*\)\($\| .*$\)/\1/'` + ./configure --prefix=/usr \ --includedir=/usr/include/postgresql/pgsql \ --sysconfdir=/etc/postgresql \ @@ -103,6 +107,7 @@ $(use_with kerberos krb5) \ $(use_enable nls ) \ $(use_with pam) \ + $(use_with ldap) \ $(use_with perl) \ $(use_enable pg-intdatetime integer-datetimes ) \ $(use_with python) \