From 0df978301da3f85b322ea621500dca812c6c8a0f Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Wed, 3 May 2023 10:44:04 +0200 Subject: sci-libs/metis: fixup pkgconfig file Newer versions of metis no longer have gklib bundled. For backwards compatibility add gklib to the pkgconfig file for software that still assumes that gklib is part of metis. Closes: https://bugs.gentoo.org/905632 Bug: https://bugs.gentoo.org/704348 Signed-off-by: Andrew Ammerlaan --- sci-libs/metis/metis-5.2.1-r1.ebuild | 92 ++++++++++++++++++++++++++++++++++++ sci-libs/metis/metis-5.2.1.ebuild | 92 ------------------------------------ 2 files changed, 92 insertions(+), 92 deletions(-) create mode 100644 sci-libs/metis/metis-5.2.1-r1.ebuild delete mode 100644 sci-libs/metis/metis-5.2.1.ebuild (limited to 'sci-libs') diff --git a/sci-libs/metis/metis-5.2.1-r1.ebuild b/sci-libs/metis/metis-5.2.1-r1.ebuild new file mode 100644 index 000000000000..e8bc8bf30b31 --- /dev/null +++ b/sci-libs/metis/metis-5.2.1-r1.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="A package for unstructured serial graph partitioning" +HOMEPAGE="https://github.com/KarypisLab/METIS" +SRC_URI="https://github.com/KarypisLab/METIS/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/METIS-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="double-precision examples int64 openmp" + +PATCHES=( + "${FILESDIR}"/${P}-multilib.patch + "${FILESDIR}"/${P}-respect-user-flags.patch +) + +DEPEND="sci-libs/gklib" +RDEPEND="${DEPEND}" + +src_prepare() { + local idxwidth realwidth + + if use int64; then + idxwidth="#define IDXTYPEWIDTH 64" + else + idxwidth="#define IDXTYPEWIDTH 32" + fi + + if use double-precision; then + realwidth="#define REALTYPEWIDTH 64" + else + realwidth="#define REALTYPEWIDTH 32" + fi + + cmake_src_prepare + + # From Makefile + mkdir -p build/xinclude || die + echo ${idxwidth} > build/xinclude/metis.h || die + echo ${realwidth} >> build/xinclude/metis.h || die + cat include/metis.h >> build/xinclude/metis.h || die + cp include/CMakeLists.txt build/xinclude || die +} + +src_configure() { + local mycmakeargs=( + -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 + if use examples; then + docinto examples + dodoc -r programs graphs + fi + + 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} + Libs: -L\${libdir} -lmetis -lGKlib + EOF + insinto /usr/$(get_libdir)/pkgconfig + doins "${T}"/metis.pc +} diff --git a/sci-libs/metis/metis-5.2.1.ebuild b/sci-libs/metis/metis-5.2.1.ebuild deleted file mode 100644 index 7570cbc9dfce..000000000000 --- a/sci-libs/metis/metis-5.2.1.ebuild +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -DESCRIPTION="A package for unstructured serial graph partitioning" -HOMEPAGE="https://github.com/KarypisLab/METIS" -SRC_URI="https://github.com/KarypisLab/METIS/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/METIS-${PV}" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux" -IUSE="double-precision examples int64 openmp" - -PATCHES=( - "${FILESDIR}"/${P}-multilib.patch - "${FILESDIR}"/${P}-respect-user-flags.patch -) - -DEPEND="sci-libs/gklib" -RDEPEND="${DEPEND}" - -src_prepare() { - local idxwidth realwidth - - if use int64; then - idxwidth="#define IDXTYPEWIDTH 64" - else - idxwidth="#define IDXTYPEWIDTH 32" - fi - - if use double-precision; then - realwidth="#define REALTYPEWIDTH 64" - else - realwidth="#define REALTYPEWIDTH 32" - fi - - cmake_src_prepare - - # From Makefile - mkdir -p build/xinclude || die - echo ${idxwidth} > build/xinclude/metis.h || die - echo ${realwidth} >> build/xinclude/metis.h || die - cat include/metis.h >> build/xinclude/metis.h || die - cp include/CMakeLists.txt build/xinclude || die -} - -src_configure() { - local mycmakeargs=( - -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 - if use examples; then - docinto examples - dodoc -r programs graphs - fi - - 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 -} -- cgit v1.2.3-65-gdbad