aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2018-01-02 20:52:21 +0800
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2018-01-02 20:52:21 +0800
commitb5b351761b4376f63b55eeee1114f19ef0646b62 (patch)
tree3ebf87d3d176d932d7f10267a134246b3d14e429 /math
parent19729fb492c8b3f9efb826fafdc8b763c8662a51 (diff)
downloadfreebsd-ports-gnome-b5b351761b4376f63b55eeee1114f19ef0646b62.tar.gz
freebsd-ports-gnome-b5b351761b4376f63b55eeee1114f19ef0646b62.tar.zst
freebsd-ports-gnome-b5b351761b4376f63b55eeee1114f19ef0646b62.zip
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
Diffstat (limited to 'math')
-rw-r--r--math/qtiplot/files/patch-sip-4.19.648
1 files changed, 48 insertions, 0 deletions
diff --git a/math/qtiplot/files/patch-sip-4.19.6 b/math/qtiplot/files/patch-sip-4.19.6
new file mode 100644
index 000000000000..774fb89ced43
--- /dev/null
+++ b/math/qtiplot/files/patch-sip-4.19.6
@@ -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