summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2007-09-20 14:40:03 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2007-09-20 14:40:03 +0000
commitf4a36497164d0ac37717d5016c7589abc891911a (patch)
tree7eae5d4c011d23601acffff20d4aba3cd2723970 /sci-libs
parentalpha/ia64 stable wrt #193113 (diff)
downloadgentoo-2-f4a36497164d0ac37717d5016c7589abc891911a.tar.gz
gentoo-2-f4a36497164d0ac37717d5016c7589abc891911a.tar.bz2
gentoo-2-f4a36497164d0ac37717d5016c7589abc891911a.zip
Version bump. Added pkg-config support, re-added PROVIDE temporarly
(Portage version: 2.1.3.9)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/blas-goto/ChangeLog10
-rw-r--r--sci-libs/blas-goto/blas-goto-1.19.ebuild160
-rw-r--r--sci-libs/blas-goto/files/blas.pc.in10
-rw-r--r--sci-libs/blas-goto/files/digest-blas-goto-1.193
-rw-r--r--sci-libs/blas-goto/files/eselect.blas.goto4
5 files changed, 186 insertions, 1 deletions
diff --git a/sci-libs/blas-goto/ChangeLog b/sci-libs/blas-goto/ChangeLog
index ea9504f20d41..2cf281045a57 100644
--- a/sci-libs/blas-goto/ChangeLog
+++ b/sci-libs/blas-goto/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-libs/blas-goto
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-goto/ChangeLog,v 1.9 2007/08/20 14:38:26 markusle Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-goto/ChangeLog,v 1.10 2007/09/20 14:40:02 bicatali Exp $
+
+*blas-goto-1.19 (20 Sep 2007)
+
+ 20 Sep 2007; Sébastien Fabbro <bicatali@gentoo.org> +files/blas.pc.in,
+ +files/eselect.blas.goto, +blas-goto-1.19.ebuild:
+ Version bump. Added pkg-config support, re-added PROVIDE temporarly
+ until new virtuals are in main tree. Re-added intel compilers support,
+ cleanup with seds.
20 Aug 2007; Markus Dittrich <markusle@gentoo.org> -blas-goto-1.09.ebuild,
-blas-goto-1.11.ebuild:
diff --git a/sci-libs/blas-goto/blas-goto-1.19.ebuild b/sci-libs/blas-goto/blas-goto-1.19.ebuild
new file mode 100644
index 000000000000..b8beceb4f613
--- /dev/null
+++ b/sci-libs/blas-goto/blas-goto-1.19.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-goto/blas-goto-1.19.ebuild,v 1.1 2007/09/20 14:40:02 bicatali Exp $
+
+inherit eutils fortran flag-o-matic toolchain-funcs
+
+MY_PN="GotoBLAS"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="The fastest implementations of the Basic Linear Algebra Subroutines"
+HOMEPAGE="http://www.tacc.utexas.edu/resources/software/software.php"
+SRC_URI="http://www.tacc.utexas.edu/resources/software/login/gotoblas/${MY_P}.tar.gz"
+LICENSE="tacc"
+SLOT="0"
+# See http://www.tacc.utexas.edu/resources/software/gotoblasfaq.php
+# for supported architectures
+KEYWORDS="~x86 ~amd64"
+IUSE="threads doc"
+RESTRICT="mirror"
+RDEPEND="app-admin/eselect-blas
+ dev-util/pkgconfig
+ doc? ( app-doc/blas-docs )"
+
+DEPEND="app-admin/eselect-blas
+ >=sys-devel/binutils-2.17"
+
+S="${WORKDIR}/${MY_PN}"
+FORTRAN="g77 gfortran ifc"
+
+# remove when we have new virtuals in main tree.
+PROVIDE="virtual/blas"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Set up C compiler
+ if [[ $(tc-getCC) = *gcc ]]; then
+ C_COMPILER="GNU"
+ elif [[ $(tc-getCC) = icc ]]; then
+ C_COMPILER="INTEL"
+ else
+ die "tc-getCC() returned an invalid C compiler; valid are gcc or icc."
+ fi
+
+ # Set up FORTRAN 77 compiler
+ case ${FORTRANC} in
+ g77)
+ F_COMPILER="G77"
+ ;;
+ gfortran)
+ F_COMPILER="GFORTRAN"
+ F_LIB="-lgfortran"
+ ;;
+ ifc|ifort)
+ F_COMPILER="INTEL"
+ ;;
+ *)
+ die "fortran.eclass returned an invalid Fortran compiler \'${FORTRANC}\'; valid are ${FORTRAN}."
+ esac
+
+ # Fix shared lib build
+ sed -i \
+ -e "s:\(&& echo OK\):${F_LIB} \1:g" \
+ "${S}"/exports/Makefile \
+ || die "sed for shared libs failed"
+
+ # Set up compilers
+ sed -i \
+ -e "s:^# \(C_COMPILER =\) GNU:\1 ${C_COMPILER}:g" \
+ -e "s:^# \(F_COMPILER =\) G77:\1 ${F_COMPILER}:g" \
+ -e "s:^# \(SMP = 1\):\1:g" \
+ -e "s:\$(COMPILER_PREFIX)ar:$(tc-getAR):" \
+ -e "s:\$(COMPILER_PREFIX)as:$(tc-getAS):" \
+ -e "s:\$(COMPILER_PREFIX)ld:$(tc-getLD):" \
+ -e "s:\$(COMPILER_PREFIX)ranlib:$(tc-getRANLIB):" \
+ "${S}"/Makefile.rule \
+ || die "sed for setting up compilers failed"
+
+ # Threaded?
+ if use threads; then
+ sed -i \
+ -e "s:^# \(SMP = 1\):\1:g" \
+ "${S}"/Makefile.rule \
+ || die "sed for threads failed"
+ fi
+
+ # If you need a 64-bit integer interface, also do this for "INTERFACE64 = 1"
+ if use amd64; then
+ sed -i \
+ -e "s:^# \(BINARY64 = 1\):\1:g" \
+ "${S}"/Makefile.rule \
+ || die "sed for 64 binary failed"
+ fi
+
+ # Respect CFLAGS/FFLAGS
+ if [[ -z "${FFLAGS}" ]]; then
+ ewarn "FORTRAN FFLAGS undefined, using -O2"
+ export FFLAGS="-O2"
+ fi
+
+ sed -i \
+ -e '/^CFLAGS/s:=:+=:' \
+ -e '/^FFLAGS/s:=:+=:' \
+ "${S}"/Makefile.rule \
+ || die "sed for flags failed"
+}
+
+src_compile() {
+
+ # Make static library
+ emake LDFLAGS=$(raw-ldflags) || die "emake failed"
+
+ # Make shared library
+ cd exports
+ emake so -j1 || die "emake failed"
+}
+
+src_test() {
+ cd test
+ emake || die "emake test failed"
+ make clean
+}
+
+src_install() {
+ local MAIN_DIR="/usr/$(get_libdir)/blas"
+ local DIR="${MAIN_DIR}/goto"
+
+ # dolib.so doesn't support our alternate locations
+ exeinto ${DIR}
+ doexe libgoto_*.so
+ dosym libgoto_*.so ${DIR}/libgoto.so
+ dosym libgoto_*.so ${DIR}/libgoto.so.0
+ dosym libgoto_*.so ${DIR}/libgoto.so.0.0.0
+
+ # dolib.a doesn't support our alternate locations
+ insinto ${DIR}
+ doins libgoto_*.a
+ dosym libgoto_*.a ${DIR}/libgoto.a
+
+ dodoc 01Readme.txt 03History.txt 04FAQ.txt
+
+ cp "${FILESDIR}"/blas.pc.in blas.pc
+ local extlibs=""
+ use threads && extlibs="${extlibs} -lpthread"
+ extlibs="${extlibs}"
+ sed -i \
+ -e "s/@LIBDIR@/$(get_libdir)/" \
+ -e "s/@PV@/${PV}/" \
+ -e "s/@EXTLIBS@/${extlibs}/" \
+ blas.pc || die "sed blas.pc failed"
+ insinto /usr/$(get_libdir)/blas/goto
+ doins blas.pc
+ eselect blas add $(get_libdir) "${FILESDIR}"/eselect.blas.goto goto
+}
+
+pkg_postinst() {
+ [[ -z "$(eselect blas show)" ]] && eselect blas set goto
+ elog "To use BLAS GOTO implementation, you have to issue (as root):"
+ elog "\teselect blas set goto\n"
+}
diff --git a/sci-libs/blas-goto/files/blas.pc.in b/sci-libs/blas-goto/files/blas.pc.in
new file mode 100644
index 000000000000..81940962c48a
--- /dev/null
+++ b/sci-libs/blas-goto/files/blas.pc.in
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/@LIBDIR@
+includedir=${prefix}/include
+
+Name: blas
+Description: GOTO implementations of the F77 Basic Linear Algebra Subroutines
+Version: @PV@
+URL: http://www.tacc.utexas.edu/resources/software/software.php
+Libs: -L${libdir} -lblas @EXTLIBS@
diff --git a/sci-libs/blas-goto/files/digest-blas-goto-1.19 b/sci-libs/blas-goto/files/digest-blas-goto-1.19
new file mode 100644
index 000000000000..0ed725a3e8f2
--- /dev/null
+++ b/sci-libs/blas-goto/files/digest-blas-goto-1.19
@@ -0,0 +1,3 @@
+MD5 3029a72f2a0377a903c24ae03ada61ba GotoBLAS-1.19.tar.gz 1935724
+RMD160 ef3ac23815802ddd622a41e79dc473efad2663aa GotoBLAS-1.19.tar.gz 1935724
+SHA256 68961f6e81d91c81898fa0b89c8632fc5d4f4fe60f8d0019e90b1a45d3486bdb GotoBLAS-1.19.tar.gz 1935724
diff --git a/sci-libs/blas-goto/files/eselect.blas.goto b/sci-libs/blas-goto/files/eselect.blas.goto
new file mode 100644
index 000000000000..0097969eb057
--- /dev/null
+++ b/sci-libs/blas-goto/files/eselect.blas.goto
@@ -0,0 +1,4 @@
+blas/goto/libgoto.so /usr/@LIBDIR@/libblas.so
+blas/goto/libgoto.so.0 /usr/@LIBDIR@/libblas.so.0
+blas/goto/libgoto.a /usr/@LIBDIR@/libblas.a
+../blas/goto/blas.pc /usr/@LIBDIR@/pkgconfig/blas.pc