summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2011-05-23 18:56:13 +0100
committerSébastien Fabbro <bicatali@gentoo.org>2011-05-23 18:56:13 +0100
commit53fb259d4e6bee0b6caa430b1b696116a9c92c7a (patch)
tree919c567eda89ee2063a42f0d6fb4e6c3f08bc43d
parentgcc temporary hack to avoid undefined symbols (diff)
downloadbicatali-53fb259d4e6bee0b6caa430b1b696116a9c92c7a.tar.gz
bicatali-53fb259d4e6bee0b6caa430b1b696116a9c92c7a.tar.bz2
bicatali-53fb259d4e6bee0b6caa430b1b696116a9c92c7a.zip
bumped stable atlas
-rw-r--r--sci-libs/atlas/ChangeLog6
-rw-r--r--sci-libs/atlas/Manifest9
-rw-r--r--sci-libs/atlas/atlas-3.8.3.ebuild224
-rw-r--r--sci-libs/atlas/atlas-3.8.4.ebuild282
4 files changed, 292 insertions, 229 deletions
diff --git a/sci-libs/atlas/ChangeLog b/sci-libs/atlas/ChangeLog
index 685e0d5..00e4d80 100644
--- a/sci-libs/atlas/ChangeLog
+++ b/sci-libs/atlas/ChangeLog
@@ -2,6 +2,12 @@
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*atlas-3.8.4 (23 May 2011)
+
+ 23 May 2011; Sébastien Fabbro <bicatali@gentoo.org> -atlas-3.8.3.ebuild,
+ +atlas-3.8.4.ebuild:
+ Version bump of the stable branch
+
23 May 2011; Sébastien Fabbro <bicatali@gentoo.org> atlas-3.9.41.ebuild:
Forces gcc whenever a version of gcc is used, avoiding upstream bug
diff --git a/sci-libs/atlas/Manifest b/sci-libs/atlas/Manifest
index b99b87c..c492fff 100644
--- a/sci-libs/atlas/Manifest
+++ b/sci-libs/atlas/Manifest
@@ -1,9 +1,8 @@
AUX 3.9.39-bfr-overflow.patch 2755 RMD160 4f8204eee5b429e9d3db1c211af80396a575fc87 SHA1 9b59bd8a7bb55e7ed4138731262d17532949ece0 SHA256 19cdab39e50e06de0bdc2a080642388fec3a16c826657621f15fc294268d3438
-DIST atlas3.8.3.tar.bz2 2527756 RMD160 0425e630d9d0c5b7aae81427a41b7eaa18447e90 SHA1 c7546210df4796457d9e96a00444adc4c0f2e77f SHA256 e537168f2022db98b9029c8064815b5581620c12d782016138b1bf0bbb01f473
+DIST atlas3.8.4.tar.bz2 2534071 RMD160 fa2828468459213fcf3f1ae4fd26671ba32f4776 SHA1 ef92bcbc4bec096b34ed7a0d29119d84c973df0c SHA256 0f7720fb16fa4b8b8a192ea791e57569546db6f5f016cf3caaee30a9d94583bf
DIST atlas3.9.41.tar.bz2 5498475 RMD160 d068b3cbc330aa2ad5f578dc2ae2d0cf86844155 SHA1 35424fda470feb78a29081c991eefa1276a5f52b SHA256 3fc1a4200ee953873747a7cb90b13532d1fb3f81a4cbb91c0e0fabb3eddb3bfc
-DIST lapack-3.3.0.tgz 6064824 RMD160 cc72e7c93ab13464fd892d684b00b910cbbd3b3e SHA1 4f0b103da52110e7f60d1d7676727103aca9785e SHA256 bc531761287156e17476395c42664a15373723f54a6f80f192cda47771ec1225
DIST lapack-3.3.1.tgz 4945204 RMD160 5e9d90122110045e07351f3ab30dc4e2b43d52db SHA1 3ce437e05f0e9a3c8148ec41922f6efeef0ebdac SHA256 56821ab51c29369a34e5085728f92c549a9aa926f26acf7eeac87b61eed329e4
-EBUILD atlas-3.8.3.ebuild 6019 RMD160 10c7b3937ec41c2c182f1faecbcf7c2e8901befe SHA1 15ebfd302a3764880fc599a7d1cdc59a214e3a27 SHA256 cc3139e44d2da073767df95280be90413fe39f5e02e0ce5243ff2267891d3e16
-EBUILD atlas-3.9.41.ebuild 7244 RMD160 bb812c1afdfb44626215699cdbde5c72576315b2 SHA1 2ddf511f633c64d534136d33782e15bd02e0252a SHA256 c15fe7534a3a7a48cb2f1f8208df074b1e32c3b1ef2beea43af0f355c594da7a
-MISC ChangeLog 1373 RMD160 2545605aee8386c6c6140d2c9424657301a9e52e SHA1 bf2da4db791f09b1d6e2e126e97306a09a29d84b SHA256 a525e0fc450241a5c2da322768776c2c21eb7a7870a3ed801e1e99cdaf88561f
+EBUILD atlas-3.8.4.ebuild 7431 RMD160 383e358040c54435ae80f0dfe749e398ba86bc5e SHA1 d7d13b5a511de22e645f0f4c6cb3354368123001 SHA256 9908b00fe60efe90eb9d7432b12543ff1a150b23fba8c10aaf31c51a375cee87
+EBUILD atlas-3.9.41.ebuild 7384 RMD160 58c03d677d13fba19893267ea007108b7a50d60c SHA1 3c519ff51d75cf4d401cb6ef003ab97bb14f7666 SHA256 ece0d09608c78c7b6cc51dc4f0c11ed21b96ed745c587080ad829e96879bceaa
+MISC ChangeLog 1684 RMD160 2840ad1a3e4eb9c47b39562e979dbc1319db132e SHA1 427d6b649b5fa8129f5419c47f702b20136633f3 SHA256 afa3f2debcfca046fcaf1ef5de84f13544370c960249003b9bac043879f9348b
MISC metadata.xml 726 RMD160 e43f5ea9c594bbe2174f6640bbfdccd8b17d4a68 SHA1 0ab8c05e7925b4716d8c94acd952bf3ab85165cb SHA256 27ef4eee7e645ad923644830d057db45d32342ad250ad903ff10915a9ca068fd
diff --git a/sci-libs/atlas/atlas-3.8.3.ebuild b/sci-libs/atlas/atlas-3.8.3.ebuild
deleted file mode 100644
index 047a6d5..0000000
--- a/sci-libs/atlas/atlas-3.8.3.ebuild
+++ /dev/null
@@ -1,224 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=3
-inherit eutils toolchain-funcs multilib alternatives-2
-
-LAPACKP=lapack-3.3.0
-
-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"
-IUSE="fortran doc lapack static-libs xblas"
-
-RDEPEND="lapack? ( xblas? ( sci-libs/xblas ) )"
-DEPEND="${RDEPEND}"
-
-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 sudo cpufreq-set -g performance -c <CPU #> for all CPUs"
- 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
-}
-
-lapack_compile() {
- cd "${WORKDIR}/${LAPACKP}"
- local timer=INT_CPU_TIME
- case $(tc-getFC) in
- *gfortran|*g77) timer=INT_ETIME ;;
- *ifort) timer=EXT_ETIME ;;
- esac
- cat > make.inc <<-EOF
- FORTRAN = $(tc-getFC)
- OPTS = ${FFLAGS}
- NOOPT = -O0
- LOADER = $(tc-getFC)
- LOADEROPTS = ${LDFLAGS}
- ARCH = $(tc-getAR)
- ARCHFLAGS = cr
- RANLIB = $(tc-getRANLIB)
- TIMER = ${timer}
- $(use xblas && echo "USEXBLAS = Yes")
- EOF
- if use static-libs; then
- emake \
- LAPACKLIB=liblapack_nonpic.a \
- lapacklib || die "lapack static compilation failed"
- emake clean
- fi
- emake \
- LAPACKLIB=liblapack_pic.a \
- OPTS="${FFLAGS} -fPIC" \
- NOOPT="-O0 -fPIC" \
- lapacklib || die "lapack pic compilation failed"
-}
-
-src_configure() {
- # we need a pic static lapack lib before configuring
- use lapack && lapack_compile
- local myconf=(
- "--prefix=${ED}/usr"
- "--libdir=${ED}/usr/$(get_libdir)"
- "--incdir=${ED}/usr/include"
- "--cc=$(tc-getCC)"
- "-C ac $(tc-getCC)"
- "-D c -DWALL"
- "-F ac '${CFLAGS}'"
- "-Si cputhrchk 0"
- "-Ss pmake '\$(MAKE) ${MAKEOPTS}'"
- )
-
- 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}'"
- )
- else
- myconf+=( "--nof77" )
- fi
-
- LAPACKLIB="${WORKDIR}/${LAPACKP}/liblapack"
- if use static-libs; then
- mkdir "${S}_build_static" && cd "${S}_build_static"
- "${S}"/configure \
- ${myconf[@]} \
- $(use lapack && echo "--with-netlib-lapack=${LAPACKLIB}_nonpic.a") \
- || die "configure static failed"
- fi
-
- mkdir "${S}_build_shared" && cd "${S}_build_shared"
- myconf+=( "-Fa alg -fPIC" )
- "${S}"/configure \
- ${myconf[@]} \
- $(use lapack && echo "--with-netlib-lapack=${LAPACKLIB}_pic.a") \
- || die "configure shared failed"
-}
-
-src_compile() {
- # atlas does its own parallel builds
- if use static-libs; then
- cd "${S}_build_static"
- emake -j1 build || die "emake static failed"
- fi
- cd "${S}_build_shared"
- emake -j1 build || die "emake static with PIC failed"
- cd lib
- local alibs="shared cshared"
- [[ -e libptcblas.a ]] && alibs="${alibs} ptshared ptcshared"
- emake ${alibs} || die "emake shared libs failed"
-}
-
-src_test() {
- cd "${S}_build_shared"
- emake -j1 check || die "emake check failed"
- emake -j1 time || die "emake time failed"
-}
-
-# atlas_install <blas|cblas|lapack> <lib>
-atlas_install() {
- local iname=${1} ilib=${2}
- if [[ ${iname} == ${ilib} ]]; then
- # rename to avoid conflict with linked configurations
- mv "${ED}"/usr/$(get_libdir)/lib{,a}${ilib}.so
- use static-libs && "${ED}"/usr/$(get_libdir)/lib{,a}${ilib}.a
- ilib=a${ilib}
- fi
- local prof=${PN}-${iname} ptlibs=
- if [[ ${ilib:0:2} == pt ]]; then
- prof=${prof}-threads
- ptlibs="-lthreads"
- fi
- cat <<-EOF > ${prof}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${prof}
- Description: ${DESCRIPTION} ${iname} implementation
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -latlas -l${ilib} ${ptlibs}
- Private: -lm
- Cflags: -I\${includedir}/${PN}
- $([[ ${1} == lapack ]] && echo "Requires: blas")
- EOF
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${prof}.pc || die
- if [[ ${iname} == cblas ]]; then
- alternatives_for ${iname} ${prof} 0 \
- "/usr/$(get_libdir)/pkgconfig/${iname}.pc" "${prof}.pc" \
- "/usr/include/cblas.h" "${PN}/cblas.h"
- else
- alternatives_for ${iname} ${prof} 0 \
- "/usr/$(get_libdir)/pkgconfig/${iname}.pc" "${prof}.pc"
- fi
-}
-
-src_install() {
- # do a loop to make sure we install the same in shared/static
- local l
- for l in "${S}_build_shared"/lib/lib*.so; do
- dolib.so "${l}" || die
- if use static-libs; then
- dolib.a "${l/_shared/_static}".a || die
- fi
- done
- atlas_install cblas cblas
- if use fortran; then
- atlas_install blas f77blas
- use lapack && atlas_install lapack lapack
- fi
- if [[ -e "${S}_build_shared"/lib/libptcblas.so ]]; then
- atlas_install cblas ptcblas
- use fortran && atlas_install blas ptf77blas
- fi
- insinto /usr/include/${PN}
- doins include/*.h || die
- #dosym atlas/clapack.h /usr/include/clapack.h
-
- cd doc
- dodoc INDEX.txt AtlasCredits.txt ChangeLog
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins atlas*pdf cblas.pdf cblasqref.pdf || die "doins docs failed"
- use fortran && doins f77blas*pdf
- use fortran && doins lapack*pdf
- fi
-}
diff --git a/sci-libs/atlas/atlas-3.8.4.ebuild b/sci-libs/atlas/atlas-3.8.4.ebuild
new file mode 100644
index 0000000..76e8fdd
--- /dev/null
+++ b/sci-libs/atlas/atlas-3.8.4.ebuild
@@ -0,0 +1,282 @@
+# 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 "
+IUSE="fortran doc lapack static-libs threads"
+
+RDEPEND="fortran? ( virtual/fortran )"
+DEPEND="${RDEPEND}
+ !prefix? ( sys-power/cpufrequtils )"
+
+S="${WORKDIR}/ATLAS"
+
+lapack_compile() {
+ cd "${WORKDIR}/${LAPACKP}"
+ local timer=INT_CPU_TIME
+ case $(tc-getFC) in
+ *gfortran|*g77) timer=INT_ETIME ;;
+ *ifort) timer=EXT_ETIME ;;
+ esac
+ cat > make.inc <<-EOF
+ FORTRAN = $(tc-getFC)
+ OPTS = ${FFLAGS}
+ NOOPT = -O0
+ LOADER = $(tc-getFC)
+ LOADEROPTS = ${LDFLAGS}
+ ARCH = $(tc-getAR)
+ ARCHFLAGS = cr
+ RANLIB = $(tc-getRANLIB)
+ TIMER = ${timer}
+ EOF
+ if use static-libs; then
+ emake \
+ LAPACKLIB=liblapack_nonpic.a \
+ lapacklib || die "lapack static compilation failed"
+ emake clean
+ fi
+ emake \
+ LAPACKLIB=liblapack_pic.a \
+ OPTS="${FFLAGS} -fPIC" \
+ NOOPT="-O0 -fPIC" \
+ lapacklib || die "lapack pic compilation failed"
+}
+
+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}'"
+ )
+
+ if use threads; then
+ myconf+=( "-t -1" )
+ else
+ myconf+=( "-t 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+=(
+ "-Si nof77 0"
+ "-C if $(tc-getFC)"
+ "-F if '${FFLAGS}'"
+ )
+ use lapack && myconf+=( "--with-netlib-lapack=${LAPACKLIB}" )
+ else
+ myconf+=( "-Si nof77 1" )
+ 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
+ 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() {
+ if use fortran && use lapack; then
+ lapack_compile
+ LAPACKLIB="${WORKDIR}/${LAPACKP}/liblapack_pic.a"
+ fi
+ atlas_configure shared "-Fa alg -fPIC"
+ if use static-libs; then
+ use fortran && use lapack && \
+ LAPACKLIB="${WORKDIR}/${LAPACKP}/liblapack_nonpic.a"
+ atlas_configure static
+ fi
+}
+
+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
+ 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
+ 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
+}