/[gentoo-x86]/dev-libs/libpqxx/libpqxx-4.0-r1.ebuild
Gentoo

Contents of /dev-libs/libpqxx/libpqxx-4.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sat Dec 8 18:24:07 2012 UTC (2 years ago) by jer
Branch: MAIN
Changes since 1.7: +2 -2 lines
Stable for HPPA (bug #396483).

(Portage version: 2.2.0_alpha144/cvs/Linux i686, signed Manifest commit with key A792A613)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-libs/libpqxx/libpqxx-4.0-r1.ebuild,v 1.7 2012/03/31 17:54:45 armin76 Exp $
4
5 EAPI="4"
6
7 inherit eutils
8
9 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
10
11 DESCRIPTION="C++ client API for PostgreSQL. The standard front-end for writing C++ programs that use PostgreSQL."
12 SRC_URI="http://pqxx.org/download/software/${PN}/${P}.tar.gz"
13 HOMEPAGE="http://pqxx.org/development/libpqxx/"
14 LICENSE="BSD"
15 SLOT="0"
16 IUSE="doc static-libs"
17
18 DEPEND="dev-db/postgresql-base"
19 RDEPEND="${DEPEND}"
20
21 src_configure() {
22 if use static-libs ; then
23 econf --enable-static
24 else
25 econf --enable-shared
26 fi
27 }
28
29 src_install () {
30 emake DESTDIR="${D}" install
31
32 dodoc AUTHORS ChangeLog NEWS README*
33 use doc && dohtml -r doc/html/*
34 }
35
36 src_test() {
37 einfo "The tests need a running PostgreSQL server and an existing database."
38 einfo "Test requires PGDATABASE and PGUSER to be set at a minimum. Optionally,"
39 einfo "set PGPORT and PGHOST. Define them at the command line or in:"
40 einfo " ${EROOT%/}/etc/libpqxx_test_env"
41
42 if [[ -z $PGDATABASE || -z $PGUSER ]] ; then
43 if [[ -f ${EROOT%/}/etc/libpqxx_test_env ]] ; then
44 source "${EROOT%/}/etc/libpqxx_test_env"
45 [[ -n $PGDATABASE ]] && export PGDATABASE
46 [[ -n $PGHOST ]] && export PGHOST
47 [[ -n $PGPORT ]] && export PGPORT
48 [[ -n $PGUSER ]] && export PGUSER
49 fi
50 fi
51
52 if [[ -n $PGDATABASE && -n $PGUSER ]] ; then
53 local server_version
54 server_version=$(psql -Aqtc 'SELECT version();' 2> /dev/null)
55 if [[ $? = 0 ]] ; then
56 # Currently works with highest server version in tree
57 #server_version=$(echo ${server_version} | cut -d " " -f 2 | cut -d "." -f -2 | tr -d .)
58 #if [[ $server_version < 92 ]] ; then
59 cd "${S}/test"
60 emake check
61 #else
62 # eerror "Server version must be 8.4.x or below."
63 # die "Server version isn't 8.4.x or below"
64 #fi
65 else
66 eerror "Is the server running?"
67 eerror "Verify role and database exist, and are permitted in pg_hba.conf for:"
68 eerror " Role: ${PGUSER}"
69 eerror " Database: ${PGDATABASE}"
70 die "Couldn't connect to server."
71 fi
72 else
73 eerror "PGDATABASE and PGUSER must be set to perform tests."
74 eerror "Skipping tests."
75 fi
76 }

  ViewVC Help
Powered by ViewVC 1.1.20