From 8375afbde89b483c0a2ff7137d6178bde085f37fb48524441118b8233c507f03 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 22 Dec 2017 12:14:11 +0000 Subject: [PATCH 1/2] Fix build with jdk10 OBS-URL: https://build.opensuse.org/package/show/Java:packages/matthewlib-java?expand=0&rev=10 --- libmatthew-java-0.8-jdk10.patch | 66 +++++++++++++++++++++++++++++++++ matthewlib-java.changes | 7 ++++ matthewlib-java.spec | 2 + 3 files changed, 75 insertions(+) create mode 100644 libmatthew-java-0.8-jdk10.patch diff --git a/libmatthew-java-0.8-jdk10.patch b/libmatthew-java-0.8-jdk10.patch new file mode 100644 index 0000000..c0df7fc --- /dev/null +++ b/libmatthew-java-0.8-jdk10.patch @@ -0,0 +1,66 @@ +--- libmatthew-java-0.8/cgi-java.c 2011-06-28 10:27:11.000000000 +0200 ++++ libmatthew-java-0.8/cgi-java.c 2017-12-22 13:10:21.755868074 +0100 +@@ -26,7 +26,10 @@ + */ + + #include +-#include "cgi-java.h" ++#include "cx_ath_matthew_unix_UnixServerSocket.h" ++#include "cx_ath_matthew_unix_UnixSocket.h" ++#include "cx_ath_matthew_unix_USInputStream.h" ++#include "cx_ath_matthew_unix_USOutputStream.h" + #include + #include + #include +--- libmatthew-java-0.8/Makefile 2011-01-23 18:09:41.000000000 +0100 ++++ libmatthew-java-0.8/Makefile 2017-12-22 13:10:57.603868209 +0100 +@@ -1,7 +1,6 @@ + JAVAC?=javac + JAVADOC?=javadoc + JAR?=jar +-JAVAH?=javah + GCJ?=gcj + CC?=gcc + LD?=gcc +@@ -13,7 +12,7 @@ + JVERCFLAGS+=-source 1.5 + JCFLAGS+= + INCLUDES+=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux +-JAVADOCFLAGS?=-quiet -author -link http://java.sun.com/j2se/1.4.2/docs/api/ ++JAVADOCFLAGS?=-quiet -author + + LDVER?=$(shell ld -v | cut -d' ' -f1) + UNAME?=$(shell uname -s) +@@ -50,7 +49,7 @@ + .classes: $(SRC) + mkdir -p classes + $(MAKE) .$(DEBUG)debug +- $(JAVAC) $(JVERCFLAGS) $(JCFLAGS) -d classes -cp classes $^ ++ $(JAVAC) $(JVERCFLAGS) $(JCFLAGS) -d classes -h . -cp classes $^ + touch .classes + clean: + rm -rf classes doc +@@ -76,10 +75,10 @@ + $(CC) $(CFLAGS) $(CSTD) $(CSHAREFLAG) $(INCLUDES) -c -o $@ $< + lib%.so: %.o + $(CC) $(LDFLAGS) $(LDSHAREFLAGS) -o $@ $< ++ + unix-java.h: .classes +- $(JAVAH) -classpath classes -o $@ cx.ath.matthew.unix.UnixServerSocket cx.ath.matthew.unix.UnixSocket cx.ath.matthew.unix.USInputStream cx.ath.matthew.unix.USOutputStream ++ + cgi-java.h: .classes +- $(JAVAH) -classpath classes -o $@ cx.ath.matthew.cgi.CGI + + test.cgi: cgi-$(CGIVER).jar libcgi-java.so + $(GCJ) $(GCJFLAGS) $(GCJJNIFLAG) -L. -lcgi-java -o test.cgi --main=cx.ath.matthew.cgi.testcgi cgi-$(CGIVER).jar +--- libmatthew-java-0.8/unix-java.c 2011-06-28 10:27:20.000000000 +0200 ++++ libmatthew-java-0.8/unix-java.c 2017-12-22 13:10:16.323868053 +0100 +@@ -29,7 +29,7 @@ + /* _GNU_SOURCE is required to use struct ucred in glibc 2.8 */ + #define _GNU_SOURCE + +-#include "unix-java.h" ++#include "cx_ath_matthew_cgi_CGI.h" + #include + #include + #include diff --git a/matthewlib-java.changes b/matthewlib-java.changes index 0b93c0d..5b3e286 100644 --- a/matthewlib-java.changes +++ b/matthewlib-java.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Dec 22 12:12:51 UTC 2017 - fstrba@suse.com + +- Added patch: + * libmatthew-java-0.8-jdk10.patch + + fix build with jdk10 + ------------------------------------------------------------------- Thu Sep 14 08:37:19 UTC 2017 - fstrba@suse.com diff --git a/matthewlib-java.spec b/matthewlib-java.spec index ae23abd..aee3410 100644 --- a/matthewlib-java.spec +++ b/matthewlib-java.spec @@ -34,6 +34,7 @@ Group: Development/Libraries/Java Source0: libmatthew-java-0.8.tar.gz Patch0: install_doc.patch Patch1: classpath_fix.patch +Patch2: libmatthew-java-0.8-jdk10.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes BuildRequires: java-devel @@ -82,6 +83,7 @@ A collection of Java libraries: - Unix Sockets Library This is a %setup -q -n %{orig_name}-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build make \ From e5a6b121a5b5cf642b83edfaa677b1bf9be15aff84bdeccdf42f2ccd787e6c0b Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 22 Dec 2017 17:13:10 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/matthewlib-java?expand=0&rev=11 --- matthewlib-java.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matthewlib-java.spec b/matthewlib-java.spec index aee3410..0c0cc57 100644 --- a/matthewlib-java.spec +++ b/matthewlib-java.spec @@ -37,7 +37,7 @@ Patch1: classpath_fix.patch Patch2: libmatthew-java-0.8-jdk10.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes -BuildRequires: java-devel +BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-tools Requires: javapackages-tools Requires: jre >= 1.5.0