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>
This commit is contained in:
Ludovic Courtès 2025-08-21 11:58:28 +02:00 committed by Andreas Enge
parent 7b45058bec
commit cd3ea7d570
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3
3 changed files with 34 additions and 1 deletions

View file

@ -2119,6 +2119,7 @@ dist_patch_DATA = \
%D%/packages/patches/plink-endian-detection.patch \ %D%/packages/patches/plink-endian-detection.patch \
%D%/packages/patches/plib-CVE-2011-4620.patch \ %D%/packages/patches/plib-CVE-2011-4620.patch \
%D%/packages/patches/plib-CVE-2012-4552.patch \ %D%/packages/patches/plib-CVE-2012-4552.patch \
%D%/packages/patches/ploticus-pointer-types.patch \
%D%/packages/patches/plotutils-spline-test.patch \ %D%/packages/patches/plotutils-spline-test.patch \
%D%/packages/patches/polkit-disable-systemd.patch \ %D%/packages/patches/polkit-disable-systemd.patch \
%D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \

View file

@ -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

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; 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 © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016-2025 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2016-2025 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; 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 (base32
"1c70cvfvgjh83hj1x21130wb9qfr2rc0x47cxy9kl805yjwy8a9z")) "1c70cvfvgjh83hj1x21130wb9qfr2rc0x47cxy9kl805yjwy8a9z"))
(modules '((guix build utils))) (modules '((guix build utils)))
(patches (search-patches "ploticus-pointer-types.patch"))
(snippet (snippet
;; Install binaries in the right place. ;; Install binaries in the right place.
#~(begin #~(begin