2002-03-26 18:01:09 +01:00
# New ports collection makefile for: icc
# Date created: 24.Jan.2002
# Whom: netchild@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME = icc
2002-09-20 14:16:25 +02:00
PORTVERSION = 6.0.1.304
2002-09-22 15:05:51 +02:00
PORTREVISION = 1
2002-08-20 12:01:58 +02:00
CATEGORIES = lang linux devel
2002-06-08 12:16:20 +02:00
MASTER_SITES =
2002-09-20 14:16:25 +02:00
DISTNAME = l_cc_p_6.0.1.304
2002-03-26 18:01:09 +01:00
EXTRACT_SUFX = .tar
MAINTAINER = netchild@FreeBSD.org
BUILD_DEPENDS = rpm2cpio:${ PORTSDIR } /archivers/rpm2cpio
RESTRICTED = Intel forbids any redistribution
2002-04-16 17:03:49 +02:00
NO_PACKAGE = ${ RESTRICTED }
NO_CDROM = ${ RESTRICTED }
2002-03-26 18:01:09 +01:00
ONLY_FOR_ARCHS = i386
2002-05-28 05:22:32 +02:00
USE_LINUX = yes
2002-08-20 12:01:58 +02:00
USE_REINPLACE = yes
2002-04-16 17:03:49 +02:00
NO_WRKSUBDIR = yes
2002-03-26 18:01:09 +01:00
NO_FILTER_SHLIBS = yes
2002-08-20 12:01:58 +02:00
MAN1 = icc.1
MANPREFIX = ${ PREFIX } /intel/compiler60/
2002-06-08 12:16:20 +02:00
ICC_SITE = http://www.intel.com/software/products/compilers/
2002-03-26 18:01:09 +01:00
. i n c l u d e < b s d . p o r t . p r e . m k >
2002-03-31 21:00:05 +02:00
ICCCFGVAL != ${ UNAME } -r | ${ SED } -e 's/\..*//'
2002-11-08 16:59:38 +01:00
OBJCOPY ?= /usr/bin/objcopy
2002-06-14 17:54:18 +02:00
. i f ! e x i s t s ( $ { D I S T D I R } / $ { D I S T _ S U B D I R } / $ { D I S T N A M E } $ { E X T R A C T _ S U F X } )
2002-11-08 16:59:38 +01:00
IGNORE = " Please manually download ${ DISTFILES } from ${ ICC_SITE } , ${ ICC_SITE } c60l/noncom.htm or https://premier.intel.com/ \(whichever has the file, to access premier.intel.com you have to register at http://www.intel.com/software/products/registrationcenter/index.htm\). With a little bit of luck it may also be available from ftp://download.intel.com/software/products/compilers/downloads/. Put it into ${ DISTDIR } and run make again "
2002-03-26 18:01:09 +01:00
. e n d i f
2002-11-08 21:17:54 +01:00
. i f e x i s t s ( $ { L I N U X B A S E } / b o o t / k e r n e l . h ) | | \
exists( ${ PREFIX } /intel/compiler60/bin/ifc)
2002-11-13 15:39:52 +01:00
BROKEN = Cannot coexist with linux_devtools or ifc
2002-11-08 21:17:54 +01:00
. e n d i f
2002-03-26 18:01:09 +01:00
post-extract :
2002-04-16 17:03:49 +02:00
. f o r i i n \
2002-09-20 14:16:25 +02:00
intel-icc6-6.0.1-304.i386.rpm \
# intel-ildb6-6.0.1-308.i386.rpm \
# intel-isubh6-6.0.1-304.i386.rpm \
# intel-ecc6-6.0.1-304.ia64.rpm \
# intel-eldb6-6.0.1-308.ia64.rpm \
# intel-esubh6-6.0.1-304.ia64.rpm
2002-11-08 16:59:38 +01:00
. i f d e f i n e d ( N O P O R T D O C S )
@cd ${ WRKSRC } && rpm2cpio 2>/dev/null ${ i } | \
cpio -idfuE ${ FILESDIR } /cpio-exclude --quiet \
*/opt/intel/compiler60/docs/*
. e l s e
@cd ${ WRKSRC } && rpm2cpio 2>/dev/null ${ i } | \
cpio -idfuE ${ FILESDIR } /cpio-exclude --quiet
. e n d i f
2002-03-26 18:01:09 +01:00
. e n d f o r
pre-patch :
2002-05-14 15:15:20 +02:00
# Allow everyone to use it
2002-03-26 18:01:09 +01:00
@${ CHMOD } a+rx ${ WRKSRC } /opt
2002-08-20 12:01:58 +02:00
# Remove unneeded/unsafe access rights
2002-03-26 18:01:09 +01:00
. f o r i i n d o c s i a 3 2 / i n c l u d e i a 3 2 / l i b
2002-05-13 15:58:21 +02:00
@${ FIND } ${ WRKSRC } /opt/intel/compiler60/${ i } -type f -print0 | \
2002-03-26 18:01:09 +01:00
xargs -0 ${ CHMOD } a-x,g-w
. e n d f o r
@${ FIND } ${ WRKSRC } /opt -type d -print0 | xargs -0 ${ CHMOD } go-w
2002-05-14 15:15:20 +02:00
# Use the Linux ABI for the binaries
2002-05-13 15:58:21 +02:00
. f o r i i n I N T E L i c c b i n i c c f i l t i c i d i c p c b i n i c p i l m g r d . i n t e l l m u t i l m c p c o m \
profmerge proforder xiar xild
@brandelf -t Linux ${ WRKSRC } /opt/intel/compiler60/ia32/bin/${ i }
2002-03-26 18:01:09 +01:00
. e n d f o r
post-patch :
2002-05-14 15:15:20 +02:00
# Correct some paths and patch some files
2002-05-13 15:58:21 +02:00
. f o r i i n i a 3 2 / b i n / i c c i a 3 2 / b i n / i c c . c f g i a 3 2 / b i n / i c c v a r s . c s h \
2002-06-08 12:16:20 +02:00
ia32/bin/iccvars.sh ia32/bin/icpc ia32/bin/icpc.cfg docs/csupport
2002-09-20 14:16:25 +02:00
@${ REINPLACE_CMD } -i "" -e 's:@@PREFIX@@:${PREFIX}:g; s@\<INSTALLDIR\>@${PREFIX}/intel@g; s@man -w@manpath -q@g; s:\<INSTALLTIMECOMBOPACKAGEID\>:${DISTNAME}:g' \
2002-05-13 15:58:21 +02:00
${ WRKSRC } /opt/intel/compiler60/${ i }
@${ CHMOD } 755 ${ WRKSRC } /opt/intel/compiler60/${ i }
2002-03-31 21:00:05 +02:00
. e n d f o r
2002-11-08 16:59:38 +01:00
. f o r i i n c f l o a t . o r i g c w c h a r . o r i g y v a l s . h . o r i g
2002-08-20 12:01:58 +02:00
@${ RM } ${ WRKSRC } /opt/intel/compiler60/ia32/include/${ i }
. e n d f o r
2002-11-08 16:59:38 +01:00
. f o r i i n i c c . o r i g i c p c . o r i g
@${ RM } ${ WRKSRC } /opt/intel/compiler60/ia32/bin/${ i }
2002-08-20 12:01:58 +02:00
. e n d f o r
2002-11-08 16:59:38 +01:00
# Remove empty directory
2002-03-26 18:01:09 +01:00
. i f d e f i n e d ( N O P O R T D O C S )
2002-05-13 15:58:21 +02:00
@${ RM } -rf ${ WRKSRC } /opt/intel/compiler60/docs
2002-03-26 18:01:09 +01:00
. e n d i f
2002-05-14 15:15:20 +02:00
# Provide a more FreeBSD'ish compile environment
2002-08-04 22:40:14 +02:00
. f o r i i n i c c . c f g i c p c . c f g
@${ ECHO } -e " \n-Ulinux\n-U__linux__\n-U__linux\n\n-D__FreeBSD__= ${ ICCCFGVAL } \n-D__ELF__=1\n " >>${ WRKSRC } /opt/intel/compiler60/ia32/bin/${ i }
@${ CHMOD } a-x,g-w ${ WRKSRC } /opt/intel/compiler60/ia32/bin/${ i }
. e n d f o r
2002-09-17 14:10:46 +02:00
# C++ hack for icpc
2002-08-20 12:01:58 +02:00
@${ ECHO } -e " \n-I ${ PREFIX } /include/stlport\n-Qoption,ld,-CPLUSPLUS\n " >>${ WRKSRC } /opt/intel/compiler60/ia32/bin/icpc.cfg
2002-08-04 22:40:14 +02:00
@cd ${ WRKSRC } /opt/intel/compiler60/ia32/bin/ && ${ LN } -s icc.cfg iccbin.cfg && ${ LN } -s icpc.cfg icpcbin.cfg
2002-05-13 15:58:21 +02:00
# \n-Qlocation,ld,/usr/bin\n\n-sox-\n
2002-09-17 14:10:46 +02:00
do-build :
2002-09-22 15:05:51 +02:00
# Fix unresolved references
@cd ${ WRKSRC } && ${ CC } ${ CFLAGS } -c ${ FILESDIR } /assert_fail.c \
${ FILESDIR } /cxa_atexit.c ${ FILESDIR } /cxa_finalize.c \
2002-11-08 16:59:38 +01:00
${ FILESDIR } /errno_location.c ${ FILESDIR } /mcount.S
2002-11-13 15:39:52 +01:00
. i f ( $ { O S V E R S I O N } < 4 7 0 1 0 1 ) | | \
( ${ OSVERSION } >= 500000 && ${ OSVERSION } < 500042 )
2002-11-08 16:59:38 +01:00
@${ CC } ${ CFLAGS } -c -o ${ WRKSRC } /stderr.o ${ FILESDIR } /stderr.c
. e l s e
. f o r i i n l i b c x a . a l i b i m f . a l i b i r c . a l i b i r c m t . a l i b u n w i n d . a
@${ OBJCOPY } --redefine-sym stderr = __stderrp \
${ WRKSRC } /opt/intel/compiler60/ia32/lib/${ i }
. e n d f o r
. e n d i f
@${ AR } q ${ WRKSRC } /opt/intel/compiler60/ia32/lib/libcxa.a ${ WRKSRC } /*.o
2002-05-14 15:15:20 +02:00
# Some magic to be able to link
2002-09-17 14:10:46 +02:00
@${ CC } ${ CFLAGS } -o ${ WRKSRC } /opt/intel/compiler60/ia32/bin/ld ${ FILESDIR } /ld.c
@${ STRIP_CMD } ${ WRKSRC } /opt/intel/compiler60/ia32/bin/ld
2002-05-14 15:15:20 +02:00
@${ CHMOD } 755 ${ WRKSRC } /opt/intel/compiler60/ia32/bin/ld
2002-03-26 18:01:09 +01:00
do-install :
2002-05-14 15:15:20 +02:00
@cd ${ WRKSRC } /opt && ${ TAR } -cf - . | \
2002-03-26 18:01:09 +01:00
${ TAR } -xf - -C ${ PREFIX }
post-install :
@${ ECHO_CMD } " ${ PKGNAME } is now installed in ${ PREFIX } /intel, to use it you have to "
2002-05-13 15:58:21 +02:00
@${ ECHO_CMD } " put your license into your \$ ${ INTEL_FLEXLM_LICENSE } (default: "
2002-05-14 15:15:20 +02:00
@${ ECHO_CMD } " ${ PREFIX } /intel/licenses) directory and add "
@${ ECHO_CMD } " ${ PREFIX } /intel/compiler60/ia32/bin to your PATH. "
2002-07-14 18:31:40 +02:00
@${ ECHO_CMD }
2002-09-20 14:16:25 +02:00
@${ ECHO_CMD } "In order to be able to compile C++ source with icpc you have to install"
@${ ECHO_CMD } "devel/stlport-icc. (It is a good idea to run 'rehash' before or stlport-icc"
@${ ECHO_CMD } "probably won't find the compiler.)"
@${ ECHO_CMD }
@${ ECHO_CMD } "If you use icc on a Pentium 4 make sure you have 'options CPU_ENABLE_SSE'"
@${ ECHO_CMD } "in your kernel config (have a look at http://www.FreeBSD.org/handbook/"
@${ ECHO_CMD } "if you do not know how to do this), else icc will hang forever."
@${ ECHO_CMD }
2002-11-08 21:17:54 +01:00
@${ ECHO_CMD } "WARNING: If you use icc while having linux_devtools installed, icc will use"
@${ ECHO_CMD } "the wrong includes and therefore will generate bogus (not working) binaries!"
2002-03-26 18:01:09 +01:00
. i n c l u d e < b s d . p o r t . p o s t . m k >