summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kohnert2024-12-23 15:49:16 +0100
committerJan Kohnert2024-12-23 15:49:16 +0100
commit1fc31112fc6f2e3278df48ccc25ed008b709ee9b (patch)
tree986b24970650af77f4b12236657a0bf6d831d115
parent36e3fdecd39295a3c302b5a545a80ace0e29ce64 (diff)
downloadaur-plplot.tar.gz
Resolve "Fix incompitibility for new SWIG versions"
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD5
-rw-r--r--plplot-swig.patch98
4 files changed, 107 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f6818675c217..5e3c2f959f2c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = plplot
pkgdesc = A cross-platform software package for creating scientific plots
pkgver = 5.15.0
- pkgrel = 10
+ pkgrel = 11
url = http://plplot.sourceforge.net/
arch = i686
arch = x86_64
@@ -36,7 +36,9 @@ pkgbase = plplot
options = !libtool
source = http://downloads.sourceforge.net/sourceforge/plplot/plplot-5.15.0.tar.gz
source = plplot-numpy.patch
+ source = plplot-swig.patch
sha512sums = 54533245569b724a7ef90392cc6e9ae65873e6cbab923df0f841c8b43def5e4307690894c7681802209bd3c8df97f54285310a706428f79b3340cce3207087c8
sha512sums = f0ceba3f20f4dbccaf35a915e5b90718a61474f5e39dc8af69e735a77a2f2d6925fbb8e67c98a0db63a58f34ceac429550f89ae590ded31afa9cf353e1c486b6
+ sha512sums = d5be4e4a32481f27ef5c867435ae59297550b15f6db158f96bf97d948a59e041b87a29fed8e18386debaddc9f2a5648c0cef861a1be5f754a31ae60d657ee3d8
pkgname = plplot
diff --git a/.gitignore b/.gitignore
index 346b6fb2d435..3d81ad2890b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@
!.gitlab-ci.yml
!PKGBUILD
!.SRCINFO
-!plplot-numpy.patch \ No newline at end of file
+!plplot-numpy.patch
+!plplot-swig.patch
diff --git a/PKGBUILD b/PKGBUILD
index 056b93be66da..fc36ce155e3f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
# Contributor: Eric Belanger <eric@archlinux.org>
pkgname=plplot
pkgver=5.15.0
-pkgrel=10
+pkgrel=11
pkgdesc="A cross-platform software package for creating scientific plots"
arch=("i686" "x86_64")
url="http://plplot.sourceforge.net/"
@@ -47,15 +47,18 @@ options=("!libtool")
source=(
"http://downloads.sourceforge.net/sourceforge/plplot/${pkgname}-${pkgver}.tar.gz"
"plplot-numpy.patch"
+ "plplot-swig.patch"
)
sha512sums=(
"54533245569b724a7ef90392cc6e9ae65873e6cbab923df0f841c8b43def5e4307690894c7681802209bd3c8df97f54285310a706428f79b3340cce3207087c8"
"f0ceba3f20f4dbccaf35a915e5b90718a61474f5e39dc8af69e735a77a2f2d6925fbb8e67c98a0db63a58f34ceac429550f89ae590ded31afa9cf353e1c486b6"
+ "d5be4e4a32481f27ef5c867435ae59297550b15f6db158f96bf97d948a59e041b87a29fed8e18386debaddc9f2a5648c0cef861a1be5f754a31ae60d657ee3d8"
)
prepare() {
cd "$pkgname-$pkgver"
patch -N -p 1 -i "${srcdir}/plplot-numpy.patch"
+ patch -N -p 1 -i "${srcdir}/plplot-swig.patch"
}
build() {
diff --git a/plplot-swig.patch b/plplot-swig.patch
new file mode 100644
index 000000000000..7ffe7ac70ab0
--- /dev/null
+++ b/plplot-swig.patch
@@ -0,0 +1,98 @@
+diff --git a/bindings/java/plplotjavac.i b/bindings/java/plplotjavac.i
+index fe87d8fa4..18f4c4cba 100644
+--- a/bindings/java/plplotjavac.i
++++ b/bindings/java/plplotjavac.i
+@@ -2132,9 +2132,9 @@ PLBOOL_OUTPUT_TYPEMAP( PLBOOL, jboolean, boolean, Boolean, "[Ljava/lang/Boolean;
+ %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 --git a/bindings/python/plplotc.i b/bindings/python/plplotc.i
+index b228f2023..3618a4f21 100644
+--- a/bindings/python/plplotc.i
++++ b/bindings/python/plplotc.i
+@@ -686,7 +686,7 @@ typedef PLINT PLBOOL;
+ }
+ %typemap( argout ) ( const PLFLT * ArrayY, PLINT ny, PLFLT **OutMatrixCk )
+ {
+- $result = SWIG_Python_AppendOutput( $result, array$argnum );
++ $result = SWIG_Python_AppendOutput( $result, array$argnum, 1 );
+ }
+
+ //**************************
+@@ -753,9 +753,9 @@ typedef PLINT PLBOOL;
+ {
+ $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 );
+ }
+
+ //**************************
+@@ -1039,7 +1039,7 @@ typedef void ( *label_func )( PLINT, PLFLT, char *, PLINT, PLPointer );
+ return;
+ }
+ // call the python function
+- result = PyEval_CallObject( python_pltr, arglist );
++ result = PyObject_CallObject( python_pltr, arglist );
+ // release the argument list
+ Py_CLEAR( arglist );
+ // check and unpack the result
+@@ -1088,7 +1088,7 @@ typedef void ( *label_func )( PLINT, PLFLT, char *, PLINT, PLPointer );
+ // build the argument list
+ arglist = Py_BuildValue( "(iiO)", x, y, pdata );
+ // call the python function
+- result = PyEval_CallObject( python_f2eval, arglist );
++ result = PyObject_CallObject( python_f2eval, arglist );
+ // release the argument list
+ Py_CLEAR( arglist );
+ // check and unpack the result
+@@ -1132,7 +1132,7 @@ typedef void ( *label_func )( PLINT, PLFLT, char *, PLINT, PLPointer );
+ arglist = Py_BuildValue( "(lfO)", axis, value, pdata );
+ #endif
+ // call the python function
+- result = PyEval_CallObject( python_label, arglist );
++ result = PyObject_CallObject( python_label, arglist );
+ // release the argument list
+ //Py_CLEAR(arglist);
+ // check and unpack the result
+@@ -1189,7 +1189,7 @@ typedef void ( *label_func )( PLINT, PLFLT, char *, PLINT, PLPointer );
+ py = PyArray_SimpleNewFromData( 1, &n, NPY_PLFLT, (void *) yt );
+ arglist = Py_BuildValue( "(ddOOO)", x, y, px, py, pdata );
+ // call the python function
+- result = PyEval_CallObject( python_ct, arglist );
++ result = PyObject_CallObject( python_ct, arglist );
+ // release the argument list
+ Py_CLEAR( arglist );
+ Py_CLEAR( px );
+@@ -1230,7 +1230,7 @@ typedef void ( *label_func )( PLINT, PLFLT, char *, PLINT, PLPointer );
+ #endif
+ arglist = Py_BuildValue( "(iOO)", n, px, py );
+ // call the python function
+- result = PyEval_CallObject( python_mapform, arglist );
++ result = PyObject_CallObject( python_mapform, arglist );
+ // release the argument list
+ Py_CLEAR( arglist );
+ Py_CLEAR( px );
+@@ -1666,9 +1666,9 @@ typedef void ( *label_func )( PLINT, PLFLT, char *, PLINT, PLPointer );
+ %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
+