1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

Add a patch to fix the build with newer versions of SIP.

We're currently testing an update to SIP 4.19.6, but it breaks qtiplot's build.

This patch, obtained via Debian and Gentoo, allows the port to build with both
SIP 4.19.2 (currently in the tree) as well as 4.19.6.

In the future, we might look into disabling Python scripting support: it tends
to break with almost every SIP update, and upstream has stopped releasing the
source code for newer qtiplot releases.

PR:		224739
Obtained from:	https://anonscm.debian.org/git/debian-science/packages/qtiplot.git/tree/debian/patches/20_fix_FTBFS_sip4.19.patch
Obtained from:	https://bugs.gentoo.org/641514#c2
This commit is contained in:
Raphael Kubo da Costa 2018-01-02 12:52:21 +00:00
parent 19729fb492
commit b5b351761b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=457851

View File

@ -0,0 +1,48 @@
The patch name is an approximation; something changed between SIP 4.19.2 and
SIP 4.19.6 that causes the build to fail and sipAPI.qti.h is no longer
generated.
Obtained from: https://anonscm.debian.org/git/debian-science/packages/qtiplot.git/tree/debian/patches/20_fix_FTBFS_sip4.19.patch
Obtained from: https://bugs.gentoo.org/641514#c2
--- qtiplot/src/scripting/PythonScripting.cpp.orig 2018-01-02 11:37:07 UTC
+++ qtiplot/src/scripting/PythonScripting.cpp
@@ -58,7 +58,7 @@ typedef struct _traceback {
#include <QMessageBox>
// includes sip.h, which undefines Qt's "slots" macro since SIP 4.6
-#include "sipAPIqti.h"
+#include "sip.h"
extern "C" void initqti();
const char* PythonScripting::langName = "Python";
@@ -359,10 +359,11 @@ bool PythonScripting::setQObject(QObject *val, const c
if(!val) return false;
PyObject *pyobj=NULL;
- PyGILState_STATE state = PyGILState_Ensure();
+ sipAPIDef sip_API;
- sipWrapperType * klass = sipFindClass(val->className());
- if (klass) pyobj = sipConvertFromInstance(val, klass, NULL);
+ PyGILState_STATE state = PyGILState_Ensure();
+ const auto klass = sip_API.api_find_class(val->className());
+ if (klass) pyobj = sip_API.api_convert_from_type(val, klass->wt_td, NULL);
if (pyobj) {
if (dict)
--- qtiplot/src/scripting/qti.sip.orig 2018-01-02 11:37:07 UTC
+++ qtiplot/src/scripting/qti.sip
@@ -3243,11 +3243,11 @@ class FFT : Filter (public)
%MethodCode
SIPQTI_APP(new sipFFT(app, a0, *a1, a2, a3))
%End
- FFT(QwtPlotCurve *&) /NoDerived/;
+ FFT(QwtPlotCurve *) /NoDerived/;
%MethodCode
SIPQTI_APP(new sipFFT(app, a0))
%End
- FFT(QwtPlotCurve *&, double, double) /NoDerived/;
+ FFT(QwtPlotCurve *, double, double) /NoDerived/;
%MethodCode
SIPQTI_APP(new sipFFT(app, a0, a1, a2))
%End