# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ifc/ifc-7.1.008.ebuild,v 1.2 2004/06/24 22:50:51 agriffis Exp $ inherit rpm DESCRIPTION="Intel Fortran Compiler 8.1 for Linux" HOMEPAGE="http://www.intel.com/software/products/compilers/flin/" SRC_BASE="l_fc_pu_8.1.021" SRC_PACK="${SRC_BASE}.tar.gz" SRC_URI1="ftp://download.intel.com/software/products/compilers/downloads/${SRC_PACK}" SRC_URI2="ftp://download.intel.co.jp/software/products/compilers/downloads/${SRC_PACK}" SRC_URI="${SRC_URI1} ${SRC_URI2}" INSTALL_IFC_DIR="/opt/intel_fc_80" INSTALL_IDB_DIR="/opt/intel_idb_80" KEYWORDS="x86 ia64" SLOT="8" LICENSE="icc-8.1" IUSE="" DEPEND=">=sys-libs/glibc-2.2.4" RDEPEND=">=sys-libs/glibc-2.2.4" RESTRICT="nostrip" S=${WORKDIR} src_unpack() { unpack ${SRC_PACK} cd ${WORKDIR}/${SRC_BASE} # Only use our architectute if [ "$ARCH" = "x86" ] then rm -r intel-*.ia64.rpm else rm -r intel-*.i386.rpm fi for x in *.rpm; do rpm_unpack ${WORKDIR}/${SRC_BASE}/${x} || die "Failed to unpack rpms."; done } src_compile() { # From UNTAG_CFG_FILES() in Intel's 'install' script: # Keep the C++ bits(...) for FILE in $(find ${S}/opt/intel_*/bin/ -regex '.*[ei](cc|fort|fc|cpc)$\|.*cfg$\|.*pcl$\|.*vars[^/]*.c?sh$' 2>/dev/null) do sed s@\@${INSTALL_IFC_DIR}@g ${FILE} > ${FILE}.abs mv -f ${FILE}.abs ${FILE} chmod 755 ${FILE} done # == SRC_BASE eval `grep "^[ ]*PACKAGEID=" ${SRC_BASE}/install.sh` # From UNTAG_SUPPORT() in 'install.sh' SUPPORTFILE=${S}/opt/intel_fc_80/doc/fsupport if [ -f ${SUPPORTFILE} ] then einfo "Untagging: ${SUPPORTFILE}" sed s@\@${PACKAGEID}@g ${SUPPORTFILE} > ${SUPPORTFILE}.abs mv ${SUPPORTFILE}.abs ${SUPPORTFILE} chmod 644 ${SUPPORTFILE} fi # Fron UNTAG_SUPPORT_IDB() in 'install.sh' SUPPORTFILE=${S}/opt/intel_idb_80/doc/idbsupport if [ -f ${SUPPORTFILE} ] then einfo "Untagging: ${SUPPORTFILE}" sed s@\@${PACKAGEID}@g ${SUPPORTFILE} > ${SUPPORTFILE}.abs mv ${SUPPORTFILE}.abs ${SUPPORTFILE} chmod 644 ${SUPPORTFILE} fi # These should not be executable find "${S}/opt/intel_fc_80/"{doc,man,include} -type f -exec chmod -x "{}" ";" find "${S}/opt/intel_fc_80/lib" -name \*.a -exec chmod -x "{}" ";" find "${S}/opt/intel_idb_80/"{doc,man} -type f -exec chmod -x "{}" ";" } src_install () { dodoc ${SRC_BASE}/flicense install -d ${D}/${INSTALL_IFC_DIR} install -d ${D}/${INSTALL_IDB_DIR} cp -a opt/intel_fc_80/* ${D}/${INSTALL_IFC_DIR} cp -a opt/intel_idb_80/* ${D}/${INSTALL_IDB_DIR} insinto /etc/env.d doins ${FILESDIR}/${PVR}/05ifc || die if [ "$ARCH" = "x86" ] then exeinto ${INSTALL_IFC_DIR}/bin doexe ${FILESDIR}/${PVR}/x86/ifc doexe ${FILESDIR}/${PVR}/x86/ifort fi if [ "$ARCH" = "ia64" ] then exeinto ${INSTALL_IFC_DIR}/bin doexe ${FILESDIR}/${PVR}/ia64/efc doexe ${FILESDIR}/${PVR}/ia64/ifort fi } pkg_postinst() { einfo einfo "http://www.intel.com/software/products/compilers/flin/noncom.htm" einfo einfo "From the above url you can get a free, non-time limited, non-commercial" einfo "personal use license key that comes with no support. You will need to read" einfo "and agree to the license and then fill in your info to have one emailed to" einfo "you. Read the website for details." einfo einfo "You will need to place your license in ${INSTALL_IFC_DIR}/licenses/" einfo einfo "Note that if you are upgrading from an older version you do not need a new" einfo "license." einfo einfo "Documentation for the compiler can be found in ${INSTALL_IFC_DIR}/docs/" einfo }