From 0f0973840ef1eb51f31d00a34e1cd547db2a5832 Mon Sep 17 00:00:00 2001 From: Sébastien Fabbro Date: Mon, 30 May 2011 21:04:13 +0100 Subject: moved to eapi4 --- .../lapacke-reference-1.0.0.009.ebuild | 31 ++++++++++------------ 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/sci-libs/lapacke-reference/lapacke-reference-1.0.0.009.ebuild b/sci-libs/lapacke-reference/lapacke-reference-1.0.0.009.ebuild index 6e95644..876db34 100644 --- a/sci-libs/lapacke-reference/lapacke-reference-1.0.0.009.ebuild +++ b/sci-libs/lapacke-reference/lapacke-reference-1.0.0.009.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 versionator alternatives-2 MYP=lapacke-${PV} @@ -19,17 +19,19 @@ IUSE="static-libs" RDEPEND="" DEPEND="test? ( virtual/lapack dev-util/pkgconfig )" -LIBNAME=reflapacke - S="${WORKDIR}/lapacke" +LIBNAME=reflapacke + make_shared_lib() { + local libstatic=${1} local soname=$(basename "${1%.a}").so.$(get_major_version) + shift einfo "Making ${soname}" - ${2:-$(tc-getCC)} ${LDFLAGS} \ + ${LINK:-$(tc-getCC)} ${LDFLAGS} \ -shared -Wl,-soname="${soname}" \ - -Wl,--whole-archive "${1}" -Wl,--no-whole-archive \ - -o $(dirname "${1}")/"${soname}" || return 1 + -Wl,--whole-archive "${libstatic}" -Wl,--no-whole-archive \ + "$@" -o $(dirname "${libstatic}")/"${soname}" || die "${soname} failed" } src_prepare() { @@ -46,26 +48,22 @@ src_prepare() { } src_compile() { - emake CFLAGS="${CFLAGS} -fPIC" lapacke || die "pic compilation failed" - make_shared_lib lib${LIBNAME}.a || die "doing shared lib failed" + emake CFLAGS="${CFLAGS} -fPIC" lapacke + make_shared_lib lib${LIBNAME}.a if use static-libs; then emake clean && rm -f lib${LIBNAME}.a - emake lapacke || die "static compilation failed" + emake lapacke fi } src_test() { - emake \ - LIBS="$(pkg-config --libs lapack)" \ - lapacke_testing || die "tests failed" + emake LIBS="$(pkg-config --libs lapack)" lapacke_testing } src_install() { - dolib.so lib${LIBNAME}.so.* || die + dolib.so lib${LIBNAME}.so.* dosym lib${LIBNAME}.so.* /usr/$(get_libdir)/lib${LIBNAME}.so - if use static-libs; then - dolib.a lib${LIBNAME}.a || die - fi + use static-libs && dolib.a lib${LIBNAME}.a insinto /usr/include doins include/lapacke*h || die cat <<-EOF > ${LIBNAME}.pc @@ -84,5 +82,4 @@ src_install() { doins ${LIBNAME}.pc || die alternatives_for lapacke reference 0 \ "/usr/$(get_libdir)/pkgconfig/lapacke.pc" "${LIBNAME}.pc" - } -- cgit v1.2.3-65-gdbad