summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-db/pgtap/ChangeLog10
-rw-r--r--dev-db/pgtap/Manifest15
-rw-r--r--dev-db/pgtap/files/pgtap-pg_config_override.patch25
-rw-r--r--dev-db/pgtap/metadata.xml13
-rw-r--r--dev-db/pgtap/pgtap-0.93.0.ebuild53
5 files changed, 116 insertions, 0 deletions
diff --git a/dev-db/pgtap/ChangeLog b/dev-db/pgtap/ChangeLog
new file mode 100644
index 000000000000..4c14ce2042a2
--- /dev/null
+++ b/dev-db/pgtap/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-db/pgtap
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgtap/ChangeLog,v 1.1 2013/03/30 19:19:20 titanofold Exp $
+
+*pgtap-0.93.0 (30 Mar 2013)
+
+ 30 Mar 2013; Aaron W. Swenson <titanofold@gentoo.org> +pgtap-0.93.0.ebuild,
+ +files/pgtap-pg_config_override.patch, +metadata.xml:
+ PostgreSQL unit testing comes to Gentoo. Initial commit.
+
diff --git a/dev-db/pgtap/Manifest b/dev-db/pgtap/Manifest
new file mode 100644
index 000000000000..7d300c47bc7d
--- /dev/null
+++ b/dev-db/pgtap/Manifest
@@ -0,0 +1,15 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX pgtap-pg_config_override.patch 1045 SHA256 653c016a7baba2539e81eeb38eb40eab8f986e920171c4b5df07b5b766103ef9 SHA512 ac84f139d910a9f6394d9ceb8430b8f7c5768f9792ffad1b9b265ef4de45fc9d08b0961d04026a9a44c0c161f14e77acca52807191b3e07821a970a511a935fc WHIRLPOOL c432ed431868bc2b46b52c711eaf0da4a5f4b90607693a8c59bcf02f50c01dc9d98db092bd380deeeff3ad1c1f43647239eb75b1a5d21b285b0f3f4b66243b07
+DIST pgtap-0.93.0.zip 219355 SHA256 d1fa168b5d089d031552103c985d1f4b681659ece2f976d27c070ad26f6c1d4c SHA512 6165f8bd107168a3955c3ec4c63277ce9fce31d7c375fdfe13cb31b7df71cb9aae4b20a1c2d961fba97e3ae207b45b8daf9174f0701a220e52f4ffb53dddea94 WHIRLPOOL 2352e71e004ad9486d6a5ed3b6c5967613caa06ea657af7394ea37249f16f266e611b64d3d2106bc737bf10e9810613b67f9eb79faadc578ca3ff16cd132a263
+EBUILD pgtap-0.93.0.ebuild 1211 SHA256 9ed532156d83f39bda1cab2d003de047ceb63c7e59c3ee36cd601ad9570cc382 SHA512 bdcbeb0ad5ad740dff6d98bafe043c84bb369a5789aee0080eee26cdb8aac804e78f13e4e3f3f901b49286640de81a977a65ab345074e673891ea675dd242c3a WHIRLPOOL d68d0227177a2362f8f0f39f50362d70041c4a410f609752432aebdea2345534aea20d45cfdb1fe16e50e64995d80612b7df5c0bfd30ec181d96bed8638be721
+MISC ChangeLog 424 SHA256 63ff80cb5088b94137c5ef757926405c5d023c97cd1009ef33fec7067a4b902d SHA512 3ff189161839a531ed0d343b2fe4dc4d2960e75277a9466f447147d6d22f1a7ad568c8f2ea3af6a6e8723dc84e8e3e8e289426b47021dd79695f4d6ac84025a6 WHIRLPOOL 762f53b16426fd098b2db315a6b332de560eac844bf182f4f8b272a423a6b948f1f9dafa8af6cc0a94909f2db489ea6524a41e9ae986c044ea6c1ff6de6cc14f
+MISC metadata.xml 483 SHA256 a5b342f7839e759f030bf3958e3163a96d7bae3aa971b28b4419c2e24f4ff479 SHA512 a0feed031b17434e8d9404aad4a43aba6ee6e100637055a663df58920b8f4970296c4120d70c4515d8e9923b241a170485569c6dacafb760524a4bd886f2df4a WHIRLPOOL f41105723c62c2f1c317a5b30b5d6901d059ef566edb2572a37a82d740c0cd905aab7bae3d7ebaa2c19028b92cc1ba6c724a84214ae75c19ff308ffdc011c2bb
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iF4EAREIAAYFAlFXOrkACgkQVxOqA9G7/aA/IAD/U6vSt0vzRaemJCoja9mjZsxB
+qv+CFEXaYdF5w5dHnCMBAIE384h/yWeo/VLBfwHivJ3Ta2+IqN5q22ukV7xN5ioR
+=DA1Z
+-----END PGP SIGNATURE-----
diff --git a/dev-db/pgtap/files/pgtap-pg_config_override.patch b/dev-db/pgtap/files/pgtap-pg_config_override.patch
new file mode 100644
index 000000000000..2034b233f00c
--- /dev/null
+++ b/dev-db/pgtap/files/pgtap-pg_config_override.patch
@@ -0,0 +1,25 @@
+diff -Naurw pgtap-0.93.0.orig/Makefile pgtap-0.93.0/Makefile
+--- pgtap-0.93.0.orig/Makefile 2013-01-28 20:14:20.000000000 +0000
++++ pgtap-0.93.0/Makefile 2013-03-30 16:02:45.077880109 +0000
+@@ -9,14 +9,15 @@
+ DOCS = doc/pgtap.mmd
+ REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
+ REGRESS_OPTS = --inputdir=test --load-language=plpgsql
++ifndef PG_CONFIG
+ PG_CONFIG = pg_config
++endif
+
+ ifdef NO_PGXS
+ top_builddir = ../..
+ PG_CONFIG := $(top_builddir)/src/bin/pg_config/pg_config
+ else
+ # Run pg_config to get the PGXS Makefiles
+-PG_CONFIG = pg_config
+ PGXS := $(shell $(PG_CONFIG) --pgxs)
+ endif
+
+@@ -145,4 +146,3 @@
+ MultiMarkdown.pl doc/pgtap.mmd > doc/pgtap.html
+ ./tocgen doc/pgtap.html 2> doc/toc.html
+ perl -MPod::Simple::XHTML -E "my \$$p = Pod::Simple::XHTML->new; \$$p->html_header_tags('<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">'); \$$p->strip_verbatim_indent(sub { (my \$$i = \$$_[0]->[0]) =~ s/\\S.*//; \$$i }); \$$p->parse_from_file('`perldoc -l pg_prove`')" > doc/pg_prove.html
+-
diff --git a/dev-db/pgtap/metadata.xml b/dev-db/pgtap/metadata.xml
new file mode 100644
index 000000000000..a674b19eabe6
--- /dev/null
+++ b/dev-db/pgtap/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>postgresql</herd>
+ <maintainer>
+ <email>titanofold@gentoo.org</email>
+ <name>Aaron W. Swenson</name>
+ </maintainer>
+ <longdescription>
+ pgTAP is a suite of database functions that make it easy to write
+ TAP-emitting unit tests in psql scripts or xUnit-style test functions.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-db/pgtap/pgtap-0.93.0.ebuild b/dev-db/pgtap/pgtap-0.93.0.ebuild
new file mode 100644
index 000000000000..5edd6c667c03
--- /dev/null
+++ b/dev-db/pgtap/pgtap-0.93.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgtap/pgtap-0.93.0.ebuild,v 1.1 2013/03/30 19:19:20 titanofold Exp $
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Unit testing for PostgreSQL"
+HOMEPAGE="http://pgtap.org/"
+SRC_URI="http://api.pgxn.org/dist/${PN}/${PV}/${P}.zip"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=dev-db/postgresql-base-8.4
+ dev-perl/TAP-Parser-SourceHandler-pgTAP
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/pgtap-pg_config_override.patch"
+
+ local pgslots=$(eselect --brief postgresql list)
+ local pgslot
+ for pgslot in ${pgslots} ; do
+ mkdir -p "${WORKDIR}/${pgslot}"
+ cp -R "${S}" "${WORKDIR}/${pgslot}"
+ done
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ local pgslots=$(eselect --brief postgresql list)
+ local pgslot
+ for pgslot in ${pgslots} ; do
+ cd "${WORKDIR}/${pgslot}/${P}"
+ PG_CONFIG="pg_config${pgslot//.}" emake
+ done
+}
+
+src_install() {
+ local pgslots=$(eselect --brief postgresql list)
+ local pgslot
+ for pgslot in ${pgslots} ; do
+ cd "${WORKDIR}/${pgslot}/${P}"
+ PG_CONFIG="pg_config${pgslot//.}" emake DESTDIR="${D}" install
+ done
+}