diff options
Diffstat (limited to 'dev-db/hsqldb')
-rw-r--r-- | dev-db/hsqldb/Manifest | 12 | ||||
-rw-r--r-- | dev-db/hsqldb/files/StringComparator.java | 53 | ||||
-rw-r--r-- | dev-db/hsqldb/files/TestBug1191815.java | 129 | ||||
-rw-r--r-- | dev-db/hsqldb/files/hsqldb | 19 | ||||
-rw-r--r-- | dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch | 380 | ||||
-rw-r--r-- | dev-db/hsqldb/files/resolve-config-softlinks.patch | 22 | ||||
-rw-r--r-- | dev-db/hsqldb/files/server.properties | 20 | ||||
-rw-r--r-- | dev-db/hsqldb/files/sqltool.rc | 18 | ||||
-rw-r--r-- | dev-db/hsqldb/hsqldb-1.8.1.3-r2.ebuild | 173 | ||||
-rw-r--r-- | dev-db/hsqldb/metadata.xml | 11 |
10 files changed, 837 insertions, 0 deletions
diff --git a/dev-db/hsqldb/Manifest b/dev-db/hsqldb/Manifest new file mode 100644 index 000000000000..eb8a733b69e0 --- /dev/null +++ b/dev-db/hsqldb/Manifest @@ -0,0 +1,12 @@ +AUX StringComparator.java 1986 SHA256 9f672518cd27d2da5fb9e0a0f7ffe56a872186cdf188cb5840598ed88b959b95 SHA512 a0103b0b8445bfbbe325c73ab65dcf4c22c8fd4dab89cd9d60809b4323263e62da2c20a0c1f2900ee97eb9ca2549730e1d37b7f1bffdfce3d116ca802fe8beaa WHIRLPOOL 7f581b3df177f92bcc7195781dd3edfde633bad76661d3a683294379e53396d61f0688605ea9d2c884846ddae278455306e48910e7b8a1930ad83dac876f5f0c +AUX TestBug1191815.java 4112 SHA256 e101366203272e942f3d4cd5fce772220f60ad66b4f543858204ddef7b0dc563 SHA512 c37491e2fcea0b4ce6bd641ffe128deaa9a8e38533ec3e607415cb1325a975dd8317c212c0fbf9f42b25de7808869df6ac63dacd53c773455f5d2ca0a58f1f62 WHIRLPOOL cc515a4d4bc9737430945ab1bd0f6b9a5f4735e0d6c207a5cd21a57bf669e5090ab86f9b516dbe17ebd90ec4526f8e8da1c1dbbca2d8e1fd9fb7868153ad4f8d +AUX hsqldb 364 SHA256 d593c563da4beb2ca469c514c635c0e911b69a4978dd900c43151a9478798873 SHA512 6cd0a4a26739960536192a9dda36324e10a16e4ed51028515f07ca5542c68a9f13d9ee9456faf7f797071476747b2026cdf5872ebdf20c1fbfda1079c4164716 WHIRLPOOL 19ffee6439c78571bdd66f9199978240fd10ee1208ee31dad7589237ed84e16400484fde31eb620de01e1d097a382a4d8e1f3a0febdd422766a77356c3c99704 +AUX hsqldb-1.8.1.3-java7.patch 13842 SHA256 47e36e85f3224906372b39afc82ddbfebfa0d0141c0039dab0e1f4df3c5934a7 SHA512 b5e67c3a6e883b50ed74bbc18b81e5244b43161612d2114b645a16c1405c355555740daf8774a3347ae3721f607ca2eb7570117c1ca93ccbe925d34d4968b6e2 WHIRLPOOL 4cd9e15ed03e0e230ea8f8a94585955f4feea9d9127b51514c959e34253c4f4f3b12528de04a45b9477847ad94dce1bdc9d5901bdf57b002d96dfaa7baea40d3 +AUX resolve-config-softlinks.patch 846 SHA256 a7de5886aed87fa040e65d265d5418daee38376ba23742fb97119b629b678517 SHA512 5510a6f70647bb50d4c8ef6c8341b8d4bf38119fd8849b4086b4548ef19abbbaaa12d552f5602bd91ec24e96d7c4ef51efd8e83b38a841f3276ac478bd2480f4 WHIRLPOOL 432f660861d2e7b5a5ca49f973ebe5bdfe932fae5d3b3db19fd446d765971d7f0e3a7039ff8513a762087ea35d102c824b2a8c5068c1face3c5db6bb455935bb +AUX server.properties 686 SHA256 be7c54fc356d2b14c26e8ec0eecb79c7fa1c72e84c3475bedcd4d08548beeabd SHA512 c36a1d2e387762f96872d94bdb3a6a2af9edb949be9d33321f9ea4e3fb996baecff6fc3875b6bef8f73a54a6a1cedd71dcdf97c881819cb130b1a2b43ec7e842 WHIRLPOOL d36c355af3e9b18da16c670d8a1b03c3edd9b80d6979f1cc3a44bb503dd3e3b979d9f7dd69d9f73f4abb7002e5d8d6702bb73161a07ebe50e67eeaed62ff8358 +AUX sqltool.rc 560 SHA256 f8401fd0472711a9151374e0a15d122f74f4341b19f91def9d738e549a35a8e3 SHA512 80ce53ad07c2091113787cb41232e5900426b042dcc3f62157569588538ad26d471e5d17aac62052902789065efb01647bfbc3488ff3d0f3c9e3df513895f57c WHIRLPOOL 16a9d294009360120cd469b773d17fccec269237e24e0e268a7fdb9688b4a56da9800c80fd985177e79dcc755185592da137a854376ab5a4a12e662d702f7233 +DIST hsqldb_1_8_1_3.zip 3170550 SHA256 c3669bbebcb5c722b273f20c316af744d4e263bc90cc20fd1e6296dff7cc3d07 SHA512 0483ca3299b63b4931b07d49588c729231efca76a317b9620abbd5039127f3f79449eaa1e9d29c52782c58bdb0cc4879b1e3f30f669d2c02c880818f531a8442 WHIRLPOOL ae025d408ee78683133a7bcb1ea6cc130844abc837abe408fe0ea4cf885e082080cb926fabb47ecc59a0f64463e2f969ce51a9e5acc802bdc4e7ba9a62f9756d +EBUILD hsqldb-1.8.1.3-r2.ebuild 5620 SHA256 44522f8a0d8f6ccefa1316b74a5db963921455b22bd2a960e3647d4356aa2b61 SHA512 29de5768070071682a887c2d738b4b35c9d0b471e69c7b80fd1134a20011ad2ae382dbabc40f56ae14faee55faf4d871c55384a068d44d5d0ec0e018c0e7ce8a WHIRLPOOL df42d2d9c2b11731d0aed1d0e984addf29a705a2bac8be50d1a81a266a08ea776120b372c5070f49202b763e75e50dcb2aa45e4fa02c1184fa99672bebeeb3a4 +MISC ChangeLog 3214 SHA256 2d6819148d8efa8d0913ee7d2f53f47a820856030dfc6fb933d52289f537c509 SHA512 551ba27d9d63a98253fcef3e6d3e7ccff14f0833f437de0a0275a736f3eb5a8538425060d5c2d96554a422e59fcd28d4325ce0e0d6cce40631165974fecb6086 WHIRLPOOL d1f9972e7222e5c31fca7f85404d7f09e1114768110968d06e346eb48abb0671c7bf958d3af6bfad2294c4232e8ba78f4ed945bbe72982337df644619016512f +MISC ChangeLog-2015 11026 SHA256 b7ac04f85d850a5b3f27cdcff98c02234b8421cedc81acbd9bd1c98ff538b949 SHA512 8e84c311645ea066f73982b5cb8696e135ce1acf576888e59d2d4f69fccdfdfabf74d13b5c0beb272c9f827886a25d2419f68a571ce30c15f5c4e275c753ac19 WHIRLPOOL d346876b966dfda3930b2fc18e25d0cf0514598e565e4b2da66ec8a9a9979ffa9159f4eb20266eb337256a3d38e84de5a4847e4cd07704a5afee37b10dd21896 +MISC metadata.xml 312 SHA256 c1b8f2d2ace87caa277a8c45b4cb15962c7c3cd8f848c78f7c8d396a764b001b SHA512 2b9fff35bd58701cd4992ddc02f6bc7a2027d90616a5b886ef352ad6c6781949a68478bb17bbc22382189ec73ddd1798f67c27941323cb0b727dfead38c7f975 WHIRLPOOL 7c3ebd59c9e7a3e122930ba84524277bea55e9a75a3b4f491bceaa9cdda1eeda14d13b1c603e2573cf287e52432716abe664460432661b8d1c5125c3570a638f diff --git a/dev-db/hsqldb/files/StringComparator.java b/dev-db/hsqldb/files/StringComparator.java new file mode 100644 index 000000000000..ae0f7b0fb979 --- /dev/null +++ b/dev-db/hsqldb/files/StringComparator.java @@ -0,0 +1,53 @@ +/* Copyright (c) 2001-2008, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb.lib; + +public class StringComparator implements ObjectComparator { + + public int compare(Object a, Object b) { + + // handle nulls + if (a == b) { + return 0; + } + + if (a == null) { + return -1; + } + + if (b == null) { + return 1; + } + + return ((String) a).compareTo((String) b); + } +} diff --git a/dev-db/hsqldb/files/TestBug1191815.java b/dev-db/hsqldb/files/TestBug1191815.java new file mode 100644 index 000000000000..06c606401cdd --- /dev/null +++ b/dev-db/hsqldb/files/TestBug1191815.java @@ -0,0 +1,129 @@ +/* Copyright (c) 2001-2009, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb.test; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Statement; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import junit.framework.TestCase; +import junit.framework.TestResult; + +/** + * Created on Apr 28, 2005 + * @author Antranig Basman (antranig@caret.cam.ac.uk) + */ +public class TestBug1191815 extends TestBase { + + public TestBug1191815(String name) { + super(name); + } + + public void test() throws Exception { + + try { + Connection conn = newConnection(); + Statement stmt = conn.createStatement(); + + stmt.executeUpdate("drop table testA if exists;"); + stmt.executeUpdate("create table testA(data timestamp);"); + + TimeZone pst = TimeZone.getTimeZone("PST"); + Calendar cal = new GregorianCalendar(pst); + + cal.clear(); + cal.set(2005, 0, 1, 0, 0, 0); + + + // yyyy-mm-dd hh:mm:ss.fffffffff + Timestamp ts = new Timestamp(cal.getTimeInMillis()); + ts.setNanos(1000); + PreparedStatement ps = + conn.prepareStatement("insert into testA values(?)"); + + ps.setTimestamp(1, ts, cal); + ps.execute(); + ps.setTimestamp(1, ts, null); + ps.execute(); + + String sql = "select * from testA"; + + stmt = conn.createStatement(); + + ResultSet rs = stmt.executeQuery(sql); + + rs.next(); + + Timestamp returned = rs.getTimestamp(1, cal); + + rs.next(); + + Timestamp def = rs.getTimestamp(1, null); + + assertEquals(ts, returned); + assertEquals(ts, def); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + public static void main(String[] args) throws Exception { + + TestResult result; + TestCase test; + java.util.Enumeration exceptions; + java.util.Enumeration failures; + int count; + + result = new TestResult(); + test = new TestBug1191815("test"); + + test.run(result); + + count = result.failureCount(); + + System.out.println("TestBug1192000 failure count: " + count); + + failures = result.failures(); + + while (failures.hasMoreElements()) { + System.out.println(failures.nextElement()); + } + } +} + diff --git a/dev-db/hsqldb/files/hsqldb b/dev-db/hsqldb/files/hsqldb new file mode 100644 index 000000000000..69920b07f868 --- /dev/null +++ b/dev-db/hsqldb/files/hsqldb @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use net +} + +start() { + ebegin "Starting HSQL Database" + hsqldb_enable=yes /var/lib/hsqldb/bin/hsqldb start + eend $? +} + +stop() { + ebegin "Stopping HSQL Database" + hsqldb_enable=yes /var/lib/hsqldb/bin/hsqldb stop + eend $? +} diff --git a/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch b/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch new file mode 100644 index 000000000000..7f9245597182 --- /dev/null +++ b/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch @@ -0,0 +1,380 @@ +diff --git a/build/build.xml b/build/build.xml +index 68c446f..e82f00f 100644 +--- a/build/build.xml ++++ b/build/build.xml +@@ -98,16 +98,24 @@ examples: + <echo message="ant.java.hasjsse=${ant.java.hasjsse}" /> + </target> + +- <target name="javaversion6"> ++ <target name="javaversion7" unless="ant.java.iscjavaset"> ++ <available classname="java.util.Objects" property="ant.java.iscjava17"/> ++ <available classname="java.util.Objects" property="ant.java.iscjavaset"/> ++ </target> ++ ++ <target name="javaversion6" depends="javaversion7" unless="ant.java.iscjavaset"> + <available classname="java.net.IDN" property="ant.java.iscjava16"/> ++ <available classname="java.net.IDN" property="ant.java.iscjavaset"/> + </target> + +- <target name="javaversion4" depends="javaversion6" unless="ant.java.iscjava16"> ++ <target name="javaversion4" depends="javaversion6" unless="ant.java.iscjavaset"> + <available classname="java.nio.Buffer" property="ant.java.iscjava14"/> ++ <available classname="java.nio.Buffer" property="ant.java.iscjavaset"/> + </target> + +- <target name="javaversion2" depends="javaversion4" unless="ant.java.iscjava14"> ++ <target name="javaversion2" depends="javaversion4" unless="ant.java.iscjavaset"> + <available classname="java.lang.ref.Reference" property="ant.java.iscjava12"/> ++ <available classname="java.lang.ref.Reference" property="ant.java.iscjavaset"/> + </target> + + <target name="-prepare" depends="init,javaversion2"> +@@ -166,6 +174,7 @@ examples: + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/> + <arg file="${src}/org/hsqldb/persist/LockFile.java"/> + <arg file="${src}/org/hsqldb/persist/Logger.java"/> +@@ -183,6 +192,7 @@ examples: + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> +@@ -210,6 +220,7 @@ examples: + <arg value="+JAVA2FULL"/> + <arg value="-JAVA4"/> + <arg value="-JAVA6"/> ++ <arg value="-JAVA7"/> + </java> + </target> + +@@ -218,6 +229,7 @@ examples: + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> +@@ -244,6 +256,7 @@ examples: + <arg value="+JAVA2FULL"/> + <arg value="+JAVA4"/> + <arg value="-JAVA6"/> ++ <arg value="-JAVA7"/> + </java> + </target> + +@@ -253,6 +266,43 @@ examples: + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcCallableStatement.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcClob.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcConnection.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcParameterMetaData.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcPreparedStatement.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSet.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSetMetaData.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/> ++ <arg file="${src}/org/hsqldb/persist/LockFile.java"/> ++ <arg file="${src}/org/hsqldb/persist/Logger.java"/> ++ <arg file="${src}/org/hsqldb/persist/ScaledRAFile.java"/> ++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> ++ <arg file="${src}/org/hsqldb/util/DatabaseManager.java"/> ++ <arg file="${src}/org/hsqldb/util/ConnectionDialogCommon.java"/> ++ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/> ++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> ++ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/> ++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> ++ <arg file="${src}/org/hsqldb/HsqlDateTime.java"/> ++ <arg value="+JAVA2"/> ++ <arg value="+JAVA2FULL"/> ++ <arg value="+JAVA4"/> ++ <arg value="+JAVA6"/> ++ <arg value="-JAVA7"/> ++ </java> ++ </target> ++ ++ <target name="switchtojdk17" depends="switchtojdk16" ++ description="self explanatory" if="ant.java.iscjava17"> ++ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > ++ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> ++ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> +@@ -279,10 +329,11 @@ examples: + <arg value="+JAVA2FULL"/> + <arg value="+JAVA4"/> + <arg value="+JAVA6"/> ++ <arg value="+JAVA7"/> + </java> + </target> + +- <target name="store" depends="switchtojdk16" ++ <target name="store" depends="switchtojdk17" + description="compiles the /store folder"> + <javac srcdir="${src}" + destdir="classes" +diff --git a/src/org/hsqldb/jdbc/jdbcCallableStatement.java b/src/org/hsqldb/jdbc/jdbcCallableStatement.java +index 3779094..d2131ed 100644 +--- a/src/org/hsqldb/jdbc/jdbcCallableStatement.java ++++ b/src/org/hsqldb/jdbc/jdbcCallableStatement.java +@@ -3106,7 +3106,6 @@ implements CallableStatement { +
+ //#endif JAVA4
+ //#ifdef JAVA6
+-/*
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -3376,7 +3375,20 @@ implements CallableStatement { + {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public <T> T getObject(int ColumnIndex, Class<T> type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ ++//#endif JAVA7 + }
+diff --git a/src/org/hsqldb/jdbc/jdbcConnection.java b/src/org/hsqldb/jdbc/jdbcConnection.java +index 5d59464..0c7e08a 100644 +--- a/src/org/hsqldb/jdbc/jdbcConnection.java ++++ b/src/org/hsqldb/jdbc/jdbcConnection.java +@@ -43,13 +43,17 @@ import java.sql.Connection; + import java.sql.DatabaseMetaData;
+
+ //#ifdef JAVA6
+-/*
+ import java.sql.NClob;
+ import java.sql.SQLClientInfoException;
+ import java.sql.SQLXML;
+-*/
+
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++import java.util.concurrent.Executor; ++ ++//#endif JAVA7 ++ + import java.sql.PreparedStatement;
+ import java.sql.SQLException;
+ import java.sql.SQLWarning;
+@@ -2794,4 +2798,31 @@ public class jdbcConnection implements Connection { + */
+
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++ public int getNetworkTimeout() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void setNetworkTimeout(Executor executor, int millis) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void abort(Executor executor) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public String getSchema() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void setSchema(String schema) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++//#endif JAVA7 + }
+diff --git a/src/org/hsqldb/jdbc/jdbcDataSource.java b/src/org/hsqldb/jdbc/jdbcDataSource.java +index 9f79a37..d0ab49b 100644 +--- a/src/org/hsqldb/jdbc/jdbcDataSource.java ++++ b/src/org/hsqldb/jdbc/jdbcDataSource.java +@@ -47,6 +47,11 @@ import javax.sql.DataSource; + //#endif JAVA4
+ import org.hsqldb.jdbcDriver;
+
++//#ifdef JAVA7 ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.logging.Logger; ++//#endif JAVA7 ++ + // boucherb@users 20040411 - doc 1.7.2 - javadoc updates toward 1.7.2 final
+
+ /**
+@@ -312,7 +317,6 @@ public class jdbcDataSource implements Serializable { + }
+
+ //#ifdef JAVA6
+-/*
+ public <T> T unwrap(Class<T> iface) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -322,7 +326,14 @@ public class jdbcDataSource implements Serializable { + {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException ++ { ++ throw new SQLFeatureNotSupportedException("Not supported yet."); ++ } ++ ++//#endif JAVA7 + }
+diff --git a/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java b/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java +index ffa238d..0480228 100644 +--- a/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java ++++ b/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java +@@ -5650,7 +5650,6 @@ public class jdbcDatabaseMetaData implements DatabaseMetaData { + }
+
+ //#ifdef JAVA6
+-/*
+ public RowIdLifetime getRowIdLifetime() throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -5694,7 +5693,23 @@ public class jdbcDatabaseMetaData implements DatabaseMetaData { + {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++ ++ ++//#ifdef JAVA7 ++ public boolean generatedKeyAlwaysReturned() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public ResultSet getPseudoColumns(String catalog, String schemaPattern, ++ String tableNamePattern, String columnNamePattern) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ ++//#endif JAVA7 ++ + }
+diff --git a/src/org/hsqldb/jdbc/jdbcResultSet.java b/src/org/hsqldb/jdbc/jdbcResultSet.java +index 2a6567e..81aecf3 100644 +--- a/src/org/hsqldb/jdbc/jdbcResultSet.java ++++ b/src/org/hsqldb/jdbc/jdbcResultSet.java +@@ -5332,4 +5332,19 @@ public class jdbcResultSet implements ResultSet { + */ + + //#endif JAVA6 ++ ++//#ifdef JAVA7 ++ ++ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public <T> T getObject(int columnNum, Class<T> type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++//#endif JAVA7 ++ + } +diff --git a/src/org/hsqldb/jdbc/jdbcStatement.java b/src/org/hsqldb/jdbc/jdbcStatement.java +index f84f2e2..38bf8d0 100644 +--- a/src/org/hsqldb/jdbc/jdbcStatement.java ++++ b/src/org/hsqldb/jdbc/jdbcStatement.java +@@ -1588,7 +1588,6 @@ public class jdbcStatement implements Statement { + }
+ }
+ //#ifdef JAVA6
+-/*
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -1608,6 +1607,17 @@ public class jdbcStatement implements Statement { + {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++ public boolean isCloseOnCompletion() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void closeOnCompletion() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++//#endif JAVA7 + }
+diff --git a/src/org/hsqldb/jdbcDriver.java b/src/org/hsqldb/jdbcDriver.java +index a377b36..361c074 100644 +--- a/src/org/hsqldb/jdbcDriver.java ++++ b/src/org/hsqldb/jdbcDriver.java +@@ -42,6 +42,11 @@ import org.hsqldb.jdbc.jdbcConnection; + import org.hsqldb.persist.HsqlDatabaseProperties; + import org.hsqldb.persist.HsqlProperties; + ++//#ifdef JAVA7 ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.logging.Logger; ++//#endif JAVA7 ++ + // fredt@users 20011220 - patch 1.7.0 by fredt + // new version numbering scheme + // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping +@@ -321,4 +326,12 @@ public class jdbcDriver implements Driver { + DriverManager.registerDriver(new jdbcDriver()); + } catch (Exception e) {} + } ++ ++//#ifdef JAVA7 ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException ++ { ++ throw new SQLFeatureNotSupportedException("Not supported yet."); ++ } ++ ++//#endif JAVA7 + } diff --git a/dev-db/hsqldb/files/resolve-config-softlinks.patch b/dev-db/hsqldb/files/resolve-config-softlinks.patch new file mode 100644 index 000000000000..5a716e6dc3a2 --- /dev/null +++ b/dev-db/hsqldb/files/resolve-config-softlinks.patch @@ -0,0 +1,22 @@ +diff -urpN hsqldb.orig/bin/hsqldb hsqldb/bin/hsqldb +--- hsqldb.orig/bin/hsqldb 2006-07-08 15:55:55.000000000 +0200 ++++ hsqldb/bin/hsqldb 2006-07-08 16:03:28.000000000 +0200 +@@ -282,6 +282,18 @@ else + echo "Auth file '$_AUTH_TEST_PATH' not readable" 1>&2 + exit 2 + } ++ ++ # resolve links - $_AUTH_TEST_PATH may be a softlink ++ while [ -h "$_AUTH_TEST_PATH" ]; do ++ ls=`ls -ld "$_AUTH_TEST_PATH"` ++ link=`expr "$ls" : '.*-> \(.*\)$'` ++ if expr "$link" : '.*/.*' > /dev/null; then ++ _AUTH_TEST_PATH="$link" ++ else ++ _AUTH_TEST_PATH=`dirname "$_AUTH_TEST_PATH"`/"$link" ++ fi ++ done ++ + ls -ld "$_AUTH_TEST_PATH" | grep '^-..------' > /dev/null 2>&1 || { + echo "Fix permissions on '$_AUTH_TEST_PATH' like 'chmod 600 $_AUTH_TEST_PATH'" 1>&2 + exit 2 diff --git a/dev-db/hsqldb/files/server.properties b/dev-db/hsqldb/files/server.properties new file mode 100644 index 000000000000..4827d1cb6ec0 --- /dev/null +++ b/dev-db/hsqldb/files/server.properties @@ -0,0 +1,20 @@ +# Hsqldb Server cfg file. +# See the UNIX Quick Start and the Advanced Topics chapters +# of the Hsqldb User Guide. + +server.database.0=file:/var/lib/hsqldb/db1 +server.urlid.0=localhost + +# Warning! +# When running hsqldb in Server mode, for each additional database +# the server.urlid.X entry must have a proper corresponding urlid +# section in the 'sqltool.rc' file. +# Otherwise you may have problems with shutting down the server. +# +# Note that each server can serve only up to 10 different +# databases simultaneously (with consecutive {0-9} suffixes). + +# An example of additional database. +#server.database.1=file:/var/lib/hsqldb/newdb/newdb +#server.dbname.1=newdb +#server.urlid.1=newdb diff --git a/dev-db/hsqldb/files/sqltool.rc b/dev-db/hsqldb/files/sqltool.rc new file mode 100644 index 000000000000..2e65a6816f3d --- /dev/null +++ b/dev-db/hsqldb/files/sqltool.rc @@ -0,0 +1,18 @@ +# This is a sample SqlTool configuration file, a.k.a. rc file. + +# This is for a hsqldb Server running with default settings on your local +# computer (and for which you have not changed the password for "sa"). +urlid localhost +url jdbc:hsqldb:hsql://localhost +username sa +password + +# Each urlid section in this file corresponds to one of the +# server.urlid.X entries in the 'server.properties' file. +# This is required by the hsqldb init script. + +# An example of additional database. +#urlid newdb +#url jdbc:hsqldb:hsql://localhost/newdb +#username sa +#password diff --git a/dev-db/hsqldb/hsqldb-1.8.1.3-r2.ebuild b/dev-db/hsqldb/hsqldb-1.8.1.3-r2.ebuild new file mode 100644 index 000000000000..e71cb3f4b018 --- /dev/null +++ b/dev-db/hsqldb/hsqldb-1.8.1.3-r2.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils user versionator java-pkg-2 java-ant-2 + +MY_PV=$(replace_all_version_separators _ ) +MY_P="${PN}_${MY_PV}" + +DESCRIPTION="The leading SQL relational database engine written in Java" +HOMEPAGE="http://hsqldb.org" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +CDEPEND=" + java-virtuals/servlet-api:2.5" +RDEPEND="${CDEPEND} + >=virtual/jre-1.5" +DEPEND="${CDEPEND} + >=virtual/jdk-1.5 + app-arch/unzip + test? ( dev-java/junit:0 )" + +S="${WORKDIR}/${PN}" + +HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar +HSQLDB_HOME=/var/lib/hsqldb + +pkg_setup() { + enewgroup hsqldb + enewuser hsqldb -1 /bin/sh /dev/null hsqldb + + java-pkg-2_pkg_setup +} + +java_prepare() { + rm -v lib/*.jar || die + + sed -i -r \ + -e "s#/etc/sysconfig#${EPREFIX}/etc/conf.d#g" \ + bin/hsqldb || die + + java-pkg_filter-compiler jikes + + eant -q -f "${EANT_BUILD_XML}" cleanall > /dev/null + + epatch "${FILESDIR}/resolve-config-softlinks.patch" + epatch "${FILESDIR}/${P}-java7.patch" + + mkdir conf + sed -e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${EPREFIX//\//\\/}${HSQLDB_JAR//\//\\/}/g" \ + -e "s/^SERVER_HOME=.*$/SERVER_HOME=${EPREFIX//\//\\/}\/var\/lib\/hsqldb/g" \ + -e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \ + -e 's/^#AUTH_FILE=.*$/AUTH_FILE=${SERVER_HOME}\/sqltool.rc/g' \ + src/org/hsqldb/sample/sample-hsqldb.cfg > conf/hsqldb || die + cp "${FILESDIR}/server.properties" conf/ || die + cp "${FILESDIR}/sqltool.rc" conf/ || die + + # Missing source file - needed for tests + # http://hsqldb.cvs.sourceforge.net/*checkout*/hsqldb/hsqldb-dev/src/org/hsqldb/lib/StringComparator.java?revision=1.1&pathrev=hsqldb_1_8_0_10 + # https://sourceforge.net/tracker/index.php?func=detail&aid=2008754&group_id=23316&atid=378131 + cp "${FILESDIR}/StringComparator.java" src/org/hsqldb/lib || die + cp "${FILESDIR}/TestBug1191815.java" src/org/hsqldb/test/ || die +} + +JAVA_ANT_REWRITE_CLASSPATH="yes" + +# EANT_BUILD_XML used also in src_prepare +EANT_BUILD_XML="build/build.xml" +EANT_BUILD_TARGET="jar jarclient jarsqltool jarutil" +EANT_DOC_TARGET="javadocdev" +EANT_GENTOO_CLASSPATH="servlet-api-2.5" + +src_test() { + java-pkg_jar-from --into lib junit + eant -f ${EANT_BUILD_XML} jartest + cd testrun/hsqldb || die + ./runTest.sh TestSelf || die "TestSelf hsqldb tests failed" + # TODO. These fail. Investigate why. + #cd "${S}/testrun/sqltool" || die + #CLASSPATH="${S}/lib/hsqldb.jar" ./runtests.bash || die "sqltool test failed" +} + +src_install() { + java-pkg_dojar lib/hsql*.jar + + if use doc; then + dodoc doc/*.txt + dohtml -r doc/zaurus + dohtml -r doc/src + fi + use source && java-pkg_dosrc src/* + + echo "CONFIG_PROTECT=\"${HSQLDB_HOME}\"" > "${T}"/35hsqldb || die + doenvd "${T}"/35hsqldb + + # Put init, configuration and authorization files in /etc + doinitd "${FILESDIR}/hsqldb" + doconfd conf/hsqldb + dodir /etc/hsqldb + insinto /etc/hsqldb + # Change the ownership of server.properties and sqltool.rc + # files to hsqldb:hsqldb. (resolves Bug #111963) + use prefix || insopts -m0600 -o hsqldb -g hsqldb + doins conf/server.properties + use prefix || insopts -m0600 -o hsqldb -g hsqldb + doins conf/sqltool.rc + + # Install init script + dodir "${HSQLDB_HOME}/bin" + keepdir "${HSQLDB_HOME}" + exeinto "${HSQLDB_HOME}/bin" + doexe bin/hsqldb + + # Make sure that files have correct permissions + use prefix || chown -R hsqldb:hsqldb "${ED}${HSQLDB_HOME}" + chmod o-rwx "${ED}${HSQLDB_HOME}" + + # Create symlinks to authorization files in the server home dir + # (required by the hqldb init script) + insinto "${HSQLDB_HOME}" + dosym ../../../etc/hsqldb/server.properties "${HSQLDB_HOME}/server.properties" + dosym ../../../etc/hsqldb/sqltool.rc "${HSQLDB_HOME}/sqltool.rc" +} + +pkg_postinst() { + ewarn "If you intend to run Hsqldb in Server mode and you want to create" + ewarn "additional databases, remember to put correct information in both" + ewarn "'server.properties' and 'sqltool.rc' files." + ewarn "(read the 'Init script Setup Procedure' section of the 'Chapter 3." + ewarn "UNIX Quick Start' in the Hsqldb docs for more information)" + echo + elog "Example:" + echo + elog "${EPREFIX}/etc/hsqldb/server.properties" + elog "=============================" + elog "server.database.1=file:xdb/xdb" + elog "server.dbname.1=xdb" + elog "server.urlid.1=xdb" + elog + elog "${EPREFIX}/etc/hsqldb/sqltool.rc" + elog "======================" + elog "urlid xdb" + elog "url jdbc:hsqldb:hsql://localhost/xdb" + elog "username sa" + elog "password " + echo + elog "Also note that each hsqldb server can serve only up to 10" + elog "different databases simultaneously (with consecutive {0-9}" + elog "suffixes in the 'server.properties' file)." + echo + ewarn "For data manipulation use:" + ewarn + ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.DatabaseManager" + ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.DatabaseManagerSwing" + ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.SqlTool \\" + ewarn " --rcFile ${EPREFIX}/var/lib/hsqldb/sqltool.rc <dbname>" + echo + elog "The Hsqldb can be run in multiple modes - read 'Chapter 1. Running'" + elog "and Using Hsqldb' in the Hsqldb docs at:" + elog " http://hsqldb.org/web/hsqlDocsFrame.html" + elog "If you intend to run it in the Server mode, it is suggested to add the" + elog "init script to your start-up scripts, this should be done like this:" + elog " \`rc-update add hsqldb default\`" + echo +} diff --git a/dev-db/hsqldb/metadata.xml b/dev-db/hsqldb/metadata.xml new file mode 100644 index 000000000000..90ae84e29855 --- /dev/null +++ b/dev-db/hsqldb/metadata.xml @@ -0,0 +1,11 @@ +<?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> + <upstream> + <remote-id type="sourceforge">hsqldb</remote-id> + </upstream> +</pkgmetadata> |