From cef4210e028903f47f397f8604dbb1de26073c19 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Fri, 24 Apr 2026 15:15:41 +0200 Subject: [PATCH] sci-visualization/ggobi: fix compilation Closes: https://bugs.gentoo.org/944030 Closes: https://bugs.gentoo.org/957406 Signed-off-by: Alfredo Tupone --- .../ggobi/files/ggobi-2.1.12-plugin.patch | 78 +++++++++++++++++++ .../ggobi/ggobi-2.1.12-r1.ebuild | 3 +- 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 sci-visualization/ggobi/files/ggobi-2.1.12-plugin.patch diff --git a/sci-visualization/ggobi/files/ggobi-2.1.12-plugin.patch b/sci-visualization/ggobi/files/ggobi-2.1.12-plugin.patch new file mode 100644 index 0000000000000..e59029d48a1b3 --- /dev/null +++ b/sci-visualization/ggobi/files/ggobi-2.1.12-plugin.patch @@ -0,0 +1,78 @@ +Index: ggobi-2.1.12/src/plugin.h +=================================================================== +--- ggobi-2.1.12.orig/src/plugin.h ++++ ggobi-2.1.12/src/plugin.h +@@ -25,8 +25,6 @@ typedef enum {GENERAL_PLUGIN, INPUT_PLUG + + typedef enum {DL_UNLOADED = 0, DL_LOADED, DL_FAILED} PluginLoadStatus; + +-typedef void (*DLFUNC)(); +- + typedef struct { + gchar *name; + gchar *dllName; +@@ -109,7 +107,7 @@ typedef struct { + } PluginInstance; + + +- ++typedef void (*DLFUNC)(ggobid * gg, GGobiPluginInfo *info, PluginInstance *plugin); + typedef gboolean (*OnLoad)(gboolean initializing, GGobiPluginInfo *plugin); + typedef gboolean (*OnCreate)(ggobid *gg, GGobiPluginInfo *plugin, PluginInstance *inst); + typedef gboolean (*OnClose)(ggobid *gg, GGobiPluginInfo *plugin, PluginInstance *inst); +Index: ggobi-2.1.12/src/GGobiAPI.h +=================================================================== +--- ggobi-2.1.12.orig/src/GGobiAPI.h ++++ ggobi-2.1.12/src/GGobiAPI.h +@@ -238,14 +238,14 @@ extern const gfloat** GGobi_getTFormData + argument of display_free, but this needs + a little more finessing. + */ +-extern void GGobi_destroyCurrentDisplay(); ++extern void GGobi_destroyCurrentDisplay(ggobid * gg); + + + /** + Returns a reference to the names of the observations + used by GGobi to identify the rows in the data. + */ +-extern const gchar ** GGobi_getCaseNames(); ++extern const gchar ** GGobi_getCaseNames(GGobiData * d, ggobid * gg); + + /** + */ +Index: ggobi-2.1.12/src/tour_pp.c +=================================================================== +--- ggobi-2.1.12.orig/src/tour_pp.c ++++ ggobi-2.1.12/src/tour_pp.c +@@ -130,7 +130,7 @@ gint realloc_optimize0_p (optimize0_para + return 0; + } + +-gboolean iszero (array_f *data) ++gboolean my_iszero (array_f *data) + { + gfloat sum = 0; + gint i, j; +@@ -243,7 +243,7 @@ gint optimize0 (optimize0_param *op, + g_printerr ("index_work %f index_best %f \n",index_work, op->index_best);*/ + /* This adds random noise to existing projection and orthonormalize, + if the current projection is null */ +- if (iszero(proj)) ++ if (my_iszero(proj)) + { /* sprintf (msg, "zero projection matrix"); print(); */ + normal_fill (proj, 1.0, proj); + orthonormal (proj); +Index: ggobi-2.1.12/src/tour_pp.h +=================================================================== +--- ggobi-2.1.12.orig/src/tour_pp.h ++++ ggobi-2.1.12/src/tour_pp.h +@@ -26,7 +26,7 @@ The authors can be contacted at the foll + + gint alloc_optimize0_p (optimize0_param *op, gint nrows, gint ncols, gint ndim); + gint free_optimize0_p (optimize0_param *op); +-gboolean iszero (array_f *data); ++gboolean my_iszero (array_f *data); + + void initrandom(gfloat start); + gfloat uniformrandom(void); diff --git a/sci-visualization/ggobi/ggobi-2.1.12-r1.ebuild b/sci-visualization/ggobi/ggobi-2.1.12-r1.ebuild index ba63061f517eb..c0a5f63f89d1a 100644 --- a/sci-visualization/ggobi/ggobi-2.1.12-r1.ebuild +++ b/sci-visualization/ggobi/ggobi-2.1.12-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -25,6 +25,7 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${PN}-2.1.10-desktop.patch + "${FILESDIR}"/${P}-plugin.patch ) src_prepare() {