commit: 5b1abedb92ca60a31231bf133183afef93ad4a68 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Thu Sep 25 20:50:36 2025 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Thu Sep 25 20:54:17 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b1abedb
sci-calculators/speedcrunch: add Qt6-based 0.12.0_p20241202 snapshot Thanks-to: Zentoo Bug: https://bugs.gentoo.org/953885 Closes: https://bugs.gentoo.org/955828 Closes: https://bugs.gentoo.org/957574 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> sci-calculators/speedcrunch/Manifest | 1 + .../files/speedcrunch-0.12.0_p20241202-qhash.patch | 37 ++++++++++++++++++++++ ...peedcrunch-0.12.0_p20241202-qsignalmapper.patch | 30 ++++++++++++++++++ .../speedcrunch-0.12.0_p20241202.ebuild | 34 ++++++++++++++++++++ 4 files changed, 102 insertions(+) diff --git a/sci-calculators/speedcrunch/Manifest b/sci-calculators/speedcrunch/Manifest index a7a05bd77518..d242174770c7 100644 --- a/sci-calculators/speedcrunch/Manifest +++ b/sci-calculators/speedcrunch/Manifest @@ -1 +1,2 @@ DIST speedcrunch-0.12.0.tar.gz 3667420 BLAKE2B d983c22cbed9f3496bf7cadf670db3e7af4461a37e5fe151094ecaf6077cabffea84e4530c9b18145a220f09336d70567c96509b99c3b6a18f967aa97051d66e SHA512 9f93936311e227ed0aff374adae408f212e6d63174154931ecb19a31f1a6f360b9548989bbdc5988d03a7600f2d3e466ef18bf5f071002b99f22b22e773143eb +DIST speedcrunch-0.12.0_p20241202-3c1b4c18ccb2.tar.bz2 3206297 BLAKE2B 7364d154644a567696ec382a7245ab558272626e528ebcc16ba7dc29bbdeb3dfb5e78849100575615fd34d6982a14c44eb9f9fae37675a30a3ed127ddc5c67ff SHA512 e3691bfabbdc5d913353281db307a38d18a6d49cdee26f46b95de2e70daf638974b2654de4faedfe64c0b92977390784d235f2b888afbbbf30de062b1864efb3 diff --git a/sci-calculators/speedcrunch/files/speedcrunch-0.12.0_p20241202-qhash.patch b/sci-calculators/speedcrunch/files/speedcrunch-0.12.0_p20241202-qhash.patch new file mode 100644 index 000000000000..3eba5557417e --- /dev/null +++ b/sci-calculators/speedcrunch/files/speedcrunch-0.12.0_p20241202-qhash.patch @@ -0,0 +1,37 @@ +Source: https://bitbucket.org/heldercorreia/speedcrunch/pull-requests/140 + +From a52be1f46d86d2af8cf44633f06137d976556fe8 Mon Sep 17 00:00:00 2001 +From: Ronald Wright <[email protected]> +Date: Sat, 7 Jun 2025 18:33:09 -0500 +Subject: [PATCH] Fix additional Qt6 build errors + +--- + src/math/rational.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/math/rational.h b/src/math/rational.h +index dfda4438..bbef00a3 100644 +--- a/src/math/rational.h ++++ b/src/math/rational.h +@@ -19,6 +19,8 @@ + #ifndef RATIONAL_H + #define RATIONAL_H + ++#include <QHash> ++ + class HNumber; + class QString; + +@@ -64,6 +66,10 @@ public: + QString toString() const; + HNumber toHNumber( )const; + double toDouble() const; ++ ++ friend size_t qHash(const Rational &r, size_t seed = 0) { ++ return qHashMulti(seed, r.m_num, r.m_denom, r.m_valid); ++ } + }; + + #endif // RATIONAL_H +-- +2.51.0 diff --git a/sci-calculators/speedcrunch/files/speedcrunch-0.12.0_p20241202-qsignalmapper.patch b/sci-calculators/speedcrunch/files/speedcrunch-0.12.0_p20241202-qsignalmapper.patch new file mode 100644 index 000000000000..aba91b85928d --- /dev/null +++ b/sci-calculators/speedcrunch/files/speedcrunch-0.12.0_p20241202-qsignalmapper.patch @@ -0,0 +1,30 @@ +Source: https://bitbucket.org/heldercorreia/speedcrunch/pull-requests/127 + +From 579fe071c6229f2d26571b4cbc88afc46ad20943 Mon Sep 17 00:00:00 2001 +From: Oktay Imanzade <[email protected]> +Date: Mon, 18 Mar 2024 17:08:15 +0000 +Subject: [PATCH] Fix keypad for Qt6 + +--- + src/gui/keypad.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gui/keypad.cpp b/src/gui/keypad.cpp +index d206c76c..b252c85d 100644 +--- a/src/gui/keypad.cpp ++++ b/src/gui/keypad.cpp +@@ -82,7 +82,11 @@ Keypad::Keypad(QWidget* parent) + setButtonTooltips(); + disableButtonFocus(); + setLayoutDirection(Qt::LeftToRight); ++#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) ++ connect(&mapper, SIGNAL(mappedInt(int)), SLOT(emitButtonPressed(int))); ++#else + connect(&mapper, SIGNAL(mapped(int)), SLOT(emitButtonPressed(int))); ++#endif + } + + void Keypad::handleRadixCharacterChange() +-- +2.51.0 + diff --git a/sci-calculators/speedcrunch/speedcrunch-0.12.0_p20241202.ebuild b/sci-calculators/speedcrunch/speedcrunch-0.12.0_p20241202.ebuild new file mode 100644 index 000000000000..29ddfe9faba7 --- /dev/null +++ b/sci-calculators/speedcrunch/speedcrunch-0.12.0_p20241202.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +COMMIT=3c1b4c18ccb275eb2891f9d8ff36a9205c0f566b +inherit cmake desktop xdg + +DESCRIPTION="Fast and usable calculator for power users" +HOMEPAGE="https://heldercorreia.bitbucket.io/speedcrunch/" +SRC_URI="https://bitbucket.org/heldercorreia/speedcrunch/get/${COMMIT}.tar.bz2 -> ${P}-${COMMIT:0:12}.tar.bz2" +S="${WORKDIR}/heldercorreia-${PN}-${COMMIT:0:12}" +CMAKE_USE_DIR="${S}/src" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" + +DEPEND=" + dev-qt/qtbase:6[gui,widgets] + dev-qt/qttools:6[assistant] +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-qhash.patch" + "${FILESDIR}/${P}-qsignalmapper.patch" +) + +src_install() { + local HTML_DOCS=( "${S}"/doc/build_html_embedded/. ) + cmake_src_install + doicon -s scalable gfx/speedcrunch.svg +}
