summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/acml/ChangeLog8
-rw-r--r--sci-libs/acml/acml-3.1.0-r1.ebuild89
-rw-r--r--sci-libs/acml/files/digest-acml-3.1.0-r16
-rw-r--r--sci-libs/blas-atlas/ChangeLog9
-rw-r--r--sci-libs/blas-atlas/blas-atlas-3.6.0-r2.ebuild181
-rw-r--r--sci-libs/blas-atlas/blas-atlas-3.7.11-r1.ebuild193
-rw-r--r--sci-libs/blas-atlas/files/digest-blas-atlas-3.6.0-r26
-rw-r--r--sci-libs/blas-atlas/files/digest-blas-atlas-3.7.11-r16
-rw-r--r--sci-libs/blas-reference/ChangeLog8
-rw-r--r--sci-libs/blas-reference/blas-reference-19940131-r4.ebuild54
-rw-r--r--sci-libs/blas-reference/files/digest-blas-reference-19940131-r43
-rw-r--r--sci-libs/cblas-reference/ChangeLog8
-rw-r--r--sci-libs/cblas-reference/cblas-reference-20030223-r2.ebuild54
-rw-r--r--sci-libs/cblas-reference/files/digest-cblas-reference-20030223-r23
-rw-r--r--sci-libs/lapack-atlas/ChangeLog9
-rw-r--r--sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.06
-rw-r--r--sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r16
-rw-r--r--sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r211
-rw-r--r--sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.116
-rw-r--r--sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.11-r115
-rw-r--r--sci-libs/lapack-atlas/lapack-atlas-3.6.0-r2.ebuild189
-rw-r--r--sci-libs/lapack-atlas/lapack-atlas-3.7.11-r1.ebuild219
-rw-r--r--sci-libs/lapack-reference/ChangeLog8
-rw-r--r--sci-libs/lapack-reference/files/digest-lapack-reference-3.02
-rw-r--r--sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r12
-rw-r--r--sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r22
-rw-r--r--sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r46
-rw-r--r--sci-libs/lapack-reference/lapack-reference-3.0-r4.ebuild58
28 files changed, 1161 insertions, 6 deletions
diff --git a/sci-libs/acml/ChangeLog b/sci-libs/acml/ChangeLog
index 851c139c6ce0..610648c0e92c 100644
--- a/sci-libs/acml/ChangeLog
+++ b/sci-libs/acml/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/acml
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/ChangeLog,v 1.9 2006/05/15 15:41:59 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/ChangeLog,v 1.10 2006/07/03 08:06:59 spyderous Exp $
+
+*acml-3.1.0-r1 (03 Jul 2006)
+
+ 03 Jul 2006; Donnie Berkholz <spyderous@gentoo.org>;
+ +acml-3.1.0-r1.ebuild:
+ Bumps to switch to new eselect modules.
15 May 2006; Donnie Berkholz <spyderous@gentoo.org>; acml-2.5.0.ebuild:
Update homepage to match the others. Some programs cache the first one they
diff --git a/sci-libs/acml/acml-3.1.0-r1.ebuild b/sci-libs/acml/acml-3.1.0-r1.ebuild
new file mode 100644
index 000000000000..6099ceb484ba
--- /dev/null
+++ b/sci-libs/acml/acml-3.1.0-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/acml-3.1.0-r1.ebuild,v 1.1 2006/07/03 08:06:59 spyderous Exp $
+
+inherit eutils
+
+DESCRIPTION="AMD Core Math Library (ACML) for x86 and amd64 CPUs"
+HOMEPAGE="http://developer.amd.com/acml.aspx"
+
+MY_PV=${PV//\./\-}
+S=${WORKDIR}
+
+SRC_URI="amd64? ( acml-${MY_PV}-gnu-64bit.tgz )
+ x86? ( acml-${MY_PV}-gnu-32bit.tgz )"
+RESTRICT="fetch nostrip"
+IUSE="sse sse2"
+LICENSE="ACML"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+RDEPEND="virtual/libc
+ app-admin/eselect-blas
+ app-admin/eselect-cblas
+ app-admin/eselect-lapack"
+PROVIDE="virtual/blas
+ virtual/lapack"
+
+src_unpack() {
+ unpack ${A}
+ if [ "${ARCH}" == "amd64" ] ; then
+ export BITS="64"
+ elif [ "${ARCH}" == "x86" ] ; then
+ export BITS="32"
+ if ! use sse2 ; then
+ use sse \
+ && export SUFFIX="_nosse2" \
+ || export SUFFIX="_nosse"
+ fi
+ fi
+ (DISTDIR="${S}" unpack contents-acml-${MY_PV}-gnu-${BITS}bit.tgz)
+
+ mv Doc doc
+}
+
+src_compile() {
+ return
+}
+
+src_install() {
+ # Documentation
+ cd ${S}/doc
+ dodoc acml.*
+
+ # Headers
+ mkdir -p ${D}/usr/include/acml/
+ cp ${S}/gnu${BITS}${SUFFIX}/include/* ${D}/usr/include/acml/ \
+ || die "Could not copy header file"
+ cd ${D}/usr/include
+ ln -s acml/acml.h acml.h
+
+ # Libraries
+ mkdir -p ${D}/usr/$(get_libdir)/
+ cp ${S}/gnu${BITS}${SUFFIX}/lib/* ${D}/usr/$(get_libdir)/ \
+ || die "Could not copy library files"
+ unset SUFFIX
+
+ # eselect files
+ eselect blas add $(get_libdir) ${FILESDIR}/eselect.blas acml
+ eselect cblas add $(get_libdir) ${FILESDIR}/eselect.cblas acml
+ eselect lapack add $(get_libdir) ${FILESDIR}/eselect.lapack acml
+}
+
+pkg_postinst() {
+ if [[ -z "$(eselect blas show)" ]]; then
+ eselect blas set acml
+ fi
+ if [[ -z "$(eselect cblas show)" ]]; then
+ eselect cblas set acml
+ fi
+ if [[ -z "$(eselect lapack show)" ]]; then
+ eselect lapack set acml
+ fi
+
+ einfo "To use ACML's BLAS features, you have to issue (as root):"
+ einfo "\n\teselect blas set acml"
+ einfo "To use ACML's CBLAS features, you have to issue (as root):"
+ einfo "\n\teselect cblas set acml"
+ einfo "To use ACML's LAPACK features, you have to issue (as root):"
+ einfo "\n\teselect lapack set acml"
+}
diff --git a/sci-libs/acml/files/digest-acml-3.1.0-r1 b/sci-libs/acml/files/digest-acml-3.1.0-r1
new file mode 100644
index 000000000000..39d53cbafbbd
--- /dev/null
+++ b/sci-libs/acml/files/digest-acml-3.1.0-r1
@@ -0,0 +1,6 @@
+MD5 fe959ed7661a2b275d92a7e83c7e2b3f acml-3-1-0-gnu-32bit.tgz 24132771
+RMD160 45530e58db9cc6ff31721cca1f440a852ca6a2a9 acml-3-1-0-gnu-32bit.tgz 24132771
+SHA256 32581925aad8df6449453cc62eeaa28a07b6c081b625a8a77e985859466e05de acml-3-1-0-gnu-32bit.tgz 24132771
+MD5 15e933002e5c6c147c15194b5f619093 acml-3-1-0-gnu-64bit.tgz 10052069
+RMD160 6b32df6645068299e3905b5758c16dc1f21960e3 acml-3-1-0-gnu-64bit.tgz 10052069
+SHA256 0d0002310297d03efff198bcc3204b5f690e9387f959d8bd8b78a0e4ca0f2f14 acml-3-1-0-gnu-64bit.tgz 10052069
diff --git a/sci-libs/blas-atlas/ChangeLog b/sci-libs/blas-atlas/ChangeLog
index f65a5bdc3019..35773e8c1bfc 100644
--- a/sci-libs/blas-atlas/ChangeLog
+++ b/sci-libs/blas-atlas/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-libs/blas-atlas
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v 1.24 2006/06/17 00:34:47 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v 1.25 2006/07/03 08:04:29 spyderous Exp $
+
+*blas-atlas-3.7.11-r1 (03 Jul 2006)
+*blas-atlas-3.6.0-r2 (03 Jul 2006)
+
+ 03 Jul 2006; Donnie Berkholz <spyderous@gentoo.org>;
+ +blas-atlas-3.6.0-r2.ebuild, +blas-atlas-3.7.11-r1.ebuild:
+ Bumps to switch to new eselect modules.
17 Jun 2006; Luca Barbato <lu_zero@gentoo.org>
+files/3.6.0-ppc-configure.patch, +files/3.7.11-ppc-configure.patch,
diff --git a/sci-libs/blas-atlas/blas-atlas-3.6.0-r2.ebuild b/sci-libs/blas-atlas/blas-atlas-3.6.0-r2.ebuild
new file mode 100644
index 000000000000..2009dee6b430
--- /dev/null
+++ b/sci-libs/blas-atlas/blas-atlas-3.6.0-r2.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.6.0-r2.ebuild,v 1.1 2006/07/03 08:04:29 spyderous Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Automatically Tuned Linear Algebra Software BLAS implementation"
+HOMEPAGE="http://math-atlas.sourceforge.net/"
+MY_PN=${PN/blas-/}
+SRC_URI="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2
+ mirror://gentoo/atlas${PV}-shared-libs.1.patch.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc"
+
+RDEPEND="app-admin/eselect-blas
+ app-admin/eselect-cblas"
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-1.5"
+
+
+PROVIDE="virtual/blas"
+
+S=${WORKDIR}/ATLAS
+
+# Libraries will be installed in ${RPATH}/atlas
+# and ${RPATH}/threaded-atlas:
+RPATH="${DESTTREE}/lib/blas"
+
+
+pkg_setup() {
+ if [ -z `which g77` ]; then
+ eerror "No fortran compiler found on the system!"
+ eerror "Please add fortran to your USE flags and reemerge gcc!"
+ die
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+
+ epatch ${FILESDIR}/unbuffered.patch
+ epatch ${DISTDIR}/atlas3.6.0-shared-libs.1.patch.bz2
+ epatch ${FILESDIR}/${PV}-ppc-configure.patch
+ sed -i -e "s:ASM:ASM VOLATILE:" include/contrib/camm_dpa.h || die "sed failed to fix clobbering"
+ cp ${FILESDIR}/war ${S}
+ chmod a+x ${S}/war
+}
+
+atlas_fail() {
+ eerror
+ eerror "ATLAS auto-config failed."
+ eerror "Please run 'interactive=1 emerge blas-atlas' to configure manually."
+ eerror
+ die "ATLAS auto-config failed."
+}
+
+# Added to allow compilation on sparc architecture. The default CCFLAG0
+# and MMFLAGS are *bad*.
+# Danny van Dyk <kugelfang@gentoo.org> 2004/07/02
+#
+reconfigure() {
+ case "`uname -p`" in
+ "sun4m")
+ MY_CCFLAGS="-O3 -mcpu=v8"
+ MY_CXXFLAGS="${MY_CCFLAGS}"
+ MY_MMFLAGS="-O -mcpu=v8"
+ MY_LDFLAGS=""
+ ;;
+ "sun4u")
+ MY_CCFLAGS="-O3 -mcpu=ultrasparc"
+ MY_CXXFLAGS="${MY_CCFLAGS}"
+ MY_MMFLAGS="-O -mcpu=ultrasparc"
+ MY_LDFLAGS=""
+ ;;
+ *)
+ MY_CCFLAGS="${CFLAGS}"
+ MY_CXXFLAGS="${CXXFLAGS}"
+ MY_MMFLAGS="${CFLAGS}"
+ MY_LDFLAGS="${LDFLAGS}"
+ ;;
+ esac
+
+ MY_FILE="`find -name Make.Linux*`"
+
+ sed -i -e "s/CCFLAG0 =.*/CCFLAG0 = \$(CDEFS) ${MY_CCFLAGS}/" \
+ -e "s/CCFLAGS =.*/CCFLAGS = \$(CDEFS) ${MY_CCFLAGS}/" \
+ -e "s/CLINKFLAGS =.*/CLINKFLAGS =\$(CDEFS) ${MY_LDFLAGS}/" \
+ -e "s/XCCFLAGS =.*/XCCFLAGS =\$(CDEFS) ${MY_CXXFLAGS}/" \
+ -e "s/MMFLAGS =.*/MMFLAGS = ${MY_MMFLAGS}/" \
+ ${MY_FILE} || die "sed didnt complete"
+
+}
+
+src_compile() {
+ if [ -n "${interactive}" ]
+ then
+ echo "${interactive}"
+ make config CC="$(tc-getCC) -DUSE_LIBTOOL -DINTERACTIVE" || die
+ else
+ # Use ATLAS defaults for all questions:
+ (echo | make config CC="$(tc-getCC) -DUSE_LIBTOOL") || atlas_fail
+ fi
+
+ reconfigure
+
+ TMPSTR=$(ls Make.Linux*)
+ ATLAS_ARCH=${TMPSTR#'Make.'}
+
+ make install arch=${ATLAS_ARCH} || die
+
+ make shared-strip arch=${ATLAS_ARCH} RPATH=${RPATH}/atlas || die
+
+ # Build shared versions of the threaded libs.
+ # ATLAS only compiles threaded libs on multiprocessor machines.
+ if [ -d gentoo/libptf77blas.a ]
+ then
+ make ptshared-strip \
+ arch=${ATLAS_ARCH} RPATH=${RPATH}/threaded-atlas || die
+ fi
+}
+
+src_install () {
+ dodir ${RPATH}/atlas
+ cd ${S}/gentoo/libs
+ cp -P libatlas* ${D}/${DESTTREE}/lib
+ cp -P *blas* ${D}/${RPATH}/atlas #the rest really
+
+ eselect blas add $(get_libdir) ${FILESDIR}/eselect.blas atlas
+ eselect cblas add $(get_libdir) ${FILESDIR}/eselect.cblas atlas
+
+ if [ -d ${S}/gentoo/threaded-libs ]
+ then
+ dodir ${RPATH}/threaded-atlas
+ cd ${S}/gentoo/threaded-libs
+ cp -P * ${D}/${RPATH}/threaded-atlas
+ eselect blas add $(get_libdir) ${FILESDIR}/eselect.blas-threaded threaded-atlas
+ eselect cblas add $(get_libdir) ${FILESDIR}/eselect.cblas-threaded threaded-atlas
+ fi
+
+ insinto ${DESTTREE}/include/atlas
+ doins ${S}/include/cblas.h ${S}/include/atlas_misc.h
+ doins ${S}/include/atlas_enum.h
+
+ # These headers contain the architecture-specific optimizations determined
+ # by ATLAS. The atlas-lapack build is much shorter if they are available,
+ # so save them:
+ doins ${S}/include/${ATLAS_ARCH}/*.h
+
+ #some docs
+ cd ${S}
+ dodoc README doc/{AtlasCredits.txt,ChangeLog}
+ use doc && dodoc doc/*.ps
+}
+
+pkg_postinst() {
+ local THREADED
+
+ if [ -d ${RPATH}/threaded-atlas ]
+ then
+ THREADED="threaded-"
+ fi
+ if [[ -z "$(eselect blas show)" ]]; then
+ eselect blas set ${THREADED}atlas
+ fi
+ if [[ -z "$(eselect cblas show)" ]]; then
+ eselect cblas set ${THREADED}atlas
+ fi
+
+ einfo
+ einfo "Fortran users link using -lblas"
+ einfo
+ einfo "C users compile against the header ${ROOT}usr/include/atlas/cblas.h and"
+ einfo "link using -lcblas"
+ einfo
+ einfo "If using threaded ATLAS, you may also need to link with -lpthread."
+}
diff --git a/sci-libs/blas-atlas/blas-atlas-3.7.11-r1.ebuild b/sci-libs/blas-atlas/blas-atlas-3.7.11-r1.ebuild
new file mode 100644
index 000000000000..db67ec661655
--- /dev/null
+++ b/sci-libs/blas-atlas/blas-atlas-3.7.11-r1.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.7.11-r1.ebuild,v 1.1 2006/07/03 08:04:29 spyderous Exp $
+
+inherit eutils toolchain-funcs fortran
+
+DESCRIPTION="Automatically Tuned Linear Algebra Software BLAS implementation"
+HOMEPAGE="http://math-atlas.sourceforge.net/"
+MY_PN=${PN/blas-/}
+MY_PV=3.6.0
+SRC_URI="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2
+ mirror://gentoo/atlas${MY_PV}-shared-libs.1.patch.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc"
+
+RDEPEND="app-admin/eselect-blas
+ app-admin/eselect-cblas"
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-1.5"
+PROVIDE="virtual/blas"
+
+
+S="${WORKDIR}/ATLAS"
+RPATH="${DESTTREE}/$(get_libdir)/blas"
+FORTRAN="g77 gfortran"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch "${FILESDIR}"/unbuffered.patch
+ epatch "${FILESDIR}"/${PV}-allow-any-gcc-version.patch
+ epatch "${DISTDIR}"/atlas3.6.0-shared-libs.1.patch.bz2
+ epatch "${FILESDIR}"/${PV}-ppc-configure.patch
+ sed -i \
+ -e "s:ASM:ASM VOLATILE:" \
+ include/contrib/camm_dpa.h \
+ || die "sed failed to fix clobbering"
+
+ sed -i \
+ -e "s:\(\t./xconfig\):\1 -m $(tc-getCC) -c $(tc-getCC) -f ${FORTRANC}:g" \
+ ${S}/Makefile \
+ || die "Failed to fix compilers"
+
+ if [[ $(gcc-major-version) -ge 4 ]]; then
+ einfo "Updating Makefiles for gcc-4"
+ sed -i \
+ -e "s:g2c:gfortran:g" \
+ ${S}/Make.top \
+ ${S}/makes/Make.lib \
+ || die "Failed to update for gcc-4"
+ fi
+
+ cp "${FILESDIR}"/war "${S}"
+ chmod a+x "${S}"/war
+}
+
+atlas_fail() {
+ eerror
+ eerror "ATLAS auto-config failed."
+ eerror "Please run 'interactive=1 emerge blas-atlas' to configure manually."
+ eerror
+ die "ATLAS auto-config failed."
+}
+
+# Added to allow compilation on sparc architecture. The default CCFLAG0
+# and MMFLAGS are *bad*.
+# Danny van Dyk <kugelfang@gentoo.org> 2004/07/02
+#
+reconfigure() {
+ case "`uname -p`" in
+ "sun4m")
+ MY_CCFLAGS="-O3 -mcpu=v8"
+ MY_CXXFLAGS="${MY_CCFLAGS}"
+ MY_MMFLAGS="-O -mcpu=v8"
+ MY_LDFLAGS=""
+ ;;
+ "sun4u")
+ MY_CCFLAGS="-O3 -mcpu=ultrasparc"
+ MY_CXXFLAGS="${MY_CCFLAGS}"
+ MY_MMFLAGS="-O -mcpu=ultrasparc"
+ MY_LDFLAGS=""
+ ;;
+ *)
+ MY_CCFLAGS="${CFLAGS}"
+ MY_CXXFLAGS="${CXXFLAGS}"
+ MY_MMFLAGS="${CFLAGS}"
+ MY_LDFLAGS="${LDFLAGS}"
+ ;;
+ esac
+
+ MY_FILE="`find -name Make.Linux*`"
+
+ sed -i -e "s/CCFLAG0 =.*/CCFLAG0 = \$(CDEFS) ${MY_CCFLAGS}/" \
+ -e "s/CCFLAGS =.*/CCFLAGS = \$(CDEFS) ${MY_CCFLAGS}/" \
+ -e "s/CLINKFLAGS =.*/CLINKFLAGS =\$(CDEFS) ${MY_LDFLAGS}/" \
+ -e "s/XCCFLAGS =.*/XCCFLAGS =\$(CDEFS) ${MY_CXXFLAGS}/" \
+ -e "s/MMFLAGS =.*/MMFLAGS = ${MY_MMFLAGS}/" \
+ ${MY_FILE} || die "sed didnt complete"
+}
+
+src_compile() {
+ if [ -n "${interactive}" ]
+ then
+ echo "${interactive}"
+ make config CC="$(tc-getCC) -DUSE_LIBTOOL -DINTERACTIVE" || die
+ else
+ # Use ATLAS defaults for all questions:
+ (echo | make config CC="$(tc-getCC) -DUSE_LIBTOOL") || atlas_fail
+ fi
+
+ reconfigure
+
+ TMPSTR=$(ls Make.Linux*)
+ ATLAS_ARCH=${TMPSTR#'Make.'}
+
+ make install arch=${ATLAS_ARCH} || \
+ die "Failed to install blas-atlas"
+
+ make shared-strip arch=${ATLAS_ARCH} RPATH=${RPATH}/atlas || \
+ die "Failed to build shared libraries"
+
+ # Build shared versions of the threaded libs.
+ # ATLAS only compiles threaded libs on multiprocessor machines.
+ if [ -d gentoo/libptf77blas.a ]
+ then
+ make ptshared-strip \
+ arch=${ATLAS_ARCH} RPATH=${RPATH}/threaded-atlas || die
+ fi
+}
+
+src_install () {
+ dodir "${RPATH}"/atlas
+ cd "${S}"/gentoo/libs
+ cp -P libatlas* "${D}/${DESTTREE}/$(get_libdir)" || \
+ die "Failed to install libatlas"
+ cp -P *blas* "${D}/${RPATH}"/atlas || \
+ die "Failed to install blas/cblas"
+
+ eselect blas add $(get_libdir) ${FILESDIR}/eselect.blas atlas
+ eselect cblas add $(get_libdir) ${FILESDIR}/eselect.cblas atlas
+
+ if [ -d "${S}"/gentoo/threaded-libs ]
+ then
+ dodir "${RPATH}"/threaded-atlas
+ cd "${S}"/gentoo/threaded-libs
+ cp -P * "${D}/${RPATH}"/threaded-atlas || \
+ die "Failed to install threaded atlas"
+
+ eselect blas add $(get_libdir) ${FILESDIR}/eselect.blas-threaded threaded-atlas
+ eselect cblas add $(get_libdir) ${FILESDIR}/eselect.cblas-threaded threaded-atlas
+ fi
+
+ insinto "${DESTTREE}"/include/atlas
+ doins "${S}"/include/cblas.h "${S}"/include/atlas_misc.h
+ doins "${S}"/include/atlas_enum.h
+
+ # These headers contain the architecture-specific
+ # optimizations determined by ATLAS. The atlas-lapack build
+ # is much shorter if they are available, so save them:
+ doins "${S}/include/${ATLAS_ARCH}"/*.h
+
+ #some docs
+ cd "${S}"
+ dodoc README doc/{AtlasCredits.txt,ChangeLog}
+ use doc && dodoc doc/*.ps
+}
+
+pkg_postinst() {
+ local THREADED
+
+ if [ -d "${RPATH}"/threaded-atlas ]
+ then
+ THREADED="threaded-"
+ fi
+ if [[ -z "$(eselect blas show)" ]]; then
+ eselect blas set ${THREADED}atlas
+ fi
+ if [[ -z "$(eselect cblas show)" ]]; then
+ eselect cblas set ${THREADED}atlas
+ fi
+
+ einfo
+ einfo "Fortran users link using -lblas"
+ einfo
+ einfo "C users compile against the header ${ROOT}usr/include/atlas/cblas.h and"
+ einfo "link using -lcblas"
+ einfo
+ einfo "If using threaded ATLAS, you may also need to link with -lpthread."
+}
diff --git a/sci-libs/blas-atlas/files/digest-blas-atlas-3.6.0-r2 b/sci-libs/blas-atlas/files/digest-blas-atlas-3.6.0-r2
new file mode 100644
index 000000000000..a097b774b921
--- /dev/null
+++ b/sci-libs/blas-atlas/files/digest-blas-atlas-3.6.0-r2
@@ -0,0 +1,6 @@
+MD5 d2940721d6592f43a5d2e7740d13076d atlas3.6.0-shared-libs.1.patch.bz2 5148
+RMD160 96f9357049fb22e0955ff1375630e542b0bdee7c atlas3.6.0-shared-libs.1.patch.bz2 5148
+SHA256 f669030bf042808a4f4a92c746f3fd3067597d0ec94756ecac63bc331109c565 atlas3.6.0-shared-libs.1.patch.bz2 5148
+MD5 df2ee2eb65d1c08ee93d04370172c262 atlas3.6.0.tar.bz2 1687723
+RMD160 e7d40a6677ce7c4442df7152150aecf812020713 atlas3.6.0.tar.bz2 1687723
+SHA256 1c2ad68fe3c66e261c012788fc1b6f74eada791f713848a3a6420c50fa35c8e8 atlas3.6.0.tar.bz2 1687723
diff --git a/sci-libs/blas-atlas/files/digest-blas-atlas-3.7.11-r1 b/sci-libs/blas-atlas/files/digest-blas-atlas-3.7.11-r1
new file mode 100644
index 000000000000..4f9a1ab52c6f
--- /dev/null
+++ b/sci-libs/blas-atlas/files/digest-blas-atlas-3.7.11-r1
@@ -0,0 +1,6 @@
+RMD160 96f9357049fb22e0955ff1375630e542b0bdee7c atlas3.6.0-shared-libs.1.patch.bz2 5148
+SHA256 f669030bf042808a4f4a92c746f3fd3067597d0ec94756ecac63bc331109c565 atlas3.6.0-shared-libs.1.patch.bz2 5148
+MD5 d2940721d6592f43a5d2e7740d13076d atlas3.6.0-shared-libs.1.patch.bz2 5148
+RMD160 f58b8a85c097bd1bff6a53ee42bcff97240fb8ec atlas3.7.11.tar.bz2 2032724
+SHA256 558b9f3f0dc8f63306f99f75d6e6fa762ea3d9d0dea88053e3e8b6f0e6364109 atlas3.7.11.tar.bz2 2032724
+MD5 ccde41dd4f41c47e16ebfa8e6dfd1117 atlas3.7.11.tar.bz2 2032724
diff --git a/sci-libs/blas-reference/ChangeLog b/sci-libs/blas-reference/ChangeLog
index 9feacc6f3ea7..17b0a0f7bc10 100644
--- a/sci-libs/blas-reference/ChangeLog
+++ b/sci-libs/blas-reference/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/blas-reference
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/ChangeLog,v 1.11 2006/06/18 17:09:27 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/ChangeLog,v 1.12 2006/07/03 08:05:02 spyderous Exp $
+
+*blas-reference-19940131-r4 (03 Jul 2006)
+
+ 03 Jul 2006; Donnie Berkholz <spyderous@gentoo.org>;
+ +blas-reference-19940131-r4.ebuild:
+ Bumps to switch to new eselect modules.
18 Jun 2006; Markus Rothe <corsair@gentoo.org>
blas-reference-19940131-r3.ebuild:
diff --git a/sci-libs/blas-reference/blas-reference-19940131-r4.ebuild b/sci-libs/blas-reference/blas-reference-19940131-r4.ebuild
new file mode 100644
index 000000000000..d725e04ebc6e
--- /dev/null
+++ b/sci-libs/blas-reference/blas-reference-19940131-r4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/blas-reference-19940131-r4.ebuild,v 1.1 2006/07/03 08:05:02 spyderous Exp $
+
+inherit autotools fortran multilib
+
+Name="blas"
+DESCRIPTION="FORTRAN reference implementation of the BLAS (linear algebra lib)"
+LICENSE="public-domain"
+HOMEPAGE="http://www.netlib.org/blas/"
+SRC_URI="http://www.netlib.org/blas/${Name}.tgz"
+
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="app-admin/eselect-blas"
+DEPEND="${RDEPEND}"
+
+PROVIDE="virtual/blas"
+
+#TODO: detect 64bit size from compiler, not eclass
+FORTRAN="g77 gfortran ifc" || FORTRAN="g77 gfortran f2c ifc" # No f2c on 64-bit systems yet :-/
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ cp "${FILESDIR}"/Makefile.am .
+ cp "${FILESDIR}"/configure.ac .
+ eautoreconf
+}
+
+src_install() {
+ # Profile information will be installed in TOP_PATH:
+ TOP_PATH="${DESTTREE}"/$(get_libdir)/blas
+ # Libraries will be installed in RPATH:
+ RPATH="${TOP_PATH}"/reference
+
+ make DESTDIR="${D}" install || die "install failed"
+
+ # Fix for switching
+ dodir ${RPATH}
+ mv ${D}/usr/$(get_libdir)/libblas* ${D}/${RPATH}
+
+ eselect blas add $(get_libdir) ${FILESDIR}/eselect-reference reference
+}
+
+pkg_postinst() {
+ if [[ -z "$(eselect blas show)" ]]; then
+ eselect blas set reference
+ fi
+}
diff --git a/sci-libs/blas-reference/files/digest-blas-reference-19940131-r4 b/sci-libs/blas-reference/files/digest-blas-reference-19940131-r4
new file mode 100644
index 000000000000..357d0835458a
--- /dev/null
+++ b/sci-libs/blas-reference/files/digest-blas-reference-19940131-r4
@@ -0,0 +1,3 @@
+MD5 5811e4b3dffa7a10956abf923cec1bd4 blas.tgz 94981
+RMD160 d2cea3ae6156b6f583fae5e590695ffb306abb80 blas.tgz 94981
+SHA256 bd062a79e35a9a835cfd8eaebe6262bbb195610336cf07435cd2b7df200bf084 blas.tgz 94981
diff --git a/sci-libs/cblas-reference/ChangeLog b/sci-libs/cblas-reference/ChangeLog
index 62aecf6e826a..fc60c053173b 100644
--- a/sci-libs/cblas-reference/ChangeLog
+++ b/sci-libs/cblas-reference/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/cblas-reference
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/cblas-reference/ChangeLog,v 1.6 2006/06/19 19:28:32 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/cblas-reference/ChangeLog,v 1.7 2006/07/03 08:05:39 spyderous Exp $
+
+*cblas-reference-20030223-r2 (03 Jul 2006)
+
+ 03 Jul 2006; Donnie Berkholz <spyderous@gentoo.org>;
+ +cblas-reference-20030223-r2.ebuild:
+ Bumps to switch to new eselect modules.
19 Jun 2006; Markus Rothe <corsair@gentoo.org>
cblas-reference-20030223-r1.ebuild:
diff --git a/sci-libs/cblas-reference/cblas-reference-20030223-r2.ebuild b/sci-libs/cblas-reference/cblas-reference-20030223-r2.ebuild
new file mode 100644
index 000000000000..c0fec249e956
--- /dev/null
+++ b/sci-libs/cblas-reference/cblas-reference-20030223-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/cblas-reference/cblas-reference-20030223-r2.ebuild,v 1.1 2006/07/03 08:05:39 spyderous Exp $
+
+inherit autotools eutils fortran multilib
+
+MyPN="${PN/-reference/}"
+
+DESCRIPTION="C interface to the BLAS"
+LICENSE="public-domain"
+HOMEPAGE="http://www.netlib.org/blas/"
+SRC_URI="http://www.netlib.org/blas/blast-forum/${MyPN}.tgz"
+
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="virtual/blas
+ app-admin/eselect-cblas"
+DEPEND="${RDEPEND}"
+
+FORTRAN="gfortran g77 ifc"
+
+S="${WORKDIR}/CBLAS"
+
+src_unpack() {
+ unpack ${A}
+ # Must patch before changing to S. Patches that create new files
+ # will happily apply anywhere.
+ epatch "${FILESDIR}"/${P}-autotool.patch
+ cd "${S}"
+ eautoreconf
+}
+
+src_install() {
+ TOP_PATH="${DESTTREE}/$(get_libdir)/blas"
+ RPATH="${TOP_PATH}/reference"
+
+ make DESTDIR="${D}" install || die "install failed"
+
+ # Fix for switching
+ dodir ${RPATH}
+ mv ${D}/usr/$(get_libdir)/libcblas* ${D}/${RPATH}
+
+ dodoc "${S}"/README || die "failed to install docs"
+
+ eselect cblas add $(get_libdir) ${FILESDIR}/eselect-reference reference
+}
+
+pkg_postinst() {
+ if [[ -z "$(eselect cblas show)" ]]; then
+ eselect cblas set reference
+ fi
+}
diff --git a/sci-libs/cblas-reference/files/digest-cblas-reference-20030223-r2 b/sci-libs/cblas-reference/files/digest-cblas-reference-20030223-r2
new file mode 100644
index 000000000000..823a069b1666
--- /dev/null
+++ b/sci-libs/cblas-reference/files/digest-cblas-reference-20030223-r2
@@ -0,0 +1,3 @@
+MD5 716329646ac933592a7cbdbeae9d3d06 cblas.tgz 197694
+RMD160 77bd5111659f55540c72f9fcd9277d97bd1ea33b cblas.tgz 197694
+SHA256 9b49d7177fda62b6141bf2ca29e475e86f0b12d8f72e0b944058d02b439dd52a cblas.tgz 197694
diff --git a/sci-libs/lapack-atlas/ChangeLog b/sci-libs/lapack-atlas/ChangeLog
index 8b2794f672d2..083524a2b224 100644
--- a/sci-libs/lapack-atlas/ChangeLog
+++ b/sci-libs/lapack-atlas/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-libs/lapack-atlas
# Copyright 2004-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/ChangeLog,v 1.12 2006/04/01 19:59:44 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/ChangeLog,v 1.13 2006/07/03 08:07:37 spyderous Exp $
+
+*lapack-atlas-3.7.11-r1 (03 Jul 2006)
+*lapack-atlas-3.6.0-r2 (03 Jul 2006)
+
+ 03 Jul 2006; Donnie Berkholz <spyderous@gentoo.org>;
+ +lapack-atlas-3.6.0-r2.ebuild, +lapack-atlas-3.7.11-r1.ebuild:
+ Bumps to switch to new eselect modules.
01 Apr 2006; Aron Griffis <agriffis@gentoo.org>
lapack-atlas-3.7.11.ebuild:
diff --git a/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0 b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0
index 06cd426ffd7f..d7090129d7e4 100644
--- a/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0
+++ b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0
@@ -1,5 +1,11 @@
MD5 743b75ec473ab0f0edda6b649aa89060 atlas3.6.0-shared-libs.patch.bz2 5140
MD5 df2ee2eb65d1c08ee93d04370172c262 atlas3.6.0.tar.bz2 1687723
MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
+RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
+SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+RMD160 2bc28b1c8bbc7b77d977562e3550097bdb2a379b lapack-gentoo.patch 1272
+SHA256 376b738c66dbbd8b116c3a48b99c1202dbd5c1c6c94865cf9df10ed48b78fb43 lapack-gentoo.patch 1272
MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
+RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
+SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r1 b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r1
index 06cd426ffd7f..d7090129d7e4 100644
--- a/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r1
+++ b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r1
@@ -1,5 +1,11 @@
MD5 743b75ec473ab0f0edda6b649aa89060 atlas3.6.0-shared-libs.patch.bz2 5140
MD5 df2ee2eb65d1c08ee93d04370172c262 atlas3.6.0.tar.bz2 1687723
MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
+RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
+SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+RMD160 2bc28b1c8bbc7b77d977562e3550097bdb2a379b lapack-gentoo.patch 1272
+SHA256 376b738c66dbbd8b116c3a48b99c1202dbd5c1c6c94865cf9df10ed48b78fb43 lapack-gentoo.patch 1272
MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
+RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
+SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r2 b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r2
new file mode 100644
index 000000000000..d7090129d7e4
--- /dev/null
+++ b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r2
@@ -0,0 +1,11 @@
+MD5 743b75ec473ab0f0edda6b649aa89060 atlas3.6.0-shared-libs.patch.bz2 5140
+MD5 df2ee2eb65d1c08ee93d04370172c262 atlas3.6.0.tar.bz2 1687723
+MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
+RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
+SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
+MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+RMD160 2bc28b1c8bbc7b77d977562e3550097bdb2a379b lapack-gentoo.patch 1272
+SHA256 376b738c66dbbd8b116c3a48b99c1202dbd5c1c6c94865cf9df10ed48b78fb43 lapack-gentoo.patch 1272
+MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
+RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
+SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.11 b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.11
index 0e7e991a1ae4..2e69d8d6ba74 100644
--- a/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.11
+++ b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.11
@@ -5,5 +5,11 @@ MD5 ccde41dd4f41c47e16ebfa8e6dfd1117 atlas3.7.11.tar.bz2 2032724
RMD160 f58b8a85c097bd1bff6a53ee42bcff97240fb8ec atlas3.7.11.tar.bz2 2032724
SHA256 558b9f3f0dc8f63306f99f75d6e6fa762ea3d9d0dea88053e3e8b6f0e6364109 atlas3.7.11.tar.bz2 2032724
MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
+RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
+SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+RMD160 2bc28b1c8bbc7b77d977562e3550097bdb2a379b lapack-gentoo.patch 1272
+SHA256 376b738c66dbbd8b116c3a48b99c1202dbd5c1c6c94865cf9df10ed48b78fb43 lapack-gentoo.patch 1272
MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
+RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
+SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.11-r1 b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.11-r1
new file mode 100644
index 000000000000..2e69d8d6ba74
--- /dev/null
+++ b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.7.11-r1
@@ -0,0 +1,15 @@
+MD5 d2940721d6592f43a5d2e7740d13076d atlas3.6.0-shared-libs.1.patch.bz2 5148
+RMD160 96f9357049fb22e0955ff1375630e542b0bdee7c atlas3.6.0-shared-libs.1.patch.bz2 5148
+SHA256 f669030bf042808a4f4a92c746f3fd3067597d0ec94756ecac63bc331109c565 atlas3.6.0-shared-libs.1.patch.bz2 5148
+MD5 ccde41dd4f41c47e16ebfa8e6dfd1117 atlas3.7.11.tar.bz2 2032724
+RMD160 f58b8a85c097bd1bff6a53ee42bcff97240fb8ec atlas3.7.11.tar.bz2 2032724
+SHA256 558b9f3f0dc8f63306f99f75d6e6fa762ea3d9d0dea88053e3e8b6f0e6364109 atlas3.7.11.tar.bz2 2032724
+MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
+RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
+SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
+MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+RMD160 2bc28b1c8bbc7b77d977562e3550097bdb2a379b lapack-gentoo.patch 1272
+SHA256 376b738c66dbbd8b116c3a48b99c1202dbd5c1c6c94865cf9df10ed48b78fb43 lapack-gentoo.patch 1272
+MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
+RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
+SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-atlas/lapack-atlas-3.6.0-r2.ebuild b/sci-libs/lapack-atlas/lapack-atlas-3.6.0-r2.ebuild
new file mode 100644
index 000000000000..14a017bff42a
--- /dev/null
+++ b/sci-libs/lapack-atlas/lapack-atlas-3.6.0-r2.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/lapack-atlas-3.6.0-r2.ebuild,v 1.1 2006/07/03 08:07:37 spyderous Exp $
+
+inherit eutils flag-o-matic toolchain-funcs fortran
+
+DESCRIPTION="Full LAPACK implementation using available ATLAS routines"
+LICENSE="BSD"
+HOMEPAGE="http://math-atlas.sourceforge.net/"
+MY_PN="${PN/lapack-/}"
+SRC_URI1="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2"
+SRC_URI2="http://www.netlib.org/lapack/lapack.tgz"
+SRC_URI="${SRC_URI1} ${SRC_URI2}
+ mirror://gentoo/lapack-20020531-20021004.patch.bz2
+ mirror://gentoo/lapack-gentoo.patch
+ mirror://gentoo/${MY_PN}3.6.0-shared-libs.patch.bz2"
+
+SLOT="0"
+IUSE="ifc doc"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+RDEPEND="virtual/libc
+ app-admin/eselect-lapack
+ virtual/blas
+ ifc? ( dev-lang/ifc )" # Need Intel runtime libraries
+
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-1.5
+ ~sci-libs/blas-atlas-3.6.0"
+
+PROVIDE="virtual/lapack"
+
+FORTRAN="g77 ifc"
+
+S="${WORKDIR}/ATLAS"
+S_LAPACK="${WORKDIR}/LAPACK"
+
+TOP_PATH="${DESTTREE}/lib/lapack"
+# Path where libraries will be installed:
+RPATH="${TOP_PATH}/atlas"
+
+ifc_info() {
+ if [ -z "${IFCFLAGS}" ]
+ then
+ einfo
+ einfo "You may want to set some ifc optimization flags by running this"
+ einfo "ebuild as, for example:"
+ einfo
+ einfo "IFCFLAGS=\"-O3 -tpp7 -xW\" emerge lapack-atlas"
+ einfo "(Pentium 4 exclusive optimizations)."
+ einfo
+ einfo "ifc defaults to -O2, with code tuned for Pentium 4, but that"
+ einfo "will run on any processor."
+ einfo
+ einfo "Beware that ifc's -O3 is very aggressive, sometimes resulting in"
+ einfo "significantly worse performance."
+ einfo
+ fi
+}
+
+src_unpack() {
+ use ifc && ifc_info
+ unpack ${A}
+
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}"/unbuffered.patch
+ epatch "${DISTDIR}"/atlas3.6.0-shared-libs.patch.bz2
+ epatch "${DISTDIR}"/lapack-20020531-20021004.patch.bz2
+ epatch "${DISTDIR}"/lapack-gentoo.patch
+ cp "${FILESDIR}"/war "${S}"
+ chmod a+x "${S}"/war
+}
+
+atlas_fail() {
+ eerror
+ eerror "ATLAS auto-config failed."
+ eerror "Please run 'interactive=1 emerge lapack-atlas' to configure"
+ eerror "manually."
+ eerror
+ die "ATLAS auto-config failed."
+}
+
+src_compile() {
+ cd "${S}"
+ if [ -n "${interactive}" ]; then
+ echo "${interactive}"
+ make config CC="$(tc-getCC) -DUSE_LIBTOOL -DINTERACTIVE" || die
+ else
+ # Use ATLAS defaults for all questions:
+ (echo | make config CC="$(tc-getCC) -DUSE_LIBTOOL") || atlas_fail
+ fi
+
+ TMPSTR=$(ls Make.Linux*)
+ ATLAS_ARCH=${TMPSTR#'Make.'}
+
+ CC="libtool --mode=compile --tag=CC $(tc-getCC) -I/usr/include/atlas"
+
+ cd "${S}"/src/lapack/${ATLAS_ARCH}
+ make lib CC="${CC}" || die
+
+ cd "${S}"/interfaces/lapack/C/src/${ATLAS_ARCH}
+ make lib CC="${CC}" || die
+
+ cd "${S}"/interfaces/lapack/F77/src/${ATLAS_ARCH}
+
+ make lib CC="${CC}" F77="libtool --mode=compile --tag=F77 g77" || die
+
+ cd "${S_LAPACK}"
+ if use ifc; then
+ FC="ifc"
+ FFLAGS="${IFCFLAGS}"
+ NOOPT="-O0" # Do NOT change this. It is applied to two files with
+ # routines to determine machine constants.
+ else
+ FC="g77"
+ # g77 hates opts, esp. machine-specific
+ ALLOWED_FLAGS="-O -O1 -O2 -fstack-protector -fno-unit-at-a-time \
+ -pipe -g -Wall"
+ strip-flags
+ FFLAGS="${CFLAGS}"
+ NOOPT=""
+ fi
+ make lapacklib FORTRAN="libtool --mode=compile --tag=F77 ${FC}" OPTS="${FFLAGS}" \
+ NOOPT="${NOOPT}" || die
+
+ cd "${S_LAPACK}"/SRC
+ cp -sf "${S}"/gentoo/liblapack.a/*.o .
+ cp -sf "${S}"/gentoo/liblapack.a/*.lo .
+ cp -sf "${S}"/gentoo/liblapack.a/.libs/*.o .libs/
+
+ if use ifc; then
+ ifc ${FFLAGS} -shared .libs/*.o -Wl,-soname -Wl,liblapack.so.0 \
+ -o liblapack.so.0.0.0 -lblas -lcblas -latlas \
+ -L$(gcc-config -L) -lg2c || die
+ ar cru liblapack.a *.o || die
+ ranlib liblapack.a || die
+ else
+ libtool --mode=link --tag=CC $(tc-getCC) -o liblapack.la *.lo \
+ -rpath "${RPATH}" -lblas -lcblas -latlas -lg2c || die
+ fi
+}
+
+src_install () {
+ dodir "${RPATH}"
+
+ cd "${S_LAPACK}"/SRC
+ if use ifc; then
+ strip --strip-unneeded liblapack.so.0.0.0 || die
+ strip --strip-debug liblapack.a || die
+
+ exeinto "${RPATH}"
+ doexe liblapack.so.0.0.0 || die
+ dosym liblapack.so.0.0.0 ${RPATH}/liblapack.so.0 || die
+ dosym liblapack.so.0.0.0 ${RPATH}/liblapack.so || die
+
+ insinto "${RPATH}"
+ doins liblapack.a || die
+ else
+ libtool --mode=install install -s liblapack.la "${D}/${RPATH}" || die
+ fi
+
+ eselect lapack add $(get_libdir) ${FILESDIR}/eselect.lapack atlas
+
+ insinto /usr/include/atlas
+ cd "${S}"/include
+ doins clapack.h atlas_misc.h atlas_enum.h || die
+
+ cd "${S}"
+ dodoc README || die
+ cd "${S}"/doc
+ dodoc AtlasCredits.txt ChangeLog || die
+ if use doc; then
+ dodoc lapackqref.ps || die
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "$(eselect lapack show)" ]]; then
+ eselect lapack set atlas
+ fi
+
+ einfo
+ einfo "To link with ATLAS LAPACK from C or Fortran, simply use:"
+ einfo
+ einfo "-llapack"
+ einfo
+ einfo "C users: your header is /usr/include/atlas/clapack.h"
+ einfo
+}
diff --git a/sci-libs/lapack-atlas/lapack-atlas-3.7.11-r1.ebuild b/sci-libs/lapack-atlas/lapack-atlas-3.7.11-r1.ebuild
new file mode 100644
index 000000000000..a7e1d55a51a8
--- /dev/null
+++ b/sci-libs/lapack-atlas/lapack-atlas-3.7.11-r1.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/lapack-atlas-3.7.11-r1.ebuild,v 1.1 2006/07/03 08:07:37 spyderous Exp $
+
+inherit eutils flag-o-matic toolchain-funcs fortran
+
+DESCRIPTION="Full LAPACK implementation using available ATLAS routines"
+LICENSE="BSD"
+HOMEPAGE="http://math-atlas.sourceforge.net/"
+MY_PN="${PN/lapack-/}"
+SRC_URI1="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2"
+SRC_URI2="http://www.netlib.org/lapack/lapack.tgz"
+SRC_URI="${SRC_URI1} ${SRC_URI2}
+ mirror://gentoo/lapack-20020531-20021004.patch.bz2
+ mirror://gentoo/lapack-gentoo.patch
+ mirror://gentoo/${MY_PN}3.6.0-shared-libs.1.patch.bz2"
+
+SLOT="0"
+IUSE="ifc doc"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+RDEPEND="virtual/libc
+ app-admin/eselect-lapack
+ virtual/blas
+ ifc? ( dev-lang/ifc )" # Need Intel runtime libraries
+
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-1.5
+ ~sci-libs/blas-atlas-3.7.11"
+
+PROVIDE="virtual/lapack"
+
+FORTRAN="g77 gfortran ifc"
+
+S="${WORKDIR}/ATLAS"
+S_LAPACK="${WORKDIR}/LAPACK"
+
+TOP_PATH="${DESTTREE}/$(get_libdir)/lapack"
+# Path where libraries will be installed:
+RPATH="${TOP_PATH}/atlas"
+
+ifc_info() {
+ if [ -z "${IFCFLAGS}" ]
+ then
+ einfo
+ einfo "You may want to set some ifc optimization flags by running this"
+ einfo "ebuild as, for example:"
+ einfo
+ einfo "IFCFLAGS=\"-O3 -tpp7 -xW\" emerge lapack-atlas"
+ einfo "(Pentium 4 exclusive optimizations)."
+ einfo
+ einfo "ifc defaults to -O2, with code tuned for Pentium 4, but that"
+ einfo "will run on any processor."
+ einfo
+ einfo "Beware that ifc's -O3 is very aggressive, sometimes resulting in"
+ einfo "significantly worse performance."
+ einfo
+ fi
+}
+
+src_unpack() {
+ use ifc && ifc_info
+ unpack ${A}
+
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}"/unbuffered.patch
+ epatch "${FILESDIR}"/${PV}-allow-any-gcc-version.patch
+ epatch "${DISTDIR}"/atlas3.6.0-shared-libs.1.patch.bz2
+ epatch "${DISTDIR}"/lapack-20020531-20021004.patch.bz2
+ epatch "${DISTDIR}"/lapack-gentoo.patch
+ cp "${FILESDIR}"/war "${S}"
+ chmod a+x "${S}"/war
+
+ einfo "Making ${PN} respect compiler settings"
+ sed -i \
+ -e "s:\(\t./xconfig\):\1 -m $(tc-getCC) -c $(tc-getCC) -f ${FORTRANC}:g" \
+ ${S}/Makefile \
+ || die "Failed to fix compilers"
+
+ if [[ $(gcc-major-version) -ge 4 ]]; then
+ einfo "Updating Makefiles for gcc-4"
+ sed -i \
+ -e "s:g2c:gfortran:g" \
+ ${S}/Make.top \
+ ${S}/makes/Make.lib \
+ || die "Failed to update for gcc-4"
+ fi
+}
+
+atlas_fail() {
+ eerror
+ eerror "ATLAS auto-config failed."
+ eerror "Please run 'interactive=1 emerge lapack-atlas' to configure"
+ eerror "manually."
+ eerror
+ die "ATLAS auto-config failed."
+}
+
+src_compile() {
+ cd "${S}"
+ if [ -n "${interactive}" ]; then
+ echo "${interactive}"
+ make config CC="$(tc-getCC) -DUSE_LIBTOOL -DINTERACTIVE" || die
+ else
+ # Use ATLAS defaults for all questions:
+ (echo | make config CC="$(tc-getCC) -DUSE_LIBTOOL") || atlas_fail
+ fi
+
+ TMPSTR=$(ls Make.Linux*)
+ ATLAS_ARCH=${TMPSTR#'Make.'}
+
+ GENTOO_CC="libtool --mode=compile --tag=CC $(tc-getCC) -I/usr/include/atlas"
+
+ cd "${S}"/src/lapack/${ATLAS_ARCH}
+ make lib CC="${GENTOO_CC}" \
+ || die "Failed to make lib in ${S}/src/lapack/${ATLAS_ARCH}"
+
+ cd "${S}"/interfaces/lapack/C/src/${ATLAS_ARCH}
+ make lib CC="${GENTOO_CC}" \
+ || die "Failed to make lib in ${S}/interfaces/lapack/C/src/${ATLAS_ARCH}"
+
+ cd "${S}"/interfaces/lapack/F77/src/${ATLAS_ARCH}
+
+ make lib CC="${GENTOO_CC}" F77="libtool --mode=compile --tag=F77 ${FORTRANC}" \
+ || die "Failed to make lib in ${S}/interfaces/lapack/F77/src/${ATLAS_ARCH}"
+
+ cd "${S_LAPACK}"
+ if use ifc; then
+ FFLAGS="${IFCFLAGS}"
+ NOOPT="-O0" # Do NOT change this. It is applied to two files with
+ # routines to determine machine constants.
+ else
+ # g77 hates opts, esp. machine-specific
+ ALLOWED_FLAGS="-O -O1 -O2 -fstack-protector -fno-unit-at-a-time \
+ -pipe -g -Wall"
+ strip-flags
+ FFLAGS="${CFLAGS}"
+ NOOPT=""
+ fi
+ make lapacklib FORTRAN="libtool --mode=compile --tag=F77 ${FORTRANC}" OPTS="${FFLAGS}" \
+ NOOPT="${NOOPT}" || die "Failed to make lapacklib"
+
+ cd "${S_LAPACK}"/SRC
+ einfo "Copying liblapack.a/*.o to ${S_LAPACK}/SRC"
+ cp -sf "${S}"/gentoo/liblapack.a/*.o .
+ einfo "Copying liblapack.a/*.lo to ${S_LAPACK}/SRC"
+ cp -sf "${S}"/gentoo/liblapack.a/*.lo .
+ einfo "Copying liblapack.a/.libs/*.o to ${S_LAPACK}/SRC"
+ cp -sf "${S}"/gentoo/liblapack.a/.libs/*.o .libs/
+
+ local FORTRANLIB
+ if [[ $(gcc-major-version) -ge 4 ]]; then
+ FORTRANLIB="-lgfortran"
+ else
+ FORTRANLIB="-lg2c"
+ fi
+ einfo "Fortran library is ${FORTRANLIB}"
+
+ if use ifc; then
+ ${FORTRANC} ${FFLAGS} -shared .libs/*.o -Wl,-soname -Wl,liblapack.so.0 \
+ -o liblapack.so.0.0.0 -lblas -lcblas -latlas \
+ -L$(gcc-config -L) ${FORTRANLIB} \
+ || die "Failed to create liblapack.so.0.0.0"
+ ar cru liblapack.a *.o || die "Failed to create liblapack.a"
+ ranlib liblapack.a || die "Failed to prepare liblapack.a"
+ else
+ libtool --mode=link --tag=CC $(tc-getCC) -o liblapack.la *.lo \
+ -rpath "${RPATH}" -lblas -lcblas -latlas ${FORTRANLIB} \
+ || die "Failed to create liblapack.la"
+ fi
+}
+
+src_install () {
+ dodir "${RPATH}"
+
+ cd "${S_LAPACK}"/SRC
+ if use ifc; then
+ strip --strip-unneeded liblapack.so.0.0.0 || die
+ strip --strip-debug liblapack.a || die
+
+ exeinto "${RPATH}"
+ doexe liblapack.so.0.0.0 || die
+ dosym liblapack.so.0.0.0 ${RPATH}/liblapack.so.0 || die
+ dosym liblapack.so.0.0.0 ${RPATH}/liblapack.so || die
+
+ insinto "${RPATH}"
+ doins liblapack.a || die
+ else
+ libtool --mode=install install -s liblapack.la "${D}/${RPATH}" || die
+ fi
+
+ eselect lapack add $(get_libdir) ${FILESDIR}/eselect.lapack atlas
+
+ insinto /usr/include/atlas
+ cd "${S}"/include
+ doins clapack.h || die
+
+ cd "${S}"
+ dodoc README || die
+ cd "${S}"/doc
+ dodoc AtlasCredits.txt ChangeLog || die
+ if use doc; then
+ dodoc lapackqref.ps || die
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "$(eselect lapack show)" ]]; then
+ eselect lapack set atlas
+ fi
+
+ einfo
+ einfo "To link with ATLAS LAPACK from C or Fortran, simply use:"
+ einfo
+ einfo "-llapack"
+ einfo
+ einfo "C users: your header is /usr/include/atlas/clapack.h"
+ einfo
+}
diff --git a/sci-libs/lapack-reference/ChangeLog b/sci-libs/lapack-reference/ChangeLog
index 035fb401c06c..f00469977a12 100644
--- a/sci-libs/lapack-reference/ChangeLog
+++ b/sci-libs/lapack-reference/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/lapack-reference
# Copyright 2004-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-reference/ChangeLog,v 1.8 2006/06/18 17:19:34 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-reference/ChangeLog,v 1.9 2006/07/03 08:06:15 spyderous Exp $
+
+*lapack-reference-3.0-r4 (03 Jul 2006)
+
+ 03 Jul 2006; Donnie Berkholz <spyderous@gentoo.org>;
+ +lapack-reference-3.0-r4.ebuild:
+ Bumps to switch to new eselect modules.
18 Jun 2006; Markus Rothe <corsair@gentoo.org>
lapack-reference-3.0-r3.ebuild:
diff --git a/sci-libs/lapack-reference/files/digest-lapack-reference-3.0 b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0
index 20d79acb3756..eca55e1526e5 100644
--- a/sci-libs/lapack-reference/files/digest-lapack-reference-3.0
+++ b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0
@@ -2,6 +2,8 @@ MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+RMD160 2bc28b1c8bbc7b77d977562e3550097bdb2a379b lapack-gentoo.patch 1272
+SHA256 376b738c66dbbd8b116c3a48b99c1202dbd5c1c6c94865cf9df10ed48b78fb43 lapack-gentoo.patch 1272
MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r1 b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r1
index 20d79acb3756..eca55e1526e5 100644
--- a/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r1
+++ b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r1
@@ -2,6 +2,8 @@ MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+RMD160 2bc28b1c8bbc7b77d977562e3550097bdb2a379b lapack-gentoo.patch 1272
+SHA256 376b738c66dbbd8b116c3a48b99c1202dbd5c1c6c94865cf9df10ed48b78fb43 lapack-gentoo.patch 1272
MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r2 b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r2
index 20d79acb3756..eca55e1526e5 100644
--- a/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r2
+++ b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r2
@@ -2,6 +2,8 @@ MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+RMD160 2bc28b1c8bbc7b77d977562e3550097bdb2a379b lapack-gentoo.patch 1272
+SHA256 376b738c66dbbd8b116c3a48b99c1202dbd5c1c6c94865cf9df10ed48b78fb43 lapack-gentoo.patch 1272
MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r4 b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r4
new file mode 100644
index 000000000000..613b0f3cf432
--- /dev/null
+++ b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r4
@@ -0,0 +1,6 @@
+MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
+RMD160 126a579d242664dce53d23cdd7bef935e81b5031 lapack-20020531-20021004.patch.bz2 59736
+SHA256 19bcae60fcec3742563d8b27e21da52677b18520c54cf0cb7a51537ec3dbd29c lapack-20020531-20021004.patch.bz2 59736
+MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
+RMD160 630f9d7b4b37b0d39bccd4816198271b7e9e0cce lapack.tgz 4991992
+SHA256 393613641f80745e7e8445fd0f3e4f5f66a5e340c8115cd4d780b0f53e2b31a6 lapack.tgz 4991992
diff --git a/sci-libs/lapack-reference/lapack-reference-3.0-r4.ebuild b/sci-libs/lapack-reference/lapack-reference-3.0-r4.ebuild
new file mode 100644
index 000000000000..392ae9d55614
--- /dev/null
+++ b/sci-libs/lapack-reference/lapack-reference-3.0-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2006 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.0-r4.ebuild,v 1.1 2006/07/03 08:06:15 spyderous Exp $
+
+inherit autotools eutils fortran multilib
+
+MyPN="${PN/-reference/}"
+
+DESCRIPTION="FORTRAN reference implementation of LAPACK Linear Algebra PACKage"
+LICENSE="lapack"
+HOMEPAGE="http://www.netlib.org/lapack/index.html"
+SRC_URI="http://www.netlib.org/lapack/${MyPN}.tgz
+ mirror://gentoo/${MyPN}-20020531-20021004.patch.bz2"
+
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="virtual/blas
+ app-admin/eselect-lapack"
+
+DEPEND="${RDEPEND}"
+
+PROVIDE="virtual/lapack"
+
+FORTRAN="g77 gfortran ifc"
+
+S="${WORKDIR}/LAPACK"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${DISTDIR}"/lapack-20020531-20021004.patch.bz2
+ epatch ${FILESDIR}/${P}-autotool.patch
+ cd "${S}"
+ eautoreconf
+}
+
+src_install() {
+ TOP_PATH="${DESTTREE}"/lib/lapack
+ # Library will be installed in RPATH:
+ RPATH="${TOP_PATH}"/reference
+
+ make DESTDIR="${D}" install || die "install failed"
+
+ # Fix for switching
+ dodir ${RPATH}
+ mv ${D}/usr/$(get_libdir)/liblapack* ${D}/${RPATH}
+
+ dodoc "${S}"/README
+
+ eselect lapack add $(get_libdir) ${FILESDIR}/eselect-reference reference
+}
+
+pkg_postinst() {
+ if [[ -z "$(eselect lapack show)" ]]; then
+ eselect lapack set reference
+ fi
+}