Files
ports/java/javavmwrapper/Makefile
T
Harald Eilertsen 7878106082 java/javavmwrapper: JAVA_VERSION does not work with openjdk25
Remove the hard coded lists of java version numbers to iterate over when
JAVA_VERSION is set to N+. Instead use N as the lowest boundary, and the
latest available JDK as the upper bound, and just scan for the highest
available version satisfying the requirement.

Ideally it should be possible to deduce the upper bound from the
available java versions in ${PREFIX}/etc/javavms, but leaving that for
later.

Co-authored-by: jonc@chen.org.nz
PR:		293231
Reported by:	jonc@chen.org.nz
Sponsored by:	The FreeBSD Foundation
2026-05-07 11:12:10 +02:00

59 lines
2.0 KiB
Makefile

PORTNAME= javavmwrapper
PORTVERSION= 2.7.10
PORTREVISION= 2
CATEGORIES= java
MASTER_SITES= # none
DISTFILES= # none
MAINTAINER= glewis@FreeBSD.org
COMMENT= Wrapper script for various Java Virtual Machines
LICENSE= BEERWARE BSD2CLAUSE
LICENSE_COMB= multi
LICENSE_NAME_BEERWARE= "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp)
LICENSE_TEXT_BEERWARE= See ${SRC}/javavmwrapper.sh for license text
LICENSE_PERMS_BEERWARE= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
NO_BUILD= yes
NO_ARCH= yes
NO_WRKSUBDIR= yes
PKGINSTALL= ${WRKDIR}/pkg-install
SRC= ${.CURDIR}/src
SCRIPTS= classpath javavmwrapper
# This is normally defined by bsd.java.mk when USES=java is defined, but
# we can't do that here since it would result in a circular dependency
JAVALIBDIR= ${LOCALBASE}/share/java/classes
do-configure:
.for _script in ${SCRIPTS}
${SED} -e 's|%%PREFIX%%|${PREFIX}|;' \
-e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|;' \
${SRC}/${_script}.sh >${WRKSRC}/${_script}.sh
.endfor
${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
${FILESDIR}/pkg-install.in > ${PKGINSTALL}
.for _man in checkvms.1 javavm.1 manvm.1 registervm.1 javavm_opts.conf.5 javavms.5
${SED} -e 's|%%PREFIX%%|${PREFIX}|;' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
-e 's|%%PORTSDIR%%|${PORTSDIR}|;' \
${SRC}/${_man} > ${WRKSRC}/${_man}
.endfor
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/classpath.sh ${STAGEDIR}${PREFIX}/bin/classpath
${INSTALL_SCRIPT} ${WRKSRC}/javavmwrapper.sh ${STAGEDIR}${PREFIX}/bin/javavm
${LN} -sf javavm ${STAGEDIR}${PREFIX}/bin/checkvms
${LN} -sf javavm ${STAGEDIR}${PREFIX}/bin/manvm
${LN} -sf javavm ${STAGEDIR}${PREFIX}/bin/registervm
${LN} -sf javavm ${STAGEDIR}${PREFIX}/bin/unregistervm
${INSTALL_MAN} ${WRKSRC}/*.1 ${STAGEDIR}${PREFIX}/share/man/man1
${INSTALL_MAN} ${WRKSRC}/registervm.1 \
${STAGEDIR}${PREFIX}/share/man/man1/unregistervm.1
${INSTALL_MAN} ${WRKSRC}/*.5 ${STAGEDIR}${PREFIX}/share/man/man5
${INSTALL_DATA} ${FILESDIR}/javavm_opts.conf.dist \
${STAGEDIR}${PREFIX}/etc/javavm_opts.conf.dist
.include <bsd.port.mk>