From: "Sebastien Fabbro" <bicatali@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/bicatali:master commit in: sci-libs/atlas/
Date: Fri, 29 Apr 2011 17:12:37 +0000 (UTC) [thread overview]
Message-ID: <05457c4257a0d3e82ad18c72b0efd94b8506d72e.bicatali@gentoo> (raw)
commit: 05457c4257a0d3e82ad18c72b0efd94b8506d72e
Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 29 17:12:18 2011 +0000
Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Fri Apr 29 17:12:18 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/bicatali.git;a=commit;h=05457c42
atlas revbump for linking
---
sci-libs/atlas/ChangeLog | 7 +
sci-libs/atlas/Manifest | 4 +-
...{atlas-3.9.40.ebuild => atlas-3.9.40-r1.ebuild} | 147 +++++++++++++-------
3 files changed, 105 insertions(+), 53 deletions(-)
diff --git a/sci-libs/atlas/ChangeLog b/sci-libs/atlas/ChangeLog
index a0692cf..44edf90 100644
--- a/sci-libs/atlas/ChangeLog
+++ b/sci-libs/atlas/ChangeLog
@@ -2,6 +2,13 @@
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*atlas-3.9.40-r1 (29 Apr 2011)
+
+ 29 Apr 2011; Sébastien Fabbro <bicatali@gentoo.org> -atlas-3.9.40.ebuild,
+ +atlas-3.9.40-r1.ebuild:
+ Reworked entirely linking procedure: now explicitely treat each module blas,
+ cblas and lapack separately
+
*atlas-3.9.40 (27 Apr 2011)
27 Apr 2011; Sébastien Fabbro <bicatali@gentoo.org> -atlas-3.9.39.ebuild,
diff --git a/sci-libs/atlas/Manifest b/sci-libs/atlas/Manifest
index 515ab10..bdd2049 100644
--- a/sci-libs/atlas/Manifest
+++ b/sci-libs/atlas/Manifest
@@ -4,6 +4,6 @@ DIST atlas3.9.40.tar.bz2 5483901 RMD160 8cb7568a287f063c133a7272593706a38ef20648
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.40.ebuild 5980 RMD160 07bcffe734a77fa77c919913a4f3fb316a6f03a1 SHA1 1e4bdf4de8efaa303851025845bf7e80074c0d39 SHA256 4af07f31c40b2b4cfc3a84e7c26a727d6e37c3860d84f5b67d278a6bba395531
-MISC ChangeLog 933 RMD160 2191f3230749b57509cbd157b8f979455b247a9d SHA1 84302b19a83b696ca715985901f6ba0bcde11ef2 SHA256 f604d3e15cfbc0fcab74a35f0941e6cf36241b275f256e6d53a9282f895b5c9b
+EBUILD atlas-3.9.40-r1.ebuild 7282 RMD160 3f9462c3b30be41e1737d0d87093dbb4410ba300 SHA1 01e4e5a2e101576fd6c1ee83f15d488ce5975948 SHA256 0619a7228d59941e98a284ca8a2514a9640e31bd6c78fb9f0cdd86e8a16662a6
+MISC ChangeLog 1179 RMD160 bd748f26de8ce3a28b374f008f24c24fecab200f SHA1 6ea21403379496bde2477272992dca40facba1c0 SHA256 a404d161ebfce79c60171fe6cfc1016c1d51a90b631b40521e9aab8bf5b51353
MISC metadata.xml 726 RMD160 e43f5ea9c594bbe2174f6640bbfdccd8b17d4a68 SHA1 0ab8c05e7925b4716d8c94acd952bf3ab85165cb SHA256 27ef4eee7e645ad923644830d057db45d32342ad250ad903ff10915a9ca068fd
diff --git a/sci-libs/atlas/atlas-3.9.40.ebuild b/sci-libs/atlas/atlas-3.9.40-r1.ebuild
similarity index 58%
rename from sci-libs/atlas/atlas-3.9.40.ebuild
rename to sci-libs/atlas/atlas-3.9.40-r1.ebuild
index be179e9..d39ec99 100644
--- a/sci-libs/atlas/atlas-3.9.40.ebuild
+++ b/sci-libs/atlas/atlas-3.9.40-r1.ebuild
@@ -15,7 +15,7 @@ SRC_URI="mirror://sourceforge/math-atlas/${PN}${PV}.tar.bz2
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="fortran doc lapack openmp static-libs threads"
+IUSE="fortran doc lapack static-libs threads"
RDEPEND="fortran? ( virtual/fortran )"
DEPEND="${RDEPEND}
@@ -39,11 +39,9 @@ atlas_configure() {
# 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" )
- elif use openmp; then
- myconf+=( "-Si omp 2" )
+ myconf+=( "-t -1" "-Si omp 0" )
else
- myconf+=( "-t 0" "-Si omp 0" )
+ myconf+=( "-t 0" "-Si omp 0" )
fi
if use amd64 || use ppc64 || use sparc; then
@@ -97,67 +95,42 @@ atlas_compile() {
}
# transform a static archive into a shared library and install them
-# atlas_install_libs <mylib.a> linking libraries
+# 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
- $(tc-getCC) ${LDFLAGS} -shared -Wl,-soname=${soname} \
+ ${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
}
-# atlas_install_profile <lib>
-atlas_install_profile() {
- local libname=$(basename ${1%.*})
- local modname=$(echo ${libname} | sed -r -e 's/lib(pt|f77|ptf77|)//')
- local profname=${PN}-${modname}
- [[ ${libname} =~ pt ]] && profname=${profname}-threads
- # avoid conflict with other implementations
- if [[ ${libname} == lib${modname} ]]; then
- mv ${libname}.a ${libname/lib/libatl}.a
- libname=${libname/lib/libatl}
- fi
- atlas_install_libs ${libname} -L. -latlas ${PTLIBS}
- cat <<-EOF > ${profname}.pc
+# 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: ${profname}
- Description: ${PN} ${profname}
+ Name: ${pcname}
+ Description: ${PN} ${pcname}
Version: ${PV}
URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${libname#lib} -latlas ${PTLIBS}
- Private: -lm
+ Libs: -L\${libdir} -l${libname} "$@"
+ Cflags: -I\${includedir}/${PN}
+ ${PCREQ}
EOF
-
- if [[ ${modname} == clapack ]]; then
- echo "Cflags: -I\${includedir}/${PN}" >> ${profname}.pc
- echo "Requires: cblas" >> ${profname}.pc
- elif [[ ${modname} == cblas ]]; then
- echo "Cflags: -I\${includedir}/${PN}" >> ${profname}.pc
- elif [[ ${modname} == lapack ]]; then
- echo "Requires: cblas blas" >> ${profname}.pc
- fi
-
insinto /usr/$(get_libdir)/pkgconfig
- doins ${profname}.pc
- [[ ${modname} == clapack ]] && return
-
- if [[ ${modname} == cblas ]]; then
- alternatives_for ${modname} ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/${modname}.pc ${profname}.pc \
- /usr/include/cblas.h ${PN}/cblas.h
- else
- alternatives_for ${modname} ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/${modname}.pc ${profname}.pc
- fi
+ doins ${pcname}.pc
}
pkg_setup() {
@@ -198,19 +171,91 @@ src_compile() {
src_test() {
cd "${S}_shared"
- emake -j1 check || die "emake check failed"
- emake -j1 time || die "emake time failed"
+ emake -j1 check
+ emake -j1 time
}
src_install() {
cd "${S}_shared/lib"
- [[ -e libptcblas.a ]] && PTLIBS="-lpthread"
- atlas_install_libs libatlas.a -lm ${PTLIBS}
+ # rename to avoid collision with other packages
local l
- for l in lib*{blas,lapack}.a; do
- atlas_install_profile ${l}
+ for l in lib{,c}blas.a lib{,c}lapack.a ; do
+ if [[ -e ${l} ]]; then
+ mv ${l} ${l/lib/libatl}
+ use static-libs && mv "${S}"_static/lib/{${l},${l/lib/libatl}}
+ 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)
+ # 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
next reply other threads:[~2011-04-29 17:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 17:12 Sebastien Fabbro [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-05 18:40 [gentoo-commits] dev/bicatali:master commit in: sci-libs/atlas/ Sebastien Fabbro
2011-07-25 16:54 Sebastien Fabbro
2011-05-23 18:44 Sebastien Fabbro
2011-05-23 18:44 Sebastien Fabbro
2011-05-17 17:16 Sebastien Fabbro
2011-04-29 17:28 Sebastien Fabbro
2011-04-27 20:38 Sebastien Fabbro
2011-03-24 21:57 Sebastien Fabbro
2011-03-24 19:12 Sebastien Fabbro
2011-03-22 16:46 Sebastien Fabbro
2011-03-22 4:10 Sebastien Fabbro
2011-03-21 23:03 Sebastien Fabbro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=05457c4257a0d3e82ad18c72b0efd94b8506d72e.bicatali@gentoo \
--to=bicatali@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox