1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: candle: Update to 10.11.1.

* gnu/packages/engineering.scm (candle): Update to 10.11.1.
[inputs]: Add bash-minimal, qtmultimedia-5, qtwayland-5 and qtwebsockets-5.
[native-inputs]: Add qt5ct and qtscript-5.
[arguments]<#:phases>: Add "fix-installation-paths" and "wrap-executable"
phases.  Remove "fix-sources" and "fix-application-settings-path".  Don't
replace "install" and "configure" phases.

Change-Id: Ie55850d2a00d328b114bd35791a7d068e6e7a9ac
This commit is contained in:
Artyom V. Poptsov
2025-12-07 08:59:40 +03:00
parent 6605984c2c
commit 8f00517eee

View File

@@ -4892,54 +4892,67 @@ able to work nicely with old or slow hardware.")
license:expat)))) license:expat))))
(define-public candle (define-public candle
;; The latest tagged version 1.2b fails on the build stage due to (package
;; non-supported g++ flags so we need to use the latest commit from the (name "candle")
;; 'master' branch in the repository. (version "10.11.1")
(let ((commit "3f763bcde1195e23ba119a5b3c70d7c889881019") (source (origin
(revision "1")) (method git-fetch)
(package (uri (git-reference
(name "candle") (url "https://github.com/Denvi/Candle")
(version (git-version "1.2b" revision commit)) (commit (string-append "v" version))))
(source (origin (file-name (git-file-name name version))
(method git-fetch) (sha256
(uri (git-reference (base32
(url "https://github.com/Denvi/Candle") "1ihf06narzxckbapax1k2xj6c3jhv8nhjxpad7dabzf6s8dazsip"))))
(commit commit))) (build-system cmake-build-system)
(file-name (git-file-name name version)) (native-inputs (list qt5ct qttools-5 qtscript-5))
(sha256 (inputs
(base32 (list bash-minimal
"08rqhl6a5a8s67a8yl16944zgcsnnb08xfv4klzyqwlvaqgfp783")))) qtbase-5
(build-system gnu-build-system) qtmultimedia-5
(native-inputs (list qttools-5)) qtserialport-5
(inputs (list qtbase-5 qtserialport-5)) qtwayland-5
(arguments qtwebsockets-5))
(list #:tests? #f ; no tests. (arguments
#:phases #~(modify-phases %standard-phases (list #:tests? #f ; no tests.
(add-after 'unpack 'fix-sources #:phases #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'fix-installation-paths
(substitute* (find-files "." ".*\\.h") (lambda _
(("const char\\* what\\(\\) const override") (substitute* "src/designerplugins/CMakeLists.txt"
"const char* what() const noexcept override")))) (("DESIGNER_DESTINATION \"designerplugins\"")
(add-after 'unpack 'fix-application-settings-path "DESIGNER_DESTINATION \"lib/designerplugins\""))
(lambda _ (substitute* "src/customwidgets/CMakeLists.txt"
(substitute* "src/frmmain.cpp" (("TARGETS customwidgets RUNTIME DESTINATION .")
(("\ "TARGETS customwidgets RUNTIME DESTINATION lib"))
qApp->applicationDirPath\\(\\) \\+ \"\\/settings\\.ini\"") (substitute* "src/candle/CMakeLists.txt"
"QDir::homePath() + \"/.config/candle.ini\"")))) (("candle PROPERTIES INSTALL_RPATH \"\\$ORIGIN/lib\"")
(replace 'configure "candle PROPERTIES INSTALL_RPATH \"$ORIGIN/../lib\"")
(lambda _ (("install(.*/LICENSE DESTINATION .*)$")
(chdir "src") (string-append
(invoke "qmake" "install(FILES"
(string-append "QMAKE_CC=" " ${CMAKE_SOURCE_DIR}/LICENSE"
#$(cc-for-target))))) " DESTINATION ${GENERAL_DESTINATION}/share/candle/)"))
(replace 'install (("install(.*/help DESTINATION .*)$")
(lambda _ (string-append
(install-file "Candle" "install(DIRECTORY"
(string-append #$output "/bin"))))))) " ${CMAKE_SOURCE_DIR}/help"
(home-page "https://github.com/Denvi/Candle") " DESTINATION ${GENERAL_DESTINATION}/share/candle/)"))
(synopsis "GRBL controller with G-Code visualizer") (("TARGETS candle RUNTIME DESTINATION .")
(description "TARGETS candle RUNTIME DESTINATION bin"))))
"Candle is a GRBL controller application with a visualizer for G-Code, (add-after 'install 'wrap-executable
(lambda _
(let ((qtbase #$(this-package-input "qtbase"))
(qtwayland #$(this-package-input "qtwayland")))
(wrap-program (string-append #$output "/bin/candle")
`("QT_PLUGIN_PATH" ":" =
(,(string-append qtwayland "/lib/qt5/plugins")))
`("QT_QPA_PLATFORM_PLUGIN_PATH" ":" =
(,(string-append qtwayland
"/lib/qt5/plugins/platforms"))))))))))
(home-page "https://github.com/Denvi/Candle")
(synopsis "GRBL controller with G-Code visualizer")
(description
"Candle is a GRBL controller application with a visualizer for G-Code,
the @acronym{CNC, computer numerical control} programming language. the @acronym{CNC, computer numerical control} programming language.
Supported functions include: Supported functions include:
@@ -4951,7 +4964,7 @@ form, numpad.
@item Loading, editing, saving and sending of G-code files to CNC-machine. @item Loading, editing, saving and sending of G-code files to CNC-machine.
@item Visualizing G-code files. @item Visualizing G-code files.
@end itemize") @end itemize")
(license license:gpl3+)))) (license license:gpl3+)))
(define-public rizin (define-public rizin
(package (package