1
0
mirror of https://git.freebsd.org/ports.git synced 2026-06-02 11:08:52 +00:00

math/wxmaxima: Update to 26.0.1

- undo revert, as upstream fixed connection to maxima

Changelogs:
https://github.com/wxMaxima-developers/wxmaxima/releases/tag/Version-26.01.0

Approved by:	eduardo (mentor, implicit)
MFH:		2026Q1
This commit is contained in:
Tiago Gasiba
2026-02-03 23:33:17 +01:00
parent c55196c777
commit 2e431f7a09
5 changed files with 4 additions and 88 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
PORTNAME= wxmaxima
DISTVERSIONPREFIX= Version-
DISTVERSION= 25.04.0
PORTREVISION= 1
DISTVERSION= 26.01.0
PORTEPOCH= 1
CATEGORIES= math
+3 -3
View File
@@ -1,3 +1,3 @@
TIMESTAMP = 1756398955
SHA256 (wxMaxima-Developers-wxmaxima-Version-25.04.0_GH0.tar.gz) = ec0b3005c3663f1bb86b0cc5028c2ba121e1563e3d5b671afcb9774895f4191b
SIZE (wxMaxima-Developers-wxmaxima-Version-25.04.0_GH0.tar.gz) = 16017552
TIMESTAMP = 1770155544
SHA256 (wxMaxima-Developers-wxmaxima-Version-26.01.0_GH0.tar.gz) = 1716c4f27636f909673f63ed0c7c30621683e35eb7bf05a5d5010fa67f0397f6
SIZE (wxMaxima-Developers-wxmaxima-Version-26.01.0_GH0.tar.gz) = 16304931
@@ -1,10 +0,0 @@
--- src/Dirstructure.cpp.orig 2025-04-27 13:21:48 UTC
+++ src/Dirstructure.cpp
@@ -121,6 +121,7 @@ wxString Dirstructure::ResourcesDir() {
exepath = exe.GetPath();
} else {
exepath = CMAKE_INSTALL_PREFIX;
+ exepath.Append("/share");
}
return exepath;
}
-45
View File
@@ -1,45 +0,0 @@
--- src/Maxima.cpp.orig 2025-10-22 20:06:30 UTC
+++ src/Maxima.cpp
@@ -115,8 +115,18 @@ Maxima::~Maxima() {
wxEvtHandler::DeletePendingEvents();
}
+
+// revert https://github.com/wxMaxima-developers/wxmaxima/commit/5d8dff1564c4d8e0d07e6fdb262b476cad0cb643
+// as per https://github.com/wxMaxima-developers/wxmaxima/issues/2028
+// NOTE: this is temporary solution until wx 3.3.2
bool Maxima::Write(const void *buffer, std::size_t length) {
- if(!buffer)
+ if (!m_socketOutputData.IsEmpty()) {
+ if (buffer && length)
+ m_socketOutputData.AppendData(buffer, length);
+ buffer = m_socketOutputData.GetData();
+ length = m_socketOutputData.GetDataLen();
+ }
+ if (!length)
return false;
if (length == 0)
return false;
@@ -125,8 +135,21 @@ bool Maxima::Write(const void *buffer, std::size_t len
wxThreadEvent *sendevent = new wxThreadEvent(EVT_MAXIMA);
sendevent->SetInt(WRITE_ERROR);
QueueEvent(sendevent);
- return false;
+ m_socketOutputData.Clear();
+ return true;
}
+ auto const wrote = m_socket->LastWriteCount();
+ if (wrote < length) {
+ auto *const source = reinterpret_cast<const char *>(buffer);
+ auto const leftToWrite = length - wrote;
+ if (m_socketOutputData.IsEmpty())
+ m_socketOutputData.AppendData(source + wrote, leftToWrite);
+ else {
+ memmove(m_socketOutputData.GetData(), source + wrote, leftToWrite);
+ m_socketOutputData.SetDataLen(leftToWrite);
+ }
+ } else
+ m_socketOutputData.Clear();
return true;
}
-28
View File
@@ -1,28 +0,0 @@
--- src/Maxima.h.orig 2025-10-22 20:10:06 UTC
+++ src/Maxima.h
@@ -123,6 +123,12 @@ class Maxima : public wxEvtHandler (private)
private:
//! If this is set to true by XmlInspectorActive we send all data we get to the XML inspector
bool m_xmlInspector = false;
+ /*! Send still-unsent data to wxMaxima
+ *
+ * \todo As we tell wxWidgets to send all data in one go at the end of a write command
+ * there should no more be unsent data.
+ */
+ void SendDataTowxMaxima();
//! The configuration of our wxMaxima process
Configuration *m_configuration;
//! The thread handler for SendDataTowxMaxima, the thread that parses the data from maxima.
@@ -152,6 +158,12 @@ class Maxima : public wxEvtHandler (private)
waits for the other to exit before writing new data to this variable.
*/
wxString m_socketInputData;
+ /*! Data we didn't manage to send to wxMaxima until now
+ *
+ * \todo Do we still need this variable? We tell wxWidgets to send all data in
+ * one go, so there should be no data be left at the end of a write command.
+ */
+ wxMemoryBuffer m_socketOutputData;
//! true = Maxima still has to send us its first prompt
bool m_firstPrompt = true;