summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <spyderous@gentoo.org>2006-07-03 08:30:38 +0000
committerDonnie Berkholz <spyderous@gentoo.org>2006-07-03 08:30:38 +0000
commitedb811ff59c68d3489eec2e8ae9287056aeb2b0a (patch)
tree741c93a4180c6025460ab7e64fc8bbe6a4943e09 /sci-libs
parentAdd sci-libs/mkl:fortran95 (diff)
downloadgentoo-2-edb811ff59c68d3489eec2e8ae9287056aeb2b0a.tar.gz
gentoo-2-edb811ff59c68d3489eec2e8ae9287056aeb2b0a.tar.bz2
gentoo-2-edb811ff59c68d3489eec2e8ae9287056aeb2b0a.zip
Bump to something relatively current, based on ebuild from the science overlay by bicatali. Also switch to new eselect modules.
(Portage version: 2.1.1_pre1-r5)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/mkl/ChangeLog11
-rw-r--r--sci-libs/mkl/files/digest-mkl-8.0.2.0043
-rw-r--r--sci-libs/mkl/mkl-8.0.2.004.ebuild226
3 files changed, 238 insertions, 2 deletions
diff --git a/sci-libs/mkl/ChangeLog b/sci-libs/mkl/ChangeLog
index 29a712e84bc8..9c16f5fc37f6 100644
--- a/sci-libs/mkl/ChangeLog
+++ b/sci-libs/mkl/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-libs/mkl
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/ChangeLog,v 1.4 2005/08/24 16:27:00 phosphan Exp $
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/ChangeLog,v 1.5 2006/07/03 08:30:38 spyderous Exp $
+
+*mkl-8.0.2.004 (03 Jul 2006)
+
+ 03 Jul 2006; Donnie Berkholz <spyderous@gentoo.org>;
+ +mkl-8.0.2.004.ebuild:
+ Bump to something relatively current, based on ebuild from the science
+ overlay by bicatali. Also switch to new eselect modules.
24 Aug 2005; Patrick Kursawe <phosphan@gentoo.org> mkl-5.2.ebuild:
No longer using cp -a (bug #103487)
diff --git a/sci-libs/mkl/files/digest-mkl-8.0.2.004 b/sci-libs/mkl/files/digest-mkl-8.0.2.004
new file mode 100644
index 000000000000..ff935df18160
--- /dev/null
+++ b/sci-libs/mkl/files/digest-mkl-8.0.2.004
@@ -0,0 +1,3 @@
+MD5 fd76dc20d94950ba9d865c3703b12051 l_mkl_p_8.0.2.004.tgz 94983122
+RMD160 a11834af3cc18eddd425a1c06e3c2b31a1d69cc5 l_mkl_p_8.0.2.004.tgz 94983122
+SHA256 f74948cee237cf2f3f7c8d726327ab5caa1cd43e2c87600cd7a3411c057f0f7b l_mkl_p_8.0.2.004.tgz 94983122
diff --git a/sci-libs/mkl/mkl-8.0.2.004.ebuild b/sci-libs/mkl/mkl-8.0.2.004.ebuild
new file mode 100644
index 000000000000..16fa42a32789
--- /dev/null
+++ b/sci-libs/mkl/mkl-8.0.2.004.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/mkl-8.0.2.004.ebuild,v 1.1 2006/07/03 08:30:38 spyderous Exp $
+
+inherit fortran rpm flag-o-matic
+
+MYPV=${PV/.004/}
+DESCRIPTION="Intel(R) Math Kernel Library: linear algebra, fft, random number generators."
+HOMEPAGE="http://developer.intel.com/software/products/mkl/"
+SRC_URI="l_${PN}_p_${PV}.tgz"
+RESTRICT="nostrip fetch"
+
+#fortran95 implements a fortran 95 blas/lapack interface
+IUSE="fortran95 examples"
+SLOT="0"
+LICENSE="mkl-8.0.1"
+KEYWORDS="~x86 ~amd64 ~ia64"
+RDEPEND="virtual/libc
+ app-admin/eselect-blas
+ app-admin/eselect-cblas
+ app-admin/eselect-lapack"
+DEPEND="${RDEPEND}"
+PROVIDE="virtual/blas
+ virtual/lapack"
+
+
+S="${WORKDIR}/l_${PN}_p_${PV}"
+INSTDIR=opt/intel/${PN}/${MYPV}
+
+
+pkg_setup() {
+
+ if use fortran95; then
+ FORTRAN="ifc gfortran"
+ fortran_pkg_setup
+ fi
+
+ if [ -z "${INTEL_LICENSE}" -a -z \
+ $(find /opt/intel/licenses -name *mkl*.lic) ]; then
+ eerror "Did not find any valid mkl license."
+ eerror "Please locate your license file and run:"
+ eerror "\t INTEL_LICENSE=/my/license/files emerge ${PN}"
+ eerror "or place your license in /opt/intel/licenses and run emerge ${PN}"
+ einfo
+ einfo "http://www.intel.com/cd/software/products/asmo-na/eng/perflib/mkl/219859.htm"
+ einfo "From the above url you can get a free, non-commercial"
+ einfo "license to use the Intel Math Kernel Libary emailed to you."
+ einfo "You cannot use mkl without this license file."
+ einfo "Read the website for more information on this license."
+ einfo
+ fi
+}
+
+
+# the whole shmol is to extract rpm files non-interactively
+# from the big mkl installation
+# hopefully recyclable for ipp
+src_unpack() {
+
+ ewarn
+ ewarn "Intel ${PN} requires 200Mb of disk space"
+ ewarn "Make sure you have enough space on /var and also in /opt/intel"
+ ewarn
+
+ unpack ${A}
+
+ # fake rpm commands to trick the big install script
+ mkdir -p bin
+ echo "exit 1" > bin/rpm2cpio
+ echo "exit 1" > bin/rpm
+ chmod +x bin/*
+ PATH=".:${PATH}:$PWD/bin"
+
+ cd ${S}/install
+ # answer file to make the big install script non-interactive
+ echo $"
+[${PN}_install]
+EULA_ACCEPT_REJECT=accept
+FLEXLM_LICENSE_LOCATION=${INTEL_LICENSE}
+TEMP_DIR=${WORKDIR}/rpm
+INSTALL_DESTINATION=${S}
+RPM_INSTALLATION=
+" > answers.txt
+
+ einfo "Building rpm file..."
+ ./install \
+ --noroot \
+ --nonrpm \
+ --installpath ${S} \
+ --silent answers.txt &> /dev/null
+
+ [ -z $(find ${WORKDIR} -name "*.rpm") ] \
+ && die "error while extracting the rpm"
+
+ rm -rf ${WORKDIR}/bin ${S}/*
+
+ cd ${S}
+ for x in $(ls ../rpm/*.rpm); do
+ einfo "Extracting $(basename ${x})..."
+ rpm_unpack ${x} || die "rpm_unpack failed"
+ done
+
+ # clean up
+ rm -rf ${WORKDIR}/rpm
+ rm -rf ${S}/${INSTDIR}/tools/environment
+}
+
+src_compile() {
+
+ case ${ARCH} in
+ amd64)
+ IARCH="em64t"
+ IKERN="em64t"
+ ;;
+ ia64)
+ IARCH="64"
+ IKERN="ipf"
+ ;;
+ x86)
+ IARCH="32"
+ IKERN="ia32"
+ ;;
+ esac
+ ILIBDIR=${INSTDIR}/lib/${IARCH}
+ einfo "IARCH=$IARCH IKERN=$IKERN"
+
+ cd ${S}/${INSTDIR}/tools/builder
+ for x in blas cblas lapack; do
+ make ${IKERN} export=${FILESDIR}/${x}.list name=libmkl_${x} \
+ || die "make ${IKERN} failed"
+ done
+
+ if use fortran95; then
+ local fc=${FORTRANC}
+ if [ "${FORTRANC}" = "ifc" ]; then
+ fc=ifort
+ fi
+ for x in blas lapack; do
+ cd ${S}/${INSTDIR}/interfaces/${x}95
+ make lib \
+ PLAT=lnx${IARCH/em64t/32e} \
+ FC=${fc} \
+ INSTALL_DIR=${S}/${ILIBDIR} || die "make lib failed"
+ done
+ fi
+}
+
+src_test() {
+ local fc="gnu"
+ [ "${FORTRANC}" = "ifc" ] && fc="ifort"
+
+ cd ${S}/${INSTDIR}/tests
+ for testdir in *; do
+ einfo "Testing $testdir"
+ cd ${testdir}
+ emake so$IARCH F=${fc} || die "make $testdir failed"
+ done
+}
+
+src_install () {
+ cd ${S}
+
+ # install license
+ if [ -n "${INTEL_LICENSE}" -a -f "${INTEL_LICENSE}" ]; then
+ insinto /opt/intel/licenses
+ doins ${INTEL_LICENSE}
+ fi
+
+ # install documentation and include files
+ insinto /${INSTDIR}
+ doins -r ${INSTDIR}/{doc,include}
+ dodir /usr/include
+ dosym /${INSTDIR}/include /usr/include/${PN}
+ use examples && doins -r ${INSTDIR}/examples
+
+ # install static libraries
+ insinto /${ILIBDIR}
+ doins ${ILIBDIR}/*.a
+ dodir /usr/$(get_libdir)/{blas,lapack}/mkl
+ dosym /${ILIBDIR}/libmkl_${IKERN}.a \
+ /usr/$(get_libdir)/blas/mkl/libmkl_blas.a
+ dosym /${ILIBDIR}/libmkl_lapack.a \
+ /usr/$(get_libdir)/lapack/mkl/libmkl_lapack.a
+
+ # install shared libraries
+ insopts -m0755
+ doins ${ILIBDIR}/*.so
+ insinto /usr/$(get_libdir)/blas/mkl
+ doins ${INSTDIR}/tools/builder/libmkl_{,c}blas.so
+ insinto /usr/$(get_libdir)/lapack/mkl
+ doins ${INSTDIR}/tools/builder/libmkl_lapack.so
+
+ # install tools
+ insopts -m0644
+ insinto /${INSTDIR}
+ rm -f ${INSTDIR}/tools/builder/*.so
+ doins -r ${INSTDIR}/tools
+
+ # install eselect files
+ eselect blas add $(get_libdir) ${FILESDIR}/eselect.blas mkl
+ eselect cblas add $(get_libdir) ${FILESDIR}/eselect.cblas mkl
+ eselect lapack add $(get_libdir) ${FILESDIR}/eselect.lapack mkl
+
+ # install environment var
+ echo "LD_LIBRARY_PATH=/${ILIBDIR}" > 35mkl
+ doenvd 35mkl
+}
+
+pkg_postinst() {
+ if [[ -z "$(eselect blas show)" ]]; then
+ eselect blas set mkl
+ fi
+ if [[ -z "$(eselect cblas show)" ]]; then
+ eselect cblas set mkl
+ fi
+ if [[ -z "$(eselect lapack show)" ]]; then
+ eselect lapack set mkl
+ fi
+
+ einfo "To use MKL's BLAS features, you have to issue (as root):"
+ einfo "\n\teselect blas set mkl"
+ einfo "To use MKL's CBLAS features, you have to issue (as root):"
+ einfo "\n\teselect cblas set mkl"
+ einfo "To use MKL's LAPACK features, you have to issue (as root):"
+ einfo "\n\teselect lapack set mkl"
+}