aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2022-11-08 06:48:10 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-11-08 06:48:10 +0100
commite58450be4a565ec5f0ac88620773e2efedf3cc49 (patch)
tree4da3743876ead08aee95f9cfc8a86a43b8af8f68 /gnu/packages
parent4cecbc5dd262f0537d759431f04dd4c3398acbce (diff)
downloadguix-e58450be4a565ec5f0ac88620773e2efedf3cc49.tar.gz
guix-e58450be4a565ec5f0ac88620773e2efedf3cc49.zip
gnu: ultrastar-deluxe: Improve package style.
* gnu/packages/games.scm (ultrastar-deluxe): Do not exceed column 80. [source]<snippet>: Use G-Expressions. [#:phases]: Fix indentation. <fix-configure>: Add ‘where’ helper and use it to shrink horizontal space.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/games.scm78
1 files changed, 42 insertions, 36 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 83769cb39c..a5c9cad72e 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -11163,7 +11163,7 @@ and unsafe rides. Which path will you take?")
(license license:gpl2)))
(define-public ultrastar-deluxe
- ;; The last release is quite old and does not support recent versions of ffmpeg.
+ ;; The last release is quite old and does not support recent ffmpeg versions.
(let ((commit "43484b0a10ce6aae339e19d81ae2f7b37caf6baa")
(revision "1"))
(package
@@ -11181,15 +11181,16 @@ and unsafe rides. Which path will you take?")
(patches (search-patches "ultrastar-deluxe-no-freesans.patch"))
(modules '((guix build utils)))
(snippet
- `(begin
- ;; Remove Windows binaries.
- (for-each delete-file (find-files "game" "\\.dll$"))
- ;; Remove font blobs.
- (let ((font-directories (list "DejaVu" "FreeSans" "NotoSans"
- "wqy-microhei")))
- (for-each
+ #~(begin
+ ;; Remove Windows binaries.
+ (for-each delete-file (find-files "game" "\\.dll$"))
+ ;; Remove font blobs.
+ (let ((font-directories
+ (list "DejaVu" "FreeSans" "NotoSans"
+ "wqy-microhei")))
+ (for-each
(lambda (d) (delete-file-recursively
- (string-append "game/fonts/" d)))
+ (string-append "game/fonts/" d)))
font-directories))))))
(build-system gnu-build-system)
(arguments
@@ -11197,33 +11198,38 @@ and unsafe rides. Which path will you take?")
#:tests? #f ; No tests.
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'fix-configure
- (lambda* (#:key inputs configure-flags outputs #:allow-other-keys)
- ;; The configure script looks for lua$version, but we provide lua-$version.
- (substitute* "configure.ac"
- (("lua\\$i") "lua-$i"))
- ;; fpc does not pass -lfoo to the linker, but uses its own linker script,
- ;; which references libs. Pass the libraries listed in that linker script,
- ;; so our custom linker adds a correct rpath.
- (substitute* "src/Makefile.in"
- (("linkflags\\s+:= ")
- (string-append "linkflags := -lpthread -lsqlite3 -lSDL2"
- " -lSDL2_image -ldl "
- " -lz -lfreetype -lportaudio -lavcodec"
- " -lavformat -lavutil -lswresample"
- " -lswscale -llua -ldl -lX11 -lportmidi"
- " -L" (dirname (search-input-file inputs "lib/libz.so"))
- " -L" (dirname (search-input-file inputs "lib/libX11.so"))
- " -L" (dirname (search-input-file inputs "lib/libportmidi.so")))))))
- (add-after 'install 'font-paths
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* (string-append
- (assoc-ref outputs "out")
- "/share/ultrastardx/fonts/fonts.ini")
- (("=NotoSans/") (string-append "=" #$font-google-noto
- "/share/fonts/truetype/"))
- (("=DejaVu/") (string-append "=" #$font-dejavu
- "/share/fonts/truetype/"))))))))
+ (add-after 'unpack 'fix-configure
+ (lambda* (#:key inputs configure-flags outputs #:allow-other-keys)
+ (define (where inputs file)
+ (dirname (search-input-file inputs file)))
+ ;; The configure script looks for lua$version, but we
+ ;; provide lua-$version.
+ (substitute* "configure.ac"
+ (("lua\\$i") "lua-$i"))
+ ;; fpc does not pass -lfoo to the linker, but uses its own
+ ;; linker script, which references libs. Pass the libraries
+ ;; listed in that linker script, so our custom linker adds
+ ;; a correct rpath.
+ (substitute* "src/Makefile.in"
+ (("linkflags\\s+:= ")
+ (string-append
+ "linkflags := -lpthread -lsqlite3 -lSDL2"
+ " -lSDL2_image -ldl "
+ " -lz -lfreetype -lportaudio -lavcodec"
+ " -lavformat -lavutil -lswresample"
+ " -lswscale -llua -ldl -lX11 -lportmidi"
+ " -L" (where inputs "lib/libz.so")
+ " -L" (where inputs "lib/libX11.so")
+ " -L" (where inputs "lib/libportmidi.so"))))))
+ (add-after 'install 'font-paths
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* (string-append
+ (assoc-ref outputs "out")
+ "/share/ultrastardx/fonts/fonts.ini")
+ (("=NotoSans/") (string-append "=" #$font-google-noto
+ "/share/fonts/truetype/"))
+ (("=DejaVu/") (string-append "=" #$font-dejavu
+ "/share/fonts/truetype/"))))))))
(inputs (list ffmpeg
font-dejavu
font-google-noto