diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-11-14 12:35:39 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-11-14 12:35:39 +0000 |
commit | f505ec8654507bdec09fcea375ae5901d188b73e (patch) | |
tree | f6383fe6077af5e6883dddb777eeb7242fb7344c /sci-libs/blas-reference | |
parent | Verion bump (diff) | |
download | gentoo-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')
-rw-r--r-- | sci-libs/blas-reference/ChangeLog | 9 | ||||
-rw-r--r-- | sci-libs/blas-reference/blas-reference-20070226-r2.ebuild | 80 | ||||
-rw-r--r-- | sci-libs/blas-reference/files/blas-reference-20070226-pkg-config.patch | 11 |
3 files changed, 99 insertions, 1 deletions
diff --git a/sci-libs/blas-reference/ChangeLog b/sci-libs/blas-reference/ChangeLog index ddb8ac2bf30c..de0fdc490935 100644 --- a/sci-libs/blas-reference/ChangeLog +++ b/sci-libs/blas-reference/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-libs/blas-reference # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/ChangeLog,v 1.46 2010/10/02 20:42:02 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/ChangeLog,v 1.47 2010/11/14 12:35:39 jlec Exp $ + +*blas-reference-20070226-r2 (14 Nov 2010) + + 14 Nov 2010; Justin Lecher <jlec@gentoo.org> + +blas-reference-20070226-r2.ebuild, + +files/blas-reference-20070226-pkg-config.patch: + Fix for prefix linking, #343113 02 Oct 2010; Fabian Groffen <grobian@gentoo.org> blas-reference-20070226-r1.ebuild: 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 +} diff --git a/sci-libs/blas-reference/files/blas-reference-20070226-pkg-config.patch b/sci-libs/blas-reference/files/blas-reference-20070226-pkg-config.patch new file mode 100644 index 000000000000..14190f41e7d5 --- /dev/null +++ b/sci-libs/blas-reference/files/blas-reference-20070226-pkg-config.patch @@ -0,0 +1,11 @@ +diff --git a/BLAS/blas.pc.in b/BLAS/blas.pc.in +index 367c87b..44b86db 100644 +--- a/BLAS/blas.pc.in ++++ b/BLAS/blas.pc.in +@@ -7,5 +7,5 @@ Name: @PACKAGE_NAME@ + Description: Basic Linear Algebra Subprograms F77 reference implementations + Version: @PACKAGE_VERSION@ + URL: http://www.netlib.org/blas +-Libs: -lblas ++Libs: -L@libdir@ -lblas + Libs.private: -lm |