commit: ac5c4b39a40f96e2e0eae2f9a4f562ad34edd374 Author: Guilherme Amadio <amadio <AT> gentoo <DOT> org> AuthorDate: Wed Dec 15 09:54:57 2021 +0000 Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org> CommitDate: Wed Dec 15 09:55:34 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac5c4b39
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 <amadio <AT> gentoo.org> 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 ebf046d14758..589a2cd089b5 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 }
