summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-08-21 11:58:28 +0200
committerAndreas Enge <andreas@enge.fr>2025-08-21 12:11:25 +0200
commitcd3ea7d5701eaaec5a9fdb05ee1386e2e1e4255a (patch)
tree69d2b6e6a786d6fcdfd734c952a17931046ea619 /gnu/packages
parent7b45058bec3a9ded802bb22bd9c7d1a4a1825214 (diff)
gnu: ploticus: Fix build with GCC 14.
* gnu/packages/patches/ploticus-pointer-types.patch: New file. * gnu/packages/plotutils.scm (ploticus)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Fixes: guix/guix#1818 Change-Id: I121ca003c9fecc916580e4c949706e853ea74ec7 Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/patches/ploticus-pointer-types.patch31
-rw-r--r--gnu/packages/plotutils.scm3
2 files changed, 33 insertions, 1 deletions
diff --git a/gnu/packages/patches/ploticus-pointer-types.patch b/gnu/packages/patches/ploticus-pointer-types.patch
new file mode 100644
index 00000000000..f84a63cfbbf
--- /dev/null
+++ b/gnu/packages/patches/ploticus-pointer-types.patch
@@ -0,0 +1,31 @@
+From <https://sources.debian.org/data/main/p/ploticus/2.42-8/debian/patches/fix-ftbfs-gcc14.patch>.
+
+Fixes a build error with GCC 14:
+
+ svg.c: In function ‘PLGS_trailer’:
+ svg.c:743:46: error: passing argument 1 of ‘gzprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
+ 743 | if( svg_compress ) gzprintf( outfp, "%s", buf );
+ | ^~~~~
+ | |
+ | FILE *
+
+--- a/src/svg.c
++++ b/src/svg.c
+@@ -740,7 +740,7 @@
+ buf = svg_style; /* reuse */
+ while( fgets( buf, 999, svg_fp ) != NULL ) {
+ #ifdef WZ
+- if( svg_compress ) gzprintf( outfp, "%s", buf );
++ if( svg_compress ) gzprintf( (gzFile) outfp, "%s", buf );
+ else
+ #endif
+ printf( "%s", buf );
+@@ -749,7 +749,7 @@
+ unlink( svg_tmpfilename );
+ #ifdef WZ
+ if( svg_compress && !svg_stdout ) {
+- gzclose( outfp );
++ gzclose( (gzFile) outfp );
+ chmod( svg_filename, 00644 );
+ }
+ #endif
diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index c05b6d1195d..be3150b945f 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2021, 2025 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016-2025 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -305,6 +305,7 @@ went to university in the 1990s, this is the library for you.")
(base32
"1c70cvfvgjh83hj1x21130wb9qfr2rc0x47cxy9kl805yjwy8a9z"))
(modules '((guix build utils)))
+ (patches (search-patches "ploticus-pointer-types.patch"))
(snippet
;; Install binaries in the right place.
#~(begin