diff options
author | Sébastien Fabbro <bicatali@gentoo.org> | 2011-05-31 20:35:11 +0100 |
---|---|---|
committer | Sébastien Fabbro <bicatali@gentoo.org> | 2011-05-31 20:35:11 +0100 |
commit | 4381b1f0c38e253f3cc874755fb95a87db81c100 (patch) | |
tree | 943fdc1765b1febba3ab3ebf2db974b787b204a6 | |
parent | moved to eapi4 (diff) | |
download | bicatali-4381b1f0c38e253f3cc874755fb95a87db81c100.tar.gz bicatali-4381b1f0c38e253f3cc874755fb95a87db81c100.tar.bz2 bicatali-4381b1f0c38e253f3cc874755fb95a87db81c100.zip |
fixed shared libs. added a aliasing patch. switched to eapi4.
-rw-r--r-- | sci-libs/openblas/ChangeLog | 5 | ||||
-rw-r--r-- | sci-libs/openblas/Manifest | 5 | ||||
-rw-r--r-- | sci-libs/openblas/files/openblas-aliasing.patch | 11 | ||||
-rw-r--r-- | sci-libs/openblas/openblas-9999.ebuild | 69 |
4 files changed, 50 insertions, 40 deletions
diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog index 8962ce2..cbc94ea 100644 --- a/sci-libs/openblas/ChangeLog +++ b/sci-libs/openblas/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 31 May 2011; Sébastien Fabbro <bicatali@gentoo.org> openblas-9999.ebuild, + +files/openblas-aliasing.patch: + Fixed shared libs. Make ebuild easier to debug with a generated rule Makefile + instead of dynamic. Added a aliasing patch. Switched to EAPI4. + 23 Feb 2011; Sébastien Fabbro <bicatali@gentoo.org> openblas-9999.ebuild, files/openblas-sharedlibs.patch: fixed ldflags propagation diff --git a/sci-libs/openblas/Manifest b/sci-libs/openblas/Manifest index 2d847bd..4671481 100644 --- a/sci-libs/openblas/Manifest +++ b/sci-libs/openblas/Manifest @@ -1,4 +1,5 @@ +AUX openblas-aliasing.patch 421 RMD160 1c4b38a0145f937f4c35afa03ec54196646ff311 SHA1 08a33e39d9e0a753e82b9298da73094d79311cbd SHA256 8d7c2fff88c9a51b3bc419897194bbf513fa96b9dbb6b9063c9a8e9e0d3c7773 AUX openblas-sharedlibs.patch 1929 RMD160 87db891bb2e0b538da7a4f21c10c65b78149a26c SHA1 031912957004745f5e68c2cdf3899f0e80118377 SHA256 fc5f014d6b81a481a9c9c29d82de07f5a5182d9355f90071ba89b680f7e09c1b -EBUILD openblas-9999.ebuild 2741 RMD160 99a6837423a6088bf4c13cd57876affe39259eff SHA1 ddcbaf5c702856ab87f6c3c8a8b040d742c75bbe SHA256 d5e5afde5a285f2538c9aa968b824aa58b34324411e09e4b90e0f170c9c94e7b -MISC ChangeLog 436 RMD160 73b3b70b08709eb563722b76e3e4e2b782862116 SHA1 811ccab45c6ca9cd45389fc5511e191c40c5f433 SHA256 3be8e315fc7781cb5eea8f280d9a72ed643d9e9e3ce462aef00328e485957198 +EBUILD openblas-9999.ebuild 2751 RMD160 8d49d8331313d208496be7793a04b27cda5e6a31 SHA1 f036b9b1989c64822aa75a2b7aea61c042db0bb8 SHA256 029024fa7f164d0d61d88daeaa81a77ec1375b19412f2b68111503ee2b966202 +MISC ChangeLog 693 RMD160 9b9f879ccb36272cdd09ef1f844a3503288482b0 SHA1 b1efef0b7571b9d103ec501973c6403e10efe6a2 SHA256 1897a7f21fb253bad6bfb04710a8655c9751d0ea516248f67931e5e3461cf18e MISC metadata.xml 569 RMD160 4405ffe0e8941f0806ce0b7f984052be2ee4ed8b SHA1 ae10082e791ba7635e3c5986b0842fd74ff9ef38 SHA256 ddd3fa2f35204325b559955bc761c1c837265b9fc3ecc31dac760bc30fa082d2 diff --git a/sci-libs/openblas/files/openblas-aliasing.patch b/sci-libs/openblas/files/openblas-aliasing.patch new file mode 100644 index 0000000..8c59b1c --- /dev/null +++ b/sci-libs/openblas/files/openblas-aliasing.patch @@ -0,0 +1,11 @@ +--- driver/others/init.c.orig 2011-05-31 18:59:24.000000000 +0100 ++++ driver/others/init.c 2011-05-31 20:18:51.000000000 +0100 +@@ -261,7 +261,7 @@ + for (node = 0; node < MAX_NODES; node ++) common -> node_info[node] = 0; + + while ((dir = readdir(dp)) != NULL) { +- if (*(unsigned int *) dir -> d_name == 0x065646f6eU) { ++ if (*(char *) dir -> d_name == 0x065646f6eU) { + + node = atoi(&dir -> d_name[4]); + diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild index 64e9715..b19ce19 100644 --- a/sci-libs/openblas/openblas-9999.ebuild +++ b/sci-libs/openblas/openblas-9999.ebuild @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI=3 +EAPI=4 -inherit eutils toolchain-funcs alternatives-2 git +inherit eutils toolchain-funcs alternatives-2 git-2 DESCRIPTION="Optimized BLAS library based on GotoBLAS2" HOMEPAGE="http://xianyi.github.com/OpenBLAS/" @@ -22,7 +22,10 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MYPN}" src_prepare() { - epatch "${FILESDIR}"/${PN}-sharedlibs.patch + 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}/" \ @@ -40,57 +43,47 @@ src_prepare() { } src_configure() { - local bits=32 - if use amd64 || use alpha || use ppc64 || use sparc || use ia64; then - bits=64 - fi - MAKEFLAGS=( - CC=$(tc-getCC) - FC=$(tc-getFC) - LDFLAGS="${LDFLAGS}" - FLDFLAGS="${LDFLAGS}" - BINARY=${bits} - USE_THREAD=$(use threads && echo 1 || echo 0) - USE_OPENMP=$(use openmp && echo 1) - DYNAMIC_ARCH=$(use dynamic && echo 1) - INTERFACE64=$(use int64 && echo 1) - NO_CBLAS=$(use incblas || echo 1) - ) + 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() { - emake libs shared "${MAKEFLAGS[@]}" || die "emake failed" - if use static-libs; then - rename so so_sav *.so && emake clean - emake libs "${MAKEFLAGS[@]}" NEED_PIC= || die "emake static failed" - rename so_sav so *.so_sav - fi + mkdir solibs + emake libs shared && mv *.so solibs/ + use static-libs && emake clean && emake libs NEED_PIC= } src_test() { - emake tests "${MAKEFLAGS[@]}" || die "emake tests failed" + emake tests } src_install() { - local libname=${PN} - mv $(readlink lib${libname}.so) lib${libname}.so - dolib.so lib${libname}.so || die "installing shared ${libname} failed" - if use static-libs; then - mv $(readlink lib${libname}.a) lib${libname}.a - dolib.a lib${libname}.a || die "installing static ${libname} failed" - fi + local libname=${PN} threads + use threads && threads="-pthread" + dolib.so solibs/lib*.so + use static-libs && dolib.a lib*.a + # create pkg-config file and associated eselect file cat <<-EOF > ${libname}.pc - prefix="${EPREFIX}"/usr + prefix=${EPREFIX}/usr libdir=\${prefix}/$(get_libdir) includedir=\${prefix}/include - - Name: ${MYPN} + Name: ${PN} Description: ${DESCRIPTION} Version: ${PV} URL: ${HOMEPAGE} - Libs: -L\${libdir} -l${libname} - Libs.private: -lm + Libs: -L\${libdir} -l${libname} -lm ${threads} EOF alternatives_for blas openblas 0 \ "/usr/$(get_libdir)/pkgconfig/blas.pc" "${libname}.pc" |