GNU bug report logs - #76359
[PATCH] gnu: supertuxkart: Split assets into separate package.

Previous Next

Package: guix-patches;

Reported by: Eric Bavier <bavier <at> posteo.net>

Date: Mon, 17 Feb 2025 05:47:03 UTC

Severity: normal

Tags: patch

Done: Eric Bavier <bavier <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eric Bavier <bavier <at> posteo.net>
Subject: bug#76359: closed (Re: [bug#76359] [PATCH] gnu: supertuxkart:
 Split assets into separate package.)
Date: Wed, 05 Mar 2025 04:52:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#76359: [PATCH] gnu: supertuxkart: Split assets into separate package.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 76359 <at> debbugs.gnu.org.

-- 
76359: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76359
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eric Bavier <bavier <at> posteo.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 宋文武 <iyzsong <at> envs.net>, 76359-done <at> debbugs.gnu.org,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 Adam Faiz <adam.faiz <at> disroot.org>
Subject: Re: [bug#76359] [PATCH] gnu: supertuxkart: Split assets into separate
 package.
Date: Wed,  5 Mar 2025 04:51:22 +0000
On 3/4/25 08:26, Ludovic Courtès wrote:
> Eric Bavier <bavier <at> posteo.net> skribis:
>
>>  From 0764a51a3e35165a77ef4ba16f4400b3e8e1e908 Mon Sep 17 00:00:00 2001
>> Message-ID: <0764a51a3e35165a77ef4ba16f4400b3e8e1e908.1740889876.git.bavier <at> posteo.net>
>> From: Eric Bavier <bavier <at> posteo.net>
>> Date: Sun, 16 Feb 2025 23:32:07 -0600
>> Subject: [PATCH] gnu: supertuxkart: Split assets into separate package.
>>
>> This allows smaller substitutes in case of updated dependencies.
>>
>> * gnu/packages/games.scm (%supertuxkart-version): New variable.
>> (supertuxkart-source): Separate from supertuxkart in order to use in...
>> (supertuxkart-data): ... this new package.
>> (supertuxkart)[origin]: Use supertuxkart-source.
>> [arguments]: Add configure-flags to embed reference to supertuxkart-data.
>> [inputs]: Use new style.
>>
>> Change-Id: I7777574bf11fdc28047ad238468e5ec4094caeab
> LGTM, thanks!

Thanks for the review!  I've pushed this patch in 
7b33214d80e3e07421626449415e14bf120d93c9.

`~Eric


[Message part 3 (message/rfc822, inline)]
From: Eric Bavier <bavier <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Eric Bavier <bavier <at> posteo.net>
Subject: [PATCH] gnu: supertuxkart: Split assets into separate package.
Date: Mon, 17 Feb 2025 05:45:57 +0000
This allows smaller substitutes in case of updated dependencies.

* gnu/packages/games.scm (%supertuxkart-version): New variable.
(supertuxkart-source): Separate from supertuxkart in order to use in...
(supertuxkart-data): ... this new package.
(supertuxkart)[origin]: Use supertuxkart-source.
[arguments]: Add configure-flags to embed reference to supertuxkart-data.
[inputs]: Use new style.

Change-Id: I7777574bf11fdc28047ad238468e5ec4094caeab
---
 gnu/packages/games.scm | 138 +++++++++++++++++++++++++++++------------
 1 file changed, 98 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 843771b2fa..e58dd29199 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4697,19 +4697,17 @@ (define-public exult
     (home-page "http://exult.info/")
     (license license:gpl2+)))
 
-(define-public supertuxkart
-  (package
-    (name "supertuxkart")
-    (version "1.4")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/supertuxkart/stk-code/"
-                           "releases/download/"
-                           version "/SuperTuxKart-" version "-src.tar.xz"))
+(define %supertuxkart-version "1.4")
+(define supertuxkart-source
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://github.com/supertuxkart/stk-code")
+          (commit %supertuxkart-version)))
        (sha256
         (base32
-         "00qg5i9y4i5gdiiq1dbfsgp7dwj60zb5lkgi2d9p3x5s34j3k44q"))
+         "1hv4p0430zw6qm5fgsmayhj8hdxx7qpzggwks5w26z0dz1b5m9w2"))
+       (file-name (git-file-name "supertuxkart" %supertuxkart-version))
        (modules '((guix build utils)))
        (snippet
         ;; Delete bundled library sources
@@ -4723,38 +4721,98 @@ (define-public supertuxkart
                        "lib/enet"
                        "lib/mcpp"
                        "lib/mojoal"
-                       "lib/wiiuse"))
-           #t))))
+                       "lib/wiiuse"))))))
+
+(define supertuxkart-data
+  ;; There are no tags or releases for the stk-assets data, nor indication of
+  ;; which revision is bundled into the released SuperTuxKart-*-src tarball;
+  ;; use the latest SVN revision available.
+  (let ((commit "18593")
+        (revision "0"))
+    (hidden-package
+     (package
+       (name "supertuxkart-data")
+       ;; The package produced is a merger of supertuxkart's "stk-assets"
+       ;; repository and the "stk-code" repository's "data" directory, so
+       ;; include the code version as well.
+       (version (string-append %supertuxkart-version "-" commit))
+       (source
+        (origin
+          (method svn-fetch)
+          (uri (svn-reference
+                (url "https://svn.code.sf.net/p/supertuxkart/code/stk-assets")
+                (revision (string->number commit))))
+          (file-name (string-append name "-" commit "-checkout"))
+          (sha256
+           (base32
+            "0x2l45w1ahgkw9mrbcxzwdlqs7rams6rsga9m40qjapfiqmvlvbg"))))
+       (build-system copy-build-system)
+       (arguments
+        (list #:install-plan
+              #~'(("." "share/supertuxkart/data"
+                   #:exclude-regexp ("wip-.*")))
+              #:phases
+              #~(modify-phases %standard-phases
+                  (add-after 'unpack 'copy-code-data
+                    (lambda _
+                      (copy-recursively
+                       (string-append #$supertuxkart-source "/data/")
+                       "."))))))
+       (home-page "https://supertuxkart.net/Main_Page")
+       (synopsis "Data files for SuperTuxKart")
+       (description "This package contains data files for SuperTuxKart.")
+       (license (list license:gpl3+
+                      license:cc-by-sa3.0
+                      license:cc-by-sa4.0
+                      license:cc0))))))
+
+(define-public supertuxkart
+  (package
+    (name "supertuxkart")
+    (version %supertuxkart-version)
+    (source supertuxkart-source)
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f ; no check target
-       #:configure-flags
-       (list "-DUSE_WIIUSE=0"
-             "-DUSE_SYSTEM_ENET=TRUE"
-             "-DUSE_CRYPTO_OPENSSL=TRUE"
-             ;; In order to use the system ENet library, IPv6 support (added in
-             ;; SuperTuxKart version 1.1) must be disabled.
-             "-DUSE_IPV6=FALSE")))
+     (list #:tests? #f                  ; no check target
+           #:configure-flags
+           #~(list "-DCHECK_ASSETS=FALSE" ; assets are out-of-tree
+                   (string-append "-DSTK_INSTALL_DATA_DIR_ABSOLUTE="
+                                  #$(this-package-input "supertuxkart-data")
+                                  "/share/supertuxkart")
+                   "-DUSE_WIIUSE=0"
+                   "-DUSE_SYSTEM_ENET=TRUE"
+                   "-DUSE_CRYPTO_OPENSSL=TRUE"
+                   ;; In order to use the system ENet library, IPv6 support
+                   ;; (added in SuperTuxKart version 1.1) must be disabled.
+                   "-DUSE_IPV6=FALSE")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'disable-data-install
+                 (lambda _
+                   (substitute* "CMakeLists.txt"
+                     (("^install\\(.*STK_DATA_DIR" &)
+                      (string-append "# " &))))))))
     (inputs
-     `(("curl" ,curl)
-       ("freetype" ,freetype)
-       ("fribidi" ,fribidi)
-       ("glew" ,glew)
-       ("harfbuzz" ,harfbuzz)
-       ("libopenglrecorder" ,libopenglrecorder)
-       ("libvorbis" ,libvorbis)
-       ("libx11" ,libx11)
-       ("libxrandr" ,libxrandr)
-       ("mesa" ,mesa)
-       ("openal" ,openal)
-       ("sdl2" ,sdl2)
-       ("sqlite" ,sqlite)
-       ("zlib" ,zlib)
-       ;; The following input is needed to build the bundled and modified
-       ;; version of irrlicht.
-       ("enet" ,enet)
-       ("libjpeg" ,libjpeg-turbo)
-       ("openssl" ,openssl)))
+     (list curl
+           freetype
+           fribidi
+           glew
+           harfbuzz
+           libopenglrecorder
+           libvorbis
+           libx11
+           libxrandr
+           mesa
+           openal
+           sdl2
+           sqlite
+           supertuxkart-data
+           zlib
+           ;; The following input is needed to build the bundled and modified
+           ;; version of irrlicht.
+           enet
+           libjpeg-turbo
+           openssl))
     (native-inputs (list mcpp pkg-config python))
     (home-page "https://supertuxkart.net/Main_Page")
     (synopsis "3D kart racing game")

base-commit: 61440f9c64e64eb8dbe29b8b94decdf85ef4b605
prerequisite-patch-id: 44e80fdef3b037e716a24124be2d8baadf1f071a
-- 
2.48.1




This bug report was last modified 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.