math/qtiplot:

- Add patches to fix build with clang6
- Remove DEBUG option and related bits: USES=qmake does the job nowadays
This commit is contained in:
Max Brazhnikov 2018-05-14 21:55:09 +00:00
parent 73380a9647
commit 97ce7e9e79
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=469977
7 changed files with 106 additions and 14 deletions

View File

@ -28,7 +28,7 @@ DESKTOP_ENTRIES="QtiPlot" "Data analysis and plotting" \
"${PREFIX}/share/pixmaps/qtiplot.png" \
"qtiplot" "" true
OPTIONS_DEFINE= DOCS PYTHON NLS DEBUG
OPTIONS_DEFINE= DOCS PYTHON NLS
OPTIONS_DEFAULT= PYTHON
OPTIONS_SUB= yes
@ -56,17 +56,21 @@ post-patch:
${WRKSRC}/fitPlugins/*/*.pro
${REINPLACE_CMD} -e '/^system($$$$LUPDATE/d; /^system($$$$LRELEASE/d' \
${WRKSRC}/${PORTNAME}/qtiplot.pro
# fix build with clang6
${REINPLACE_CMD} \
-e '/new[[:space:]]*QComboBox/s,false,,g' \
-e '/new[[:space:]]*PatternBox/s,false,,g' \
${WRKSRC}/qtiplot/src/matrix/MatrixValuesDialog.cpp \
${WRKSRC}/qtiplot/src/plot2D/dialogs/LayerDialog.cpp \
${WRKSRC}/qtiplot/src/plot2D/dialogs/PlotDialog.cpp \
${WRKSRC}/qtiplot/src/table/SetColValuesDialog.cpp \
${WRKSRC}/qtiplot/src/table/TableDialog.cpp
post-patch-PYTHON-off:
${REINPLACE_CMD} -e \
"s/SCRIPTING_LANGS.*Python//" \
${WRKSRC}/build.conf
post-patch-DEBUG-on:
${REINPLACE_CMD} -e \
"/^CONFIG.*release/s|release|debug|" \
${WRKSRC}/build.conf
post-patch-NLS-off:
${REINPLACE_CMD} -e \
"/INSTALLS.*translations/d" \

View File

@ -25,6 +25,4 @@ contains( TARGET, qtiplot ) {
SCRIPTING_LANGS += Python
DEFINES += SCRIPTING_CONSOLE
CONFIG += CustomInstall
CONFIG += release
}

View File

@ -0,0 +1,11 @@
--- 3rdparty/qwtplot3d/src/qwt3d_lighting.cpp.orig 2011-08-24 10:25:10 UTC
+++ 3rdparty/qwtplot3d/src/qwt3d_lighting.cpp
@@ -175,7 +175,7 @@ void ExtGLWidget::applyLight(unsigned li
glRotatef( lights_[light].rot.x-90, 1.0, 0.0, 0.0 );
glRotatef( lights_[light].rot.y , 0.0, 1.0, 0.0 );
glRotatef( lights_[light].rot.z , 0.0, 0.0, 1.0 );
- GLfloat lightPos[4] = { lights_[light].shift.x, lights_[light].shift.y, lights_[light].shift.z, 1.0};
+ GLfloat lightPos[4] = { static_cast<GLfloat>(lights_[light].shift.x), static_cast<GLfloat>(lights_[light].shift.y), static_cast<GLfloat>(lights_[light].shift.z), 1.0};
GLenum le = lightEnum(light);
glLightfv(le, GL_POSITION, lightPos);
}

View File

@ -1,6 +1,6 @@
--- ./qtiplot/src/analysis/dialogs/FitDialog.cpp.orig 2009-10-18 10:44:45.000000000 +0400
+++ ./qtiplot/src/analysis/dialogs/FitDialog.cpp 2009-10-18 18:54:12.000000000 +0400
@@ -119,7 +119,7 @@
--- qtiplot/src/analysis/dialogs/FitDialog.cpp.orig 2011-10-17 10:38:07 UTC
+++ qtiplot/src/analysis/dialogs/FitDialog.cpp
@@ -101,7 +101,7 @@ FitDialog::FitDialog(Graph *g, QWidget*
ApplicationWindow *app = (ApplicationWindow *)parent;
QString pluginsPath = app->fitPluginsPath;
QFileInfo fi(pluginsPath);
@ -9,3 +9,36 @@
choosePluginsFolder();
else
loadPlugins();
@@ -1019,11 +1019,7 @@ void FitDialog::showFitPage()
int prec = boxPrecision->value();
for (int i = 0; i<parameters; i++){
QTableWidgetItem *it = new QTableWidgetItem(paramList[i]);
-#ifdef Q_CC_MSVC
it->setFlags(it->flags() & (~Qt::ItemIsEditable));
-#else
- it->setFlags(!Qt::ItemIsEditable);
-#endif
it->setBackground(QBrush(Qt::lightGray));
it->setForeground(Qt::black);
QFont font = it->font();
@@ -1049,7 +1045,7 @@ void FitDialog::showFitPage()
boxParams->setCellWidget(i, 2, sb);
it = new QTableWidgetItem();
- it->setFlags(!Qt::ItemIsEditable);
+ it->setFlags(it->flags() & (~Qt::ItemIsEditable));
it->setText("--");
boxParams->setItem(i, 5, it);
}
@@ -1061,11 +1057,7 @@ void FitDialog::showFitPage()
boxParams->showColumn(4);
for (int i = 0; i<boxParams->rowCount(); i++ ){
QTableWidgetItem *it = new QTableWidgetItem();
-#ifdef Q_CC_MSVC
it->setFlags(it->flags() & (~Qt::ItemIsEditable));
-#else
- it->setFlags(!Qt::ItemIsEditable);
-#endif
it->setBackground(QBrush(Qt::lightGray));
boxParams->setItem(i, 4, it);

View File

@ -1,6 +1,15 @@
--- ./qtiplot/src/scripting/qti.sip.orig 2011-02-08 15:33:02.000000000 +0300
+++ ./qtiplot/src/scripting/qti.sip 2011-03-19 00:06:07.578146696 +0300
@@ -3390,57 +3390,6 @@
--- qtiplot/src/scripting/qti.sip.orig 2018-05-11 22:48:48 UTC
+++ qtiplot/src/scripting/qti.sip
@@ -370,7 +370,7 @@ public:
if (sipCpp->text(row, col) != "")
sipRes = sipCpp->cell(row, col);
else {
- sipRes = NULL;
+ sipRes = 0;
PyErr_SetString(PyExc_ValueError, "Empty table cell");
}
}
@@ -3433,57 +3433,6 @@ public:
double pValue();
};

View File

@ -0,0 +1,11 @@
--- qtiplot/src/core/ConfigDialog.cpp.orig 2011-10-25 09:50:22 UTC
+++ qtiplot/src/core/ConfigDialog.cpp
@@ -1390,7 +1390,7 @@ void ConfigDialog::setColorsList(const Q
colorsList->setRowCount(colors);
for (int i = 0; i < colors; i++){
QTableWidgetItem *it = new QTableWidgetItem();
- it->setFlags(!Qt::ItemIsEditable);
+ it->setFlags(it->flags() & (~Qt::ItemIsEditable));
it->setBackground(QBrush(colList[i]));
colorsList->setItem(i, 0, it);

View File

@ -0,0 +1,26 @@
--- qtiplot/src/lib/src/ColorMapEditor.cpp.orig 2011-07-02 07:23:52 UTC
+++ qtiplot/src/lib/src/ColorMapEditor.cpp
@@ -155,11 +155,7 @@ void ColorMapEditor::setColorMap(const L
QColor c = color_map.color(i);
QTableWidgetItem *it = new QTableWidgetItem(c.name());
- #ifdef Q_CC_MSVC
it->setFlags(it->flags() & (~Qt::ItemIsEditable));
- #else
- it->setFlags(!Qt::ItemIsEditable);
- #endif
it->setBackground(QBrush(c));
it->setForeground(QBrush(c));
table->setItem(i, 1, it);
@@ -246,11 +242,7 @@ void ColorMapEditor::insertLevel()
table->setCellWidget(row, 0, sb);
QTableWidgetItem *it = new QTableWidgetItem(c.name());
-#ifdef Q_CC_MSVC
it->setFlags(it->flags() & (~Qt::ItemIsEditable));
-#else
- it->setFlags(!Qt::ItemIsEditable);
-#endif
it->setBackground(QBrush(c));
it->setForeground(QBrush(c));
table->setItem(row, 1, it);