View | Details | Raw Unified | Return to bug 210313 | Differences between
and this patch

Collapse All | Expand All

(-)Keywords/javavm.ucl (+11 lines)
Line 0 Link Here
1
# $FreeBSD$
2
#
3
# MAINAINER: java@FreeBSD.org
4
5
actions: []
6
post-install: << EOD
7
    registervm %@
8
EOD
9
pre-deinstall: << EOD
10
    unregistervm %@
11
EOD
(-)Keywords/terminfo.ucl (-4 / +4 lines)
Lines 3-21 Link Here
3
3
4
actions: []
4
actions: []
5
post-install: <<EOD
5
post-install: <<EOD
6
  terminfodir=%D/share/misc
6
  terminfodir=${PKG_ROOTDIR}%D/share/misc
7
  terminfodb=${terminfodir}/terminfo.db
7
  terminfodb=${terminfodir}/terminfo.db
8
  if [ -e ${terminfodb}.default ] && which -s tic; then
8
  if [ -e ${terminfodb}.default ] && which -s tic; then
9
    cp ${terminfodb}.default ${terminfodb}
9
    cp ${terminfodb}.default ${terminfodb}
10
    find -s ${terminfodir} -name "*.terminfo" -exec tic {} \;
10
    find -s ${terminfodir} -name "*.terminfo" -exec tic -o ${terminfodir} {} \;
11
  fi
11
  fi
12
EOD
12
EOD
13
post-deinstall: <<EOD
13
post-deinstall: <<EOD
14
  terminfodir=%D/share/misc
14
  terminfodir=${PKG_ROOTDIR}%D/share/misc
15
  terminfodb=${terminfodir}/terminfo.db
15
  terminfodb=${terminfodir}/terminfo.db
16
  if [ -e ${terminfodb}.default ] && which -s tic; then
16
  if [ -e ${terminfodb}.default ] && which -s tic; then
17
    cp ${terminfodb}.default ${terminfodb}
17
    cp ${terminfodb}.default ${terminfodb}
18
    find -s ${terminfodir} -name "*.terminfo" -exec tic {} \;
18
    find -s ${terminfodir} -name "*.terminfo" -exec tic -o ${terminfodir} {} \;
19
  else
19
  else
20
    rm -f ${terminfodb}
20
    rm -f ${terminfodb}
21
  fi
21
  fi
(-)java/javavmwrapper/Makefile (-4 / +1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	javavmwrapper
4
PORTNAME=	javavmwrapper
5
PORTVERSION=	2.5
5
PORTVERSION=	2.5
6
PORTREVISION=	1
6
CATEGORIES=	java
7
CATEGORIES=	java
7
MASTER_SITES=	# none
8
MASTER_SITES=	# none
8
DISTFILES=	# none
9
DISTFILES=	# none
Lines 13-20 Link Here
13
NO_BUILD=	yes
14
NO_BUILD=	yes
14
NO_WRKSUBDIR=	yes
15
NO_WRKSUBDIR=	yes
15
16
16
PKGINSTALL=	${WRKDIR}/pkg-install
17
18
SRC=		${.CURDIR}/src
17
SRC=		${.CURDIR}/src
19
SCRIPTS=	classpath javavmwrapper
18
SCRIPTS=	classpath javavmwrapper
20
# This is normally defined by bsd.java.mk when USE_JAVA is defined, but
19
# This is normally defined by bsd.java.mk when USE_JAVA is defined, but
Lines 27-34 Link Here
27
	       -e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|;' \
26
	       -e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|;' \
28
		${SRC}/${_script}.sh >${WRKSRC}/${_script}.sh
27
		${SRC}/${_script}.sh >${WRKSRC}/${_script}.sh
29
.endfor
28
.endfor
30
	${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
31
		${FILESDIR}/pkg-install.in > ${PKGINSTALL}
32
.for _man in checkvms.1 javavm.1 manvm.1 registervm.1 javavm_opts.conf.5 javavms.5
29
.for _man in checkvms.1 javavm.1 manvm.1 registervm.1 javavm_opts.conf.5 javavms.5
33
	${SED} -e 's|%%PREFIX%%|${PREFIX}|;' \
30
	${SED} -e 's|%%PREFIX%%|${PREFIX}|;' \
34
	       -e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
31
	       -e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
(-)java/javavmwrapper/files/pkg-install.in (-36 lines)
Lines 1-36 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: /tmp/pcvs/ports/java/javavmwrapper/files/pkg-install.in,v 1.3 2006-06-03 17:32:24 glewis Exp $
4
5
LOCALBASE=%%LOCALBASE%%
6
7
# This script runs during post-install
8
if [ "x${2}" != "xPOST-INSTALL" ]; then
9
    exit 0
10
fi
11
12
# The option configuration file
13
OPTION_CONF="${PKG_PREFIX}/etc/javavm_opts.conf"
14
15
# Install default javavm options configuration
16
if [ ! -e "${OPTION_CONF}" ]; then
17
    cp "${OPTION_CONF}.dist" "${OPTION_CONF}"
18
else
19
    echo "${OPTION_CONF} already exists - not installing."
20
    echo "You may need to hand merge changes."
21
fi
22
23
# Ensure all JDKs and JREs are installed
24
_excl_dirs='bootstrap-openjdk'
25
_find_expr='-depth 2 -regex .*/bin/java'
26
for dir in ${_excl_dirs}; do
27
    _find_expr="${_find_expr} ! -regex ${dir}/bin/java"
28
done
29
for jvm in `cd "${LOCALBASE}" && find *jdk* *jre* ${_find_expr} 2> /dev/null`; do
30
    if [ -x "${LOCALBASE}/${jvm}" ]; then
31
        "${PKG_PREFIX}"/bin/registervm "${LOCALBASE}/${jvm}" > /dev/null 2>&1
32
    fi
33
done
34
35
# Ensure all VMs are configured correctly
36
"${PKG_PREFIX}"/bin/checkvms
(-)java/javavmwrapper/pkg-deinstall (-54 lines)
Lines 1-54 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
5
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
6
7
# Run this script at the pre-deinstall stage
8
if [ "x${2}" != "xDEINSTALL" ]; then
9
    exit 0
10
fi
11
12
# The option configuration file
13
OPTION_CONF="${PKG_PREFIX}/etc/javavm_opts.conf"
14
15
# Remove the option configuration file if its identical to the
16
# distributed version.
17
if [ -f "${OPTION_CONF}" -a -f "${OPTION_CONF}.dist" ]; then
18
	if [ `sed -e '/^#/d' -e '/^\s*$/d' "${OPTION_CONF}" | sort | md5` = \
19
	     `sed -e '/^#/d' -e '/^\s*$/d' "${OPTION_CONF}.dist" | sort | md5` ]; then
20
		rm -f "${OPTION_CONF}"
21
	fi
22
fi
23
24
# Destroy the symbolic links that were created for every executable for a VM.
25
_excl_links='checkvms manvm registervm unregistervm'
26
_find_expr='-depth 1 -type l'
27
for i in ${_excl_links}; do
28
	_find_expr="${_find_expr} ! -name ${i}"
29
done
30
_javavm_path=`realpath ${PKG_PREFIX}/bin/javavm`
31
for i in `find ${PKG_PREFIX}/bin ${_find_expr}`; do
32
	if [ "${_javavm_path}" = `realpath ${i}` ]; then
33
		rm -f "${i}"
34
	fi
35
done
36
37
# The configuration file
38
CONF="${PKG_PREFIX}/etc/javavms"
39
40
# Ensure the configuration file exists
41
if [ ! -f "${CONF}" ]; then
42
    exit 0
43
fi
44
45
# Ensure the configuration file has the correct permissions
46
if [ ! -r "${CONF}" ]; then
47
    echo "error: can't read configuration file ${CONF}" 1>&2
48
    exit 1
49
fi
50
51
# Remove the configuration file.
52
rm -f "${CONF}"
53
54
exit 0
(-)java/javavmwrapper/pkg-plist (-1 / +1 lines)
Lines 4-10 Link Here
4
bin/manvm
4
bin/manvm
5
bin/registervm
5
bin/registervm
6
bin/unregistervm
6
bin/unregistervm
7
etc/javavm_opts.conf.dist
7
@sample etc/javavm_opts.conf.dist etc/javavm_opts.conf
8
man/man1/checkvms.1.gz
8
man/man1/checkvms.1.gz
9
man/man1/javavm.1.gz
9
man/man1/javavm.1.gz
10
man/man1/manvm.1.gz
10
man/man1/manvm.1.gz
(-)java/linux-oracle-jdk18/pkg-plist (-2 / +1 lines)
Lines 10-15 Link Here
10
%%T%%/bin/jar
10
%%T%%/bin/jar
11
%%T%%/bin/jarsigner
11
%%T%%/bin/jarsigner
12
%%T%%/bin/java
12
%%T%%/bin/java
13
@javavm %%T%%/bin/java
13
%%T%%/bin/java-rmi.cgi
14
%%T%%/bin/java-rmi.cgi
14
%%T%%/bin/javac
15
%%T%%/bin/javac
15
%%T%%/bin/javadoc
16
%%T%%/bin/javadoc
Lines 3413-3419 Link Here
3413
%%DEMO%%%%T%%/sample/webservices/EbayServer/src/ebay/server/ImageProvider.java
3414
%%DEMO%%%%T%%/sample/webservices/EbayServer/src/ebay/server/ImageProvider.java
3414
%%DEMO%%%%T%%/sample/webservices/EbayServer/src/ebay/server/Main.java
3415
%%DEMO%%%%T%%/sample/webservices/EbayServer/src/ebay/server/Main.java
3415
%%T%%/src.zip
3416
%%T%%/src.zip
3416
@exec %%LOCALBASE%%/bin/registervm "%D/%%T%%/bin/java # Linux-Oracle-JDK%%PORTVERSION%%"
3417
@unexec %%LOCALBASE%%/bin/unregistervm "%D/%%T%%/bin/java"
3418
@dir %%T%%/jre/lib/applet
3417
@dir %%T%%/jre/lib/applet
3419
@dir %%T%%/lib/missioncontrol/p2/org.eclipse.equinox.p2.engine/profileRegistry/JMC.profile/.data
3418
@dir %%T%%/lib/missioncontrol/p2/org.eclipse.equinox.p2.engine/profileRegistry/JMC.profile/.data
(-)java/linux-oracle-jre18/pkg-plist (-2 / +1 lines)
Lines 6-11 Link Here
6
%%T%%/Welcome.html
6
%%T%%/Welcome.html
7
%%T%%/bin/ControlPanel
7
%%T%%/bin/ControlPanel
8
%%T%%/bin/java
8
%%T%%/bin/java
9
@javavm %%T%%/bin/java
9
%%T%%/bin/javaws
10
%%T%%/bin/javaws
10
%%T%%/bin/jcontrol
11
%%T%%/bin/jcontrol
11
%%T%%/bin/jjs
12
%%T%%/bin/jjs
Lines 295-300 Link Here
295
%%T%%/plugin/desktop/sun_java.desktop
296
%%T%%/plugin/desktop/sun_java.desktop
296
%%T%%/plugin/desktop/sun_java.png
297
%%T%%/plugin/desktop/sun_java.png
297
%%T%%/release
298
%%T%%/release
298
@exec %%LOCALBASE%%/bin/registervm "%D/%%T%%/bin/java # Linux-Oracle-JRE%%PORTVERSION%%"
299
@unexec %%LOCALBASE%%/bin/unregistervm "%D/%%T%%/bin/java"
300
@dir %%T%%/lib/applet
299
@dir %%T%%/lib/applet
(-)java/openjdk6/Makefile (-13 / +3 lines)
Lines 46-54 Link Here
46
TEST_DESC=	Add support for running regression test
46
TEST_DESC=	Add support for running regression test
47
.endif
47
.endif
48
48
49
PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
50
PKGINSTALL=	${WRKDIR}/pkg-install
51
52
USES=		compiler gmake iconv motif tar:xz
49
USES=		compiler gmake iconv motif tar:xz
53
50
54
.include <bsd.port.options.mk>
51
.include <bsd.port.options.mk>
Lines 320-327 Link Here
320
	    ${STAGEDIR}${PREFIX}/openjdk6-fastdebug/jre/lib/${ARCH}
317
	    ${STAGEDIR}${PREFIX}/openjdk6-fastdebug/jre/lib/${ARCH}
321
.endif
318
.endif
322
.endif
319
.endif
323
	@${ECHO_CMD} "#!/bin/sh" > ${PKGDEINSTALL}
324
	@${ECHO_CMD} "#!/bin/sh" > ${PKGINSTALL}
325
.if defined(BUILD_JRE)
320
.if defined(BUILD_JRE)
326
	@cd ${STAGEDIR}${PREFIX}/openjdk6-jre && \
321
	@cd ${STAGEDIR}${PREFIX}/openjdk6-jre && \
327
	    ${FIND} -s . -not -type d | \
322
	    ${FIND} -s . -not -type d | \
Lines 329-336 Link Here
329
	@cd ${STAGEDIR}${PREFIX}/openjdk6-jre && \
324
	@cd ${STAGEDIR}${PREFIX}/openjdk6-jre && \
330
	    ${FIND} -s . -type d -empty | \
325
	    ${FIND} -s . -type d -empty | \
331
	    ${SED} 's,^\./,@dir openjdk6-jre/,' >> ${TMPPLIST}
326
	    ${SED} 's,^\./,@dir openjdk6-jre/,' >> ${TMPPLIST}
332
	@${ECHO_CMD} '${TEST} $$2 = DEINSTALL && ${LOCALBASE}/bin/unregistervm ${PREFIX}/openjdk6-jre/bin/java' >> ${PKGDEINSTALL}
327
	@${ECHO_CMD} '@javawm ${PREFIX}/openjdk6-jre/bin/java' >> ${TMPPLIST}
333
	@${ECHO_CMD} '${TEST} $$2 = POST-INSTALL && ${LOCALBASE}/bin/registervm "${PREFIX}/openjdk6-jre/bin/java # OpenJDK6 JRE"' >> ${PKGINSTALL}
334
.else
328
.else
335
	@cd ${STAGEDIR}${PREFIX}/openjdk6 && \
329
	@cd ${STAGEDIR}${PREFIX}/openjdk6 && \
336
	    ${FIND} -s . -not -type d | \
330
	    ${FIND} -s . -not -type d | \
Lines 338-345 Link Here
338
	@cd ${STAGEDIR}${PREFIX}/openjdk6 && \
332
	@cd ${STAGEDIR}${PREFIX}/openjdk6 && \
339
	    ${FIND} -s . -type d -empty | \
333
	    ${FIND} -s . -type d -empty | \
340
	    ${SED} 's,^\./,@dir openjdk6/,' >> ${TMPPLIST}
334
	    ${SED} 's,^\./,@dir openjdk6/,' >> ${TMPPLIST}
341
	@${ECHO_CMD} '${TEST} $$2 = DEINSTALL && ${LOCALBASE}/bin/unregistervm ${PREFIX}/openjdk6/bin/java' >> ${PKGDEINSTALL}
335
	@${ECHO_CMD} '@javawm ${PREFIX}/openjdk6/bin/java' >> ${TMPPLIST}
342
	@${ECHO_CMD} '${TEST} $$2 = POST-INSTALL && ${LOCALBASE}/bin/registervm "${PREFIX}/openjdk6/bin/java # OpenJDK6"' >> ${PKGINSTALL}
343
.if ${PORT_OPTIONS:MFASTDEBUG}
336
.if ${PORT_OPTIONS:MFASTDEBUG}
344
	@cd ${STAGEDIR}${PREFIX}/openjdk6-fastdebug && \
337
	@cd ${STAGEDIR}${PREFIX}/openjdk6-fastdebug && \
345
	    ${FIND} -s . -not -type d | \
338
	    ${FIND} -s . -not -type d | \
Lines 347-357 Link Here
347
	@cd ${STAGEDIR}${PREFIX}/openjdk6-fastdebug && \
340
	@cd ${STAGEDIR}${PREFIX}/openjdk6-fastdebug && \
348
	    ${FIND} -s . -type d -empty | \
341
	    ${FIND} -s . -type d -empty | \
349
	    ${SED} 's,^\./,@dir openjdk6-fastdebug/,' >> ${TMPPLIST}
342
	    ${SED} 's,^\./,@dir openjdk6-fastdebug/,' >> ${TMPPLIST}
350
	@${ECHO_CMD} '${TEST} $$2 = DEINSTALL && ${LOCALBASE}/bin/unregistervm ${PREFIX}/openjdk6-fastdebug/bin/java' >> ${PKGDEINSTALL}
343
	@${ECHO_CMD} "@javavm ${PREFIX}/openjdk6-fastdebug/bin/java" >> ${TMPPLIST}
351
	@${ECHO_CMD} '${TEST} $$2 = POST-INSTALL && ${LOCALBASE}/bin/registervm "${PREFIX}/openjdk6-fastdebug/bin/java # OpenJDK6"' >> ${PKGINSTALL}
352
.endif
344
.endif
353
.endif
345
.endif
354
	@${ECHO_CMD} "exit 0" >> ${PKGDEINSTALL}
355
	@${ECHO_CMD} "exit 0" >> ${PKGINSTALL}
356
346
357
.include <bsd.port.post.mk>
347
.include <bsd.port.post.mk>
(-)java/openjdk7/Makefile (-2 / +1 lines)
Lines 197-207 Link Here
197
	${INSTALL_DATA} ${FILESDIR}/cacerts \
197
	${INSTALL_DATA} ${FILESDIR}/cacerts \
198
	    ${STAGEDIR}${INSTALLDIR}/lib/security/cacerts
198
	    ${STAGEDIR}${INSTALLDIR}/lib/security/cacerts
199
.endif
199
.endif
200
	@${ECHO} "@unexec ${LOCALBASE}/bin/unregistervm ${INSTALLDIR}/bin/java" >> ${TMPPLIST}
200
	@${ECHO} "@javawm ${INSTALLDIR}/bin/java" >> ${TMPPLIST}
201
	@${FIND} -s ${STAGEDIR}${INSTALLDIR} -not -type d | ${SORT} | \
201
	@${FIND} -s ${STAGEDIR}${INSTALLDIR} -not -type d | ${SORT} | \
202
		${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
202
		${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
203
	@${FIND} ${STAGEDIR}${INSTALLDIR} -type d -empty | ${SORT} -r | \
203
	@${FIND} ${STAGEDIR}${INSTALLDIR} -type d -empty | ${SORT} -r | \
204
		${SED} -e 's,^${STAGEDIR}${PREFIX}/,@dir ,' >> ${TMPPLIST}
204
		${SED} -e 's,^${STAGEDIR}${PREFIX}/,@dir ,' >> ${TMPPLIST}
205
	@${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # ${JAVAVMS_COMMENT}'" >> ${TMPPLIST}
206
205
207
.include <bsd.port.post.mk>
206
.include <bsd.port.post.mk>
(-)java/openjdk8/Makefile (-2 / +1 lines)
Lines 442-450 Link Here
442
	${CHMOD} ${BINMODE} ${JDK_JVMDIR}/jexec ${JDK_JVMDIR}/jspawnhelper
442
	${CHMOD} ${BINMODE} ${JDK_JVMDIR}/jexec ${JDK_JVMDIR}/jspawnhelper
443
	@${ECHO} "@dir ${INSTALLDIR}/lib/applet" >> ${TMPPLIST}
443
	@${ECHO} "@dir ${INSTALLDIR}/lib/applet" >> ${TMPPLIST}
444
.endif
444
.endif
445
	@${ECHO} "@unexec ${LOCALBASE}/bin/unregistervm ${INSTALLDIR}/bin/java" >> ${TMPPLIST}
445
	@${ECHO} "@javawm ${INSTALLDIR}/bin/java" >> ${TMPPLIST}
446
	@${FIND} ${STAGEDIR}${INSTALLDIR} -not -type d | ${SORT} | \
446
	@${FIND} ${STAGEDIR}${INSTALLDIR} -not -type d | ${SORT} | \
447
	    ${SED} -e 's|^${STAGEDIR}${PREFIX}/||' >> ${TMPPLIST}
447
	    ${SED} -e 's|^${STAGEDIR}${PREFIX}/||' >> ${TMPPLIST}
448
	@${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # ${JAVAVMS_COMMENT}'" >> ${TMPPLIST}
449
448
450
.include <bsd.port.post.mk>
449
.include <bsd.port.post.mk>

Return to bug 210313