summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild')
-rw-r--r--sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild101
1 files changed, 101 insertions, 0 deletions
diff --git a/sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild b/sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild
new file mode 100644
index 000000000000..f91f05edd73e
--- /dev/null
+++ b/sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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-eselect/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
+ sed \
+ -e '/Libs:/s|: |: -L${libdir} |g' \
+ -i lapack.pc.in || die
+}
+
+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 -j1 || die "Failed to create tmglib.a"
+ cd "${S}"/TESTING
+ emake -j1 || 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
+}