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-05-13 15:58:21 +02:00
PORTVERSION = 6.0.139
2002-05-14 15:15:20 +02:00
PORTREVISION = 1
2002-03-26 18:01:09 +01:00
CATEGORIES = lang linux
2002-05-13 15:58:21 +02:00
MASTER_SITES = http://www.intel.com/software/products/compilers/
DISTNAME = l_cc_p_6.0.139
2002-03-26 18:01:09 +01:00
EXTRACT_SUFX = .tar
MAINTAINER = netchild@FreeBSD.org
BUILD_DEPENDS = rpm2cpio:${ PORTSDIR } /archivers/rpm2cpio
2002-04-16 17:03:49 +02:00
RUN_DEPENDS = ${ LINUXBASE } /lib/libc-2.2.2.so:${ PORTSDIR } /emulators/linux_base-7
2002-03-26 18:01:09 +01:00
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-04-16 17:03:49 +02:00
#USE_LINUX= yes
NO_WRKSUBDIR = yes
2002-03-26 18:01:09 +01:00
NO_BUILD = yes
NO_FILTER_SHLIBS = yes
. 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-03-26 18:01:09 +01:00
. i f ! e x i s t s ( $ { D I S T D I R } / $ { D I S T N A M E } $ { E X T R A C T _ S U F X } )
2002-05-13 15:58:21 +02:00
IGNORE = " Please manually download it from ${ MASTER_SITES } , e.g. from http://www.intel.com/software/products/compilers/c60l/noncom.htm. Put it into ${ DISTDIR } and run make again. WARNING: this will lead to a mixed up installation if you already use the default linux emulation. This port uses the linux_base-7 port instead of the default linux_base port "
2002-03-26 18:01:09 +01:00
. e n d i f
post-extract :
2002-04-16 17:03:49 +02:00
. f o r i i n \
2002-05-13 15:58:21 +02:00
intel-icc6-6.0-139.i386.rpm \
# intel-ildb6-6.0-189.i386.rpm \
# intel-isubh6-6.0-139.i386.rpm \
# intel-ecc6-6.0-139.ia64.rpm \
# intel-eldb6-6.0-189.ia64.rpm \
# intel-esubh6-6.0-139.ia64.rpm
@cd ${ WRKSRC } ; rpm2cpio ${ i } | cpio -idu --quiet
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-05-14 15:15:20 +02:00
# Remove unneded/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 \
ia32/bin/iccvars.sh ia32/bin/icpc ia32/bin/icpc.cfg
@${ SED } 's@export -n IA32ROOT; unset IA32ROOT;@@g; s@-a "<INSTALLDIR>/compiler60/ia32/bin/icc" @@g; s@-a "<INSTALLDIR>/compiler60/ia32/bin/icpc" @@g; s@\<INSTALLDIR\>@${PREFIX}/intel@g; s@-tp p6@@; s@man -w@manpath -q@g' \
${ WRKSRC } /opt/intel/compiler60/${ i } \
>${ WRKSRC } /opt/intel/compiler60/${ i } .seded
@${ MV } -f ${ WRKSRC } /opt/intel/compiler60/${ i } .seded \
${ 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-05-14 15:15:20 +02:00
# Remove unneeded files
2002-05-13 15:58:21 +02:00
@${ RM } ${ WRKSRC } /opt/intel/compiler60/ia32/include/yvals.h.orig
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-05-13 15:58:21 +02:00
@${ 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/icc.cfg
# \n-Qlocation,ld,/usr/bin\n\n-sox-\n
2002-05-14 15:15:20 +02:00
# Some magic to be able to link
@${ SED } 's:@@PREFIX@@:${PREFIX}:g' ${ FILESDIR } /ld >${ WRKSRC } /opt/intel/compiler60/ia32/bin/ld
@${ CHMOD } 755 ${ WRKSRC } /opt/intel/compiler60/ia32/bin/ld
@${ MKDIR } ${ WRKSRC } /opt/intel/compiler60/ia32/bin/real
# Do not use the linux ld if it exists
@${ LN } -s /usr/bin/ld ${ WRKSRC } /opt/intel/compiler60/ia32/bin/real
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-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 >