git: 557980aaf022 - main - science/scidavis: fix build with liborigin 3.0.2

From: Max Brazhnikov <makc_at_FreeBSD.org>
Date: Sat, 04 Nov 2023 19:43:17 UTC
The branch main has been updated by makc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=557980aaf022deb0ade0e56383a76bdc452d04be

commit 557980aaf022deb0ade0e56383a76bdc452d04be
Author:     Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2023-11-04 19:41:19 +0000
Commit:     Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2023-11-04 19:41:50 +0000

    science/scidavis: fix build with liborigin 3.0.2
    
    Add patches from upstream.
---
 science/scidavis/Makefile                   |  2 +-
 science/scidavis/files/patch-git_94695c59fb | 17 ++++++
 science/scidavis/files/patch-git_afca5696c4 | 81 +++++++++++++++++++++++++++++
 3 files changed, 99 insertions(+), 1 deletion(-)

diff --git a/science/scidavis/Makefile b/science/scidavis/Makefile
index 22436a17478d..3f63c8977c3a 100644
--- a/science/scidavis/Makefile
+++ b/science/scidavis/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	scidavis
 PORTVERSION=	2.9.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	science
 
 MAINTAINER=	makc@FreeBSD.org
diff --git a/science/scidavis/files/patch-git_94695c59fb b/science/scidavis/files/patch-git_94695c59fb
new file mode 100644
index 000000000000..acfd0d7b0673
--- /dev/null
+++ b/science/scidavis/files/patch-git_94695c59fb
@@ -0,0 +1,17 @@
+From 94695c59fb6e14a3d19edd9382436fe9999a763d Mon Sep 17 00:00:00 2001
+From: Miquel Garriga <gbmiquel@gmail.com>
+Date: Sat, 14 May 2022 10:53:43 +0200
+Subject: [PATCH] Fix bug #427: Color Change in Plot Details
+
+--- libscidavis/src/PlotDialog.cpp
++++ libscidavis/src/PlotDialog.cpp
+@@ -1549,7 +1549,9 @@ void PlotDialog::setActiveCurve(CurveTreeItem *item)
+         style = 6;
+     boxConnect->setCurrentIndex(style);
+ 
++    penWidget->blockSignals(true);
+     penWidget->setPen(c->pen());
++    penWidget->blockSignals(false);
+     fillGroupBox->blockSignals(true);
+     fillGroupBox->setChecked(c->brush().style() != Qt::NoBrush);
+     fillGroupBox->blockSignals(false);
diff --git a/science/scidavis/files/patch-git_afca5696c4 b/science/scidavis/files/patch-git_afca5696c4
new file mode 100644
index 000000000000..401d2e52b07c
--- /dev/null
+++ b/science/scidavis/files/patch-git_afca5696c4
@@ -0,0 +1,81 @@
+From afca5696c4f477dcae4a0484dad2d7314884f020 Mon Sep 17 00:00:00 2001
+From: alxpl <alxpl@users.noreply.github.com>
+Date: Tue, 1 Aug 2023 13:43:09 +0200
+Subject: [PATCH] specify namespace to which functions belong
+
+This should take care of issue [#30](https://github.com/SciDAVis/scidavis/issues/30).
+
+--- libscidavis/src/importOPJ.cpp
++++ libscidavis/src/importOPJ.cpp
+@@ -323,7 +323,7 @@ bool ImportOPJ::importSpreadsheet(const OriginFile &opj, const Origin::SpreadShe
+             }
+         case Origin::Text:
+             table->column(j)->setColumnMode(SciDAVis::ColumnMode::Text);
+-            for (int i = 0; i < min((int)column.data.size(), maxrows); ++i) {
++            for (int i = 0; i < std::min((int)column.data.size(), maxrows); ++i) {
+                 scidavis_column->setTextAt(i, column.data[i].as_string());
+             }
+             break;
+@@ -379,7 +379,7 @@ bool ImportOPJ::importSpreadsheet(const OriginFile &opj, const Origin::SpreadShe
+             default:
+                 format = "dd.MM.yyyy";
+             }
+-            for (int i = 0; i < min((int)column.data.size(), maxrows); ++i)
++            for (int i = 0; i < std::min((int)column.data.size(), maxrows); ++i)
+                 scidavis_column->setValueAt(i, column.data[i].as_double());
+             table->column(j)->setColumnMode(SciDAVis::ColumnMode::DateTime);
+             DateTime2StringFilter *filter =
+@@ -423,7 +423,7 @@ bool ImportOPJ::importSpreadsheet(const OriginFile &opj, const Origin::SpreadShe
+                 format = "hh:mm:ss.zzz";
+                 break;
+             }
+-            for (int i = 0; i < min((int)column.data.size(), maxrows); ++i)
++            for (int i = 0; i < std::min((int)column.data.size(), maxrows); ++i)
+                 scidavis_column->setValueAt(i, column.data[i].as_double());
+             table->column(j)->setColumnMode(SciDAVis::ColumnMode::DateTime);
+             DateTime2StringFilter *filter =
+@@ -443,7 +443,7 @@ bool ImportOPJ::importSpreadsheet(const OriginFile &opj, const Origin::SpreadShe
+                 format = "M";
+                 break;
+             }
+-            for (int i = 0; i < min((int)column.data.size(), maxrows); ++i)
++            for (int i = 0; i < std::min((int)column.data.size(), maxrows); ++i)
+                 scidavis_column->setValueAt(i, column.data[i].as_double());
+             table->column(j)->setColumnMode(SciDAVis::ColumnMode::Month);
+             DateTime2StringFilter *filter =
+@@ -463,7 +463,7 @@ bool ImportOPJ::importSpreadsheet(const OriginFile &opj, const Origin::SpreadShe
+                 format = "d";
+                 break;
+             }
+-            for (int i = 0; i < min((int)column.data.size(), maxrows); ++i)
++            for (int i = 0; i < std::min((int)column.data.size(), maxrows); ++i)
+                 scidavis_column->setValueAt(i, column.data[i].as_double());
+             table->column(j)->setColumnMode(SciDAVis::ColumnMode::Day);
+             DateTime2StringFilter *filter =
+@@ -554,7 +554,7 @@ bool ImportOPJ::importTables(const OriginFile &opj)
+ #endif
+             QVector<qreal> values;
+             values.resize(rowCount * columnCount);
+-            for (int i = 0; i < min((int)values.size(), (int)layer.data.size()); i++) {
++            for (int i = 0; i < std::min((int)values.size(), (int)layer.data.size()); i++) {
+                 values[i] = layer.data[i];
+             }
+             Matrix->setCells(values);
+@@ -1006,7 +1006,7 @@ bool ImportOPJ::importGraphs(const OriginFile &opj)
+             grid->enableZeroLineX(0);
+             grid->enableZeroLineY(0);
+ 
+-            vector<Origin::GraphAxisFormat> formats;
++            std::vector<Origin::GraphAxisFormat> formats;
+             formats.push_back(layer.yAxis.formatAxis[0]); // left
+             formats.push_back(layer.yAxis.formatAxis[1]); // right
+             formats.push_back(layer.xAxis.formatAxis[0]); // bottom
+@@ -1014,7 +1014,7 @@ bool ImportOPJ::importGraphs(const OriginFile &opj)
+             graph->setXAxisTitle(parseOriginText(decodeMbcs(formats[2].label.text.c_str())));
+             graph->setYAxisTitle(parseOriginText(decodeMbcs(formats[0].label.text.c_str())));
+ 
+-            vector<Origin::GraphAxisTick> ticks;
++            std::vector<Origin::GraphAxisTick> ticks;
+             ticks.push_back(layer.yAxis.tickAxis[0]); // left
+             ticks.push_back(layer.yAxis.tickAxis[1]); // right
+             ticks.push_back(layer.xAxis.tickAxis[0]); // bottom