svn commit: r466565 - in head/math/qtiplot: . files

Max Brazhnikov makc at FreeBSD.org
Thu Apr 5 14:26:35 UTC 2018


Author: makc
Date: Thu Apr  5 14:26:33 2018
New Revision: 466565
URL: https://svnweb.freebsd.org/changeset/ports/466565

Log:
  math/qtiplot:
  - Add patch from Debian to fix issue with muparser scripting
  - Fix runtime problem with Python scripting support
  - Bump PORTREVISION
  - Take maintainership

Added:
  head/math/qtiplot/files/patch-qtiplot_qtiplotrc.py   (contents, props changed)
  head/math/qtiplot/files/patch-qtiplot_src_table_Table.cpp   (contents, props changed)
Modified:
  head/math/qtiplot/Makefile
  head/math/qtiplot/files/patch-sip-4.19.6

Modified: head/math/qtiplot/Makefile
==============================================================================
--- head/math/qtiplot/Makefile	Thu Apr  5 14:25:18 2018	(r466564)
+++ head/math/qtiplot/Makefile	Thu Apr  5 14:26:33 2018	(r466565)
@@ -3,11 +3,11 @@
 
 PORTNAME=	qtiplot
 DISTVERSION=	0.9.8.9
-PORTREVISION=	13
+PORTREVISION=	14
 CATEGORIES=	math science
 MASTER_SITES=	BERLIOS http://soft.proindependent.com/src/
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	makc at FreeBSD.org
 COMMENT=	Data analysis and scientific plotting
 
 LIB_DEPENDS=	libgsl.so:math/gsl \
@@ -56,11 +56,6 @@ post-patch:
 		${WRKSRC}/fitPlugins/*/*.pro
 	${REINPLACE_CMD} -e '/^system($$$$LUPDATE/d; /^system($$$$LRELEASE/d' \
 		${WRKSRC}/${PORTNAME}/qtiplot.pro
-
-post-patch-PYTHON-on:
-	${REINPLACE_CMD} -e \
-		'/^sys.path.append/s|"\."|"${DATADIR}"|' \
-		${WRKSRC}/${PORTNAME}/qtiplotrc.py
 
 post-patch-PYTHON-off:
 	${REINPLACE_CMD} -e \

Added: head/math/qtiplot/files/patch-qtiplot_qtiplotrc.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/qtiplot/files/patch-qtiplot_qtiplotrc.py	Thu Apr  5 14:26:33 2018	(r466565)
@@ -0,0 +1,14 @@
+--- qtiplot/qtiplotrc.py.orig	2011-07-06 06:37:50 UTC
++++ qtiplot/qtiplotrc.py
+@@ -37,7 +37,10 @@ def import_to_global(modname, attrs=None
+ 	"""
+ 	import sys
+ 	import os
+-	sys.path.append(os.path.dirname(__file__))
++	try:
++		sys.path.append(os.path.dirname(__file__))
++	except:
++		pass
+ 	mod = __import__(modname)
+ 	for submod in modname.split(".")[1:]:
+ 		mod = getattr(mod, submod)

Added: head/math/qtiplot/files/patch-qtiplot_src_table_Table.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/qtiplot/files/patch-qtiplot_src_table_Table.cpp	Thu Apr  5 14:26:33 2018	(r466565)
@@ -0,0 +1,18 @@
+Description: if you don't initialize the "i" variable, or initialize it to 0.0
+ qtiplot won't let you set the column values using muparser.
+Author: Scott Howard <showard at debian.org>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707736
+
+Index: qtiplot/qtiplot/src/table/Table.cpp
+===================================================================
+--- qtiplot/src/table/Table.cpp.orig	2011-09-13 11:20:29 UTC
++++ qtiplot/src/table/Table.cpp
+@@ -564,7 +564,7 @@ bool Table::muParserCalculate(int col, i
+ 	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ 
+     muParserScript *mup = new muParserScript(scriptEnv, cmd, this,  QString("<%1>").arg(colName(col)));
+-    double *r = mup->defineVariable("i");
++    double *r = mup->defineVariable("i",startRow + 1.0);
+     mup->defineVariable("j", (double)col);
+     mup->defineVariable("sr", startRow + 1.0);
+     mup->defineVariable("er", endRow + 1.0);

Modified: head/math/qtiplot/files/patch-sip-4.19.6
==============================================================================
--- head/math/qtiplot/files/patch-sip-4.19.6	Thu Apr  5 14:25:18 2018	(r466564)
+++ head/math/qtiplot/files/patch-sip-4.19.6	Thu Apr  5 14:26:33 2018	(r466565)
@@ -1,35 +1,4 @@
-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)


More information about the svn-ports-head mailing list