aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2016-05-02 15:41:19 +0100
committerJames Le Cuirot <chewi@gentoo.org>2016-05-02 15:41:19 +0100
commit1be22fc2540af3d5a9023fde3255b3d53db1958a (patch)
tree59871229221c1bafb4d68a9b5fe344932d76337d
parentUpdate .travis.yml for Portage 2.2.28 (diff)
downloadjava-1be22fc2.tar.gz
java-1be22fc2.tar.bz2
java-1be22fc2.zip
dev-java/h2: Version bump to 1.3.176
Package-Manager: portage-2.2.28
-rw-r--r--dev-java/h2/Manifest2
-rw-r--r--dev-java/h2/files/osgi-5.patch21
-rw-r--r--dev-java/h2/h2-1.3.176.ebuild (renamed from dev-java/h2/h2-1.3.161.ebuild)44
3 files changed, 44 insertions, 23 deletions
diff --git a/dev-java/h2/Manifest b/dev-java/h2/Manifest
index 4ef6aa11..91bafa69 100644
--- a/dev-java/h2/Manifest
+++ b/dev-java/h2/Manifest
@@ -1 +1 @@
-DIST h2-2011-10-28.zip 6008034 SHA256 83b3b9a92a84d192ccf450618b1d52b76ff8fb940e8ceab6e18918a60d3e67ef
+DIST h2-2014-04-05.zip 7791840 SHA256 0febacc399c405e4b58f945f57ac5a38ed6f6c64c049b2fec73f258874a1d346 SHA512 fa778e7d0d3fd1f69a11fa55b0668b6a8e06bc0ea811b904342c92108326f7339ed3e0bb8c86dfff9a16e8954a8c153958f0ebdb2789c8830753330a105159b9 WHIRLPOOL 595a1a2833d16073c0e126b6d5ecaabc9dc8e12e59665553cdc698b757fd1a6b8bcbef1f020fd7d7f319532c022382aec07555d8103786f82450027d344bfb29
diff --git a/dev-java/h2/files/osgi-5.patch b/dev-java/h2/files/osgi-5.patch
new file mode 100644
index 00000000..7250d2e6
--- /dev/null
+++ b/dev-java/h2/files/osgi-5.patch
@@ -0,0 +1,21 @@
+--- src/main/org/h2/util/DbDriverActivator.java.orig 2016-05-01 22:56:54.730869535 +0100
++++ src/main/org/h2/util/DbDriverActivator.java 2016-05-01 23:03:37.354040220 +0100
+@@ -6,7 +6,8 @@
+ */
+ package org.h2.util;
+
+-import java.util.Properties;
++import java.util.Dictionary;
++import java.util.Hashtable;
+ import org.h2.engine.Constants;
+ import org.osgi.framework.BundleActivator;
+ import org.osgi.framework.BundleContext;
+@@ -27,7 +28,7 @@
+ @Override
+ public void start(BundleContext bundleContext) {
+ org.h2.Driver driver = org.h2.Driver.load();
+- Properties properties = new Properties();
++ Dictionary<String, Object> properties = new Hashtable<String, Object>();
+ properties.put(
+ DataSourceFactory.OSGI_JDBC_DRIVER_CLASS,
+ org.h2.Driver.class.getName());
diff --git a/dev-java/h2/h2-1.3.161.ebuild b/dev-java/h2/h2-1.3.176.ebuild
index 1c038303..acbc6570 100644
--- a/dev-java/h2/h2-1.3.161.ebuild
+++ b/dev-java/h2/h2-1.3.176.ebuild
@@ -1,14 +1,13 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="4"
-MY_PV="2011-10-28"
+EAPI=5
+MY_PV="2014-04-05"
JAVA_PKG_IUSE="doc"
-JAVA_PKG_WANT_BOOTCLASSPATH="1.5"
-inherit java-pkg-2 java-pkg-simple
+inherit eutils java-pkg-2 java-pkg-simple
DESCRIPTION="Java SQL Database"
HOMEPAGE="http://www.h2database.com/"
@@ -16,36 +15,36 @@ SRC_URI="http://www.h2database.com/${PN}-${MY_PV}.zip"
LICENSE="EPL-1.0 H2-1.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
-# Some tests fail even outside of Portage using upstream's own
-# scripts. The failures we get here appear to be the same.
+# The tests are highly explosive, even using upstream's scripts, and
+# take ages to run. They seem to require quite a particular environment.
RESTRICT="test"
-CDEPEND="dev-java/lucene:3.0
+CDEPEND="dev-java/jts-core:0
+ dev-java/lucene:3.6
+ dev-java/osgi-core-api:0
+ dev-java/osgi-enterprise-api:0
dev-java/slf4j-api:0
- dev-java/tomcat-servlet-api:2.4"
+ java-virtuals/servlet-api:2.4"
DEPEND="${CDEPEND}
app-arch/unzip
app-arch/zip
- >=virtual/jdk-1.6"
+ >=virtual/jdk-1.7"
RDEPEND="${CDEPEND}
- >=virtual/jre-1.6"
+ >=virtual/jre-1.7"
S="${WORKDIR}/${PN}"
JAVA_SRC_DIR="src/main src/tools/org/h2/dev src/tools/org/h2/jaqu src/tools/org/h2/mode"
-JAVA_GENTOO_CLASSPATH="lucene-3.0,slf4j-api,tomcat-servlet-api-2.4"
+JAVA_GENTOO_CLASSPATH="jts-core,lucene-3.6,osgi-core-api,osgi-enterprise-api,servlet-api-2.4,slf4j-api"
java_prepare() {
- if use test; then
- # This test uses way too much RAM and dies? But isn't that the point?
- sed -i "/TestOutOfMemory/d" "src/test/org/h2/test/TestAll.java" || die
- fi
+ # Compatibility with OSGi 5.
+ epatch "${FILESDIR}/osgi-5.patch"
- # Avoid the OSGi Framework stuff.
- rm -v "src/main/org/h2/util/DbDriverActivator.java" || die
+ # Uncomment the Java 7 methods as we are at least targeting that.
+ find -name "*.java" -exec sed -i "/\/\*## Java 1\.7 ##/s:/*://:" {} + || die
# Extract metadata from the binary.
mkdir -p target/classes || die
@@ -54,7 +53,7 @@ java_prepare() {
}
src_compile() {
- JAVAC_ARGS="-Xbootclasspath/p:$(java-pkg_get-bootclasspath 1.5)" java-pkg-simple_src_compile
+ java-pkg-simple_src_compile
# See src/tools/org/h2/build/Build.java.
local DATA="org/h2/util/data.zip"
@@ -67,11 +66,12 @@ src_compile() {
src_install() {
java-pkg-simple_src_install
java-pkg_dolauncher "${PN}" --main org.h2.tools.Console
- java-pkg_register-optional-dependency hsqldb,jdbc-jaybird,jdbc-mssqlserver,jdbc-mssqlserver-2005,jdbc-mysql,jdbc-postgresql
+ java-pkg_register-optional-dependency hsqldb,jdbc-jaybird,jdbc-mssqlserver-4.0,jdbc-mysql,jdbc-postgresql
if use doc; then
dodoc "docs/${PN}.pdf"
- dohtml -r docs/index.html docs/html
+ docinto html
+ dodoc -r docs/index.html docs/html
ln -snf "api" "${D}/usr/share/doc/${PF}/html/javadoc" || die
ln -snf "../${PN}.pdf" "${D}/usr/share/doc/${PF}/html/" || die
fi