aboutsummaryrefslogtreecommitdiffstats
path: root/java/openjdk8/Makefile
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2014-05-03 02:00:49 +0800
committerjkim <jkim@FreeBSD.org>2014-05-03 02:00:49 +0800
commit32d7b57cb6f3b8c0d4dfd763f50e06bba93d888c (patch)
tree0b256756b61013f4c381312df211b920350461b8 /java/openjdk8/Makefile
parentd2a2b17eaf3aaff0dd25dbdca6750e911a2d0bf7 (diff)
downloadfreebsd-ports-gnome-32d7b57cb6f3b8c0d4dfd763f50e06bba93d888c.tar.gz
freebsd-ports-gnome-32d7b57cb6f3b8c0d4dfd763f50e06bba93d888c.tar.zst
freebsd-ports-gnome-32d7b57cb6f3b8c0d4dfd763f50e06bba93d888c.zip
Add a slave port to create JRE-only package for java/openjdk8.
Diffstat (limited to 'java/openjdk8/Makefile')
-rw-r--r--java/openjdk8/Makefile59
1 files changed, 42 insertions, 17 deletions
diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile
index ac0129d7c9a7..d7fcc053c155 100644
--- a/java/openjdk8/Makefile
+++ b/java/openjdk8/Makefile
@@ -2,17 +2,17 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}
-PORTREVISION= 4
+PORTREVISION?= 4
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/:jdk \
https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \
LOCAL/jkim:jdk,jtreg
-PKGNAMESUFFIX= ${JDK_MAJOR_VERSION}
+PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION}
DISTNAME= ${PORTNAME}-${JDK_MAJOR_VERSION}-src-b132-03_mar_2014
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:jdk
MAINTAINER= java@FreeBSD.org
-COMMENT= Java Development Kit ${JDK_MAJOR_VERSION}
+COMMENT?= Java Development Kit ${JDK_MAJOR_VERSION}
LICENSE= GPLv2
@@ -48,9 +48,14 @@ MAKE_ENV+= CLASSPATH="" JAVA_HOME="" LD_LIBRARY_PATH="" MAKEFLAGS=""
MAKE_ENV+= IGNORE_OLD_CONFIG=true
JDK_BUILDDIR= ${WRKSRC}/build/${JDK_OSARCH}-normal-server-${JDK_BUILD_TYPE}
+.if !defined(BUILD_JRE)
JDK_IMAGEDIR= ${JDK_BUILDDIR}/images/j2sdk-image
+JRE_IMAGEDIR= ${JDK_BUILDDIR}/images/j2sdk-image/jre
+.else
+JRE_IMAGEDIR= ${JDK_BUILDDIR}/images/j2re-image
+.endif
JDK_OSARCH= bsd-${ARCH:S/i386/x86/:S/amd64/x86_64/}
-INSTALLDIR= ${PREFIX}/${PORTNAME}${JDK_MAJOR_VERSION}
+INSTALLDIR= ${PREFIX}/${PKGBASE}
NO_CCACHE= yes
NOPRECIOUSMAKEVARS= yes
@@ -83,24 +88,32 @@ CONFIGURE_ARGS+= --disable-ccache \
CONFIGURE_SCRIPT= ../../configure
CONFIGURE_WRKSRC= ${WRKSRC}/common/autoconf
-OPTIONS_DEFINE= POLICY TEST TZUPDATE
-OPTIONS_DEFAULT= POLICY RELEASE TZUPDATE
+OPTIONS_DEFINE= POLICY TZUPDATE
+OPTIONS_DEFAULT= POLICY TZUPDATE
+POLICY_DESC= Install the Unlimited Strength Policy Files
+TZUPDATE_DESC= Update the time zone data
+
+POLICY_CONFIGURE_ENABLE=unlimited-crypto
+TZUPDATE_RUN_DEPENDS= ${LOCALBASE}/share/java/zi:${PORTSDIR}/java/java-zoneinfo
+
+.if !defined(BUILD_JRE)
+OPTIONS_DEFINE+= TEST
+OPTIONS_DEFAULT+= RELEASE
OPTIONS_SINGLE= BUILD
OPTIONS_SINGLE_BUILD= DEBUG DEBUGFAST RELEASE
BUILD_DESC= Select OpenJDK build type
DEBUG_DESC= Build for debugging (without optimizations)
DEBUGFAST_DESC= Build for debugging (with optimizations)
-POLICY_DESC= Install the Unlimited Strength Policy Files
RELEASE_DESC= Build for release (default)
TEST_DESC= Run regression tests
-TZUPDATE_DESC= Update the time zone data
-POLICY_CONFIGURE_ENABLE=unlimited-crypto
RELEASE_CONFIGURE_ON= --disable-debug-symbols
TEST_ALL_TARGET= test
TEST_CONFIGURE_ON= --with-jtreg=${WRKDIR}/jtreg
TEST_DISTFILES= jtreg${JTREG_VERSION}-${JTREG_BUILD_NUMBER}.tar.gz:jtreg
-TZUPDATE_RUN_DEPENDS= ${LOCALBASE}/share/java/zi:${PORTSDIR}/java/java-zoneinfo
+.else
+CONFIGURE_ARGS+= --disable-debug-symbols
+.endif
.include <bsd.port.options.mk>
@@ -108,7 +121,7 @@ TZUPDATE_RUN_DEPENDS= ${LOCALBASE}/share/java/zi:${PORTSDIR}/java/java-zoneinfo
JDK_BUILD_TYPE= slowdebug
.elif ${PORT_OPTIONS:MDEBUGFAST}
JDK_BUILD_TYPE= fastdebug
-.elif ${PORT_OPTIONS:MRELEASE}
+.else
JDK_BUILD_TYPE= release
.endif
@@ -189,33 +202,45 @@ post-patch:
@${CHMOD} 755 ${WRKSRC}/configure
post-build:
+.if !defined(BUILD_JRE)
@${JDK_IMAGEDIR}/bin/jar cfe \
- ${JDK_IMAGEDIR}/jre/lib/compilefontconfig.jar \
+ ${JRE_IMAGEDIR}/lib/compilefontconfig.jar \
build.tools.compilefontconfig.CompileFontConfig \
-C ${JDK_BUILDDIR}/jdk/btclasses build/tools/compilefontconfig
@${JDK_IMAGEDIR}/bin/jar cfe \
- ${JDK_IMAGEDIR}/jre/lib/javazic.jar \
+ ${JRE_IMAGEDIR}/lib/javazic.jar \
build.tools.tzdb.TzdbZoneRulesCompiler \
-C ${JDK_BUILDDIR}/jdk/btclasses build/tools/tzdb
+.endif
.if ${PORT_OPTIONS:MTZUPDATE}
@# Update time zones
- @${RM} -rf ${JDK_IMAGEDIR}/jre/lib/zi
- @${LN} -sf ${LOCALBASE}/share/java/zi ${JDK_IMAGEDIR}/jre/lib
+ @${RM} -rf ${JRE_IMAGEDIR}/lib/zi
+ @${LN} -sf ${LOCALBASE}/share/java/zi ${JRE_IMAGEDIR}/lib
.endif
do-install:
@${MKDIR} ${STAGEDIR}${INSTALLDIR}
- @cd ${JDK_IMAGEDIR} && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${INSTALLDIR}
+.if !defined(BUILD_JRE)
+ @cd ${JDK_IMAGEDIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${INSTALLDIR}
@cd ${STAGEDIR}${INSTALLDIR} && \
${FIND} bin jre/bin -type f -exec ${CHMOD} ${BINMODE} {} \; && \
${CHMOD} ${BINMODE} jre/lib/${ARCH}/jexec \
jre/lib/${ARCH}/jspawnhelper lib/${ARCH}/jexec
+.else
+ @cd ${JRE_IMAGEDIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${INSTALLDIR}
+ @cd ${STAGEDIR}${INSTALLDIR} && \
+ ${FIND} bin -type f -exec ${CHMOD} ${BINMODE} {} \; && \
+ ${CHMOD} ${BINMODE} lib/${ARCH}/jexec lib/${ARCH}/jspawnhelper
+.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 | ${SORT} -r | \
${SED} -e 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
+.if !defined(BUILD_JRE)
@${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # OpenJDK${JDK_MAJOR_VERSION}'" >> ${TMPPLIST}
+.else
+ @${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # OpenJDK${JDK_MAJOR_VERSION} JRE'" >> ${TMPPLIST}
+.endif
.include <bsd.port.post.mk>