diff options
author | bicatali <bicatali@32389bae-6d03-0410-99cf-db05cde120eb> | 2006-02-06 20:04:24 +0000 |
---|---|---|
committer | bicatali <bicatali@32389bae-6d03-0410-99cf-db05cde120eb> | 2006-02-06 20:04:24 +0000 |
commit | 9325cc50ea9b0f465cbd108d51f2f949137fbc91 (patch) | |
tree | 23357f43a2ee07a0369fc0f84bfc8666bb2b5639 /sci-libs/mkl | |
parent | added licenses directory and AURA, mkl licenses (diff) | |
download | sci-9325cc50ea9b0f465cbd108d51f2f949137fbc91.tar.gz sci-9325cc50ea9b0f465cbd108d51f2f949137fbc91.tar.bz2 sci-9325cc50ea9b0f465cbd108d51f2f949137fbc91.zip |
mkl-8.0.1.006: config scripts, license stuff
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@94 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sci-libs/mkl')
-rw-r--r-- | sci-libs/mkl/Manifest | 16 | ||||
-rw-r--r-- | sci-libs/mkl/files/c-MKL.blas | 4 | ||||
-rw-r--r-- | sci-libs/mkl/files/c-MKL.lapack | 8 | ||||
-rw-r--r-- | sci-libs/mkl/files/c-threaded-MKL.blas | 10 | ||||
-rw-r--r-- | sci-libs/mkl/files/c-threaded-MKL.lapack | 10 | ||||
-rw-r--r-- | sci-libs/mkl/files/f77-MKL.blas | 14 | ||||
-rw-r--r-- | sci-libs/mkl/files/f77-threaded-MKL.blas (renamed from sci-libs/mkl/files/f77-threaded.blas) | 0 | ||||
-rw-r--r-- | sci-libs/mkl/files/f77-threaded-MKL.lapack (renamed from sci-libs/mkl/files/f77-threaded.lapack) | 0 | ||||
-rw-r--r-- | sci-libs/mkl/mkl-8.0.1.006.ebuild | 142 |
9 files changed, 132 insertions, 72 deletions
diff --git a/sci-libs/mkl/Manifest b/sci-libs/mkl/Manifest index 8b9b44222..289b86d77 100644 --- a/sci-libs/mkl/Manifest +++ b/sci-libs/mkl/Manifest @@ -1,12 +1,12 @@ MD5 f0122114658bed82421c724016249798 ChangeLog 1771 -MD5 5311f9fef4026c06a9e6bcc760a97470 files/c-MKL.blas 462 -MD5 2ab6eee4d98d7cbccf78b7edd8af8017 files/c-MKL.lapack 478 -MD5 a9b0453940d3095e2ac019bb121f24d2 files/c-threaded-MKL.blas 489 -MD5 eb996ae4287cd4e7d17c5f7e62452b10 files/c-threaded-MKL.lapack 515 +MD5 4a59bc353bb6c4711babda5f0a97f0db files/c-MKL.blas 472 +MD5 a3c0d02bf52b6977f4818e8524041737 files/c-MKL.lapack 506 +MD5 c8af4d9da9bc7da6fec9c7a463cf6bb7 files/c-threaded-MKL.blas 518 +MD5 302c9085e3b16c36b532e28765ab5acd files/c-threaded-MKL.lapack 552 MD5 f1853cde0595400d25d2fa52f079a46e files/digest-mkl-8.0.1.006 68 -MD5 ed3b188fd80ef1795622f2ffa6bfae4a files/f77-MKL.blas 417 +MD5 1504bdc6a8746339217cf1d2142f26bb files/f77-MKL.blas 440 MD5 73b9deafc1ec5bb4398751c6875c911b files/f77-MKL.lapack 474 -MD5 12308b5448e67e8b264abf7539a97539 files/f77-threaded.blas 484 -MD5 c6dbd399b994048332e3bc58e4d449f6 files/f77-threaded.lapack 518 +MD5 12308b5448e67e8b264abf7539a97539 files/f77-threaded-MKL.blas 484 +MD5 c6dbd399b994048332e3bc58e4d449f6 files/f77-threaded-MKL.lapack 518 MD5 729a826a74e62fe48daf668e3dccefb4 metadata.xml 603 -MD5 e3a6968ad59ee2bd6b65af6f84047c97 mkl-8.0.1.006.ebuild 3949 +MD5 5170318c31dc0398589547bf447e5900 mkl-8.0.1.006.ebuild 5781 diff --git a/sci-libs/mkl/files/c-MKL.blas b/sci-libs/mkl/files/c-MKL.blas index d8f89d0cc..a13c76bf7 100644 --- a/sci-libs/mkl/files/c-MKL.blas +++ b/sci-libs/mkl/files/c-MKL.blas @@ -6,10 +6,10 @@ setup() { MY_LIBDIR="$(get_libdir)" einfo "/usr/${MY_LIBDIR}/libcblas.so -> libmkl_blas.so" -ln -sf blas/mkl/libmkl.so /usr/${MY_LIBDIR}/libcblas.so +ln -sf blas/mkl/libmkl_blas.so /usr/${MY_LIBDIR}/libcblas.so einfo "/usr/${MY_LIBDIR}/libcblas.so.0 -> libmkl_blas.so" -ln -sf blas/mkl/libmkl.so /usr/${MY_LIBDIR}/libcblas.so.0 +ln -sf blas/mkl/libmkl_blas.so /usr/${MY_LIBDIR}/libcblas.so.0 einfo "/usr/${MY_LIBDIR}/libcblas.a -> libmkl_blas.a" ln -sf blas/mkl/libmkl_blas.a /usr/${MY_LIBDIR}/libcblas.a diff --git a/sci-libs/mkl/files/c-MKL.lapack b/sci-libs/mkl/files/c-MKL.lapack index f58f7a84d..cd1eb65a6 100644 --- a/sci-libs/mkl/files/c-MKL.lapack +++ b/sci-libs/mkl/files/c-MKL.lapack @@ -5,11 +5,11 @@ setup() { MY_LIBDIR="$(get_libdir)" -einfo "/usr/${MY_LIBDIR}/libclapack.so -> libmkl.so" -ln -sf lapack/mkl/libmkl.so /usr/${MY_LIBDIR}/libclapack.so +einfo "/usr/${MY_LIBDIR}/libclapack.so -> libmkl_lapack.so" +ln -sf lapack/mkl/libmkl_lapack.so /usr/${MY_LIBDIR}/libclapack.so -einfo "/usr/${MY_LIBDIR}/libclapack.so.0 -> libmkl.so" -ln -sf lapack/mkl/libmkl.so /usr/${MY_LIBDIR}/libclapack.so.0 +einfo "/usr/${MY_LIBDIR}/libclapack.so.0 -> libmkl_lapack.so" +ln -sf lapack/mkl/libmkl_lapack.so /usr/${MY_LIBDIR}/libclapack.so.0 einfo "/usr/${MY_LIBDIR}/libclapack.a -> libmkl_lapack.a" ln -sf lapack/mkl/libmkl_lapack.a /usr/${MY_LIBDIR}/libclapack.a diff --git a/sci-libs/mkl/files/c-threaded-MKL.blas b/sci-libs/mkl/files/c-threaded-MKL.blas index 4daeb77b6..58132b1d2 100644 --- a/sci-libs/mkl/files/c-threaded-MKL.blas +++ b/sci-libs/mkl/files/c-threaded-MKL.blas @@ -1,15 +1,15 @@ CFLAGS="-I/usr/include/mkl" -CLIBS="-L/usr/$(get_libdir)/blas/mkl -lmkl_blas -lpthread" +CLIBS="-L/usr/$(get_libdir)/blas/threaded-mkl -lmkl_blas -lpthread" setup() { MY_LIBDIR="$(get_libdir)" -einfo "/usr/${MY_LIBDIR}/libcblas.so -> libmkl.so" -ln -sf blas/threaded-mkl/libmkl.so /usr/${MY_LIBDIR}/libcblas.so +einfo "/usr/${MY_LIBDIR}/libcblas.so -> libmkl_blas.so" +ln -sf blas/threaded-mkl/libmkl_blas.so /usr/${MY_LIBDIR}/libcblas.so -einfo "/usr/${MY_LIBDIR}/libcblas.so.0 -> libmkl.so" -ln -sf blas/threaded-mkl/libmkl.so /usr/${MY_LIBDIR}/libcblas.so.0 +einfo "/usr/${MY_LIBDIR}/libcblas.so.0 -> libmkl_blas.so" +ln -sf blas/threaded-mkl/libmkl_blas.so /usr/${MY_LIBDIR}/libcblas.so.0 einfo "/usr/${MY_LIBDIR}/libcblas.a -> libmkl_blas.a" ln -sf blas/threaded-mkl/libmkl_blas.a /usr/${MY_LIBDIR}/libcblas.a diff --git a/sci-libs/mkl/files/c-threaded-MKL.lapack b/sci-libs/mkl/files/c-threaded-MKL.lapack index 4a997958d..45463e41e 100644 --- a/sci-libs/mkl/files/c-threaded-MKL.lapack +++ b/sci-libs/mkl/files/c-threaded-MKL.lapack @@ -1,15 +1,15 @@ CFLAGS="-I/usr/include/mkl" -CLIBS="-L/usr/$(get_libdir)/lapack/mkl -lmkl_lapack -lpthread" +CLIBS="-L/usr/$(get_libdir)/lapack/threaded-mkl -lmkl_lapack -lpthread" setup() { MY_LIBDIR="$(get_libdir)" -einfo "/usr/${MY_LIBDIR}/libclapack.so -> libmkl.so" -ln -sf lapack/threaded-mkl/libmkl.so /usr/${MY_LIBDIR}/libclapack.so +einfo "/usr/${MY_LIBDIR}/libclapack.so -> libmkl_lapack.so" +ln -sf lapack/threaded-mkl/libmkl_lapack.so /usr/${MY_LIBDIR}/libclapack.so -einfo "/usr/${MY_LIBDIR}/libclapack.so.0 -> libmkl.so" -ln -sf lapack/threaded-mkl/libmkl.so /usr/${MY_LIBDIR}/libclapack.so.0 +einfo "/usr/${MY_LIBDIR}/libclapack.so.0 -> libmkl_lapack.so" +ln -sf lapack/threaded-mkl/libmkl_lapack.so /usr/${MY_LIBDIR}/libclapack.so.0 einfo "/usr/${MY_LIBDIR}/libclapack.a -> libmkl_lapack.a" ln -sf lapack/threaded-mkl/libmkl_lapack.a /usr/${MY_LIBDIR}/libclapack.a diff --git a/sci-libs/mkl/files/f77-MKL.blas b/sci-libs/mkl/files/f77-MKL.blas index 5159eb5af..e68bcef50 100644 --- a/sci-libs/mkl/files/f77-MKL.blas +++ b/sci-libs/mkl/files/f77-MKL.blas @@ -1,16 +1,16 @@ -F77LIBS="-L/usr/$(get_libdir)/blas/mkl -lmkl" +F77LIBS="-L/usr/$(get_libdir)/blas/mkl -lmkl_blas" setup() { MY_LIBDIR="$(get_libdir)" -einfo "/usr/${MY_LIBDIR}/libblas.so -> libmkl.so" -ln -sf blas/mkl/libmkl.so /usr/${MY_LIBDIR}/libblas.so +einfo "/usr/${MY_LIBDIR}/libblas.so -> libmkl_blas.so" +ln -sf blas/mkl/libmkl_blas.so /usr/${MY_LIBDIR}/libblas.so -einfo "/usr/${MY_LIBDIR}/libblas.so.0 -> libmkl.so" -ln -sf blas/mkl/libmkl.so /usr/${MY_LIBDIR}/libblas.so.0 +einfo "/usr/${MY_LIBDIR}/libblas.so.0 -> libmkl_blas.so" +ln -sf blas/mkl/libmkl_blas.so /usr/${MY_LIBDIR}/libblas.so.0 -einfo "/usr/${MY_LIBDIR}/libblas.a -> libmkl_IKERN.a" -ln -sf blas/mkl/libmkl_IKERN.a /usr/${MY_LIBDIR}/libblas.a +einfo "/usr/${MY_LIBDIR}/libblas.a -> libmkl_blas.a" +ln -sf blas/mkl/libmkl_blas.a /usr/${MY_LIBDIR}/libblas.a } diff --git a/sci-libs/mkl/files/f77-threaded.blas b/sci-libs/mkl/files/f77-threaded-MKL.blas index 265043261..265043261 100644 --- a/sci-libs/mkl/files/f77-threaded.blas +++ b/sci-libs/mkl/files/f77-threaded-MKL.blas diff --git a/sci-libs/mkl/files/f77-threaded.lapack b/sci-libs/mkl/files/f77-threaded-MKL.lapack index c2bd43e2c..c2bd43e2c 100644 --- a/sci-libs/mkl/files/f77-threaded.lapack +++ b/sci-libs/mkl/files/f77-threaded-MKL.lapack diff --git a/sci-libs/mkl/mkl-8.0.1.006.ebuild b/sci-libs/mkl/mkl-8.0.1.006.ebuild index 51edb4d0c..6b7371cc5 100644 --- a/sci-libs/mkl/mkl-8.0.1.006.ebuild +++ b/sci-libs/mkl/mkl-8.0.1.006.ebuild @@ -4,8 +4,7 @@ inherit fortran rpm -MYPV=${PV/.006//} - +MYPV=${PV/.006/} 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" @@ -15,7 +14,7 @@ RESTRICT="nostrip fetch" IUSE="fortran95 examples" SLOT="0" LICENSE="mkl-8.0.1" -KEYWORDS="-* ~x86 ~amd64 ~ia64" +KEYWORDS="~x86 ~amd64 ~ia64" DEPEND="virtual/libc" RDEPEND="${DEPEND} app-admin/eselect" @@ -25,12 +24,30 @@ PROVIDE="virtual/blas 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}" ] && \ + [ -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 } @@ -39,14 +56,6 @@ pkg_setup() { # hopefully recyclable for ipp src_unpack() { - if [ ! -n ${INTEL_LICENSE_FILES_TO_COPY} ]; then - eerror "\$INTEL_LICENSE_FILES_TO_COPY undefined" - eerror "Please locate your license file and run:" - eerror "\t INTEL_LICENSE_FILES_TO_COPY=/my/license/files emerge ${PN}" - eerror "or place your license in /opt/intel/license and run emerge ${PN}" - die - fi - ewarn ewarn "Intel ${PN} requires 200Mb of disk space" ewarn "Make sure you have enough space on /var and also in /opt/intel" @@ -60,26 +69,28 @@ src_unpack() { echo "exit 1" > bin/rpm chmod +x bin/* PATH=".:${PATH}:$PWD/bin" - INSTDIR=/opt/intel/${PN}/${MYPV} 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_FILES_TO_COPY} +FLEXLM_LICENSE_LOCATION=${INTEL_LICENSE} TEMP_DIR=${WORKDIR}/rpm -INSTALL_DESTINATION=${D}/opt +INSTALL_DESTINATION=${S} RPM_INSTALLATION= " > answers.txt - einfo "Building rpm file (be patient)..." + einfo "Building rpm file..." ./install \ --noroot \ --nonrpm \ - --installpath ${S}/opt \ + --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} @@ -87,12 +98,10 @@ RPM_INSTALLATION= einfo "Extracting $(basename ${x})..." rpm_unpack ${x} || die "rpm_unpack failed" done - mkdir opt/intel/licenses - mv ../rpm/${PN}_license opt/intel/licenses/ # clean up rm -rf ${WORKDIR}/rpm - rm -rf ${S}${INSTDIR}/tools/environment + rm -rf ${S}/${INSTDIR}/tools/environment } src_compile() { @@ -101,30 +110,35 @@ src_compile() { amd64) IARCH="em64t" IKERN="em64t" + # need to work out cpu detection + ICPU="def" ;; ia64) IARCH="64" - IKERN="ipf" + IKERN="ipf" + ICPU="i2p" ;; x86) IARCH="32" - IKERN="ia32" + IKERN="ia32" + # need to work out cpu detection + ICPU="def" ;; esac - - use ${ARCH} || rm -rf ${S}${INSTDIR}/lib/${IARCH} - + ILIBDIR=${INSTDIR}/lib/${IARCH} + use ${ARCH} || rm -rf ${S}/${ILIBDIR} + 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 + cd ${S}/${INSTDIR}/interfaces/${x}95 make lib \ PLAT=lnx${IARCH/em64t/32e} \ FC=${fc} \ - INSTALL_DIR=${S}${INSTDIR}/lib/${IARCH} + INSTALL_DIR=${S}/${ILIBDIR} done fi @@ -137,35 +151,80 @@ src_test() { fc="ifort" fi - cd ${S}${INSTDIR}/tests + cd ${S}/${INSTDIR}/tests for testdir in *; do einfo "Testing $testdir" - cd $testdir + cd ${testdir} emake so$IARCH F=${fc} || die "make $testdir failed" - rm -rf _results done } src_install () { - + cd ${S} # regular intel-style installation - insinto ${INSTDIR} - doins -r ./${INSTDIR}/{doc,include,tools} - insinto ${INSTDIR}/lib/${IARCH} - doins ./${INSTDIR}/lib/${IARCH}/*.a + if [ -n "${INTEL_LICENSE}" ] && \ + [ -f "${INTEL_LICENSE}" ]; then + insinto /opt/intel/licenses + doins ${INTEL_LICENSE} + fi + insinto /${INSTDIR} + doins -r ${INSTDIR}/{doc,include,tools} + use examples && doins -r ${INSTDIR}/examples + insinto /${ILIBDIR} + doins ${ILIBDIR}/*.a insopts -m0755 - doins ./${INSTDIR}/lib/${IARCH}/*.so + doins ${ILIBDIR}/*.so insopts -m0644 - use examples && doins -r examples # gentoo-style installation - dosym ${INSTDIR}/include /usr/include${PN} + dodir /usr/include + dosym /${INSTDIR}/include /usr/include/${PN} + dodir /usr/$(get_libdir)/{blas,lapack}/{mkl,threaded-mkl} - # TODO: stack the shared lib to one big one, rename proper libs - # install the required configuration + # All install stuff below needs work using nasty libtool + # --------------------------------------------------- + insopts -m0755 + gcc -fPIC -shared -L${S}/${ILIBDIR} -lmkl -lmkl_${ICPU} \ + -o libmkl_blas.so + insinto /usr/$(get_libdir)/blas/mkl + doins libmkl_blas.so + + gcc -fPIC -shared -L${S}/${ILIBDIR} -lmkl_lapack32 -lmkl_lapack64 \ + -o libmkl_lapack.so + insinto /usr/$(get_libdir)/lapack/mkl + doins libmkl_lapack.so + + gcc -fPIC -shared -L${S}/${ILIBDIR} -lmkl -lmkl_${ICPU} -lguide \ + -o libmkl_blas.so + insinto /usr/$(get_libdir)/blas/threaded-mkl + doins libmkl_blas.so + + gcc -fPIC -shared -L${S}/${ILIBDIR} -lmkl_lapack32 -lmkl_lapack64 -lguide \ + -o libmkl_lapack.so + insinto /usr/$(get_libdir)/lapack/threaded-mkl + doins libmkl_lapack.so + + insopts -m0644 + ar cr libmkl_blas.a ${ILIBDIR}/lib{mkl_${IKERN},guide}.a + ranlib libmkl_blas.a + insinto /usr/$(get_libdir)/blas/threaded-mkl + doins libmkl_blas.a + + ar cr libmkl_lapack.a ${ILIBDIR}/lib{mkl_lapack,guide}.a + ranlib libmkl_lapack.a + insinto /usr/$(get_libdir)/lapack/threaded-mkl + doins libmkl_lapack.a + # --------------------------------------------------- + + 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 the required configuration scripts for x in blas lapack; do - insinto /usr/$(get_libdir)/${x} + insinto /usr/$(get_libdir)/${x} for y in f77 f77-threaded c c-threaded; do newins ${FILESDIR}/${y}-MKL.${x} ${y}-MKL done @@ -173,9 +232,10 @@ src_install () { } pkg_postinst() { + einfo einfo "To use MKL's linear algebra, features, you have to issue (as root):" einfo "\t eselect <impl> set MKL" - einfo "Where <impl> is blas or lapack" + einfo "where <impl> is blas or lapack" einfo } |