summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/metis/files/metis-5.1.0-remove-GKlib-O3.patch11
-rw-r--r--sci-libs/metis/metis-4.0.3-r2.ebuild39
-rw-r--r--sci-libs/metis/metis-5.1.0-r4.ebuild64
3 files changed, 114 insertions, 0 deletions
diff --git a/sci-libs/metis/files/metis-5.1.0-remove-GKlib-O3.patch b/sci-libs/metis/files/metis-5.1.0-remove-GKlib-O3.patch
new file mode 100644
index 000000000000..507395867fcc
--- /dev/null
+++ b/sci-libs/metis/files/metis-5.1.0-remove-GKlib-O3.patch
@@ -0,0 +1,11 @@
+--- a/GKlib/GKlibSystem.cmake
++++ b/GKlib/GKlibSystem.cmake
+@@ -20,7 +20,7 @@
+ elseif(MINGW)
+ set(GKlib_COPTS "-DUSE_GKREGEX")
+ else()
+- set(GKlib_COPTS "-O3")
++ set(GKlib_COPTS "")
+ set(GKlib_COPTIONS "-DLINUX -D_FILE_OFFSET_BITS=64")
+ endif(MSVC)
+ if(CYGWIN)
diff --git a/sci-libs/metis/metis-4.0.3-r2.ebuild b/sci-libs/metis/metis-4.0.3-r2.ebuild
new file mode 100644
index 000000000000..ca26fa871dcb
--- /dev/null
+++ b/sci-libs/metis/metis-4.0.3-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools fortran-2
+
+DESCRIPTION="A package for unstructured serial graph partitioning"
+HOMEPAGE="http://www-users.cs.umn.edu/~karypis/metis/metis/"
+SRC_URI="http://glaros.dtc.umn.edu/gkhome/fetch/sw/${PN}/OLD/${P}.tar.gz"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+RESTRICT="mirror bindist"
+
+RDEPEND="!sci-libs/parmetis"
+
+PATCHES=( "${FILESDIR}"/${PN}-4.0.1-autotools.patch )
+
+src_prepare() {
+ default
+ sed -i -e "s/4.0.1/${PV}/" configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ default
+ use doc && dodoc Doc/manual.ps
+
+ # no static archives
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/sci-libs/metis/metis-5.1.0-r4.ebuild b/sci-libs/metis/metis-5.1.0-r4.ebuild
new file mode 100644
index 000000000000..5f62daa4aff8
--- /dev/null
+++ b/sci-libs/metis/metis-5.1.0-r4.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake fortran-2
+
+DESCRIPTION="A package for unstructured serial graph partitioning"
+HOMEPAGE="http://www-users.cs.umn.edu/~karypis/metis/metis/"
+SRC_URI="http://glaros.dtc.umn.edu/gkhome/fetch/sw/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc openmp"
+
+RDEPEND="!sci-libs/parmetis"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-datatype.patch
+ "${FILESDIR}"/${P}-shared-GKlib.patch
+ "${FILESDIR}"/${P}-multilib.patch
+ "${FILESDIR}"/${P}-remove-GKlib-O3.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DGKLIB_PATH="${S}"/GKlib
+ -DSHARED=yes
+ -DOPENMP=$(usex openmp)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ cd graphs || die
+ local PATH="${BUILD_DIR}"/programs/:${PATH}
+
+ ndmetis mdual.graph || die
+ mpmetis metis.mesh 2 || die
+ gpmetis test.mgraph 4 || die
+ gpmetis copter2.graph 4 || die
+ graphchk 4elt.graph || die
+}
+
+src_install() {
+ cmake_src_install
+ dodoc manual/manual.pdf
+
+ cat >> "${T}"/metis.pc <<- EOF || die
+ prefix=${EPREFIX}/usr
+ exec_prefix=\${prefix}
+ libdir=\${exec_prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+
+ Name: METIS
+ Description: Software for partioning unstructured graphes and meshes
+ Version: ${PV}
+ Cflags: -I\${includedir}/metis
+ Libs: -L\${libdir} -lmetis
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${T}"/metis.pc
+}