1 |
# Copyright 1999-2007 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/icc/icc-10.0.026.ebuild,v 1.1 2007/10/02 11:36:23 bicatali Exp $ |
4 |
|
5 |
inherit rpm |
6 |
|
7 |
PID=786 |
8 |
PB=cc |
9 |
PEXEC="icc icpc" |
10 |
DESCRIPTION="Intel C/C++ optimized compiler for Linux" |
11 |
HOMEPAGE="http://www.intel.com/software/products/compilers/clin/" |
12 |
|
13 |
### |
14 |
# everything below common to ifc and icc |
15 |
# no eclass: very likely to change for next versions |
16 |
### |
17 |
PACKAGEID="l_${PB}_c_${PV}" |
18 |
KEYWORDS="~amd64 ~ia64 ~x86" |
19 |
SRC_URI="amd64? ( http://registrationcenter-download.intel.com/irc_nas/${PID}/${PACKAGEID}_intel64.tar.gz ) |
20 |
ia64? ( http://registrationcenter-download.intel.com/irc_nas/${PID}/${PACKAGEID}_ia64.tar.gz ) |
21 |
x86? ( http://registrationcenter-download.intel.com/irc_nas/${PID}/${PACKAGEID}_ia32.tar.gz )" |
22 |
|
23 |
LICENSE="Intel-SDP" |
24 |
SLOT="0" |
25 |
|
26 |
RESTRICT="test strip mirror" |
27 |
IUSE="" |
28 |
DEPEND="" |
29 |
RDEPEND="amd64? ( app-emulation/emul-linux-x86-compat )" |
30 |
|
31 |
src_unpack() { |
32 |
unpack ${A} |
33 |
mv "${WORKDIR}"/l_* "${S}" |
34 |
cd "${S}" |
35 |
|
36 |
local ext= |
37 |
use amd64 && ext=e |
38 |
INSTALL_DIR=/opt/intel/${PB}${ext}/${PV} |
39 |
|
40 |
# debugger installed with dev-lang/idb |
41 |
rm -f data/intel*idb*.rpm |
42 |
|
43 |
for x in data/intel*.rpm; do |
44 |
einfo "Extracting $(basename ${x})..." |
45 |
rpm_unpack "${S}/${x}" || die "rpm_unpack ${x} failed" |
46 |
done |
47 |
|
48 |
einfo "Fixing paths and tagging" |
49 |
cd "${S}"/${INSTALL_DIR}/bin |
50 |
sed -e "s|<INSTALLDIR>|${INSTALL_DIR}|g" \ |
51 |
-i ${PEXEC} *sh \ |
52 |
|| die "sed fixing path failed" |
53 |
|
54 |
cd "${S}"/${INSTALL_DIR}/doc |
55 |
sed -e "s|\<installpackageid\>|${PACKAGEID}|g" \ |
56 |
-e "s|\<INSTALLTIMECOMBOPACKAGEID\>|${PACKAGEID}|g" \ |
57 |
-i *support \ |
58 |
|| die "sed support file failed" |
59 |
chmod 644 *support |
60 |
} |
61 |
|
62 |
src_install() { |
63 |
einfo "Copying files" |
64 |
dodir ${INSTALL_DIR} |
65 |
cp -pPR \ |
66 |
"${S}"/${INSTALL_DIR}/* \ |
67 |
"${D}"/${INSTALL_DIR}/ \ |
68 |
|| die "copying ${PN} failed" |
69 |
|
70 |
local env_file=05${PN} |
71 |
echo "PATH=${INSTALL_DIR}/bin" > ${env_file} |
72 |
echo "ROOTPATH=${INSTALL_DIR}/bin" >> ${env_file} |
73 |
echo "LDPATH=${INSTALL_DIR}/lib" >> ${env_file} |
74 |
echo "MANPATH=${INSTALL_DIR}/man" >> ${env_file} |
75 |
echo "INCLUDE=${INSTALL_DIR}/include" >> ${env_file} |
76 |
doenvd ${env_file} || die "doenvd ${env_file} failed" |
77 |
} |
78 |
|
79 |
pkg_postinst () { |
80 |
# remove left over from unpacking |
81 |
rm -f "${ROOT}"/opt/intel/{intel_sdp_products.db,.*.log} || die "remove logs failed" |
82 |
|
83 |
elog "Make sure you have recieved the a license for ${PN}" |
84 |
elog "To receive a restrictive non-commercial licenses , you need to register at:" |
85 |
elog "http://www.intel.com/cd/software/products/asmo-na/eng/download/download/219771.htm" |
86 |
elog "Read the website for more information on this license." |
87 |
elog "You cannot run ${PN} without a license file." |
88 |
elog "Then put the license file into ${ROOT}/opt/intel/licenses" |
89 |
elog "\nTo use ${PN} issue first \n\tsource /etc/profile" |
90 |
elog "Debugger is installed with dev-lang/idb" |
91 |
} |