diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2008-02-12 17:56:32 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2008-02-12 17:56:32 +0000 |
commit | 69fd735a7a407ba9f85900cb6a48389c9078c0b7 (patch) | |
tree | b4c3c97e32babceb795b1a96b38cc0977af0c829 /sci-libs | |
parent | old (diff) | |
download | gentoo-2-69fd735a7a407ba9f85900cb6a48389c9078c0b7.tar.gz gentoo-2-69fd735a7a407ba9f85900cb6a48389c9078c0b7.tar.bz2 gentoo-2-69fd735a7a407ba9f85900cb6a48389c9078c0b7.zip |
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.
(Portage version: 2.1.4.3)
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/blas-goto/ChangeLog | 12 | ||||
-rw-r--r-- | sci-libs/blas-goto/blas-goto-1.22-r1.ebuild | 150 | ||||
-rw-r--r-- | sci-libs/blas-goto/files/blas-goto-1.22-sharedlibs.patch | 44 | ||||
-rw-r--r-- | sci-libs/blas-goto/metadata.xml | 14 |
4 files changed, 212 insertions, 8 deletions
diff --git a/sci-libs/blas-goto/ChangeLog b/sci-libs/blas-goto/ChangeLog index 96b6a3218029..d778c87fc8a4 100644 --- a/sci-libs/blas-goto/ChangeLog +++ b/sci-libs/blas-goto/ChangeLog @@ -1,6 +1,16 @@ # 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) diff --git a/sci-libs/blas-goto/blas-goto-1.22-r1.ebuild b/sci-libs/blas-goto/blas-goto-1.22-r1.ebuild new file mode 100644 index 000000000000..a3d63f5d8665 --- /dev/null +++ b/sci-libs/blas-goto/blas-goto-1.22-r1.ebuild @@ -0,0 +1,150 @@ +# 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 +} diff --git a/sci-libs/blas-goto/files/blas-goto-1.22-sharedlibs.patch b/sci-libs/blas-goto/files/blas-goto-1.22-sharedlibs.patch new file mode 100644 index 000000000000..721d81b0c4a0 --- /dev/null +++ b/sci-libs/blas-goto/files/blas-goto-1.22-sharedlibs.patch @@ -0,0 +1,44 @@ +--- 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 + diff --git a/sci-libs/blas-goto/metadata.xml b/sci-libs/blas-goto/metadata.xml index f12d4740a074..3e66f5e5ec16 100644 --- a/sci-libs/blas-goto/metadata.xml +++ b/sci-libs/blas-goto/metadata.xml @@ -3,12 +3,12 @@ <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> |