1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10: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))))
(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-5))
(inputs (list qtbase-5 qtserialport-5))
(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 _
(chdir "src")
(invoke "qmake"
(string-append "QMAKE_CC="
#$(cc-for-target)))))
(replace 'install
(lambda _
(install-file "Candle"
(string-append #$output "/bin")))))))
(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,
(package
(name "candle")
(version "10.11.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Denvi/Candle")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1ihf06narzxckbapax1k2xj6c3jhv8nhjxpad7dabzf6s8dazsip"))))
(build-system cmake-build-system)
(native-inputs (list qt5ct qttools-5 qtscript-5))
(inputs
(list bash-minimal
qtbase-5
qtmultimedia-5
qtserialport-5
qtwayland-5
qtwebsockets-5))
(arguments
(list #:tests? #f ; no tests.
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-installation-paths
(lambda _
(substitute* "src/designerplugins/CMakeLists.txt"
(("DESIGNER_DESTINATION \"designerplugins\"")
"DESIGNER_DESTINATION \"lib/designerplugins\""))
(substitute* "src/customwidgets/CMakeLists.txt"
(("TARGETS customwidgets RUNTIME DESTINATION .")
"TARGETS customwidgets RUNTIME DESTINATION lib"))
(substitute* "src/candle/CMakeLists.txt"
(("candle PROPERTIES INSTALL_RPATH \"\\$ORIGIN/lib\"")
"candle PROPERTIES INSTALL_RPATH \"$ORIGIN/../lib\"")
(("install(.*/LICENSE DESTINATION .*)$")
(string-append
"install(FILES"
" ${CMAKE_SOURCE_DIR}/LICENSE"
" DESTINATION ${GENERAL_DESTINATION}/share/candle/)"))
(("install(.*/help DESTINATION .*)$")
(string-append
"install(DIRECTORY"
" ${CMAKE_SOURCE_DIR}/help"
" DESTINATION ${GENERAL_DESTINATION}/share/candle/)"))
(("TARGETS candle RUNTIME DESTINATION .")
"TARGETS candle RUNTIME DESTINATION bin"))))
(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.
Supported functions include:
@@ -4951,7 +4964,7 @@ form, numpad.
@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+)))
(define-public rizin
(package