diff options
author | Huang Rui <vowstar@gmail.com> | 2023-10-21 00:47:54 +0800 |
---|---|---|
committer | Huang Rui <vowstar@gmail.com> | 2023-10-21 00:47:54 +0800 |
commit | 7d626fa31706272569a312176d42b2569a6deb74 (patch) | |
tree | f1fe66720e3db66c16a8a9d5e6e157aaa664bf6c /sci-electronics/kactus2 | |
parent | dev-python/guppy3: add 3.1.4 (diff) | |
download | guru-7d626fa31706272569a312176d42b2569a6deb74.tar.gz guru-7d626fa31706272569a312176d42b2569a6deb74.tar.bz2 guru-7d626fa31706272569a312176d42b2569a6deb74.zip |
sci-electronics/kactus2: fix build with qt6/6.6.0
- fix build problem with qt6/6.6.0, add missing QSharedPointer header
- improve ebuild and follow @ceamac 's suggestions, thanks
Signed-off-by: Huang Rui <vowstar@gmail.com>
Diffstat (limited to 'sci-electronics/kactus2')
3 files changed, 155 insertions, 20 deletions
diff --git a/sci-electronics/kactus2/files/kactus2-3.12.0-fix-missing-qsharedpointer.patch b/sci-electronics/kactus2/files/kactus2-3.12.0-fix-missing-qsharedpointer.patch new file mode 100644 index 000000000..ff271885f --- /dev/null +++ b/sci-electronics/kactus2/files/kactus2-3.12.0-fix-missing-qsharedpointer.patch @@ -0,0 +1,117 @@ +From 1fd0d3cc8a3530a04491e736a673b9fc5092daeb Mon Sep 17 00:00:00 2001 +From: Huang Rui <vowstar@gmail.com> +Date: Fri, 20 Oct 2023 23:41:51 +0800 +Subject: [PATCH] [CORRECTIVE] add missing <QSharedPointer> include to fix + QT6.6.0 build + +- add missing #include <QSharedPointer> to fix incomplete type about QSharedPointer + +Closes: https://github.com/kactus2/kactus2dev/issues/85 +Signed-off-by: Huang Rui <vowstar@gmail.com> +--- + editors/HWDesign/undoCommands/HWComponentAddCommand.h | 5 +++-- + .../SystemDesign/UndoCommands/ApiConnectionDeleteCommand.h | 3 ++- + .../SystemDesign/UndoCommands/ComConnectionDeleteCommand.h | 3 ++- + editors/SystemDesign/UndoCommands/SWInterfaceDeleteCommand.h | 3 ++- + .../SystemDesign/UndoCommands/SystemComponentDeleteCommand.h | 3 ++- + editors/SystemDesign/UndoCommands/SystemDeleteCommands.h | 3 ++- + 6 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/editors/HWDesign/undoCommands/HWComponentAddCommand.h b/editors/HWDesign/undoCommands/HWComponentAddCommand.h +index fe53209d6..c131ada50 100644 +--- a/editors/HWDesign/undoCommands/HWComponentAddCommand.h ++++ b/editors/HWDesign/undoCommands/HWComponentAddCommand.h +@@ -12,10 +12,11 @@ + #ifndef HWCOMPONENTADDCOMMAND_H
+ #define HWCOMPONENTADDCOMMAND_H
+
+-#include <QUndoCommand>
+ #include <QGraphicsScene>
+-#include <QString>
+ #include <QObject>
++#include <QSharedPointer>
++#include <QString>
++#include <QUndoCommand>
+
+ class IGraphicsItemStack;
+ class ComponentItem;
+diff --git a/editors/SystemDesign/UndoCommands/ApiConnectionDeleteCommand.h b/editors/SystemDesign/UndoCommands/ApiConnectionDeleteCommand.h +index 02aaea2c1..7173b9dd9 100644 +--- a/editors/SystemDesign/UndoCommands/ApiConnectionDeleteCommand.h ++++ b/editors/SystemDesign/UndoCommands/ApiConnectionDeleteCommand.h +@@ -12,9 +12,10 @@ + #ifndef APICONNECTIONDELETECOMMAND_H
+ #define APICONNECTIONDELETECOMMAND_H
+
+-#include <QUndoCommand>
+ #include <QGraphicsScene>
+ #include <QObject>
++#include <QSharedPointer>
++#include <QUndoCommand>
+
+ class ApiGraphicsConnection;
+
+diff --git a/editors/SystemDesign/UndoCommands/ComConnectionDeleteCommand.h b/editors/SystemDesign/UndoCommands/ComConnectionDeleteCommand.h +index 5e86dbdf1..e0676b2ca 100644 +--- a/editors/SystemDesign/UndoCommands/ComConnectionDeleteCommand.h ++++ b/editors/SystemDesign/UndoCommands/ComConnectionDeleteCommand.h +@@ -12,9 +12,10 @@ + #ifndef COMCONNECTIONDELETECOMMAND_H
+ #define COMCONNECTIONDELETECOMMAND_H
+
+-#include <QUndoCommand>
+ #include <QGraphicsScene>
+ #include <QObject>
++#include <QSharedPointer>
++#include <QUndoCommand>
+
+ class ComGraphicsConnection;
+
+diff --git a/editors/SystemDesign/UndoCommands/SWInterfaceDeleteCommand.h b/editors/SystemDesign/UndoCommands/SWInterfaceDeleteCommand.h +index d05d3750d..72a1128fd 100644 +--- a/editors/SystemDesign/UndoCommands/SWInterfaceDeleteCommand.h ++++ b/editors/SystemDesign/UndoCommands/SWInterfaceDeleteCommand.h +@@ -12,9 +12,10 @@ + #ifndef SWINTERFACEDELETECOMMAND_H
+ #define SWINTERFACEDELETECOMMAND_H
+
+-#include <QUndoCommand>
+ #include <QGraphicsScene>
+ #include <QObject>
++#include <QSharedPointer>
++#include <QUndoCommand>
+
+ class IGraphicsItemStack;
+ class SWInterfaceItem;
+diff --git a/editors/SystemDesign/UndoCommands/SystemComponentDeleteCommand.h b/editors/SystemDesign/UndoCommands/SystemComponentDeleteCommand.h +index 36abdda6f..ecfcef7db 100644 +--- a/editors/SystemDesign/UndoCommands/SystemComponentDeleteCommand.h ++++ b/editors/SystemDesign/UndoCommands/SystemComponentDeleteCommand.h +@@ -12,9 +12,10 @@ + #ifndef SYSTEMCOMPONENTDELETECOMMAND_H
+ #define SYSTEMCOMPONENTDELETECOMMAND_H
+
+-#include <QUndoCommand>
+ #include <QGraphicsScene>
+ #include <QObject>
++#include <QSharedPointer>
++#include <QUndoCommand>
+
+ class ComponentItem;
+ class IGraphicsItemStack;
+diff --git a/editors/SystemDesign/UndoCommands/SystemDeleteCommands.h b/editors/SystemDesign/UndoCommands/SystemDeleteCommands.h +index 7eb0ed694..a3c1748e6 100644 +--- a/editors/SystemDesign/UndoCommands/SystemDeleteCommands.h ++++ b/editors/SystemDesign/UndoCommands/SystemDeleteCommands.h +@@ -12,9 +12,10 @@ + #ifndef SYSTEMDELETECOMMANDS_H
+ #define SYSTEMDELETECOMMANDS_H
+
+-#include <QUndoCommand>
+ #include <QGraphicsScene>
+ #include <QObject>
++#include <QSharedPointer>
++#include <QUndoCommand>
+
+ class GraphicsConnection;
+ class GraphicsColumnLayout;
diff --git a/sci-electronics/kactus2/kactus2-3.12.0.ebuild b/sci-electronics/kactus2/kactus2-3.12.0.ebuild index 37a6d8343..7812278f3 100644 --- a/sci-electronics/kactus2/kactus2-3.12.0.ebuild +++ b/sci-electronics/kactus2/kactus2-3.12.0.ebuild @@ -42,17 +42,16 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-3.12.0-fix-createhelp.patch + "${FILESDIR}"/${PN}-3.12.0-fix-missing-qsharedpointer.patch ) src_prepare() { default # Fix QA pre-stripped warnings, bug 781674 - while IFS= read -r -d '' i; do - echo "CONFIG+=nostrip" >> "${i}" || die - done < <(find . -type f '(' -name "*.pro" ')' -print0) + find . -type f -name \*.pro -exec sed -e '$a\\nCONFIG+=nostrip' -i '{}' + || die # Fix bug 854081 python_setup - sed -i -e "s|PYTHON_CONFIG=.*|PYTHON_CONFIG=${EPYTHON}-config|" .qmake.conf || die + sed -e "s|PYTHON_CONFIG=.*|PYTHON_CONFIG=${EPYTHON}-config|" -i .qmake.conf || die } src_configure() { @@ -68,14 +67,14 @@ src_compile() { cp -TR "${S}/" "${BUILD_DIR}/" || die # Fix bug 854081 python_setup - sed -i -e "s|PYTHON_CONFIG=.*|PYTHON_CONFIG=${EPYTHON}-config|" .qmake.conf || die + sed -e "s|PYTHON_CONFIG=.*|PYTHON_CONFIG=${EPYTHON}-config|" -i .qmake.conf || die export PYTHON_C_FLAGS="$(python_get_CFLAGS)" export PYTHON_LIBS="$(python_get_LIBS)" pushd "PythonAPI" || die eqmake6 PREFIX="$(python_get_library_path)" emake - rm -rf _pythonAPI.so || die - cp -rf libPythonAPI.so.1.0.0 _pythonAPI.so || die + rm _pythonAPI.so || die + cp libPythonAPI.so.1.0.0 _pythonAPI.so || die popd } python_foreach_impl run_in_build_dir python_compile diff --git a/sci-electronics/kactus2/kactus2-9999.ebuild b/sci-electronics/kactus2/kactus2-9999.ebuild index 5d9feb074..7812278f3 100644 --- a/sci-electronics/kactus2/kactus2-9999.ebuild +++ b/sci-electronics/kactus2/kactus2-9999.ebuild @@ -42,33 +42,52 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-3.12.0-fix-createhelp.patch + "${FILESDIR}"/${PN}-3.12.0-fix-missing-qsharedpointer.patch ) src_prepare() { default # Fix QA pre-stripped warnings, bug 781674 - while IFS= read -r -d '' i; do - echo "CONFIG+=nostrip" >> "${i}" || die - done < <(find . -type f '(' -name "*.pro" ')' -print0) - # # Fix QTBIN_PATH - # sed -i -e "s|QTBIN_PATH=.*|QTBIN_PATH=\"$(qt6_get_bindir)/\"|" configure || die + find . -type f -name \*.pro -exec sed -e '$a\\nCONFIG+=nostrip' -i '{}' + || die + # Fix bug 854081 + python_setup + sed -e "s|PYTHON_CONFIG=.*|PYTHON_CONFIG=${EPYTHON}-config|" -i .qmake.conf || die +} + +src_configure() { + default + # Fix bug 854075 + # Fix bug 854078 + eqmake6 Kactus2.pro +} + +src_compile() { + default + python_compile() { + cp -TR "${S}/" "${BUILD_DIR}/" || die + # Fix bug 854081 + python_setup + sed -e "s|PYTHON_CONFIG=.*|PYTHON_CONFIG=${EPYTHON}-config|" -i .qmake.conf || die + export PYTHON_C_FLAGS="$(python_get_CFLAGS)" + export PYTHON_LIBS="$(python_get_LIBS)" + pushd "PythonAPI" || die + eqmake6 PREFIX="$(python_get_library_path)" + emake + rm _pythonAPI.so || die + cp libPythonAPI.so.1.0.0 _pythonAPI.so || die + popd + } + python_foreach_impl run_in_build_dir python_compile } src_install() { # Can't use default, set INSTALL_ROOT and workaround parallel install bug emake -j1 INSTALL_ROOT="${D}" install 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 + python_foreach_impl run_in_build_dir python_install } |