public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sci-libs/blas-goto: ChangeLog blas-goto-1.26.ebuild
@ 2009-03-07 23:07 Patrick Lauer (patrick)
  0 siblings, 0 replies; only message in thread
From: Patrick Lauer (patrick) @ 2009-03-07 23:07 UTC (permalink / raw
  To: gentoo-commits

patrick     09/03/07 23:07:50

  Modified:             ChangeLog
  Added:                blas-goto-1.26.ebuild
  Log:
  Bump to 1.26, small sharedlibs patch by Juan Aguado
  (Portage version: 2.2_rc23/cvs/Linux x86_64)

Revision  Changes    Path
1.21                 sci-libs/blas-goto/ChangeLog

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-goto/ChangeLog?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-goto/ChangeLog?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-goto/ChangeLog?r1=1.20&r2=1.21

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sci-libs/blas-goto/ChangeLog,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ChangeLog	7 Aug 2008 06:16:47 -0000	1.20
+++ ChangeLog	7 Mar 2009 23:07:50 -0000	1.21
@@ -1,6 +1,12 @@
 # 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.20 2008/08/07 06:16:47 ulm Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-goto/ChangeLog,v 1.21 2009/03/07 23:07:50 patrick Exp $
+
+*blas-goto-1.26 (07 Mar 2009)
+
+  07 Mar 2009; Patrick Lauer <patrick@gentoo.org>
+  +files/blas-goto-1.26-sharedlibs.patch, +blas-goto-1.26.ebuild:
+  Bump to 1.26, small sharedlibs patch by Juan Aguado
 
   07 Aug 2008; Ulrich Mueller <ulm@gentoo.org> metadata.xml:
   Add USE flag description to metadata wrt GLEP 56.



1.1                  sci-libs/blas-goto/blas-goto-1.26.ebuild

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-goto/blas-goto-1.26.ebuild?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-goto/blas-goto-1.26.ebuild?rev=1.1&content-type=text/plain

Index: blas-goto-1.26.ebuild
===================================================================
# Copyright 1999-2009 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.26.ebuild,v 1.1 2009/03/07 23:07:50 patrick 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
	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
}






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-07 23:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-07 23:07 [gentoo-commits] gentoo-x86 commit in sci-libs/blas-goto: ChangeLog blas-goto-1.26.ebuild Patrick Lauer (patrick)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox