aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-03-17 13:55:27 +0100
committerJustin Lecher <jlec@gentoo.org>2012-03-17 13:55:27 +0100
commit939879cd0157c5f1bd8320cad67e39cdcc7be65a (patch)
tree386da4168839d69a4b8541dc4ec8d21bccdfa9b8
parentDrop gl and test patch -> included upstream (diff)
parentsci-libs/atlas: Version bump (diff)
downloadsci-939879cd0157c5f1bd8320cad67e39cdcc7be65a.tar.gz
sci-939879cd0157c5f1bd8320cad67e39cdcc7be65a.tar.bz2
sci-939879cd0157c5f1bd8320cad67e39cdcc7be65a.zip
Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/sci
* 'master' of git+ssh://git.overlays.gentoo.org/proj/sci: sci-libs/atlas: Version bump sci-libs/openblas: Version bump
-rw-r--r--sci-libs/atlas/ChangeLog5
-rw-r--r--sci-libs/atlas/Manifest1
-rw-r--r--sci-libs/atlas/atlas-3.9.70.ebuild271
-rw-r--r--sci-libs/openblas/ChangeLog6
-rw-r--r--sci-libs/openblas/openblas-0.1_alpha25.ebuild126
5 files changed, 409 insertions, 0 deletions
diff --git a/sci-libs/atlas/ChangeLog b/sci-libs/atlas/ChangeLog
index 15ba36009..6e4024755 100644
--- a/sci-libs/atlas/ChangeLog
+++ b/sci-libs/atlas/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*atlas-3.9.70 (16 Mar 2012)
+
+ 16 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> +atlas-3.9.70.ebuild:
+ Version bump
+
*atlas-3.9.68 (23 Feb 2012)
23 Feb 2012; Sébastien Fabbro <bicatali@gentoo.org> -atlas-3.9.67.ebuild,
diff --git a/sci-libs/atlas/Manifest b/sci-libs/atlas/Manifest
index 3b53baf1c..3e6ff9142 100644
--- a/sci-libs/atlas/Manifest
+++ b/sci-libs/atlas/Manifest
@@ -1,4 +1,5 @@
DIST atlas3.8.4.tar.bz2 2534071 RMD160 fa2828468459213fcf3f1ae4fd26671ba32f4776 SHA1 ef92bcbc4bec096b34ed7a0d29119d84c973df0c SHA256 0f7720fb16fa4b8b8a192ea791e57569546db6f5f016cf3caaee30a9d94583bf
DIST atlas3.9.68.tar.bz2 6156284 SHA256 d3e337840069fcd9baaf0d9a15d5f612cfd803f2937f0b59de6ccbba58e3ae72 SHA512 2540426b9260c59c9db6874a7579845c42c2bb3b9673f690af297d5ee08d31ae85e39e90b8b35ea404fc5e8514689e9978b5ec107d6c60e2c43f386cbd50ed25 WHIRLPOOL 9453c3ee4d26155a2017fd0fa824121427e1776d03871a6a9dde65acec901e3f6b474d77a6d800158d8a8dd223e1d43258c5db0e7eca43304b6f67de21032fd8
+DIST atlas3.9.70.tar.bz2 6273964 SHA256 c84af7a0fd566e1d432eba451b9678cbfecf469e8e5ed5980a2dfa419153bbf3 SHA512 354a510345045219b98cd4eec1d618d12b68e74f7d0e64a9fcdf24b4780953d929b26469f5e4d34a87b592465930c7e60427dd494d046742161230b4bbf5e3e1 WHIRLPOOL b2ee9cccba089017e1431c5fe546aed7466b926af01cad552e32ce81e682c97ece45922fcc1beed3528d278905eb89084c04561ebfba5c1d6f3bdcf2eadf3c94
DIST lapack-3.3.1.tgz 4945204 SHA256 56821ab51c29369a34e5085728f92c549a9aa926f26acf7eeac87b61eed329e4 SHA512 67f6e9e0457101fdf41dd0ce8a692155ab45f26a8d94848c4c99597eab18497faa2c0fbd342d2ad11bc2818693b8decad4f3a63216bdc82901a7a79a8f4d4725 WHIRLPOOL 69c4a780dd396c2c0f22bb3b65be094228abd48877a0488c606a547e9046655bf6623918ae2756121fff244d46fe601599f8898cdc984524e8a80429b2e75414
DIST lapack-3.4.0.tgz 6127787 SHA256 a7139ef97004d0e3c4c30f1c52d508fd7ae84b5fbaf0dd8e792c167dc306c3e9 SHA512 2dc4994d5d88ea08d5bfa6674c6e6b363cd5669140b201913796efc0fc06d372ced83820e90afe67a6efb4b6b06abb7e727e337c071cd4c0d67354a6b453fadf WHIRLPOOL feaf2429e91a8a65916564fc39594c29e8110fe410fc8e8490fb3ca7a8c4191cad435f85d4ad288510ff48e8b3ad680426c4e00a15488c37eb0f21be7399bcb7
diff --git a/sci-libs/atlas/atlas-3.9.70.ebuild b/sci-libs/atlas/atlas-3.9.70.ebuild
new file mode 100644
index 000000000..b2a010ae2
--- /dev/null
+++ b/sci-libs/atlas/atlas-3.9.70.ebuild
@@ -0,0 +1,271 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+inherit eutils toolchain-funcs fortran-2 versionator alternatives-2
+
+LAPACKP=lapack-3.4.0.tgz
+
+DESCRIPTION="Automatically Tuned Linear Algebra Software"
+HOMEPAGE="http://math-atlas.sourceforge.net/"
+SRC_URI="mirror://sourceforge/math-atlas/${PN}${PV}.tar.bz2
+ fortran? ( lapack? ( http://www.netlib.org/lapack/${LAPACKP} ) )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="fortran doc lapack static-libs threads"
+
+RDEPEND="fortran? ( virtual/fortran )"
+DEPEND="${RDEPEND}
+ !prefix? ( sys-power/cpufrequtils )"
+
+S="${WORKDIR}/ATLAS"
+
+pkg_setup() {
+ if [[ -n $(type -P cpufreq-info) ]]; then
+ [[ -z $(cpufreq-info -d) ]] && return
+ local ncpu=$(LANG=C cpufreq-info | grep -c "analyzing CPU")
+ local cpu=0
+ while [[ ${cpu} -lt ${ncpu} ]]; do
+ if ! $(LANG=C cpufreq-info -p -c ${cpu} | grep -q performance); then
+ ewarn "CPU $cpu is not set to performance"
+ ewarn "Run cpufreq-set -r -g performance as root"
+ die "${PN} needs all cpu set to performance"
+ fi
+ cpu=$(( cpu + 1 ))
+ done
+ else
+ ewarn "Please make sure to disable CPU throttling completely"
+ ewarn "during the compile of ${PN}. Otherwise, all ${PN}"
+ ewarn "generated timings will be completely random and the"
+ ewarn "performance of the resulting libraries will be degraded"
+ ewarn "considerably."
+ fi
+ use fortran && fortran-2_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/3.9.39-bfr-overflow.patch
+ epatch "${FILESDIR}"/3.9.63-leaks.patch
+}
+
+src_configure() {
+ atlas_configure() {
+ # hack needed to trick the flaky gcc detection
+ local mycc="$(tc-getCC)"
+ [[ ${mycc} == *gcc* ]] && mycc=gcc
+
+ local myconf=(
+ "--prefix=${ED}/usr"
+ "--libdir=${ED}/usr/$(get_libdir)"
+ "--incdir=${ED}/usr/include"
+ "--cc=${mycc}"
+ "-C ac ${mycc}"
+ "-D c -DWALL"
+ "-F ac '${CFLAGS}'"
+ "-Ss pmake '\$(MAKE) ${MAKEOPTS}'"
+ )
+
+ # OpenMP shown to decreased performance over POSIX threads
+ # (at least in 3.9.x, see atlas-dev mailing list)
+ if use threads; then
+ myconf+=( "-t -1" "-Si omp 0" )
+ else
+ myconf+=( "-t 0" "-Si omp 0" )
+ fi
+
+ if use amd64 || use ppc64 || use sparc; then
+ if [ ${ABI} = amd64 ] || [ ${ABI} = ppc64 ] || [ ${ABI} = sparc64 ] ; then
+ myconf+=( "-b 64" )
+ elif [ ${ABI} = x86 ] || [ ${ABI} = ppc ] || [ ${ABI} = sparc32 ] ; then
+ myconf+=( "-b 32" )
+ else
+ myconf+=( "-b 64" )
+ fi
+ elif use ppc || use x86; then
+ myconf+=( "-b 32" )
+ elif use ia64; then
+ myconf+=( "-b 64" )
+ else #hppa alpha ...
+ myconf+=( "" )
+ fi
+ if use fortran; then
+ myconf+=(
+ "-C if $(tc-getFC)"
+ "-F if '${FFLAGS}'"
+ )
+ if use lapack; then
+ myconf+=(
+ "-Si latune 1"
+ "--with-netlib-lapack-tarfile=${DISTDIR}/${LAPACKP}"
+ )
+ else
+ myconf+=( "-Si latune 0" )
+ fi
+ else
+ myconf+=( "-Si latune 0" "--nof77" )
+ fi
+ local confdir="${S}_${1}"; shift
+ myconf+=( $@ )
+ mkdir "${confdir}" && cd "${confdir}"
+ # for debugging
+ echo ${myconf[@]} > myconf.out
+ "${S}"/configure ${myconf[@]} || die "configure in ${confdir} failed"
+ }
+
+ atlas_configure shared "-Fa alg -fPIC"
+ use static-libs && atlas_configure static
+}
+
+src_compile() {
+ atlas_compile() {
+ pushd "${S}_${1}" > /dev/null
+ # atlas does its own parallel builds
+ emake -j1 build
+ cd lib
+ emake libclapack.a
+ [[ -e libptcblas.a ]] && emake libptclapack.a
+ popd > /dev/null
+ }
+
+ atlas_compile shared
+ use static-libs && atlas_compile static
+}
+
+src_test() {
+ cd "${S}_shared"
+ emake -j1 check time
+}
+
+# transform a static archive into a shared library and install them
+# atlas_install_libs <mylib.a> [extra link flags]
+atlas_install_libs() {
+ local libname=$(basename ${1%.*})
+ einfo "Installing ${libname}"
+ local soname=${libname}.so.$(get_major_version)
+ shift
+ pushd "${S}_shared"/lib > /dev/null
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} -shared -Wl,-soname=${soname} \
+ -Wl,--whole-archive ${libname}.a -Wl,--no-whole-archive \
+ "$@" -o ${soname} || die "Creating ${soname} failed"
+ dolib.so ${soname}
+ ln -s ${soname} ${soname%.*}
+ dosym ${soname} /usr/$(get_libdir)/${soname%.*}
+ popd > /dev/null
+ use static-libs && dolib.a "${S}_static"/lib/${libname}.a
+}
+
+# create and install a pkgconfig file
+# atlas_install_pc <libname> <pkg name> [extra link flags]
+atlas_install_pc() {
+ local libname=${1} ; shift
+ local pcname=${1} ; shift
+ cat <<-EOF > ${pcname}.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ${pcname}
+ Description: ${PN} ${pcname}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -l${libname} $@
+ Cflags: -I\${includedir}/${PN}
+ ${PCREQ}
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${pcname}.pc
+}
+
+src_install() {
+ cd "${S}_shared/lib"
+ # rename to avoid collision with other packages
+ local l
+ for l in {,c}{blas,lapack}; do
+ if [[ -e lib${l}.a ]]; then
+ mv lib{,atl}${l}.a
+ use static-libs && mv "${S}"_static/lib/lib{,atl}${l}.a
+ fi
+ done
+
+ [[ -e libptcblas.a ]] && PTLIBS="-lpthread"
+
+ # atlas
+ atlas_install_libs libatlas.a -lm ${PTLIBS}
+
+ # cblas
+ atlas_install_libs libatlcblas.a -lm -L. -latlas
+ atlas_install_pc atlcblas atlas-cblas -lm -latlas
+ alternatives_for cblas atlas 0 \
+ /usr/$(get_libdir)/pkgconfig/cblas.pc atlas-cblas.pc \
+ /usr/include/cblas.h atlas/cblas.h
+
+ # cblas threaded
+ if [[ -e libptcblas.a ]]; then
+ atlas_install_libs libptcblas.a -lm -L. -latlas ${PTLIBS}
+ atlas_install_pc ptcblas atlas-cblas-threads -lm -latlas ${PTLIBS}
+ alternatives_for cblas atlas-threads 0 \
+ /usr/$(get_libdir)/pkgconfig/cblas.pc atlas-cblas-threads.pc \
+ /usr/include/cblas.h atlas/cblas.h
+ fi
+
+ if use lapack; then
+ PCREQ="Requires: cblas"
+ # clapack
+ atlas_install_libs libatlclapack.a -lm -L. -latlas -latlcblas
+ atlas_install_pc atlclapack atlas-clapack -lm -latlas
+
+ # clapack threaded
+ if [[ -e libptclapack.a ]]; then
+ atlas_install_libs libptclapack.a -lm -L. -latlas -lptcblas ${PTLIBS}
+ atlas_install_pc ptclapack atlas-clapack-threads -lm -latlas ${PTLIBS}
+ fi
+ fi
+
+ if use fortran; then
+ LINK=$(tc-getF77) PCREQ=
+ # blas
+ atlas_install_libs libf77blas.a -lm -L. -latlas
+ atlas_install_pc f77blas atlas-blas -lm -latlas
+ alternatives_for blas atlas 0 \
+ /usr/$(get_libdir)/pkgconfig/blas.pc atlas-blas.pc
+
+ # blas threaded
+ if [[ -e libptf77blas.a ]]; then
+ atlas_install_libs libptf77blas.a -lm -L. -latlas ${PTLIBS}
+ atlas_install_pc ptf77blas atlas-blas-threads -lm -latlas ${PTLIBS}
+ alternatives_for blas atlas-threads 0 \
+ /usr/$(get_libdir)/pkgconfig/blas.pc atlas-blas-threads.pc
+ fi
+
+ if use lapack; then
+ PCREQ="Requires: blas cblas"
+ # lapack
+ atlas_install_libs libatllapack.a \
+ -lm -L. -latlas -latlcblas -lf77blas
+ atlas_install_pc atllapack atlas-lapack -lm -latlas
+ alternatives_for lapack atlas 0 \
+ /usr/$(get_libdir)/pkgconfig/lapack.pc atlas-lapack.pc
+ # lapack threaded
+ if [[ -e libptlapack.a ]]; then
+ atlas_install_libs libptlapack.a \
+ -lm -L. -latlas -lptcblas -lptf77blas ${PTLIBS}
+ atlas_install_pc ptlapack atlas-lapack-threads \
+ -lm -latlas ${PTLIBS}
+ alternatives_for lapack atlas-threads 0 \
+ /usr/$(get_libdir)/pkgconfig/lapack.pc atlas-lapack-threads.pc
+ fi
+ fi
+ fi
+
+ cd "${S}"
+ insinto /usr/include/${PN}
+ doins include/*.h
+
+ cd "${S}/doc"
+ dodoc INDEX.txt AtlasCredits.txt ChangeLog
+ use doc && dodoc atlas*pdf cblas.pdf cblasqref.pdf
+ use doc && use fortran && dodoc f77blas*pdf
+ use doc && use fortran && use lapack && dodoc lapack*pdf
+}
diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index 34d9ae2b4..bf190d3ef 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,12 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*openblas-0.1_alpha25 (16 Mar 2012)
+
+ 16 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org>
+ +openblas-0.1_alpha25.ebuild:
+ Version bump
+
15 Mar 2012; François Bissey <francois.bissey@canterbury.ac.nz>
openblas-0.1_alpha2.ebuild, openblas-9999.ebuild:
correct typo
diff --git a/sci-libs/openblas/openblas-0.1_alpha25.ebuild b/sci-libs/openblas/openblas-0.1_alpha25.ebuild
new file mode 100644
index 000000000..c5a8dba83
--- /dev/null
+++ b/sci-libs/openblas/openblas-0.1_alpha25.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils toolchain-funcs alternatives-2 git-2 multilib
+
+DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
+HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+EGIT_REPO_URI="git://github.com/xianyi/OpenBLAS.git"
+EGIT_COMMIT="v0.1alpha2.5"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-macos ~ppc-macos ~x64-macos"
+
+IUSE="+incblas int64 dynamic openmp static-libs threads"
+
+RDEPEND="virtual/fortran"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MYPN}"
+
+pkg_setup() {
+ ewarn "If the compilation fails, try setting the TARGET environment variable"
+ ewarn "to your CPU's codename and run emerge again."
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-{sharedlibs,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*\(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 -lm ${threads}
+ 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
+}