diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-11-20 10:47:07 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-11-20 10:54:39 +0100 |
commit | c72712a95e3335004d904a06f10bb2c2547de5fa (patch) | |
tree | 34a12e5310ac67d8dba6bcad560dd582a0927872 /xfce-extra/xfce4-sensors-plugin | |
parent | dev-python/jeepney: Bump to 0.6.0 (diff) | |
download | gentoo-c72712a95e3335004d904a06f10bb2c2547de5fa.tar.gz gentoo-c72712a95e3335004d904a06f10bb2c2547de5fa.tar.bz2 gentoo-c72712a95e3335004d904a06f10bb2c2547de5fa.zip |
xfce-extra/xfce4-sensors-plugin: Fix build with gcc-10
Closes: https://bugs.gentoo.org/708370
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'xfce-extra/xfce4-sensors-plugin')
-rw-r--r-- | xfce-extra/xfce4-sensors-plugin/files/xfce4-sensors-plugin-1.3.92-gcc-10.patch | 115 | ||||
-rw-r--r-- | xfce-extra/xfce4-sensors-plugin/xfce4-sensors-plugin-1.3.92-r1.ebuild | 4 |
2 files changed, 119 insertions, 0 deletions
diff --git a/xfce-extra/xfce4-sensors-plugin/files/xfce4-sensors-plugin-1.3.92-gcc-10.patch b/xfce-extra/xfce4-sensors-plugin/files/xfce4-sensors-plugin-1.3.92-gcc-10.patch new file mode 100644 index 000000000000..a5d60a66810e --- /dev/null +++ b/xfce-extra/xfce4-sensors-plugin/files/xfce4-sensors-plugin-1.3.92-gcc-10.patch @@ -0,0 +1,115 @@ +From 108ffac9eac23a5d87f142e36d162d62be0619e2 Mon Sep 17 00:00:00 2001 +From: Robin Lee <cheeselee@fedoraproject.org> +Date: Mon, 24 Feb 2020 17:52:39 +0800 +Subject: [PATCH] Fix multiple definition errors under GCC 10.0 + +Fixes issue #9, RHBZ#1800268 +--- + include/sensors-interface-common.h | 22 ++++++++++++++-------- + lib/sensors-interface-common.c | 1 + + 2 files changed, 15 insertions(+), 8 deletions(-) + +diff --git a/include/sensors-interface-common.h b/include/sensors-interface-common.h +index 62a27eb..05146c5 100644 +--- a/include/sensors-interface-common.h ++++ b/include/sensors-interface-common.h +@@ -146,6 +146,12 @@ t_sensors_dialog; + + + ++#ifdef XFCE4_SENSORS_INTERFACE_COMMON_DEFINING ++#define EXTERN ++#else ++#define EXTERN extern ++#endif ++ + /* Extern functions that need to be re-implemented in the sensors-viewer and + * the panel code. + * They kind of need to be registered at the library by any software +@@ -157,7 +163,7 @@ t_sensors_dialog; + * @param ptr_widget: Pointer to original widget, i.e, the update timer box + * @param ptr_sensorsdialog: argument pointer to sensors dialog data + */ +-void ++EXTERN void + (*adjustment_value_changed) (GtkWidget *ptr_widget, + t_sensors_dialog *ptr_sensorsdialog); + +@@ -167,7 +173,7 @@ void + * @param ptr_widget: Pointer to original widget, i.e, the sensor entry combobox + * @param ptr_sensorsdialog: argument pointer to sensors dialog data + */ +-void ++EXTERN void + (*sensor_entry_changed) (GtkWidget *ptr_widget, + t_sensors_dialog *ptr_sensorsdialog); + +@@ -178,7 +184,7 @@ void + * @param ptr_str_newtext: Pointer to the string containing the new label + * @param ptr_sensorsdialog: argument pointer to sensors dialog data + */ +-void ++EXTERN void + (*list_cell_text_edited) (GtkCellRendererText *ptr_cellrenderertext, + gchar *ptr_str_path, gchar *ptr_str_newtext, + t_sensors_dialog *ptr_sensorsdialog); +@@ -189,7 +195,7 @@ void + * @param ptr_str_path: pointer to the string with the path of the changed item + * @param ptr_sensorsdialog: argument pointer to sensors dialog data + */ +-void ++EXTERN void + (*list_cell_toggle) (GtkCellRendererToggle *ptr_cellrenderertoggle, gchar *ptr_str_path, + t_sensors_dialog *ptr_sensorsdialog); + +@@ -201,7 +207,7 @@ void + * hexadecimal rgb format #0011ff + * @param ptr_sensorsdialog: argument pointer to sensors dialog data + */ +-void ++EXTERN void + (*list_cell_color_edited) (GtkCellRendererText *ptr_cellrenderertext, + gchar *ptr_str_path, gchar *ptr_str_newcolor, + t_sensors_dialog *ptr_sensorsdialog); +@@ -214,7 +220,7 @@ void + * temperature + * @param ptr_sensorsdialog: argument pointer to sensors dialog data + */ +-void ++EXTERN void + (*minimum_changed) (GtkCellRendererText *ptr_cellrenderertext, gchar *ptr_str_path, + gchar *ptr_str_newmin, t_sensors_dialog *ptr_sensorsdialog); + +@@ -226,7 +232,7 @@ void + * temperature + * @param ptr_sensorsdialog: argument pointer to sensors dialog data + */ +-void ++EXTERN void + (*maximum_changed) (GtkCellRendererText *ptr_cellrenderertext, gchar *ptr_str_path, + gchar *ptr_str_newmax, t_sensors_dialog *ptr_sensorsdialog); + +@@ -236,7 +242,7 @@ void + * @param ptr_widget: Pointer to original widget, i.e, the update timer box + * @param ptr_sensorsdialog: argument pointer to sensors dialog data + */ +-void ++EXTERN void + (*temperature_unit_change) (GtkWidget *ptr_widget, + t_sensors_dialog *ptr_sensorsdialog); + +diff --git a/lib/sensors-interface-common.c b/lib/sensors-interface-common.c +index 70aa154..8c79f1d 100644 +--- a/lib/sensors-interface-common.c ++++ b/lib/sensors-interface-common.c +@@ -28,6 +28,7 @@ + #include <libxfce4panel/xfce-panel-plugin.h> + + /* Local/package includes */ ++#define XFCE4_SENSORS_INTERFACE_COMMON_DEFINING + #include <configuration.h> + #include <sensors-interface-common.h> + #include <middlelayer.h> +-- +GitLab + diff --git a/xfce-extra/xfce4-sensors-plugin/xfce4-sensors-plugin-1.3.92-r1.ebuild b/xfce-extra/xfce4-sensors-plugin/xfce4-sensors-plugin-1.3.92-r1.ebuild index d740fbfc2c1d..988a10db5faf 100644 --- a/xfce-extra/xfce4-sensors-plugin/xfce4-sensors-plugin-1.3.92-r1.ebuild +++ b/xfce-extra/xfce4-sensors-plugin/xfce4-sensors-plugin-1.3.92-r1.ebuild @@ -37,6 +37,10 @@ BDEPEND=" DOCS=( AUTHORS ChangeLog NEWS NOTES README TODO ) +PATCHES=( + "${FILESDIR}"/${P}-gcc-10.patch +) + src_configure() { local myconf=( --libexecdir="${EPREFIX}"/usr/$(get_libdir) |