# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit cmake toolchain-funcs Sparse_PV="7.12.2" Sparse_P="SuiteSparse-${Sparse_PV}" DESCRIPTION="Sparse LU factorization for circuit simulation" 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}/GraphBLAS" LICENSE="LGPL-2.1+" SLOT="0/2" KEYWORDS="amd64 arm arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc x86" IUSE="doc jit +openmp static-libs" DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}" RDEPEND="${DEPEND}" BDEPEND="doc? ( virtual/latex-base )" src_prepare() { use openmp && tc-check-openmp cmake_src_prepare } src_configure() { local mycmakeargs=( -DBUILD_SHARED_LIBS=$(usex !static-libs) -DBUILD_STATIC_LIBS=$(usex static-libs) -DGRAPHBLAS_USE_OPENMP=$(usex openmp) -DGRAPHBLAS_USE_JIT=$(usex jit) ) 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 }