From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AAEA5138359 for ; Fri, 18 Sep 2020 16:47:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68AD4E082B; Fri, 18 Sep 2020 16:47:44 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4429EE0815 for ; Fri, 18 Sep 2020 16:47:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D832C3410A2 for ; Fri, 18 Sep 2020 16:47:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DC173365 for ; Fri, 18 Sep 2020 16:47:40 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1600447181.b02a9ab0e74f89f524ec27bf612c51fb66c0070b.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/mumps/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/mumps/mumps-5.1.2-r1.ebuild X-VCS-Directories: sci-libs/mumps/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b02a9ab0e74f89f524ec27bf612c51fb66c0070b X-VCS-Branch: master Date: Fri, 18 Sep 2020 16:47:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 29972cb8-572b-48e6-8729-e9d6db2850ca X-Archives-Hash: de38ed863191066a085c51cbd38af890 commit: b02a9ab0e74f89f524ec27bf612c51fb66c0070b Author: Sam James gentoo org> AuthorDate: Fri Sep 18 16:39:41 2020 +0000 Commit: Sam James gentoo org> CommitDate: Fri Sep 18 16:39:41 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b02a9ab0 sci-libs/mumps: minor ebuild surgery * EROOT -> ESYSROOT (we can't use EROOT in src_*, see PMS) * Missing || dies * eclass usage pruning * Mild tidying where possible Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sam James gentoo.org> sci-libs/mumps/mumps-5.1.2-r1.ebuild | 37 +++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/sci-libs/mumps/mumps-5.1.2-r1.ebuild b/sci-libs/mumps/mumps-5.1.2-r1.ebuild index be2c5c64986..6b63a29ccc7 100644 --- a/sci-libs/mumps/mumps-5.1.2-r1.ebuild +++ b/sci-libs/mumps/mumps-5.1.2-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit flag-o-matic fortran-2 toolchain-funcs multilib +inherit fortran-2 toolchain-funcs MYP=MUMPS_${PV} @@ -18,10 +18,12 @@ IUSE="doc examples metis mpi +scotch static-libs" RDEPEND=" virtual/blas - metis? ( || ( >=sci-libs/metis-5 >=sci-libs/parmetis-4 ) - mpi? ( >=sci-libs/parmetis-4 ) ) + metis? ( + || ( >=sci-libs/metis-5 >=sci-libs/parmetis-4 ) + mpi? ( >=sci-libs/parmetis-4 ) + ) mpi? ( sci-libs/scalapack ) - scotch? ( >=sci-libs/scotch-6.0.1[mpi=] ) + scotch? ( >=sci-libs/scotch-6.0.1:=[mpi=] ) " DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" @@ -34,7 +36,8 @@ get_version_component_count() { } static_to_shared() { - local libstatic=${1}; shift + local libstatic=${1} + shift local libname=$(basename ${libstatic%.a}) local soname=${libname}$(get_libname $(ver_cut 1-2)) local libdir=$(dirname ${libstatic}) @@ -50,9 +53,12 @@ static_to_shared() { -shared -Wl,-soname=${soname} \ -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \ "$@" -o ${libdir}/${soname} || die "${soname} failed" - [[ $(get_version_component_count) -gt 1 ]] && \ - ln -s ${soname} ${libdir}/${libname}$(get_libname $(ver_cut 1)) - ln -s ${soname} ${libdir}/${libname}$(get_libname) + + if [[ $(get_version_component_count) -ge 1 ]] ; then + ln -s ${soname} ${libdir}/${libname}$(get_libname $(ver_cut 1)) || die + fi + + ln -s ${soname} ${libdir}/${libname}$(get_libname) || die fi } @@ -95,14 +101,14 @@ src_configure() { if use scotch && use mpi; then sed -i \ -e "s:#\s*\(LSCOTCH\s*=\).*:\1-lptesmumps -lptscotch -lptscotcherr:" \ - -e "s:#\s*\(ISCOTCH\s*=\).*:\1-I${EROOT}/usr/include/scotch:" \ + -e "s:#\s*\(ISCOTCH\s*=\).*:\1-I${ESYSROOT}/usr/include/scotch:" \ Makefile.inc || die LIBADD="${LIBADD} -lptesmumps -lptscotch -lptscotcherr" ord="${ord} -Dptscotch" elif use scotch; then sed -i \ -e "s:#\s*\(LSCOTCH\s*=\).*:\1-lesmumps -lscotch -lscotcherr:" \ - -e "s:#\s*\(ISCOTCH\s*=\).*:\1-I${EROOT}/usr/include/scotch:" \ + -e "s:#\s*\(ISCOTCH\s*=\).*:\1-I${ESYSROOT}/usr/include/scotch:" \ Makefile.inc || die LIBADD="${LIBADD} -lesmumps -lscotch -lscotcherr" ord="${ord} -Dscotch" @@ -139,6 +145,7 @@ src_compile() { LIBADD+=" -Llibseq -lmpiseq" static_to_shared libseq/libmpiseq.a fi + static_to_shared lib/libpord.a ${LIBADD} static_to_shared lib/libmumps_common.a ${LIBADD} @@ -146,6 +153,7 @@ src_compile() { for i in c d s z; do static_to_shared lib/lib${i}mumps.a -Llib -lmumps_common ${LIBADD} done + if use static-libs; then emake clean emake -j1 alllib @@ -154,12 +162,14 @@ src_compile() { src_test() { emake all + local dotest if use mpi; then dotest="mpirun -np 2" else export LD_LIBRARY_PATH="${S}/libseq:${LD_LIBRARY_PATH}" fi + cd examples ${dotest} ./ssimpletest < input_simpletest_real || die ${dotest} ./dsimpletest < input_simpletest_real || die @@ -168,13 +178,14 @@ src_test() { einfo "The solutions should be close to (1,2,3,4,5)" ${dotest} ./c_example || die einfo "The solution should be close to (1,2)" - make clean + emake clean || die } src_install() { dolib.so lib/lib*$(get_libname)* use static-libs && dolib.a lib/lib*.a insinto /usr + doins -r include if ! use mpi; then dolib.so libseq/lib*$(get_libname)* @@ -182,10 +193,10 @@ src_install() { doins libseq/*.h use static-libs && dolib.a libseq/libmpiseq.a fi + dodoc README ChangeLog VERSION use doc && dodoc doc/*.pdf if use examples; then - insinto /usr/share/doc/${PF} - doins -r examples + dodoc -r examples fi }