[packages/plplot] - rel 23, build fixes from fedora

baggins baggins at pld-linux.org
Sat Oct 18 23:14:41 CEST 2025


commit 9ec1c86b0bf08ba7ad3b041ec8877fcadd7867b3
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Oct 19 01:14:24 2025 +0200

    - rel 23, build fixes from fedora

 plplot.spec    |   6 +++-
 signal.patch   |  17 +++++++++
 swig-4.3.patch | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 128 insertions(+), 1 deletion(-)
---
diff --git a/plplot.spec b/plplot.spec
index 402950e..7ac6ead 100644
--- a/plplot.spec
+++ b/plplot.spec
@@ -38,7 +38,7 @@ Summary:	PLplot - a library of functions that are useful for making scientific p
 Summary(pl.UTF-8):	PLplot - biblioteka funkcji przydatnych do tworzenia wykresów naukowych
 Name:		plplot
 Version:	5.15.0
-Release:	22
+Release:	23
 License:	LGPL v2+
 Group:		Libraries
 Source0:	https://downloads.sourceforge.net/plplot/%{name}-%{version}.tar.gz
@@ -49,6 +49,8 @@ Patch2:		%{name}-d.patch
 Patch3:		qt-5.15.patch
 Patch4:		%{name}-sip-build-support.patch
 Patch5:		python3.13.patch
+Patch6:		swig-4.3.patch
+Patch7:		signal.patch
 URL:		http://plplot.sourceforge.net/
 BuildRequires:	Qt5Gui-devel >= 5
 BuildRequires:	Qt5PrintSupport-devel >= 5
@@ -646,6 +648,8 @@ Biblioteka PLplot - przykłady do wiązania dla Pythona.
 %patch -P3 -p1
 %patch -P4 -p1
 %patch -P5 -p1
+%patch -P6 -p1
+%patch -P7 -p1
 
 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python3}\1,' \
 		-e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python3}\1,' \
diff --git a/signal.patch b/signal.patch
new file mode 100644
index 0000000..1f5c017
--- /dev/null
+++ b/signal.patch
@@ -0,0 +1,17 @@
+diff --git a/cmake/modules/TestSignalType.c b/cmake/modules/TestSignalType.c
+index aca0bf4ed..36f485312 100644
+--- a/cmake/modules/TestSignalType.c
++++ b/cmake/modules/TestSignalType.c
+@@ -4,10 +4,9 @@
+ # undef signal
+ #endif
+ #ifdef __cplusplus
+-extern "C" void (*signal (int, void (*)(int)))(int);
+-#else
+-void (*signal ()) ();
++extern "C"
+ #endif
++void (*signal (int, void (*)(int)))(int);
+ 
+ int
+ main ()
diff --git a/swig-4.3.patch b/swig-4.3.patch
new file mode 100644
index 0000000..4f3f7c8
--- /dev/null
+++ b/swig-4.3.patch
@@ -0,0 +1,106 @@
+diff -Naur plplot-5.15.0-original/bindings/java/plplotjavac.i plplot-5.15.0/bindings/java/plplotjavac.i
+--- plplot-5.15.0-original/bindings/java/plplotjavac.i	2024-10-08 20:04:53.157286783 +0100
++++ plplot-5.15.0/bindings/java/plplotjavac.i	2024-10-08 20:41:43.220215246 +0100
+@@ -2128,9 +2128,9 @@
+ %typemap( argout ) PLGraphicsIn * gin {
+     PyObject *o;
+     o         = PyFloat_FromDouble( $1->wX );
+-    resultobj = t_output_helper( resultobj, o );
++    resultobj = SWIG_AppendOutput( resultobj, o );
+     o         = PyFloat_FromDouble( $1->wY );
+-    resultobj = t_output_helper( resultobj, o );
++    resultobj = SWIG_AppendOutput( resultobj, o );
+ }
+ #endif
+ 
+diff -Naur plplot-5.15.0-original/bindings/octave/plplot_octave.i plplot-5.15.0/bindings/octave/plplot_octave.i
+--- plplot-5.15.0-original/bindings/octave/plplot_octave.i	2024-10-08 20:04:53.149286728 +0100
++++ plplot-5.15.0/bindings/octave/plplot_octave.i	2024-10-08 20:08:31.766682937 +0100
+@@ -770,7 +770,7 @@
+ }
+ %typemap ( argout ) ( const PLFLT * ArrayY, PLINT ny, PLFLT * OutMatrixCk )
+ {
+-    $result = SWIG_Octave_AppendOutput( $result, retval$argnum( 0 ) );
++    $result = SWIG_AppendOutput( $result, retval$argnum( 0 ) );
+ }
+ %typemap ( freearg ) ( const PLFLT * ArrayY, PLINT ny, PLFLT * OutMatrixCk )
+ {
+@@ -796,7 +796,7 @@
+     local_charMatrix    = charMatrix( 1, local_string_length );
+     local_charMatrix.insert( local_string$argnum, 0, 0 );
+     retval( 0 ) = octave_value( local_charMatrix );
+-    $result     = SWIG_Octave_AppendOutput( $result, retval( 0 ) );
++    $result     = SWIG_AppendOutput( $result, retval( 0 ) );
+ }
+ 
+ typedef PLINT ( *defined_func )( PLFLT, PLFLT );
+diff -Naur plplot-5.15.0-original/bindings/python/fragments.i plplot-5.15.0/bindings/python/fragments.i
+--- plplot-5.15.0-original/bindings/python/fragments.i	2024-10-08 20:04:53.161286811 +0100
++++ plplot-5.15.0/bindings/python/fragments.i	2024-10-08 20:41:07.703954787 +0100
+@@ -1,29 +1,2 @@
+ /* Helper function to return tuples */
+-
+-%fragment("t_output_helper","header") %{
+-  static PyObject* t_output_helper(PyObject* target, PyObject* o) {
+-    PyObject*   o2;
+-    PyObject*   o3;
+-
+-    if (!target) {
+-        target = o;
+-    } else if (target == Py_None) {
+-        Py_DECREF(Py_None);
+-        target = o;
+-    } else {
+-        if (!PyTuple_Check(target)) {
+-	   o2 = target;
+-	   target = PyTuple_New(1);
+-	   PyTuple_SetItem(target, 0, o2);
+-	}
+-        o3 = PyTuple_New(1);
+-        PyTuple_SetItem(o3, 0, o);
+-
+-        o2 = target;
+-        target = PySequence_Concat(o2, o3);
+-        Py_DECREF(o2);
+-        Py_DECREF(o3);
+-    }
+-    return target;
+-}
+-%}
++/* Legacy - file can be deleted */
+diff -Naur plplot-5.15.0-original/bindings/python/plplotc.i plplot-5.15.0/bindings/python/plplotc.i
+--- plplot-5.15.0-original/bindings/python/plplotc.i	2024-10-08 20:04:53.161286811 +0100
++++ plplot-5.15.0/bindings/python/plplotc.i	2024-10-08 20:41:10.963978913 +0100
+@@ -682,7 +682,7 @@
+ }
+ %typemap ( argout ) ( const PLFLT * ArrayY, PLINT ny, PLFLT **OutMatrixCk )
+ {
+-    $result = SWIG_Python_AppendOutput( $result, array$argnum );
++    $result = SWIG_AppendOutput( $result, array$argnum );
+ }
+ 
+ //**************************
+@@ -749,9 +749,9 @@
+ {
+     $1 = buff;
+ }
+-%typemap( argout, fragment = "t_output_helper" ) char *OUTPUT {
++%typemap( argout ) char *OUTPUT {
+     PyObject *o = PyString_FromString( $1 );
+-    $result = t_output_helper( $result, o );
++    $result = SWIG_AppendOutput( $result, o );
+ }
+ 
+ //**************************
+@@ -1662,9 +1662,9 @@
+ %typemap( argout ) PLGraphicsIn * gin {
+     PyObject *o;
+     o         = PyFloat_FromDouble( $1->wX );
+-    resultobj = t_output_helper( resultobj, o );
++    resultobj = SWIG_AppendOutput( resultobj, o );
+     o         = PyFloat_FromDouble( $1->wY );
+-    resultobj = t_output_helper( resultobj, o );
++    resultobj = SWIG_AppendOutput( resultobj, o );
+ }
+ #endif
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/plplot.git/commitdiff/9ec1c86b0bf08ba7ad3b041ec8877fcadd7867b3



More information about the pld-cvs-commit mailing list