# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 # Check metis version bundled in parmetis tar ball # by diff of metis and parmetis tar ball METISPV=5.1.0 METISP=metis-${METISPV} inherit cmake-utils toolchain-funcs DESCRIPTION="Parallel (MPI) unstructured graph partitioning library" HOMEPAGE="http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview" SRC_URI=" http://glaros.dtc.umn.edu/gkhome/fetch/sw/${PN}/${P}.tar.gz doc? ( http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METISP}.tar.gz ) examples? ( http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METISP}.tar.gz )" LICENSE="all-rights-reserved" SLOT="0" KEYWORDS="amd64 arm64 x86 ~amd64-linux ~x86-linux" IUSE="doc double-precision examples int64 mpi openmp pcre static-libs" RESTRICT="mirror bindist" DEPEND="mpi? ( virtual/mpi ) pcre? ( dev-libs/libpcre:= )" RDEPEND="${DEPEND} ! metis.pc <<-EOF prefix=${EPREFIX}/usr libdir=\${prefix}/$(get_libdir) includedir=\${prefix}/include Name: metis Description: Unstructured graph partitioning library Version: ${METISPV} URL: ${HOMEPAGE/parmetis/metis} Libs: -L\${libdir} -lmetis Cflags: -I\${includedir}/metis EOF insinto /usr/$(get_libdir)/pkgconfig doins metis.pc # change if scotch is actually an alternative to metis #alternatives_for metis metis 0 \ # /usr/$(get_libdir)/pkgconfig/metis.pc refmetis.pc if use mpi; then dodoc Changelog use doc && dodoc manual/manual.pdf if use examples; then docinto examples/${PN} dodoc -r {programs,Graphs}/. docompress -x /usr/share/doc/${PF}/examples/${PN} fi # alternative stuff 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 # change if scotch is actually an alternative to parmetis #alternatives_for metis-mpi ${PN} 0 \ # /usr/$(get_libdir)/pkgconfig/metis-mpi.pc ${PN}.pc fi }