From patchwork Mon Oct 28 06:26:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 69580 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 6CAF927BBEA; Mon, 28 Oct 2024 06:29:01 +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=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 C545227BBE2 for ; Mon, 28 Oct 2024 06:29:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5JEw-0005YP-Gc; Mon, 28 Oct 2024 02:28:34 -0400 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 1t5JEs-0005XL-Ca for guix-patches@gnu.org; Mon, 28 Oct 2024 02:28:30 -0400 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 1t5JEq-0006ij-7m for guix-patches@gnu.org; Mon, 28 Oct 2024 02:28:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=AD+sDDu69N5XljRZ+yEpXxoi9L7hEYyQ8JtR2nbhIqM=; b=ZsIzlu/jJlz5pJyA/dy5/ueJAV4E7Gag+gVp6OsOfhwx/FQMUmHHBYpUigm2qTUgrgeAwvNQpGBPxkszCar8EFO7gksW/iGj38LjkPrGeWR+LxpwqPCkFF1oV8n82v2IYN0ML4zx91oCvtUhVXZwYrW6Ggs4svN9YkJorGyySrNC/YX1tse6LXY1YYpi/9cNLx0ayPq4Kgl/BTUnWHeH3G9G1XqaRN5hprONnN/eJQeeR5zjFLyBjoBWWPYDOrX0npRMv8xdGVTBU5Rm5o7IsGZwiBnPkTzHbPfquJapQckBGJ7C1xOWoe0dB5n/Tcmy4PSGwoCtie3KQHzuPbLmSQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5JFP-0003kX-3a; Mon, 28 Oct 2024 02:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74054] [PATCH v2 3/3] gnu: Add speed-dreams. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, adam.faiz@disroot.org, liliana.prikler@gmail.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Mon, 28 Oct 2024 06:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74054 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74054@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Adam Faiz , Liliana Marie Prikler , =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-Xcc: Maxim Cournoyer , Adam Faiz , Liliana Marie Prikler , =?utf-8?b?5a6L5paH5q2m?= Received: via spool by 74054-submit@debbugs.gnu.org id=B74054.173009690414333 (code B ref 74054); Mon, 28 Oct 2024 06:29:03 +0000 Received: (at 74054) by debbugs.gnu.org; 28 Oct 2024 06:28:24 +0000 Received: from localhost ([127.0.0.1]:51414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5JEm-0003j5-1O for submit@debbugs.gnu.org; Mon, 28 Oct 2024 02:28:24 -0400 Received: from mail-pf1-f179.google.com ([209.85.210.179]:43282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5JEk-0003iU-Lm for 74054@debbugs.gnu.org; Mon, 28 Oct 2024 02:28:23 -0400 Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-718e9c8bd83so3378275b3a.1 for <74054@debbugs.gnu.org>; Sun, 27 Oct 2024 23:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730096801; x=1730701601; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AD+sDDu69N5XljRZ+yEpXxoi9L7hEYyQ8JtR2nbhIqM=; b=HX7LJWK9SaqvQ7YbKyCyHihk3VuPMRjNiPzlEsDmOuUo5p0JfcrhxadkxAb/YGlQDr YICOINQayrj+uQfqFFnF8cOCPeIQvWpFkG2A3HnoE3EUnfJqLQXKRMXdBO3VzlnT0QN7 QsSrDQUHwSUkgxZBTEqhprFklv+faEJvgj5bW0srvq/oj18iCWwvL7CMFnUfAu+jF9Kg 04ckkGT6WWV7SHMMZombkFsKiiqbWV2oNAo18+Jql/AMZ6Akat8Z73CdaPI6LLVgoXfI 1ngqiuR5EyevS26gtRJLgt/L6RQE8Ib+AWXDjNRrMrnM9ydobRpVLV9XL/oqDvx8Aqye rrXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730096801; x=1730701601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AD+sDDu69N5XljRZ+yEpXxoi9L7hEYyQ8JtR2nbhIqM=; b=NMDJkfvW+D0b+RDQxfMt93C+zEiKwGjYlhYXOhW9zCwin/k0GWeW3iRtL4sp+HvP/S nBuYXzURI6ep7wSvEL0h8W1iGN9yqg5VjojnjzMRNOXL9b5NT1nvFsEiN0OWIxkyZe3W WeIuE97VxjbJuHDSBdkaTYiFmdj5IOew6YOSyU/tQGkVYM51KYtlesvPd0JyRvDH10Rz 5a48ExjexONETWsOGjdznFfxeSgm6UquYui7IZMbXEpaJV9AYFtC8V2UUrl7yy2Vljkw GTJAFd4+DcMl+IE8wnQ1ZJJNPMWL+IoEXh+f3f1tVNQ3Z9qeEguWkl7nbao+2QW09Bv7 g2kQ== X-Gm-Message-State: AOJu0Yz8NibTJ8h2wa0D8WXlEcz1NOPC00ev47WZyWY2zY56FEeypuSD +Z//94hgOHBDQ4E0Sw0lpmjB7Jdne4F/auYosP8LnO4S0K3Mt45l0T5cWuTQ X-Google-Smtp-Source: AGHT+IGxH1BIZRLYMJ3jNFBv/+jqCI74XaxjmqyaylIzOPRHJxwDuv+rZrCGUhKMCFeClQmfUriYGw== X-Received: by 2002:a62:e20f:0:b0:71e:76dc:10f7 with SMTP id d2e1a72fcca58-72062f712edmr8918637b3a.4.1730096800474; Sun, 27 Oct 2024 23:26:40 -0700 (PDT) Received: from localhost.localdomain (vps-6234970c.vps.ovh.ca. [51.222.13.224]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057a3fdf2sm4993850b3a.214.2024.10.27.23.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2024 23:26:40 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 28 Oct 2024 15:26:08 +0900 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 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 * gnu/packages/games.scm (speed-dreams): New variable. (speed-dreams-version, speed-dreams-svn-revision): New variables. (speed-dreams-source-tarball): New procedure. (speed-dreams-base-tarball, speed-dreams-more-hq-cars-and-tracks-tarball) (speed-dreams-wip-cars-and-tracks-tarball) (speed-dreams-unmaintained-tarball): New variable. Change-Id: Id14f3556d47a80c508177940f959448520b406fc --- (no changes since v1) gnu/packages/games.scm | 122 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 64b6b0941a..be96ed895b 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -8964,6 +8964,128 @@ (define-public endless-sky license:cc-by-sa4.0 license:public-domain)))) +(define speed-dreams-version "2.3.0") +(define speed-dreams-svn-revision "8786") +(define (speed-dreams-source-tarball name sha256sum) + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/speed-dreams/" + speed-dreams-version "/" + "speed-dreams-src-" name "-" speed-dreams-version "-r" + speed-dreams-svn-revision ".tar.xz")) + (sha256 (base32 sha256sum)))) + +;;; We use the release tarballs instead of the SVN repository for their +;;; reduced weight (the tarballs do not provide the sources of the 3D models +;;; used, which are heavy, for example). +(define speed-dreams-base-tarball ;about 240 MiB + (speed-dreams-source-tarball + "base" "190480qzkllykl07s6bxd5wdbjgavs7haw6mk0hgdm7bs6rqqk0d")) + +(define speed-dreams-hq-cars-and-tracks-tarball ;about 670 MiB + (speed-dreams-source-tarball + "hq-cars-and-tracks" "16zcgwax3n0gf79hw1dg42lzsyxbnxfw6hjxdi919q5hxgm9cgsr")) + +(define speed-dreams-more-hq-cars-and-tracks-tarball ;about 760 MiB + (speed-dreams-source-tarball + "more-hq-cars-and-tracks" + "1acwiacf77qk5azyg3bbxsydk3wsp5fvgwwnhxpk273mwszjkh56")) + +;;; Although these are marked as 'WIP', the game throws (non-fatal) errors +;;; when it fails finding some "drivers" included within this pack. +(define speed-dreams-wip-cars-and-tracks-tarball ;about 400 MiB + (speed-dreams-source-tarball + "wip-cars-and-tracks" + "0wqd9bpis9bg87rsqk0dyvljax4zrp9h57mz7z3zrn6fayl1nh1q")) + +;;; This is to allow selecting the legacy Simu V2 engine (configurable in the +;;; game options). +(define speed-dreams-unmaintained-tarball ;about 60 KiB + (speed-dreams-source-tarball + "unmaintained" "1cxcrjm2508najpz2b65i8gxgvgiq7fcp13xvicpiqp6xhq3hsyi")) + +(define-public speed-dreams + (package + (name "speed-dreams") + (version speed-dreams-version) + (source speed-dreams-base-tarball) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;no test suite + #:build-type "Release" + #:configure-flags + #~(list + "-DOPTION_OFFICIAL_ONLY=ON" ;build with content + (string-append "-DSD_BINDIR=" #$output "/bin") ;instead of 'games' + (string-append "-DSD_DATADIR=" #$output "/share/speed-dreams-2") + ;; Libdir defaults to a 'lib64/games' prefix. + (string-append "-DSD_LIBDIR=" #$output "/lib/speed-dreams-2") + ;; Use system-provided Expat and FreeSOLID + ;; libraries instead of the bundled ones. + "-DOPTION_3RDPARTY_EXPAT=ON" + "-DOPTION_3RDPARTY_SOLID=ON" + ;; Drivers and other shared objects are linked to private/internal + ;; shared libraries; have their location on the RUNPATH to satisfy + ;; the validate-runpath phase. + (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath=" + #$output "/lib/speed-dreams-2/lib") + ;; The following flag is to avoid bogus RUNPATH warnings from the + ;; validate-runpath phase; without it, -rpath links referring to the + ;; build directory would be baked in driver modules. + "-DCMAKE_BUILD_RPATH_USE_ORIGIN=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'extract-cars-and-tracks-data + (lambda _ + ;; XXX: The current working directory is inside the cmake/ + ;; sudbirectory following the unpack phase, for some reason. + (chdir "..") + (invoke "tar" "-xvf" #$speed-dreams-hq-cars-and-tracks-tarball) + (invoke "tar" "-xvf" #$speed-dreams-more-hq-cars-and-tracks-tarball) + (invoke "tar" "-xvf" #$speed-dreams-wip-cars-and-tracks-tarball) + (invoke "tar" "-xvf" #$speed-dreams-unmaintained-tarball))) + (add-after 'install 'install-desktop-entry + (lambda* (#:key outputs #:allow-other-keys) + (make-desktop-entry-file + (string-append #$output + "/share/applications/speed-dreams.desktop") + #:name "Speed Dreams 2" + #:comment "3D racing cars simulator" + #:exec (search-input-file outputs "bin/speed-dreams-2") + #:icon (search-input-file + outputs "share/speed-dreams-2/data/icons/icon.png") + #:categories '("Game" "Simulation"))))))) + (native-inputs + (list pkg-config)) + (inputs + (list curl + enet + expat + freeglut + freesolid + freetype + libjpeg-turbo + libogg + libpng + libvorbis + openal + openscenegraph + plib + sdl2 + sdl2-mixer + zlib)) + (home-page "https://sourceforge.net/projects/speed-dreams/") + (synopsis "Car racing simulator") + (description "Speed Dreams is a car racing simulator featuring +high-quality 3D graphics and an accurate physics engine, aiming for maximum +realism. Initially forked from TORCS, it features improvements to the +graphics and physics simulation, and supports modern input methods such as +gamepads by use of the SDL library. It features more than 20 tracks and more +than 80 cars to race with.") + (license (list license:gpl2+ ;game code + license:lal1.3)))) ;assets + (define-public stepmania (package (name "stepmania")