From patchwork Fri Sep 16 13:37:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lars-Dominik Braun X-Patchwork-Id: 42671 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id ED7AD27BBEA; Fri, 16 Sep 2022 14:39:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3A3B627BBE9 for ; Fri, 16 Sep 2022 14:39:16 +0100 (BST) Received: from localhost ([::1]:33604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZBYp-0001LT-BO for patchwork@mira.cbaines.net; Fri, 16 Sep 2022 09:39:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZBYd-0001Ig-Rm for guix-patches@gnu.org; Fri, 16 Sep 2022 09:39:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZBYd-0002Li-JX for guix-patches@gnu.org; Fri, 16 Sep 2022 09:39:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZBYc-0007h5-D7 for guix-patches@gnu.org; Fri, 16 Sep 2022 09:39:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57861] [PATCH] gnu: Add ultrastar-deluxe. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Sep 2022 13:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57861 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57861@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166333548929493 (code B ref -1); Fri, 16 Sep 2022 13:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Sep 2022 13:38:09 +0000 Received: from localhost ([127.0.0.1]:42159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZBXh-0007fZ-Oa for submit@debbugs.gnu.org; Fri, 16 Sep 2022 09:38:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:54638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZBXc-0007f6-2k for submit@debbugs.gnu.org; Fri, 16 Sep 2022 09:38:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZBXa-00088h-J8 for guix-patches@gnu.org; Fri, 16 Sep 2022 09:37:59 -0400 Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]:38104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1oZBXS-00029j-3D for guix-patches@gnu.org; Fri, 16 Sep 2022 09:37:56 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4MTZr73vHlz9sLv for ; Fri, 16 Sep 2022 15:37:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1663335447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJPSbteGNjeMs12REUr2lYtxxM/1lqu7IR3NKP/eRcg=; b=V6ovKaLtyJ19s+iwJV7gpEbgsEAodJyn4s+P5e8xNtsT+xJFtXCq47lBhMyyxu4NXf+RbD WgXeIck4otYF7YD4JqRbhsDX3gbVrJPQ3kdthomy6dII8yL45ETJCTNFbQG2ExpEpnjmJh yqRzOVrciuyGcExMtRheHa+73aaWt7gzuIt0E8hKpdI2ZhqCJfGfLVq8A8/EFbj+MPVysW GrbXGh7g8VMRz9J8hTRxHIWruX4u1aWLA5AJ6EAMFwqy9+hcDFmVRQg028+Yx1PHS3VD2a Tj84blen+S0Om6TG4pVeMkvjKuzOEyGvtBuQY/U5dNldbn1gx+xz082wQIYNUw== Date: Fri, 16 Sep 2022 15:37:25 +0200 From: Lars-Dominik Braun Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Rspamd-Queue-Id: 4MTZr73vHlz9sLv Received-SPF: pass client-ip=2001:67c:2050:0:465::102; envelope-from=lars@6xq.net; helo=mout-p-102.mailbox.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, this patch adds UltraStar Deluxe (USDX), a karaoke game. The top-level directory includes a copy of the GPL and the game sources also bear GPL headers, but there is no explicit license for assets, so it’s hard to tell whether they are actually free or not. Any opinions? If not, we could move this to the Guix games channel. Cheers, Lars --- gnu/local.mk | 1 + gnu/packages/games.scm | 91 +++++++++++++++++++ .../ultrastar-deluxe-no-freesans.patch | 31 +++++++ 3 files changed, 123 insertions(+) create mode 100644 gnu/packages/patches/ultrastar-deluxe-no-freesans.patch diff --git a/gnu/local.mk b/gnu/local.mk index cd41e6794d..9d9f6b3406 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1900,6 +1900,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 60ce0167a6..4712d9c4ca 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -11169,6 +11169,97 @@ (define-public freerct and unsafe rides. Which path will you take?") (license license:gpl2))) +;; Lazily resolve to avoid a circular dependency. +(define fpc* + (delay (module-ref (resolve-interface '(gnu packages pascal)) + 'fpc))) + +(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" #$zlib "/lib " + "-L" #$libx11 "/lib " + "-L" #$portmidi "/lib "))))) + (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 (force 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