From patchwork Mon Feb 17 05:45:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Bavier X-Patchwork-Id: 38765 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 5A9A027BBE9; Mon, 17 Feb 2025 05:47:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A 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 70B0527BBE2 for ; Mon, 17 Feb 2025 05:47:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjtyG-0002Td-7C; Mon, 17 Feb 2025 00:47:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjtyD-0002TU-LJ for guix-patches@gnu.org; Mon, 17 Feb 2025 00:47:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjtyD-0001hJ-57 for guix-patches@gnu.org; Mon, 17 Feb 2025 00:47:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=6DPInBi8WCyeg+H66PPZ/dIFp51KLEYgPDTNofnBBhY=; b=SUzSvDUsKKxfXwUmhU1TX1vgSfhnNt9w7d8YkQnbOeTpPuJYtrBNKn6Qfrnm6nhlHA0a4KhHJl0FX2v9/Qi+4g8DsrV71rW2e0ADqqrVwhWW9xdrUaT+WbVchnUrX0eAJ4s01E80vTPnLHeIJ8iJHXJlvbOnxaq+DEnfm4hqj4wl0jby61kBUX4yWAdzK1a3E+UtQBjWhjcTUSnAAF6jLr3fXkV+/7lGP17VDw7WLQSbKsWTkG9syAZRULPeYyG9LTa0+ONgVzaWCvsFj5s1ixjsaUr6JKrLLGp4XLSGBIMG+7p+9gquTcQdOcx+70TCLdMCtMp4N5DiKIzWDvR6vg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjtyB-0007jV-QA; Mon, 17 Feb 2025 00:47:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76359] [PATCH] gnu: supertuxkart: Split assets into separate package. Resent-From: Eric Bavier Original-Sender: "Debbugs-submit" Resent-CC: adam.faiz@disroot.org, liliana.prikler@gmail.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2025 05:47:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76359 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76359@debbugs.gnu.org Cc: Eric Bavier , Adam Faiz , Liliana Marie Prikler , =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Adam Faiz , Liliana Marie Prikler , =?utf-8?b?5a6L5paH5q2m?= Received: via spool by submit@debbugs.gnu.org id=B.173977119929623 (code B ref -1); Mon, 17 Feb 2025 05:47:03 +0000 Received: (at submit) by debbugs.gnu.org; 17 Feb 2025 05:46:39 +0000 Received: from localhost ([127.0.0.1]:41289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjtxm-0007hh-8J for submit@debbugs.gnu.org; Mon, 17 Feb 2025 00:46:38 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46478) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjtxj-0007h9-Sw for submit@debbugs.gnu.org; Mon, 17 Feb 2025 00:46:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjtxc-0002Rh-LL for guix-patches@gnu.org; Mon, 17 Feb 2025 00:46:30 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjtxa-0001cC-BY for guix-patches@gnu.org; Mon, 17 Feb 2025 00:46:28 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 22385240101 for ; Mon, 17 Feb 2025 06:46:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739771185; bh=1uBso8ftl2pHoJOSooIZ7yBIqYO1TefQwvtZevnRYQ0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=R2qb4q/EDUAmV44t/n7JL3uB5JU0SZftTTrfLdkSSr8zLBemD/91WcdMtxK+h3LHs 3CjFJGo645ZbGFH6a/LBJM5Dof/4v9bOW9FEy6orTA8LockZWGW8jJg8gRyvCKFGCp JTQR+2xwods7gHg2zl0BsCG6JBtXQDbt396yXaMsCX6YWFyK6Al5dqG8AOfBDIbeJk /FHJ5IwunneDzx1VoJlgnqKx/JCbcQlD63n/EkuIiEnqXkU5FMV/R21N8cks5HQWD1 2StbujNZ0UCGRrIzfQRJTGHCOppgcPrFSUnRkozxP0VRRFpa3QOQ/RpZ0jf6PzIc+1 nxSYteOwWbLmg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YxBV82696z9rxB; Mon, 17 Feb 2025 06:46:23 +0100 (CET) From: Eric Bavier Date: Mon, 17 Feb 2025 05:45:57 +0000 Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.66; envelope-from=bavier@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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(-) base-commit: 61440f9c64e64eb8dbe29b8b94decdf85ef4b605 prerequisite-patch-id: 44e80fdef3b037e716a24124be2d8baadf1f071a 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")