- Enforce JAVA_VERSION when launching javavm(1), otherwise the program

crashes when several JDK versions are installed and javawm(1) picks
  higher version (happens when /usr/ports/Mk/bsd.java.mk is absent,
  contrary to documented selection process which is designed to behave
  almost identically WRT presence/absence of /usr/ports/Mk/bsd.java.mk
- While here, simplify the script a bit and remove keywords and their
  expansion, they are useless for wrapper scripts

PR:		250268
Submitted by:	rodrigo
This commit is contained in:
Alexey Dokuchaev 2020-10-23 08:23:22 +00:00
parent 59e033c960
commit acc9b3a0dd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=553098
2 changed files with 3 additions and 4 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= sweethome3d
PORTVERSION= 6.4.2
PORTREVISION= 1
CATEGORIES= cad java
MASTER_SITES= SF/${PORTNAME}/SweetHome3D-source/${DISTNAME}/
DISTNAME= SweetHome3D-${PORTVERSION}-src

View File

@ -1,8 +1,6 @@
#!/bin/sh
#
# $FreeBSD$
JAVA="%%LOCALBASE%%/bin/java"
JARPATH="%%JAVALIBDIR%%"
SH3D_JAR="%%JAVALIBDIR%%/%%JARNAME%%"
exec "${JAVA}" -Xmx1024m -jar "${JARPATH}/%%JARNAME%%" "$@"
JAVA_VERSION=%%JAVA_VERSION%% exec "${JAVA}" -Xmx1024m -jar "${SH3D_JAR}" "$@"