Fixed build with Java 8

Signed-off-by: Honza Horak <hhorak@redhat.com>
This commit is contained in:
Jakub Čajka 2014-07-14 13:35:12 +02:00 committed by Honza Horak
parent eaaaf9b94e
commit 418d7b37c8
2 changed files with 31 additions and 1 deletions

23
java8-fix.patch Normal file
View File

@ -0,0 +1,23 @@
diff -up db-5.3.28/lang/java/src/com/sleepycat/asm/ClassReader.java.fix db-5.3.28/lang/java/src/com/sleepycat/asm/ClassReader.java
--- db-5.3.28/lang/java/src/com/sleepycat/asm/ClassReader.java.fix 2013-09-09 17:35:04.000000000 +0200
+++ db-5.3.28/lang/java/src/com/sleepycat/asm/ClassReader.java 2014-07-14 11:51:27.584432754 +0200
@@ -163,7 +163,7 @@ public class ClassReader {
public ClassReader(final byte[] b, final int off, final int len) {
this.b = b;
// checks the class version
- if (readShort(6) > Opcodes.V1_7) {
+ if (readShort(6) > Opcodes.V1_8) {
throw new IllegalArgumentException();
}
// parses the constant pool
diff -up db-5.3.28/lang/java/src/com/sleepycat/asm/Opcodes.java.fix db-5.3.28/lang/java/src/com/sleepycat/asm/Opcodes.java
--- db-5.3.28/lang/java/src/com/sleepycat/asm/Opcodes.java.fix 2014-07-14 11:50:50.432336160 +0200
+++ db-5.3.28/lang/java/src/com/sleepycat/asm/Opcodes.java 2014-07-14 11:51:36.781456666 +0200
@@ -56,6 +56,7 @@ public interface Opcodes {
int V1_5 = 0 << 16 | 49;
int V1_6 = 0 << 16 | 50;
int V1_7 = 0 << 16 | 51;
+ int V1_8 = 0 << 16 | 52;
// access flags

View File

@ -4,7 +4,7 @@
Summary: The Berkeley DB database library for C
Name: libdb
Version: 5.3.28
Release: 6%{?dist}
Release: 7%{?dist}
Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
# For mt19937db.c
@ -22,6 +22,9 @@ Patch24: db-4.5.20-jni-include-dir.patch
# License clarification patch
# http://devel.trisquel.info/gitweb/?p=package-helpers.git;a=blob;f=helpers/DATA/db4.8/007-mt19937db.c_license.patch;h=1036db4d337ce4c60984380b89afcaa63b2ef88f;hb=df48d40d3544088338759e8bea2e7f832a564d48
Patch25: 007-mt19937db.c_license.patch
#Adds missing constant to Optcodes.java and changes ClassReader.java to use it. This makes package to build with Java 8.
Patch26: java8-fix.patch
URL: http://www.oracle.com/database/berkeley-db/
License: BSD and LGPLv2 and Sleepycat
Group: System Environment/Libraries
@ -208,6 +211,7 @@ popd
%patch22 -p1 -b .185compat
%patch24 -p1 -b .4.5.20.jni
%patch25 -p1 -b .licensefix
%patch26 -p1 -b .java8-fix
cd dist
./s_config
@ -411,6 +415,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/libdb_java.so
%changelog
* Mon Jul 14 2014 Jakub Čajka <jcajka@redhat.com> - 5.3.28-7
- Fixed build with Java 8
* Tue Jun 10 2014 Jan Stanek <jstanek@redhat.com> - 5.3.28-6
- Fixed search path for new tcl, new BuildRequires for zlib