summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fisette <ribosome@gentoo.org>2005-11-13 05:44:04 +0000
committerOlivier Fisette <ribosome@gentoo.org>2005-11-13 05:44:04 +0000
commitf404c080782f69ff63055823833760e94546d0dc (patch)
tree5ce1554286c79c2b6535a84fb02c2299d278b17d /sci-libs
parentfix dependencies for a nice easy lzo 1->2 transition - bug #105637 sort of re... (diff)
downloadgentoo-2-f404c080782f69ff63055823833760e94546d0dc.tar.gz
gentoo-2-f404c080782f69ff63055823833760e94546d0dc.tar.bz2
gentoo-2-f404c080782f69ff63055823833760e94546d0dc.zip
Migrated to fortran.eclass (bug #65950)
(Portage version: 2.0.51.22-r3)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/blas-reference/ChangeLog8
-rw-r--r--sci-libs/blas-reference/Manifest10
-rw-r--r--sci-libs/blas-reference/blas-reference-19940131-r2.ebuild95
-rw-r--r--sci-libs/blas-reference/files/digest-blas-reference-19940131-r21
-rw-r--r--sci-libs/lapack-atlas/ChangeLog8
-rw-r--r--sci-libs/lapack-atlas/Manifest10
-rw-r--r--sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r15
-rw-r--r--sci-libs/lapack-atlas/lapack-atlas-3.6.0-r1.ebuild189
-rw-r--r--sci-libs/lapack-reference/ChangeLog8
-rw-r--r--sci-libs/lapack-reference/Manifest16
-rw-r--r--sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r13
-rw-r--r--sci-libs/lapack-reference/lapack-reference-3.0-r1.ebuild122
12 files changed, 452 insertions, 23 deletions
diff --git a/sci-libs/blas-reference/ChangeLog b/sci-libs/blas-reference/ChangeLog
index 2633f51510ed..f77da190cfa2 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-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/ChangeLog,v 1.4 2005/04/22 13:49:16 kugelfang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/ChangeLog,v 1.5 2005/11/13 05:42:14 ribosome Exp $
+
+*blas-reference-19940131-r2 (13 Nov 2005)
+
+ 13 Nov 2005; Olivier Fisette <ribosome@gentoo.org>
+ +blas-reference-19940131-r2.ebuild:
+ Migrated to fortran.eclass (bug #65950).
22 Apr 2005; Danny van Dyk <kugelfang@gentoo.org>
blas-reference-19940131.ebuild:
diff --git a/sci-libs/blas-reference/Manifest b/sci-libs/blas-reference/Manifest
index 4c417e24ce38..e78444a77670 100644
--- a/sci-libs/blas-reference/Manifest
+++ b/sci-libs/blas-reference/Manifest
@@ -1,8 +1,10 @@
-MD5 0ddab4429bfb1be242a56bc3c323a244 ChangeLog 2806
-MD5 10d1c63d1776f387b71c28f9122f201a blas-reference-19940131-r1.ebuild 2640
+MD5 f2e0def1a8b5f0978068b8aec79d1c84 blas-reference-19940131-r2.ebuild 2451
MD5 afd02b82604ab7a048d780a768bd0085 blas-reference-19940131.ebuild 2486
+MD5 10d1c63d1776f387b71c28f9122f201a blas-reference-19940131-r1.ebuild 2640
+MD5 0ddab4429bfb1be242a56bc3c323a244 ChangeLog 2806
MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
-MD5 d5cd617fba85f0c278240f7446ca52c8 files/Makefile.gz 986
-MD5 ba7949ab229d3b52516732fc47caebeb files/digest-blas-reference-19940131 52
MD5 ba7949ab229d3b52516732fc47caebeb files/digest-blas-reference-19940131-r1 52
+MD5 ba7949ab229d3b52516732fc47caebeb files/digest-blas-reference-19940131-r2 52
+MD5 d5cd617fba85f0c278240f7446ca52c8 files/Makefile.gz 986
MD5 2d7bae33a1553ed8eccbdb971a459ff2 files/f77-reference 396
+MD5 ba7949ab229d3b52516732fc47caebeb files/digest-blas-reference-19940131 52
diff --git a/sci-libs/blas-reference/blas-reference-19940131-r2.ebuild b/sci-libs/blas-reference/blas-reference-19940131-r2.ebuild
new file mode 100644
index 000000000000..55395c292d47
--- /dev/null
+++ b/sci-libs/blas-reference/blas-reference-19940131-r2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2005 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-r2.ebuild,v 1.1 2005/11/13 05:42:14 ribosome Exp $
+
+inherit eutils fortran
+
+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="ifc"
+KEYWORDS="~x86 ~amd64"
+
+DEPEND="sci-libs/blas-config
+ >=sys-devel/libtool-1.5
+ ifc? ( dev-lang/ifc )"
+
+RDEPEND="ifc? ( dev-lang/ifc )" # Need ifc runtime libraries
+
+PROVIDE="virtual/blas"
+
+#TODO: detect 64bit size from compiler, not eclass
+FORTRAN="g77 ifc" || FORTRAN="g77 f2c ifc" # No f2c on 64-bit systems yet :-/
+
+S="${WORKDIR}"
+
+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
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ cp "${FILESDIR}"/Makefile.gz .
+ gunzip Makefile.gz
+}
+
+src_compile() {
+ # Profile information will be installed in TOP_PATH:
+ TOP_PATH="${DESTTREE}"/lib/blas
+ # Libraries will be installed in RPATH:
+ RPATH="${TOP_PATH}"/reference
+
+ if use ifc; then
+ ifc_info
+ make static FC="ifc" FFLAGS="${IFCFLAGS}" || die
+ ifc -shared ${IFCFLAGS} -Wl,-soname,libblas.so.0 \
+ -o libblas.so.0.0.0 *.lo || die
+ else
+ # libg2c is required to link to libblas.so using ifc:
+ make libs FC="g77" FFLAGS="${CFLAGS}" \
+ LIBTOOL_FLAGS="-rpath ${RPATH} -lg2c" || die
+ fi
+}
+
+src_install() {
+ if use ifc; then
+ strip --strip-unneeded libblas.so.0.0.0 || die
+ strip --strip-debug libblas.a || die
+
+ exeinto ${RPATH}
+ doexe libblas.so.0.0.0 || die
+ dosym libblas.so.0.0.0 ${RPATH}/libblas.so.0 || die
+ dosym libblas.so.0.0.0 ${RPATH}/libblas.so || die
+
+ insinto ${RPATH}
+ doins libblas.a || die
+ else
+ dodir ${RPATH} || die
+ libtool install -s libblas.la ${D}/${RPATH} || die
+ fi
+
+ insinto ${TOP_PATH}
+ doins ${FILESDIR}/f77-reference || die
+}
+
+pkg_postinst() {
+ blas-config f77-reference
+}
diff --git a/sci-libs/blas-reference/files/digest-blas-reference-19940131-r2 b/sci-libs/blas-reference/files/digest-blas-reference-19940131-r2
new file mode 100644
index 000000000000..41ce05f23e36
--- /dev/null
+++ b/sci-libs/blas-reference/files/digest-blas-reference-19940131-r2
@@ -0,0 +1 @@
+MD5 5811e4b3dffa7a10956abf923cec1bd4 blas.tgz 94981
diff --git a/sci-libs/lapack-atlas/ChangeLog b/sci-libs/lapack-atlas/ChangeLog
index e5b5fa0eaeb6..2ba21980fdc6 100644
--- a/sci-libs/lapack-atlas/ChangeLog
+++ b/sci-libs/lapack-atlas/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/lapack-atlas
# Copyright 2004-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/ChangeLog,v 1.7 2005/09/17 21:54:18 hansmi Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/ChangeLog,v 1.8 2005/11/13 05:44:04 ribosome Exp $
+
+*lapack-atlas-3.6.0-r1 (13 Nov 2005)
+
+ 13 Nov 2005; Olivier Fisette <ribosome@gentoo.org>
+ +lapack-atlas-3.6.0-r1.ebuild:
+ Migrated to fortran.eclass (bug #65950).
17 Sep 2005; Michael Hanselmann <hansmi@gentoo.org>
lapack-atlas-3.6.0.ebuild:
diff --git a/sci-libs/lapack-atlas/Manifest b/sci-libs/lapack-atlas/Manifest
index 6771fd578731..2f0b06a6ad25 100644
--- a/sci-libs/lapack-atlas/Manifest
+++ b/sci-libs/lapack-atlas/Manifest
@@ -1,7 +1,9 @@
-MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
-MD5 8f0c9edbbc412ec34dcb32252746f9ba ChangeLog 3210
+MD5 d418f9b2d2c30cbc64ebc15bc2bc099f lapack-atlas-3.6.0-r1.ebuild 4928
MD5 411293a4de8b51e4379d9c9d9f75852f lapack-atlas-3.6.0.ebuild 5047
-MD5 b3d716baf0a71dd55ce358d086e4069b files/digest-lapack-atlas-3.6.0 335
-MD5 e362a664ac2e543545706b85664af921 files/unbuffered.patch 497
+MD5 8f0c9edbbc412ec34dcb32252746f9ba ChangeLog 3210
+MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
MD5 13d26350d75e6993f1b3ec48ca97f14e files/war 545
+MD5 b3d716baf0a71dd55ce358d086e4069b files/digest-lapack-atlas-3.6.0-r1 335
+MD5 b3d716baf0a71dd55ce358d086e4069b files/digest-lapack-atlas-3.6.0 335
MD5 1b77dbffbf246309e6e97c77b64735fd files/f77-ATLAS 408
+MD5 e362a664ac2e543545706b85664af921 files/unbuffered.patch 497
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
new file mode 100644
index 000000000000..7d1254acad1f
--- /dev/null
+++ b/sci-libs/lapack-atlas/files/digest-lapack-atlas-3.6.0-r1
@@ -0,0 +1,5 @@
+MD5 df2ee2eb65d1c08ee93d04370172c262 atlas3.6.0.tar.bz2 1687723
+MD5 a24f59304f87b78cdc7da2ae59c98664 lapack.tgz 4991992
+MD5 c35802e688f28f8f65632fb93aad69d8 lapack-20020531-20021004.patch.bz2 59736
+MD5 4192870be88e09ba8c6a805eb31fcfb4 lapack-gentoo.patch 1272
+MD5 743b75ec473ab0f0edda6b649aa89060 atlas3.6.0-shared-libs.patch.bz2 5140
diff --git a/sci-libs/lapack-atlas/lapack-atlas-3.6.0-r1.ebuild b/sci-libs/lapack-atlas/lapack-atlas-3.6.0-r1.ebuild
new file mode 100644
index 000000000000..478b31d4ee53
--- /dev/null
+++ b/sci-libs/lapack-atlas/lapack-atlas-3.6.0-r1.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2005 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-r1.ebuild,v 1.1 2005/11/13 05:44:04 ribosome 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"
+
+DEPEND="virtual/libc
+ >=sys-devel/libtool-1.5
+ =sci-libs/blas-atlas-3.6.0
+ sci-libs/lapack-config
+ ifc? ( dev-lang/ifc )"
+
+RDEPEND="virtual/libc
+ virtual/blas
+ ifc? ( dev-lang/ifc )" # Need Intel runtime libraries
+
+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
+
+ insinto "${TOP_PATH}"
+ doins "${FILESDIR}"/f77-ATLAS || die
+
+ 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() {
+ /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/sci-libs/lapack-reference/ChangeLog b/sci-libs/lapack-reference/ChangeLog
index b356d6908d01..92a08d61608e 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-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-reference/ChangeLog,v 1.3 2005/04/22 13:55:48 kugelfang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-reference/ChangeLog,v 1.4 2005/11/13 05:40:26 ribosome Exp $
+
+*lapack-reference-3.0-r1 (13 Nov 2005)
+
+ 13 Nov 2005; Olivier Fisette <ribosome@gentoo.org>
+ +lapack-reference-3.0-r1.ebuild:
+ Migrated to fortran.eclass (bug #65950).
22 Apr 2005; Danny van Dyk <kugelfang@gentoo.org>
lapack-reference-3.0.ebuild:
diff --git a/sci-libs/lapack-reference/Manifest b/sci-libs/lapack-reference/Manifest
index 253536adaf7f..4a9618d24e30 100644
--- a/sci-libs/lapack-reference/Manifest
+++ b/sci-libs/lapack-reference/Manifest
@@ -1,15 +1,7 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 27792825427ea1deaeb3977e3a0a99ad ChangeLog 1086
+MD5 5450ddcfe742c8db49c8645fbe9ef4c4 lapack-reference-3.0-r1.ebuild 3071
MD5 3dd3d36a5d1500d36429c15bb02b95e6 lapack-reference-3.0.ebuild 3174
+MD5 27792825427ea1deaeb3977e3a0a99ad ChangeLog 1086
MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
-MD5 94944935d82f5f98cc414ddd175839c7 files/digest-lapack-reference-3.0 196
MD5 0c26dd04f98f6c5cb6fdddfaa2c50905 files/f77-reference 436
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFCaQL75mJXAu5GbtIRAqiKAJ4rLAbD8RNNcdvxiCvZspvFGyv2MwCdGDht
-Rgkf8OHvCpgBOZiOMrZS80A=
-=jAwB
------END PGP SIGNATURE-----
+MD5 94944935d82f5f98cc414ddd175839c7 files/digest-lapack-reference-3.0 196
+MD5 94944935d82f5f98cc414ddd175839c7 files/digest-lapack-reference-3.0-r1 196
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
new file mode 100644
index 000000000000..8579dfaa3215
--- /dev/null
+++ b/sci-libs/lapack-reference/files/digest-lapack-reference-3.0-r1
@@ -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/sci-libs/lapack-reference/lapack-reference-3.0-r1.ebuild b/sci-libs/lapack-reference/lapack-reference-3.0-r1.ebuild
new file mode 100644
index 000000000000..8f24966d6755
--- /dev/null
+++ b/sci-libs/lapack-reference/lapack-reference-3.0-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2005 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-r1.ebuild,v 1.1 2005/11/13 05:40:26 ribosome Exp $
+
+inherit eutils fortran
+
+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
+ mirror://gentoo/${MyPN}-gentoo.patch"
+
+SLOT="0"
+IUSE="ifc"
+KEYWORDS="~x86 amd64"
+
+DEPEND="sys-devel/libtool
+ sci-libs/lapack-config
+ ifc? ( dev-lang/ifc )"
+
+RDEPEND="virtual/blas
+ ifc? ( dev-lang/ifc )" # Need ifc runtime libraries
+
+PROVIDE="virtual/lapack"
+
+FORTRAN="g77 ifc"
+
+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
+ epause 5
+ 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
+ # Intel portability library that provides the etime function
+ ${FC} -shared ${FFLAGS} *.lo ${DEP_LIBS} -Wl,-soname \
+ -Wl,liblapack.so.0 -o liblapack.so.0.0.0 -Vaxlib || die
+ ar cru liblapack.a *.o || die
+ ranlib liblapack.a || die
+ else
+ libtool --mode=link --tag=CC ${FC} ${FFLAGS} -o liblapack.la *.lo \
+ -rpath ${RPATH} ${DEP_LIBS} || die
+ fi
+}
+
+src_install() {
+ dodir "${RPATH}" || die
+
+ cd "${S}"/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
+
+ insinto ${TOP_PATH}
+ doins "${FILESDIR}"/f77-reference || die
+
+ dodoc "${S}"/README
+}
+
+pkg_postinst() {
+ "${DESTTREE}"/bin/lapack-config reference
+}