[packages/perl-Graphics-PLplot] explicitly cast some arguments to pass compilation with gcc 14

atler atler at pld-linux.org
Mon Jul 28 17:10:16 CEST 2025


commit 4b6d1ccdcea6e408c619711a398a09553dd1d73e
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jul 28 17:07:55 2025 +0200

    explicitly cast some arguments to pass compilation with gcc 14
    
    plplot types are designed in a way that I think it's impossible to solve
    it without casting

 perl-Graphics-PLplot.spec |  2 ++
 types.patch               | 58 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)
---
diff --git a/perl-Graphics-PLplot.spec b/perl-Graphics-PLplot.spec
index 4875952..bd2eb0f 100644
--- a/perl-Graphics-PLplot.spec
+++ b/perl-Graphics-PLplot.spec
@@ -14,6 +14,7 @@ Group:		Development/Languages/Perl
 Source0:	https://www.cpan.org/modules/by-module/Graphics/%{pdir}-%{pnam}-%{version}.tar.gz
 # Source0-md5:	95a1cfeef5522f963357b1a757e9ba08
 Patch0:		fix-plplot-call.patch
+Patch1:		types.patch
 URL:		https://metacpan.org/dist/Graphics-PLplot
 BuildRequires:	perl-devel >= 1:5.8.0
 BuildRequires:	plplot-devel
@@ -37,6 +38,7 @@ podobny do interfejsu C.
 %prep
 %setup -q -n %{pdir}-%{pnam}-%{version}
 %patch -P0 -p1
+%patch -P1 -p1
 
 %build
 %{__perl} Makefile.PL \
diff --git a/types.patch b/types.patch
new file mode 100644
index 0000000..9965eaa
--- /dev/null
+++ b/types.patch
@@ -0,0 +1,58 @@
+--- Graphics-PLplot-0.03/PLplot.xs.orig	2025-07-28 16:25:33.050341590 +0200
++++ Graphics-PLplot-0.03/PLplot.xs	2025-07-28 17:05:44.778260312 +0200
+@@ -588,7 +588,7 @@
+       k++;
+     }
+   }
+-  plimage( data, nx_pdata, ny_pdata, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax);
++  plimage( (PLFLT_MATRIX) data, nx_pdata, ny_pdata, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax);
+   plFree2dGrid(data,nx_pdata,ny_pdata);
+ 
+ 
+@@ -939,7 +939,7 @@
+   char * laby
+   char * labtop
+  CODE:
+-   c_plstripc( &RETVAL, xspec, yspec, xmin, xmax, xjump, ymin, ymax, xlpos, ylpos, (PLINT)y_ascl, (PLINT)acc, colbox, collab, colline, styline, legline, labx, laby, labtop);
++   c_plstripc( &RETVAL, xspec, yspec, xmin, xmax, xjump, ymin, ymax, xlpos, ylpos, (PLINT)y_ascl, (PLINT)acc, colbox, collab, colline, styline, (PLCHAR_MATRIX) legline, labx, laby, labtop);
+  OUTPUT:
+   RETVAL
+ 
+@@ -999,7 +999,7 @@
+       k++;
+     }
+   }
+-  plsurf3d(x,y,zdata,nx_z,ny_z,opt,clevel, ix_clevel);
++  plsurf3d(x,y,(PLFLT_MATRIX)zdata,nx_z,ny_z,opt,clevel, ix_clevel);
+ 
+ 
+ 
+@@ -1089,8 +1089,8 @@
+   PLFLT az
+ 
+ void
+-c_plwid( width )
+-  PLINT width
++c_plwidth( width )
++  PLFLT width
+ 
+ void
+ c_plwind( xmin, xmax, ymin, ymax )
+@@ -1122,7 +1122,7 @@
+   /* Guess at largest number of drivers !! */
+   menustr = get_mortalspace( 1024, 'v');
+   devname = get_mortalspace( 1024, 'v');
+-  plgFileDevs(&menustr, &devname, &ndev);
++  plgFileDevs((PLCHAR_VECTOR **)&menustr, (PLCHAR_VECTOR **)&devname, &ndev);
+   XPUSHs( newRV_noinc( (SV*)unpack1Dchar( menustr, ndev) ));
+   XPUSHs( newRV_noinc( (SV*)unpack1Dchar( devname, ndev) ));
+ 
+@@ -1136,7 +1136,7 @@
+   /* Guess at largest number of drivers !! */
+   menustr = get_mortalspace( 1024, 'v');
+   devname = get_mortalspace( 1024, 'v');
+-  plgDevs(&menustr, &devname, &ndev);
++  plgDevs((PLCHAR_VECTOR **)&menustr, (PLCHAR_VECTOR **)&devname, &ndev);
+   XPUSHs( newRV_noinc( (SV*)unpack1Dchar( menustr, ndev) ));
+   XPUSHs( newRV_noinc( (SV*)unpack1Dchar( devname, ndev) ));
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Graphics-PLplot.git/commitdiff/4b6d1ccdcea6e408c619711a398a09553dd1d73e



More information about the pld-cvs-commit mailing list