summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Klose <doko@debian.org>2015-10-11 21:58:41 +0200
committerEmmanuel Bourg <ebourg@apache.org>2015-10-11 21:58:41 +0200
commit03792973a51621889b8861d215c1a8a8a0b02395 (patch)
tree42bbb8412309bde71603dde7f0c31b81425f4ac8
parentb93449dc2732c8c48e054e56b4dd310d985f3212 (diff)
downloadjava-common-03792973a51621889b8861d215c1a8a8a0b02395.tar.gz
java_defaults.mk: Add jvm_archdir and jvm_archpath macrosdebian/0.52.1
-rw-r--r--debian/changelog3
-rw-r--r--debian/java_defaults.mk20
2 files changed, 22 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 672d16f..a4daab6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,8 @@
-java-common (0.52.1) UNRELEASED; urgency=medium
+java-common (0.52.1) unstable; urgency=medium
* Team upload.
* Bump kfreebsd-amd64 kfreebsd-i386 to 1.7 again.
+ * java_defaults.mk: Add jvm_archdir and jvm_archpath macros.
-- Matthias Klose <doko@debian.org> Sun, 11 Oct 2015 09:40:26 +0200
diff --git a/debian/java_defaults.mk b/debian/java_defaults.mk
index 6de3172..47863db 100644
--- a/debian/java_defaults.mk
+++ b/debian/java_defaults.mk
@@ -23,3 +23,23 @@ else ifneq (,$(filter $(_java_host_arch),$(java6_architectures)))
else ifneq (,$(filter $(_java_host_arch),$(java5_architectures)))
java_default_version = 5
endif
+
+# jvm_archdir is the directory for architecture specific files / libraries
+# in <JAVA_HOME>/jre/lib/<jvm_archdir> or <JAVA_HOME>/lib/<jvm_archdir>
+# jvm_archpath is the relative path of jvm_archdir in JAVA_HOME.
+
+_java_host_cpu := $(if $(DEB_HOST_ARCH_CPU),$(DEB_HOST_ARCH_CPU),$(shell dpkg-architecture -qDEB_HOST_ARCH_CPU))
+jvm_archdir_map = \
+ alpha=alpha armel=arm armhf=arm arm64=aarch64 amd64=amd64 hppa=parisc \
+ i386=i386 m68k=m68k mips=mips mipsel=mipsel mips64=mips64 mips64el=mips64el \
+ powerpc=ppc powerpcspe=ppc ppc64=ppc64 ppc64el=ppc64le \
+ sparc=sparc sparc64=sparc64 sh4=sh s390x=s390x ia64=ia64 x32=x32
+
+jvm_archdir := \
+ $(strip $(patsubst $(_java_host_cpu)=%, %, $(filter $(_java_host_cpu)=%, $(jvm_arch_map))))
+
+ifneq (,$(filter $(java_default_version), 9))
+ jvm_archpath := lib/$(jvm_archdir)
+else
+ jvm_archpath := jre/lib/$(jvm_archdir)
+endif