summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-05-22 12:00:08 +0200
committerMichał Górny <mgorny@gentoo.org>2024-05-22 12:00:56 +0200
commit566d64d08eb5fc75d7b67debe24a103dc04c545f (patch)
tree9462a946c8771485b13cfdbfd5d754e8948174fb /xfce-base/xfce4-panel
parentsys-apps/azure-nvme-utils: Keyword 0.1.3 for ~arm64 (diff)
downloadgentoo-566d64d08eb5fc75d7b67debe24a103dc04c545f.tar.gz
gentoo-566d64d08eb5fc75d7b67debe24a103dc04c545f.tar.bz2
gentoo-566d64d08eb5fc75d7b67debe24a103dc04c545f.zip
xfce-base/xfce4-panel: Backport missing include fix
Closes: https://bugs.gentoo.org/932303 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'xfce-base/xfce4-panel')
-rw-r--r--xfce-base/xfce4-panel/files/xfce4-panel-4.19.4-build.patch148
-rw-r--r--xfce-base/xfce4-panel/xfce4-panel-4.19.4.ebuild6
2 files changed, 154 insertions, 0 deletions
diff --git a/xfce-base/xfce4-panel/files/xfce4-panel-4.19.4-build.patch b/xfce-base/xfce4-panel/files/xfce4-panel-4.19.4-build.patch
new file mode 100644
index 000000000000..7813ba1bb363
--- /dev/null
+++ b/xfce-base/xfce4-panel/files/xfce4-panel-4.19.4-build.patch
@@ -0,0 +1,148 @@
+From fcee4201e254a417f8146723b24ce0716840c96b Mon Sep 17 00:00:00 2001
+From: Nicholas Vinson <nvinson234@gmail.com>
+Date: Tue, 21 May 2024 01:10:10 +0200
+Subject: [PATCH] build: Add missing math.h includes
+
+Commit 0f786ce451297f8d26d41dc8492c10db08d8f87f added a math.h include
+statement to libxfce4panel/xfce-panel-image.c to fix issue #833.
+However, libm functions are used in more files than just
+xfce-panel-image.c.
+
+Therefore, add math.h include to other files that use math functions.
+
+Signed-off-by: Nicholas Vinson <nvinson234 at gmail.com>
+Fixes: https://bugs.gentoo.org/932303
+---
+ panel/panel-base-window.c | 4 +++-
+ panel/panel-itembar.c | 4 ++++
+ panel/panel-preferences-dialog.c | 4 +++-
+ plugins/clock/clock-analog.c | 4 ++++
+ plugins/clock/clock-binary.c | 4 +++-
+ plugins/clock/clock-lcd.c | 4 ++++
+ plugins/clock/clock.c | 4 ++++
+ plugins/systray/systray-box.c | 4 ++++
+ 8 files changed, 29 insertions(+), 3 deletions(-)
+
+diff --git a/panel/panel-base-window.c b/panel/panel-base-window.c
+index 5e0f3a688..832520be6 100644
+--- a/panel/panel-base-window.c
++++ b/panel/panel-base-window.c
+@@ -35,7 +35,9 @@
+ #define gtk_layer_is_supported() FALSE
+ #endif
+
+-
++#ifdef HAVE_MATH_H
++#include <math.h>
++#endif
+
+ #define PANEL_BASE_CSS ".xfce4-panel.background { border-style: solid; }" \
+ ".xfce4-panel.background button { background: transparent; padding: 0; }" \
+diff --git a/panel/panel-itembar.c b/panel/panel-itembar.c
+index 4ffcb5ba4..11ccf5d1d 100644
+--- a/panel/panel-itembar.c
++++ b/panel/panel-itembar.c
+@@ -29,6 +29,10 @@
+ #include "libxfce4panel/libxfce4panel.h"
+ #include "libxfce4panel/xfce-panel-plugin-provider.h"
+
++#ifdef HAVE_MATH_H
++#include <math.h>
++#endif
++
+ #define IS_HORIZONTAL(itembar) ((itembar)->mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL)
+ #define HIGHLIGHT_SIZE 2
+
+diff --git a/panel/panel-preferences-dialog.c b/panel/panel-preferences-dialog.c
+index 9a54e9ab3..dfcc67db3 100644
+--- a/panel/panel-preferences-dialog.c
++++ b/panel/panel-preferences-dialog.c
+@@ -37,7 +37,9 @@
+ #include <libxfce4ui/libxfce4ui.h>
+ #include <libxfce4util/libxfce4util.h>
+
+-
++#ifdef HAVE_MATH_H
++#include<math.h>
++#endif
+
+ static void
+ panel_preferences_dialog_finalize (GObject *object);
+diff --git a/plugins/clock/clock-analog.c b/plugins/clock/clock-analog.c
+index ae4ae21f4..50196352d 100644
+--- a/plugins/clock/clock-analog.c
++++ b/plugins/clock/clock-analog.c
+@@ -27,6 +27,10 @@
+
+ #include <cairo/cairo.h>
+
++#ifdef HAVE_MATH_H
++#include <math.h>
++#endif
++
+ #define CLOCK_SCALE 0.08
+ #define TICKS_TO_RADIANS(x) (G_PI - (G_PI / 30.0) * (x))
+ #define HOURS_TO_RADIANS(x, y) (G_PI - (G_PI / 6.0) * (((x) > 12 ? (x) - 12 : (x)) + (y) / 60.0))
+diff --git a/plugins/clock/clock-binary.c b/plugins/clock/clock-binary.c
+index 5ac4151af..36fe31c72 100644
+--- a/plugins/clock/clock-binary.c
++++ b/plugins/clock/clock-binary.c
+@@ -27,7 +27,9 @@
+
+ #include <cairo/cairo.h>
+
+-
++#ifdef HAVE_MATH_H
++#include <math.h>
++#endif
+
+ static void
+ xfce_clock_binary_set_property (GObject *object,
+diff --git a/plugins/clock/clock-lcd.c b/plugins/clock/clock-lcd.c
+index 97e041d58..8b7454dfd 100644
+--- a/plugins/clock/clock-lcd.c
++++ b/plugins/clock/clock-lcd.c
+@@ -27,6 +27,10 @@
+
+ #include <cairo/cairo.h>
+
++#ifdef HAVE_MATH_H
++#include <math.h>
++#endif
++
+ #define RELATIVE_SPACE (0.10)
+ #define RELATIVE_DIGIT (5 * RELATIVE_SPACE)
+ #define RELATIVE_DOTS (3 * RELATIVE_SPACE)
+diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c
+index 472ff8f17..ee1d4402b 100644
+--- a/plugins/clock/clock.c
++++ b/plugins/clock/clock.c
+@@ -39,6 +39,10 @@
+ #include <gtk/gtk.h>
+ #include <libxfce4ui/libxfce4ui.h>
+
++#ifdef HAVE_MATH_H
++#include <math.h>
++#endif
++
+ /* TRANSLATORS: adjust this accordingly for your locale format */
+ #define DEFAULT_TOOLTIP_FORMAT NC_ ("Date", "%A %d %B %Y")
+
+diff --git a/plugins/systray/systray-box.c b/plugins/systray/systray-box.c
+index 1fc22c925..f808acb97 100644
+--- a/plugins/systray/systray-box.c
++++ b/plugins/systray/systray-box.c
+@@ -27,6 +27,10 @@
+ #include "common/panel-debug.h"
+ #include "common/panel-private.h"
+
++#ifdef HAVE_MATH_H
++#include <math.h>
++#endif
++
+ #define SPACING (2)
+ #define OFFSCREEN (-9999)
+
+--
+GitLab
+
diff --git a/xfce-base/xfce4-panel/xfce4-panel-4.19.4.ebuild b/xfce-base/xfce4-panel/xfce4-panel-4.19.4.ebuild
index 6329f2e10d87..909458cf5c95 100644
--- a/xfce-base/xfce4-panel/xfce4-panel-4.19.4.ebuild
+++ b/xfce-base/xfce4-panel/xfce4-panel-4.19.4.ebuild
@@ -54,6 +54,12 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ # fix build with USE=-wayland
+ # https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/833
+ "${FILESDIR}/${P}-build.patch"
+)
+
src_configure() {
local myconf=(
$(use_enable introspection)