From 16c0764308d15e61dede6a22e7684c7c54dca3d7 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sun, 7 Nov 2021 17:46:28 +0100 Subject: dev-util/kdbg: EAPI-8 bump, add upstream fixes Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner --- .../kdbg/files/kdbg-3.0.1-fix-rare-memleak.patch | 35 ++++++++++++++++ dev-util/kdbg/files/kdbg-3.0.1-usable-trace.patch | 23 +++++++++++ dev-util/kdbg/kdbg-3.0.1-r1.ebuild | 48 ++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 dev-util/kdbg/files/kdbg-3.0.1-fix-rare-memleak.patch create mode 100644 dev-util/kdbg/files/kdbg-3.0.1-usable-trace.patch create mode 100644 dev-util/kdbg/kdbg-3.0.1-r1.ebuild (limited to 'dev-util/kdbg') diff --git a/dev-util/kdbg/files/kdbg-3.0.1-fix-rare-memleak.patch b/dev-util/kdbg/files/kdbg-3.0.1-fix-rare-memleak.patch new file mode 100644 index 000000000000..44a2b33623f4 --- /dev/null +++ b/dev-util/kdbg/files/kdbg-3.0.1-fix-rare-memleak.patch @@ -0,0 +1,35 @@ +From 0feb0986f220126177084badf67813ccdbaa996c Mon Sep 17 00:00:00 2001 +From: Daniels Umanovskis +Date: Fri, 13 Mar 2020 13:48:19 +0100 +Subject: [PATCH] Fix a rare memory leak in the register display window + +--- + kdbg/regwnd.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/kdbg/regwnd.cpp b/kdbg/regwnd.cpp +index edb0e55..93008f9 100644 +--- a/kdbg/regwnd.cpp ++++ b/kdbg/regwnd.cpp +@@ -274,11 +274,12 @@ static char* toRaw(const QString& hex, uint& length) + static bool littleendian=(*testChar==1); + + length=((hex.length()-2)%2)+((hex.length()-2)/2); ++ if (hex.length()<=2) return 0; ++ + char* data=new char[length]; + + if (littleendian) { + uint j=0; +- if (hex.length()<=2) return 0; + for (int i=hex.length()-1; i>=2; ) { + if (j%2==0) + data[j/2]=hexCharToDigit(hex[i].toLatin1()); +@@ -288,7 +289,6 @@ static char* toRaw(const QString& hex, uint& length) + } + } else { // big endian + uint j=0; +- if (hex.length()<=2) return 0; + for (int i=2; i +Date: Fri, 13 Mar 2020 16:23:02 +0100 +Subject: [PATCH] Change output for a trace so that trace is actually usable + again + +--- + kdbg/debugger.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kdbg/debugger.cpp b/kdbg/debugger.cpp +index 3751e4c..7d43eb9 100644 +--- a/kdbg/debugger.cpp ++++ b/kdbg/debugger.cpp +@@ -2225,7 +2225,7 @@ void KDebugger::slotValueEdited(VarTree* expr, const QString& text) + + ExprWnd* wnd = static_cast(expr->treeWidget()); + TRACE(QString().sprintf("Changing %s to ", +- wnd->name()) + text); ++ wnd->exprList().join(" ")) + text); + + // determine the lvalue to edit + QString lvalue = expr->computeExpr(); diff --git a/dev-util/kdbg/kdbg-3.0.1-r1.ebuild b/dev-util/kdbg/kdbg-3.0.1-r1.ebuild new file mode 100644 index 000000000000..eb20f7aa1bdb --- /dev/null +++ b/dev-util/kdbg/kdbg-3.0.1-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_HANDBOOK="true" +KFMIN=5.85.0 +QTMIN=5.15.2 +inherit ecm + +DESCRIPTION="Graphical debugger interface" +HOMEPAGE="https://www.kdbg.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="5" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kiconthemes-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=kde-frameworks/kwindowsystem-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 +" +RDEPEND="${DEPEND} + sys-devel/gdb +" + +PATCHES=( + "${FILESDIR}"/${P}-fix-rare-memleak.patch + "${FILESDIR}"/${P}-usable-trace.patch +) + +src_prepare() { + # allow documentation to be handled by eclass + mv kdbg/doc . || die + sed -i -e '/add_subdirectory(doc)/d' kdbg/CMakeLists.txt || die + echo "add_subdirectory ( doc ) " >> CMakeLists.txt || die + + ecm_src_prepare +} -- cgit v1.2.3-65-gdbad