summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-11-14 12:35:39 +0000
committerJustin Lecher <jlec@gentoo.org>2010-11-14 12:35:39 +0000
commitf505ec8654507bdec09fcea375ae5901d188b73e (patch)
treef6383fe6077af5e6883dddb777eeb7242fb7344c /sci-libs/blas-reference/blas-reference-20070226-r2.ebuild
parentVerion bump (diff)
downloadgentoo-2-f505ec8654507bdec09fcea375ae5901d188b73e.tar.gz
gentoo-2-f505ec8654507bdec09fcea375ae5901d188b73e.tar.bz2
gentoo-2-f505ec8654507bdec09fcea375ae5901d188b73e.zip
Fix for prefix linking, #343113
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/blas-reference/blas-reference-20070226-r2.ebuild')
-rw-r--r--sci-libs/blas-reference/blas-reference-20070226-r2.ebuild80
1 files changed, 80 insertions, 0 deletions
diff --git a/sci-libs/blas-reference/blas-reference-20070226-r2.ebuild b/sci-libs/blas-reference/blas-reference-20070226-r2.ebuild
new file mode 100644
index 000000000000..0132ceac464e
--- /dev/null
+++ b/sci-libs/blas-reference/blas-reference-20070226-r2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/blas-reference-20070226-r2.ebuild,v 1.1 2010/11/14 12:35:39 jlec Exp $
+
+EAPI="3"
+
+inherit eutils autotools fortran multilib flag-o-matic
+
+LAPACKPV="3.1.1"
+LAPACKPN="lapack-lite"
+
+DESCRIPTION="Basic Linear Algebra Subprograms F77 reference implementations"
+HOMEPAGE="http://www.netlib.org/blas/"
+SRC_URI="http://www.netlib.org/lapack/${LAPACKPN}-${LAPACKPV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="doc"
+
+DEPEND="app-admin/eselect-blas"
+RDEPEND="${DEPEND}
+ doc? ( app-doc/blas-docs )"
+
+S="${WORKDIR}/${LAPACKPN}-${LAPACKPV}"
+
+pkg_setup() {
+ FORTRAN="g77 gfortran ifc"
+ fortran_pkg_setup
+ if [[ ${FORTRANC} == if* ]]; then
+ ewarn "Using Intel Fortran at your own risk"
+ LDFLAGS="$(raw-ldflags)"
+ fi
+ ESELECT_PROF=reference
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-autotool.patch \
+ "${FILESDIR}"/${P}-pkg-config.patch
+ eautoreconf
+
+ cp "${FILESDIR}"/eselect.blas.reference "${T}"/
+ sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.blas.reference || die
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \
+ "${T}"/eselect.blas.reference || die
+ fi
+}
+
+src_configure() {
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir)/blas/reference \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ eselect blas add $(get_libdir) "${T}"/eselect.blas.reference ${ESELECT_PROF}
+}
+
+pkg_postinst() {
+ local p=blas
+ local current_lib=$(eselect ${p} show | cut -d' ' -f2)
+ if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
+ # work around eselect bug #189942
+ local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config
+ [[ -e ${configfile} ]] && rm -f ${configfile}
+ eselect ${p} set ${ESELECT_PROF}
+ elog "${p} has been eselected to ${ESELECT_PROF}"
+ else
+ elog "Current eselected ${p} is ${current_lib}"
+ elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
+ elog "\t eselect ${p} set ${ESELECT_PROF}"
+ fi
+}