From patchwork Sat Jul 9 13:43:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Artyom V. Poptsov" X-Patchwork-Id: 3677 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D1A6527BBE9; Sat, 9 Jul 2022 14:45:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED,URIBL_CSS_A autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A758127BBE9 for ; Sat, 9 Jul 2022 14:45:13 +0100 (BST) Received: from localhost ([::1]:45662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAAlk-00027u-QN for patchwork@mira.cbaines.net; Sat, 09 Jul 2022 09:45:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAAla-00026n-Cd for guix-patches@gnu.org; Sat, 09 Jul 2022 09:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAAla-0003CF-2f for guix-patches@gnu.org; Sat, 09 Jul 2022 09:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oAAlZ-0008Bh-Ns for guix-patches@gnu.org; Sat, 09 Jul 2022 09:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56354] [PATCH] gnu: engineering: Add candle. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Jul 2022 13:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56354 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56354@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165737425731406 (code B ref -1); Sat, 09 Jul 2022 13:45:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jul 2022 13:44:17 +0000 Received: from localhost ([127.0.0.1]:34035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAAkm-0008AN-2p for submit@debbugs.gnu.org; Sat, 09 Jul 2022 09:44:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:43422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAAkf-0008AA-PN for submit@debbugs.gnu.org; Sat, 09 Jul 2022 09:44:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAAkf-00024k-Fa for guix-patches@gnu.org; Sat, 09 Jul 2022 09:44:05 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:44746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAAkd-00037r-DF for guix-patches@gnu.org; Sat, 09 Jul 2022 09:44:05 -0400 Received: by mail-lf1-x135.google.com with SMTP id a9so1934657lfk.11 for ; Sat, 09 Jul 2022 06:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=W/JqpypBUbcK/W8WPBicQzCXxLL/jvo6crLrNVdCjkc=; b=VtyRaUGsge3/qBH85bajZdH3ar/SYv/eWc453pkRyPj2Nm38ramHCLpRTo011Oki7J jWc4UWtOwY7z76Mxh3NvoPW5tHNe26O15og8kNMiGe3T9ckRlBwMuexoHmXi4Gsh4mON ABwUtD5QFAhWeXbDYy7XVNyM+q1E8ulDwxia3W0PfkPDlsPkgJlIcyVP3o9RfY1QRMWF hWD5WwNpkxU8KzYPJ3rNKdWXBgqE7LoAhzgjDArGkClAaWswgHS+ySrfDj6JlHTjpF9J odsQkrYKhrz2IEw6UyndkF4eyMmMTiFxGVKm7vGrs+MxJSfoCNzYkHA7InLZ4w9wvrIz d0zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=W/JqpypBUbcK/W8WPBicQzCXxLL/jvo6crLrNVdCjkc=; b=A7xnRJogihRJBISFyeUVdUUVNQXNk0XzUSpdB1zrhC+IJZpZZCHusyu3Z5+ZdSt+bk PYOY5eHcFxbkc+uU6i3QFJpDDnSOqvbNSxzVGz5Tl6JrrVk2PLGu2+yiP1ghtjo8T785 6jSGGeC95YPBzxUXuARNp3szuQqzun+tWcAk/9J4FWkE4zCjMt42dnqcCYUxNlXSINqp 4mr1Unj4p4yP+Ezz+baeAQuJODZGGuKoWSAN7jF+a8lHy5aPurJMyiyHO/qQgSHKeujw ZEL6gaGz0LQUZ3QSMa+2q/FMznkx4kiYIx5L7RRZ/58x7vIxFpqhfmSHj4U5HjT/3NLy pskQ== X-Gm-Message-State: AJIora+mkzombjTXoISFBBAH0b+FL6YH4ur/gAIeoRIchQKHm0VJieBl 7va5mnc3kzUTmiGM1OCZfP4b5bCObR1LhQ== X-Google-Smtp-Source: AGRyM1t1is62jCoPdDBzbH1GSOPLZCMQn/4rmuS+0vI3isZsT6YC2R6EQ41yo8PutZOL5fo/j3awiw== X-Received: by 2002:a05:6512:3b20:b0:47f:8ca1:bd7 with SMTP id f32-20020a0565123b2000b0047f8ca10bd7mr5370314lfv.105.1657374240761; Sat, 09 Jul 2022 06:44:00 -0700 (PDT) Received: from elephant ([5.164.222.47]) by smtp.gmail.com with ESMTPSA id q6-20020a056512210600b00477c0365b20sm394056lfr.188.2022.07.09.06.43.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Jul 2022 06:44:00 -0700 (PDT) From: "Artyom V. Poptsov" References: <87o7y74zic.fsf@gmail.com> <87fsjhft1m.fsf@gmail.com> Date: Sat, 09 Jul 2022 16:43:56 +0300 In-Reply-To: <87fsjhft1m.fsf@gmail.com> (Artyom V. Poptsov's message of "Mon, 04 Jul 2022 06:36:21 +0300") Message-ID: <877d4mqu3n.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=poptsov.artyom@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_CSS_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello Jean Pierre De Jesus DIAZ, I almost overlooked your message from debbugs as it wasn't delivered to my mailbox. Thanks for the patch review! > Can be changed to use G-Expressions: Done. > >+ (add-after 'fix-sources 'fix-application-settings-path > Doesn't depend on 'fix-sources, so it's fine to add after 'unpack. Done. > It may also be a good idea to set `QMAKE_CC' variable for cross-compilation, > like: > > `(invoke "qmake" (string-append "QMAKE_CC=" #$(cc-for-target)))' Done. But I wasn't able to run cross-compilation with the command you provided: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build --keep-failed --target=aarch64-linux-gnu candle guix build: error: gnu/packages/freedesktop.scm:1921:2: perl-file-mimeinfo@0.29: build system `perl' does not support cross builds --8<---------------cut here---------------end--------------->8--- It seems to me from the message that the issue is not in the candle package itself. > >+ (add-after 'configure 'fix-makefile > >+ (lambda _ > >+ (substitute* "Makefile" > >+ (("-pipe -Z7") "-pipe") > >+ (("LFLAGS.*=.*DEBUG .*OPT:REF -Wl,-O1") > >+ "LFLAGS = -Wl,-O1")))) > > Could this instead be replaced on the `candle.pro' file? I fixed it by using the latest commit from the 'master' branch instead of 1.2b tag. Please find the updated patch attached. Thanks, - Artyom From 3830792f316287de22fa62b2adff6aeb2b94a160 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Thu, 23 Jun 2022 23:02:40 +0300 Subject: [PATCH] gnu: engineering: Add candle. * gnu/packages/engineering.scm (candle): New variable. --- gnu/packages/engineering.scm | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index fe8ab13298..a3445343fc 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -3688,3 +3688,66 @@ (define-public xschem netlists from the drawn schematic, allowing the simulation of the circuit.") (home-page "https://xschem.sourceforge.io/stefan/index.html") (license license:gpl2+)))) + +(define-public candle + ;; The latest tagged version 1.2b fails on the build stage due to + ;; non-supported g++ flags so we need to use the latest commit from the + ;; 'master' branch in the repository. + (let ((commit "3f763bcde1195e23ba119a5b3c70d7c889881019") + (revision "1")) + (package + (name "candle") + (version (git-version "1.2b" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Denvi/Candle") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08rqhl6a5a8s67a8yl16944zgcsnnb08xfv4klzyqwlvaqgfp783")))) + (build-system gnu-build-system) + (native-inputs (list qttools)) + (inputs (list qtbase-5 qtserialport)) + (arguments + (list #:tests? #f ; no tests. + #: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")))) + (add-after 'unpack 'fix-application-settings-path + (lambda _ + (substitute* "src/frmmain.cpp" + (("qApp->applicationDirPath\\(\\) \\+ \"\\/settings\\.ini\"") + "QDir::homePath() + \"/.config/candle.ini\"")))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (chdir "src") + (invoke "qmake" + (string-append "QMAKE_CC=" + #$(cc-for-target)))))) + (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 + "GRBL controller application with G-Code visualizer written in Qt. + +Supported functions: + +@itemize +@item Controlling GRBL-based cnc-machine via console commands, buttons on +form, numpad. +@item Monitoring CNC-machine state. +@item Loading, editing, saving and sending of G-code files to CNC-machine. +@item Visualizing G-code files. +@end itemize") + (license license:gpl3)))) + -- 2.34.1