sci-libs/mkl: Fixed ebuild
authorGerhard Bräunlich <wippbox@gmx.net>
Tue, 16 Aug 2016 15:08:55 +0000 (17:08 +0200)
committerDavid Seifert <soap@gentoo.org>
Tue, 23 Aug 2016 08:43:35 +0000 (10:43 +0200)
Gentoo-bug: #589610
Reported-by: masum.habib@gmail.com
Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/2095

Signed-off-by: David Seifert <soap@gentoo.org>
sci-libs/mkl/mkl-10.0.5.025.ebuild

index f49e232c56722090977508e24dcc86177b571ca5..7a9cc2e6aabe9fae33d2f8cd86457639f433f59b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -8,10 +8,11 @@ inherit check-reqs eutils fortran-2 multilib toolchain-funcs
 
 PID=1232
 PB=${PN}
+P_ARCHIVE=l_${PN}_p_${PV}
 
 DESCRIPTION="Intel(R) Math Kernel Library: linear algebra, fft, math functions"
 HOMEPAGE="http://developer.intel.com/software/products/mkl/"
-SRC_URI="http://registrationcenter-download.intel.com/irc_nas/${PID}/l_${PN}_p_${PV}.tgz"
+SRC_URI="http://registrationcenter-download.intel.com/irc_nas/${PID}/${P_ARCHIVE}.tgz"
 
 SLOT="0"
 LICENSE="Intel-SDP"
@@ -91,10 +92,9 @@ pkg_setup() {
        get_fcomp
 }
 
-src_prepare() {
-       check-reqs_src_prepare
-
-       cd l_${PN}_*_${PV}/install || die
+src_unpack () {
+       default
+       cd "${WORKDIR}/${P_ARCHIVE}"/install || die
 
        cp ${MKL_LICENSE} "${WORKDIR}"/ || die
        MKL_LIC="$(basename ${MKL_LICENSE})"
@@ -127,13 +127,15 @@ src_prepare() {
                eerror "See ${PWD}/log.txt to see why"
                die "extracting failed"
        fi
+}
+
+src_prepare() {
        # remove left over
        rm -f /opt/intel/.*mkl*.log /opt/intel/intel_sdp_products.db || die
 
        # remove unused stuff and set up intel names
        rm -rf "${WORKDIR}"/l_* || die
 
-       cd "${S}" || die
        # allow openmpi to work
        epatch "${FILESDIR}"/${PN}-10.0.2.018-openmpi.patch
        # make scalapack tests work for gfortran