# New ports collection makefile for: icc # Date created: 24.Jan.2002 # Whom: netchild@FreeBSD.org # # $FreeBSD$ # PORTNAME= icc PORTVERSION= 8.1.036 CATEGORIES= lang linux devel MASTER_SITES= DISTNAME= l_cc_pc_${PORTVERSION:C/p.+$//} MAINTAINER= netchild@FreeBSD.org COMMENT= Intels C/C++ compiler, set up to produce native FreeBSD binaries PATCHLEVEL= ${PORTVERSION:C/(.+p)(.+)$/pe\2/} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} .if ${PORTVERSION} != ${PATCHLEVEL} DISTFILES+= ${DISTNAME}_${PATCHLEVEL}${EXTRACT_SUFX} PATCH_DEPENDS= ${LINUX_BASE_PORT} .endif EXTRACT_DEPENDS= rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio RESTRICTED= Intel forbids any redistribution NO_PACKAGE= ${RESTRICTED} NO_CDROM= ${RESTRICTED} ONLY_FOR_ARCHS= i386 CONFLICTS= linux_devtools* USE_LINUX= yes USE_REINPLACE= yes COMPILERDIR= intel_cc_80 PLIST_SUB= COMPILERDIR=${COMPILERDIR} PATCH_WRKSRC= ${WRKSRC}/opt/${COMPILERDIR} MAN1= icc.1 MLINKS= icc.1 icpc.1 MANPREFIX= ${PREFIX}/${COMPILERDIR}/ ICC_SITE= http://www.intel.com/software/products/compilers/ .include EXTRACT_AFTER_ARGS= | tar -xf - \ --exclude cdt-\*.zip \ --exclude eclipse-platform\*.zip \ --exclude intel-icc_ide\*.rpm \ --exclude intel-iidb\*.rpm \ --exclude intel-isubh\*.rpm \ --exclude sdp-core-\*.zip \ --exclude \*ia64.rpm \ --exclude flexlm64 ICCCFGVAL!= ${UNAME} -r | ${SED} -e 's/\..*//' .if ( ${OSVERSION} < 502108 ) PLIST_SUB+= MACHINE__TYPES_H="@comment " STDARG_H="" SYS_CDEFS_H="" \ STDBOOL_H="" .else PLIST_SUB+= STDARG_H="@comment " SYS_CDEFS_H="@comment " .if ( ${OSVERSION} < 503103 || ( ${OSVERSION} >= 600000 && ${OSVERSION} < 600013 ) ) PLIST_SUB+= MACHINE__TYPES_H="" STDBOOL_H="" .else PLIST_SUB+= MACHINE__TYPES_H="@comment " STDBOOL_H="@comment " .endif .if ${OSVERSION} < 502126 GCCCOMPATVER= 330 .endif .if ${OSVERSION} >= 502126 GCCCOMPATVER= 340 .endif GXXINCLUDE= /usr/include/c++/${GCCCOMPATVER:C/([0-9])([0-9]).+/\1.\2/} .endif .for file in ${DISTFILES} .if !exists(${DISTDIR}/${DIST_SUBDIR}/${file}) 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 .if exists(${LINUXBASE}/boot/kernel.h) BROKEN= Cannot coexist with linux_devtools .endif post-extract: @cd ${WRKSRC} && rpm2cpio.pl 2>/dev/null *.rpm | ${CPIO} -idu --quiet intel-patch: extract # Apply patches from Intel. .if ${PORTVERSION} != ${PATCHLEVEL} @${BRANDELF} -t Linux ${WRKSRC}_${PATCHLEVEL}/papply @${WRKSRC}_${PATCHLEVEL}/papply ${WRKSRC}_${PATCHLEVEL}/icc.rtp \ ${WRKSRC}/opt/${COMPILERDIR} .endif pre-patch: intel-patch # Remove files we do not neet on FreeBSD. @for i in `${CAT} ${FILESDIR}/exclude`; do \ ${RM} -rf ${WRKSRC}/opt/${COMPILERDIR}/$$i; \ done .if defined(NOPORTDOCS) # Remove docs. @for i in `${CAT} ${FILESDIR}/exclude_noportdocs`; do \ ${RM} -rf ${WRKSRC}/opt/${COMPILERDIR}/$$i; \ done .endif # Allow everyone to use it. @${CHMOD} a+rx ${WRKSRC}/opt # Remove unneeded/unsafe access rights. .for i in doc include lib @${FIND} ${WRKSRC}/opt/${COMPILERDIR}/${i} -type f -print0 | \ ${XARGS} -0 ${CHMOD} a-x,og-w .endfor @${FIND} ${WRKSRC}/opt -type d -print0 | ${XARGS} -0 ${CHMOD} go-w @${CHMOD} a-x ${WRKSRC}/opt/${COMPILERDIR}/bin/Errormatch.txt post-patch: # Correct some paths and patch some files .for i in icc iccvars.csh iccvars.sh icpc @${REINPLACE_CMD} -i "" -e 's:%%ICC_LOCALBASE%%:${LOCALBASE}:g; \ s:\:${PREFIX}/${COMPILERDIR}:g; \ s:%%GXX_INCLUDE%%:${GXXINCLUDE}:g; \ s:man -w:manpath -q:g' ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} @${CHMOD} 755 ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endfor .if ${PORTVERSION} != ${PATCHLEVEL} @${REINPLACE_CMD} -i "" -e \ 's:\:${DISTNAME}_${PATCHLEVEL}:g' \ ${WRKSRC}/opt/${COMPILERDIR}/doc/csupport .else @${REINPLACE_CMD} -i "" -e 's:\:${DISTNAME}:g' \ ${WRKSRC}/opt/${COMPILERDIR}/doc/csupport .endif @${RM} ${WRKSRC}/opt/${COMPILERDIR}/include/*.orig @${RM} ${WRKSRC}/opt/${COMPILERDIR}/include/c++/*.orig .for i in icc.orig icpc.orig @${RM} ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .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} .if ( ${OSVERSION} >= 500039 ) @${ECHO_CMD} -e "-D__wchar_t=__ct_rune_t\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endif .if ( ${OSVERSION} >= 502108 ) @${ECHO_CMD} -e "-restrict\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .else @${ECHO_CMD} -e "-no-gcc\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endif @${CHMOD} a-x,g-w ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endfor # C++ hack for icpc .if ( ${OSVERSION} >= 502108 ) @${ECHO_CMD} -e "-gcc-version=${GCCCOMPATVER}\n-cxxlib-gcc\n" \ >>${WRKSRC}/opt/${COMPILERDIR}/bin/icpc.cfg .else @${ECHO_CMD} -e "\n-I${PREFIX}/include/stlport\n-Qoption,ld,-CPLUSPLUS\n" \ >>${WRKSRC}/opt/${COMPILERDIR}/bin/icpc.cfg .endif @cd ${WRKSRC}/opt/${COMPILERDIR}/bin/ && ${LN} -s icc.cfg iccbin.cfg \ && ${LN} -s icpc.cfg icpcbin.cfg .if ( ${OSVERSION} < 502108 ) # Hack while there's no support for ICC in the stdarg.h and sys/cdefs.h. @${CP} ${FILESDIR}/stdarg.h ${WRKSRC}/opt/${COMPILERDIR}/include @${MKDIR} ${WRKSRC}/opt/${COMPILERDIR}/include/sys @${CP} ${FILESDIR}/cdefs.h ${WRKSRC}/opt/${COMPILERDIR}/include/sys .endif .if ( ( ${OSVERSION} >= 502108 && ${OSVERSION} < 503103 ) || ( ${OSVERSION} >= 600000 && ${OSVERSION} < 600013 ) ) # Work around bug for ICC support in src/sys/i386/include/_types.h. @${MKDIR} ${WRKSRC}/opt/${COMPILERDIR}/include/machine @${CP} ${FILESDIR}/_types.h ${WRKSRC}/opt/${COMPILERDIR}/include/machine .endif .if ( ${OSVERSION} < 503103 || ( ${OSVERSION} >= 600000 && ${OSVERSION} < 600013 ) ) # Work around a bug in stdbool.h @${SED} -e 's:__STDC_VERSION__ < 199901L.*:__STDC_VERSION__ < 199901L \&\& defined(__GNUC__) \&\& __GNUC__ < 3 \&\& !defined(__INTEL_COMPILER):g' \ ${WRKSRC}/opt/${COMPILERDIR}/include/stdbool.h .endif .if ( ${OSVERSION} >= 470101 && ${OSVERSION} < 500000 ) || \ ( ${OSVERSION} >= 500042 ) OBJCOPY_OPS= --redefine-sym stdin=__stdinp \ --redefine-sym stdout=__stdoutp \ --redefine-sym stderr=__stderrp .endif do-build: # Use the Linux ABI for the binaries .for i in codecov iccbin iccfilt icpcbin icpi mcpcom prelink profmerge \ proforder profrun pronto_tool tselect xiar xild @${BRANDELF} -t Linux ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endfor # Fix unresolved references @cd ${WRKSRC} && ${CC} ${CFLAGS} -c ${FILESDIR}/assert_fail.c \ ${FILESDIR}/errno_location.c ${FILESDIR}/mcount.S .if ( ${OSVERSION} < 502101 ) @cd ${WRKSRC} && ${CC} ${CFLAGS} -c ${FILESDIR}/cxa_atexit.c .endif .if ( ${OSVERSION} < 470101 ) || \ ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500042 ) @${CC} ${CFLAGS} -c -o ${WRKSRC}/stdin.o ${FILESDIR}/stdin.c @${CC} ${CFLAGS} -c -o ${WRKSRC}/stdout.o ${FILESDIR}/stdout.c @${CC} ${CFLAGS} -c -o ${WRKSRC}/stderr.o ${FILESDIR}/stderr.c .endif .for i in libcxa.a libcxaguard.a libimf.a libirc.a libirc_s.a libsvml.a \ libunwind.a @${OBJCOPY} --redefine-sym __sigsetjmp=sigsetjmp \ ${OBJCOPY_OPS} \ ${WRKSRC}/opt/${COMPILERDIR}/lib/${i} .endfor @${AR} cr ${WRKSRC}/opt/${COMPILERDIR}/lib/libiccfbsd.a ${WRKSRC}/*.o # Some magic to be able to link @${MKDIR} ${WRKSRC}/opt/${COMPILERDIR}/bin/ldwrapper @${CC} ${CFLAGS} -o \ ${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 @${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} .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. @cd ${WRKSRC}/opt/${COMPILERDIR}/lib && ${LN} -s crtbegin.o crtbeginT.o do-install: @cd ${WRKSRC}/opt && ${FIND} . -print | \ ${CPIO} -pdu -R ${BINOWN}:${BINGRP} --quiet ${PREFIX} post-install: @${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} "On FreeBSD 5 with __FreeBSD_version >= 502108 icpc is set up to use the GNU libstdc++ from the base as STL by default. Alternatively you can use the \"-cxxlib-icc\" option with icpc to use devel/stlport-icc as STL instead. In order to be able to compile C++ source with icpc on FreeBSD 4 or FreeBSD 5 with __FreeBSD_version < 502108 you have to install devel/stlport-icc. No further options to icpc to use devel/stlport-icc are required there." | fmt @${ECHO} @${ECHO} "If you use icc on a Pentium 4 you may have to use 'options CPU_ENABLE_SSE' (depending on the OS version, if in doubt try if it works) in your kernel config (have a look at http://www.FreeBSD.org/handbook/ if you do not know how to do this), else icc will hang forever or crashes with an 'Illegal instruction'." | fmt @${ECHO} @${ECHO} "WARNING: If you use icc while having linux_devtools installed, icc will use the wrong includes and therefore will generate bogus (not working) binaries!" | fmt @${ECHO} @${ECHO} "If you encounter further problems with icc please consult the errata at http://support.intel.com/support/performancetools/c/C_Compiler_Errata.htm first." | fmt @${ECHO} @${ECHO} "Call for benchmarks:" @${ECHO} "Intel is interested to see some benchmark numbers which compare gcc with icc. If you have a CPU produced by Intel and are able to do benchmarks with either your own source or with one of our major ports (e.g. with a webserver, a mailserver, a database system, an important graphics suite/program or some important math tool, ...) please try to spend some time to do a benchmark and send me (${MAINTAINER}) the result. You should include your system specs (CPU: speed/model, RAM: amount/speed, used disks (if necessary), chipset/mainboard type, ...), the version of the used software (OS, gcc, icc, ...), non default tuning options (kernel, sysctl) and the used compiler switches. If you don't use some 'standard' benchmark (e.g. the official MySQL benchmark, or the performance test suite of your prefered scripting language), please include a description about the benchmark too." | fmt @${ECHO} @${ECHO} "Please use FreeBSD as the name of your OS in communications with the support, the larger the FreeBSD userbase is, the more work gets done on FreeBSD specific issues by Intel. And please thank them for the FreeBSD support, they are already spending some time to improve icc on FreeBSD." | fmt @${ECHO} @${ECHO} "To read the entire post install message again, just run 'make post-install | less'." | fmt .include h'>* Update to curl-7.19.4, which fixes a redirection vulnerability.roam2009-03-0714-182/+101 * - Use my FreeBSD address on the ports I maintaindhn2009-03-071-1/+1 * Update to 5.2.9 release and re-add pcre extension.ale2009-03-061-1/+0 * --with-largefile is not recommended to be default, so, convert it to OPTION andgarga2009-03-061-3/+9 * Use DIST_SUBDIR because DISTFILE has no version information.demon2009-03-052-3/+4 * Update to version 2.7.demon2009-02-282-3/+3 * - update to 2.1.0dinoex2009-02-252-4/+4 * - The ftp/mirror port's lchat.pl file uses the old pack('S n a4 x8', ...)beech2009-02-232-58/+164 * - Update to 3.2.2.1beech2009-02-233-4/+5 * - Update PORTSCOUTmiwi2009-02-201-1/+1 * Fix following problem:garga2009-02-162-6/+13 * Update to 0.22skv2009-02-153-8/+8 * - Update to 7.19.0miwi2009-02-153-55/+68 * Upgrade to 0.49:brooks2009-02-143-12/+22 * Also mark BROKEN on recent 7 after the MFC of strndup(3).erwin2009-02-121-1/+1 * - Update to 3.2.1beech2009-02-083-4/+40 * - From now on, Joseph S. Atkinson will be mainaining ftp/filezilla andalepulver2009-02-081-1/+1 * - Add required @dirrmtry entries back.alepulver2009-02-061-0/+52 * - Update to 1.3.2 (stable)beech2009-02-062-10/+9 * - Update FileZilla to version 3.2.0.alepulver2009-02-063-100/+272 * - Update download locations, update WWWpgollucci2009-02-042-2/+2 * - Update to 1.11beech2009-02-022-5/+4 * - Update download locations, update WWWpgollucci2009-02-012-7/+2 * Upgrade ftp/wget from 1.11.2 to 1.11.4.vd2009-02-012-5/+4 * - Update to 2.2beech2009-02-012-5/+5 * - Update to 3.7.8beech2009-02-012-13/+11 * - Mark deprecatedbeech2009-02-011-0/+3 * - Update download locationpav2009-02-011-1/+1 * Update to version 2.6.6 (our patches were integrated into the distribution).demon2009-01-305-127/+3 * - Fix distinfobeech2009-01-291-0/+6 * - Default ipv6 to on & bump portrevisionbeech2009-01-292-5/+14 * - Update to 1.3.2rc4beech2009-01-273-16/+25 * Apply a band-aid to fix the build without proxy support.roam2009-01-262-0/+54 * - Update to 2.2beech2009-01-253-8/+9 * Bump the version of the curl shared library after the ftp/curl updateroam2009-01-239-10/+15 * At long last, update the curl port to its almost-current version, 7.19.2.roam2009-01-2322-1463/+91 * - Fix pkg-install call script from the Makefiledinoex2009-01-173-7/+22 * - add LICENSE:dinoex2009-01-173-0/+6 * - Fix plist with perl 5.8.9pav2009-01-152-6/+6 * - Update to 2.2.2acm2009-01-142-6/+2 * Mark BROKEN on HEAD after the import of strndup(3).erwin2009-01-091-1/+7 * - No need to define USE_REINPLACE these dayspav2009-01-091-1/+0 * - Update mod_sql_tds to 4.8beech2009-01-063-7/+8 * - Remove conditional checks for FreeBSD 5.x and olderpav2009-01-069-135/+4 * Bump PORTREVISION's after OpenLDAP update.delphij2009-01-061-0/+1 * - Add/Update portscout flagsmiwi2009-01-041-0/+1 * - Fix rc script when setting pidfile in the main config file.lippe2009-01-032-2/+1 * 1) Consistently use "%08X" instead of "%08lX" for formatting uint32_tdemon2008-12-264-23/+139 * - rename files/moftpd.sh -> files/moftpd.inpgollucci2008-12-263-13/+5 * Take over maintainership since gnn is no longer using this program.demon2008-12-241-1/+1 * Update to version 2.6.5.demon2008-12-242-4/+4 * - extend MASTER_SITESdinoex2008-12-231-2/+2 * - Update to 0.5.1beech2008-12-202-4/+4 * - update to 0.18leeym2008-12-202-4/+5 * - update to 0.2dinoex2008-12-203-6/+7 * - Update to 3.7.7beech2008-12-193-10/+10 * Reset se@FreeBSD.org due to maintainer-timeouts and no response to email.linimon2008-12-181-1/+1 * - Update to 0.6.2pav2008-12-184-38/+64 * Chase the avahi-core shared lib version.marcus2008-12-171-2/+2 * - Update third party mod_sql_tds to 4.7beech2008-12-102-8/+8 * - Tag IGNORE -devel lags the main versionbeech2008-12-101-0/+2 * - Update to 1.3.2rc3beech2008-12-103-195/+5 * - Fix MASTER_SITES (make fetchable)beech2008-12-091-1/+1 * - Fix CacheModule httpsem2008-12-092-1/+19 * Update to version 2.6.3.demon2008-12-062-4/+4 * update to 2.0.19oliver2008-12-0510-138/+59 * - Update to 3.7.6miwi2008-11-233-14/+4 * - Update to 3.7.5lwhsu2008-11-173-4/+14 * - Fix MASTER_SITESmiwi2008-10-251-1/+1 * - Update to 4.4p1beech2008-10-212-4/+4 * - Update to 2.3beech2008-10-182-4/+4 * - Update to 1.0.4beech2008-10-183-67/+94 * - update to 0.16leeym2008-10-182-10/+8 * - Update to 1.2.34miwi2008-10-122-5/+7 * - Fix NOPORTEXAMPLES=yes case.hrs2008-10-054-30/+49 * - Update to 1.29miwi2008-09-292-5/+11 * - Re-add mod_sql_tds option and update to 4.6beech2008-09-262-7/+22 * - Replace path hack with configure argbeech2008-09-252-4/+3 * - Update to 0.5.0lwhsu2008-09-242-4/+4 * - Fix plistbeech2008-09-241-1/+0 * - Fix install and plist for proftpd.pcbeech2008-09-242-0/+5 * - Update to 1.3.2rc2beech2008-09-2414-806/+251 * - Update to 2.8.5beech2008-09-236-67/+73 * - Update to 1.3.20080922beech2008-09-234-39/+33 * - Update to 1.3.20080920beech2008-09-234-350/+30 * - Patch src netio.c - wrong telnet filterbeech2008-09-172-2/+58 * - Update security/clamav to 0.94 [1] and fix a remote DoS [2]garga2008-09-162-2/+2 * Reset infofarmer due to maintainer-timeouts and no response to email.linimon2008-09-073-3/+3 * Somewhere along the way of 8-CURRENT, we seem to have diverged inobrien2008-09-032-1/+12 * - Update to 2.1beech2008-09-032-5/+4 * Upgrade to version 3.2.2.obrien2008-08-271-1/+1 * Upgrade to version 3.2.2.obrien2008-08-272-9/+9 * - Remove pkg-messagebeech2008-08-261-9/+0 * - Update to 20080609beech2008-08-249-58/+49 * - Update lftp to v3.7.4.beech2008-08-224-5/+4 * Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.rafan2008-08-2117-17/+0 * Conversion from (now defunct) autoconf-2.61 to autoconf-2.62ade2008-08-205-5/+5 * - Update libevent dependency and bump PORTREVISIONmnag2008-08-202-3/+4 * Return laszlof's ports to the pool due to lack of time.linimon2008-08-191-1/+1 * - Update to 1.30miwi2008-08-112-5/+6 * - Mark option mod_codeconv as possibly broken.beech2008-08-061-1/+1 * - simplify dependencyleeym2008-08-042-28/+19 * - Update to 0.5.0beech2008-08-032-7/+7 * - update to 2.0.7dinoex2008-07-302-4/+4 * Reset sergei@ due to maintainer-timeouts and no response to email.linimon2008-07-271-1/+1 * - New entry to MASTER_SITESgarga2008-07-261-1/+2 * - Remove USE_GCC where it can be satisfied with base compiler on followingpav2008-07-251-1/+0 * - Update to 1.51tabthorpe2008-07-252-6/+5 * - Fix build with NOPORTDOCSmiwi2008-07-241-2/+2 * - Fix error in procname pathbeech2008-07-152-1/+2 * Fix "version went backwards"edwin2008-07-091-1/+1 * - Update to 2.0beech2008-06-255-9/+88 * - Use new freepascal stuffacm2008-06-241-3/+2 * - Add missing pkg-plist @dirrmtry entries.alepulver2008-06-221-0/+5 * - Update to version 3.0.11.alepulver2008-06-223-148/+94 * - Update to 0.4.0lwhsu2008-06-153-5/+5 * Update to 0.18skv2008-06-112-4/+4 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-062-2/+2 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-06