# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit cmake Sparse_PV="7.11.0" Sparse_P="SuiteSparse-${Sparse_PV}" DESCRIPTION="Library to order a sparse matrix prior to Cholesky factorization" HOMEPAGE="https://people.engr.tamu.edu/davis/suitesparse.html" SRC_URI="https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${Sparse_PV}.tar.gz -> ${Sparse_P}.gh.tar.gz" S="${WORKDIR}/${Sparse_P}/${PN^^}" LICENSE="BSD" SLOT="0/3" KEYWORDS="amd64 arm arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 amd64-linux x86-linux" IUSE="doc static-libs" DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}" RDEPEND="${DEPEND}" BDEPEND="doc? ( virtual/latex-base )" src_configure() { local mycmakeargs=( -DBUILD_STATIC_LIBS=$(usex static-libs) ) cmake_src_configure } src_install() { if use doc; then pushd "${S}/Doc" emake clean rm -rf *.pdf emake popd DOCS="${S}/Doc/*.pdf" fi cmake_src_install }