diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-07-02 19:28:38 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-07-02 19:28:38 +0000 |
commit | 5dffa0a5baa32ed014bcac50f19e8a4d9cd55c35 (patch) | |
tree | 33c9c1257db44eb530e94dcd83b0f6358862e9d1 /java | |
parent | Use sysctl(3) instead of procfs(5) when we need executable path from PID. (diff) |
Add a slave port to create JRE-only package for java/openjdk7.
Notes
Notes:
svn path=/head/; revision=391181
Diffstat (limited to 'java')
-rw-r--r-- | java/Makefile | 1 | ||||
-rw-r--r-- | java/openjdk7-jre/Makefile | 11 | ||||
-rw-r--r-- | java/openjdk7/Makefile | 46 |
3 files changed, 48 insertions, 10 deletions
diff --git a/java/Makefile b/java/Makefile index 249def83b97b..77a0b810c888 100644 --- a/java/Makefile +++ b/java/Makefile @@ -100,6 +100,7 @@ SUBDIR += openjdk6 SUBDIR += openjdk6-jre SUBDIR += openjdk7 + SUBDIR += openjdk7-jre SUBDIR += openjdk8 SUBDIR += openjdk8-jre SUBDIR += phpeclipse diff --git a/java/openjdk7-jre/Makefile b/java/openjdk7-jre/Makefile new file mode 100644 index 000000000000..e52fd2626ccb --- /dev/null +++ b/java/openjdk7-jre/Makefile @@ -0,0 +1,11 @@ +# $FreeBSD$ + +PKGNAMESUFFIX= -jre + +MAINTAINER= java@FreeBSD.org +COMMENT= Java Runtime Environment ${JDK_MAJOR_VERSION} + +BUILD_JRE= yes +MASTERDIR= ${.CURDIR}/../openjdk7 + +.include "${MASTERDIR}/Makefile" diff --git a/java/openjdk7/Makefile b/java/openjdk7/Makefile index 4d755b12474f..2252f9c19344 100644 --- a/java/openjdk7/Makefile +++ b/java/openjdk7/Makefile @@ -19,8 +19,8 @@ DISTFILES= ${JDK_SRC_DISTFILE}${EXTRACT_SUFX} \ EXTRACT_ONLY= ${JDK_SRC_DISTFILE}${EXTRACT_SUFX} \ ${ANT_DISTFILE}${EXTRACT_SUFX} -MAINTAINER= glewis@FreeBSD.org -COMMENT= Java Development Kit 7 +MAINTAINER?= glewis@FreeBSD.org +COMMENT?= Java Development Kit 7 LICENSE= GPLv2 @@ -30,12 +30,22 @@ USES= compiler dos2unix iconv gmake zip USE_XORG+= x11 xext xi xrender xt xtst MAKE_ARGS= CC=${CC:Q} CXX=${CXX:Q} HOST_CC=${CC:Q} -OPTIONS_DEFINE= DEBUG POLICY TZUPDATE +OPTIONS_DEFINE= POLICY TZUPDATE OPTIONS_DEFAULT= POLICY TZUPDATE DEBUG_DESC= Enable extra debugging info POLICY_DESC= Install the Unlimited Strength Policy Files TZUPDATE_DESC= Update the time zone data +JAVAVMS_COMMENT= OpenJDK${JDK_MAJOR_VERSION} + +.if !defined(BUILD_JRE) +OPTIONS_DEFINE+= DEBUG +INSTALLDIR= ${PREFIX}/${PORTNAME}${JDK_MAJOR_VERSION} +.else +JAVAVMS_COMMENT+= JRE +INSTALLDIR= ${PREFIX}/${PORTNAME}${JDK_MAJOR_VERSION}-jre +.endif + PORT_MINOR_VERSION= 80 PORT_BUILD_NUMBER= 15 JDK_MAJOR_VERSION= 7 @@ -62,7 +72,6 @@ RUN_DEPENDS+= javavm:${PORTSDIR}/java/javavmwrapper \ DOS2UNIX_FILES= jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties OPENJDK_OSARCH= bsd-${ARCH:S/i386/i586/} -INSTALLDIR= ${PREFIX}/${PORTNAME}${JDK_MAJOR_VERSION} NOPRECIOUSMAKEVARS= yes @@ -149,22 +158,39 @@ post-patch: .if ${PORT_OPTIONS:MTZUPDATE} pre-install: @# Update time zones +.if !defined(BUILD_JRE) @${RM} -rf ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre/lib/zi @${LN} -s -f ${LOCALBASE}/share/java/zi \ - ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre/lib + ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre/lib +.else + @${RM} -rf ${WRKSRC}/build/${OPENJDK_OSARCH}/j2re-image/lib/zi + @${LN} -s -f ${LOCALBASE}/share/java/zi \ + ${WRKSRC}/build/${OPENJDK_OSARCH}/j2re-image/lib +.endif .endif do-install: @${MKDIR} ${STAGEDIR}${INSTALLDIR} - @cd ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image && \ - ${PAX} -rw . ${STAGEDIR}${INSTALLDIR} - @${INSTALL_DATA} ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/compilefontconfig.jar ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/javazic.jar ${STAGEDIR}${INSTALLDIR}/jre/lib/ - @${INSTALL_DATA} ${FILESDIR}/cacerts ${STAGEDIR}${INSTALLDIR}/jre/lib/security/cacerts +.if !defined(BUILD_JRE) + cd ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image && \ + ${PAX} -rw . ${STAGEDIR}${INSTALLDIR} + ${INSTALL_DATA} \ + ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/compilefontconfig.jar \ + ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/javazic.jar \ + ${STAGEDIR}${INSTALLDIR}/jre/lib/ + ${INSTALL_DATA} ${FILESDIR}/cacerts \ + ${STAGEDIR}${INSTALLDIR}/jre/lib/security/cacerts +.else + cd ${WRKSRC}/build/${OPENJDK_OSARCH}/j2re-image && \ + ${PAX} -rw . ${STAGEDIR}${INSTALLDIR} + ${INSTALL_DATA} ${FILESDIR}/cacerts \ + ${STAGEDIR}${INSTALLDIR}/lib/security/cacerts +.endif @${ECHO} "@unexec ${LOCALBASE}/bin/unregistervm ${INSTALLDIR}/bin/java" >> ${TMPPLIST} @${FIND} -s ${STAGEDIR}${INSTALLDIR} -not -type d | ${SORT} | \ ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} @${FIND} ${STAGEDIR}${INSTALLDIR} -type d -empty | ${SORT} -r | \ ${SED} -e 's,^${STAGEDIR}${PREFIX}/,@dir ,' >> ${TMPPLIST} - @${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # OpenJDK${JDK_MAJOR_VERSION}'" >> ${TMPPLIST} + @${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # ${JAVAVMS_COMMENT}'" >> ${TMPPLIST} .include <bsd.port.post.mk> |