[latexdraw] 115/147: Don't build with openjdk-7; use multiarch paths in debian/rules too

Stuart Prescott stuart at debian.org
Thu Nov 24 23:53:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

stuart pushed a commit to branch master
in repository latexdraw.

commit 4323f5c3e53d070a8dcd437b2f5843363387756c
Author: Stuart Prescott <stuart at debian.org>
Date:   Sun Oct 16 23:21:20 2011 +0000

    Don't build with openjdk-7; use multiarch paths in debian/rules too
---
 debian/control |  2 +-
 debian/rules   | 20 ++++++++++++++------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/debian/control b/debian/control
index 640659c..4959f2c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: graphics
 Priority: optional
 Maintainer: Stuart Prescott <stuart+debian at nanonanonano.net>
 Build-Depends: debhelper (>= 7.3.5~)
-Build-Depends-Indep: openjdk-7-jdk | openjdk-6-jdk | sun-java6-jdk,
+Build-Depends-Indep: openjdk-6-jdk | sun-java6-jdk,
                      ant,
                      imagemagick,
                      libjiu-java,
diff --git a/debian/rules b/debian/rules
index f289c23..3771d3b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,16 +5,24 @@
 
 # If the user has not explicitly set JAVA_HOME, export sensible value
 # to make sure that the correct compiler is used by ant.
-# Prefer openjdk-6
+# * prefer openjdk-6 then sun-java6;
+# * include both multi-arch and non-multi-arch paths for ease of backporting
+# * don't accept openjdk-7 to ensure the class files are of a supported format
+#   "export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-i386" or similar if you want
+#   to build locally using openjdk-7.
 JAVA_HOME ?= $(shell echo \
-  ` \
-     ( t=/usr/lib/jvm/java-6-openjdk && test -d $$t && test -f $$t/bin/javac && echo $$t )   \
-  || ( t=/usr/lib/jvm/java-6-sun     && test -d $$t && test -f $$t/bin/javac && echo $$t )   \
-  ` \
- )
+  ` for jre in \
+      /usr/lib/jvm/java-6-openjdk-\`dpkg-architecture -qDEB_BUILD_ARCH\` \
+      /usr/lib/jvm/java-6-openjdk \
+      /usr/lib/jvm/java-6-sun \
+      ; do \
+      test -d $$jre && test -f $$jre/bin/javac && echo $$jre && break ; \
+    done ` \
+  )
 export JAVA_HOME
 
 %:
+	$(shell echo set JAVA_HOME=$(JAVA_HOME))
 	dh $@
 
 override_dh_auto_build:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/latexdraw.git



More information about the pkg-java-commits mailing list