diff options
author | riggs <riggs@FreeBSD.org> | 2014-09-07 21:37:06 +0800 |
---|---|---|
committer | riggs <riggs@FreeBSD.org> | 2014-09-07 21:37:06 +0800 |
commit | 6c6349aa9acba131d9e30be6a3db2622f0e5c319 (patch) | |
tree | 83a417ab614bcd153650e27e06e9a7b06a38cb75 | |
parent | 6d4ebe7ea496e6b845d4cd7512d7abb25cb99dda (diff) | |
download | freebsd-ports-gnome-6c6349aa9acba131d9e30be6a3db2622f0e5c319.tar.gz freebsd-ports-gnome-6c6349aa9acba131d9e30be6a3db2622f0e5c319.tar.zst freebsd-ports-gnome-6c6349aa9acba131d9e30be6a3db2622f0e5c319.zip |
- Stagify
- Introduce DOCS option
PR: 193092
Submitted by: turutani@scphys.kyoto-u.ac.jp
-rw-r--r-- | lang/icc/Makefile | 35 | ||||
-rw-r--r-- | lang/icc/pkg-plist | 4 |
2 files changed, 22 insertions, 17 deletions
diff --git a/lang/icc/Makefile b/lang/icc/Makefile index cce96fa59ed0..acaf3e21af14 100644 --- a/lang/icc/Makefile +++ b/lang/icc/Makefile @@ -7,25 +7,24 @@ PORTREVISION= 1 CATEGORIES= lang linux devel MASTER_SITES= DISTNAME= l_cc_pc_${PORTVERSION:C/p.+$//} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} # netchild@FreeBSD.org is willing to review patches and to provide background # infos regarding this port MAINTAINER= ports@FreeBSD.org COMMENT= Intels C/C++ compiler, set up to produce native FreeBSD binaries +EXTRACT_DEPENDS= rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio + PATCHLEVEL= ${PORTVERSION:C/(.+p)(.+)$/pe\2/} -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} .if ${PORTVERSION} != ${PATCHLEVEL} DISTFILES+= ${DISTNAME}_${PATCHLEVEL}${EXTRACT_SUFX} -PATCH_DEPENDS= ${LINUX_BASE_PORT} +PATCH_DEPENDS= ${LINUX_BASE_PORT} .endif -EXTRACT_DEPENDS= rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio - RESTRICTED= Intel forbids any redistribution ONLY_FOR_ARCHS= i386 -CONFLICTS= linux_devtools* USE_LINUX= yes @@ -33,13 +32,14 @@ COMPILERDIR= intel_cc_80 PLIST_SUB= COMPILERDIR=${COMPILERDIR} PATCH_WRKSRC= ${WRKSRC}/opt/${COMPILERDIR} -MAN1= icc.1 -MLINKS= icc.1 icpc.1 +OPTIONS_DEFINE= DOCS + +.include <bsd.port.options.mk> + MANPREFIX= ${PREFIX}/${COMPILERDIR} ICC_SITE= http://www.intel.com/software/products/compilers/ -NO_STAGE= yes .include <bsd.port.pre.mk> EXTRACT_AFTER_ARGS= --exclude cdt-\*.zip \ @@ -51,13 +51,13 @@ EXTRACT_AFTER_ARGS= --exclude cdt-\*.zip \ --exclude \*ia64.rpm \ --exclude flexlm64 -ICCCFGVAL!= ${UNAME} -r | ${SED} -e 's/\..*//' +ICCCFGVAL_CMD= ${UNAME} -r | ${SED} -e 's/\..*//' GCCCOMPATVER= 340 GXXINCLUDE= /usr/include/c++/${GCCCOMPATVER:C/([0-9])([0-9]).+/\1.\2/} -.for file in ${DISTFILES} -.if !exists(${DISTDIR}/${DIST_SUBDIR}/${file}) +.for f in ${DISTFILES} +.if !exists(${DISTDIR}/${DIST_SUBDIR}/${f}) IGNORE= Go to Intel Premier Support \(https://premier.intel.com/\) to obtain ${DISTFILES}. Product updates such as this compiler are posted regularly on Premier Support. You must have a license to obtain access to Premier Support. If you do not already have a license go to ${ICC_SITE} to review licensing options \(evaluation, commercial, and free non-commercial\) and obtain a license. Put ${DISTFILES} into ${DISTDIR} and run make again .endif .endfor @@ -82,7 +82,7 @@ pre-patch: intel-patch @for i in `${CAT} ${FILESDIR}/exclude`; do \ ${RM} -rf ${WRKSRC}/opt/${COMPILERDIR}/$$i; \ done -.if defined(NOPORTDOCS) +.if ! ${PORT_OPTIONS:MDOCS} # Remove docs. @for i in `${CAT} ${FILESDIR}/exclude_noportdocs`; do \ ${RM} -rf ${WRKSRC}/opt/${COMPILERDIR}/$$i; \ @@ -122,7 +122,7 @@ post-patch: .endfor # Provide a more FreeBSD'ish compile environment .for i in icc.cfg icpc.cfg - @${ECHO_CMD} -e "-Qlocation,ld,${PREFIX}/${COMPILERDIR}/bin/ldwrapper\n\n-wr1125\n-we140\n\n-Ulinux\n-U__linux__\n-U__linux\n-U__gnu_linux__\n\n-D__FreeBSD__=${ICCCFGVAL}\n\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} + @${ECHO_CMD} -e "-Qlocation,ld,${PREFIX}/${COMPILERDIR}/bin/ldwrapper\n\n-wr1125\n-we140\n\n-Ulinux\n-U__linux__\n-U__linux\n-U__gnu_linux__\n\n-D__FreeBSD__=$$(${ICCCFGVAL_CMD})\n\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} @${ECHO_CMD} -e "-D__wchar_t=__ct_rune_t\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} @${ECHO_CMD} -e "-restrict\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} @${CHMOD} a-x,g-w ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} @@ -159,12 +159,12 @@ do-build: ${WRKSRC}/opt/${COMPILERDIR}/bin/ldwrapper/ld \ ${FILESDIR}/ld.c # We can't use STRIP_CMD, since we need the FreeBSD one, not the Linux one. - @/usr/bin/strip ${WRKSRC}/opt/${COMPILERDIR}/bin/ldwrapper/ld + @${STRIP_CMD} ${WRKSRC}/opt/${COMPILERDIR}/bin/ldwrapper/ld @${CHMOD} 755 ${WRKSRC}/opt/${COMPILERDIR}/bin/ldwrapper/ld # Make ICC happy with regards to crtbegin.o, crtend.o and libgcc.a which it # expects to find in GXX_ROOT. -.for file in crtbegin.o crtend.o libgcc.a - @cd ${WRKSRC}/opt/${COMPILERDIR}/lib && ${LN} -s /usr/lib/${file} ${file} +.for f in crtbegin.o crtend.o libgcc.a + @cd ${WRKSRC}/opt/${COMPILERDIR}/lib && ${LN} -s /usr/lib/${f} ${f} .endfor # The static linking case expects a crtbeginT.o. Based upon inspection of # /usr/src/contrib/gnu/crtstuff.c it seems it's the same as crtbegin.o. @@ -172,9 +172,10 @@ do-build: do-install: @cd ${WRKSRC}/opt && ${FIND} . -print | \ - ${CPIO} -pdu -R ${BINOWN}:${BINGRP} --quiet ${PREFIX} + ${CPIO} -pdu --quiet ${STAGEDIR}${PREFIX} post-install: + @${LN} -sf icc.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/icpc.1.gz @${ECHO} "${PKGNAME} is now installed in ${PREFIX}/${COMPILERDIR}, to use it you have to put your license into your \$${INTEL_FLEXLM_LICENSE} (default: ${PREFIX}/${COMPILERDIR}/licenses) directory and add ${PREFIX}/${COMPILERDIR}/bin to your PATH." | fmt @${ECHO} @${ECHO} "WARNING: If you use icc while having linux_devtools installed, icc will use the wrong includes and therefore will generate non-working binaries!" | fmt diff --git a/lang/icc/pkg-plist b/lang/icc/pkg-plist index cfc34c58f1a2..8b0ead84eca8 100644 --- a/lang/icc/pkg-plist +++ b/lang/icc/pkg-plist @@ -1,3 +1,5 @@ +@owner bin +@group bin %%COMPILERDIR%%/bin/Errormatch.txt %%COMPILERDIR%%/bin/codecov %%COMPILERDIR%%/bin/icc @@ -943,6 +945,8 @@ %%COMPILERDIR%%/licenses/clicense %%COMPILERDIR%%/licenses/credist.txt %%COMPILERDIR%%/licenses/lgpltext +%%COMPILERDIR%%/man/man1/icc.1.gz +%%COMPILERDIR%%/man/man1/icpc.1.gz @unexec rmdir %D/%%COMPILERDIR%%/licenses >/dev/null 2>&1 || echo '*** License directory (%D/%%COMPILERDIR%%/licenses/) not removed, it may contain a license.' @dirrm %%COMPILERDIR%%/man/man1 @dirrm %%COMPILERDIR%%/man |