From: Lars-Dominik Braun <lars@6xq.net>
To: Maxime Devos <maximedevos@telenet.be>
Cc: "Ludovic Courtès" <ludo@gnu.org>, 57861@debbugs.gnu.org
Subject: [bug#57861] [PATCH v2] gnu: Add ultrastar-deluxe.
Date: Wed, 19 Oct 2022 13:09:06 +0200 [thread overview]
Message-ID: <Y0/a0mB8gW4xb9o/@noor.fritz.box> (raw)
In-Reply-To: <809300ae-6aee-7b0b-115c-49ee030ea030@telenet.be>
[-- Attachment #1: Type: text/plain, Size: 162 bytes --]
Hi Maxime,
> You could give doing the resolve-module trick in (gnu packages pascal) a
> try.
or just #:autoload? The attached v2 seems to work at least.
Lars
[-- Attachment #2: 0002-gnu-Add-ultrastar-deluxe.patch --]
[-- Type: text/plain, Size: 7526 bytes --]
From c542fd020cbf69fa319ea13301b80eedd35f34a3 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Wed, 19 Oct 2022 13:05:25 +0200
Subject: [PATCH v2 2/2] gnu: Add ultrastar-deluxe.
* gnu/packages/games.scm (ultrastar-deluxe): New variable.
* gnu/packages/patches/ultrastar-deluxe-no-freesans.patch: New file.
* gnu/local.mk: Add it.
---
gnu/local.mk | 1 +
gnu/packages/games.scm | 87 +++++++++++++++++++
.../ultrastar-deluxe-no-freesans.patch | 31 +++++++
3 files changed, 119 insertions(+)
create mode 100644 gnu/packages/patches/ultrastar-deluxe-no-freesans.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index db76aa21e0..b94270e999 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1914,6 +1914,7 @@ dist_patch_DATA = \
%D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \
%D%/packages/patches/u-boot-rk3399-enable-emmc-phy.patch \
%D%/packages/patches/ucx-tcp-iface-ioctl.patch \
+ %D%/packages/patches/ultrastar-deluxe-no-freesans.patch \
%D%/packages/patches/ungoogled-chromium-extension-search-path.patch \
%D%/packages/patches/ungoogled-chromium-ffmpeg-compat.patch \
%D%/packages/patches/ungoogled-chromium-RUNPATH.patch \
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 05901df782..a2d2d7db95 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -177,6 +177,7 @@ (define-module (gnu packages games)
#:use-module (gnu packages ocaml)
#:use-module (gnu packages opencl)
#:use-module (gnu packages pcre)
+ #:autoload (gnu packages pascal) (fpc)
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-compression)
@@ -11159,6 +11160,92 @@ (define-public freerct
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.
+ (let ((commit "43484b0a10ce6aae339e19d81ae2f7b37caf6baa")
+ (revision "1"))
+ (package
+ (name "ultrastar-deluxe")
+ (version (git-version "2020.4.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/UltraStar-Deluxe/USDX.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "078g1rbm1ympmwq9s64v68sxvcms7rr0qid12d2wgm4r04ana47r"))
+ (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
+ (lambda (d) (delete-file-recursively
+ (string-append "game/fonts/" d)))
+ font-directories))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #: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/"))))))))
+ (inputs (list ffmpeg
+ font-dejavu
+ font-google-noto
+ ; Not needed, since we don’t have freesans.
+ ;font-wqy-microhei
+ freetype
+ libx11
+ lua
+ portaudio
+ portmidi
+ sdl2
+ sdl2-image
+ sqlite
+ zlib))
+ (native-inputs (list pkg-config fpc autoconf automake))
+ (synopsis "Karaoke game")
+ (description
+ "UltraStar Deluxe (USDX) is a free and open source karaoke game. It
+allows up to six players to sing along with music using microphones
+in order to score points, depending on the pitch of the voice and the
+rhythm of singing.")
+ (home-page "https://usdx.eu/")
+ (license license:gpl2+))))
+
(define-public steam-devices-udev-rules
;; Last release from 2019-04-10
(let ((commit "d87ef558408c5e7a1a793d738db4c9dc2cb5f8fa")
diff --git a/gnu/packages/patches/ultrastar-deluxe-no-freesans.patch b/gnu/packages/patches/ultrastar-deluxe-no-freesans.patch
new file mode 100644
index 0000000000..7beba80774
--- /dev/null
+++ b/gnu/packages/patches/ultrastar-deluxe-no-freesans.patch
@@ -0,0 +1,31 @@
+Remove references to FreeSans font, which is not packaged for Guix.
+
+--- a/game/fonts/fonts.ini 1970-01-01 01:00:01.000000000 +0100
++++ b/game/fonts/fonts.ini 2022-09-16 14:31:51.483096847 +0200
+@@ -116,26 +116,6 @@
+ BoldHighResPreCache=0
+ BoldHighResOutline=0.02
+
+-[Font_FreeSans]
+-Name=Free Sans
+-RegularFile=FreeSans/FreeSans.ttf
+-RegularFallbackFile1=wqy-microhei/wqy-microhei.ttc
+-;RegularGlyphSpacing=1.4
+-;RegularStretch=1.2
+-BoldFile=FreeSans/FreeSansBold.ttf
+-BoldFallbackFile1=wqy-microhei/wqy-microhei.ttc
+-;BoldEmbolden=0.06
+-OutlineFile=FreeSans/FreeSansBold.ttf
+-OutlineOutline=0.06
+-;OutlineColorR=0.3
+-;OutlineColorG=0.3
+-;OutlineColorB=0.3
+-;OutlineColorA=0.3
+-BoldHighResFile=FreeSans/FreeSansBold.ttf
+-BoldHighResMaxResolution=256
+-BoldHighResPreCache=0
+-BoldHighResOutline=0.02
+-
+ [Font_DejaVuSans]
+ Name=DejaVu Sans
+ RegularFile=DejaVu/DejaVuSans.ttf
--
2.37.3
[-- Attachment #3: 0001-gnu-fpc-Autoload-ld-wrapper.patch --]
[-- Type: text/plain, Size: 897 bytes --]
From 14ef2dcce25c47f05d8319edbcaf5de7b634bb39 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Wed, 19 Oct 2022 13:04:18 +0200
Subject: [PATCH v2 1/2] gnu: fpc: Autoload ld-wrapper.
* gnu/packages/pascal.scm: Use #:autoload for ld-wrapper.
---
gnu/packages/pascal.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm
index af7857f084..6749488f3f 100644
--- a/gnu/packages/pascal.scm
+++ b/gnu/packages/pascal.scm
@@ -28,7 +28,7 @@ (define-module (gnu packages pascal)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
- #:use-module (gnu packages commencement)
+ #:autoload (gnu packages commencement) (ld-wrapper)
#:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (gnu packages ncurses)
--
2.37.3
next prev parent reply other threads:[~2022-10-19 11:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 13:37 [bug#57861] [PATCH] gnu: Add ultrastar-deluxe Lars-Dominik Braun
2022-09-18 9:39 ` Maxime Devos
2022-09-21 11:52 ` [bug#57861] [PATCH v2] " Lars-Dominik Braun
2022-10-17 8:33 ` [bug#57861] [PATCH] " Ludovic Courtès
2022-10-17 13:25 ` Maxime Devos
2022-10-17 13:28 ` ( via Guix-patches via
2022-10-17 13:37 ` Maxime Devos
2022-10-17 16:44 ` Ludovic Courtès
2022-10-17 17:26 ` Maxime Devos
2022-10-17 8:35 ` Ludovic Courtès
2022-10-18 7:56 ` Lars-Dominik Braun
2022-10-18 12:44 ` Maxime Devos
2022-10-19 11:09 ` Lars-Dominik Braun [this message]
2022-11-07 22:59 ` bug#57861: " Ludovic Courtès
2022-10-18 12:49 ` [bug#57861] " Maxime Devos
2022-09-18 12:26 ` Maxime Devos
2022-11-07 21:41 ` Jonathan Brielmaier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y0/a0mB8gW4xb9o/@noor.fritz.box \
--to=lars@6xq.net \
--cc=57861@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.