From 1aeb3e088cbccbaaa406f305cb9e02566eb4363d Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Fri, 24 Jun 2022 14:03:36 +0800 Subject: [PATCH] sci-electronics/kactus2: fix build problem Add missing python and swig depend Python3 is required to build and run this package Closes: https://bugs.gentoo.org/853838 Closes: https://bugs.gentoo.org/853841 Signed-off-by: Huang Rui --- sci-electronics/kactus2/kactus2-3.10.0.ebuild | 39 ++++++++++--------- sci-electronics/kactus2/kactus2-9999.ebuild | 39 ++++++++++--------- 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/sci-electronics/kactus2/kactus2-3.10.0.ebuild b/sci-electronics/kactus2/kactus2-3.10.0.ebuild index 5ac2c48777..eb13a7c478 100644 --- a/sci-electronics/kactus2/kactus2-3.10.0.ebuild +++ b/sci-electronics/kactus2/kactus2-3.10.0.ebuild @@ -23,10 +23,10 @@ fi LICENSE="GPL-2" SLOT="0" -IUSE="+python" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RDEPEND=" + ${PYTHON_DEPS} dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qthelp:5 @@ -34,13 +34,16 @@ RDEPEND=" dev-qt/qtsvg:5 dev-qt/qtwidgets:5 dev-qt/qtxml:5 - python? ( ${PYTHON_DEPS} ) " DEPEND=" ${RDEPEND} " +BDEPEND=" + dev-lang/swig +" + src_prepare() { default # Fix QA pre-stripped warnings, bug 781674 @@ -54,20 +57,18 @@ src_prepare() { src_install() { # Can't use default, set INSTALL_ROOT and workaround parallel install bug emake -j1 INSTALL_ROOT="${D}" install - if use python; then - python_install() { - export PYTHON_C_FLAGS="$(python_get_CFLAGS)" - export PYTHON_LIBS="$(python_get_LIBS)" - pushd "PythonAPI" || die - emake clean - eqmake5 PREFIX="$(python_get_library_path)" - emake - rm -rf _pythonAPI.so || die - cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die - python_domodule _pythonAPI.so - python_domodule pythonAPI.py - popd - } - python_foreach_impl python_install - fi + python_install() { + export PYTHON_C_FLAGS="$(python_get_CFLAGS)" + export PYTHON_LIBS="$(python_get_LIBS)" + pushd "PythonAPI" || die + emake clean + eqmake5 PREFIX="$(python_get_library_path)" + emake + rm -rf _pythonAPI.so || die + cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die + python_domodule _pythonAPI.so + python_domodule pythonAPI.py + popd + } + python_foreach_impl python_install } diff --git a/sci-electronics/kactus2/kactus2-9999.ebuild b/sci-electronics/kactus2/kactus2-9999.ebuild index 5ac2c48777..eb13a7c478 100644 --- a/sci-electronics/kactus2/kactus2-9999.ebuild +++ b/sci-electronics/kactus2/kactus2-9999.ebuild @@ -23,10 +23,10 @@ fi LICENSE="GPL-2" SLOT="0" -IUSE="+python" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RDEPEND=" + ${PYTHON_DEPS} dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qthelp:5 @@ -34,13 +34,16 @@ RDEPEND=" dev-qt/qtsvg:5 dev-qt/qtwidgets:5 dev-qt/qtxml:5 - python? ( ${PYTHON_DEPS} ) " DEPEND=" ${RDEPEND} " +BDEPEND=" + dev-lang/swig +" + src_prepare() { default # Fix QA pre-stripped warnings, bug 781674 @@ -54,20 +57,18 @@ src_prepare() { src_install() { # Can't use default, set INSTALL_ROOT and workaround parallel install bug emake -j1 INSTALL_ROOT="${D}" install - if use python; then - python_install() { - export PYTHON_C_FLAGS="$(python_get_CFLAGS)" - export PYTHON_LIBS="$(python_get_LIBS)" - pushd "PythonAPI" || die - emake clean - eqmake5 PREFIX="$(python_get_library_path)" - emake - rm -rf _pythonAPI.so || die - cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die - python_domodule _pythonAPI.so - python_domodule pythonAPI.py - popd - } - python_foreach_impl python_install - fi + python_install() { + export PYTHON_C_FLAGS="$(python_get_CFLAGS)" + export PYTHON_LIBS="$(python_get_LIBS)" + pushd "PythonAPI" || die + emake clean + eqmake5 PREFIX="$(python_get_library_path)" + emake + rm -rf _pythonAPI.so || die + cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die + python_domodule _pythonAPI.so + python_domodule pythonAPI.py + popd + } + python_foreach_impl python_install }