-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mathmod: new port in math #24794
Merged
Merged
mathmod: new port in math #24794
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 | ||
|
||
PortSystem 1.0 | ||
PortGroup github 1.0 | ||
|
||
name mathmod | ||
|
||
categories math graphics | ||
license GPL-2 | ||
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer | ||
homepage https://www.facebook.com/parisolab | ||
|
||
description Mathematical modelling software | ||
long_description ${name} is a mathematical modelling software that \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above. |
||
visualizes and animates implicit and parametric surfaces. | ||
|
||
if {${os.platform} ne "darwin" || ${os.major} > 11} { | ||
PortGroup qmake5 1.0 | ||
|
||
github.setup parisolab mathmod 11.1 | ||
revision 0 | ||
checksums rmd160 48a59ed6858a3c1543458be6ce4411746c5b0890 \ | ||
sha256 b9d4c550d09a8ad307df90ffbb6f89e81846c5ea93d3f3e2616207a76227421a \ | ||
size 7934535 | ||
|
||
compiler.cxx_standard \ | ||
2011 | ||
} else { | ||
# See: https://github.com/parisolab/mathmod/issues/243 | ||
PortGroup qmake 1.0 | ||
|
||
github.setup parisolab mathmod 7.0 | ||
revision 0 | ||
checksums rmd160 3cd5480896ae051b7e6ff489419611aaf35e8b89 \ | ||
sha256 5ae4d2536f1e1a2883c83b8aa2d77ab54795968aa0635133ba58ff916e7a8622 \ | ||
size 947569 | ||
|
||
depends_lib-append \ | ||
port:qjson4 | ||
|
||
patchfiles-append \ | ||
patch-jiso.h.diff \ | ||
patch-jpar.h.diff \ | ||
patch-parametersoptions.h.diff \ | ||
patch-ParisoMathObject.h.diff \ | ||
patch-drawingoptions.cpp.diff \ | ||
patch-parametersoptions.cpp.diff \ | ||
patch-ParisoMathObject.cpp.diff \ | ||
patch-drawingoptions.ui.diff \ | ||
patch-commun.cpp.diff \ | ||
patch-mathmodconfig.js.diff | ||
|
||
# Q_DECL_OVERRIDE is intended to be this way: | ||
configure.cppflags-append \ | ||
-I${prefix}/include/QJson4 \ | ||
-DQ_DECL_OVERRIDE= | ||
|
||
configure.ldflags-append \ | ||
-lQJson4 | ||
} | ||
|
||
github.tarball_from archive | ||
|
||
destroot { | ||
copy ${worksrcpath}/MathMod.app ${destroot}${applications_dir}/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- ui_modules/ParisoMathObject.cpp.orig 2018-12-19 02:50:32.000000000 +0800 | ||
+++ ui_modules/ParisoMathObject.cpp 2024-07-03 05:23:14.000000000 +0800 | ||
@@ -19,7 +19,7 @@ | ||
***************************************************************************/ | ||
#include "ParisoMathObject.h" | ||
#include <qmessagebox.h> | ||
- | ||
+#include <QJsonParseError.h> | ||
|
||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++// | ||
ParisoMathObject::ParisoMathObject() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- ui_modules/ParisoMathObject.h.orig 2018-12-19 02:50:32.000000000 +0800 | ||
+++ ui_modules/ParisoMathObject.h 2024-07-03 05:06:52.000000000 +0800 | ||
@@ -22,9 +22,9 @@ | ||
#include <qfile.h> | ||
#include <QTextStream> | ||
#include <QStringList> | ||
-#include <QJsonObject> | ||
-#include <QJsonDocument> | ||
-#include <QJsonArray> | ||
+#include <QJsonObject.h> | ||
+#include <QJsonDocument.h> | ||
+#include <QJsonArray.h> | ||
#include <QFileDialog> | ||
#include <QDialog> | ||
#include <QTranslator> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- pariso/commun.cpp.orig 2018-04-02 13:49:18.000000000 +0800 | ||
+++ pariso/commun.cpp 2024-07-03 10:52:59.000000000 +0800 | ||
@@ -66,13 +66,13 @@ | ||
for (uint l = 0; l < numberFeaturePoints; ++l) | ||
{ | ||
lastRandom = lcgRandom(lastRandom); | ||
- randomDiff[0] = (float)lastRandom / 0x100000000; | ||
+ randomDiff[0] = (float)lastRandom / 0x100000000ll; | ||
|
||
lastRandom = lcgRandom(lastRandom); | ||
- randomDiff[1] = (float)lastRandom / 0x100000000; | ||
+ randomDiff[1] = (float)lastRandom / 0x100000000ll; | ||
|
||
lastRandom = lcgRandom(lastRandom); | ||
- randomDiff[2] = (float)lastRandom / 0x100000000; | ||
+ randomDiff[2] = (float)lastRandom / 0x100000000ll; | ||
|
||
featurePoint[0] = randomDiff[0] + (float)cubeX; | ||
featurePoint[1] = randomDiff[1] + (float)cubeY; | ||
@@ -151,7 +151,7 @@ | ||
|
||
int CellNoise::lcgRandom(int lastValue) | ||
{ | ||
- return (int)((1103515245u * lastValue + 12345u) % 0x100000000u); | ||
+ return (int)((1103515245u * lastValue + 12345u) % 0x100000000ull); | ||
} | ||
|
||
int CellNoise::hash(int i, int j, int k) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- ui_modules/drawingoptions.cpp.orig 2018-12-19 02:50:32.000000000 +0800 | ||
+++ ui_modules/drawingoptions.cpp 2024-07-03 05:23:01.000000000 +0800 | ||
@@ -20,6 +20,7 @@ | ||
|
||
#include "drawingoptions.h" | ||
#include <qmessagebox.h> | ||
+#include <QJsonParseError.h> | ||
|
||
static int indexcurrentFormula=-1; | ||
static int indexcurrentSet=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- ui_forms/drawingoptions.ui.orig 2018-12-19 02:50:32.000000000 +0800 | ||
+++ ui_forms/drawingoptions.ui 2024-07-03 11:39:23.000000000 +0800 | ||
@@ -606,9 +606,6 @@ | ||
<property name="movable"> | ||
<bool>true</bool> | ||
</property> | ||
- <property name="tabBarAutoHide"> | ||
- <bool>true</bool> | ||
- </property> | ||
<widget class="QWidget" name="tab"> | ||
<attribute name="title"> | ||
<string>Model details</string> | ||
@@ -6088,9 +6085,6 @@ | ||
<property name="layoutDirection"> | ||
<enum>Qt::LeftToRight</enum> | ||
</property> | ||
- <property name="currentText"> | ||
- <string>Predefined Sets</string> | ||
- </property> | ||
<item> | ||
<property name="text"> | ||
<string>Predefined Sets</string> | ||
@@ -6219,9 +6213,6 @@ | ||
<property name="layoutDirection"> | ||
<enum>Qt::LeftToRight</enum> | ||
</property> | ||
- <property name="currentText"> | ||
- <string>Parameters List</string> | ||
- </property> | ||
<item> | ||
<property name="text"> | ||
<string>Parameters List</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- json_parser/jiso.h.orig 2018-12-19 02:50:32.000000000 +0800 | ||
+++ json_parser/jiso.h 2024-07-03 05:06:09.000000000 +0800 | ||
@@ -25,8 +25,8 @@ | ||
#include <string> | ||
#include <iostream> | ||
#include <QStringList> | ||
-#include <QJsonArray> | ||
-#include <QJsonObject> | ||
+#include <QJsonArray.h> | ||
+#include <QJsonObject.h> | ||
|
||
class jiso | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- json_parser/jpar.h.orig 2018-12-19 02:50:32.000000000 +0800 | ||
+++ json_parser/jpar.h 2024-07-03 05:06:23.000000000 +0800 | ||
@@ -25,8 +25,8 @@ | ||
#include <string> | ||
#include <iostream> | ||
#include <QStringList> | ||
-#include <QJsonArray> | ||
-#include <QJsonObject> | ||
+#include <QJsonArray.h> | ||
+#include <QJsonObject.h> | ||
#include <qthread.h> | ||
|
||
class jpar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- mathmodconfig.js.orig 2018-04-02 13:49:18.000000000 +0800 | ||
+++ mathmodconfig.js 2024-07-03 12:11:37.000000000 +0800 | ||
@@ -1,8 +1,8 @@ | ||
{ | ||
"IsoParam": { | ||
- "MaxGrid": 250, | ||
- "MaxPt": 4, | ||
- "MaxTri": 6, | ||
+ "MaxGrid": 200, | ||
+ "MaxPt": 1, | ||
+ "MaxTri": 2, | ||
"NbComponent": 200, | ||
"NbVariables": 30, | ||
"NbConstantes": 40, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- ui_modules/parametersoptions.cpp.orig 2018-12-19 02:50:32.000000000 +0800 | ||
+++ ui_modules/parametersoptions.cpp 2024-07-03 11:51:07.000000000 +0800 | ||
@@ -20,6 +20,8 @@ | ||
#include <QtGui> | ||
#include <math.h> | ||
#include "parametersoptions.h" | ||
+#include <QJsonParseError.h> | ||
+#include <QJsonDocument.h> | ||
|
||
bool MACOS = false; | ||
|
||
@@ -108,7 +110,7 @@ | ||
} | ||
|
||
QFile file(JsonFile); | ||
- //QFileDevice::Permissions p = file.permissions(); | ||
+ //QFile::Permissions p = file.permissions(); | ||
if (file.open( QIODevice::ReadOnly | QIODevice::Text ) ) | ||
{ | ||
QJsonDocument doc = QJsonDocument::fromJson(((file.readAll()).trimmed()).replace("\n","").replace("\t","").replace("DOTSYMBOL",dotsymbol.toStdString().c_str()),&err); | ||
@@ -157,7 +159,7 @@ | ||
{ | ||
QFile file2(":/mathmodcollection_empty.js"); | ||
file2.copy(JsonFileName); | ||
- QFile::setPermissions(JsonFileName, QFileDevice::ReadOwner| QFileDevice::WriteOwner); | ||
+ QFile::setPermissions(JsonFileName, QFile::ReadOwner| QFile::WriteOwner); | ||
} | ||
|
||
QFile file(JsonFileName); | ||
@@ -217,10 +219,10 @@ | ||
ui.maxpt->setValue(mg); | ||
//Styles: | ||
QString Style = ((JConfig["Styles"].toObject())["UsedStyle"].toString()); | ||
- ui.comboBox_2->setCurrentText(Style); | ||
+ ui.comboBox_2->setItemText(0, Style); | ||
//Theme: | ||
QString theme = ((JConfig["Themes"].toObject())["UsedTheme"].toString()); | ||
- ui.comboBox_3->setCurrentText(theme); | ||
+ ui.comboBox_3->setItemText(0, theme); | ||
if(theme == "MyTheme") | ||
ui.groupBox->show(); | ||
else | ||
@@ -424,7 +426,7 @@ | ||
{ | ||
QFile file3(":/mathmodconfig.js"); | ||
file3.copy(fileconfig); | ||
- QFile::setPermissions(fileconfig, QFileDevice::ReadOwner | QFileDevice::WriteOwner); | ||
+ QFile::setPermissions(fileconfig, QFile::ReadOwner | QFile::WriteOwner); | ||
} | ||
|
||
QFile fconf(fileconfig); | ||
@@ -591,7 +593,7 @@ | ||
out << str << endl; | ||
file.close(); | ||
file.copy(advancedmodels); | ||
- QFile::setPermissions(advancedmodels, QFileDevice::ReadOwner | QFileDevice::WriteOwner); | ||
+ QFile::setPermissions(advancedmodels, QFile::ReadOwner | QFile::WriteOwner); | ||
} | ||
|
||
QFile mathmodfile(filecollection); | ||
@@ -614,7 +616,7 @@ | ||
out << str << endl; | ||
file.close(); | ||
file.copy(filecollection); | ||
- QFile::setPermissions(filecollection, QFileDevice::ReadOwner | QFileDevice::WriteOwner); | ||
+ QFile::setPermissions(filecollection, QFile::ReadOwner | QFile::WriteOwner); | ||
} | ||
} | ||
void Parametersoptions::on_save_clicked() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- ui_modules/parametersoptions.h.orig 2018-12-19 02:50:32.000000000 +0800 | ||
+++ ui_modules/parametersoptions.h 2024-07-03 05:06:38.000000000 +0800 | ||
@@ -25,7 +25,7 @@ | ||
#include "../json_parser/parisodef.h" | ||
#include <QFileDialog> | ||
#include <QMessageBox> | ||
-#include <QJsonObject> | ||
+#include <QJsonObject.h> | ||
#include <QStyleFactory> | ||
|
||
struct ListeModelTexture |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In US English we always write "modeling".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but both spellings are correct.