File: 04_java10_compatibility.patch

package info (click to toggle)
jmagick 6.6.9~20130201-svn99-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 2,248 kB
  • sloc: sh: 8,047; ansic: 4,729; java: 2,533; makefile: 173; xml: 101
file content (41 lines) | stat: -rw-r--r-- 1,271 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Description: Fixes the build failure with Java 10
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/configure.in
+++ b/configure.in
@@ -211,13 +211,6 @@
 fi
 AC_SUBST(JAVAC)
 
-dnl Determine if we have the Java header file generator
-AC_PATH_PROG(JAVAH, javah, not_found)
-if test ${JAVAH} = not_found; then
-	AC_MSG_ERROR('No Java header generator (javah) found')
-fi
-AC_SUBST(JAVAH)
-
 dnl Determine if we have jar
 AC_PATH_PROG(JAR, jar, not_found)
 if test ${JAR} = not_found; then
--- a/Make.rules
+++ b/Make.rules
@@ -71,6 +71,7 @@
 $(JAVA_PACKAGE_DIR)/%.class: %.java
 	@-mkdir -p $(dir $@)
 	$(JAVAC) $(JFLAGS) -d $(JAVA_CLASSES_DIR) 	\
+		-h $(PACKAGE_GENERATED_DIR)		\
 		-sourcepath $(JAVA_SRC_DIR)		\
 		-classpath $(JAVA_CLASS_PATH) $<
 
@@ -120,11 +121,6 @@
 # Rule to make header files from java class files.
 # The originating java source must contain native method specifications.
 $(PACKAGE_GENERATED_DIR)/$(JNI_HEADER_PREFIX)_%.h: $(JAVA_PACKAGE_DIR)/%.class
-	@-rm $@ > /dev/null 2>&1
-	@-mkdir -p $(dir $@)
-	"$(JAVAH)" -d $(PACKAGE_GENERATED_DIR) -jni			\
-		-classpath $(JAVA_CLASS_PATH)				\
-		$(JAVA_PACKAGE).$(subst .class,,$(notdir $<))
 
 # Rule to compile JNI C files
 $(PACKAGE_OBJ_DIR)/%.lo: %.c $(PACKAGE_GENERATED_DIR)/%.h