2013-09-20 21:48:32 +02:00
|
|
|
# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
|
2000-06-12 11:42:51 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= javavmwrapper
|
2014-04-12 21:43:17 +02:00
|
|
|
PORTVERSION= 2.5
|
2016-08-23 14:28:07 +02:00
|
|
|
PORTREVISION= 2
|
2000-06-12 11:42:51 +02:00
|
|
|
CATEGORIES= java
|
|
|
|
MASTER_SITES= # none
|
|
|
|
DISTFILES= # none
|
|
|
|
|
. Usher in javavmwrapper 2.0, a rewrite of the wrapper scripts designed to
allow the simple use of multiple VMs. Brief detail of the main changes:
. When a VM is registered, symbolic links for its executables are
created in ${LOCALBASE}/bin. This allows people to just type
'java', 'javac', etc. without having to add the VM installation
directory to their PATH.
. The actual 'java' that is executed via one of these symlinks is
determined by the order of the (sorted) configuration file
${LOCALBASE}/etc/javavms and by the environment variables
JAVA_VERSION, JAVA_OS and JAVA_VENDOR which function to select
a VM as they do in the ports framework.
. There is a new command, checkvms, to sanity check the configuration
and symlinks.
. The "javavm" executable is currently retained in its original capacity
as a synonym for Java for backward compatibility. However, its use
is deprecated.
. Temporarily set MAINTAINER to myself to make monitoring any initial
bug reports easier. The intent is to convert it to java@ at a later
date.
This is built on the ideas of znerd, hq and Shelton C. Johnson Jr., with
hq and Shelton contributing code and reviews.
PR: 27079, 39080
Reviewed by: hq, Shelton C. Johnson Jr. <shelton_c_j@yahoo.com>
2004-11-11 20:17:37 +01:00
|
|
|
MAINTAINER= glewis@FreeBSD.org
|
2003-03-07 07:14:21 +01:00
|
|
|
COMMENT= Wrapper script for various Java Virtual Machines
|
2000-06-12 11:42:51 +02:00
|
|
|
|
|
|
|
NO_BUILD= yes
|
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
|
2005-04-11 22:57:57 +02:00
|
|
|
PKGINSTALL= ${WRKDIR}/pkg-install
|
|
|
|
|
2000-06-12 11:42:51 +02:00
|
|
|
SRC= ${.CURDIR}/src
|
2004-04-01 15:40:14 +02:00
|
|
|
SCRIPTS= classpath javavmwrapper
|
|
|
|
# This is normally defined by bsd.java.mk when USE_JAVA is defined, but
|
|
|
|
# we can't do that here since it would result in a circular dependency
|
2004-09-03 18:23:01 +02:00
|
|
|
JAVALIBDIR= ${LOCALBASE}/share/java/classes
|
2000-06-12 11:42:51 +02:00
|
|
|
|
|
|
|
do-configure:
|
2004-04-01 15:40:14 +02:00
|
|
|
.for _script in ${SCRIPTS}
|
|
|
|
${SED} -e 's|%%PREFIX%%|${PREFIX}|;' \
|
2004-09-03 18:23:01 +02:00
|
|
|
-e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|;' \
|
2015-11-05 13:36:25 +01:00
|
|
|
${SRC}/${_script}.sh >${WRKSRC}/${_script}.sh
|
2004-04-01 15:40:14 +02:00
|
|
|
.endfor
|
2004-12-16 16:38:17 +01:00
|
|
|
${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
|
|
|
|
${FILESDIR}/pkg-install.in > ${PKGINSTALL}
|
2014-02-06 08:25:16 +01:00
|
|
|
.for _man in checkvms.1 javavm.1 manvm.1 registervm.1 javavm_opts.conf.5 javavms.5
|
2005-04-11 23:22:43 +02:00
|
|
|
${SED} -e 's|%%PREFIX%%|${PREFIX}|;' \
|
|
|
|
-e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
|
2005-04-12 18:07:21 +02:00
|
|
|
-e 's|%%PORTSDIR%%|${PORTSDIR}|;' \
|
2015-11-05 13:36:25 +01:00
|
|
|
${SRC}/${_man} > ${WRKSRC}/${_man}
|
2005-04-11 23:22:43 +02:00
|
|
|
.endfor
|
2000-06-12 11:42:51 +02:00
|
|
|
|
|
|
|
do-install:
|
2015-11-05 13:36:25 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/classpath.sh ${STAGEDIR}${PREFIX}/bin/classpath
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/javavmwrapper.sh ${STAGEDIR}${PREFIX}/bin/javavm
|
2014-02-06 08:25:16 +01:00
|
|
|
${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
|
2015-11-05 13:36:25 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/registervm.1 \
|
2014-02-06 08:25:16 +01:00
|
|
|
${STAGEDIR}${MAN1PREFIX}/man/man1/unregistervm.1
|
2015-11-05 13:36:25 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/*.5 ${STAGEDIR}${MAN5PREFIX}/man/man5
|
2006-06-03 19:32:24 +02:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/javavm_opts.conf.dist \
|
2014-02-06 08:25:16 +01:00
|
|
|
${STAGEDIR}${PREFIX}/etc/javavm_opts.conf.dist
|
2000-06-12 11:42:51 +02:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|