From 465a7058312230682365be70c9507c6cf9e26d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 8 Feb 2012 16:07:08 +0000 Subject: [PATCH] make hsqldb build with java 1.7.0 --- 0001-make-hsqldb-build-with-java-1.7.patch | 301 +++++++++++++++++++++ libreoffice.spec | 4 +- 2 files changed, 304 insertions(+), 1 deletion(-) create mode 100644 0001-make-hsqldb-build-with-java-1.7.patch diff --git a/0001-make-hsqldb-build-with-java-1.7.patch b/0001-make-hsqldb-build-with-java-1.7.patch new file mode 100644 index 0000000..0183fcc --- /dev/null +++ b/0001-make-hsqldb-build-with-java-1.7.patch @@ -0,0 +1,301 @@ +From 7dbfc0012cc75e7dac9a416b53149ad8ec33f071 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 8 Feb 2012 16:03:50 +0000 +Subject: [PATCH] make hsqldb build with java 1.7 + +--- + hsqldb/makefile.mk | 3 +- + hsqldb/patches/jdbc-4.1.patch | 267 +++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 269 insertions(+), 1 deletions(-) + create mode 100644 hsqldb/patches/jdbc-4.1.patch + +diff --git a/hsqldb/makefile.mk b/hsqldb/makefile.mk +index 8b3d5b1..2e9fa8a 100755 +--- a/hsqldb/makefile.mk ++++ b/hsqldb/makefile.mk +@@ -56,7 +56,8 @@ CONVERTFILES=build$/build.xml \ + PATCH_FILES=patches$/i96823.patch \ + patches$/i97032.patch \ + patches$/i103528.patch \ +- patches$/i104901.patch ++ patches$/i104901.patch \ ++ patches$/jdbc-4.1.patch + + .IF "$(JAVACISGCJ)"=="yes" + JAVA_HOME= +diff --git a/hsqldb/patches/jdbc-4.1.patch b/hsqldb/patches/jdbc-4.1.patch +new file mode 100644 +index 0000000..89149c4 +--- /dev/null ++++ b/hsqldb/patches/jdbc-4.1.patch +@@ -0,0 +1,267 @@ ++--- misc/hsqldb/build/build.xml 2012-02-08 15:14:42.827123541 +0000 +++++ misc/build/hsqldb/build/build.xml 2012-02-08 15:21:43.827722388 +0000 ++@@ -98,7 +98,11 @@ ++ ++ ++ ++- +++ +++ +++ +++ +++ ++ ++ ++ ++@@ -210,6 +214,7 @@ ++ ++ ++ +++ ++ ++ ++ ++@@ -244,6 +249,7 @@ ++ ++ ++ +++ ++ ++ ++ ++@@ -279,10 +285,47 @@ ++ ++ ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ ++ ++ ++ ++- ++ T getObject(String columnLabel, Class type) throws SQLException +++ { +++ throw new UnsupportedOperationException("Not supported yet."); +++ } +++ +++ public T getObject(int ColumnIndex, Class type) throws SQLException +++ { +++ throw new UnsupportedOperationException("Not supported yet."); +++ } +++ +++ +++//#endif JAVA7 ++ } ++--- misc/hsqldb/src/org/hsqldb/jdbc/jdbcConnection.java 2012-02-08 15:14:42.802123563 +0000 +++++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcConnection.java 2012-02-08 15:47:35.851635628 +0000 ++@@ -48,6 +48,12 @@ ++ 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; ++@@ -2793,4 +2799,31 @@ ++ } ++ ++ //#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 ++ } ++--- misc/hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java 2012-02-08 15:14:42.802123563 +0000 +++++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java 2012-02-08 15:47:35.835635654 +0000 ++@@ -5693,4 +5693,21 @@ ++ } ++ ++ //#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 +++ ++ } ++--- misc/hsqldb/src/org/hsqldb/jdbc/jdbcDataSource.java 2012-02-08 15:14:42.802123563 +0000 +++++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcDataSource.java 2012-02-08 15:47:35.836635653 +0000 ++@@ -47,6 +47,11 @@ ++ //#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 ++ ++ /** ++@@ -323,4 +328,12 @@ ++ } ++ ++ //#endif JAVA6 +++ +++//#ifdef JAVA7 +++ public Logger getParentLogger() throws SQLFeatureNotSupportedException +++ { +++ throw new SQLFeatureNotSupportedException("Not supported yet."); +++ } +++ +++//#endif JAVA7 ++ } ++--- misc/hsqldb/src/org/hsqldb/jdbc/jdbcResultSet.java 2012-02-08 15:14:42.802123563 +0000 +++++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcResultSet.java 2012-02-08 15:47:35.866635606 +0000 ++@@ -5324,4 +5324,19 @@ ++ } ++ ++ //#endif JAVA6 +++ +++//#ifdef JAVA7 +++ +++ public T getObject(String columnLabel, Class type) throws SQLException +++ { +++ throw new UnsupportedOperationException("Not supported yet."); +++ } +++ +++ public T getObject(int columnNum, Class type) throws SQLException +++ { +++ throw new UnsupportedOperationException("Not supported yet."); +++ } +++ +++//#endif JAVA7 +++ ++ } ++--- misc/hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java 2012-02-08 15:14:42.802123563 +0000 +++++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java 2012-02-08 15:47:35.872635595 +0000 ++@@ -1608,4 +1608,16 @@ ++ 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 ++ } ++--- misc/hsqldb/src/org/hsqldb/jdbcDriver.java 2012-02-08 15:14:42.800123566 +0000 +++++ misc/build/hsqldb/src/org/hsqldb/jdbcDriver.java 2012-02-08 15:47:35.826635667 +0000 ++@@ -42,6 +42,11 @@ ++ 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 @@ ++ DriverManager.registerDriver(new jdbcDriver()); ++ } catch (Exception e) {} ++ } +++ +++//#ifdef JAVA7 +++ public Logger getParentLogger() throws SQLFeatureNotSupportedException +++ { +++ throw new SQLFeatureNotSupportedException("Not supported yet."); +++ } +++ +++//#endif JAVA7 ++ } +-- +1.7.7.6 + diff --git a/libreoffice.spec b/libreoffice.spec index bad57a3..74aa0da 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -67,7 +67,7 @@ Source20: http://dev-www.libreoffice.org/src/7c2549f6b0a8bb604e6c4c729ffdc %endif BuildRequires: zip, findutils, autoconf, flex, bison, icu, gperf, gcc-c++ -BuildRequires: binutils, java-1.6.0-openjdk-devel, boost-devel +BuildRequires: binutils, java-devel, boost-devel BuildRequires: python-devel, expat-devel, libxml2-devel, libxslt-devel, bc BuildRequires: neon-devel, libcurl-devel, libidn-devel, pam-devel, cups-devel BuildRequires: libXext-devel, libXt-devel, libICE-devel, libjpeg-devel, make @@ -122,6 +122,7 @@ Patch13: 0001-move-binfilter-mime-types-into-extra-.desktop-file.patch %endif Patch14: 0001-Resolves-rhbz-788042-skip-splashscreen-with-quicksta.patch Patch15: 0001-Resolves-fdo-43644-survive-registered-but-unavailabl.patch +Patch16: 0001-make-hsqldb-build-with-java-1.7.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -816,6 +817,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %endif %patch14 -p1 -b .rhbz788042-skip-splashscreen-with-quicksta.patch %patch15 -p1 -b .fdo43644-survive-registered-but-unavailabl.patch +%patch16 -p1 -b .make-hsqldb-build-with-java-1.7.patch # TODO: check this # these are horribly incomplete--empty translations and copied english