diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
commit | d18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch) | |
tree | 4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /sci-libs/scotch | |
parent | e748ba9741f6540f4675c23e3e37b73e822c13a4 (diff) |
gentoo resync : 15.06.2021
Diffstat (limited to 'sci-libs/scotch')
-rw-r--r-- | sci-libs/scotch/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/scotch/scotch-6.0.4-r2.ebuild | 8 | ||||
-rw-r--r-- | sci-libs/scotch/scotch-6.1.0.ebuild | 173 |
3 files changed, 181 insertions, 4 deletions
diff --git a/sci-libs/scotch/Manifest b/sci-libs/scotch/Manifest index 3cff08e67f79..72d0155b8d87 100644 --- a/sci-libs/scotch/Manifest +++ b/sci-libs/scotch/Manifest @@ -1,5 +1,7 @@ AUX scotch-6.0.4-as-needed.patch 6168 BLAKE2B 5b008f9035379d91cd8ffde6d64a22b021fd5070a106592abefac78a0522282fbd0dd7f8b439b0452c0d15c57891c9d4eb4415120ea95788fe74e149e6069fc3 SHA512 cd58425866a1726f776318e3792e72d7250686f033ceeda57f0f007fdb4c5e1c2bc3c9346630e39f16023f2a3d70cd106b357c21e5406a1c44b49a316655d8dd AUX scotch-6.0.4-flex-2.6.3-fix.patch 1623 BLAKE2B 9d86299eb543147ce7e736779b05c3b8113c12b54fbaf46a2b99a6cef2b670fc1b448d059858f954f37acf72c7c268acf1793de89f193d02f8b61d3f5d4ca1e5 SHA512 1a2a5a363e1dd59e1cced76928da15132cd1c8af57d6d0ad0eec04e02d029c6ae275e202e8c87bc65ff0188f41e379865829b5b61e4f1e44a885d48c4462b09e +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 -EBUILD scotch-6.0.4-r2.ebuild 4985 BLAKE2B d280f08077dd93265b86458d7b9585451c1388344e96f410df601993550b79494d494d433e0ef9e46638108495b5903c3a2b646cc6d7f34ad26c4c3fbbad0226 SHA512 64c12a7fb1d4b6493e416e9a4d860a9135001541896068a718e8df3461fb5c226daa78f187e39d8e48cead80688390080051814fa546d35414b2211e3aa4b30e +EBUILD scotch-6.0.4-r2.ebuild 5046 BLAKE2B 8e69b5110256582554ea1bdbc288f30bba8cb4316692f995f898e7fc16e27011b0d8dae00aba4d3fad6cfadcc82589625e42c43ebdf48f0c61440336d0cc61ec SHA512 5cd78fc6579b56ee2faf5a1b1ae6d584fede1e074513ed612b15b9bf4494ae3b7d89c3c9c9092df972576cc8a3955759667fe0dbfc6a27468089145fd8665497 +EBUILD scotch-6.1.0.ebuild 4935 BLAKE2B 94eba9a49a1ba532cd2fb6c70d09e06d298e4eb92313ee0fb8ab73a21661564a8da8eb2917415fc57c28c06e2e39a14cbdd6d823b21a1eade7fde27b845a168c SHA512 35a08e93c0b5e6d8e2e41d34ce8103598ccc1948520e4c569862fb3680faa7087a4495cb0b9c950a1559b7be3b9274928212919d3e7bc17f597d0c1ae5a170a4 MISC metadata.xml 1168 BLAKE2B e77807bd62ed2b78c83b9b0c99b4dd62f79259bacd1559a017ad7e22d5e7b23bfde27c512630da9243739f11a180ae76f280bf5b524ca5ef2b8adc95bf2ce207 SHA512 15d84db92f7c2fb144f9385686041193cd35b2dda682eb0cef254e9ee62a20d38b748131d3878f4a326568993a23eb0c971909d62402ea3f1c30f4ec89300968 diff --git a/sci-libs/scotch/scotch-6.0.4-r2.ebuild b/sci-libs/scotch/scotch-6.0.4-r2.ebuild index 8af0ccfe611a..4a01b91e5ca2 100644 --- a/sci-libs/scotch/scotch-6.0.4-r2.ebuild +++ b/sci-libs/scotch/scotch-6.0.4-r2.ebuild @@ -64,10 +64,12 @@ src_prepare() { -e 's/ -DSCOTCH_PTHREAD//' \ src/Make.inc/Makefile.inc.i686_pc_linux3 || die fi - sed -e "s/gcc/$(tc-getCC)/" \ + + # 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/= ar$/= $(tc-getAR)/" \ + -e "s/= ranlib$/= $(tc-getRANLIB)/" \ -e "s/LDFLAGS/LIBS/" \ src/Make.inc/Makefile.inc.i686_pc_linux3 > src/Makefile.inc || die } 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 000000000000..ebd2b1e8d84b --- /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 +} |