From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B62F1138010 for ; Mon, 8 Oct 2012 17:35:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4F282E02CB; Mon, 8 Oct 2012 17:35:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AC442E02CB for ; Mon, 8 Oct 2012 17:35:46 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A242E33D7C5 for ; Mon, 8 Oct 2012 17:35:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 4A032E5436 for ; Mon, 8 Oct 2012 17:35:44 +0000 (UTC) From: "Andrea Arteaga" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrea Arteaga" Message-ID: <1349717715.b1c3878561921e6db816be3574faec8d9fb185d2.spiros@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/openblas/ChangeLog sci-libs/openblas/openblas-0.2.4.ebuild X-VCS-Directories: sci-libs/openblas/ X-VCS-Committer: spiros X-VCS-Committer-Name: Andrea Arteaga X-VCS-Revision: b1c3878561921e6db816be3574faec8d9fb185d2 X-VCS-Branch: master Date: Mon, 8 Oct 2012 17:35:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4c6977bc-2e28-45b1-9aff-19bda62b2b86 X-Archives-Hash: 5627e8c5a4554d7bb956a43f0ae08337 commit: b1c3878561921e6db816be3574faec8d9fb185d2 Author: Andrea Arteaga gmail com> AuthorDate: Mon Oct 8 17:35:15 2012 +0000 Commit: Andrea Arteaga gmail com> CommitDate: Mon Oct 8 17:35:15 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=b1c38785 [sci-libs/openblas] Version bump --- sci-libs/openblas/ChangeLog | 5 + sci-libs/openblas/openblas-0.2.4.ebuild | 131 +++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 0 deletions(-) diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog index 43e11f4..22dd3fa 100644 --- a/sci-libs/openblas/ChangeLog +++ b/sci-libs/openblas/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*openblas-0.2.4 (08 Oct 2012) + + 08 Oct 2012; Andrea Arteaga +openblas-0.2.4.ebuild: + Version bump + *openblas-0.2.3 (20 Aug 2012) 20 Aug 2012; Andrea Arteaga +openblas-0.2.3.ebuild: diff --git a/sci-libs/openblas/openblas-0.2.4.ebuild b/sci-libs/openblas/openblas-0.2.4.ebuild new file mode 100644 index 0000000..4197eda --- /dev/null +++ b/sci-libs/openblas/openblas-0.2.4.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +if [[ ${PV} == "9999" ]] ; then + _SCM=git-2 + EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git" + SRC_URI="" + KEYWORDS="" +else + SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos" + CID="be853da" # commit ID +fi + +inherit eutils toolchain-funcs alternatives-2 multilib ${_SCM} + +DESCRIPTION="Optimized BLAS library based on GotoBLAS2" +HOMEPAGE="http://xianyi.github.com/OpenBLAS/" + +LICENSE="BSD" +SLOT="0" + +IUSE="+incblas int64 dynamic openmp static-libs threads" + +RDEPEND="virtual/fortran" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/xianyi-OpenBLAS-${CID}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-{sharedlibs-0.2,aliasing}.patch + # respect LDFLAGS + sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die + # respect CFLAGS only if dynamic flag not enabled + if ! use dynamic; then + sed -i \ + -e "/^COMMON_OPT/s/-O2/${CFLAGS}/" \ + Makefile.rule || die + fi + # fix executable stacks + local i + for i in $(find . -name \*.S); do + cat >> ${i} <<-EOF + #if defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + EOF + done +} + +src_configure() { + local use_openmp=$(use openmp && echo 1) + use threads && use openmp && use_openmp="" && \ + einfo "openmp and threads enabled: using threads" + sed -i \ + -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ + -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ + -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \ + -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \ + -e "s:^#\s*\(USE_THREAD\)\s*=.*:\1=$(use threads && echo 1 || echo 0):" \ + -e "s:^#\s*\(USE_OPENMP\)\s*=.*:\1=${use_openmp}:" \ + -e "s:^#\s*\(DYNAMIC_ARCH\)\s*=.*:\1=$(use dynamic && echo 1):" \ + -e "s:^#\s*\(INTERFACE64\)\s*=.*:\1=$(use int64 && echo 1):" \ + -e "s:^#\s*\(NO_CBLAS\)\s*=.*:\1=$(use incblas || echo 1):" \ + Makefile.rule || die +} + +src_compile() { + mkdir solibs + emake libs shared && mv *$(get_libname) solibs/ + use static-libs && emake clean && emake libs NEED_PIC= +} + +src_test() { + emake tests +} + +src_install() { + local profname=${PN} threads + use int64 && profname=${profname}-int64 + if use threads; then + threads="-pthread" + profname=${profname}-threads + elif use openmp; then + profname=${profname}-openmp + fi + + dolib.so solibs/lib*$(get_libname) + use static-libs && dolib.a lib*.a + + # create pkg-config file and associated eselect file + cat <<-EOF > ${profname}.pc + prefix=${EPREFIX}/usr + libdir=\${prefix}/$(get_libdir) + includedir=\${prefix}/include + Name: ${PN} + Description: ${DESCRIPTION} + Version: ${PV} + URL: ${HOMEPAGE} + Libs: -L\${libdir} -lopenblas ${threads} + Libs.private: -lm + EOF + + alternatives_for blas ${profname} 0 \ + /usr/$(get_libdir)/pkgconfig/blas.pc ${profname}.pc + + if use incblas; then + echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}" + insinto /usr/include/${PN} + doins cblas.h common*.h config.h param.h + alternatives_for cblas ${profname} 0 \ + /usr/$(get_libdir)/pkgconfig/cblas.pc ${profname}.pc \ + /usr/include/cblas.h ${PN}/cblas.h + fi + + insinto /usr/$(get_libdir)/pkgconfig + doins ${profname}.pc + dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt + + if [[ ${CHOST} == *-darwin* ]] ; then + cd "${ED}"/usr/$(get_libdir) + for d in *.dylib ; do + ebegin "Correcting install_name of ${d}" + install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" + eend $? + done + fi +}