Subject: bug#56354: closed (Re: bug#56354: [PATCH] gnu: engineering: Add candle.)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 12 Jul 2022 22:00:03 +0000

Your bug report

#56354: [PATCH] gnu: engineering: Add candle.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
56354: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56354
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#56354: [PATCH] gnu: engineering: Add candle.
From: Ludovic Courtès <[email-masked]>
To: "Artyom V. Poptsov" <[email-masked]>
Cc: Jean Pierre De Jesus DIAZ <[email-masked]>, "[email-masked]" <[email-masked]>
Date: Tue, 12 Jul 2022 23:59:50 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

"Artyom V. Poptsov" <[email-masked]> skribis:

> From 7aac50730febeb95d0f7a4ab1cbb6e7dfb632553 Mon Sep 17 00:00:00 2001
> From: "Artyom V. Poptsov" <[email-masked]>
> Date: Thu, 23 Jun 2022 23:02:40 +0300
> Subject: [PATCH] gnu: engineering: Add candle.
>
> * gnu/packages/engineering.scm (candle): New variable.

Applied with the changes below.  Note that the license is GPLv3+ because
nothing says it’s “version 3 only”.  I tweaked the description as per
<https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html>.

Thank you, and thanks Jean-Pierre for reviewing!

Ludo’.

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index e1297c0f85..dd594af7f8 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3721,7 +3721,8 @@ (define-public candle
                           (add-after 'unpack 'fix-application-settings-path
                             (lambda _
                               (substitute* "src/frmmain.cpp"
-                                (("qApp->applicationDirPath\\(\\) \\+ \"\\/settings\\.ini\"")
+                                (("\
+qApp->applicationDirPath\\(\\) \\+ \"\\/settings\\.ini\"")
                                  "QDir::homePath() + \"/.config/candle.ini\""))))
                           (replace 'configure
                             (lambda _
@@ -3736,9 +3737,10 @@ (define-public candle
       (home-page "https://github.com/Denvi/Candle")
       (synopsis "GRBL controller with G-Code visualizer")
       (description
-       "GRBL controller application with G-Code visualizer written in Qt.
+       "Candle is a GRBL controller application with a visualizer for G-Code,
+the @acronym{CNC, computer numerical control} programming language.
 
-Supported functions:
+Supported functions include:
 
 @itemize
 @item Controlling GRBL-based cnc-machine via console commands, buttons on
@@ -3747,5 +3749,4 @@ (define-public candle
 @item Loading, editing, saving and sending of G-code files to CNC-machine.
 @item Visualizing G-code files.
 @end itemize")
-      (license license:gpl3))))
-
+      (license license:gpl3+))))

Subject: [PATCH] gnu: engineering: Add candle.
From: "Artyom V. Poptsov" <[email-masked]>
To: [email-masked]
Date: Sat, 02 Jul 2022 12:47:39 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

this patch adds Candle[1] CNC controller.

From a3c57bbd8cb9f87a92e063d02e69aa2f29f6a895 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sat, 2 Jul 2022 12:37:13 +0300
Subject: [PATCH] gnu: engineering: Add candle.

* gnu/packages/engineering.scm (candle): New variable.
---
 gnu/packages/engineering.scm | 37 ++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 661078594e..3bae7d100e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3702,19 +3702,32 @@ (define-public candle
               (sha256
                (base32
                 "1rinblzqg8xbi4zcyx6v3k7g2kdrgmwm7xwb6fryb8s0bd21jppv"))))
-    (build-system qt-build-system)
-    ;; (native-inputs
-    ;;  ())
-    ;; (inputs)
+    (build-system gnu-build-system)
+    (native-inputs (list qttools))
+    (inputs (list qtbase-5 qtserialport))
     (arguments
-     (list #:phases
-           #~(modify-phases %standard-phases
-               (replace 'configure
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (chdir "src")
-                   (invoke "qmake"
-                           (string-append "PREFIX=" (assoc-ref outputs "out")))
-                   #t)))))
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'fix-sources
+                    (lambda _
+                      (substitute* (find-files "." ".*\\.h")
+                        (("const char\\* what\\(\\) const override")
+                         "const char* what() const noexcept override"))))
+                  (replace 'configure
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (chdir "src")
+                        (invoke "qmake"))))
+                  (add-after 'configure 'fix-makefile
+                    (lambda _
+                      (substitute* "Makefile"
+                        (("-pipe -Z7") "-pipe")
+                        (("LFLAGS.*=.*DEBUG .*OPT:REF -Wl,-O1")
+                         "LFLAGS        = -Wl,-O1"))))
+                  (replace 'install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (install-file "Candle"
+                                      (string-append out "/bin"))))))))
     (home-page "https://github.com/Denvi/Candle")
     (synopsis "GRBL controller with G-Code visualizer")
     (description
-- 
2.34.1

Thanks,

- Artyom

References:
1. https://github.com/Denvi/Candle

-- 
Artyom "avp" Poptsov <[email-masked]>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F