Source: qdbm
Severity: normal
Tags: patch
User: debian-ia64@lists.debian.org
Usertags: ia64

Dear Maintainer,

As currently configured, gcc-7 does not know where to find the Java jni.h 
headers if the arch is
using gcj rather than openjdk. [1]  The attached patch should clean up the Java 
detection and set
the relevant environment variables correctly.

[1] 
https://buildd.debian.org/status/fetch.php?pkg=qdbm&arch=ia64&ver=1.8.78-6.2&stamp=1518046955&raw=0


-- System Information:
Debian Release: buster/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: ia64

Kernel: Linux 3.14-0.bpo.2-mckinley (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
--- qdbm-1.8.78/debian/rules    2018-02-06 10:12:44.000000000 -0500
+++ qdbm-1.8.78-new/debian/rules        2018-03-06 11:19:25.125571799 -0500
@@ -43,13 +43,12 @@
        --includedir=\$${prefix}/include/qdbm \
        --enable-pthread --enable-zlib --enable-iconv
 
-DEFAULT_JAVA ?= $(shell readlink /etc/alternatives/java | sed 
s@/jre/bin/java@@)
-ifneq (,$(findstring /usr/bin/gij,$(DEFAULT_JAVA)))
+JAVA_HOME = /usr/lib/jvm/default-java
+CONFIGURE_VARS += JAVA_HOME="$(JAVA_HOME)"
+DEFAULT_JAVA ?= $(shell readlink -f $(JAVA_HOME)/bin/java)
+ifneq (,$(filter /usr/bin/%gij%, $(DEFAULT_JAVA)))
 CONFIGURE_VARS += JAVAC="gcj-wrapper" JAR="fastjar"
 CONFIGURE_SWITCHES += --with-gcj
-else
-JAVA_HOME = $(DEFAULT_JAVA)
-CONFIGURE_VARS += JAVA_HOME="$(JAVA_HOME)"
 endif
 
 build: build-arch build-indep

Reply via email to