diff --git a/0002-Fix-compatibility-with-JRE-1.8.patch b/0002-Fix-compatibility-with-JRE-1.8.patch deleted file mode 100644 index 6e3d15d..0000000 --- a/0002-Fix-compatibility-with-JRE-1.8.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3206f6718d2f3c227170d71d7843335772ce23fc Mon Sep 17 00:00:00 2001 -From: Haikel Guemar -Date: Sun, 16 Sep 2018 16:21:12 +0200 -Subject: [PATCH 2/3] Fix compatibility with JRE 1.8 - ---- - configure | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/configure b/configure -index eca42df..afe6439 100755 ---- a/configure -+++ b/configure -@@ -23565,6 +23565,11 @@ $as_echo_n "checking java compiler version... " >&6; } - JTYPE="Sun JRE 1.7" - JFLAGS="-Xlint:unchecked -Xlint:deprecation" - ;; -+ JRE1.8.*) -+ try_java=true -+ JTYPE="Sun JRE 1.8" -+ JFLAGS="-Xlint:unchecked -Xlint:deprecation" -+ ;; - JREgcj-4*) - try_java=true - JTYPE="GCJ" --- -2.17.1 - diff --git a/0003-JDBC-Drop-unneeded-JAVAH-variable-check.patch b/0003-JDBC-Drop-unneeded-JAVAH-variable-check.patch new file mode 100644 index 0000000..8fd3ff2 --- /dev/null +++ b/0003-JDBC-Drop-unneeded-JAVAH-variable-check.patch @@ -0,0 +1,27 @@ +From 10d43ce6aea0a041a776445783b4e1ca09651f57 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 4 Dec 2018 16:20:24 +0100 +Subject: [PATCH 3/4] JDBC: Drop unneeded JAVAH variable check + +Commit b8d0997 dropped javah detection from java.m4, but left in a JAVAH +variable check which broke the build, as nothing ever sets the variable +any more. +--- + m4/java.m4 | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/m4/java.m4 b/m4/java.m4 +index f4e64e9af..e659a1bec 100644 +--- a/m4/java.m4 ++++ b/m4/java.m4 +@@ -116,7 +116,6 @@ m4_define([_JAVA_CHECK_INTERNAL], + have_all_java=yes + if test -z "$JAVA_PROG"; then have_all_java=no; fi + if test -z "$JAVAC"; then have_all_java=no; fi +- if test -z "$JAVAH"; then have_all_java=no; fi + if test -z "$JAR"; then have_all_java=no; fi + if test ${have_all_java} = no; then + AC_MSG_WARN([one or more Java tools are missing (JRE is not sufficient)]) +-- +2.19.1 + diff --git a/0004-JDBC-Fix-Sun-JRE-1.8-detection.patch b/0004-JDBC-Fix-Sun-JRE-1.8-detection.patch new file mode 100644 index 0000000..9480323 --- /dev/null +++ b/0004-JDBC-Fix-Sun-JRE-1.8-detection.patch @@ -0,0 +1,39 @@ +From f59192a3e0f551071bc26a95b42738d955fc8e36 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 4 Dec 2018 16:34:48 +0100 +Subject: [PATCH 4/4] JDBC: Fix Sun JRE 1.8 detection + +Backport a portion of commit 0111e14 from master that added JRE 1.8 +detection. +--- + m4/java.m4 | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/m4/java.m4 b/m4/java.m4 +index e659a1bec..f036e4c79 100644 +--- a/m4/java.m4 ++++ b/m4/java.m4 +@@ -173,6 +173,11 @@ m4_define([_JAVA_CHECK_INTERNAL], + JTYPE="Sun JRE 1.7" + JFLAGS="-Xlint:unchecked -Xlint:deprecation" + ;; ++ JRE1.8.*) ++ try_java=true ++ JTYPE="Sun JRE 1.8" ++ JFLAGS="-Xlint:unchecked -Xlint:deprecation" ++ ;; + JREgcj-4*) + try_java=true + JTYPE="GCJ" +@@ -224,7 +229,7 @@ m4_define([_JAVA_CHECK_INTERNAL], + fi + else + AC_MSG_RESULT([no]) +- AC_MSG_WARN([Java not found. Please install JDK 1.4 or later, make sure that the binaries are on the PATH and re-try. If that doesn't work, set JAVA_HOME correspondingly.]) ++ AC_MSG_WARN([Java not found. Please install JDK 1.5 or later, make sure that the binaries are on the PATH and re-try. If that doesn't work, set JAVA_HOME correspondingly.]) + try_java=false + fi + fi +-- +2.19.1 + diff --git a/libgda.spec b/libgda.spec index 876d9c5..e3423ec 100644 --- a/libgda.spec +++ b/libgda.spec @@ -24,10 +24,12 @@ Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/5.2/%{name}-%{ver # Fix FTBFS with -Werror=format-security Patch0001: 0001-Markup-message-correction.patch -# Backported patch to support JRE 1.8 -Patch0002: 0002-Fix-compatibility-with-JRE-1.8.patch # Link sqlite provider against sqlite3 -Patch0003: 0003-Link-sqlite-provider-against-sqlite3.patch +Patch0002: 0003-Link-sqlite-provider-against-sqlite3.patch +# Fix the build for the java provider +# https://gitlab.gnome.org/GNOME/libgda/merge_requests/69 +Patch0003: 0003-JDBC-Drop-unneeded-JAVAH-variable-check.patch +Patch0004: 0004-JDBC-Fix-Sun-JRE-1.8-detection.patch BuildRequires: autoconf automake libtool BuildRequires: gcc