From: "Andrew Ammerlaan" <andrewammerlaan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/scotch/
Date: Thu, 10 Jun 2021 12:15:09 +0000 (UTC) [thread overview]
Message-ID: <1623327305.4af10b0593cbc3fa93b62b3755ba2bed748dbf7d.andrewammerlaan@gentoo> (raw)
commit: 4af10b0593cbc3fa93b62b3755ba2bed748dbf7d
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 10 12:13:51 2021 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu Jun 10 12:15:05 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4af10b05
sci-libs/scotch: add version 6.1.0 and EAPI bump
Closes: https://bugs.gentoo.org/743421
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
sci-libs/scotch/Manifest | 1 +
sci-libs/scotch/scotch-6.1.0.ebuild | 173 ++++++++++++++++++++++++++++++++++++
2 files changed, 174 insertions(+)
diff --git a/sci-libs/scotch/Manifest b/sci-libs/scotch/Manifest
index 44a8a4eac78..da7f4e25fe8 100644
--- a/sci-libs/scotch/Manifest
+++ b/sci-libs/scotch/Manifest
@@ -1 +1,2 @@
+DIST scotch-v6.1.0.tar.gz 6292006 BLAKE2B 5b76b01c0fa752468a36830a15c190cd78efc851c3b6831eb2d16b7cf34a71d55463b266ffdee4c6addd4e66ca7caf75e63825051e600ee8a32494e5033cabbd SHA512 e6d217a23e39635f8749811a3fc64c8da14d0396a71b4042a4f8f3ce32ff1f0b4ed033ebae90f3785443dae9b35ded68ea512ed1e3e7f9ea9a471a499ae26b89
DIST scotch_6.0.4_esmumps.tar.gz 4804966 BLAKE2B 63c058fac9206e70975463b1748eb5ce7cd2ba01d9fcbb28eba8f5914ac49a71fcf87941fafd6047712fa519f3b5523ce199bdf5228a8b094bbb465dd64a1083 SHA512 0fcf639ab1a09451256444005f1a4a739403159e3ab22c34fbcedc481be387cd4c86be6fb029b4b5816220564f64f662434bf7f1d3921ed18be081ae2a7a9ee2
diff --git a/sci-libs/scotch/scotch-6.1.0.ebuild b/sci-libs/scotch/scotch-6.1.0.ebuild
new file mode 100644
index 00000000000..ebd2b1e8d84
--- /dev/null
+++ b/sci-libs/scotch/scotch-6.1.0.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs flag-o-matic multilib
+
+SOVER=$(ver_cut 1)
+
+DESCRIPTION="Software for graph, mesh and hypergraph partitioning"
+HOMEPAGE="https://www.labri.u-bordeaux.fr/perso/pelegrin/scotch/ https://gitlab.inria.fr/scotch/scotch"
+SRC_URI="https://gitlab.inria.fr/${PN}/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.gz"
+S="${WORKDIR}/${PN}-v${PV}"
+
+LICENSE="CeCILL-2"
+SLOT="0/${SOVER}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc int64 mpi static-libs test tools threads"
+# bug #532620
+REQUIRED_USE="test? ( threads )"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ sys-libs/zlib
+ mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+static_to_shared() {
+ local libstatic=${1}; shift
+ local libname=$(basename ${libstatic%.a})
+ local soname=${libname}$(get_libname ${SOVER})
+ local libdir=$(dirname ${libstatic})
+
+ einfo "Making ${soname} from ${libstatic}"
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+ -Wl,-all_load -Wl,${libstatic} \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ else
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname=${soname} \
+ -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ VERS_COMP=${PV//.}
+ [[ "${#VERS_COMP}" -gt 1 ]] && \
+ ln -s ${soname} ${libdir}/${libname}$(get_libname ${SOVER})
+ ln -s ${soname} ${libdir}/${libname}$(get_libname)
+ fi
+}
+
+src_prepare() {
+ default
+ use int64 && append-cflags -DIDXSIZE64
+ if use threads; then
+ append-cflags "-DSCOTCH_PTHREAD_NUMBER=$(nproc)"
+ else
+ append-cflags "-DSCOTCH_PTHREAD_NUMBER=1"
+ sed -i \
+ -e 's/ -DSCOTCH_PTHREAD//' \
+ src/Make.inc/Makefile.inc.i686_pc_linux3 || die
+ fi
+
+ # Be careful with replacing here, bug #577272
+ sed -e "s/= gcc$/= $(tc-getCC)/" \
+ -e "s/-O3/${CFLAGS} -pthread/" \
+ -e "s/= ar$/= $(tc-getAR)/" \
+ -e "s/= ranlib$/= $(tc-getRANLIB)/" \
+ -e "s/= ranlib$/= $(tc-getRANLIB)/" \
+ -e "/^LDFLAGS/ s/$/ ${LDFLAGS}/" \
+ src/Make.inc/Makefile.inc.i686_pc_linux3 > src/Makefile.inc || die
+}
+
+src_compile() {
+ emake -C src CLIBFLAGS=-fPIC scotch esmumps
+ static_to_shared lib/libscotcherr.a
+ static_to_shared lib/libscotcherrexit.a
+ static_to_shared lib/libscotch.a -Llib -lz -lm -lrt -lpthread -lscotcherr
+ static_to_shared lib/libesmumps.a -Llib -lscotch
+ static_to_shared lib/libscotchmetis.a -Llib -lscotch
+
+ if use mpi; then
+ emake -C src CLIBFLAGS=-fPIC ptscotch ptesmumps
+ export LINK=mpicc
+ static_to_shared lib/libptscotcherr.a
+ static_to_shared lib/libptscotcherrexit.a
+ static_to_shared lib/libptscotch.a -Llib -lscotch -lptscotcherr -lz -lm -lrt
+ static_to_shared lib/libptesmumps.a -Llib -lscotch -lptscotch
+ static_to_shared lib/libptscotchparmetis.a -Llib -lscotch -lptscotch
+ fi
+ if use static-libs; then
+ emake -C src clean
+ emake -C src
+ use mpi && emake -C src ptscotch
+ fi
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/lib" emake -C src check
+}
+
+src_install() {
+ dolib.so lib/lib*$(get_libname)*
+ use static-libs && dolib.a lib/*.a
+
+ #install metis headers into a subdir
+ #to allow usage of real metis and scotch
+ #in the same code
+ insinto /usr/include/scotch/metis
+ doins include/*metis*
+ rm include/*metis*
+ insinto /usr/include/scotch
+ doins include/*
+
+ cat <<-EOF > scotchmetis.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: scotchmetis
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -lscotchmetis -lscotcherr -lscotch
+ Private: -lm -lz -lrt
+ Cflags: -I\${includedir}/scotch/metis
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins scotchmetis.pc
+
+ # not sure it is actually a full replacement of metis
+ #alternatives_for metis scotch 0 \
+ # /usr/$(get_libdir)/pkgconfig/metis.pc scotchmetis.pc
+
+ if use mpi; then
+ cat <<-EOF > ptscotchparmetis.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ptscotchparmetis
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -lptscotchparmetis -lptscotcherr -lptscotch
+ Private: -lm -lz -lrt
+ Cflags: -I\${includedir}/scotch/metis
+ Requires: scotchmetis
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ptscotchparmetis.pc
+ # not sure it is actually a full replacement of parmetis
+ #alternatives_for metis-mpi ptscotch 0 \
+ # /usr/$(get_libdir)/pkgconfig/metis-mpi.pc ptscotchparmetis.pc
+ fi
+
+ dodoc README.txt
+
+ if use tools; then
+ local b m
+ pushd bin > /dev/null || die
+ for b in *; do
+ newbin ${b} scotch_${b}
+ done
+ popd > /dev/null || die
+
+ pushd man/man1 > /dev/null || die
+ for m in *.1; do
+ newman ${m} scotch_${m}
+ done
+ popd > /dev/null || die
+ fi
+
+ use doc && dodoc doc/*.pdf
+}
next reply other threads:[~2021-06-10 12:15 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 12:15 Andrew Ammerlaan [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-03-21 3:16 [gentoo-commits] repo/gentoo:master commit in: sci-libs/scotch/ Sam James
2023-06-03 11:15 Arthur Zamarin
2023-04-01 0:55 Sam James
2023-03-04 11:03 Arthur Zamarin
2023-03-04 9:55 Arthur Zamarin
2023-03-04 8:55 Arthur Zamarin
2023-03-04 6:23 Arthur Zamarin
2023-03-04 6:21 Arthur Zamarin
2022-06-20 9:32 David Seifert
2022-03-26 10:56 Andrew Ammerlaan
2022-02-19 22:37 Sam James
2022-02-19 19:28 Sam James
2022-02-19 15:47 Jakov Smolić
2022-02-19 13:52 Arthur Zamarin
2022-02-19 13:35 Arthur Zamarin
2022-02-19 13:22 Jakov Smolić
2022-02-19 12:38 Arthur Zamarin
2022-01-13 12:24 Jakov Smolić
2021-12-27 22:27 Sam James
2021-12-26 3:18 Sam James
2021-12-26 3:18 Sam James
2021-12-07 0:31 Sam James
2021-12-06 20:37 Sam James
2021-11-21 4:58 Arthur Zamarin
2021-11-14 23:51 Sam James
2021-10-29 11:16 Sam James
2021-10-27 22:33 Sam James
2021-10-24 21:14 Sam James
2021-10-17 7:57 Sam James
2021-10-02 23:17 Sam James
2021-07-16 11:43 Marek Szuba
2021-07-14 16:14 Marek Szuba
2021-06-08 7:52 Sam James
2021-05-31 17:49 David Seifert
2020-09-18 16:47 Sam James
2020-09-18 16:47 Sam James
2020-09-18 16:47 Sam James
2019-12-31 14:02 Agostino Sarubbo
2019-12-30 15:19 Agostino Sarubbo
2019-11-24 4:10 Aaron Bauman
2019-11-24 3:36 Aaron Bauman
2017-11-27 19:46 Sergei Trofimovich
2017-10-29 15:26 Jonas Stein
2017-09-30 2:58 Sergei Trofimovich
2017-07-08 9:25 Alexis Ballier
2017-07-01 9:52 Sergei Trofimovich
2017-04-29 16:21 Jeroen Roovers
2017-04-05 15:36 Michael Weber
2016-06-07 16:47 Tobias Klausmann
2016-04-20 19:13 Christoph Junghans
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=1623327305.4af10b0593cbc3fa93b62b3755ba2bed748dbf7d.andrewammerlaan@gentoo \
--to=andrewammerlaan@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