Skip to content
Commits on Source (7)
javatools (0.64) unstable; urgency=medium
* Team upload.
[ Emmanuel Bourg ]
* jarwrapper: No longer use the d32/d64 options to detect the JVM data model
(Closes: #893931)
* java-vars.mk: Fixed the JVM_CLIENT_DIR and JVM_SERVER_DIR variables to work
with Java 9 and later (Closes: #896438)
* Standards-Version updated to 4.1.4
* Use salsa.debian.org Vcs-* URLs
[ Tiago Stürmer Daitx ]
* jh_build: Do not set -source when --release (available on jdk9+) is set
for either javac or javadoc. (Closes: #895230)
-- Emmanuel Bourg <ebourg@apache.org> Sat, 09 Jun 2018 23:42:10 +0200
javatools (0.63) unstable; urgency=medium
[ tony mancill ]
......
......@@ -12,9 +12,9 @@ Build-Depends:
libtest-strict-perl,
markdown,
perl
Standards-Version: 4.1.3
Vcs-Git: https://anonscm.debian.org/git/pkg-java/javatools.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/javatools.git
Standards-Version: 4.1.4
Vcs-Git: https://salsa.debian.org/java-team/javatools.git
Vcs-Browser: https://salsa.debian.org/java-team/javatools
Package: jarwrapper
Architecture: all
......
......@@ -2,3 +2,4 @@ jardetector /usr/bin
jarwrapper /usr/bin
jarwrapper-binfmt/jarwrapper /usr/share/binfmts
java-arch.sh /usr/share/jarwrapper
target/javatools.jar /usr/share/java
......@@ -13,6 +13,10 @@ jh_lib.sh: jh_lib.sh.in
sed 's,%JAVATOOLS_VERSION%,${VERSION},' < $< > $@
override_dh_auto_build: jh_lib.sh
mkdir -p target/classes
javac -d target/classes src/main/java/org/debian/javatools/CheckProperty.java
jar -cvf target/javatools.jar -C target/classes/ .
mkdir tmp tmp.jarwrapper
# javahelper pod-based manpages
$(POD2MAN) jh_installeclipse tmp/jh_installeclipse.1
......@@ -40,4 +44,4 @@ override_dh_auto_test: runtests
override_dh_auto_clean:
rm -f jh_lib.sh tutorial.html
rm -fr tmp tmp.jarwrapper
rm -fr tmp tmp.jarwrapper target
......@@ -38,7 +38,7 @@ MULTIARCH_LIBRARY_PATH_32BIT="/usr/lib/jni:/usr/lib/arm-linux-gnueabi/jni:/usr/l
MULTIARCH_LIBRARY_PATH_64BIT="/usr/lib/jni:/usr/lib/alpha-linux-gnu/jni:/usr/lib/x86_64-linux-gnu/jni:/usr/lib/aarch64-linux-gnu/jni:/usr/lib/x86_64-kfreebsd-gnu/jni:/usr/lib/powerpc64-linux-gnu/jni:/usr/lib/powerpc64le-linux-gnu/jni:/usr/lib/s390x-linux-gnu/jni:/usr/lib/sparc64-linux-gnu/jni"
if which "$JAVA" >/dev/null 2>&1; then
if java -d32 2>&1 | grep "does not support" > /dev/null; then
if java -cp /usr/share/java/javatools.jar org.debian.javatools.CheckProperty sun.arch.data.model 64 > /dev/null; then
# 64bit
export LD_LIBRARY_PATH=$MULTIARCH_LIBRARY_PATH_64BIT
exec $JAVA $JAVAOPTS -Djava.library.path=$MULTIARCH_LIBRARY_PATH_64BIT -jar "$JAR" "$@"
......
......@@ -16,12 +16,12 @@ JAVA_ARCH=$(shell /usr/share/javahelper/java-arch.sh $(DPKG_ARCH))
JRE_HOME=$(shell if [ -d $(JAVA_HOME)/jre ]; then echo $(JAVA_HOME)/jre; else echo $(JAVA_HOME); fi )
# may or may not be set, depends if the JVM ships a server VM or not
JVM_CLIENT_DIR=$(shell if [ -d $(JRE_HOME)/lib/$(JAVA_ARCH)/client ]; then echo $(JRE_HOME)/lib/$(JAVA_ARCH)/client; fi )
JVM_SERVER_DIR=$(shell if [ -d $(JRE_HOME)/lib/$(JAVA_ARCH)/server ]; then echo $(JRE_HOME)/lib/$(JAVA_ARCH)/server; fi )
JVM_CLIENT_DIR=$(shell if [ -d $(JRE_HOME)/lib/$(JAVA_ARCH)/client ]; then echo $(JRE_HOME)/lib/$(JAVA_ARCH)/client; else if [ -d $(JRE_HOME)/lib/client ]; then echo $(JRE_HOME)/lib/client; fi; fi )
JVM_SERVER_DIR=$(shell if [ -d $(JRE_HOME)/lib/$(JAVA_ARCH)/server ]; then echo $(JRE_HOME)/lib/$(JAVA_ARCH)/server; else if [ -d $(JRE_HOME)/lib/server ]; then echo $(JRE_HOME)/lib/server; fi; fi )
#print-vars:
# @echo $(JAVA_HOME)
# @echo $(JAVA_ARCH)
# @echo $(JRE_HOME)
# @echo $(JVM_CLIENT_DIR)
# @echo $(JVM_SERVER_DIR)
# @echo "JAVA_HOME : $(JAVA_HOME)"
# @echo "JAVA_ARCH : $(JAVA_ARCH)"
# @echo "JRE_HOME : $(JRE_HOME)"
# @echo "JVM_CLIENT_DIR : $(JVM_CLIENT_DIR)"
# @echo "JVM_SERVER_DIR : $(JVM_SERVER_DIR)"
......@@ -54,6 +54,7 @@ if ! grep -- -encoding <<< "$JH_JAVAC_OPTS" &>/dev/null; then
JH_JAVAC_OPTS="-encoding ISO8859-1 $JH_JAVAC_OPTS"
fi
if ! grep -- --release <<< "$JH_JAVAC_OPTS" &>/dev/null; then
if ! grep -- -source <<< "$JH_JAVAC_OPTS" &>/dev/null; then
if ! grep -- -target <<< "$JH_JAVAC_OPTS" &>/dev/null; then
JH_JAVAC_OPTS="-source 1.7 -target 1.7 $JH_JAVAC_OPTS"
......@@ -61,10 +62,13 @@ if ! grep -- -source <<< "$JH_JAVAC_OPTS" &>/dev/null; then
JH_JAVAC_OPTS="-source 1.7 $JH_JAVAC_OPTS"
fi
fi
fi
if ! grep -- --release <<< "$JH_JAVAC_OPTS" &>/dev/null; then
if ! grep -- -source <<< "$JH_JAVADOC_OPTS" &>/dev/null; then
JH_JAVADOC_OPTS="-source 1.7 $JH_JAVADOC_OPTS"
fi
fi
if ! grep -- -notimestamp <<< "$JH_JAVADOC_OPTS" &>/dev/null; then
JH_JAVADOC_OPTS="-notimestamp $JH_JAVADOC_OPTS"
......
/*
* Copyright 2018 Emmanuel Bourg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.debian.javatools;
/**
* Check the value of a system property from the command line.
*
* Syntax:
*
* java org.debian.javatools.CheckProperty <propertyName> <expectedValue>
*
* The program exits with the status code 0 if the actual value matches, and 1 otherwise.
*/
public class CheckProperty {
public static void main(String[] args) throws Exception {
String propertyName = args[0];
String expectedValue = args[1];
String actualValue = System.getProperty(propertyName);
if (expectedValue.equals(actualValue)) {
System.out.println("OK: " + propertyName + " = " + actualValue);
System.exit(0);
} else {
System.out.println("FAILED: " + propertyName + " = " + actualValue);
System.exit(1);
}
}
}