summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2018-11-25 18:05:07 -0600
committerMatthias Maier <tamiko@gentoo.org>2018-11-25 18:28:46 -0600
commitab4d464bab7521e8b644305e47964185d0e0b7f3 (patch)
tree18dbb21915e6ff41912aabbebafec94a715f0aa0 /sci-libs
parentmail-filter/amavisd-new: new revision to clean up auxiliary init scripts. (diff)
downloadgentoo-ab4d464bab7521e8b644305e47964185d0e0b7f3.tar.gz
gentoo-ab4d464bab7521e8b644305e47964185d0e0b7f3.tar.bz2
gentoo-ab4d464bab7521e8b644305e47964185d0e0b7f3.zip
sci-libs/parmetis: move parmetis to main repository
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/parmetis/Manifest2
-rw-r--r--sci-libs/parmetis/metadata.xml26
-rw-r--r--sci-libs/parmetis/parmetis-4.0.3.ebuild151
3 files changed, 168 insertions, 11 deletions
diff --git a/sci-libs/parmetis/Manifest b/sci-libs/parmetis/Manifest
index d0d2f3741930..a8a041b62e72 100644
--- a/sci-libs/parmetis/Manifest
+++ b/sci-libs/parmetis/Manifest
@@ -1 +1,3 @@
DIST ParMetis-3.2.0.tar.gz 5291841 BLAKE2B f18b5144f2814a83c3a0b945b1bdbad812cce204e61e762498a98f380d33d79bdb6a4c58f25ebbd44401c7f76edbac602899d4fe8c05ca92f22a91d98f8f7607 SHA512 be7e5affa6ed687c7e8cbef51c5f4838e6302aa7632796f337ed079f15361569d77aa73fc61b876b5c9973e974575571fd1e3e6c73505480b1ecdb7cf801a0d0
+DIST metis-5.1.0.tar.gz 4984968 BLAKE2B c5f8ff552fce7e7cc02740e6197c9deb5e05e8bc2e2e56cad0cba85705eec6990b511182930c8758fd16a18015f54c8a4827038039bc3c58ee41df468ea175bc SHA512 deea47749d13bd06fbeaf98a53c6c0b61603ddc17a43dae81d72c8015576f6495fd83c11b0ef68d024879ed5415c14ebdbd87ce49c181bdac680573bea8bdb25
+DIST parmetis-4.0.3.tar.gz 5567670 BLAKE2B 69a44ea8e50d8fd78046a342807b994220d03da3ab1695533d92772b1840302917a7d5d6f9eb020d9ff8ab7e5372bff0386d6354b662f58495b74f8f596c45f9 SHA512 454a91921ca35c981df11c9846a11963ff8fd8407a25179453af33f8fe69493f6dd7f2a0b8feed9a7d3f121e45b715749dd7a94873eaac2bae4cad1e535ca132
diff --git a/sci-libs/parmetis/metadata.xml b/sci-libs/parmetis/metadata.xml
index 744c4ff57d0c..cf1b66e81268 100644
--- a/sci-libs/parmetis/metadata.xml
+++ b/sci-libs/parmetis/metadata.xml
@@ -1,16 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>sci@gentoo.org</email>
- <name>Gentoo Science Project</name>
- </maintainer>
- <longdescription lang="en">
- ParMETIS is an MPI-based parallel library that implements a variety
- of algorithms for partitioning unstructured graphs and for computing
- fill-reducing orderings of sparse matrices. ParMETIS extends the
- functionality provided by METIS and includes routines that are
- especially suited for parallel AMR computations and large scale
- numerical simulations.
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ParMETIS is an MPI-based parallel library that implements a variety
+of algorithms for partitioning unstructured graphs and for computing
+fill-reducing orderings of sparse matrices. ParMETIS extends the
+functionality provided by METIS and includes routines that are
+especially suited for parallel AMR computations and large scale
+numerical simulations.
</longdescription>
+ <use>
+ <flag name="int64">Build the 64 bits integer library (needed for &gt; 2^31 vertices)</flag>
+ <flag name="double-precision">Floating-point operation done as double precision</flag>
+ </use>
</pkgmetadata>
diff --git a/sci-libs/parmetis/parmetis-4.0.3.ebuild b/sci-libs/parmetis/parmetis-4.0.3.ebuild
new file mode 100644
index 000000000000..71ee81fcbc9d
--- /dev/null
+++ b/sci-libs/parmetis/parmetis-4.0.3.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils cmake-utils toolchain-funcs
+
+# Check metis version bundled in parmetis tar ball
+# by diff of metis and parmetis tar ball
+METISPV=5.1.0
+METISP=metis-${METISPV}
+
+DESCRIPTION="Parallel (MPI) unstructured graph partitioning library"
+HOMEPAGE="http://www-users.cs.umn.edu/~karypis/metis/parmetis/"
+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 )"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE="free-noncomm"
+IUSE="doc double-precision examples int64 mpi openmp pcre static-libs"
+
+DEPEND="mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}
+ !<sci-libs/metis-5"
+
+pkg_setup() {
+ if use openmp; then
+ if [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp; then
+ ewarn "You are using gcc but openmp is not available"
+ die "Need an OpenMP capable compiler"
+ fi
+ fi
+}
+
+src_prepare() {
+ # libdir love
+ sed -i \
+ -e '/DESTINATION/s/lib/lib${LIB_SUFFIX}/g' \
+ libparmetis/CMakeLists.txt metis/libmetis/CMakeLists.txt || die
+ # set metis as separate shared lib
+ sed -i \
+ -e 's/METIS_LIB/ParMETIS_LIB/g' \
+ metis/libmetis/CMakeLists.txt || die
+ sed -i \
+ -e '/programs/d' \
+ CMakeLists.txt metis/CMakeLists.txt || die
+ use static-libs && mkdir "${WORKDIR}/${PN}_static"
+
+ if use mpi; then
+ export CC=mpicc CXX=mpicxx
+ else
+ sed -i \
+ -e '/add_subdirectory(include/d' \
+ -e '/add_subdirectory(libparmetis/d' \
+ CMakeLists.txt || die
+
+ fi
+
+ use int64 && \
+ sed -i -e '/IDXTYPEWIDTH/s/32/64/' metis/include/metis.h
+
+ use double-precision && \
+ sed -i -e '/REALTYPEWIDTH/s/32/64/' metis/include/metis.h
+}
+
+src_configure() {
+ parmetis_configure() {
+ local mycmakeargs=(
+ -DGKLIB_PATH="${S}/metis/GKlib"
+ -DMETIS_PATH="${S}/metis"
+ -DGKRAND=ON
+ -DMETIS_INSTALL=ON
+ $(cmake-utils_use openmp OPENMP)
+ $(cmake-utils_use pcre PCRE)
+ $@
+ )
+ cmake-utils_src_configure
+ }
+ parmetis_configure -DSHARED=ON
+ use static-libs && \
+ sed -i -e '/fPIC/d' metis/GKlib/GKlibSystem.cmake && \
+ BUILD_DIR="${WORKDIR}/${PN}_static" parmetis_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use static-libs && \
+ BUILD_DIR="${WORKDIR}/${PN}_static" cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs && \
+ BUILD_DIR="${WORKDIR}/${PN}_static" cmake-utils_src_install
+ insinto /usr/include
+ doins metis/include/metis.h
+
+ newdoc metis/Changelog Changelog.metis}
+ use doc && dodoc "${WORKDIR}/${METISP}"/manual/manual.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples/metis
+ doins "${WORKDIR}/${METISP}"/{programs,graphs}/*
+ fi
+ # alternative stuff
+ cat > 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
+ insinto /usr/share/doc/${PF}/examples/${PN}
+ doins {programs,Graphs}/*
+ 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
+}