From b134cf1d200c867c6b6c8a729a4ad212687a101d Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Fri, 21 Jan 2022 06:30:28 +0100 Subject: [PATCH 4/4] gnu: Add serial-studio. * gnu/packages/qt.scm (serial-studio): New variable. * gnu/local.mk: Add patch. * gnu/packages/patches/serial-studio-remove-qsimple-updater.patch: New file. diff --git a/gnu/packages/patches/serial-studio-remove-qsimple-updater.patch b/gnu/packages/patches/serial-studio-remove-qsimple-updater.patch new file mode 100644 index 0000000000..f8f93364d6 --- /dev/null +++ b/gnu/packages/patches/serial-studio-remove-qsimple-updater.patch @@ -0,0 +1,80 @@ +From 22b0b5014be7911406b262aeb0864d36f1fbbab5 Mon Sep 17 00:00:00 2001 +From: Petr Hodina +Date: Wed, 19 Jan 2022 14:52:08 +0100 +Subject: [PATCH] Remove code dependent on QSimpleUpdater. Don't include + qwt.pri, qtcsv.pri and qmqtt.pri. + + +diff --git a/Serial-Studio.pro b/Serial-Studio.pro +index 49cbb6e..fb6aeca 100644 +--- a/Serial-Studio.pro ++++ b/Serial-Studio.pro +@@ -59,7 +59,7 @@ equals(QT_MAJOR_VERSION, 6) { + QT += core5compat + } + +-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00 ++DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00 DISABLE_QSU + + #----------------------------------------------------------------------------------------- + # Compiler options +diff --git a/libs/Libraries.pri b/libs/Libraries.pri +index 9a5494c..d2f6f12 100644 +--- a/libs/Libraries.pri ++++ b/libs/Libraries.pri +@@ -36,12 +36,8 @@ INCLUDEPATH += $$PWD + # Include *.pri files + #------------------------------------------------------------------------------- + +-include($$PWD/qwt/qwt.pri) +-include($$PWD/qtcsv/qtcsv.pri) +-include($$PWD/qmqtt/qmqtt.pri) + include($$PWD/QMapControl/QMapControl.pri) + include($$PWD/QRealFourier/QRealFourier.pri) +-include($$PWD/QSimpleUpdater/QSimpleUpdater.pri) + + macx* { + DEFINES += KDMACTOUCHBAR_BUILD_KDMACTOUCHBAR_SRC +diff --git a/src/Misc/ModuleManager.cpp b/src/Misc/ModuleManager.cpp +index 50ac4c1..bd022f2 100644 +--- a/src/Misc/ModuleManager.cpp ++++ b/src/Misc/ModuleManager.cpp +@@ -55,7 +55,6 @@ + #include + + #include +-#include + + /** + * Configures the application font, creates a splash screen and configures +@@ -120,11 +119,6 @@ void Misc::ModuleManager::configureUpdater() + { + if (!autoUpdaterEnabled()) + return; +- +- setSplashScreenMessage(tr("Configuring updater...")); +- QSimpleUpdater::getInstance()->setNotifyOnUpdate(APP_UPDATER_URL, true); +- QSimpleUpdater::getInstance()->setNotifyOnFinish(APP_UPDATER_URL, false); +- QSimpleUpdater::getInstance()->setMandatoryUpdate(APP_UPDATER_URL, false); + } + + /** +@@ -170,7 +164,6 @@ void Misc::ModuleManager::initializeQmlInterface() + const auto csvPlayer = CSV::Player::getInstance(); + const auto ioManager = IO::Manager::getInstance(); + const auto ioConsole = IO::Console::getInstance(); +- const auto updater = QSimpleUpdater::getInstance(); + const auto jsonEditor = JSON::Editor::getInstance(); + const auto mqttClient = MQTT::Client::getInstance(); + const auto uiDashboard = UI::Dashboard::getInstance(); +@@ -215,7 +208,6 @@ void Misc::ModuleManager::initializeQmlInterface() + c->setContextProperty("Cpp_IsWin", isWin); + c->setContextProperty("Cpp_IsMac", isMac); + c->setContextProperty("Cpp_IsNix", isNix); +- c->setContextProperty("Cpp_Updater", updater); + c->setContextProperty("Cpp_IO_Serial", ioSerial); + c->setContextProperty("Cpp_CSV_Export", csvExport); + c->setContextProperty("Cpp_CSV_Player", csvPlayer); +-- +2.34.0 + diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 4621de0dad..d0521b4894 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3017,6 +3017,78 @@ (define (delete-unwanted-files child stat flag base level) system libraries.") (license license:lgpl2.1+))) +(define-public serial-studio + (package + (name "serial-studio") + (version "1.1.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Serial-Studio/Serial-Studio") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches + "serial-studio-remove-qsimple-updater.patch")) + (modules '((guix build utils) (ice-9 ftw) + (srfi srfi-1))) + (snippet '(begin + (with-directory-excursion "libs" + (for-each + delete-file-recursively + '("qwt" "qtcsv" "qmqtt" + "QSimpleUpdater"))))) + (sha256 + (base32 + "0qww2pmbvmq3cjx3xk8rxq0zf54y0b0j8bykn4aq3d2dii44m85y")))) + (build-system qt-build-system) + (arguments + `(#:tests? #f ;no test suite + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs inputs #:allow-other-keys) + (substitute* "Serial-Studio.pro" + (("/usr") (assoc-ref outputs "out")) + (("INCLUDEPATH \\+= src") (string-append "INCLUDEPATH += src +INCLUDEPATH += " + (assoc-ref inputs + "qwt") + "/include/qwt +" + "LIBS += -L" + (assoc-ref inputs + "qwt") + "/lib" + " -lqwt +" + "LIBS += -L" + (assoc-ref inputs + "qtcsv") + "/lib" + " -lqtcsv +" + "LIBS += -L" + (assoc-ref inputs + "qmqtt") + "/lib" + " -lQt5Qmqtt"))) + (invoke "qmake")))))) + (native-inputs (list qwt qttools pkg-config)) + (inputs (list qtcsv + qmqtt + qwt + qtbase-5 + qtserialport + qtsvg-5 + qtdeclarative-5 + qtquickcontrols2-5)) + (home-page "https://github.com/Serial-Studio/Serial-Studio") + (synopsis "Multi-purpose serial data visualization & processing program") + (description + "This package provides multi-purpose serial data visualization +and processing GUI program.") + (license license:expat))) + (define-public single-application-qt5 ;; Change in function signature, nheko requires at least this commit (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053")) -- 2.38.1