diff options
-rw-r--r-- | sci-libs/atlas/ChangeLog | 5 | ||||
-rw-r--r-- | sci-libs/atlas/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/atlas/atlas-3.9.49.ebuild | 267 |
3 files changed, 275 insertions, 1 deletions
diff --git a/sci-libs/atlas/ChangeLog b/sci-libs/atlas/ChangeLog index 88c9d4caf..34bee8ca4 100644 --- a/sci-libs/atlas/ChangeLog +++ b/sci-libs/atlas/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*atlas-3.9.49 (06 Sep 2001) + + 06 Sep 2011; Andrea Arteaga <andyspiros@gmail.com> +atlas-3.9.49.ebuild: + Version bump + *atlas-3.8.4 (06 Aug 2011) 06 Aug 2011; Andrea Arteaga <andyspiros@gmail.com> +atlas-3.8.4.ebuild: diff --git a/sci-libs/atlas/Manifest b/sci-libs/atlas/Manifest index 32d28d3e3..fd03cabf1 100644 --- a/sci-libs/atlas/Manifest +++ b/sci-libs/atlas/Manifest @@ -2,9 +2,11 @@ AUX 3.9.39-bfr-overflow.patch 2755 RMD160 4f8204eee5b429e9d3db1c211af80396a575fc DIST atlas3.8.4.tar.bz2 2534071 RMD160 fa2828468459213fcf3f1ae4fd26671ba32f4776 SHA1 ef92bcbc4bec096b34ed7a0d29119d84c973df0c SHA256 0f7720fb16fa4b8b8a192ea791e57569546db6f5f016cf3caaee30a9d94583bf DIST atlas3.9.46.tar.bz2 5572227 RMD160 1fbe0f403fc8a35b2b355edabc756c65c19befa2 SHA1 aef8b696bc1bc50b304db953e2f20a653b783317 SHA256 a6667438a04e8a640e5cad75addc7678b19ae7f188c1ae7eb41069f84d43cd1a DIST atlas3.9.47.tar.bz2 5733559 RMD160 036dbe08784bbda33ce1fa94b20a1999b22772cd SHA1 a3a4797669decea28308bd7d3e0adcac44267471 SHA256 ff4d303c7e3e965cf53f6691e110c1dbff76419c292f56b1ba89e6e5c4174fa0 +DIST atlas3.9.49.tar.bz2 5755631 RMD160 b718c3f343d220460427ba2008bd80d8efeb4a71 SHA1 ae2380986f5622f11fb88c4985e3633613a68fc5 SHA256 fbe55e35da9d8d46a01d13af5755145001edc321e5b240bc21b70c55e5c16289 DIST lapack-3.3.1.tgz 4945204 RMD160 5e9d90122110045e07351f3ab30dc4e2b43d52db SHA1 3ce437e05f0e9a3c8148ec41922f6efeef0ebdac SHA256 56821ab51c29369a34e5085728f92c549a9aa926f26acf7eeac87b61eed329e4 EBUILD atlas-3.8.4.ebuild 7394 RMD160 4d60e4e8437f509e447988ee841da387d57f3b9e SHA1 bcf373b5fd94f2942e9eb1bd799ed782c21bc481 SHA256 48ce05edf409f60d8d1c9d404b021d0fc3d204194774ef097b838c6a7d0fa8ab EBUILD atlas-3.9.46.ebuild 7396 RMD160 dd985c2b4d8b4fcdd2b41acb851600900b2da74a SHA1 58ffa873126c0cae86761139df14f4ff85c42a45 SHA256 03bb28d219c0dd759c5b68549beee6f6e1800869d1afef8dbe3eace47dce4e61 EBUILD atlas-3.9.47.ebuild 7396 RMD160 dd985c2b4d8b4fcdd2b41acb851600900b2da74a SHA1 58ffa873126c0cae86761139df14f4ff85c42a45 SHA256 03bb28d219c0dd759c5b68549beee6f6e1800869d1afef8dbe3eace47dce4e61 -MISC ChangeLog 2120 RMD160 9cec6767d56d48f747d96ffe846f141db5c10db9 SHA1 b8d15d8423f24790a5af04629bd18857193cb447 SHA256 3431e99099f72e6bb3cb2248ae7ca206d7677b3deeaf7da494d8b8cf44b21bc3 +EBUILD atlas-3.9.49.ebuild 7396 RMD160 dd985c2b4d8b4fcdd2b41acb851600900b2da74a SHA1 58ffa873126c0cae86761139df14f4ff85c42a45 SHA256 03bb28d219c0dd759c5b68549beee6f6e1800869d1afef8dbe3eace47dce4e61 +MISC ChangeLog 2240 RMD160 b3eac04ca8cc80f55593c3f2bafb36a6314fc609 SHA1 e4fef6ecb8982889077ec66c6da593ad0635b79e SHA256 dd6ea6c0e150e8a57897b296eb907b4ced959948798c4beddd1cf3575fec63db MISC metadata.xml 617 RMD160 cbafba50b52b844c48932a2f848891b3bb98b5aa SHA1 c086b55d8493b984b461940c14409c9834e5ab5c SHA256 a07a38b4c94dea5acc2c9660f84e01c7e03244ecada1f3c77ada00025af48976 diff --git a/sci-libs/atlas/atlas-3.9.49.ebuild b/sci-libs/atlas/atlas-3.9.49.ebuild new file mode 100644 index 000000000..86157c94c --- /dev/null +++ b/sci-libs/atlas/atlas-3.9.49.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +inherit eutils toolchain-funcs versionator alternatives-2 + +LAPACKP=lapack-3.3.1 + +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}.tgz ) )" + +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" + +atlas_configure() { + local mycc="$(tc-getCC)" + # http://sourceforge.net/tracker/?func=detail&aid=3301697&group_id=23725&atid=379483 + [[ ${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.39, 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}.tgz" + ) + else + myconf+=( "-Si latune 0" ) + fi + else + myconf+=( "-Si latune 0" "--nof77" ) + fi + local confdir="${S}_${1}"; shift + myconf+=( $@ ) + mkdir "${confdir}" && cd "${confdir}" + "${S}"/configure ${myconf[@]} || die "configure in ${confdir} failed" +} + +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 +} + +# 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 +} + +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 +} + +src_prepare() { + epatch "${FILESDIR}"/3.9.39-bfr-overflow.patch +} + +src_configure() { + atlas_configure shared "-Fa alg -fPIC" + use static-libs && atlas_configure static +} + +src_compile() { + atlas_compile shared + use static-libs && atlas_compile static +} + +src_test() { + cd "${S}_shared" + emake -j1 check + emake -j1 time +} + +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 +} |