mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
sci-libs/scotch: add 7.0.13
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST scotch-v7.0.11.tar.bz2 7990752 BLAKE2B 1b2aee2f5baf16be7b8f44a07241c97e9e88d6ed38a289760969491388fbc5e85a1a3e48badd74657187078f61a6deb722eaf30ccc556c951103544ecde2bd0a SHA512 3477d365fdf5a022828afbdd112525f98242deddb8a3dacb1c7577ba2a4c1248eeae3f019452a0e2ffe32263732d37518db0dfc7337f3b26b0e91eb4e7620680
|
||||
DIST scotch-v7.0.13.tar.bz2 8001339 BLAKE2B d544401f3dc7c3fe84947f68a8a6895ec256ddbe65fbe7007cbb1c6e4116d909ec5f8fa2f8cc3b946cdda6de5698c553bf84ae46eb39fdfad38e65d8c551a64e SHA512 421be7198f75ff31f7f6d1e0d35508c7d4c3b4175b1e0ab247b1545871da4f94d2b6f396de71a31cdba520683260acf077e222bdfb0da6ba1b6047ffe43ad04b
|
||||
DIST scotch-v7.0.8.tar.bz2 7310306 BLAKE2B 06a4edcd6b8c729c84a37887a7edde14fb1941a691189fd577dea562e8d853174103e7321350b138bc67d0175b3da706dc68d89dfae899f5656a24b21936afc2 SHA512 83e9a4b601bc7e7405a427ee6b429b02700b8e8fa54d699eb5351110eaea3ec6b6768b6f9d925c6295215fc9a89a4b05cc1dde358096ab02a838b5233c7c4ca1
|
||||
|
||||
171
sci-libs/scotch/scotch-7.0.13.ebuild
Normal file
171
sci-libs/scotch/scotch-7.0.13.ebuild
Normal file
@@ -0,0 +1,171 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
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.bz2"
|
||||
S="${WORKDIR}/${PN}-v${PV}"
|
||||
|
||||
LICENSE="CeCILL-2"
|
||||
SLOT="0/${SOVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="doc int64 mpi static-libs test tools +threads"
|
||||
# bug #532620
|
||||
REQUIRED_USE="test? ( threads )"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
virtual/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"
|
||||
ln -s ${soname} ${libdir}/${libname}$(get_libname) || die
|
||||
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 "/^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/libscotchmetisv3.a -Llib -lscotch
|
||||
static_to_shared lib/libscotchmetisv5.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
|
||||
fi
|
||||
if use static-libs; then
|
||||
emake -C src clean
|
||||
emake -C src
|
||||
use mpi && emake -C src ptscotch
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
tc-export FC
|
||||
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* || die
|
||||
|
||||
insinto /usr/include/scotch
|
||||
doins include/*
|
||||
|
||||
cat <<-EOF > scotchmetis.pc || die
|
||||
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 || die
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user