summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-10-06 08:48:21 +0100
committerSam James <sam@gentoo.org>2024-10-06 08:51:46 +0100
commit6c1b050d2435710af171b6be1db0d9a86479a623 (patch)
tree55c7f8e2b8e34128e5805b3030b64dd928a5f138 /sci-calculators
parentmedia-sound/ardour: bump to 8.8 (diff)
downloadgentoo-6c1b050d2435710af171b6be1db0d9a86479a623.tar.gz
gentoo-6c1b050d2435710af171b6be1db0d9a86479a623.tar.bz2
gentoo-6c1b050d2435710af171b6be1db0d9a86479a623.zip
sci-calculators/qalculate-gtk: fix LTO issue
Closes: https://bugs.gentoo.org/940927 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-calculators')
-rw-r--r--sci-calculators/qalculate-gtk/files/qalculate-gtk-5.2.0-lto.patch43
-rw-r--r--sci-calculators/qalculate-gtk/qalculate-gtk-5.2.0-r1.ebuild43
2 files changed, 86 insertions, 0 deletions
diff --git a/sci-calculators/qalculate-gtk/files/qalculate-gtk-5.2.0-lto.patch b/sci-calculators/qalculate-gtk/files/qalculate-gtk-5.2.0-lto.patch
new file mode 100644
index 000000000000..c7bf190a6db3
--- /dev/null
+++ b/sci-calculators/qalculate-gtk/files/qalculate-gtk-5.2.0-lto.patch
@@ -0,0 +1,43 @@
+https://github.com/Qalculate/qalculate-gtk/pull/552
+
+From 5ac0d4264bdec99776fa27f9b6adeeb4965ab8d6 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 6 Oct 2024 08:34:21 +0100
+Subject: [PATCH] searchprovider: don't use conflicting type for
+ simplified_percentage
+
+Fixes the following warning with LTO:
+```
+interface.cc:186:13: error: type of 'simplified_percentage' does not match original declaration [-Werror=lto-type-mismatch]
+ 186 | extern bool simplified_percentage;
+ | ^
+callbacks.cc:231:5: note: type 'int' should match type 'bool'
+ 231 | int simplified_percentage = -1;
+ | ^
+```
+
+Bug: https://bugs.gentoo.org/940927
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/src/searchprovider.cc
++++ b/src/searchprovider.cc
+@@ -366,7 +366,7 @@ void load_preferences_search() {
+ search_ignore_locale = false;
+ search_adaptive_interval_display = true;
+
+- bool simplified_percentage = true;
++ int simplified_percentage = 1;
+
+ CALCULATOR->useIntervalArithmetic(true);
+ CALCULATOR->useBinaryPrefixes(0);
+
+--- a/src/interface.cc
++++ b/src/interface.cc
+@@ -183,7 +183,7 @@ extern bool caret_as_xor;
+ extern int close_with_esc;
+ extern int visible_keypad;
+ extern bool auto_calculate, chain_mode;
+-extern bool simplified_percentage;
++extern int simplified_percentage;
+ extern bool complex_angle_form;
+ extern bool check_version;
+ extern int max_plot_time;
diff --git a/sci-calculators/qalculate-gtk/qalculate-gtk-5.2.0-r1.ebuild b/sci-calculators/qalculate-gtk/qalculate-gtk-5.2.0-r1.ebuild
new file mode 100644
index 000000000000..f2871e1a891f
--- /dev/null
+++ b/sci-calculators/qalculate-gtk/qalculate-gtk-5.2.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Note: bump with sci-libs/libqalculate and sci-calculators/qalculate-qt!
+
+inherit xdg
+
+DESCRIPTION="Modern multi-purpose calculator"
+HOMEPAGE="https://qalculate.github.io/"
+SRC_URI="https://github.com/Qalculate/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="dev-libs/glib:2
+ >=sci-libs/libqalculate-${PV}:=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:3
+ x11-libs/pango"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-util/gdbus-codegen
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.2.0-lto.patch
+)
+
+src_prepare() {
+ # Required by src_test() and `make check`
+ cat >po/POTFILES.skip <<-EOF || die
+ # Required by make check
+ data/calendarconversion.ui
+ data/periodictable.ui
+ EOF
+
+ default
+}