guix_mirror_bot pushed a commit to branch add-compress-debug-symbols-phase
in repository guix.

commit a4bfa3a53ae3e266f2121dc4eaedfa7f74417c49
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Tue Nov 4 11:59:35 2025 +0900

    gnu: libxmi: Update to 1.3.
    
    * gnu/packages/graphics.scm (libxmi): Update to 1.3 and apply Gentoo 
patches.
    * gnu/packages/patches/libxmi-gcc15.patch: New file.
    * gnu/packages/patches/libxmi-implicit.patch: New file.
    * gnu/local.mk: Register them.
    
    Change-Id: I73afe29743ebb99a5d2146f65ad76ec9a18c2466
---
 gnu/local.mk                               |  2 ++
 gnu/packages/graphics.scm                  | 11 ++++++++---
 gnu/packages/patches/libxmi-gcc15.patch    | 25 +++++++++++++++++++++++++
 gnu/packages/patches/libxmi-implicit.patch | 15 +++++++++++++++
 4 files changed, 50 insertions(+), 3 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 1f7f4e0797..edd9f30ed8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1787,6 +1787,8 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/libvdpau-va-gl-unbundle.patch           \
   %D%/packages/patches/libvpx-CVE-2016-2818.patch              \
   %D%/packages/patches/libxcb-path-max.patch                   \
+  %D%/packages/patches/libxmi-gcc15.patch                      \
+  %D%/packages/patches/libxmi-implicit.patch                   \
   %D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch  \
   %D%/packages/patches/libwpd-gcc-compat.patch                 \
   %D%/packages/patches/libxt-guix-search-paths.patch           \
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index c93fb9ac99..872008eb2a 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1233,13 +1233,18 @@ basic geometries.")
 (define-public libxmi
   (package
     (name "libxmi")
-    (version "1.2")
+    (version "1.3")                     ;version bundled in plotutils
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://gnu/libxmi/libxmi-" version 
".tar.gz"))
+              ;; XXX: Use this Gentoo-maintained fork, which is the more
+              ;; up-to-date 1.3 version bundled with plotutils.
+              (uri (string-append "http://gentoo.osuosl.org/distfiles/65/";
+                                  name "-" version ".tar.xz"))
               (sha256
                (base32
-                "03d4ikh29l38rl1wavb0icw7m5pp7yilnv7bb2k8qij1dinsymlx"))))
+                "04npjh8k2ipmpwflfivqchga5r2qw7qbhbyk9n6kgccsm3aaxwl6"))
+              (patches (search-patches "libxmi-gcc15.patch"
+                                       "libxmi-implicit.patch"))))
     (build-system gnu-build-system)
     (arguments (list #:configure-flags #~(list "--disable-static")
                      #:phases #~(modify-phases %standard-phases
diff --git a/gnu/packages/patches/libxmi-gcc15.patch 
b/gnu/packages/patches/libxmi-gcc15.patch
new file mode 100644
index 0000000000..0ddf4d776b
--- /dev/null
+++ b/gnu/packages/patches/libxmi-gcc15.patch
@@ -0,0 +1,25 @@
+Retrieved from: 
https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/libxmi/files/libxmi-1.3-gcc15.patch
+
+https://bugs.gentoo.org/944450
+
+--- a/sys-defines.h
++++ b/sys-defines.h
+@@ -166,17 +166,7 @@ extern __C_LINKAGE void free (void * ptr);
+ /* Support the `bool' datatype, which our code uses extensively.          */
+ /**************************************************************************/
+ 
+-#ifndef __cplusplus
+-#ifndef HAVE_BOOL_IN_CC
+-#ifdef __STDC__
+-typedef enum { false = 0, true = 1 } bool;
+-#else  /* not __STDC__, do things the old-fashioned way */
+-typedef int bool;
+-#define false 0
+-#define true 1
+-#endif
+-#endif /* not HAVE_BOOL_IN_CC */
+-#endif /* not __cplusplus */
++#include <stdbool.h>
+   
+ /**************************************************************************/
+ /* Define numerical constants (unofficial, so may not be in math.h).      */
diff --git a/gnu/packages/patches/libxmi-implicit.patch 
b/gnu/packages/patches/libxmi-implicit.patch
new file mode 100644
index 0000000000..43b5fee38f
--- /dev/null
+++ b/gnu/packages/patches/libxmi-implicit.patch
@@ -0,0 +1,15 @@
+Retrieved from: 
https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/libxmi/files/libxmi-1.3-gcc15.patch
+
+https://bugs.gentoo.org/899832
+
+--- a/configure.in
++++ b/configure.in
+@@ -77,7 +77,7 @@ int main()
+   int i;
+   for (i=0; i < B; i++)
+     Array[[i]] = i - 3;
+-  exit (Array[[1]] != -2);
++  return (Array[[1]] != -2);
+ }],
+     ac_cv_c_gcc_strength_bug="no",
+     ac_cv_c_gcc_strength_bug="yes",

Reply via email to