- Sanitize user, group and permission. Inspired by openjdk7.
- Add a slave port to create JRE-only package.
This commit is contained in:
parent
3cb75a18a9
commit
02cfcdf497
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=305596
3 changed files with 73 additions and 10 deletions
|
@ -137,6 +137,7 @@
|
||||||
SUBDIR += netrexx
|
SUBDIR += netrexx
|
||||||
SUBDIR += netty
|
SUBDIR += netty
|
||||||
SUBDIR += openjdk6
|
SUBDIR += openjdk6
|
||||||
|
SUBDIR += openjdk6-jre
|
||||||
SUBDIR += openjdk7
|
SUBDIR += openjdk7
|
||||||
SUBDIR += phpeclipse
|
SUBDIR += phpeclipse
|
||||||
SUBDIR += poseidon
|
SUBDIR += poseidon
|
||||||
|
|
13
java/openjdk6-jre/Makefile
Normal file
13
java/openjdk6-jre/Makefile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
PORTREVISION= 0
|
||||||
|
CATEGORIES= java devel
|
||||||
|
PKGNAMESUFFIX= -jre
|
||||||
|
|
||||||
|
COMMENT= Oracle's Java 6 Runtime Environment under the GPL v2
|
||||||
|
|
||||||
|
BUILD_JRE= yes
|
||||||
|
MASTERDIR= ${.CURDIR}/../openjdk6
|
||||||
|
UNIQUENAME= ${PORTNAME}${PKGNAMESUFFIX}
|
||||||
|
|
||||||
|
.include "${MASTERDIR}/Makefile"
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
PORTNAME= openjdk6
|
PORTNAME= openjdk6
|
||||||
PORTVERSION= b25
|
PORTVERSION= b25
|
||||||
PORTREVISION= 3
|
PORTREVISION?= 4
|
||||||
CATEGORIES= java devel
|
CATEGORIES= java devel
|
||||||
MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
|
MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
|
||||||
http://download.java.net/jaxp/openjdk/jdk6/:jaxp \
|
http://download.java.net/jaxp/openjdk/jdk6/:jaxp \
|
||||||
|
@ -26,7 +26,7 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
||||||
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} ${ANTFILE}
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} ${ANTFILE}
|
||||||
|
|
||||||
MAINTAINER= java@FreeBSD.org
|
MAINTAINER= java@FreeBSD.org
|
||||||
COMMENT= Oracle's Java 6 virtual machine release under the GPL v2
|
COMMENT?= Oracle's Java 6 virtual machine release under the GPL v2
|
||||||
|
|
||||||
LICENSE= GPLv2
|
LICENSE= GPLv2
|
||||||
|
|
||||||
|
@ -39,18 +39,22 @@ RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper \
|
||||||
|
|
||||||
OPENJDK_BUILDDATE= 01_may_2012
|
OPENJDK_BUILDDATE= 01_may_2012
|
||||||
|
|
||||||
.include <bsd.port.options.mk>
|
OPTIONS_DEFINE= ICEDTEA IPV6 POLICY SOUND TZUPDATE
|
||||||
|
|
||||||
OPTIONS_DEFINE= DEBUG FASTDEBUG ICEDTEA IPV6 POLICY SOUND TEST TZUPDATE
|
|
||||||
OPTIONS_DEFAULT=ICEDTEA TZUPDATE
|
OPTIONS_DEFAULT=ICEDTEA TZUPDATE
|
||||||
DEBUG_DESC= Enable legacy debugging support
|
|
||||||
FASTDEBUG_DESC= Include fastdebug build
|
|
||||||
ICEDTEA_DESC= Apply additional patches from IcedTea
|
ICEDTEA_DESC= Apply additional patches from IcedTea
|
||||||
POLICY_DESC= Install the Unlimited Strength Policy Files
|
POLICY_DESC= Install the Unlimited Strength Policy Files
|
||||||
SOUND_DESC= Enable sound support
|
SOUND_DESC= Enable sound support
|
||||||
TEST_DESC= Add support for running regression test
|
|
||||||
TZUPDATE_DESC= Update the time zone data
|
TZUPDATE_DESC= Update the time zone data
|
||||||
|
|
||||||
|
.if !defined(BUILD_JRE)
|
||||||
|
OPTIONS_DEFINE+=DEBUG FASTDEBUG TEST
|
||||||
|
DEBUG_DESC= Enable legacy debugging support
|
||||||
|
FASTDEBUG_DESC= Include fastdebug build
|
||||||
|
TEST_DESC= Add support for running regression test
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.include <bsd.port.options.mk>
|
||||||
|
|
||||||
# java extracts directly to the cwd
|
# java extracts directly to the cwd
|
||||||
WRKSRC= ${WRKDIR}
|
WRKSRC= ${WRKDIR}
|
||||||
|
|
||||||
|
@ -255,10 +259,16 @@ post-patch:
|
||||||
post-build:
|
post-build:
|
||||||
.if ${PORT_OPTIONS:MTZUPDATE}
|
.if ${PORT_OPTIONS:MTZUPDATE}
|
||||||
@# Update time zones
|
@# Update time zones
|
||||||
|
.if defined(BUILD_JRE)
|
||||||
|
@${RM} -rf ${WRKSRC}/build/${OPENJDK_OSARCH}/j2re-image/lib/zi
|
||||||
|
@${LN} -s -f ${LOCALBASE}/share/java/zi \
|
||||||
|
${WRKSRC}/build/${OPENJDK_OSARCH}/j2re-image/lib
|
||||||
|
.else
|
||||||
@${RM} -rf ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre/lib/zi
|
@${RM} -rf ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre/lib/zi
|
||||||
@${LN} -s -f ${LOCALBASE}/share/java/zi \
|
@${LN} -s -f ${LOCALBASE}/share/java/zi \
|
||||||
${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre/lib
|
${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre/lib
|
||||||
.endif
|
.endif
|
||||||
|
.endif
|
||||||
.if ${PORT_OPTIONS:MTEST}
|
.if ${PORT_OPTIONS:MTEST}
|
||||||
@${ECHO_MSG} ""
|
@${ECHO_MSG} ""
|
||||||
@${ECHO_MSG} "Run \"make test\" to execute regression test (it could take a few hours to complete)."
|
@${ECHO_MSG} "Run \"make test\" to execute regression test (it could take a few hours to complete)."
|
||||||
|
@ -282,12 +292,46 @@ test: build-depends build
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
do-install:
|
do-install:
|
||||||
|
.if defined(BUILD_JRE)
|
||||||
|
@${MKDIR} ${PREFIX}/openjdk6-jre/
|
||||||
|
@cd ${WRKSRC}/build/${OPENJDK_OSARCH}/j2re-image && \
|
||||||
|
${COPYTREE_SHARE} . ${PREFIX}/openjdk6-jre
|
||||||
|
@${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/openjdk6-jre/bin/* \
|
||||||
|
${PREFIX}/openjdk6-jre/lib/${ARCH}/jexec
|
||||||
|
@${CHMOD} ${BINMODE} ${PREFIX}/openjdk6-jre/bin/* \
|
||||||
|
${PREFIX}/openjdk6-jre/lib/${ARCH}/jexec
|
||||||
|
@${ECHO_MSG} "@unexec ${LOCALBASE}/bin/unregistervm ${PREFIX}/openjdk6-jre/bin/java" >> ${TMPPLIST}
|
||||||
|
@${FIND} -s ${PREFIX}/openjdk6-jre -not -type d | \
|
||||||
|
${SED} -e 's#^${PREFIX}/##' >> ${TMPPLIST}
|
||||||
|
@${ECHO} "@exec mkdir ${PREFIX}/openjdk6-jre/lib/applet" >> ${TMPPLIST}
|
||||||
|
@${FIND} ${PREFIX}/openjdk6-jre -type d | ${SORT} -r | \
|
||||||
|
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
||||||
|
@${ECHO_MSG} "@exec ${LOCALBASE}/bin/registervm '${PREFIX}/openjdk6-jre/bin/java # OpenJDK6 JRE'" >> ${TMPPLIST}
|
||||||
|
.else
|
||||||
@${MKDIR} ${PREFIX}/openjdk6/
|
@${MKDIR} ${PREFIX}/openjdk6/
|
||||||
@${CP} -Rp ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/ ${PREFIX}/openjdk6/
|
@cd ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image && \
|
||||||
|
${COPYTREE_SHARE} . ${PREFIX}/openjdk6
|
||||||
@${INSTALL_DATA} ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/compilefontconfig.jar ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/javazic.jar ${PREFIX}/openjdk6/jre/lib/
|
@${INSTALL_DATA} ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/compilefontconfig.jar ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/javazic.jar ${PREFIX}/openjdk6/jre/lib/
|
||||||
|
@for dir in `${FIND} ${PREFIX}/openjdk6 -name bin -type d`; do \
|
||||||
|
${CHOWN} -h -R ${BINOWN}:${BINGRP} $$dir; \
|
||||||
|
${FIND} $$dir -type f -exec ${CHMOD} ${BINMODE} "{}" \; ; \
|
||||||
|
done
|
||||||
|
@${CHOWN} ${BINOWN}:${BINGRP} \
|
||||||
|
${PREFIX}/openjdk6/jre/lib/${ARCH}/jexec
|
||||||
|
@${CHMOD} ${BINMODE} \
|
||||||
|
${PREFIX}/openjdk6/jre/lib/${ARCH}/jexec
|
||||||
.if ${PORT_OPTIONS:MFASTDEBUG}
|
.if ${PORT_OPTIONS:MFASTDEBUG}
|
||||||
@${MKDIR} ${PREFIX}/openjdk6-fastdebug/
|
@${MKDIR} ${PREFIX}/openjdk6-fastdebug/
|
||||||
@${CP} -Rp ${WRKSRC}/build/${OPENJDK_OSARCH}-fastdebug/j2sdk-image/ ${PREFIX}/openjdk6-fastdebug/
|
@cd ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image && \
|
||||||
|
${COPYTREE_SHARE} . ${PREFIX}/openjdk6-fastdebug
|
||||||
|
@for dir in `${FIND} ${PREFIX}/openjdk6-fastdebug -name bin -type d`; do \
|
||||||
|
${CHOWN} -h -R ${BINOWN}:${BINGRP} $$dir; \
|
||||||
|
${FIND} $$dir -type f -exec ${CHMOD} ${BINMODE} "{}" \; ; \
|
||||||
|
done
|
||||||
|
@${CHOWN} ${BINOWN}:${BINGRP} \
|
||||||
|
${PREFIX}/openjdk6-fastdebug/jre/lib/${ARCH}/jexec
|
||||||
|
@${CHMOD} ${BINMODE} \
|
||||||
|
${PREFIX}/openjdk6-fastdebug/jre/lib/${ARCH}/jexec
|
||||||
.endif
|
.endif
|
||||||
@${ECHO_MSG} "@unexec ${LOCALBASE}/bin/unregistervm ${PREFIX}/openjdk6/bin/java" >> ${TMPPLIST}
|
@${ECHO_MSG} "@unexec ${LOCALBASE}/bin/unregistervm ${PREFIX}/openjdk6/bin/java" >> ${TMPPLIST}
|
||||||
@${FIND} -s ${PREFIX}/openjdk6 -not -type d | \
|
@${FIND} -s ${PREFIX}/openjdk6 -not -type d | \
|
||||||
|
@ -305,10 +349,15 @@ do-install:
|
||||||
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
||||||
@${ECHO_MSG} "@exec ${LOCALBASE}/bin/registervm '${PREFIX}/openjdk6-fastdebug/bin/java # OpenJDK6'" >> ${TMPPLIST}
|
@${ECHO_MSG} "@exec ${LOCALBASE}/bin/registervm '${PREFIX}/openjdk6-fastdebug/bin/java # OpenJDK6'" >> ${TMPPLIST}
|
||||||
.endif
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
post-install:
|
post-install:
|
||||||
@# Register the VM
|
@# Register the VM
|
||||||
|
.if defined(BUILD_JRE)
|
||||||
|
@"${LOCALBASE}/bin/registervm" "${PREFIX}/openjdk6-jre/bin/java # OpenJDK6 JRE"
|
||||||
|
.else
|
||||||
@"${LOCALBASE}/bin/registervm" "${PREFIX}/openjdk6/bin/java # OpenJDK6"
|
@"${LOCALBASE}/bin/registervm" "${PREFIX}/openjdk6/bin/java # OpenJDK6"
|
||||||
|
.endif
|
||||||
.if ${PORT_OPTIONS:MFASTDEBUG}
|
.if ${PORT_OPTIONS:MFASTDEBUG}
|
||||||
@"${LOCALBASE}/bin/registervm" "${PREFIX}/openjdk6-fastdebug/bin/java # OpenJDK6"
|
@"${LOCALBASE}/bin/registervm" "${PREFIX}/openjdk6-fastdebug/bin/java # OpenJDK6"
|
||||||
.endif
|
.endif
|
||||||
|
|
Loading…
Reference in a new issue