Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jan 2018 12:52:22 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r457851 - head/math/qtiplot/files
Message-ID:  <201801021252.w02CqMJg048026@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Tue Jan  2 12:52:21 2018
New Revision: 457851
URL: https://svnweb.freebsd.org/changeset/ports/457851

Log:
  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

Added:
  head/math/qtiplot/files/patch-sip-4.19.6   (contents, props changed)

Added: head/math/qtiplot/files/patch-sip-4.19.6
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/qtiplot/files/patch-sip-4.19.6	Tue Jan  2 12:52:21 2018	(r457851)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801021252.w02CqMJg048026>