From ac5c4b39a40f96e2e0eae2f9a4f562ad34edd374 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Wed, 15 Dec 2021 10:54:57 +0100 Subject: [PATCH] sci-physics/geant: pass python args to CMake only with USE=python Closes: https://bugs.gentoo.org/829231 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Guilherme Amadio --- sci-physics/geant/geant-4.11.0.0.ebuild | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sci-physics/geant/geant-4.11.0.0.ebuild b/sci-physics/geant/geant-4.11.0.0.ebuild index ebf046d14758a..589a2cd089b53 100644 --- a/sci-physics/geant/geant-4.11.0.0.ebuild +++ b/sci-physics/geant/geant-4.11.0.0.ebuild @@ -80,8 +80,6 @@ S="${WORKDIR}/${MY_P}" src_configure() { local mycmakeargs=( -DCMAKE_INSTALL_DATADIR="${EPREFIX}/usr/share/geant4" - -DCMAKE_INSTALL_PYTHONDIR="${EPREFIX}/usr/lib/${EPYTHON}/site-packages" - -DPYTHON_EXECUTABLE="${EPREFIX}/usr/bin/${EPYTHON}" -DCMAKE_CXX_STANDARD=$((usev c++17 || usev c++20) | cut -c4-) -DGEANT4_BUILD_BUILTIN_BACKTRACE=$(usex debug) -DGEANT4_BUILD_MULTITHREADED=$(usex threads) @@ -108,8 +106,17 @@ src_configure() { -DGEANT4_USE_XM=$(usex motif) -DGEANT4_USE_VTK=$(usex vtk) -DBUILD_STATIC_LIBS=$(usex static-libs) - ${EXTRA_ECONF} ) + + if use python; then + mycmakeargs+=( + -DPYTHON_EXECUTABLE="${EPREFIX}/usr/bin/${EPYTHON}" + -DCMAKE_INSTALL_PYTHONDIR="${EPREFIX}/usr/lib/${EPYTHON}/site-packages" + ) + fi + + [ -v EXTRA_ECONF ] && mycmakeargs+=( ${EXTRA_ECONF} ) + cmake_src_configure }