mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
Support stage
Use options helpers Modernise LIB_DEPENDS use pax instead of copytree_share to install, this allows preserving the modes and thus avoid playing with ${CHMOD}
This commit is contained in:
parent
fb5ec762ee
commit
da20543449
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=350419
@ -26,7 +26,7 @@ LICENSE= GPLv2
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
|
||||
USES= iconv gmake zip
|
||||
USES= dos2unix iconv gmake zip
|
||||
USE_XORG+= x11 xext xi xrender xt xtst
|
||||
MAKE_ARGS= CC=${CC} CXX=${CXX} HOST_CC=${CC}
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
@ -52,15 +52,15 @@ ANT_DISTFILE= apache-ant-${ANT_VERSION}-bin
|
||||
|
||||
LATEST_LINK= openjdk7
|
||||
|
||||
LIB_DEPENDS+= freetype:${PORTSDIR}/print/freetype2 \
|
||||
asound:${PORTSDIR}/audio/alsa-lib
|
||||
LIB_DEPENDS+= libfreetype.so:${PORTSDIR}/print/freetype2 \
|
||||
libasound.so:${PORTSDIR}/audio/alsa-lib
|
||||
BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip \
|
||||
${UNZIP_CMD}:${PORTSDIR}/archivers/unzip \
|
||||
${LOCALBASE}/include/cups/cups.h:${PORTSDIR}/print/cups-client
|
||||
RUN_DEPENDS+= javavm:${PORTSDIR}/java/javavmwrapper \
|
||||
${LOCALBASE}/lib/X11/fonts/dejavu:${PORTSDIR}/x11-fonts/dejavu
|
||||
|
||||
USE_DOS2UNIX= jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties
|
||||
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}
|
||||
@ -103,22 +103,12 @@ BOOTSTRAP_JDKS= ${LOCALBASE}/openjdk7 \
|
||||
${LOCALBASE}/openjdk6 \
|
||||
${LOCALBASE}/bootstrap-openjdk
|
||||
|
||||
NO_STAGE= yes
|
||||
DEBUG_MAKE_ENV= ALT_OBJCOPY="/nonexistent"
|
||||
POLICY_MAKE_ENV= UNLIMITED_CRYPTO=1
|
||||
TZUPDATE_RUN_DEPENDS= ${LOCALBASE}/share/java/zi:${PORTSDIR}/java/java-zoneinfo
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if empty(PORT_OPTIONS:MDEBUG)
|
||||
MAKE_ENV+= ALT_OBJCOPY="/nonexistent"
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MPOLICY}
|
||||
MAKE_ENV+= UNLIMITED_CRYPTO=1
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MTZUPDATE}
|
||||
RUN_DEPENDS+= ${LOCALBASE}/share/java/zi:${PORTSDIR}/java/java-zoneinfo
|
||||
.endif
|
||||
|
||||
# do we have valid native jdk installed?
|
||||
.for BJDK in ${BOOTSTRAP_JDKS}
|
||||
. if !defined(BOOTSTRAPJDKDIR) && exists(${BJDK}/bin/javac)
|
||||
@ -132,11 +122,6 @@ BOOTSTRAPJDKDIR?= ${LOCALBASE}/bootstrap-openjdk
|
||||
BUILD_DEPENDS+= ${BOOTSTRAPJDKDIR}/bin/javac:${PORTSDIR}/java/bootstrap-openjdk
|
||||
.endif
|
||||
|
||||
.if ${OSVERSION} < 800000
|
||||
PATCH_DEPENDS+= gpatch:${PORTSDIR}/devel/patch
|
||||
PATCH= gpatch
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if empty(ICONV_LIB)
|
||||
@ -163,26 +148,16 @@ pre-install:
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${INSTALLDIR}
|
||||
@${MKDIR} ${STAGEDIR}${INSTALLDIR}
|
||||
@cd ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image && \
|
||||
${COPYTREE_SHARE} . ${INSTALLDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/compilefontconfig.jar ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/javazic.jar ${INSTALLDIR}/jre/lib/
|
||||
@for dir in `${FIND} ${INSTALLDIR} -name bin -type d`; do \
|
||||
${CHOWN} -h -R ${BINOWN}:${BINGRP} $$dir; \
|
||||
${FIND} $$dir -type f -exec ${CHMOD} ${BINMODE} "{}" \; ; \
|
||||
done
|
||||
@${CHOWN} ${BINOWN}:${BINGRP} ${INSTALLDIR}/jre/lib/${ARCH}/jexec
|
||||
@${CHMOD} ${BINMODE} ${INSTALLDIR}/jre/lib/${ARCH}/jexec
|
||||
@${INSTALL_DATA} ${FILESDIR}/cacerts ${INSTALLDIR}/jre/lib/security/cacerts
|
||||
${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
|
||||
@${ECHO} "@unexec ${LOCALBASE}/bin/unregistervm ${INSTALLDIR}/bin/java" >> ${TMPPLIST}
|
||||
@${FIND} -s ${INSTALLDIR} -not -type d | ${SORT} | \
|
||||
${SED} -e 's#^${PREFIX}/##' >> ${TMPPLIST}
|
||||
@${FIND} ${INSTALLDIR} -type d | ${SORT} -r | \
|
||||
${SED} -e 's,^${PREFIX}/,@dirrm ,' >> ${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}
|
||||
@${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # OpenJDK${JDK_MAJOR_VERSION}'" >> ${TMPPLIST}
|
||||
|
||||
post-install:
|
||||
# Register the VM
|
||||
"${LOCALBASE}/bin/registervm" "${INSTALLDIR}/bin/java # OpenJDK${JDK_MAJOR_VERSION}"
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user