# ChangeLog for sci-libs/blas-goto
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-goto/ChangeLog,v 1.14 2008/01/24 10:24:20 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-goto/ChangeLog,v 1.15 2008/02/12 17:56:31 bicatali Exp $
+
+*blas-goto-1.22-r1 (12 Feb 2008)
+
+ 12 Feb 2008; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/blas-goto-1.22-sharedlibs.patch, metadata.xml,
+ +blas-goto-1.22-r1.ebuild:
+ Various fixes including shared libs patch (now works with as-needed), seds
+ for the Makefile.rule adpapted to newer version, removed user's cflags,
+ since upstream seems to do a better job with preprocessing flags, forced gcc
+ as a C compiler for inline assembler, added a int64 use flag, some cleanup.
*blas-goto-1.22 (24 Jan 2008)
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX blas-goto-1.22-sharedlibs.patch 1230 RMD160 aa335dec7c1e7e5eac936f039eb13d5b61592160 SHA1 9d9f9101a0b1e88cdd6dcb710c9469296b8f31c3 SHA256 920a27a4ff09fbbcf9d9574867d533bd3fc651cf0e65e6ffebcbe4f59816908f
AUX blas.pc.in 292 RMD160 b5ddc452918fb54851cfe24447e1c10d67586943 SHA1 8586cdea51a3094e92871c16ec97e2cfbdc75320 SHA256 aa28cff8ba3f30fdf56e2619eff0655f5b43a062cfe03c1d51e8b4716b1a1e6d
AUX eselect.blas.goto 193 RMD160 b25ff1d0b37fed194afde473019706e6a9404718 SHA1 e4c78e7cace1d7144f1fc921a29d516b4234703d SHA256 33a9d0be6f400f792f744604afae7239b2d7392cc0e8cac758b53e695acc0802
DIST GotoBLAS-1.19.tar.gz 1935724 RMD160 ef3ac23815802ddd622a41e79dc473efad2663aa SHA1 2bbd8ac24d441d1b7ed91ea8bbd84d23c8cc131f SHA256 68961f6e81d91c81898fa0b89c8632fc5d4f4fe60f8d0019e90b1a45d3486bdb
DIST GotoBLAS-1.22.tar.gz 2055354 RMD160 2eec2605a10e3e6fff1d3db2be21d774f5c0e804 SHA1 4f170dbb0b4ef337ed78efd78d7c5a1dad4bd8c4 SHA256 a5479c4f2e78d3116536675a83df5d2dc23648f90a69babb646b69d02f695d6c
EBUILD blas-goto-1.19.ebuild 4382 RMD160 c251d9a4dbc01d23691d52aec866f6da5842d1d0 SHA1 c6a63909dbf98091e1dc3544a3b836cae1b107ff SHA256 656cc13e1b0a224960318c9441ad46b71b008ba62f7920775043c3a1dd094160
+EBUILD blas-goto-1.22-r1.ebuild 4186 RMD160 ed7afb15966d0ae8a952036af3049ea7ba08ab9a SHA1 81d9bd056d3adbf45966f3e4347e4318af112f57 SHA256 b33d4f2f669b44ae7fe71a32765c7405fb25d85116f911ac6ed6f0efe78d5fa5
EBUILD blas-goto-1.22.ebuild 4375 RMD160 df88b4a1ec66e59ee50a8ca8eb70e47351da3992 SHA1 0279feaff01cf4668dd8576aa3bb849818f55d43 SHA256 34ee78d33fafb2b86a1eed067db1fa5159731511281631c499e8d8dceb8b6792
-MISC ChangeLog 2752 RMD160 03dc3e8d75e9fd09becfc1d8465c4cd5ce199048 SHA1 f47e67b3f4ecb7f2df5ae67f0764c64aab8409b7 SHA256 e91836d2d28c27fc2623f2754bb716d6da00d36050ef68c39d572d9c47be47a4
-MISC metadata.xml 612 RMD160 9156a8f5eaa44e61506518e6c8c8cc1209003e71 SHA1 a45262b8866a17d8b4ceda3041a81f0b63d3ca79 SHA256 8dbf3f6bd947424f3c3893e31bfb420409da6e7714f13ba2a981fe52b8532ed2
+MISC ChangeLog 3235 RMD160 7b52c1bb48d96771559be799bc8be6c94c1534a6 SHA1 e76cd8881be9d800d21427c2a3a9193bd41fb08b SHA256 02dbfdf601eb866664e63773ce1812b5edad21b513fafdda436b3a01ba14d5c1
+MISC metadata.xml 626 RMD160 d5c6d5bdb892da05af395f2baf4c4bda6c7341a8 SHA1 99d491e9a98cde53bc8d18ef73d52e26d704134f SHA256 9355c5714a5f6ee94704a3785547b40a69aa62bd57195e804c0ab126dee735f2
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.7 (GNU/Linux)
+
+iD8DBQFHsd3b1ycZbhPLE2ARAt4cAJ9vwxovp+nCgwY1nDzwOaKzsAgn8QCeObWN
+H4ONCjfiSWaG5DgVb51q0Ig=
+=+0Vy
+-----END PGP SIGNATURE-----
--- /dev/null
+# Copyright 1999-2008 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.22-r1.ebuild,v 1.1 2008/02/12 17:56:31 bicatali Exp $
+
+inherit eutils fortran flag-o-matic toolchain-funcs
+
+MY_PN="GotoBLAS"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="Fast 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="int64 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="gfortran g77 ifc"
+
+ESELECT_PROF=goto
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # patch to link with m and fortran libs, works with asneeded
+ epatch "${FILESDIR}"/${P}-sharedlibs.patch
+
+ # Set up C compiler: forcing gcc for now
+ if [[ $(tc-getCC) != *gcc ]]; then
+ ewarn "Your C compiler is set to $(tc-getCC)"
+ ewarn "${PN} needs gcc to inline assembler, others compilers have reported failures"
+ ewarn "Forcing gcc"
+ fi
+ C_COMPILER=GNU
+
+ # Set up FORTRAN 77 compiler
+ case ${FORTRANC} in
+ g77) F_COMPILER=G77;;
+ gfortran) F_COMPILER=GFORTRAN;;
+ ifc|ifort) F_COMPILER=INTEL;;
+ *)
+ die "Invalid Fortran compiler: ${FORTRANC}; valid are ${FORTRAN}."
+ esac
+
+ # 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:\$(CROSS_BINUTILS)ar:$(tc-getAR):" \
+ -e "s:\$(CROSS_BINUTILS)as:$(tc-getAS):" \
+ -e "s:\$(CROSS_BINUTILS)ld:$(tc-getLD):" \
+ -e "s:\$(CROSS_BINUTILS)ranlib:$(tc-getRANLIB):" \
+ Makefile.rule \
+ || die "sed for toolchain failed"
+
+ if use threads; then
+ sed -i \
+ -e "s:^# \(SMP = 1\):\1:g" \
+ Makefile.rule \
+ || die "sed for threads failed"
+ fi
+
+ if use amd64; then
+ sed -i \
+ -e "s:^# \(BINARY64 = 1\):\1:g" \
+ Makefile.rule \
+ || die "sed for 64 binary failed"
+ fi
+
+ if use int64; then
+ sed -i \
+ -e "s:^# \(INTERFACE64 = 1\):\1:g" \
+ Makefile.rule \
+ || die "sed for 64 integers failed"
+ ESELECT_PROF="${ESELECT_PROF}-int64"
+ fi
+}
+
+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 install_dir=/usr/$(get_libdir)/blas/goto
+ dodir ${install_dir}
+
+ # dolib.so doesn't support our alternate locations
+ exeinto ${install_dir}
+ doexe libgoto_*.so || die "installing shared lib failed"
+ dosym libgoto_*.so ${install_dir}/libgoto.so
+ dosym libgoto_*.so ${install_dir}/libgoto.so.0
+ dosym libgoto_*.so ${install_dir}/libgoto.so.0.0.0
+
+ # dolib.a doesn't support our alternate locations
+ insinto ${install_dir}
+ doins libgoto_*.a || die "installing static lib failed"
+ dosym libgoto_*.a ${install_dir}/libgoto.a
+
+ dodoc 01Readme.txt 03History.txt 04FAQ.txt || die
+
+ cp "${FILESDIR}"/blas.pc.in blas.pc
+ local extlibs=""
+ use threads && extlibs="${extlibs} -lpthread"
+ 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 ${ESELECT_PROF}
+}
+
+pkg_postinst() {
+ local p=blas
+ local current_lib=$(eselect ${p} show | cut -d' ' -f2)
+ if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
+ # work around eselect bug #189942
+ local configfile="${ROOT}"/etc/env.d/${p}/$(get_libdir)/config
+ [[ -e ${configfile} ]] && rm -f ${configfile}
+ eselect ${p} set ${ESELECT_PROF}
+ elog "${p} has been eselected to ${ESELECT_PROF}"
+ else
+ elog "Current eselected ${p} is ${current_lib}"
+ elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
+ elog "\t eselect ${p} set ${ESELECT_PROF}"
+ fi
+}
--- /dev/null
+--- Makefile.rule.orig 2008-02-12 16:42:56.000000000 +0000
++++ Makefile.rule 2008-02-12 16:46:48.000000000 +0000
+@@ -156,6 +156,9 @@
+ # Profiling flags
+ COMMON_PROF = -pg
+
++# Extra libraries to link
++EXTRALIB = -lm
++
+ ################## End of Main Configuration #####################
+
+ # TO suppress recursive includes
+@@ -199,6 +202,7 @@
+ BU = _
+ CCOMMON_OPT += -DF_INTERFACE_F2C -DNEED_F2CCONV
+ FCOMMON_OPT += -Wall
++EXTRALIB += -lg2c
+ ifneq ($(OSNAME), CYGWIN_NT)
+ FCOMMON_OPT += -fPIC
+ endif
+--- exports/Makefile.orig 2008-02-12 16:43:07.000000000 +0000
++++ exports/Makefile 2008-02-12 16:48:36.000000000 +0000
+@@ -104,18 +104,18 @@
+ ../$(LIBSONAME) : ../$(LIBNAME) linux.def
+ $(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
+ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
+- -Wl,--retain-symbols-file=linux.def
++ -Wl,--retain-symbols-file=linux.def $(EXTRALIB)
+
+ endif
+
+ ifeq ($(OSNAME), FreeBSD)
+
+-so : ../$(LIBSONAME) test
++so : ../$(LIBSONAME)
+
+ ../$(LIBSONAME) : ../$(LIBNAME) linux.def
+ $(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
+ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
+- -Wl,--retain-symbols-file=linux.def
++ -Wl,--retain-symbols-file=linux.def $(EXTRALIB)
+
+ endif
+
<pkgmetadata>
<herd>sci</herd>
<longdescription lang="en">
-The GotoBLAS codes are one of the fastest implementations
-of the Basic Linear Algebra Subroutines(BLAS).
-To achieve performance it starts by observing that for current
-generation architectures, much of the overhead comes from Translation
-Look-aside Buffer (TLB) table misses. While the importance of caches
-is also taken into consideration, it is the minimization of such TLB
-misses that drives the approach.
+ The GotoBLAS codes are one of the fastest implementations
+ of the Basic Linear Algebra Subroutines(BLAS).
+ To achieve performance it starts by observing that for current
+ generation architectures, much of the overhead comes from Translation
+ Look-aside Buffer (TLB) table misses. While the importance of caches
+ is also taken into consideration, it is the minimization of such TLB
+ misses that drives the approach.
</longdescription>
</pkgmetadata>