summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2021-07-16 11:00:02 +0100
committerMarek Szuba <marecki@gentoo.org>2021-07-16 12:43:25 +0100
commitfab9308cfb8c6c168b169803c9d8d04d3696dc64 (patch)
tree84edb2b05ec5dc86611d26e3103e8a6ed1cd1d96 /sci-libs/parmetis/parmetis-4.0.3-r2.ebuild
parentsci-libs/metis: remove unused fortran-2 inherit (diff)
downloadgentoo-fab9308cfb8c6c168b169803c9d8d04d3696dc64.tar.gz
gentoo-fab9308cfb8c6c168b169803c9d8d04d3696dc64.tar.bz2
gentoo-fab9308cfb8c6c168b169803c9d8d04d3696dc64.zip
sci-libs/parmetis: major refactoring
1. Update to EAPI 7 and cmake.eclass 2. Unbundle sci-libs/metis 3. Remove IUSE=mpi - with METIS unbundled, settings USE=-mpi effectively turns this package into a metapackage 4. Add USE=fortran requirement to virtual/mpi - without it, libparmetis.so ends up with unresolved symbol MPI_Comm_f2c 5. CMakeFiles are now modified by patches rather than sed - the changes are entirely static so there is no need for the latter Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'sci-libs/parmetis/parmetis-4.0.3-r2.ebuild')
-rw-r--r--sci-libs/parmetis/parmetis-4.0.3-r2.ebuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/sci-libs/parmetis/parmetis-4.0.3-r2.ebuild b/sci-libs/parmetis/parmetis-4.0.3-r2.ebuild
new file mode 100644
index 000000000000..6d9599fec417
--- /dev/null
+++ b/sci-libs/parmetis/parmetis-4.0.3-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="Parallel (MPI) unstructured graph partitioning library"
+HOMEPAGE="https://www-users.cs.umn.edu/~karypis/metis/parmetis/"
+SRC_URI="http://glaros.dtc.umn.edu/gkhome/fetch/sw/${PN}/${P}.tar.gz"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples openmp pcre"
+RESTRICT="mirror bindist"
+
+DEPEND=">=sci-libs/metis-5.1.0-r5
+ virtual/mpi[fortran]
+ pcre? ( dev-libs/libpcre:= )"
+RDEPEND="${DEPEND}
+ !<sci-libs/metis-5.1.0-r5"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-01-cmake-paths.patch
+ "${FILESDIR}"/${PN}-4.0.3-02-unbundle-metis.patch
+)
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ use openmp && tc-check-openmp
+ fi
+}
+
+src_prepare() {
+ export CC=mpicc CXX=mpicxx
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGKLIB_PATH="${S}/metis/GKlib"
+ -DGKRAND=ON
+ -DMETIS_PATH="${EPREFIX}/usr"
+ -DOPENMP=$(usex openmp)
+ -DPCRE=$(usex pcre)
+ -DSHARED=ON
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ dodoc Changelog
+ use doc && dodoc manual/manual.pdf
+ if use examples; then
+ docinto examples
+ dodoc -r Graphs programs
+ fi
+
+ cat > ${PN}.pc <<-EOF
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ${PN}
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -l${PN}
+ Cflags: -I\${includedir}/${PN}
+ Requires: metis
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+}