diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-02-27 06:55:48 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-02-27 06:55:48 +0000 |
commit | 4824b3c08989f27cfb2f8c430c8ca162265b9515 (patch) | |
tree | a6451e9ece24f57f15d46ff04ad10159fbbfaa48 /sci-libs/lapack-reference | |
parent | Bump (diff) | |
download | gentoo-2-4824b3c08989f27cfb2f8c430c8ca162265b9515.tar.gz gentoo-2-4824b3c08989f27cfb2f8c430c8ca162265b9515.tar.bz2 gentoo-2-4824b3c08989f27cfb2f8c430c8ca162265b9515.zip |
sci-libs/lapack-reference: Add new version which only sets pc file with eselect
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)
Diffstat (limited to 'sci-libs/lapack-reference')
-rw-r--r-- | sci-libs/lapack-reference/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/lapack-reference/files/eselect.lapack.reference-ng | 1 | ||||
-rw-r--r-- | sci-libs/lapack-reference/lapack-reference-3.2.1-r2.ebuild | 98 |
3 files changed, 106 insertions, 1 deletions
diff --git a/sci-libs/lapack-reference/ChangeLog b/sci-libs/lapack-reference/ChangeLog index e67d862a83ff..61b2841d8ca4 100644 --- a/sci-libs/lapack-reference/ChangeLog +++ b/sci-libs/lapack-reference/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/lapack-reference # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-reference/ChangeLog,v 1.67 2013/02/21 21:27:56 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-reference/ChangeLog,v 1.68 2013/02/27 06:55:48 jlec Exp $ + +*lapack-reference-3.2.1-r2 (27 Feb 2013) + + 27 Feb 2013; Justin Lecher <jlec@gentoo.org> + +lapack-reference-3.2.1-r2.ebuild, +files/eselect.lapack.reference-ng: + Add new version which only sets pc file with eselect 21 Feb 2013; Justin Lecher <jlec@gentoo.org> lapack-reference-3.1.1-r1.ebuild, -lapack-reference-3.2.1.ebuild, diff --git a/sci-libs/lapack-reference/files/eselect.lapack.reference-ng b/sci-libs/lapack-reference/files/eselect.lapack.reference-ng new file mode 100644 index 000000000000..11231ea71286 --- /dev/null +++ b/sci-libs/lapack-reference/files/eselect.lapack.reference-ng @@ -0,0 +1 @@ +../lapack/reference/lapack.pc /usr/@LIBDIR@/pkgconfig/lapack.pc diff --git a/sci-libs/lapack-reference/lapack-reference-3.2.1-r2.ebuild b/sci-libs/lapack-reference/lapack-reference-3.2.1-r2.ebuild new file mode 100644 index 000000000000..1ec3503d5765 --- /dev/null +++ b/sci-libs/lapack-reference/lapack-reference-3.2.1-r2.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-reference/lapack-reference-3.2.1-r2.ebuild,v 1.1 2013/02/27 06:55:48 jlec Exp $ + +EAPI=3 + +inherit autotools eutils fortran-2 flag-o-matic multilib toolchain-funcs + +MyPN="${PN/-reference/}" +PATCH_V="3.2.1" + +DESCRIPTION="FORTRAN reference implementation of LAPACK Linear Algebra PACKage" +HOMEPAGE="http://www.netlib.org/lapack/index.html" +SRC_URI=" + mirror://gentoo/${MyPN}-${PV}.tgz + mirror://gentoo/${PN}-${PATCH_V}-autotools.patch.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="doc" + +RDEPEND=" + app-admin/eselect-lapack + virtual/blas" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/lapack-docs )" + +S="${WORKDIR}/${MyPN}-${PV}" + +pkg_setup() { + fortran-2_pkg_setup + if [[ $(tc-getFC) =~ if ]]; then + ewarn "Using Intel Fortran at your own risk" + export LDFLAGS="$(raw-ldflags)" + export NOOPT_FFLAGS=-O + fi + ESELECT_PROF=reference +} + +src_prepare() { + epatch "${WORKDIR}"/${PN}-${PATCH_V}-autotools.patch + epatch "${FILESDIR}"/${P}-parallel-make.patch + eautoreconf + + # set up the testing routines + sed -e "s:g77:$(tc-getFC):" \ + -e "s:-funroll-all-loops -O3:${FFLAGS} $($(tc-getPKG_CONFIG) --cflags blas):" \ + -e "s:LOADOPTS =:LOADOPTS = ${LDFLAGS} $($(tc-getPKG_CONFIG) --cflags blas):" \ + -e "s:../../blas\$(PLAT).a:$($(tc-getPKG_CONFIG) --libs blas):" \ + -e "s:lapack\$(PLAT).a:SRC/.libs/liblapack.a:" \ + make.inc.example > make.inc \ + || die "Failed to set up make.inc" + + cp "${FILESDIR}"/eselect.lapack.reference-ng "${T}"/eselect.lapack.reference || die + sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.lapack.reference || die + if [[ ${CHOST} == *-darwin* ]] ; then + sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \ + "${T}"/eselect.lapack.reference || die + fi +} + +src_configure() { + econf \ + --libdir="${EPREFIX}/usr/$(get_libdir)/lapack/reference" \ + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc README || die "dodoc failed" + eselect lapack add $(get_libdir) "${T}"/eselect.lapack.reference ${ESELECT_PROF} +} + +src_test() { + cd "${S}"/TESTING/MATGEN + emake || die "Failed to create tmglib.a" + cd "${S}"/TESTING + emake || die "lapack-reference tests failed." +} + +pkg_postinst() { + local p=lapack + 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 +} |