summaryrefslogtreecommitdiff
path: root/dev-java/jdbc-postgresql
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/jdbc-postgresql
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/jdbc-postgresql')
-rw-r--r--dev-java/jdbc-postgresql/Manifest13
-rw-r--r--dev-java/jdbc-postgresql/files/jdbc-postgresql-9.4_p1201-remove-osgi.patch37
-rw-r--r--dev-java/jdbc-postgresql/files/jdbc-postgresql-9.4_p1204-remove-sspi.patch138
-rw-r--r--dev-java/jdbc-postgresql/jdbc-postgresql-9.2_p1003.ebuild78
-rw-r--r--dev-java/jdbc-postgresql/jdbc-postgresql-9.2_p1004.ebuild78
-rw-r--r--dev-java/jdbc-postgresql/jdbc-postgresql-9.3_p1100.ebuild78
-rw-r--r--dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1205.ebuild102
-rw-r--r--dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1206.ebuild102
-rw-r--r--dev-java/jdbc-postgresql/metadata.xml8
9 files changed, 634 insertions, 0 deletions
diff --git a/dev-java/jdbc-postgresql/Manifest b/dev-java/jdbc-postgresql/Manifest
new file mode 100644
index 000000000000..2ae5e3906ad2
--- /dev/null
+++ b/dev-java/jdbc-postgresql/Manifest
@@ -0,0 +1,13 @@
+AUX jdbc-postgresql-9.4_p1201-remove-osgi.patch 1629 BLAKE2B f358ab6ac9296ade9eb7603dc03367f984622207c259df68c3029464197b47e052b69a369889e174cc0543d51a1d07c4134e8530bab0e80de4d5f38e79557486 SHA512 dcb831f6828980b5ada1158cb80c2e5c8d6921b24b69cd0f40faec9b8d41bdaa468ca995e4a804282b816ab8b0120e371e5f21a2aff7fee6068f13affc6b097a
+AUX jdbc-postgresql-9.4_p1204-remove-sspi.patch 6853 BLAKE2B 243b64279b501b417a5570d41010decd4edb55ca11a14c1a927698ee3795b2d7e7fc9c5c6fcd95b6210bd26c3938795fcbbce1b1c4dafe259197b0db8eb60701 SHA512 17d6a1514fc824008c8f0464c4af30d038a379ade44120dc24d8f9a4f495393c6e75e82f8e9da1e51c6d22c2301ec83a842d0db6e22842661b4dda97b8335dc6
+DIST postgresql-jdbc-9.2-1003.src.tar.gz 1843082 BLAKE2B 35f6e4738e5340373ccb3cbe516f2e8f4a391b6e200b88c6adff7112b28f077c6e4108329c962b98dd2ee21e9e3db81521a324b036cc5d0d6ec9859f660bce60 SHA512 f91d9617726722998a51275c625f6ea89dfe0ac7ce415cc6fa76302b13762bcf825cd61ec69d25d0199ca21de8a24286eeffb843ad59c06fd3049a289ac2b702
+DIST postgresql-jdbc-9.2-1004.src.tar.gz 1842921 BLAKE2B 4cf0cb6da5749a9da194b9174db82289c3521edb7b7fd57d112883c185e0b80fd6feb70852eb54d7fe53d439817643bc608e9cdb3a9d9b2d43fd134031c770e9 SHA512 6e218b7df3d772e4fb9053672f5f77f6012fe6e652a536dfe171408e957465520b05994d4fa13c4d478b595a55b8068da663b9f3dcb544a46fcf91d71ba8fdf5
+DIST postgresql-jdbc-9.3-1100.src.tar.gz 1852465 BLAKE2B a81f385ff23679a1e6b268b53ea72dda744c50d043d02fe50a88421c43561a8fc63c849a974e84e1f1caa93ab20c01cc58cc9abe96f5567f5ac626263f402126 SHA512 43968a62f9443739721016ede186b2f41fa6db2d1ef319cd65059f8715e90eda7c7f568995b293578c39e04d43085cfdfece587500f99ed1a49964c12d8c747a
+DIST postgresql-jdbc-9.4-1205.src.tar.gz 2028968 BLAKE2B d4f55bc7c173795202f9eed58a67effba747b56f8dc5aaeeb2941532b3d0ce3f66ed113c38af9c2c40998191fd15d2828d05a1b693eb13a78a3d39b9fe6667b5 SHA512 ebb46c0cfcabc34083e6f481bc97536fba98d082462670d39efdd75e6463f1286db6fa07cd35546c749e456f1c06fb1d022cbc9f5cace2a1b968fab76a57d281
+DIST postgresql-jdbc-9.4-1206.src.tar.gz 2029837 BLAKE2B b222a0b2f8f99becaf0ae350407fafeb23d9d4bdb130c17996373b4211e0d56d1a76bc5737401dc6fc6618d2a891943d096b0f60f0770ff6ce859ade3e7a178d SHA512 b16816f1afd3ee5986fca197bd7608c2e2f334054e41a8c541c47985827f4f59d7691d23983bdac01c85fc364cd001c991ac6b4e8567429b9d1f4161388dd6bd
+EBUILD jdbc-postgresql-9.2_p1003.ebuild 1954 BLAKE2B 8e10a598948bfd92c0fbbf7baab34c4987fe77bca32852353c8e477cc290f0b7fb9c538da6f488a857b9085d2da86a3a35e7000ee845f30b48cc65a5fe6ddb51 SHA512 760f4705c00ac28155f1f36802dacc6e700aa55fbe5fcc753f5bc46b7847324a20c002670c8544a384ee2f98f70c4495253e5245d7d7773a8937db5eb142f9d6
+EBUILD jdbc-postgresql-9.2_p1004.ebuild 1957 BLAKE2B 6c9ca6191a38cac848393a98a23ad0bdeed90f139410abf5c8503ede4fca407af90b1a91a2fff8f91792117e1db8bb7d39a40c51a908fe6b51c4c60a6a0f9448 SHA512 c5a6ec3669bff3bc9e16c3c2ff472a6ba743cc78fc682d7f3d79c59f4db3569691d2baaaa906638c37118f945f6c3883a4753efeda00bc01bac6a21a0005fe54
+EBUILD jdbc-postgresql-9.3_p1100.ebuild 1957 BLAKE2B 6c9ca6191a38cac848393a98a23ad0bdeed90f139410abf5c8503ede4fca407af90b1a91a2fff8f91792117e1db8bb7d39a40c51a908fe6b51c4c60a6a0f9448 SHA512 c5a6ec3669bff3bc9e16c3c2ff472a6ba743cc78fc682d7f3d79c59f4db3569691d2baaaa906638c37118f945f6c3883a4753efeda00bc01bac6a21a0005fe54
+EBUILD jdbc-postgresql-9.4_p1205.ebuild 3127 BLAKE2B becf3c1a4b1b487f6d98e1488271767e9ef93a34d5c2f5f53e6276692f5a72bbe88314f2f8d0730c3e29299495e0639afd82ebbd1ec3bf0478d3ddd185ee17aa SHA512 74098a2f42506e87d322d11912aebf5d434887775c484c017142daf04c74df91541915858bbbeb4c76418999f76f30c74113ca3f83dc3d7fdd49dee9cd9a20e8
+EBUILD jdbc-postgresql-9.4_p1206.ebuild 3124 BLAKE2B 6a55d4555ebd5eb675ca261d893496319dc9399621f9e5457dc3e176270adac3a760cc31999399827f2c76d0b13ae09079b023de8ce7274270e2010bc110b585 SHA512 4e686cf33aa5933556ccc19ae4b059aa58dec11036991d5dd944c7c1262c7c41cf78944cc2e0ce8a94ae22255c9d871fc9ded491b9727d3dc707e4d675d40cc5
+MISC metadata.xml 232 BLAKE2B 513679b02247d8e4cb4c874abd785119d9ca62ad24c44969d52a42c3765d0ebf689024512a2c4c48e69688a4ce02a74ae05708b050a720bc73d8d2bf2ceff58d SHA512 00beaf2c81112ff757c4395f4ea47e85f2d48e369e241f10ddf200090dd6513d52ae2b1aef6d28b7417f1cf34608a7258a167eb307d5670323a2190f3710f893
diff --git a/dev-java/jdbc-postgresql/files/jdbc-postgresql-9.4_p1201-remove-osgi.patch b/dev-java/jdbc-postgresql/files/jdbc-postgresql-9.4_p1201-remove-osgi.patch
new file mode 100644
index 000000000000..15b1860d2aa7
--- /dev/null
+++ b/dev-java/jdbc-postgresql/files/jdbc-postgresql-9.4_p1201-remove-osgi.patch
@@ -0,0 +1,37 @@
+--- a/build.xml 2015-02-18 17:44:58.000000000 +0100
++++ b/build.xml 2015-03-23 02:19:03.951945663 +0100
+@@ -403,34 +403,6 @@
+ <attribute name="Implementation-Vendor" value="PostgreSQL Global Development Group" />
+ </manifest>
+ </jar>
+-
+- <!-- add OSGi meta information -->
+- <property name="osgidir" value="${builddir}/osgi"/>
+- <mkdir dir="${osgidir}"/>
+-
+- <!-- create a bnd file named after the JAR file so that bnd wrap tool find it -->
+- <echo file="${osgidir}/${artifact.version.string}.bnd">
+-Bundle-ManifestVersion: 2
+-
+-Bundle-Name: PostgreSQL JDBC Driver ${jdbc.version.upper}
+-Bundle-SymbolicName: org.postgresql.${jdbc.version}
+-Bundle-Version: ${osgi.version}
+-
+-Bundle-Vendor: PostgreSQL Global Development Group
+-Bundle-Copyright: Copyright (c) 2003-2015, PostgreSQL Global Development Group
+-Bundle-License: http://www.postgresql.org/about/licence/
+-Bundle-DocURL: http://jdbc.postgresql.org/
+-
+-Bundle-Classpath: .
+-Bundle-Activator: org.postgresql.osgi.PGBundleActivator
+-Require-Capability: osgi.ee;filter:="(&amp;(|(osgi.ee=J2SE)(osgi.ee=JavaSE))(version>=${java.specification.version}))"
+-Export-Package: org.postgresql*; version=${fullversion}
+-Import-Package: javax.sql, javax.transaction.xa, javax.naming, *;resolution:=optional
+- </echo>
+-
+- <!-- run wrap task from bnd -->
+- <taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="dependency.build.classpath"/>
+- <bndwrap jars="${artifact.jar.build}" output="${artifact.jar}" definitions="${osgidir}"/>
+ </target>
+
+ <!-- create a distribution with docs, dependencies, and driver jar -->
diff --git a/dev-java/jdbc-postgresql/files/jdbc-postgresql-9.4_p1204-remove-sspi.patch b/dev-java/jdbc-postgresql/files/jdbc-postgresql-9.4_p1204-remove-sspi.patch
new file mode 100644
index 000000000000..16996892b192
--- /dev/null
+++ b/dev-java/jdbc-postgresql/files/jdbc-postgresql-9.4_p1204-remove-sspi.patch
@@ -0,0 +1,138 @@
+--- a/org/postgresql/core/v3/ConnectionFactoryImpl.java 2015-10-09 20:55:53.000000000 +0200
++++ b/org/postgresql/core/v3/ConnectionFactoryImpl.java 2015-10-14 20:42:48.816753341 +0200
+@@ -32,7 +32,6 @@
+ import org.postgresql.hostchooser.HostChooserFactory;
+ import org.postgresql.hostchooser.HostRequirement;
+ import org.postgresql.hostchooser.HostStatus;
+-import org.postgresql.sspi.SSPIClient;
+ import org.postgresql.util.GT;
+ import org.postgresql.util.HostSpec;
+ import org.postgresql.util.MD5Digest;
+@@ -394,11 +393,7 @@
+ // or an authentication request
+
+ String password = PGProperty.PASSWORD.get(info);
+-
+- /* SSPI negotiation state, if used */
+- SSPIClient sspiClient = null;
+
+- try {
+ authloop:
+ while (true)
+ {
+@@ -514,88 +509,16 @@
+ case AUTH_REQ_SSPI:
+ /*
+ * Use GSSAPI if requested on all platforms, via JSSE.
+- *
+- * For SSPI auth requests, if we're on Windows attempt native SSPI
+- * authentication if available, and if not disabled by setting a
+- * kerberosServerName. On other platforms, attempt JSSE GSSAPI
+- * negotiation with the SSPI server.
+- *
+- * Note that this is slightly different to libpq, which uses SSPI
+- * for GSSAPI where supported. We prefer to use the existing Java
+- * JSSE Kerberos support rather than going to native (via JNA) calls
+- * where possible, so that JSSE system properties etc continue
+- * to work normally.
+- *
+- * Note that while SSPI is often Kerberos-based there's no guarantee
+- * it will be; it may be NTLM or anything else. If the client responds
+- * to an SSPI request via GSSAPI and the other end isn't using Kerberos
+- * for SSPI then authentication will fail.
+ */
+- final String gsslib = PGProperty.GSS_LIB.get(info);
+- final boolean usespnego = PGProperty.USE_SPNEGO.getBoolean(info);
+-
+- boolean useSSPI = false;
++ org.postgresql.gss.MakeGSS.authenticate(pgStream, host,
++ user, password,
++ PGProperty.JAAS_APPLICATION_NAME.get(info),
++ PGProperty.KERBEROS_SERVER_NAME.get(info),
++ logger,
++ PGProperty.USE_SPNEGO.getBoolean(info));
++
++ break;
+
+- /*
+- * Use SSPI if we're in auto mode on windows and have a
+- * request for SSPI auth, or if it's forced. Otherwise
+- * use gssapi. If the user has specified a Kerberos server
+- * name we'll always use JSSE GSSAPI.
+- */
+- if (gsslib.equals("gssapi"))
+- logger.debug("Using JSSE GSSAPI, param gsslib=gssapi");
+- else if (areq == AUTH_REQ_GSS && !gsslib.equals("sspi"))
+- logger.debug("Using JSSE GSSAPI, gssapi requested by server and gsslib=sspi not forced");
+- else
+- {
+- /* Determine if SSPI is supported by the client */
+- sspiClient = new SSPIClient(pgStream,
+- PGProperty.SSPI_SERVICE_CLASS.get(info),
+- /* Use negotiation for SSPI, or if explicitly requested for GSS */
+- areq == AUTH_REQ_SSPI || (areq == AUTH_REQ_GSS && usespnego),
+- logger);
+-
+- useSSPI = sspiClient.isSSPISupported();
+- logger.debug("SSPI support detected: " + useSSPI);
+-
+- if (!useSSPI) {
+- /* No need to dispose() if no SSPI used */
+- sspiClient = null;
+-
+- if (gsslib.equals("sspi"))
+- throw new PSQLException("SSPI forced with gsslib=sspi, but SSPI not available; set loglevel=2 for details",
+- PSQLState.CONNECTION_UNABLE_TO_CONNECT);
+- }
+-
+- logger.debug("Using SSPI: " + useSSPI + ", gsslib="+gsslib+" and SSPI support detected");
+- }
+-
+- if (useSSPI)
+- {
+- /* SSPI requested and detected as available */
+- sspiClient.startSSPI();
+- }
+- else
+- {
+- /* Use JGSS's GSSAPI for this request */
+- org.postgresql.gss.MakeGSS.authenticate(pgStream, host,
+- user, password,
+- PGProperty.JAAS_APPLICATION_NAME.get(info),
+- PGProperty.KERBEROS_SERVER_NAME.get(info),
+- logger,
+- usespnego);
+- }
+-
+- break;
+-
+- case AUTH_REQ_GSS_CONTINUE:
+- /*
+- * Only called for SSPI, as GSS is handled by an inner loop
+- * in MakeGSS.
+- */
+- sspiClient.continueSSPI(l_msgLen - 8);
+- break;
+-
+ case AUTH_REQ_OK:
+ /* Cleanup after successful authentication */
+ if (logger.logDebug())
+@@ -616,18 +539,6 @@
+ throw new PSQLException(GT.tr("Protocol error. Session setup failed."), PSQLState.PROTOCOL_VIOLATION);
+ }
+ }
+- } finally {
+- /* Cleanup after successful or failed authentication attempts */
+- if (sspiClient != null)
+- {
+- try {
+- sspiClient.dispose();
+- } catch (RuntimeException ex) {
+- logger.log("Unexpected error during SSPI context disposal", ex);
+- }
+-
+- }
+- }
+
+ }
+
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-9.2_p1003.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-9.2_p1003.ebuild
new file mode 100644
index 000000000000..276db9dd4d51
--- /dev/null
+++ b/dev-java/jdbc-postgresql/jdbc-postgresql-9.2_p1003.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+MY_PN="postgresql-jdbc"
+MY_PV="${PV/_p/-}"
+MY_P="${MY_PN}-${MY_PV}.src"
+
+DESCRIPTION="JDBC Driver for PostgreSQL"
+SRC_URI="https://jdbc.postgresql.org/download/${MY_P}.tar.gz"
+HOMEPAGE="https://jdbc.postgresql.org/"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="amd64 ppc64 x86"
+IUSE="test"
+
+DEPEND="
+ >=virtual/jdk-1.6
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ test? (
+ dev-java/ant-junit
+ dev-db/postgresql[server]
+ )"
+RDEPEND=">=virtual/jre-1.6"
+
+S="${WORKDIR}/postgresql-jdbc-${MY_PV}.src"
+
+java_prepare() {
+ find -name "*.class" -type f -exec rm -v {} + || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_DOC_TARGET="publicapi"
+
+src_compile() {
+ java-pkg-2_src_compile
+
+ # There is a task that creates this doc but I didn't find a way how to use system catalog
+ # to lookup the stylesheet so the 'doc' target is rewritten here to use system call instead.
+ if use doc; then
+ mkdir -p "${S}/build/doc"
+ xsltproc -o "${S}/build/doc/pgjdbc.html" http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+ "${S}/doc/pgjdbc.xml"
+ fi
+}
+
+src_test() {
+ einfo "In order to run the tests successfully, you have to have:"
+ einfo "1) PostgreSQL server running"
+ einfo "2) database 'test' defined with user 'test' with password 'password'"
+ einfo " as owner of the database"
+ einfo "3) plpgsql support in the 'test' database"
+ einfo
+ einfo "You can find a general info on how to perform these steps at"
+ einfo "https://wiki.gentoo.org/wiki/PostgreSQL"
+
+ ANT_TASKS="ant-junit" eant test -Dgentoo.classpath=$(java-pkg_getjars --build-only junit)
+}
+
+src_install() {
+ java-pkg_newjar jars/postgresql.jar jdbc-postgresql.jar
+
+ if use doc ; then
+ java-pkg_dojavadoc build/publicapi
+ dohtml build/doc/pgjdbc.html
+ fi
+
+ use source && java-pkg_dosrc org
+}
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-9.2_p1004.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-9.2_p1004.ebuild
new file mode 100644
index 000000000000..85728f172373
--- /dev/null
+++ b/dev-java/jdbc-postgresql/jdbc-postgresql-9.2_p1004.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+MY_PN="postgresql-jdbc"
+MY_PV="${PV/_p/-}"
+MY_P="${MY_PN}-${MY_PV}.src"
+
+DESCRIPTION="JDBC Driver for PostgreSQL"
+SRC_URI="https://jdbc.postgresql.org/download/${MY_P}.tar.gz"
+HOMEPAGE="https://jdbc.postgresql.org/"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="test"
+
+DEPEND="
+ >=virtual/jdk-1.6
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ test? (
+ dev-java/ant-junit
+ dev-db/postgresql[server]
+ )"
+RDEPEND=">=virtual/jre-1.6"
+
+S="${WORKDIR}/postgresql-jdbc-${MY_PV}.src"
+
+java_prepare() {
+ find -name "*.class" -type f -exec rm -v {} + || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_DOC_TARGET="publicapi"
+
+src_compile() {
+ java-pkg-2_src_compile
+
+ # There is a task that creates this doc but I didn't find a way how to use system catalog
+ # to lookup the stylesheet so the 'doc' target is rewritten here to use system call instead.
+ if use doc; then
+ mkdir -p "${S}/build/doc"
+ xsltproc -o "${S}/build/doc/pgjdbc.html" http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+ "${S}/doc/pgjdbc.xml"
+ fi
+}
+
+src_test() {
+ einfo "In order to run the tests successfully, you have to have:"
+ einfo "1) PostgreSQL server running"
+ einfo "2) database 'test' defined with user 'test' with password 'password'"
+ einfo " as owner of the database"
+ einfo "3) plpgsql support in the 'test' database"
+ einfo
+ einfo "You can find a general info on how to perform these steps at"
+ einfo "https://wiki.gentoo.org/wiki/PostgreSQL"
+
+ ANT_TASKS="ant-junit" eant test -Dgentoo.classpath=$(java-pkg_getjars --build-only junit)
+}
+
+src_install() {
+ java-pkg_newjar jars/postgresql.jar jdbc-postgresql.jar
+
+ if use doc ; then
+ java-pkg_dojavadoc build/publicapi
+ dohtml build/doc/pgjdbc.html
+ fi
+
+ use source && java-pkg_dosrc org
+}
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-9.3_p1100.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-9.3_p1100.ebuild
new file mode 100644
index 000000000000..85728f172373
--- /dev/null
+++ b/dev-java/jdbc-postgresql/jdbc-postgresql-9.3_p1100.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+MY_PN="postgresql-jdbc"
+MY_PV="${PV/_p/-}"
+MY_P="${MY_PN}-${MY_PV}.src"
+
+DESCRIPTION="JDBC Driver for PostgreSQL"
+SRC_URI="https://jdbc.postgresql.org/download/${MY_P}.tar.gz"
+HOMEPAGE="https://jdbc.postgresql.org/"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="test"
+
+DEPEND="
+ >=virtual/jdk-1.6
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ test? (
+ dev-java/ant-junit
+ dev-db/postgresql[server]
+ )"
+RDEPEND=">=virtual/jre-1.6"
+
+S="${WORKDIR}/postgresql-jdbc-${MY_PV}.src"
+
+java_prepare() {
+ find -name "*.class" -type f -exec rm -v {} + || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_DOC_TARGET="publicapi"
+
+src_compile() {
+ java-pkg-2_src_compile
+
+ # There is a task that creates this doc but I didn't find a way how to use system catalog
+ # to lookup the stylesheet so the 'doc' target is rewritten here to use system call instead.
+ if use doc; then
+ mkdir -p "${S}/build/doc"
+ xsltproc -o "${S}/build/doc/pgjdbc.html" http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+ "${S}/doc/pgjdbc.xml"
+ fi
+}
+
+src_test() {
+ einfo "In order to run the tests successfully, you have to have:"
+ einfo "1) PostgreSQL server running"
+ einfo "2) database 'test' defined with user 'test' with password 'password'"
+ einfo " as owner of the database"
+ einfo "3) plpgsql support in the 'test' database"
+ einfo
+ einfo "You can find a general info on how to perform these steps at"
+ einfo "https://wiki.gentoo.org/wiki/PostgreSQL"
+
+ ANT_TASKS="ant-junit" eant test -Dgentoo.classpath=$(java-pkg_getjars --build-only junit)
+}
+
+src_install() {
+ java-pkg_newjar jars/postgresql.jar jdbc-postgresql.jar
+
+ if use doc ; then
+ java-pkg_dojavadoc build/publicapi
+ dohtml build/doc/pgjdbc.html
+ fi
+
+ use source && java-pkg_dosrc org
+}
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1205.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1205.ebuild
new file mode 100644
index 000000000000..7d5e2a0e06f3
--- /dev/null
+++ b/dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1205.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2
+
+MY_PN="postgresql-jdbc"
+MY_PV="${PV/_p/-}"
+MY_P="${MY_PN}-${MY_PV}.src"
+
+DESCRIPTION="JDBC Driver for PostgreSQL"
+SRC_URI="https://jdbc.postgresql.org/download/${MY_P}.tar.gz"
+HOMEPAGE="https://jdbc.postgresql.org/"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="test"
+
+DEPEND="
+ >=virtual/jdk-1.6
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ test? (
+ >=dev-db/postgresql-9.3[server]
+ dev-java/ant-junit
+ dev-java/junit:4
+ dev-java/xml-commons
+ )"
+RDEPEND=">=virtual/jre-1.6"
+
+RESTRICT="test" # Requires external postgresql server setup
+
+S="${WORKDIR}/postgresql-jdbc-${MY_PV}.src"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_DOC_TARGET="publicapi"
+
+java_prepare() {
+ # Strip build.xml of maven deps
+ sed -i -e '/<classpath.*dependency\.compile\.classpath/c\' build.xml || die
+ sed -i -e '/<classpath.*dependency\.runtime\.classpath/c\' build.xml || die
+ sed -i -e '/<classpath.*dependency\.test\.classpath/c\' build.xml || die
+ sed -i -e '/<target name="artifact-version"/,/<[/]target>/{s/depends="maven-dependencies"//}' build.xml || die
+ sed -i -e '/<target name="compile"/ s/,maven-dependencies//' build.xml || die
+
+ # Remove SSPI, it pulls in Waffle-JNA and is only used on Windows
+ sed -i -e '/<include.*sspi/c\' build.xml || die
+ rm -vrf org/postgresql/sspi || die "Error removing sspi"
+ epatch "${FILESDIR}"/${PN}-9.4_p1204-remove-sspi.patch
+
+ # FIXME @someone who cares: enable through osgi flag?
+ sed -i -e '/<include.*osgi/c\' build.xml || die
+ sed -i -e '/<test.*osgi/c\' build.xml || die
+ rm -vrf org/postgresql/osgi || die "Error removing osgi"
+ rm -vrf org/postgresql/test/osgi || die "Error removing osgi tests"
+ epatch "${FILESDIR}"/${PN}-9.4_p1201-remove-osgi.patch
+
+ java-pkg_clean
+}
+
+src_compile() {
+ EANT_BUILD_TARGET="release-version jar"
+ java-pkg-2_src_compile
+
+ # There is a task that creates this doc but I didn't find a way how to use system catalog
+ # to lookup the stylesheet so the 'doc' target is rewritten here to use system call instead.
+ if use doc; then
+ mkdir -p "${S}/build/doc" || die
+ xsltproc -o "${S}/build/doc/pgjdbc.html" http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+ "${S}/doc/pgjdbc.xml" || die
+ fi
+}
+
+src_test() {
+ einfo "In order to run the tests successfully, you have to have:"
+ einfo "1) PostgreSQL server running"
+ einfo "2) database 'test' defined with user 'test' with password 'test'"
+ einfo " as owner of the database"
+ einfo "3) plpgsql support in the 'test' database"
+ einfo
+ einfo "You can find a general info on how to perform these steps at"
+ einfo "https://wiki.gentoo.org/wiki/PostgreSQL"
+
+ ANT_TASKS="ant-junit" eant test -Dgentoo.classpath=$(java-pkg_getjars --build-only "junit-4,xml-commons")
+}
+
+src_install() {
+ java-pkg_newjar build/jars/postgresql*.jar jdbc-postgresql.jar
+
+ if use doc ; then
+ java-pkg_dojavadoc build/publicapi
+ dohtml build/doc/pgjdbc.html
+ fi
+
+ use source && java-pkg_dosrc org
+}
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1206.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1206.ebuild
new file mode 100644
index 000000000000..d15404c14f40
--- /dev/null
+++ b/dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1206.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2
+
+MY_PN="postgresql-jdbc"
+MY_PV="${PV/_p/-}"
+MY_P="${MY_PN}-${MY_PV}.src"
+
+DESCRIPTION="JDBC Driver for PostgreSQL"
+SRC_URI="https://jdbc.postgresql.org/download/${MY_P}.tar.gz"
+HOMEPAGE="https://jdbc.postgresql.org/"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="amd64 ppc64 x86"
+IUSE="test"
+
+DEPEND="
+ >=virtual/jdk-1.6
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ test? (
+ >=dev-db/postgresql-9.3[server]
+ dev-java/ant-junit
+ dev-java/junit:4
+ dev-java/xml-commons
+ )"
+RDEPEND=">=virtual/jre-1.6"
+
+RESTRICT="test" # Requires external postgresql server setup
+
+S="${WORKDIR}/postgresql-jdbc-${MY_PV}.src"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_DOC_TARGET="publicapi"
+
+java_prepare() {
+ # Strip build.xml of maven deps
+ sed -i -e '/<classpath.*dependency\.compile\.classpath/c\' build.xml || die
+ sed -i -e '/<classpath.*dependency\.runtime\.classpath/c\' build.xml || die
+ sed -i -e '/<classpath.*dependency\.test\.classpath/c\' build.xml || die
+ sed -i -e '/<target name="artifact-version"/,/<[/]target>/{s/depends="maven-dependencies"//}' build.xml || die
+ sed -i -e '/<target name="compile"/ s/,maven-dependencies//' build.xml || die
+
+ # Remove SSPI, it pulls in Waffle-JNA and is only used on Windows
+ sed -i -e '/<include.*sspi/c\' build.xml || die
+ rm -vrf org/postgresql/sspi || die "Error removing sspi"
+ epatch "${FILESDIR}"/${PN}-9.4_p1204-remove-sspi.patch
+
+ # FIXME @someone who cares: enable through osgi flag?
+ sed -i -e '/<include.*osgi/c\' build.xml || die
+ sed -i -e '/<test.*osgi/c\' build.xml || die
+ rm -vrf org/postgresql/osgi || die "Error removing osgi"
+ rm -vrf org/postgresql/test/osgi || die "Error removing osgi tests"
+ epatch "${FILESDIR}"/${PN}-9.4_p1201-remove-osgi.patch
+
+ java-pkg_clean
+}
+
+src_compile() {
+ EANT_BUILD_TARGET="release-version jar"
+ java-pkg-2_src_compile
+
+ # There is a task that creates this doc but I didn't find a way how to use system catalog
+ # to lookup the stylesheet so the 'doc' target is rewritten here to use system call instead.
+ if use doc; then
+ mkdir -p "${S}/build/doc" || die
+ xsltproc -o "${S}/build/doc/pgjdbc.html" http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+ "${S}/doc/pgjdbc.xml" || die
+ fi
+}
+
+src_test() {
+ einfo "In order to run the tests successfully, you have to have:"
+ einfo "1) PostgreSQL server running"
+ einfo "2) database 'test' defined with user 'test' with password 'test'"
+ einfo " as owner of the database"
+ einfo "3) plpgsql support in the 'test' database"
+ einfo
+ einfo "You can find a general info on how to perform these steps at"
+ einfo "https://wiki.gentoo.org/wiki/PostgreSQL"
+
+ ANT_TASKS="ant-junit" eant test -Dgentoo.classpath=$(java-pkg_getjars --build-only "junit-4,xml-commons")
+}
+
+src_install() {
+ java-pkg_newjar build/jars/postgresql*.jar jdbc-postgresql.jar
+
+ if use doc ; then
+ java-pkg_dojavadoc build/publicapi
+ dohtml build/doc/pgjdbc.html
+ fi
+
+ use source && java-pkg_dosrc org
+}
diff --git a/dev-java/jdbc-postgresql/metadata.xml b/dev-java/jdbc-postgresql/metadata.xml
new file mode 100644
index 000000000000..2444066aa02b
--- /dev/null
+++ b/dev-java/jdbc-postgresql/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+</maintainer>
+</pkgmetadata>