mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
xfce-base/xfce4-panel: Backport missing include fix
Closes: https://bugs.gentoo.org/932303 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
148
xfce-base/xfce4-panel/files/xfce4-panel-4.19.4-build.patch
Normal file
148
xfce-base/xfce4-panel/files/xfce4-panel-4.19.4-build.patch
Normal file
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user