summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bock <nicolasbock@gentoo.org>2017-03-24 06:04:40 -0600
committerNicolas Bock <nicolasbock@gentoo.org>2017-03-24 06:05:08 -0600
commite99c14e46d97c43d73bcb4d289fc00e080ab2b27 (patch)
tree823b6adbfbaa91082b255e9cef6bce8af4587d40 /sci-libs
parentdev-perl/BSON: Bump to version 1.4.0 (diff)
downloadgentoo-e99c14e46d97c43d73bcb4d289fc00e080ab2b27.tar.gz
gentoo-e99c14e46d97c43d73bcb4d289fc00e080ab2b27.tar.bz2
gentoo-e99c14e46d97c43d73bcb4d289fc00e080ab2b27.zip
sci-libs/metis: Fix static library build
The `static-libs` USE flag was not used and static libraries could not be built. Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/metis/metis-5.1.0-r3.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/sci-libs/metis/metis-5.1.0-r3.ebuild b/sci-libs/metis/metis-5.1.0-r3.ebuild
new file mode 100644
index 000000000000..c6b287f20510
--- /dev/null
+++ b/sci-libs/metis/metis-5.1.0-r3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils 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"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+LICENSE="free-noncomm"
+IUSE="doc openmp static-libs"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ !sci-libs/parmetis"
+
+DOCS=( manual/manual.pdf )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-datatype.patch
+ "${FILESDIR}"/${P}-shared-GKlib.patch
+ "${FILESDIR}"/${P}-multilib.patch
+)
+
+src_prepare() {
+ sed \
+ -e 's:-O3::g' \
+ -i GKlib/GKlibSystem.cmake || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGKLIB_PATH="${S}"/GKlib
+ -DSHARED="$(usex static-libs no yes)"
+ -DOPENMP="$(usex openmp)"
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd graphs || die
+ PATH="${BUILD_DIR}"/programs/:${PATH} LD_LIBRARY_PATH="${BUILD_DIR}"/lib ndmetis mdual.graph || die
+ PATH="${BUILD_DIR}"/programs/:${PATH} LD_LIBRARY_PATH="${BUILD_DIR}"/lib mpmetis metis.mesh 2 || die
+ PATH="${BUILD_DIR}"/programs/:${PATH} LD_LIBRARY_PATH="${BUILD_DIR}"/lib gpmetis test.mgraph 4 || die
+ PATH="${BUILD_DIR}"/programs/:${PATH} LD_LIBRARY_PATH="${BUILD_DIR}"/lib gpmetis copter2.graph 4 || die
+ PATH="${BUILD_DIR}"/programs/:${PATH} LD_LIBRARY_PATH="${BUILD_DIR}"/lib graphchk 4elt.graph || die
+}
+
+src_install() {
+ cat >> "${T}"/metis.pc <<- EOF
+ 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
+ cmake-utils_src_install
+}