Gentoo Archives: gentoo-commits

From: Aaron Swenson <titanofold@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpqxx/
Date: Mon, 10 Jul 2017 16:39:21
Message-Id: 1499704736.072c025c352d47e2674f65320958859a5141a168.titanofold@gentoo
1 commit: 072c025c352d47e2674f65320958859a5141a168
2 Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 10 16:38:00 2017 +0000
4 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 10 16:38:56 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=072c025c
7
8 dev-libs/libpqxx: Bump to 5.0.1
9
10 Version bump fixes bug 604906.
11 Bump EAPI to 6.
12 New dependencies for building documentation.
13 Use dodoc instead of dohtml.
14 Add slot dependency to dev-db/postgresql.
15
16 Bugs: 604906
17
18 Package-Manager: Portage-2.3.6, Repoman-2.3.1
19
20 dev-libs/libpqxx/Manifest | 1 +
21 dev-libs/libpqxx/libpqxx-5.0.1.ebuild | 89 +++++++++++++++++++++++++++++++++++
22 2 files changed, 90 insertions(+)
23
24 diff --git a/dev-libs/libpqxx/Manifest b/dev-libs/libpqxx/Manifest
25 index d4644e6b6a2..78db94de1d9 100644
26 --- a/dev-libs/libpqxx/Manifest
27 +++ b/dev-libs/libpqxx/Manifest
28 @@ -1 +1,2 @@
29 DIST libpqxx-4.0.1.tar.gz 1582532 SHA256 097ceda2797761ce517faa5bee186c883df1c407cb2aada613a16773afeedc38 SHA512 00204985097ef8bb0a3376d6ba541dbb471d7c52d7135f6244a9f4acbf6c8e5254d6f813e4411421e49bb56f4a520fc6ac67e300141d724396ce0ac11bd3a95e WHIRLPOOL d377863f9200e7ed235f8a2cf132b554efa4223d5f542eea23d743ffe391a13d44da767ee2f70146558e5b393ba334656c09007241c1aadde750c00c16e25c12
30 +DIST libpqxx-5.0.1.tar.gz 743560 SHA256 21ba7167aeeb76142c0e865127514b4834cefde45eaab2d5eb79099188e21a06 SHA512 a097a419301d45e8078af08eb4667b7ae06c91d8bb62d57d26e0f6df138eeea350d4ba672a96271f724b3de86f3dd1d57da81aee093835c4b08b2084e98720ef WHIRLPOOL ca447f769f01a876edae5fd05c9b42fb6c33c5684ba61e07b1055586f332310290d85f2dfea9ba4d537100d427b342afd3f75ba948def9b70dabc68ac926d28a
31
32 diff --git a/dev-libs/libpqxx/libpqxx-5.0.1.ebuild b/dev-libs/libpqxx/libpqxx-5.0.1.ebuild
33 new file mode 100644
34 index 00000000000..b7801bbff4a
35 --- /dev/null
36 +++ b/dev-libs/libpqxx/libpqxx-5.0.1.ebuild
37 @@ -0,0 +1,89 @@
38 +# Copyright 1999-2017 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI="6"
42 +
43 +PYTHON_COMPAT=( python2_7 )
44 +inherit python-any-r1
45 +
46 +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
47 +
48 +DESCRIPTION="Standard front-end for writing C++ programs that use PostgreSQL"
49 +SRC_URI="https://github.com/jtv/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
50 +HOMEPAGE="http://pqxx.org/development/libpqxx/"
51 +LICENSE="BSD"
52 +SLOT="0"
53 +IUSE="doc static-libs"
54 +
55 +RDEPEND="dev-db/postgresql:="
56 +DEPEND="${PYTHON_DEPS}
57 + ${RDEPEND}
58 + doc? (
59 + app-doc/doxygen
60 + app-text/xmlto
61 + )
62 +"
63 +
64 +src_prepare() {
65 + sed -e 's/python/python2/' \
66 + -i tools/{splitconfig,template2mak.py} \
67 + || die "Couldn't fix Python shebangs"
68 +
69 + eapply_user
70 +}
71 +
72 +src_configure() {
73 + local myconf
74 + use static-libs && myconf="--enable-static" || myconf="--enable-shared"
75 +
76 + econf ${myconf} $(use_enable doc documentation)
77 +}
78 +
79 +src_install () {
80 + emake DESTDIR="${D}" install
81 +
82 + dodoc AUTHORS ChangeLog NEWS README*
83 + use doc && dodoc -r doc/html
84 +}
85 +
86 +src_test() {
87 + einfo "The tests need a running PostgreSQL server and an existing database."
88 + einfo "Test requires PGDATABASE and PGUSER to be set at a minimum. Optionally,"
89 + einfo "set PGPORT and PGHOST. Define them at the command line or in:"
90 + einfo " ${EROOT%/}/etc/libpqxx_test_env"
91 +
92 + if [[ -z $PGDATABASE || -z $PGUSER ]] ; then
93 + if [[ -f ${EROOT%/}/etc/libpqxx_test_env ]] ; then
94 + source "${EROOT%/}/etc/libpqxx_test_env"
95 + [[ -n $PGDATABASE ]] && export PGDATABASE
96 + [[ -n $PGHOST ]] && export PGHOST
97 + [[ -n $PGPORT ]] && export PGPORT
98 + [[ -n $PGUSER ]] && export PGUSER
99 + fi
100 + fi
101 +
102 + if [[ -n $PGDATABASE && -n $PGUSER ]] ; then
103 + local server_version
104 + server_version=$(psql -Aqtc 'SELECT version();' 2> /dev/null)
105 + if [[ $? = 0 ]] ; then
106 + # Currently works with highest server version in tree
107 + #server_version=$(echo ${server_version} | cut -d " " -f 2 | cut -d "." -f -2 | tr -d .)
108 + #if [[ $server_version < 92 ]] ; then
109 + cd "${S}/test"
110 + emake check
111 + #else
112 + # eerror "Server version must be 8.4.x or below."
113 + # die "Server version isn't 8.4.x or below"
114 + #fi
115 + else
116 + eerror "Is the server running?"
117 + eerror "Verify role and database exist, and are permitted in pg_hba.conf for:"
118 + eerror " Role: ${PGUSER}"
119 + eerror " Database: ${PGDATABASE}"
120 + die "Couldn't connect to server."
121 + fi
122 + else
123 + eerror "PGDATABASE and PGUSER must be set to perform tests."
124 + eerror "Skipping tests."
125 + fi
126 +}