[bug#73989,games-team,0/2] Add TORCS.

Message ID cover.1729784644.git.maxim.cournoyer@gmail.com
Headers
Series Add TORCS. |

Message

Maxim Cournoyer Oct. 24, 2024, 3:45 p.m. UTC
  This adds TORCS, a car racing game/simulator.

Maxim Cournoyer (2):
  gnu: plib: Build with -fPIC.
  gnu: Add torcs.

 gnu/packages/game-development.scm |  10 ++-
 gnu/packages/games.scm            | 123 ++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+), 4 deletions(-)


base-commit: e4e1e16bc1b27684b55e6bf047f9f669e1a0c7b5
  

Comments

Rodion Goritskov Nov. 6, 2024, 8:40 p.m. UTC | #1
I tried to apply and build this patchset with the current master.
It applies fine (with some warnings on whitespaces).

Plib builds fine. However, TORCS fails to build with the following error:

building /gnu/store/1r1lq54yhvh748jsdmd1apdxss5qbk11-download.drv...
source is at 'download'
applying '/gnu/store/jlgga73s3qj44kkdqagqhg32ipiqmlrk-torcs-isnan.patch'...
can't find file to patch at input line 7
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Source: https://src.fedoraproject.org/rpms/torcs/raw/rawhide/f/torcs-1.3.7-isnan.patch
|Upstream-status: https://sourceforge.net/p/torcs/mailman/torcs-devel/thread/0bd466b7-e158-471b-13ad-504167587d01%40embecosm.com/#msg35836767
|
|diff -up torcs-1.3.7/src/drivers/olethros/geometry.cpp.orig torcs-1.3.7/src/drivers/olethros/geometry.cpp
|--- torcs-1.3.7/src/drivers/olethros/geometry.cpp.orig 2016-06-07 19:49:11.347896827 +0100
|+++ torcs-1.3.7/src/drivers/olethros/geometry.cpp      2016-06-07 19:49:46.532894257 +0100
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Backtrace:
           5 (primitive-load "/gnu/store/chd1n6n2aaiqljahnh858rs8dbr?")
In ice-9/eval.scm:
    619:8  4 (_ #(#(#<directory (guile-user) 7ffff7850c80> "dow?") #))
In ice-9/boot-9.scm:
    142:2  3 (dynamic-wind #<procedure 7ffff5f6ab20 at ice-9/eval.s?> ?)
In ice-9/eval.scm:
    619:8  2 (_ #(#(#<directory (guile-user) 7ffff7850c80>)))
In srfi/srfi-1.scm:
    634:9  1 (for-each #<procedure apply-patch (a)> ("/gnu/store/?" ?))
In guix/build/utils.scm:
    822:6  0 (invoke "/gnu/store/4jhlsg65s1zx90gnnfmaax52i8prnl45-p?" ?)

guix/build/utils.scm:822:6: In procedure invoke:
ERROR:
  1. &invoke-error:
      program: "/gnu/store/4jhlsg65s1zx90gnnfmaax52i8prnl45-patch-2.7.6/bin/patch"
      arguments: ("--force" "--no-backup-if-mismatch" "-p1" "--input" "/gnu/store/jlgga73s3qj44kkdqagqhg32ipiqmlrk-torcs-isnan.patch")
      exit-status: 1
      term-signal: #f
      stop-signal: #f
builder for `/gnu/store/1r1lq54yhvh748jsdmd1apdxss5qbk11-download.drv' failed with exit code 1
build of /gnu/store/1r1lq54yhvh748jsdmd1apdxss5qbk11-download.drv failed
Could not find build log for '/gnu/store/1r1lq54yhvh748jsdmd1apdxss5qbk11-download.drv'.
cannot build derivation `/gnu/store/n9lsyw8ksynkwq88mr5jikdcwcz4lfnh-torcs-1.3.7.drv': 1 dependencies couldn't be built
guix build: error: build of `/gnu/store/n9lsyw8ksynkwq88mr5jikdcwcz4lfnh-torcs-1.3.7.drv' failed
  
Maxim Cournoyer Nov. 12, 2024, 11:49 a.m. UTC | #2
Hi!

Rodion Goritskov <rodion.goritskov@gmail.com> writes:

> I tried to apply and build this patchset with the current master.
> It applies fine (with some warnings on whitespaces).
>
> Plib builds fine. However, TORCS fails to build with the following error:
>
> building /gnu/store/1r1lq54yhvh748jsdmd1apdxss5qbk11-download.drv...
> source is at 'download'
> applying '/gnu/store/jlgga73s3qj44kkdqagqhg32ipiqmlrk-torcs-isnan.patch'...
> can't find file to patch at input line 7
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |Source: https://src.fedoraproject.org/rpms/torcs/raw/rawhide/f/torcs-1.3.7-isnan.patch
> |Upstream-status:
> | https://sourceforge.net/p/torcs/mailman/torcs-devel/thread/0bd466b7-e158-471b-13ad-504167587d01%40embecosm.com/#msg35836767
> |
> |diff -up torcs-1.3.7/src/drivers/olethros/geometry.cpp.orig torcs-1.3.7/src/drivers/olethros/geometry.cpp
> |--- torcs-1.3.7/src/drivers/olethros/geometry.cpp.orig 2016-06-07 19:49:11.347896827 +0100
> |+++ torcs-1.3.7/src/drivers/olethros/geometry.cpp      2016-06-07 19:49:46.532894257 +0100
> --------------------------

Ah! That download.drv seemed wrong.  I think it is caused by a last
minute change I did following 'guix lint', which suggested adapting the
URL; I had added /download at the end of the URL and apparently that
threw off our unpacking phase, which no longer considered it a tarball
or something.

Anyway, fixed by adding a 'file-name' field to the origin, and pushed as
18bd867b24 as a fixup commit.

Enjoy!
  
Maxim Cournoyer Nov. 13, 2024, 2:57 a.m. UTC | #3
Hi Rodion,

Rodion Goritskov <rodion.goritskov@gmail.com> writes:

> I tried to apply and build this patchset with the current master.
> It applies fine (with some warnings on whitespaces).
>
> Plib builds fine. However, TORCS fails to build with the following error:

Thanks, I've fixed it, now also on master.  It had todo with a last
minute change in the source URL, which caused the file name in the store
to be just 'download' and broke the unpack logic, which uses the
filename extension.