diff options
author | George Shapovalov <george@gentoo.org> | 2004-06-15 02:02:27 +0000 |
---|---|---|
committer | George Shapovalov <george@gentoo.org> | 2004-06-15 02:02:27 +0000 |
commit | af1c726930ea7af123f30f914dc02daadf23257d (patch) | |
tree | 303bbf96d1ca882ce850531059ddb0df077a6968 /app-sci | |
parent | bump 49606 (diff) | |
download | historical-af1c726930ea7af123f30f914dc02daadf23257d.tar.gz historical-af1c726930ea7af123f30f914dc02daadf23257d.tar.bz2 historical-af1c726930ea7af123f30f914dc02daadf23257d.zip |
initial commit: reference implementation of lapack
Diffstat (limited to 'app-sci')
-rw-r--r-- | app-sci/lapack-reference/ChangeLog | 8 | ||||
-rw-r--r-- | app-sci/lapack-reference/Manifest | 5 | ||||
-rw-r--r-- | app-sci/lapack-reference/files/digest-lapack-reference-3.0 | 3 | ||||
-rw-r--r-- | app-sci/lapack-reference/files/f77-reference | 14 | ||||
-rw-r--r-- | app-sci/lapack-reference/lapack-reference-3.0.ebuild | 136 | ||||
-rw-r--r-- | app-sci/lapack-reference/metadata.xml | 5 |
6 files changed, 171 insertions, 0 deletions
diff --git a/app-sci/lapack-reference/ChangeLog b/app-sci/lapack-reference/ChangeLog new file mode 100644 index 000000000000..6e641563bbb5 --- /dev/null +++ b/app-sci/lapack-reference/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for app-sci/lapack-reference +# Copyright 2004-2004 Gentoo Technologies, Inc.; Distributed under the GPL +# $Header: /var/cvsroot/gentoo-x86/app-sci/lapack-reference/ChangeLog,v 1.1 2004/06/15 02:02:27 george Exp $ + + 14 Jun 2004; George Shapovalov <george@gentoo.org> lapack-reference-3.0.ebuild, files/{digest-lapack-reference-3.0,f77-reference} : + initial release (#30463) + Full LAPACK implementation using the netlib reference implementation + ebuild submitted by Derek Dolney <dolney@astro.upenn.edu> diff --git a/app-sci/lapack-reference/Manifest b/app-sci/lapack-reference/Manifest new file mode 100644 index 000000000000..dbb3a1a2b913 --- /dev/null +++ b/app-sci/lapack-reference/Manifest @@ -0,0 +1,5 @@ +MD5 8c3acbe1f1f7455bb815ecbbf2443bf2 lapack-reference-3.0.ebuild 3194 +MD5 3c1724fa84db5477f0587f3509c16ee1 ChangeLog 518 +MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156 +MD5 0c26dd04f98f6c5cb6fdddfaa2c50905 files/f77-reference 436 +MD5 94944935d82f5f98cc414ddd175839c7 files/digest-lapack-reference-3.0 196 diff --git a/app-sci/lapack-reference/files/digest-lapack-reference-3.0 b/app-sci/lapack-reference/files/digest-lapack-reference-3.0 new file mode 100644 index 000000000000..8579dfaa3215 --- /dev/null +++ b/app-sci/lapack-reference/files/digest-lapack-reference-3.0 @@ -0,0 +1,3 @@ +MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992 +MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736 +MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272 diff --git a/app-sci/lapack-reference/files/f77-reference b/app-sci/lapack-reference/files/f77-reference new file mode 100644 index 000000000000..8ffa3ead91a5 --- /dev/null +++ b/app-sci/lapack-reference/files/f77-reference @@ -0,0 +1,14 @@ +F77LIBS="-L/usr/lib/lapack/reference -llapack" + +setup() { + +einfo "/usr/lib/liblapack.so -> lapack/reference/liblapack.so" +ln -sf lapack/reference/liblapack.so /usr/lib/liblapack.so + +einfo "/usr/lib/liblapack.so.0 -> lapack/reference/liblapack.so.0" +ln -sf lapack/reference/liblapack.so.0 /usr/lib/liblapack.so.0 + +einfo "/usr/lib/liblapack.a -> lapack/reference/liblapack.a" +ln -sf lapack/reference/liblapack.a /usr/lib/liblapack.a + +} diff --git a/app-sci/lapack-reference/lapack-reference-3.0.ebuild b/app-sci/lapack-reference/lapack-reference-3.0.ebuild new file mode 100644 index 000000000000..3e1a801ea6bf --- /dev/null +++ b/app-sci/lapack-reference/lapack-reference-3.0.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-sci/lapack-reference/lapack-reference-3.0.ebuild,v 1.1 2004/06/15 02:02:27 george Exp $ + +inherit eutils + +MyPN=${PN/-reference/} + +DESCRIPTION="FORTRAN reference implementation of LAPACK Linear Algebra PACKage" +HOMEPAGE="http://www.netlib.org/lapack/index.html" +SRC_URI="http://www.netlib.org/lapack/${MyPN}.tgz + mirror://gentoo/${MyPN}-20020531-20021004.patch.bz2 + mirror://gentoo/${MyPN}-gentoo.patch" + +LICENSE="lapack" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="sys-devel/libtool + app-sci/lapack-config + ifc? ( dev-lang/ifc )" + +RDEPEND="virtual/blas + ifc? ( dev-lang/ifc )" # Need ifc runtime libraries + +PROVIDE="virtual/lapack" + +S=${WORKDIR}/LAPACK + +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, \`IFCFLAGS=\"-O3 -tpp7 -xW\" emerge blas\`" + 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 + sleep 5 + fi +} + +pkg_setup() { + # This version of lapack *can* be build completely with ifc + use ifc || \ + if [ -z `which g77` ]; then + eerror "g77 not found on the system!" + eerror "Please add f77 to your USE flags and reemerge gcc!" + die + fi +} + +src_unpack() { + unpack ${A} + epatch ${DISTDIR}/lapack-20020531-20021004.patch.bz2 + epatch ${DISTDIR}/lapack-gentoo.patch +} + +src_compile() { + TOP_PATH=${DESTTREE}/lib/lapack + # Library will be installed in RPATH: + RPATH=${TOP_PATH}/reference + + 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. + ifc_info + else + FC="g77" + FFLAGS="${CFLAGS}" + NOOPT="" + # libg2c is required to link with liblapack.so using ifc: + DEP_LIBS="-lg2c" + fi + + DEP_LIBS="${DEP_LIBS} -lblas" + + cd ${S}/SRC + make all \ + FORTRAN="libtool --mode=compile --tag=F77 ${FC}"\ + OPTS="${FFLAGS}"\ + NOOPT="${NOOPT}" \ + || die + + if [ "`use ifc`" ] + then + ${FC} -shared ${FFLAGS} *.lo ${DEP_LIBS} \ + -Wl,-soname -Wl,liblapack.so.0 -o liblapack.so.0.0.0 \ + -Vaxlib # Intel portability library that provides the etime function + ar cru liblapack.a *.o + ranlib liblapack.a + else + libtool --mode=link --tag=CC ${FC} ${FFLAGS} -o liblapack.la *.lo \ + -rpath ${RPATH} ${DEP_LIBS} + fi +} + +src_install() { + dodir ${RPATH} + + cd ${S}/SRC + + if [ "`use ifc`" ] + then + strip --strip-unneeded liblapack.so.0.0.0 + strip --strip-debug liblapack.a + + exeinto ${RPATH} + doexe liblapack.so.0.0.0 + dosym liblapack.so.0.0.0 ${RPATH}/liblapack.so.0 + dosym liblapack.so.0.0.0 ${RPATH}/liblapack.so + + insinto ${RPATH} + doins liblapack.a + else + libtool --mode=install install -s liblapack.la ${D}/${RPATH} + fi + + insinto ${TOP_PATH} + doins ${FILESDIR}/f77-reference + + dodoc ${S}/README +} + +pkg_postinst() { + ${DESTTREE}/bin/lapack-config reference +} diff --git a/app-sci/lapack-reference/metadata.xml b/app-sci/lapack-reference/metadata.xml new file mode 100644 index 000000000000..b229aec85b8f --- /dev/null +++ b/app-sci/lapack-reference/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci</herd> +</pkgmetadata> |