Created new ebuilds that will replace jdbc3-postgresql package
authorMiroslav Šulc <fordfrog@gentoo.org>
Sat, 6 Jan 2007 20:52:59 +0000 (20:52 +0000)
committerMiroslav Šulc <fordfrog@gentoo.org>
Sat, 6 Jan 2007 20:52:59 +0000 (20:52 +0000)
Package-Manager: portage-2.1.2_rc4-r6

12 files changed:
dev-java/jdbc-postgresql/ChangeLog [new file with mode: 0644]
dev-java/jdbc-postgresql/Manifest [new file with mode: 0644]
dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.0_p318 [new file with mode: 0644]
dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.1_p408 [new file with mode: 0644]
dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.2_p504 [new file with mode: 0644]
dev-java/jdbc-postgresql/files/jdbc-postgresql-8.0_p318-build.xml.patch [new file with mode: 0644]
dev-java/jdbc-postgresql/files/jdbc-postgresql-8.1_p408-build.xml.patch [new file with mode: 0644]
dev-java/jdbc-postgresql/files/jdbc-postgresql-8.2_p504-build.xml.patch [new file with mode: 0644]
dev-java/jdbc-postgresql/jdbc-postgresql-8.0_p318.ebuild [new file with mode: 0644]
dev-java/jdbc-postgresql/jdbc-postgresql-8.1_p408.ebuild [new file with mode: 0644]
dev-java/jdbc-postgresql/jdbc-postgresql-8.2_p504.ebuild [new file with mode: 0644]
dev-java/jdbc-postgresql/metadata.xml [new file with mode: 0644]

diff --git a/dev-java/jdbc-postgresql/ChangeLog b/dev-java/jdbc-postgresql/ChangeLog
new file mode 100644 (file)
index 0000000..b3d15a5
--- /dev/null
@@ -0,0 +1,16 @@
+# ChangeLog for dev-java/jdbc-postgresql
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/ChangeLog,v 1.3 2007/01/06 20:52:59 fordfrog Exp $
+
+*jdbc-postgresql-8.2_p504 (06 Jan 2007)
+*jdbc-postgresql-8.1_p408 (06 Jan 2007)
+*jdbc-postgresql-8.0_p318 (06 Jan 2007)
+
+  06 Jan 2007; Miroslav Šulc <fordfrog@gentoo.org>
+  +files/jdbc-postgresql-8.0_p318-build.xml.patch,
+  +files/jdbc-postgresql-8.1_p408-build.xml.patch,
+  +files/jdbc-postgresql-8.2_p504-build.xml.patch,
+  +jdbc-postgresql-8.0_p318.ebuild, +jdbc-postgresql-8.1_p408.ebuild,
+  +jdbc-postgresql-8.2_p504.ebuild:
+  Created new ebuilds that will replace jdbc3-postgresql package, bug #157973.
+
diff --git a/dev-java/jdbc-postgresql/Manifest b/dev-java/jdbc-postgresql/Manifest
new file mode 100644 (file)
index 0000000..42b8601
--- /dev/null
@@ -0,0 +1,44 @@
+AUX jdbc-postgresql-8.0_p318-build.xml.patch 1814 RMD160 3281bd8bb2c9461ca099169d71eff2a3e1855fb5 SHA1 bd89239484c1459c1219ea34ee6c5af1cea8cf4a SHA256 79c50e8603246965ded01285983150ec8f89408afef0b1465551d12b90dbaa10
+MD5 bfaea274a39fadeb2793f9d1736aabd6 files/jdbc-postgresql-8.0_p318-build.xml.patch 1814
+RMD160 3281bd8bb2c9461ca099169d71eff2a3e1855fb5 files/jdbc-postgresql-8.0_p318-build.xml.patch 1814
+SHA256 79c50e8603246965ded01285983150ec8f89408afef0b1465551d12b90dbaa10 files/jdbc-postgresql-8.0_p318-build.xml.patch 1814
+AUX jdbc-postgresql-8.1_p408-build.xml.patch 1814 RMD160 3281bd8bb2c9461ca099169d71eff2a3e1855fb5 SHA1 bd89239484c1459c1219ea34ee6c5af1cea8cf4a SHA256 79c50e8603246965ded01285983150ec8f89408afef0b1465551d12b90dbaa10
+MD5 bfaea274a39fadeb2793f9d1736aabd6 files/jdbc-postgresql-8.1_p408-build.xml.patch 1814
+RMD160 3281bd8bb2c9461ca099169d71eff2a3e1855fb5 files/jdbc-postgresql-8.1_p408-build.xml.patch 1814
+SHA256 79c50e8603246965ded01285983150ec8f89408afef0b1465551d12b90dbaa10 files/jdbc-postgresql-8.1_p408-build.xml.patch 1814
+AUX jdbc-postgresql-8.2_p504-build.xml.patch 1814 RMD160 3281bd8bb2c9461ca099169d71eff2a3e1855fb5 SHA1 bd89239484c1459c1219ea34ee6c5af1cea8cf4a SHA256 79c50e8603246965ded01285983150ec8f89408afef0b1465551d12b90dbaa10
+MD5 bfaea274a39fadeb2793f9d1736aabd6 files/jdbc-postgresql-8.2_p504-build.xml.patch 1814
+RMD160 3281bd8bb2c9461ca099169d71eff2a3e1855fb5 files/jdbc-postgresql-8.2_p504-build.xml.patch 1814
+SHA256 79c50e8603246965ded01285983150ec8f89408afef0b1465551d12b90dbaa10 files/jdbc-postgresql-8.2_p504-build.xml.patch 1814
+DIST postgresql-jdbc-8.0-318.src.tar.gz 423674 RMD160 2c4c6fa27b2d2724c979c19ce939b0827242ea71 SHA1 1bd308db0b69f66a0d195f91c1fb58ffa5891557 SHA256 77438f6b5a60008d364fcc3dc66a0f65f3180924ceb63e3c518bf80477d20454
+DIST postgresql-jdbc-8.1-408.src.tar.gz 485140 RMD160 6ad6b1326326745251feca44dea66cbaa0d6d841 SHA1 3a6145ce19be7ad5a8f331952a3789b9cee94f30 SHA256 99b6dbcc37e14aab2530093447fb8858600e52526f9cdc2af0db678ee179150b
+DIST postgresql-jdbc-8.2-504.src.tar.gz 482124 RMD160 5c47ee886bb1e7b056ee83d9eb59826cffb7bd47 SHA1 5be1fc49fb0990f2bff6919c4f88827de9d5b791 SHA256 a432864026e6018bc7871f5042456ac280895719fb07ce92a9ffa64564517fba
+EBUILD jdbc-postgresql-8.0_p318.ebuild 2757 RMD160 15ca0fd99bc0a723adfc29702ceed6fe5d3f1503 SHA1 deb67bb9af1399b3e8f918eb4b49a5abfdc46d2b SHA256 bee574459a9a480d857266cb83c9cadb2e1f750f266e66243b2d071b2a7c0ecc
+MD5 202159fa67c48e832955641a719b1098 jdbc-postgresql-8.0_p318.ebuild 2757
+RMD160 15ca0fd99bc0a723adfc29702ceed6fe5d3f1503 jdbc-postgresql-8.0_p318.ebuild 2757
+SHA256 bee574459a9a480d857266cb83c9cadb2e1f750f266e66243b2d071b2a7c0ecc jdbc-postgresql-8.0_p318.ebuild 2757
+EBUILD jdbc-postgresql-8.1_p408.ebuild 2757 RMD160 528c8ffccca31cedb00a609520e7ab0c68b807fc SHA1 8e6d384eab0cbb278f133610b778505db9c670be SHA256 14460b63407416d42fe7f16ee5ee36fa7072b46b956b30a0bbe9518fc45a122b
+MD5 b6b11a2336ead195fe6222e66347c79d jdbc-postgresql-8.1_p408.ebuild 2757
+RMD160 528c8ffccca31cedb00a609520e7ab0c68b807fc jdbc-postgresql-8.1_p408.ebuild 2757
+SHA256 14460b63407416d42fe7f16ee5ee36fa7072b46b956b30a0bbe9518fc45a122b jdbc-postgresql-8.1_p408.ebuild 2757
+EBUILD jdbc-postgresql-8.2_p504.ebuild 2543 RMD160 7031166aaa2205a50cc5f221551db27c42cbaed6 SHA1 160a0079cd98176a3e928be41325cdbcf79862fc SHA256 1d14b80c6cb92cf875c3083248067899fca6ef9e52e0e81482fa437925ff173a
+MD5 2985aa9903625cb406f62387dff52692 jdbc-postgresql-8.2_p504.ebuild 2543
+RMD160 7031166aaa2205a50cc5f221551db27c42cbaed6 jdbc-postgresql-8.2_p504.ebuild 2543
+SHA256 1d14b80c6cb92cf875c3083248067899fca6ef9e52e0e81482fa437925ff173a jdbc-postgresql-8.2_p504.ebuild 2543
+MISC ChangeLog 741 RMD160 9c681fa72eb52c1ff784d864d01975f1c7c9cd0f SHA1 72b54bcf95d1392786d25a3e90ca6e26749b73b3 SHA256 801ce5a1b77f30c686861c96f0f967dd02ba37b0942c84aced3cc8bda7423218
+MD5 94db3827f3b95cb591e810e1d8b361a6 ChangeLog 741
+RMD160 9c681fa72eb52c1ff784d864d01975f1c7c9cd0f ChangeLog 741
+SHA256 801ce5a1b77f30c686861c96f0f967dd02ba37b0942c84aced3cc8bda7423218 ChangeLog 741
+MISC metadata.xml 157 RMD160 ab0b3741457dee7531f59c4da0f0e9e8399af084 SHA1 c37a6b9922aef61b5b3387655bccb6e3b16e0e26 SHA256 295d02c5805b0257938eb80314b371daac94b8d6ea85629a902de7a824adc0c9
+MD5 a6ec7d7724fbd068ffb39b5be56134ed metadata.xml 157
+RMD160 ab0b3741457dee7531f59c4da0f0e9e8399af084 metadata.xml 157
+SHA256 295d02c5805b0257938eb80314b371daac94b8d6ea85629a902de7a824adc0c9 metadata.xml 157
+MD5 5a29b37147ca3affdc3b3047175e3c84 files/digest-jdbc-postgresql-8.0_p318 283
+RMD160 bc19345fc8915cc64fed27d1d7d4bbac19a30d92 files/digest-jdbc-postgresql-8.0_p318 283
+SHA256 51377aa0057026cc3526258b57845cc6b30670fe876d6b2f616445b0315c8d80 files/digest-jdbc-postgresql-8.0_p318 283
+MD5 1c916e73abb310f89e9669a5dcc63efc files/digest-jdbc-postgresql-8.1_p408 283
+RMD160 9975b4decf095db322be04d2ff4cb59d28504418 files/digest-jdbc-postgresql-8.1_p408 283
+SHA256 5bbdfa2129c22534ac9d266847628e980f3e5d563b19baa49a9b36ef83c3754f files/digest-jdbc-postgresql-8.1_p408 283
+MD5 246b3543a747a6f046673549ac94ec7d files/digest-jdbc-postgresql-8.2_p504 283
+RMD160 1e56f6fd92345f1582e89c1f9d13417cbcfb623d files/digest-jdbc-postgresql-8.2_p504 283
+SHA256 1a6dfecd078ad2c37590b64d58aa7b4cad49e49deb484e43f67ed562a93bb9dc files/digest-jdbc-postgresql-8.2_p504 283
diff --git a/dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.0_p318 b/dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.0_p318
new file mode 100644 (file)
index 0000000..148a98c
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 bd3aa9d8b622132f332bdeb833f59b06 postgresql-jdbc-8.0-318.src.tar.gz 423674
+RMD160 2c4c6fa27b2d2724c979c19ce939b0827242ea71 postgresql-jdbc-8.0-318.src.tar.gz 423674
+SHA256 77438f6b5a60008d364fcc3dc66a0f65f3180924ceb63e3c518bf80477d20454 postgresql-jdbc-8.0-318.src.tar.gz 423674
diff --git a/dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.1_p408 b/dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.1_p408
new file mode 100644 (file)
index 0000000..cb0dcc9
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 af1666b16b126d843e95656b1eef9295 postgresql-jdbc-8.1-408.src.tar.gz 485140
+RMD160 6ad6b1326326745251feca44dea66cbaa0d6d841 postgresql-jdbc-8.1-408.src.tar.gz 485140
+SHA256 99b6dbcc37e14aab2530093447fb8858600e52526f9cdc2af0db678ee179150b postgresql-jdbc-8.1-408.src.tar.gz 485140
diff --git a/dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.2_p504 b/dev-java/jdbc-postgresql/files/digest-jdbc-postgresql-8.2_p504
new file mode 100644 (file)
index 0000000..35801ed
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 90e20213973a528d22c47a298e48ba58 postgresql-jdbc-8.2-504.src.tar.gz 482124
+RMD160 5c47ee886bb1e7b056ee83d9eb59826cffb7bd47 postgresql-jdbc-8.2-504.src.tar.gz 482124
+SHA256 a432864026e6018bc7871f5042456ac280895719fb07ce92a9ffa64564517fba postgresql-jdbc-8.2-504.src.tar.gz 482124
diff --git a/dev-java/jdbc-postgresql/files/jdbc-postgresql-8.0_p318-build.xml.patch b/dev-java/jdbc-postgresql/files/jdbc-postgresql-8.0_p318-build.xml.patch
new file mode 100644 (file)
index 0000000..e5e43df
--- /dev/null
@@ -0,0 +1,37 @@
+--- build.xml.original 2006-12-09 00:20:02.000000000 +0100
++++ build.xml  2006-12-09 17:08:35.000000000 +0100
+@@ -24,6 +24,8 @@
+   <property name="builddir" value="build" />
+   <property name="package" value="org/postgresql" />
+   <property name="debug" value="on" />
++  <property name="junit" value="true" />
++  <property name="junit.task" value="true" />
+   <!-- default build parameters are in build.properties, these may be
+        overridden by local configuration settings in build.local.properties
+@@ -63,8 +65,6 @@
+     <available property="datasourceclass" classname="javax.sql.DataSource"/>
+     <available property="ssl" classname="javax.net.ssl.SSLContext"/>
+-    <available property="junit" classname="junit.framework.Test"/>
+-    <available property="junit.task" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
+     <condition property="datasource">
+       <isset property="datasourceclass" />
+@@ -386,7 +386,7 @@
+   <target name="testjar" depends="jar">
+     <fail message="JUnit could not be found in your classpath.  You must download and install it from http://junit.org to build and run the test suite." unless="junit" />
+     <mkdir dir="${builddir}/tests"/>
+-    <javac srcdir="${srcdir}" destdir="${builddir}/tests" debug="${debug}">
++    <javac classpath="${basedir}/lib/junit.jar" srcdir="${srcdir}" destdir="${builddir}/tests" debug="${debug}">
+       <include name="${package}/test/**" />
+       <exclude name="${package}/test/jdbc2/optional/**" unless="jdbc2optionaltests" />
+@@ -482,7 +482,6 @@
+      <param name="base.dir" expression="${builddir}/doc/"/>
+      <param name="use.id.as.filename" expression="1" />
+    </xslt>
+-   <delete file="${builddir}/doc/pgjdbc.html"/>
+   </target>
+   <!-- Blah. Can't reference an external XML catalog until Ant 1.6.
diff --git a/dev-java/jdbc-postgresql/files/jdbc-postgresql-8.1_p408-build.xml.patch b/dev-java/jdbc-postgresql/files/jdbc-postgresql-8.1_p408-build.xml.patch
new file mode 100644 (file)
index 0000000..e5e43df
--- /dev/null
@@ -0,0 +1,37 @@
+--- build.xml.original 2006-12-09 00:20:02.000000000 +0100
++++ build.xml  2006-12-09 17:08:35.000000000 +0100
+@@ -24,6 +24,8 @@
+   <property name="builddir" value="build" />
+   <property name="package" value="org/postgresql" />
+   <property name="debug" value="on" />
++  <property name="junit" value="true" />
++  <property name="junit.task" value="true" />
+   <!-- default build parameters are in build.properties, these may be
+        overridden by local configuration settings in build.local.properties
+@@ -63,8 +65,6 @@
+     <available property="datasourceclass" classname="javax.sql.DataSource"/>
+     <available property="ssl" classname="javax.net.ssl.SSLContext"/>
+-    <available property="junit" classname="junit.framework.Test"/>
+-    <available property="junit.task" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
+     <condition property="datasource">
+       <isset property="datasourceclass" />
+@@ -386,7 +386,7 @@
+   <target name="testjar" depends="jar">
+     <fail message="JUnit could not be found in your classpath.  You must download and install it from http://junit.org to build and run the test suite." unless="junit" />
+     <mkdir dir="${builddir}/tests"/>
+-    <javac srcdir="${srcdir}" destdir="${builddir}/tests" debug="${debug}">
++    <javac classpath="${basedir}/lib/junit.jar" srcdir="${srcdir}" destdir="${builddir}/tests" debug="${debug}">
+       <include name="${package}/test/**" />
+       <exclude name="${package}/test/jdbc2/optional/**" unless="jdbc2optionaltests" />
+@@ -482,7 +482,6 @@
+      <param name="base.dir" expression="${builddir}/doc/"/>
+      <param name="use.id.as.filename" expression="1" />
+    </xslt>
+-   <delete file="${builddir}/doc/pgjdbc.html"/>
+   </target>
+   <!-- Blah. Can't reference an external XML catalog until Ant 1.6.
diff --git a/dev-java/jdbc-postgresql/files/jdbc-postgresql-8.2_p504-build.xml.patch b/dev-java/jdbc-postgresql/files/jdbc-postgresql-8.2_p504-build.xml.patch
new file mode 100644 (file)
index 0000000..e5e43df
--- /dev/null
@@ -0,0 +1,37 @@
+--- build.xml.original 2006-12-09 00:20:02.000000000 +0100
++++ build.xml  2006-12-09 17:08:35.000000000 +0100
+@@ -24,6 +24,8 @@
+   <property name="builddir" value="build" />
+   <property name="package" value="org/postgresql" />
+   <property name="debug" value="on" />
++  <property name="junit" value="true" />
++  <property name="junit.task" value="true" />
+   <!-- default build parameters are in build.properties, these may be
+        overridden by local configuration settings in build.local.properties
+@@ -63,8 +65,6 @@
+     <available property="datasourceclass" classname="javax.sql.DataSource"/>
+     <available property="ssl" classname="javax.net.ssl.SSLContext"/>
+-    <available property="junit" classname="junit.framework.Test"/>
+-    <available property="junit.task" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
+     <condition property="datasource">
+       <isset property="datasourceclass" />
+@@ -386,7 +386,7 @@
+   <target name="testjar" depends="jar">
+     <fail message="JUnit could not be found in your classpath.  You must download and install it from http://junit.org to build and run the test suite." unless="junit" />
+     <mkdir dir="${builddir}/tests"/>
+-    <javac srcdir="${srcdir}" destdir="${builddir}/tests" debug="${debug}">
++    <javac classpath="${basedir}/lib/junit.jar" srcdir="${srcdir}" destdir="${builddir}/tests" debug="${debug}">
+       <include name="${package}/test/**" />
+       <exclude name="${package}/test/jdbc2/optional/**" unless="jdbc2optionaltests" />
+@@ -482,7 +482,6 @@
+      <param name="base.dir" expression="${builddir}/doc/"/>
+      <param name="use.id.as.filename" expression="1" />
+    </xslt>
+-   <delete file="${builddir}/doc/pgjdbc.html"/>
+   </target>
+   <!-- Blah. Can't reference an external XML catalog until Ant 1.6.
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-8.0_p318.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-8.0_p318.ebuild
new file mode 100644 (file)
index 0000000..dc4ecd9
--- /dev/null
@@ -0,0 +1,103 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/jdbc-postgresql-8.0_p318.ebuild,v 1.1 2007/01/06 20:52:59 fordfrog Exp $
+
+inherit java-ant-2 java-pkg-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="~x86 ~ppc ~amd64"
+IUSE="doc examples java5 source test"
+
+DEPEND=">=dev-java/java-config-2.0.31
+       !java5? ( =virtual/jdk-1.4* )
+       java5? ( =virtual/jdk-1.5* )
+       doc? ( dev-libs/libxslt
+               app-text/docbook-xsl-stylesheets )
+       source? ( app-arch/zip )
+       !test? ( >=dev-java/ant-core-1.6 )
+       test? ( =dev-java/junit-3.8*
+               >=dev-java/ant-1.6
+               dev-db/postgresql )"
+RDEPEND=">=virtual/jre-1.4"
+
+S="${WORKDIR}/${MY_P}"
+
+
+pkg_setup() {
+       if use java5; then
+               JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"
+
+               # We must specify source/target versions because currently it is not
+               # correctly picked up from NV_DEPEND for build.xml rewrite
+               JAVA_PKG_WANT_SOURCE="1.5"
+               JAVA_PKG_WANT_TARGET="1.5"
+       else
+               JAVA_PKG_NV_DEPEND="=virtual/jdk-1.4*"
+       fi
+
+       java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+       unpack ${A}
+
+       # patch to make junit test work + correction for doc target
+       cd ${S}
+       epatch ${FILESDIR}/${P}-build.xml.patch
+
+       mkdir lib
+       cd lib
+       java-pkg_jar-from junit
+}
+
+src_compile() {
+       eant jar $(use_doc publicapi)
+
+       # 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_install() {
+       java-pkg_newjar jars/postgresql.jar jdbc-postgresql.jar
+
+       if use_doc; then
+               java-pkg_dojavadoc build/publicapi
+               java-pkg_dohtml build/doc/pgjdbc.html
+       fi
+
+       if use examples; then
+               dodir /usr/share/doc/${PF}/examples
+               insinto /usr/share/doc/${PF}/examples
+               doins ${S}/example/*
+               java-pkg_newjar jars/postgresql-examples.jar jdbc-postgresql-examples.jar
+       fi
+
+       use source && java-pkg_dosrc org
+}
+
+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 "http://gentoo-wiki.com/HOWTO_Configure_Postgresql"
+
+       ANT_TASKS="ant-junit" eant test
+}
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-8.1_p408.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-8.1_p408.ebuild
new file mode 100644 (file)
index 0000000..8525f66
--- /dev/null
@@ -0,0 +1,103 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/jdbc-postgresql-8.1_p408.ebuild,v 1.1 2007/01/06 20:52:59 fordfrog Exp $
+
+inherit java-ant-2 java-pkg-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="~x86 ~ppc ~amd64"
+IUSE="doc examples java5 source test"
+
+DEPEND=">=dev-java/java-config-2.0.31
+       !java5? ( =virtual/jdk-1.4* )
+       java5? ( =virtual/jdk-1.5* )
+       doc? ( dev-libs/libxslt
+               app-text/docbook-xsl-stylesheets )
+       source? ( app-arch/zip )
+       !test? ( >=dev-java/ant-core-1.6 )
+       test? ( =dev-java/junit-3.8*
+               >=dev-java/ant-1.6
+               dev-db/postgresql )"
+RDEPEND=">=virtual/jre-1.4"
+
+S="${WORKDIR}/${MY_P}"
+
+
+pkg_setup() {
+       if use java5; then
+               JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"
+
+               # We must specify source/target versions because currently it is not
+               # correctly picked up from NV_DEPEND for build.xml rewrite
+               JAVA_PKG_WANT_SOURCE="1.5"
+               JAVA_PKG_WANT_TARGET="1.5"
+       else
+               JAVA_PKG_NV_DEPEND="=virtual/jdk-1.4*"
+       fi
+
+       java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+       unpack ${A}
+
+       # patch to make junit test work + correction for doc target
+       cd ${S}
+       epatch ${FILESDIR}/${P}-build.xml.patch
+
+       mkdir lib
+       cd lib
+       java-pkg_jar-from junit
+}
+
+src_compile() {
+       eant jar $(use_doc publicapi)
+
+       # 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_install() {
+       java-pkg_newjar jars/postgresql.jar jdbc-postgresql.jar
+
+       if use_doc; then
+               java-pkg_dojavadoc build/publicapi
+               java-pkg_dohtml build/doc/pgjdbc.html
+       fi
+
+       if use examples; then
+               dodir /usr/share/doc/${PF}/examples
+               insinto /usr/share/doc/${PF}/examples
+               doins ${S}/example/*
+               java-pkg_newjar jars/postgresql-examples.jar jdbc-postgresql-examples.jar
+       fi
+
+       use source && java-pkg_dosrc org
+}
+
+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 "http://gentoo-wiki.com/HOWTO_Configure_Postgresql"
+
+       ANT_TASKS="ant-junit" eant test
+}
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-8.2_p504.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-8.2_p504.ebuild
new file mode 100644 (file)
index 0000000..259b190
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/jdbc-postgresql-8.2_p504.ebuild,v 1.1 2007/01/06 20:52:59 fordfrog Exp $
+
+inherit java-ant-2 java-pkg-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="~x86 ~ppc ~amd64"
+IUSE="doc java5 source test"
+
+DEPEND=">=dev-java/java-config-2.0.31
+       !java5? ( =virtual/jdk-1.4* )
+       java5? ( =virtual/jdk-1.5* )
+       doc? ( dev-libs/libxslt
+               app-text/docbook-xsl-stylesheets )
+       source? ( app-arch/zip )
+       !test? ( >=dev-java/ant-core-1.6 )
+       test? ( =dev-java/junit-3.8*
+               >=dev-java/ant-1.6
+               dev-db/postgresql )"
+RDEPEND=">=virtual/jre-1.4"
+
+S="${WORKDIR}/${MY_P}"
+
+
+pkg_setup() {
+       if use java5; then
+               JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"
+
+               # We must specify source/target versions because currently it is not
+               # correctly picked up from NV_DEPEND for build.xml rewrite
+               JAVA_PKG_WANT_SOURCE="1.5"
+               JAVA_PKG_WANT_TARGET="1.5"
+       else
+               JAVA_PKG_NV_DEPEND="=virtual/jdk-1.4*"
+       fi
+
+       java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+       unpack ${A}
+
+       # patch to make junit test work + correction for doc target
+       cd ${S}
+       epatch ${FILESDIR}/${P}-build.xml.patch
+
+       mkdir lib
+       cd lib
+       java-pkg_jar-from junit
+}
+
+src_compile() {
+       eant jar $(use_doc publicapi)
+
+       # 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_install() {
+       java-pkg_newjar jars/postgresql.jar jdbc-postgresql.jar
+
+       if use_doc; then
+               java-pkg_dojavadoc build/publicapi
+               java-pkg_dohtml build/doc/pgjdbc.html
+       fi
+
+       use source && java-pkg_dosrc org
+}
+
+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 "http://gentoo-wiki.com/HOWTO_Configure_Postgresql"
+
+       ANT_TASKS="ant-junit" eant test
+}
diff --git a/dev-java/jdbc-postgresql/metadata.xml b/dev-java/jdbc-postgresql/metadata.xml
new file mode 100644 (file)
index 0000000..838c00a
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>java</herd>
+</pkgmetadata>