summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Shapovalov <george@gentoo.org>2004-05-12 03:05:59 +0000
committerGeorge Shapovalov <george@gentoo.org>2004-05-12 03:05:59 +0000
commitde719cb520b581cb122549dee46a7e49f30692bd (patch)
tree003e05e10280d3e93a31305d14cdfefa1bd1b7a0 /app-sci
parentrepoman failed me last night with this version bump (#50735) (Manifest recommit) (diff)
downloadgentoo-2-de719cb520b581cb122549dee46a7e49f30692bd.tar.gz
gentoo-2-de719cb520b581cb122549dee46a7e49f30692bd.tar.bz2
gentoo-2-de719cb520b581cb122549dee46a7e49f30692bd.zip
added atlas implementation of lapack, masked untill all of lapack stuff gets processed
Diffstat (limited to 'app-sci')
-rw-r--r--app-sci/lapack-atlas/ChangeLog10
-rw-r--r--app-sci/lapack-atlas/Manifest7
-rw-r--r--app-sci/lapack-atlas/files/atlas3.6.0-shared-libs.patch.bz2bin0 -> 5140 bytes
-rw-r--r--app-sci/lapack-atlas/files/digest-lapack-atlas-3.6.02
-rw-r--r--app-sci/lapack-atlas/files/f77-ATLAS14
-rw-r--r--app-sci/lapack-atlas/files/lapack-20020531-20021004.patch.bz2bin0 -> 59736 bytes
-rw-r--r--app-sci/lapack-atlas/files/lapack-gentoo.patch40
-rw-r--r--app-sci/lapack-atlas/files/war26
-rw-r--r--app-sci/lapack-atlas/lapack-atlas-3.6.0.ebuild195
-rw-r--r--app-sci/lapack-atlas/metadata.xml5
10 files changed, 299 insertions, 0 deletions
diff --git a/app-sci/lapack-atlas/ChangeLog b/app-sci/lapack-atlas/ChangeLog
new file mode 100644
index 000000000000..5cd0148dc2ab
--- /dev/null
+++ b/app-sci/lapack-atlas/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for app-sci/lapack-atlas
+# Copyright 2004 Gentoo Technologies, Inc.; Distributed under the GPL
+# $Header: /var/cvsroot/gentoo-x86/app-sci/lapack-atlas/ChangeLog,v 1.1 2004/05/12 03:05:59 george Exp $
+
+*lapack-atlas-3.6.0.ebuild (11 May 2004)
+
+ 11 May 2004; George Shapovalov <george@gentoo.org> lapack-atlas-3.6.0.ebuild, Manifest, files/{atlas3.6.0-shared-libs.patch.bz2,digest-lapack-atlas-3.6.0,f77-ATLAS,lapack-20020531-20021004.patch.bz2,lapack-gentoo.patch,war} :
+ initial release (#30459)
+ Full LAPACK implementation using available ATLAS routines
+ ebuild submitted by Derek Dolney <dolney@astro.upenn.edu>
diff --git a/app-sci/lapack-atlas/Manifest b/app-sci/lapack-atlas/Manifest
new file mode 100644
index 000000000000..009e01c2108c
--- /dev/null
+++ b/app-sci/lapack-atlas/Manifest
@@ -0,0 +1,7 @@
+MD5 2324b79db8136cd9619fcffa805d3909 lapack-atlas-3.6.0.ebuild 4126
+MD5 13d26350d75e6993f1b3ec48ca97f14e files/war 545
+MD5 4192870be88e09ba8c6a805eb31fcfb4 files/lapack-gentoo.patch 1272
+MD5 0a2d37412e48cc9961d9628308ac9ccd files/digest-lapack-atlas-3.6.0 120
+MD5 1b77dbffbf246309e6e97c77b64735fd files/f77-ATLAS 408
+MD5 04754a65f6aae20df09432cd1d3c3d6f files/atlas3.6.0-shared-libs.patch.bz2 5027
+MD5 c35802e688f28f8f65632fb93aad69d8 files/lapack-20020531-20021004.patch.bz2 59736
diff --git a/app-sci/lapack-atlas/files/atlas3.6.0-shared-libs.patch.bz2 b/app-sci/lapack-atlas/files/atlas3.6.0-shared-libs.patch.bz2
new file mode 100644
index 000000000000..593118a7c22a
--- /dev/null
+++ b/app-sci/lapack-atlas/files/atlas3.6.0-shared-libs.patch.bz2
Binary files differ
diff --git a/app-sci/lapack-atlas/files/digest-lapack-atlas-3.6.0 b/app-sci/lapack-atlas/files/digest-lapack-atlas-3.6.0
new file mode 100644
index 000000000000..f8ae1964c0e3
--- /dev/null
+++ b/app-sci/lapack-atlas/files/digest-lapack-atlas-3.6.0
@@ -0,0 +1,2 @@
+MD5 df2ee2eb65d1c08ee93d04370172c262 atlas3.6.0.tar.bz2 1687723
+MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
diff --git a/app-sci/lapack-atlas/files/f77-ATLAS b/app-sci/lapack-atlas/files/f77-ATLAS
new file mode 100644
index 000000000000..edf4fc467c65
--- /dev/null
+++ b/app-sci/lapack-atlas/files/f77-ATLAS
@@ -0,0 +1,14 @@
+F77LIBS="-L/usr/lib/lapack/atlas -llapack"
+
+setup() {
+
+einfo "/usr/lib/liblapack.so -> lapack/atlas/liblapack.so"
+ln -sf lapack/atlas/liblapack.so /usr/lib/liblapack.so
+
+einfo "/usr/lib/liblapack.so.0 -> lapack/atlas/liblapack.so.0"
+ln -sf lapack/atlas/liblapack.so.0 /usr/lib/liblapack.so.0
+
+einfo "/usr/lib/liblapack.a -> lapack/atlas/liblapack.a"
+ln -sf lapack/atlas/liblapack.a /usr/lib/liblapack.a
+
+}
diff --git a/app-sci/lapack-atlas/files/lapack-20020531-20021004.patch.bz2 b/app-sci/lapack-atlas/files/lapack-20020531-20021004.patch.bz2
new file mode 100644
index 000000000000..e6663669d654
--- /dev/null
+++ b/app-sci/lapack-atlas/files/lapack-20020531-20021004.patch.bz2
Binary files differ
diff --git a/app-sci/lapack-atlas/files/lapack-gentoo.patch b/app-sci/lapack-atlas/files/lapack-gentoo.patch
new file mode 100644
index 000000000000..34354cc4812e
--- /dev/null
+++ b/app-sci/lapack-atlas/files/lapack-gentoo.patch
@@ -0,0 +1,40 @@
+diff -ur LAPACK/SRC/Makefile LAPACK-gentoo/SRC/Makefile
+--- LAPACK/SRC/Makefile 1999-11-04 14:26:09.000000000 -0500
++++ LAPACK-gentoo/SRC/Makefile 2003-09-24 21:45:21.000000000 -0400
+@@ -280,24 +280,24 @@
+ all: single complex double complex16
+
+ single: $(SLASRC) $(ALLAUX) $(SCLAUX)
+- $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(ALLAUX) \
+- $(SCLAUX)
+- $(RANLIB) ../$(LAPACKLIB)
++# $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(ALLAUX) \
++# $(SCLAUX)
++# $(RANLIB) ../$(LAPACKLIB)
+
+ complex: $(CLASRC) $(ALLAUX) $(SCLAUX)
+- $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(CLASRC) $(ALLAUX) \
+- $(SCLAUX)
+- $(RANLIB) ../$(LAPACKLIB)
++# $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(CLASRC) $(ALLAUX) \
++# $(SCLAUX)
++# $(RANLIB) ../$(LAPACKLIB)
+
+ double: $(DLASRC) $(ALLAUX) $(DZLAUX)
+- $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(DLASRC) $(ALLAUX) \
+- $(DZLAUX)
+- $(RANLIB) ../$(LAPACKLIB)
++# $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(DLASRC) $(ALLAUX) \
++# $(DZLAUX)
++# $(RANLIB) ../$(LAPACKLIB)
+
+ complex16: $(ZLASRC) $(ALLAUX) $(DZLAUX)
+- $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(ZLASRC) $(ALLAUX) \
+- $(DZLAUX)
+- $(RANLIB) ../$(LAPACKLIB)
++# $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(ZLASRC) $(ALLAUX) \
++# $(DZLAUX)
++# $(RANLIB) ../$(LAPACKLIB)
+
+ $(ALLAUX): $(FRC)
+ $(SCLAUX): $(FRC)
diff --git a/app-sci/lapack-atlas/files/war b/app-sci/lapack-atlas/files/war
new file mode 100644
index 000000000000..2093f033ad77
--- /dev/null
+++ b/app-sci/lapack-atlas/files/war
@@ -0,0 +1,26 @@
+#! /bin/bash
+#
+# war -- wrapper for the archiver
+#
+# Executed by ATLAS build as:
+# full_path/war ARCHIVER ARFLAGS LIBNAME.a OBJS.lo
+
+TOPDIR=$(echo $0 | sed 's/\(.*\)\/.*/\1/')
+PWD=$(pwd)
+
+ARCHIVER=$1
+LIBRARY=$(echo $3 | sed 's/.*\/\(.*\)/\1/')
+OBJ_DIR=${TOPDIR}/gentoo/$LIBRARY
+
+if [ ! -x $OBJ_DIR ]; then mkdir -p ${OBJ_DIR}/.libs; fi
+
+$ARCHIVER $@
+
+shift 3
+for obj in $@ ; do
+ lobj=$(echo $obj | sed 's/\.o/\.lo/')
+ ln -sf ${PWD}/$obj ${OBJ_DIR}/$obj
+ ln -sf ${PWD}/$lobj ${OBJ_DIR}/$lobj
+ ln -sf ${PWD}/.libs/$obj ${OBJ_DIR}/.libs/$obj
+done
+
diff --git a/app-sci/lapack-atlas/lapack-atlas-3.6.0.ebuild b/app-sci/lapack-atlas/lapack-atlas-3.6.0.ebuild
new file mode 100644
index 000000000000..fad57f9c44c1
--- /dev/null
+++ b/app-sci/lapack-atlas/lapack-atlas-3.6.0.ebuild
@@ -0,0 +1,195 @@
+# 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-atlas/lapack-atlas-3.6.0.ebuild,v 1.1 2004/05/12 03:05:59 george Exp $
+
+inherit eutils
+
+DESCRIPTION="Full LAPACK implementation using available ATLAS routines"
+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}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="ifc doc"
+
+DEPEND="virtual/glibc
+ ifc? ( >=sys-devel/libtool-1.5 ) : ( sys-devel/libtool )
+ =app-sci/blas-atlas-3.6.0
+ app-sci/lapack-config
+ ifc? ( dev-lang/ifc )"
+
+RDEPEND="virtual/glibc
+ virtual/blas
+ ifc? ( dev-lang/ifc )" # Need Intel runtime libraries
+
+PROVIDE="virtual/lapack"
+
+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
+}
+
+pkg_setup() {
+ use ifc || if [ -z `which g77` ]; then
+ #if ifc is defined then the dep was already checked
+ eerror "No fortran compiler found on the system!"
+ eerror "Please add g77 to your USE flags and reemerge gcc!"
+ die
+ fi
+}
+
+src_unpack() {
+ use ifc && ifc_info
+ unpack ${A}
+
+ cd ${WORKDIR}
+ epatch ${FILESDIR}/atlas3.6.0-shared-libs.patch.bz2
+ epatch ${FILESDIR}/lapack-20020531-20021004.patch.bz2
+ epatch ${FILESDIR}/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() {
+ GCC="gcc"
+
+ cd ${S}
+ if [ -n "${interactive}" ]
+ then
+ echo "${interactive}"
+ make config CC="${GCC} -DUSE_LIBTOOL -DINTERACTIVE" || die
+ else
+ # Use ATLAS defaults for all questions:
+ (echo | make config CC="${GCC} -DUSE_LIBTOOL") || atlas_fail
+ fi
+
+ TMPSTR=$(ls Make.Linux*)
+ ATLAS_ARCH=${TMPSTR#'Make.'}
+
+ CC="libtool --mode=compile --tag=CC ${GCC} -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"
+ 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
+ ar cru liblapack.a *.o
+ ranlib liblapack.a
+ else
+ libtool --mode=link --tag=CC ${GCC} -o liblapack.la *.lo \
+ -rpath ${RPATH} -lblas -lcblas -latlas -lg2c
+ fi
+}
+
+src_install () {
+ dodir ${RPATH}
+
+ cd ${S_LAPACK}/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-ATLAS
+
+ insinto /usr/include/atlas
+ cd ${S}/include
+ doins clapack.h
+
+ cd ${S}
+ dodoc README
+ cd ${S}/doc
+ dodoc AtlasCredits.txt ChangeLog
+ if [ "`use doc`" ];
+ then
+ dodoc lapackqref.ps
+ fi
+}
+
+pkg_postinst() {
+ /usr/bin/lapack-config ATLAS
+
+ 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/app-sci/lapack-atlas/metadata.xml b/app-sci/lapack-atlas/metadata.xml
new file mode 100644
index 000000000000..b229aec85b8f
--- /dev/null
+++ b/app-sci/lapack-atlas/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>