me
/
guix
Archived
1
0
Fork 0

gnu: rosegarden: Improve package style.

* gnu/packages/music.scm (rosegarden)[arguments]: Use G-expressions and
SEARCH-INPUT-FILE.
[inputs]: Use BASH-MINIMAL instead of BASH.
Nicolas Goaziou 2022-12-14 18:44:04 +01:00
parent b363756306
commit ef7ad7d451
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 52 additions and 51 deletions

View File

@ -5019,58 +5019,59 @@ specification and header.")
(base32 "061xy3flmj7bllibkp5wzdycvghfxvyzdr9g9yrr5q3m70a7wznz"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DCMAKE_BUILD_TYPE=Release")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-tests
(lambda _
(substitute* "CMakeLists.txt"
(("BUILD_TESTING OFF") "BUILD_TESTING ON")
;; Make tests work.
((" -fvisibility=hidden") ""))))
(add-after 'unpack 'fix-references
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/gui/general/ProjectPackager.cpp"
(("\"flac\\>")
(string-append "\"" (assoc-ref inputs "flac") "/bin/flac"))
(("\"wavpack\\>")
(string-append "\"" (assoc-ref inputs "wavpack") "/bin/wavpack"))
(("\"wvunpack\\>")
(string-append "\"" (assoc-ref inputs "wavpack") "/bin/wvunpack"))
(("\"bash\\>")
(string-append "\"" (assoc-ref inputs "bash") "/bin/bash"))
(("\"tar\\>")
(string-append "\"" (assoc-ref inputs "tar") "/bin/tar")))
(substitute* "src/gui/general/LilyPondProcessor.cpp"
(("\"convert-ly\\>")
(string-append "\"" (assoc-ref inputs "lilypond") "/bin/convert-ly"))
(("\"lilypond\\>")
(string-append "\"" (assoc-ref inputs "lilypond") "/bin/lilypond")))))
(add-after 'unpack 'make-reproducible
(lambda _
;; Prevent Last-Modified from being written.
;; The "*.qm" files that are used in locale.qrc would have a new
;; mtime otherwise that is written into qrc_locale.cpp in the
;; end - except when we disable it.
(substitute* "src/CMakeLists.txt"
(("COMMAND [$][{]QT_RCC_EXECUTABLE[}]")
"COMMAND ${QT_RCC_EXECUTABLE} --format-version 1")
;; Extraneous.
;;(("qt5_add_resources[(]rg_SOURCES ../data/data.qrc[)]")
;; "qt5_add_resources(rg_SOURCES ../data/data.qrc OPTIONS --format-version 1)")
)
;; Make hashtable traversal order predicable.
(setenv "QT_RCC_TEST" "1"))) ; important
(add-before 'check 'prepare-check
(lambda _
(setenv "QT_QPA_PLATFORM" "offscreen")
;; Tests create files in $HOME/.local/share/rosegarden .
(mkdir-p "/tmp/foo")
(setenv "HOME" "/tmp/foo")
(setenv "XDG_RUNTIME_DIR" "/tmp/foo"))))))
(list
#:configure-flags #~(list "-DCMAKE_BUILD_TYPE=Release")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-tests
(lambda _
(substitute* "CMakeLists.txt"
(("BUILD_TESTING OFF") "BUILD_TESTING ON")
;; Make tests work.
((" -fvisibility=hidden") ""))))
(add-after 'unpack 'fix-references
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/gui/general/ProjectPackager.cpp"
(("\"flac\\>")
(string-append "\"" (search-input-file inputs "/bin/flac")))
(("\"wavpack\\>")
(string-append "\"" (search-input-file inputs "/bin/wavpack")))
(("\"wvunpack\\>")
(string-append "\"" (search-input-file inputs "/bin/wvunpack")))
(("\"bash\\>")
(string-append "\"" (search-input-file inputs "/bin/bash")))
(("\"tar\\>")
(string-append "\"" (search-input-file inputs "/bin/tar"))))
(substitute* "src/gui/general/LilyPondProcessor.cpp"
(("\"convert-ly\\>")
(string-append "\"" (search-input-file inputs "/bin/convert-ly")))
(("\"lilypond\\>")
(string-append "\"" (search-input-file inputs "/bin/lilypond"))))))
(add-after 'unpack 'make-reproducible
(lambda _
;; Prevent Last-Modified from being written.
;; The "*.qm" files that are used in locale.qrc would have a new
;; mtime otherwise that is written into qrc_locale.cpp in the
;; end - except when we disable it.
(substitute* "src/CMakeLists.txt"
(("COMMAND [$][{]QT_RCC_EXECUTABLE[}]")
"COMMAND ${QT_RCC_EXECUTABLE} --format-version 1")
;; Extraneous.
;;(("qt5_add_resources[(]rg_SOURCES ../data/data.qrc[)]")
;; "qt5_add_resources(rg_SOURCES ../data/data.qrc OPTIONS --format-version 1)")
)
;; Make hashtable traversal order predicable.
(setenv "QT_RCC_TEST" "1"))) ; important
(add-before 'check 'prepare-check
(lambda _
(setenv "QT_QPA_PLATFORM" "offscreen")
;; Tests create files in $HOME/.local/share/rosegarden .
(mkdir-p "/tmp/foo")
(setenv "HOME" "/tmp/foo")
(setenv "XDG_RUNTIME_DIR" "/tmp/foo"))))))
(inputs
(list alsa-lib
bash
bash-minimal
dssi
flac
fftwf
@ -5087,7 +5088,7 @@ specification and header.")
wavpack
zlib))
(native-inputs
(list pkg-config qttools-5)) ;for qtlinguist
(list pkg-config qttools-5)) ;for qtlinguist
(synopsis "Music composition and editing environment based around a MIDI
sequencer")
(description "Rosegarden is a music composition and editing environment