summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2011-05-31 21:01:52 +0100
committerSébastien Fabbro <bicatali@gentoo.org>2011-05-31 21:01:52 +0100
commitcd5ae87a0ba33b68669f67f2b567f24d4f59e3d7 (patch)
tree84f6ad8edae8e10c81b052a3bd90594566ed7eaa /sci-libs
parentcosmetics (diff)
downloadbicatali-cd5ae87a0ba33b68669f67f2b567f24d4f59e3d7.tar.gz
bicatali-cd5ae87a0ba33b68669f67f2b567f24d4f59e3d7.tar.bz2
bicatali-cd5ae87a0ba33b68669f67f2b567f24d4f59e3d7.zip
fixed shared libs. added a aliasing patch. switched to eapi4.
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/gotoblas2/ChangeLog4
-rw-r--r--sci-libs/gotoblas2/Manifest4
-rw-r--r--sci-libs/gotoblas2/gotoblas2-1.13.ebuild70
3 files changed, 35 insertions, 43 deletions
diff --git a/sci-libs/gotoblas2/ChangeLog b/sci-libs/gotoblas2/ChangeLog
index 63e373b..b3aa305 100644
--- a/sci-libs/gotoblas2/ChangeLog
+++ b/sci-libs/gotoblas2/ChangeLog
@@ -3,8 +3,8 @@
# $Header: $
31 May 2011; Sébastien Fabbro <bicatali@gentoo.org> gotoblas2-1.13.ebuild:
- Fixed shared libs. Make ebuild easier to debug with a generated rule Makefile
- instead of dynamic. Added a aliasing patch. Switched to EAPI4.
+ Fixed shared libs. Make ebuild easier to debug with a generated rule
+ Makefile instead of dynamic. Switched to EAPI4.
23 Feb 2011; Sébastien Fabbro <bicatali@gentoo.org> gotoblas2-1.13.ebuild,
files/gotoblas2-1.13-sharedlibs.patch:
diff --git a/sci-libs/gotoblas2/Manifest b/sci-libs/gotoblas2/Manifest
index de4f5bc..1a32fb6 100644
--- a/sci-libs/gotoblas2/Manifest
+++ b/sci-libs/gotoblas2/Manifest
@@ -1,6 +1,6 @@
AUX gotoblas2-1.13-dynamic.patch 608 RMD160 37947ee4aeeec6db1f32132adf97e802369bdaf0 SHA1 f96cb1d7856b4647857b8dc77aa68ceba1d51107 SHA256 7ff5d3179c3051f41fd2963e90734bd6997dd4d6d955ea4c613ff241f49875c4
AUX gotoblas2-1.13-sharedlibs.patch 1929 RMD160 87db891bb2e0b538da7a4f21c10c65b78149a26c SHA1 031912957004745f5e68c2cdf3899f0e80118377 SHA256 fc5f014d6b81a481a9c9c29d82de07f5a5182d9355f90071ba89b680f7e09c1b
DIST GotoBLAS2-1.13_bsd.tar.gz 3165294 RMD160 64a416b506b45ec4df33d9d7e9ec893585b794b2 SHA1 0e1a046bb51e50cf8cff5d1732157a083a620e64 SHA256 7c3eab57ef5ad5c42f73adade833a531591e78967bbe9fc6db31310d73fa2d86
-EBUILD gotoblas2-1.13.ebuild 2893 RMD160 737f4cc4b8ba03d284467566b18194f35d83ac20 SHA1 5ee803f982f7a675b9711c35b453ad7586b871df SHA256 546424f15867a0120d9f545df116826c66f0e63c3bc843f21d533b09fb02d488
-MISC ChangeLog 777 RMD160 720e157b296e17fc24754f610d85743190fbb4cb SHA1 0feb30ef75ada3ab57893f7ca6e034ae968af8b6 SHA256 47dedd4a00bf4f4072158d0c740d24abba3f734ec42ddc43c27c7479beb30ebd
+EBUILD gotoblas2-1.13.ebuild 2791 RMD160 c845f756ad284fad2fb76ae9e9250d43c942858e SHA1 06be313281ba89d323f422bf69a7ea1b905f78ac SHA256 8f9a6ae33d8a68412115147d545557151d61e101efb57f11a71a377edd7ead76
+MISC ChangeLog 977 RMD160 1029dd4ef2c56cc34416f92d0488f6095dcfb9ef SHA1 305aa88db9c89385ca7224e7eb91c58df4d4a36d SHA256 d8b525cf38540ec0e3ece7b96d47838f5afd86065b89fd56ecd23141b02946ee
MISC metadata.xml 856 RMD160 250635ac290516ed28e932e55ec87626d97b228e SHA1 9bdb2a1cb537025e5460141522746f3b07cea92f SHA256 4c5ea594bc1d07713211d39171d628b2cba8b3aeccef73309e816cecc79bd8c9
diff --git a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
index b623f44..4a777a4 100644
--- a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
+++ b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI=3
+EAPI=4
inherit eutils toolchain-funcs alternatives-2
@@ -26,8 +26,9 @@ DEPEND="${RDEPEND}"
S="${WORKDIR}/${MYPN}"
src_prepare() {
- epatch "${FILESDIR}"/${P}-dynamic.patch
- epatch "${FILESDIR}"/${P}-sharedlibs.patch
+ epatch "${FILESDIR}"/${P}-{dynamic,sharedlibs}.patch
+ # respect LDFLAGS
+ sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
if ! use dynamic; then
sed -i \
-e "/^COMMON_OPT/s/-O2/${CFLAGS}/" \
@@ -45,58 +46,51 @@ src_prepare() {
}
src_configure() {
- local bits=32
- if use amd64 || use alpha || use ppc64 || use sparc || use ia64; then
- bits=64
- fi
- GOTO_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 "${GOTO_MAKEFLAGS[@]}" || die "emake failed"
- if use static-libs; then
- rename so so_sav *.so && emake clean
- emake libs "${GOTO_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 "${GOTO_MAKEFLAGS[@]}" || die "emake tests failed"
+ emake tests
}
src_install() {
- local libname=goto2
- 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=goto2 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}
Description: ${DESCRIPTION}
Version: ${PV}
URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${libname}
- Libs.private: -lm
+ Libs: -L\${libdir} -l${libname} -lm ${threads}
EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${libname}.pc
+
alternatives_for blas goto2 0 \
"/usr/$(get_libdir)/pkgconfig/blas.pc" "${libname}.pc"
@@ -108,7 +102,5 @@ src_install() {
"/usr/$(get_libdir)/pkgconfig/cblas.pc" "${libname}.pc" \
"/usr/include/cblas.h" "${PN}/cblas.h"
fi
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${libname}.pc
dodoc 01Readme.txt 03FAQ.txt 05LargePage 06WeirdPerformance
}