# ChangeLog for dev-java/jdbc-postgresql
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/ChangeLog,v 1.56 2014/12/28 15:24:21 titanofold Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/ChangeLog,v 1.57 2015/04/22 22:27:05 monsieurp Exp $
+
+*jdbc-postgresql-9.4_p1201 (22 Apr 2015)
+
+ 22 Apr 2015; Patrice Clement <monsieurp@gentoo.org>
+ +files/jdbc-postgresql-9.4_p1201-remove-osgi.patch,
+ +files/jdbc-postgresql-9.4_p1201-remove-sspi.patch,
+ +jdbc-postgresql-9.4_p1201.ebuild, jdbc-postgresql-9.3_p1100.ebuild:
+ Version bump courtesy of Andreas Sturmlechner
+ <andreas.sturmlechner@gmail.com>. Fix bug 545004.
28 Dec 2014; Aaron W. Swenson <titanofold@gentoo.org>
jdbc-postgresql-8.3_p603.ebuild, jdbc-postgresql-8.4_p701-r1.ebuild,
Hash: SHA256
AUX jdbc-postgresql-8.4_p701-stray-com.sun-import.patch 394 SHA256 7fd1dd75151bdaeba7cffecad1a9f06003aa371a5eea77c55fe22d4c399cdec3 SHA512 b9c834a998ea8aec709d17194aae760c552f5bcec85f162e70ba12267c8a8b40c2214d0b0cc723c3f81fa2b61fc7db5592f0c5b8122931dd1dde9145b4454d31 WHIRLPOOL 6c5846401710bde11af73a99fe71c200c2f80e9142c871029eb896ae9e3b0a52b99ebc3cd7dd824a80e7bfb15c78e9d33ceb1e64f8977e5aee705dcd32bb0d48
+AUX jdbc-postgresql-9.4_p1201-remove-osgi.patch 1629 SHA256 cfe41a3ad3727a513ce2fab910b4ee3b9cb071bfe732fa40f21f1ca3b9e15231 SHA512 dcb831f6828980b5ada1158cb80c2e5c8d6921b24b69cd0f40faec9b8d41bdaa468ca995e4a804282b816ab8b0120e371e5f21a2aff7fee6068f13affc6b097a WHIRLPOOL 5e319d73f9676ed44130f035780e0ddf8c469cb96f0b7eac14db7759295ad4cc5f7732f791b5e0442267e0a552c763248020c2c7e92bb11eebb82c911336eca8
+AUX jdbc-postgresql-9.4_p1201-remove-sspi.patch 6821 SHA256 d14c6d0541ef3ab1f466ad1562a2ca8990861556726a8ab9ea632c99f18f5707 SHA512 0747ff655123430e05650f1a47305f373b4d899a40ea6303f3a6929d176e38b71383e2f1b6992300a15b764ded64d28da1b815434166c8d5d81fef4d62e2ab98 WHIRLPOOL 0d8dcb44329304d5f74da33bcceabbf7244781f8b0c9ac7ede3f870f5caf351d3e809f71a147c84bd3a47279e0c98abbc8bb272f8ee276c34f979de62de78422
DIST postgresql-jdbc-8.3-603.src.tar.gz 521517 SHA256 d7fa28a6f059887ae8d692c0e8a8befac688b3755ac6f46ab07e2119018e4f2d SHA512 e8caa83fead9e94333b28a33b9e9849b1800f3215025a9fc6ea04bd926af9d814fb56993b209749942c737cfcba578b7289a63a4438d941b8a9a63f1cf1c8c74 WHIRLPOOL 242939633995f33acbcbb0b9e89bcf3ca4faaf62d0242eb1fa967528152880ee7ccbbf0f7a3eb70a450f94ba9e8ae2692154716b4ad71a4ce3c651507f836604
DIST postgresql-jdbc-8.4-701.src.tar.gz 551752 SHA256 d2748885b99b414fb2a1d68659b18effb87c9d3379181ad1f3d3e1e40cf61d90 SHA512 9ded77cdee133bde196cbfcf4ee425365620038c211714ed7e20e99012c7e3ff0834da4140bc4839e96fbe986591ec82227f3bf26a86b1f22ec5b5ee0be54d40 WHIRLPOOL 15ca28c3cab0c72ce6ab01771797fe6e78149290e8777f51e36c7943e2339361b68f9f089fb14036f76bbaba79755fc2006ad4eb3e737ac93eba26cb50b4e550
DIST postgresql-jdbc-9.2-1003.src.tar.gz 1843082 SHA256 d61449b8a17ce540b26437382c33a59a49a94c578c943fccf91139ee06478968 SHA512 f91d9617726722998a51275c625f6ea89dfe0ac7ce415cc6fa76302b13762bcf825cd61ec69d25d0199ca21de8a24286eeffb843ad59c06fd3049a289ac2b702 WHIRLPOOL a7994d7ce38bd17e9353339d2838601a22328c8eff03baa122663526ef2c0c2afa8b16d9c93ea9fbff7a756612cddffef41ec00552640766acc5e1fbe4996282
DIST postgresql-jdbc-9.2-1004.src.tar.gz 1842921 SHA256 eeadff0d830cd19a4f52a9489748a7126b0c1d4863bf9a5d65618158dfc6ae68 SHA512 6e218b7df3d772e4fb9053672f5f77f6012fe6e652a536dfe171408e957465520b05994d4fa13c4d478b595a55b8068da663b9f3dcb544a46fcf91d71ba8fdf5 WHIRLPOOL f1afa3201fbaaf47edb0224d3263642b3202fbf6fc922318354db86e394f0005611b0981da043a4e14cbb67224ac8fa6d96880e0763fcd4d5b502423c7eaa0c7
DIST postgresql-jdbc-9.3-1100.src.tar.gz 1852465 SHA256 e6be53d4cda04735f5f147d2296acb9a22630b062fa3a4ef894073f23efc6d55 SHA512 43968a62f9443739721016ede186b2f41fa6db2d1ef319cd65059f8715e90eda7c7f568995b293578c39e04d43085cfdfece587500f99ed1a49964c12d8c747a WHIRLPOOL 9bf218936a00df00fb4b4f6ed6c3bbe06cdcfcd14d306a4f7bf3073e83f1c51bc85c0a061c2e04790bcebf9183b8aabd056522fa5d18b0734a4aec34b3ab14a0
+DIST postgresql-jdbc-9.4-1201.src.tar.gz 1909810 SHA256 96b079611038c0ffff6bb8d22d51ada0cb82c8eb3bd3a9294055963cc638fda7 SHA512 6fd543e325de931ee6c33fe4b1daf53d7baa91061afc9dc1687c4b202430cbcf2a7e3fb047f9e1d88f4d39b8f4f85a98f2b930205ceba414212dfcbaaf108883 WHIRLPOOL 3245227c875d44d82109a5700e06ed3d5bcc75469cd9333c98a7b396b2db1e2ac1da002db19f632afed262929cd7e9a3d8f93d2b24321e103b815383f8fc0a05
EBUILD jdbc-postgresql-8.3_p603.ebuild 2108 SHA256 2a60bfa09907532d0cb6a01419826a4c00d5d3b643d5b717d0174c5b112c1b55 SHA512 73f331da79e5e84cfac5b8668672e22138e248e5b341e891e50da6522bb1562cc8747eccccef5925a8cbab3246ff8fd45a0c89f664c6c7fc59f0e84f8f31ee62 WHIRLPOOL 925bb198f3b06b279d9372f984beb7e5612f8a1955eb6843641b3e5f7aa4aa84084421a19a5020a69510c2bfe0313e3c3844599ad22040a2a481860c8ac9d3fa
EBUILD jdbc-postgresql-8.4_p701-r1.ebuild 2141 SHA256 6abce099e9ceca91947a25d835d3cadea6f014f9aa7a42ad1890557d4c83a6bc SHA512 e488caae54e124ff7de0cb7b9e6953c29b93a25310c7b105c03461d181f6c5e99b814be882335986aa7beef81f21d5bbc10bf17a2583ae5a501f74c086f134c5 WHIRLPOOL 362e3b6f3d81dd151fcc368c45b9afc1f059036591e671a26a9df2b394f49453af9c7a2d38dcc58839155123bcf3b77818e74214d1a31faecf2f0d2fdfe8f34c
EBUILD jdbc-postgresql-9.2_p1003.ebuild 2092 SHA256 dd5dd31259433af0ecf6ad73e8e64d7084acf79d98b8442e15278b5cbc0580dd SHA512 36a2e3af825d241b7618c9024d448c9aa672b1eae924c771b52a7cd93fa2db947544fc2deede8dcfb9c7ff3eba1106566e32f57b7c65b73ac8f5d2c875a8b220 WHIRLPOOL c693a67b1f4f9e1b52acc6cd537396d1f410aa1f1cd1e610d6b7020f90a581a3fa007ac114cc9961489f852a61a2bf93079701d9069cbf328153dcba6b1590c2
EBUILD jdbc-postgresql-9.2_p1004.ebuild 2096 SHA256 b3dc3b21f14974a64bf00ef37d9179aafc0d9af8fc266d5b5410c8f849bba57d SHA512 2eb7139a2b08a8355e7e4e1a9aab563d2208494291313e0b036a4e170cb37535212a0c3cf6fdd34e57b5f8786070ec07ba1ff7f59348d8fa76090552d46ba562 WHIRLPOOL c504e84ad11c6cb0c5fe11b274d1e2a681d2cdf9ebaf858e6ad0310ff5cabaebc8b40f6f6c8aa999a3c86460df49f606871714aa14036feaddb4e60075cba119
-EBUILD jdbc-postgresql-9.3_p1100.ebuild 2096 SHA256 560db4c8614fb4ade63e17515a8f4e1a99d4e3048360a564ad25bfc9aa3b35b0 SHA512 93df037161eef1bf98c2852e761565e467096a2c7ded896fbef7ecdd82259dc05d6ef4f93a39e41870fab48754600f2456827a2433f0ee1a0ddfcbf981f1822b WHIRLPOOL 0d0983cb67563bba1267b76f7c242ff6f9def316fe0cb589e02fbdb504541cede14683b8d661725135b9569e09f40ef5fe1c5e30df46662260dc74f9d2b8d810
-MISC ChangeLog 10664 SHA256 92e3229514032a13eab44c32b15c1f3cc3158a9e343e457eb94d2d124b929e81 SHA512 398b60956e1b533070a337b88d1270db15d910824563024781d712989efb2bc57db4ebc4439f11f157ee07602920bcdbc903da7de5d86bfde1f5f9b8ce8ded5c WHIRLPOOL 2f3ecc4324ed95fc5057f612b6a855f6515d8dcdff1ae3f1c9bf3269047398fbb88f7c3ec33b0a532ed68e958982f284c3a8a45e4f49151376b38cc68ec9d117
+EBUILD jdbc-postgresql-9.3_p1100.ebuild 2095 SHA256 aa675dc325fea13ea3b43093d02bf04aa7b7925cda3919ee847031ca680cb5c3 SHA512 b88766b56f80207c2db583355b78801dc85e9d7174d8f8a2b5a1bd1a124b86e22b0c1fcef56daa60ebf4a05f538b53ad38c96ec74dd11a748f8359c6978b2a55 WHIRLPOOL a53850419a2d834606a5ccf610d948bc9c785aae69c041d4b2e47827b8131e7aa896f1a53a5bac1abdfb72160d8abec14204039befd47c90bc3f553b696ef1bb
+EBUILD jdbc-postgresql-9.4_p1201.ebuild 3162 SHA256 97773c2f4c0ec267f8c1851485620bbcff9f2f26774b6f12ec533fae3549a9c4 SHA512 3806bad9fa135497fb198c70689a986c2e3e307f1ec3b59f02d33a2991613a8a2ec884b07a812981155ad2365913f4811c22d7801b9949eda53d0f8a7aec41d6 WHIRLPOOL 2508021cc768946ce79bf62b434bc59176916d65fc2dfe1e2c869a16e5b8b15ffbf16519149efad524ab7a7b31f054f791c53f7f9969d25f8f741738b93cbe11
+MISC ChangeLog 11039 SHA256 741385d4a0f10e7a85ff99553dda613b4b1b5b6c8a58364db0a81d6221811432 SHA512 936f5533597f7fe0f1c6c705c414ceed518438bf7f001f6b6cc3e702f6466308c5eb231df4f9d8fae7559c7f55ea1ab02fb79eda0744f0da7f067caffcfde001 WHIRLPOOL 2cc233cd7a9c78c68655a27c6bb834fb100d971f1ac3bea5f5b375641e4e59c414e40be9d82ad74af5f2742f06ba72e4186a3e33bee03a3386cd011d754e096b
MISC metadata.xml 157 SHA256 295d02c5805b0257938eb80314b371daac94b8d6ea85629a902de7a824adc0c9 SHA512 bbae663e26f48fdc5e272adc2b06c14f77f34c53caf84acb53908ff036e7c12a3edbbc0929d2db56bee861a453381d979c7e0983a23716f629ed2135c22ffece WHIRLPOOL 887e153e2481e7d76f0f1b67a395f10f0328b93930185ecdb8fcb5fe3c50f839086a18831d61cf45b34657aaffca6c3b7900cf3c04b712846a05027a84602448
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iF4EAREIAAYFAlSgIKcACgkQVxOqA9G7/aAx0gD/ZkeQmwXCUj8xDNxmGXwEaSCb
-is8EXnxCf370E6I0TO4A/jenmfyo0oSBEQEi8X0GYzAjTO88WSf+E8+oe7JdZffu
-=zKiQ
+iQEcBAEBCAAGBQJVOCALAAoJEJGRpfGTSRu49qYH/2QQRqNi74lgOijwoNHeGAg1
++Gp5ym9sj0PgklU2EEMaV7ipaum9s8KsySnu8aWqGFpz6C0klyM6DOzNMBXbWSVy
+V+BXmaQPEUvsLIpsPmKpYC+5NrTrIA68+nPXSofhPLyu+5AWMDUijmNivPyp1QLY
+361UG52W5Ro0Yqa8TiEDR8orxvv2ZgkMzqT0KrRS+5+Oct9/ArR83zpUEX9ndGIM
+Lq9d7nvhEZCn8A3qfQV5bUvPJfYloK7aFPCG2l/MSyV1YcXtza0CJNh9l0HebMDX
+0BSOlOJfttxTGUnz+ueseT0Nlmyy+mE1Cj8bXh08qkvALFxDDU1A4tqN/G6DC1E=
+=cEt1
-----END PGP SIGNATURE-----
--- /dev/null
+--- 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:="(&(|(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 -->
--- /dev/null
+--- a/org/postgresql/core/v3/ConnectionFactoryImpl.java 2015-03-23 07:32:15.000000000 +0100
++++ b/org/postgresql/core/v3/ConnectionFactoryImpl.java 2015-03-23 07:41:53.160058718 +0100
+@@ -19,7 +19,6 @@
+
+ import org.postgresql.PGProperty;
+ import org.postgresql.core.*;
+-import org.postgresql.sspi.SSPIClient;
+ import org.postgresql.hostchooser.GlobalHostStatusTracker;
+ import org.postgresql.hostchooser.HostChooser;
+ import org.postgresql.hostchooser.HostChooserFactory;
+@@ -387,11 +386,7 @@
+ // or an authentication request
+
+ String password = PGProperty.PASSWORD.get(info);
+-
+- /* SSPI negotiation state, if used */
+- SSPIClient sspiClient = null;
+
+- try {
+ authloop:
+ while (true)
+ {
+@@ -507,88 +502,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())
+@@ -609,18 +532,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);
+- }
+-
+- }
+- }
+
+ }
+
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/jdbc-postgresql-9.3_p1100.ebuild,v 1.3 2014/12/28 15:24:21 titanofold Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/jdbc-postgresql-9.3_p1100.ebuild,v 1.4 2015/04/22 22:27:05 monsieurp Exp $
EAPI="5"
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/jdbc-postgresql-9.4_p1201.ebuild,v 1.1 2015/04/22 22:27:05 monsieurp Exp $
+
+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="http://jdbc.postgresql.org/download/${MY_P}.tar.gz"
+HOMEPAGE="http://jdbc.postgresql.org/"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="test"
+
+DEPEND="
+ >=virtual/jdk-1.6
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ test? (
+ dev-java/ant-junit
+ dev-java/junit:4
+ >=dev-db/postgresql-9.3[server]
+ )"
+RDEPEND=">=virtual/jre-1.6"
+
+S="${WORKDIR}/postgresql-jdbc-${MY_PV}.src"
+
+java_prepare() {
+ find -name "*.class" -type f -exec rm -v {} + || die
+
+ # 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}"/${P}-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}"/${P}-remove-osgi.patch
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_DOC_TARGET="publicapi"
+
+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"
+ 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 '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)
+}
+
+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
+}