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 <vowstar@gmail.com>
This commit is contained in:
Huang Rui 2022-06-24 14:03:36 +08:00
parent fcec22579a
commit 1aeb3e088c
No known key found for this signature in database
GPG Key ID: AD4E34A8385E3E52
2 changed files with 40 additions and 38 deletions

View File

@ -23,10 +23,10 @@ fi
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="+python" REQUIRED_USE="${PYTHON_REQUIRED_USE}"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND=" RDEPEND="
${PYTHON_DEPS}
dev-qt/qtcore:5 dev-qt/qtcore:5
dev-qt/qtgui:5 dev-qt/qtgui:5
dev-qt/qthelp:5 dev-qt/qthelp:5
@ -34,13 +34,16 @@ RDEPEND="
dev-qt/qtsvg:5 dev-qt/qtsvg:5
dev-qt/qtwidgets:5 dev-qt/qtwidgets:5
dev-qt/qtxml:5 dev-qt/qtxml:5
python? ( ${PYTHON_DEPS} )
" "
DEPEND=" DEPEND="
${RDEPEND} ${RDEPEND}
" "
BDEPEND="
dev-lang/swig
"
src_prepare() { src_prepare() {
default default
# Fix QA pre-stripped warnings, bug 781674 # Fix QA pre-stripped warnings, bug 781674
@ -54,20 +57,18 @@ src_prepare() {
src_install() { src_install() {
# Can't use default, set INSTALL_ROOT and workaround parallel install bug # Can't use default, set INSTALL_ROOT and workaround parallel install bug
emake -j1 INSTALL_ROOT="${D}" install emake -j1 INSTALL_ROOT="${D}" install
if use python; then python_install() {
python_install() { export PYTHON_C_FLAGS="$(python_get_CFLAGS)"
export PYTHON_C_FLAGS="$(python_get_CFLAGS)" export PYTHON_LIBS="$(python_get_LIBS)"
export PYTHON_LIBS="$(python_get_LIBS)" pushd "PythonAPI" || die
pushd "PythonAPI" || die emake clean
emake clean eqmake5 PREFIX="$(python_get_library_path)"
eqmake5 PREFIX="$(python_get_library_path)" emake
emake rm -rf _pythonAPI.so || die
rm -rf _pythonAPI.so || die cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die
cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die python_domodule _pythonAPI.so
python_domodule _pythonAPI.so python_domodule pythonAPI.py
python_domodule pythonAPI.py popd
popd }
} python_foreach_impl python_install
python_foreach_impl python_install
fi
} }

View File

@ -23,10 +23,10 @@ fi
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="+python" REQUIRED_USE="${PYTHON_REQUIRED_USE}"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND=" RDEPEND="
${PYTHON_DEPS}
dev-qt/qtcore:5 dev-qt/qtcore:5
dev-qt/qtgui:5 dev-qt/qtgui:5
dev-qt/qthelp:5 dev-qt/qthelp:5
@ -34,13 +34,16 @@ RDEPEND="
dev-qt/qtsvg:5 dev-qt/qtsvg:5
dev-qt/qtwidgets:5 dev-qt/qtwidgets:5
dev-qt/qtxml:5 dev-qt/qtxml:5
python? ( ${PYTHON_DEPS} )
" "
DEPEND=" DEPEND="
${RDEPEND} ${RDEPEND}
" "
BDEPEND="
dev-lang/swig
"
src_prepare() { src_prepare() {
default default
# Fix QA pre-stripped warnings, bug 781674 # Fix QA pre-stripped warnings, bug 781674
@ -54,20 +57,18 @@ src_prepare() {
src_install() { src_install() {
# Can't use default, set INSTALL_ROOT and workaround parallel install bug # Can't use default, set INSTALL_ROOT and workaround parallel install bug
emake -j1 INSTALL_ROOT="${D}" install emake -j1 INSTALL_ROOT="${D}" install
if use python; then python_install() {
python_install() { export PYTHON_C_FLAGS="$(python_get_CFLAGS)"
export PYTHON_C_FLAGS="$(python_get_CFLAGS)" export PYTHON_LIBS="$(python_get_LIBS)"
export PYTHON_LIBS="$(python_get_LIBS)" pushd "PythonAPI" || die
pushd "PythonAPI" || die emake clean
emake clean eqmake5 PREFIX="$(python_get_library_path)"
eqmake5 PREFIX="$(python_get_library_path)" emake
emake rm -rf _pythonAPI.so || die
rm -rf _pythonAPI.so || die cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die
cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die python_domodule _pythonAPI.so
python_domodule _pythonAPI.so python_domodule pythonAPI.py
python_domodule pythonAPI.py popd
popd }
} python_foreach_impl python_install
python_foreach_impl python_install
fi
} }