[PATCH 0/3] Add Speed Dreams racing simulator

  • Done
  • quality assurance status badge
Details
2 participants
  • Liliana Marie Prikler
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 28 Oct 04:31 +0100
(address . guix-patches@gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
cover.1730086201.git.maxim.cournoyer@gmail.com
This adds Speed Dreams, a racing simulator improved from TORCS, and FreeSOLID,
one of its dependencies.

Maxim Cournoyer (3):
gnu: Add freesolid.
gnu: plib: Build with -fPIC.
gnu: Add speed-dreams.

gnu/local.mk | 4 +
gnu/packages/game-development.scm | 40 +++++-
gnu/packages/games.scm | 122 ++++++++++++++++++
gnu/packages/patches/freesolid-automake.patch | 60 +++++++++
.../patches/freesolid-autotools.patch | 73 +++++++++++
.../patches/freesolid-configure.patch | 40 ++++++
.../patches/freesolid-pkgconfig.patch | 46 +++++++
7 files changed, 381 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/freesolid-automake.patch
create mode 100644 gnu/packages/patches/freesolid-autotools.patch
create mode 100644 gnu/packages/patches/freesolid-configure.patch
create mode 100644 gnu/packages/patches/freesolid-pkgconfig.patch


base-commit: e4e1e16bc1b27684b55e6bf047f9f669e1a0c7b5
--
2.46.0
M
M
Maxim Cournoyer wrote on 28 Oct 04:35 +0100
[PATCH 1/3] gnu: Add freesolid.
(address . 74054@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
f31f33b52776e8e7d398a9ace4c08c78b9608edf.1730086201.git.maxim.cournoyer@gmail.com
* gnu/packages/game-development.scm (freesolid): New variable.
* gnu/packages/patches/freesolid-configure.patch: New file.
* gnu/packages/patches/freesolid-pkgconfig.patch: Likewise.
* gnu/packages/patches/freesolid-automake.patch: Likewise.
* gnu/packages/patches/freesolid-autotools.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Register them.

Change-Id: I557332031a30d944f451d0a62c763e5b41c4e29b
---
gnu/local.mk | 4 +
gnu/packages/game-development.scm | 30 ++++++++
gnu/packages/patches/freesolid-automake.patch | 60 +++++++++++++++
.../patches/freesolid-autotools.patch | 73 +++++++++++++++++++
.../patches/freesolid-configure.patch | 40 ++++++++++
.../patches/freesolid-pkgconfig.patch | 46 ++++++++++++
6 files changed, 253 insertions(+)
create mode 100644 gnu/packages/patches/freesolid-automake.patch
create mode 100644 gnu/packages/patches/freesolid-autotools.patch
create mode 100644 gnu/packages/patches/freesolid-configure.patch
create mode 100644 gnu/packages/patches/freesolid-pkgconfig.patch

Toggle diff (308 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 911af88627..73121dce5d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1289,6 +1289,10 @@ dist_patch_DATA = \
%D%/packages/patches/freeimage-unbundle.patch \
%D%/packages/patches/freeimage-CVE-2020-21428.patch \
%D%/packages/patches/freeimage-CVE-2020-22524.patch \
+ %D%/packages/patches/freesolid-automake.patch \
+ %D%/packages/patches/freesolid-autotools.patch \
+ %D%/packages/patches/freesolid-configure.patch \
+ %D%/packages/patches/freesolid-pkgconfig.patch \
%D%/packages/patches/fulcrum-1.9.1-unbundled-libraries.patch \
%D%/packages/patches/fuse-glibc-2.34.patch \
%D%/packages/patches/fuse-overlapping-headers.patch \
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index ee869c9cc5..25cc021f6f 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -30,6 +30,7 @@
;;; Copyright © 2022 dan <i@dan.games>
;;; Copyright © 2023, 2024 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2796,6 +2797,35 @@ (define-public flatzebra
double-buffering.")
(license license:gpl2+)))
+(define-public freesolid
+ (package
+ (name "freesolid")
+ (version "2.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/" name "/FreeSOLID-"
+ version ".zip"))
+ (sha256
+ (base32
+ "0wxqiv1ba227kwxpgwf6in9ai1lcamhmp1ib1c1chq4xvnpwdvc9"))
+ (patches (search-patches "freesolid-autotools.patch"
+ "freesolid-pkgconfig.patch"
+ "freesolid-configure.patch"
+ "freesolid-automake.patch"))))
+ (build-system gnu-build-system)
+ (arguments (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'force-reboostrap
+ (lambda _
+ (delete-file "bootstrap.sh")
+ (delete-file "configure"))))))
+ (native-inputs (list autoconf automake libtool unzip))
+ (home-page "https://sourceforge.net/projects/freesolid/")
+ (synopsis "3D collision detection C++ library")
+ (description "FreeSOLID is a library for collision detection of
+three-dimensional objects undergoing rigid motion and deformation. FreeSOLID
+is designed to be used in interactive 3D graphics applications.")
+ (license license:lgpl2.0+)))
+
(define-public libccd
(package
(name "libccd")
diff --git a/gnu/packages/patches/freesolid-automake.patch b/gnu/packages/patches/freesolid-automake.patch
new file mode 100644
index 0000000000..157d308641
--- /dev/null
+++ b/gnu/packages/patches/freesolid-automake.patch
@@ -0,0 +1,60 @@
+FreeSOLID-2.1.1-Makefile.am-update.patch
+
+From: Alec Leamas <alec@tests.notat.diaspora.com>
+
+This patch causes a few extra header files to be installed; they are used by
+Speed-Dreams for example.
+
+Source: https://src.fedoraproject.org/rpms/FreeSOLID/raw/rawhide/f/FreeSOLID-2.1.1-Makefile.am-update.patch
+Rebased on top of 2.1.2 by Maxim Cournoyer
+Upstream-status: https://sourceforge.net/p/freesolid/patches/11/
+
+---
+
+ Makefile.am | 20 ++++++++++++++++++--
+ libsolid/Makefile.am | 2 +-
+ 2 files changed, 19 insertions(+), 3 deletions(-)
+
+--- a/Makefile.am 2024-10-28 10:57:11.026754300 +0900
++++ b/Makefile.am 2024-10-28 10:59:13.178729378 +0900
+@@ -1,5 +1,5 @@
+ ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = libmoto libbroad libsolid sample doc
+
+-EXTRA_DIST = include
++EXTRA_DIST = FreeSOLID.pc.in
+ bin_SCRIPTS = freesolid-config
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-dist_pkgconfig_DATA = FreeSOLID.pc
++nodist_pkgconfig_DATA = FreeSOLID.pc
++
++FreeSOLID_3Ddir = $(includedir)/FreeSOLID/3D
++FreeSOLID_3D_HEADERS =
++FreeSOLID_3D_HEADERS += include/3D/Basic.h
++FreeSOLID_3D_HEADERS += include/3D/Matrix.h
++FreeSOLID_3D_HEADERS += include/3D/Point.h
++FreeSOLID_3D_HEADERS += include/3D/Quaternion.h
++FreeSOLID_3D_HEADERS += include/3D/Tuple3.h
++FreeSOLID_3D_HEADERS += include/3D/Tuple4.h
++FreeSOLID_3D_HEADERS += include/3D/Vector.h
++
++FreeSOLID_SOLIDdir = $(includedir)/FreeSOLID/SOLID
++FreeSOLID_SOLID_HEADERS =
++FreeSOLID_SOLID_HEADERS += include/SOLID/solid.h
++FreeSOLID_SOLID_HEADERS += include/SOLID/broad.h
++FreeSOLID_SOLID_HEADERS += include/SOLID/types.h
+
+diff --git a/libsolid/Makefile.am b/libsolid/Makefile.am
+index f722be3..623b2e8 100644
+--- a/libsolid/Makefile.am
++++ b/libsolid/Makefile.am
+@@ -21,7 +21,7 @@ libFreeSOLID_la_SOURCES = \
+ ../libmoto/MT_Vector4.cpp
+
+
+-libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@ -release @VERSION@
++libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@
+
+ AM_CPPFLAGS = @CPPFLAGS@
+ LIBS = @QHULL_LIBS@ -lm
diff --git a/gnu/packages/patches/freesolid-autotools.patch b/gnu/packages/patches/freesolid-autotools.patch
new file mode 100644
index 0000000000..df99bdcd67
--- /dev/null
+++ b/gnu/packages/patches/freesolid-autotools.patch
@@ -0,0 +1,73 @@
+Upstream-status: https://sourceforge.net/p/freesolid/patches/1/
+
+Resolve Autoconf warnings.
+
+diff --git a/Makefile.am b/Makefile.am
+index 4914f44..77b157a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,5 @@
++ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = libmoto libbroad libsolid sample doc
+
+ EXTRA_DIST = include
+-bin_SCRIPTS = freesolid-config
+\ No newline at end of file
++bin_SCRIPTS = freesolid-config
+diff --git a/configure.in b/configure.in
+index 7d61ba5..41a761c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1,5 +1,6 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(sample/sample.cpp)
++AC_CONFIG_MACRO_DIR([m4])
+
+ AC_CANONICAL_SYSTEM
+ PACKAGE=FreeSOLID
+@@ -22,17 +23,14 @@ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+-AC_PROG_RANLIB
+ AC_PROG_LIBTOOL
+
+ CPPFLAGS="$CPPFLAGS -I../include -I./include -I. -I../libbroad -I../libmoto"
+ AC_SUBST(CPPFLAGS)
+
+ dnl Checks for libraries.
+-dnl Replace `main' with a function in -lm:
+-AC_CHECK_LIB(m, main)
+-dnl Replace `main' with a function in -lqhull:
+-AC_CHECK_LIB(qhull, main, s_have_qhull=yes)
++AC_CHECK_LIB(m, ceil)
++AC_CHECK_LIB(qhull, qh_initbuild, s_have_qhull=yes)
+
+ if test "X${s_have_qhull}" = Xyes; then
+ QHULL_LIBS="-lqhull"
+diff --git a/libsolid/Makefile.am b/libsolid/Makefile.am
+index cc295c7..f722be3 100644
+--- a/libsolid/Makefile.am
++++ b/libsolid/Makefile.am
+@@ -23,7 +23,7 @@ libFreeSOLID_la_SOURCES = \
+
+ libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@ -release @VERSION@
+
+-CPPFLAGS = @CPPFLAGS@
++AM_CPPFLAGS = @CPPFLAGS@
+ LIBS = @QHULL_LIBS@ -lm
+
+ pkginclude_HEADERS = \
+diff --git a/sample/Makefile.am b/sample/Makefile.am
+index 5559fb0..eaa705f 100644
+--- a/sample/Makefile.am
++++ b/sample/Makefile.am
+@@ -4,7 +4,7 @@ sample_SOURCES = sample.cpp
+ x_wing_SOURCES = x_wing.cpp
+ teapot_SOURCES = teapot.cpp
+
+-CPPFLAGS = @CPPFLAGS@
++AM_CPPFLAGS = @CPPFLAGS@
+
+ LDADD = ../libsolid/libFreeSOLID.la
+
diff --git a/gnu/packages/patches/freesolid-configure.patch b/gnu/packages/patches/freesolid-configure.patch
new file mode 100644
index 0000000000..6d1c434b6f
--- /dev/null
+++ b/gnu/packages/patches/freesolid-configure.patch
@@ -0,0 +1,40 @@
+Fixes an incompatibility with Libtool 2+.
+
+Rebased on FreeSOLID-2.1.2.
+
+Originally retrieved from Fedora (see:
+https://src.fedoraproject.org/rpms/FreeSOLID/raw/rawhide/f/FreeSOLID-2.1.1-configure.patch).
+
+Upstream-status: https://sourceforge.net/p/freesolid/patches/10/
+
+--- a/configure.in 2024-10-28 10:54:46.642783784 +0900
++++ b/configure.in 2024-10-28 10:55:47.558771350 +0900
+@@ -1,8 +1,8 @@
+ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(sample/sample.cpp)
++AC_INIT
+ AC_CONFIG_MACRO_DIR([m4])
+
+-AC_CANONICAL_SYSTEM
++AC_CANONICAL_TARGET
+ PACKAGE=FreeSOLID
+ VERSION=2.1.1
+ FREESOLID_CURRENT=2
+@@ -15,15 +14,15 @@
+
+ AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+
+-AM_CONFIG_HEADER(include/config.h)
++AC_CONFIG_HEADERS([include/config.h])
+
+ dnl Checks for programs.
+-AC_LIBTOOL_WIN32_DLL
+ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+ AC_PROG_LIBTOOL
++LT_INIT([win32-dll])
+
+ CPPFLAGS="$CPPFLAGS -I../include -I./include -I. -I../libbroad -I../libmoto"
+ AC_SUBST(CPPFLAGS)
diff --git a/gnu/packages/patches/freesolid-pkgconfig.patch b/gnu/packages/patches/freesolid-pkgconfig.patch
new file mode 100644
index 0000000000..564293c082
--- /dev/null
+++ b/gnu/packages/patches/freesolid-pkgconfig.patch
@@ -0,0 +1,46 @@
+Upstream-status: https://sourceforge.net/p/freesolid/patches/5/
+
+diff --git a/FreeSOLID.pc.in b/FreeSOLID.pc.in
+new file mode 100644
+index 0000000..c354f05
+--- /dev/null
++++ b/FreeSOLID.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: FreeSolid
++Description: 3D collision detection C++ library
++Version: @VERSION@
++
++Libs: -L${libdir} -lFreeSOLID @QHULL_LIBS@
++Cflags: -I${includedir} -I${includedir}/FreeSOLID
++
+diff --git a/configure.in b/configure.in
+index 41a761c..a4bc7d4 100644
+--- a/configure.in
++++ b/configure.in
+@@ -52,4 +52,11 @@ dnl Checks for library functions.
+ AC_CHECK_FUNCS(sqrt)
+ AC_CHECK_FUNCS(fabs)
+
+-AC_OUTPUT(doc/Makefile sample/Makefile Makefile libbroad/Makefile libmoto/Makefile libsolid/Makefile freesolid-config)
++AC_OUTPUT([ doc/Makefile
++ sample/Makefile
++ Makefile
++ libbroad/Makefile
++ libmoto/Makefile
++ libsolid/Makefile
++ freesolid-config
++ FreeSOLID.pc])
+--- a/Makefile.am 2024-10-28 10:49:24.006849578 +0900
++++ b/Makefile.am 2024-10-28 10:50:13.378839511 +0900
+@@ -3,3 +3,6 @@
+
+ EXTRA_DIST = include
+ bin_SCRIPTS = freesolid-config
++
++pkgconfigdir = $(libdir)/pkgconfig
++dist_pkgconfig_DATA = FreeSOLID.pc
--
2.46.0
M
M
Maxim Cournoyer wrote on 28 Oct 04:35 +0100
[PATCH 3/3] gnu: Add speed-dreams.
(address . 74054@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
f8e22932d382412acf2159f8f163c82b189626ba.1730086201.git.maxim.cournoyer@gmail.com
* 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
---
gnu/packages/games.scm | 122 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 122 insertions(+)

Toggle diff (135 lines)
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")
--
2.46.0
M
M
Maxim Cournoyer wrote on 28 Oct 04:35 +0100
[PATCH 2/3] gnu: plib: Build with -fPIC.
(address . 74054@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
a92daed25e7100acd6c5bb1c6cacacfdba108a36.1730086201.git.maxim.cournoyer@gmail.com
* gnu/packages/game-development.scm (plib) [configure-flags]: New argument.
[inputs]: Move field after...
[native-inputs]: ... this one.

Change-Id: Ieddfb8814632f74c98d0e2cda949709b718c7a0d
---
gnu/packages/game-development.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 25cc021f6f..73ae3ef084 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2573,10 +2573,12 @@ (define-public plib
(patches (search-patches "plib-CVE-2011-4620.patch"
"plib-CVE-2012-4552.patch"))))
(build-system gnu-build-system)
- (inputs
- (list mesa libxi libxmu))
- (native-inputs
- (list pkg-config))
+ ;; plib exists only as a static library, per the author's choice (see:
+ ;; https://sourceforge.net/p/plib/mailman/message/10289018/). Build it
+ ;; with PIC, so that shared programs can at least "link" to it.
+ (arguments (list #:configure-flags #~(list "CXXFLAGS=-fPIC")))
+ (native-inputs (list autoconf automake pkg-config))
+ (inputs (list mesa libxi libxmu))
(home-page "https://plib.sourceforge.net/")
(synopsis "Suite of portable game libraries")
(description "PLIB is a set of libraries that will permit programmers to
--
2.46.0
M
M
Maxim Cournoyer wrote on 28 Oct 07:26 +0100
[PATCH v2 1/3] gnu: Add freesolid.
(address . 74054@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
b10b03479170ae6dc901fe2c304996685fea5331.1730096728.git.maxim.cournoyer@gmail.com
* gnu/packages/game-development.scm (freesolid): New variable.
* gnu/packages/patches/freesolid-configure.patch: New file.
* gnu/packages/patches/freesolid-pkgconfig.patch: Likewise.
* gnu/packages/patches/freesolid-automake.patch: Likewise.
* gnu/packages/patches/freesolid-autotools.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Register them.

Change-Id: I557332031a30d944f451d0a62c763e5b41c4e29b
---

Changes in v2:
- Fix corrupted freesolid-automake.patch

gnu/local.mk | 4 +
gnu/packages/game-development.scm | 30 ++++++++
gnu/packages/patches/freesolid-automake.patch | 60 +++++++++++++++
.../patches/freesolid-autotools.patch | 73 +++++++++++++++++++
.../patches/freesolid-configure.patch | 58 +++++++++++++++
.../patches/freesolid-pkgconfig.patch | 46 ++++++++++++
6 files changed, 271 insertions(+)
create mode 100644 gnu/packages/patches/freesolid-automake.patch
create mode 100644 gnu/packages/patches/freesolid-autotools.patch
create mode 100644 gnu/packages/patches/freesolid-configure.patch
create mode 100644 gnu/packages/patches/freesolid-pkgconfig.patch

Toggle diff (328 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 911af88627..73121dce5d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1289,6 +1289,10 @@ dist_patch_DATA = \
%D%/packages/patches/freeimage-unbundle.patch \
%D%/packages/patches/freeimage-CVE-2020-21428.patch \
%D%/packages/patches/freeimage-CVE-2020-22524.patch \
+ %D%/packages/patches/freesolid-automake.patch \
+ %D%/packages/patches/freesolid-autotools.patch \
+ %D%/packages/patches/freesolid-configure.patch \
+ %D%/packages/patches/freesolid-pkgconfig.patch \
%D%/packages/patches/fulcrum-1.9.1-unbundled-libraries.patch \
%D%/packages/patches/fuse-glibc-2.34.patch \
%D%/packages/patches/fuse-overlapping-headers.patch \
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index ee869c9cc5..25cc021f6f 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -30,6 +30,7 @@
;;; Copyright © 2022 dan <i@dan.games>
;;; Copyright © 2023, 2024 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2796,6 +2797,35 @@ (define-public flatzebra
double-buffering.")
(license license:gpl2+)))
+(define-public freesolid
+ (package
+ (name "freesolid")
+ (version "2.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/" name "/FreeSOLID-"
+ version ".zip"))
+ (sha256
+ (base32
+ "0wxqiv1ba227kwxpgwf6in9ai1lcamhmp1ib1c1chq4xvnpwdvc9"))
+ (patches (search-patches "freesolid-autotools.patch"
+ "freesolid-pkgconfig.patch"
+ "freesolid-configure.patch"
+ "freesolid-automake.patch"))))
+ (build-system gnu-build-system)
+ (arguments (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'force-reboostrap
+ (lambda _
+ (delete-file "bootstrap.sh")
+ (delete-file "configure"))))))
+ (native-inputs (list autoconf automake libtool unzip))
+ (home-page "https://sourceforge.net/projects/freesolid/")
+ (synopsis "3D collision detection C++ library")
+ (description "FreeSOLID is a library for collision detection of
+three-dimensional objects undergoing rigid motion and deformation. FreeSOLID
+is designed to be used in interactive 3D graphics applications.")
+ (license license:lgpl2.0+)))
+
(define-public libccd
(package
(name "libccd")
diff --git a/gnu/packages/patches/freesolid-automake.patch b/gnu/packages/patches/freesolid-automake.patch
new file mode 100644
index 0000000000..09e6b905a9
--- /dev/null
+++ b/gnu/packages/patches/freesolid-automake.patch
@@ -0,0 +1,60 @@
+FreeSOLID-2.1.1-Makefile.am-update.patch
+
+From: Alec Leamas <alec@tests.notat.diaspora.com>
+
+This patch causes a few extra header files to be installed; they are used by
+Speed-Dreams for example.
+
+Source: https://src.fedoraproject.org/rpms/FreeSOLID/raw/rawhide/f/FreeSOLID-2.1.1-Makefile.am-update.patch
+Rebased on top of 2.1.2 by Maxim Cournoyer
+Upstream-status: https://sourceforge.net/p/freesolid/patches/11/
+
+---
+
+ Makefile.am | 20 ++++++++++++++++++--
+ libsolid/Makefile.am | 2 +-
+ 2 files changed, 19 insertions(+), 3 deletions(-)
+
+--- a/Makefile.am 2024-10-28 15:17:22.787773430 +0900
++++ b/Makefile.am 2024-10-28 15:19:02.367752961 +0900
+@@ -1,8 +1,24 @@
+ ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = libmoto libbroad libsolid sample doc
+
+-EXTRA_DIST = include
++EXTRA_DIST = FreeSOLID.pc.in
+ bin_SCRIPTS = freesolid-config
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-dist_pkgconfig_DATA = FreeSOLID.pc
++nodist_pkgconfig_DATA = FreeSOLID.pc
++
++FreeSOLID_3Ddir = $(includedir)/FreeSOLID/3D
++FreeSOLID_3D_HEADERS =
++FreeSOLID_3D_HEADERS += include/3D/Basic.h
++FreeSOLID_3D_HEADERS += include/3D/Matrix.h
++FreeSOLID_3D_HEADERS += include/3D/Point.h
++FreeSOLID_3D_HEADERS += include/3D/Quaternion.h
++FreeSOLID_3D_HEADERS += include/3D/Tuple3.h
++FreeSOLID_3D_HEADERS += include/3D/Tuple4.h
++FreeSOLID_3D_HEADERS += include/3D/Vector.h
++
++FreeSOLID_SOLIDdir = $(includedir)/FreeSOLID/SOLID
++FreeSOLID_SOLID_HEADERS =
++FreeSOLID_SOLID_HEADERS += include/SOLID/solid.h
++FreeSOLID_SOLID_HEADERS += include/SOLID/broad.h
++FreeSOLID_SOLID_HEADERS += include/SOLID/types.h
+
+diff --git a/libsolid/Makefile.am b/libsolid/Makefile.am
+index f722be3..623b2e8 100644
+--- a/libsolid/Makefile.am
++++ b/libsolid/Makefile.am
+@@ -21,7 +21,7 @@ libFreeSOLID_la_SOURCES = \
+ ../libmoto/MT_Vector4.cpp
+
+
+-libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@ -release @VERSION@
++libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@
+
+ AM_CPPFLAGS = @CPPFLAGS@
+ LIBS = @QHULL_LIBS@ -lm
diff --git a/gnu/packages/patches/freesolid-autotools.patch b/gnu/packages/patches/freesolid-autotools.patch
new file mode 100644
index 0000000000..df99bdcd67
--- /dev/null
+++ b/gnu/packages/patches/freesolid-autotools.patch
@@ -0,0 +1,73 @@
+Upstream-status: https://sourceforge.net/p/freesolid/patches/1/
+
+Resolve Autoconf warnings.
+
+diff --git a/Makefile.am b/Makefile.am
+index 4914f44..77b157a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,5 @@
++ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = libmoto libbroad libsolid sample doc
+
+ EXTRA_DIST = include
+-bin_SCRIPTS = freesolid-config
+\ No newline at end of file
++bin_SCRIPTS = freesolid-config
+diff --git a/configure.in b/configure.in
+index 7d61ba5..41a761c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1,5 +1,6 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(sample/sample.cpp)
++AC_CONFIG_MACRO_DIR([m4])
+
+ AC_CANONICAL_SYSTEM
+ PACKAGE=FreeSOLID
+@@ -22,17 +23,14 @@ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+-AC_PROG_RANLIB
+ AC_PROG_LIBTOOL
+
+ CPPFLAGS="$CPPFLAGS -I../include -I./include -I. -I../libbroad -I../libmoto"
+ AC_SUBST(CPPFLAGS)
+
+ dnl Checks for libraries.
+-dnl Replace `main' with a function in -lm:
+-AC_CHECK_LIB(m, main)
+-dnl Replace `main' with a function in -lqhull:
+-AC_CHECK_LIB(qhull, main, s_have_qhull=yes)
++AC_CHECK_LIB(m, ceil)
++AC_CHECK_LIB(qhull, qh_initbuild, s_have_qhull=yes)
+
+ if test "X${s_have_qhull}" = Xyes; then
+ QHULL_LIBS="-lqhull"
+diff --git a/libsolid/Makefile.am b/libsolid/Makefile.am
+index cc295c7..f722be3 100644
+--- a/libsolid/Makefile.am
++++ b/libsolid/Makefile.am
+@@ -23,7 +23,7 @@ libFreeSOLID_la_SOURCES = \
+
+ libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@ -release @VERSION@
+
+-CPPFLAGS = @CPPFLAGS@
++AM_CPPFLAGS = @CPPFLAGS@
+ LIBS = @QHULL_LIBS@ -lm
+
+ pkginclude_HEADERS = \
+diff --git a/sample/Makefile.am b/sample/Makefile.am
+index 5559fb0..eaa705f 100644
+--- a/sample/Makefile.am
++++ b/sample/Makefile.am
+@@ -4,7 +4,7 @@ sample_SOURCES = sample.cpp
+ x_wing_SOURCES = x_wing.cpp
+ teapot_SOURCES = teapot.cpp
+
+-CPPFLAGS = @CPPFLAGS@
++AM_CPPFLAGS = @CPPFLAGS@
+
+ LDADD = ../libsolid/libFreeSOLID.la
+
diff --git a/gnu/packages/patches/freesolid-configure.patch b/gnu/packages/patches/freesolid-configure.patch
new file mode 100644
index 0000000000..0460b631a7
--- /dev/null
+++ b/gnu/packages/patches/freesolid-configure.patch
@@ -0,0 +1,58 @@
+Fixes an incompatibility with Libtool 2+.
+
+Rebased on FreeSOLID-2.1.2.
+
+Originally retrieved from Fedora (see:
+https://src.fedoraproject.org/rpms/FreeSOLID/raw/rawhide/f/FreeSOLID-2.1.1-configure.patch).
+
+Upstream-status: https://sourceforge.net/p/freesolid/patches/10/
+
+--- FreeSOLID-2.1.1/configure.in.orig 2012-05-24 20:58:30.000000000 +0200
++++ FreeSOLID-2.1.1/configure.in 2012-05-24 21:08:00.932445488 +0200
+@@ -1,8 +1,11 @@
+ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(sample/sample.cpp)
++AC_INIT
+ AC_CONFIG_MACRO_DIR([m4])
++AC_CONFIG_SRCDIR([sample/sample.cpp])
+
+-AC_CANONICAL_SYSTEM
++AC_CONFIG_MACRO_DIR([m4])
++
++AC_CANONICAL_TARGET
+ PACKAGE=FreeSOLID
+ VERSION=2.1.1
+ FREESOLID_CURRENT=2
+@@ -15,15 +18,14 @@
+
+ AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+
+-AM_CONFIG_HEADER(include/config.h)
++AC_CONFIG_HEADERS([include/config.h])
+
+ dnl Checks for programs.
+-AC_LIBTOOL_WIN32_DLL
+ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+-AC_PROG_LIBTOOL
++LT_INIT([win32-dll])
+
+ CPPFLAGS="$CPPFLAGS -I../include -I./include -I. -I../libbroad -I../libmoto"
+ AC_SUBST(CPPFLAGS)
+@@ -52,11 +54,6 @@
+ AC_CHECK_FUNCS(sqrt)
+ AC_CHECK_FUNCS(fabs)
+
+-AC_OUTPUT([ doc/Makefile
+- sample/Makefile
+- Makefile
+- libbroad/Makefile
+- libmoto/Makefile
+- libsolid/Makefile
+- freesolid-config
+- FreeSOLID.pc])
++AC_CONFIG_FILES([doc/Makefile sample/Makefile Makefile libbroad/Makefile libmoto/Makefile libsolid/Makefile freesolid-config])
++AC_CONFIG_FILES([FreeSOLID.pc])
++AC_OUTPUT
diff --git a/gnu/packages/patches/freesolid-pkgconfig.patch b/gnu/packages/patches/freesolid-pkgconfig.patch
new file mode 100644
index 0000000000..564293c082
--- /dev/null
+++ b/gnu/packages/patches/freesolid-pkgconfig.patch
@@ -0,0 +1,46 @@
+Upstream-status: https://sourceforge.net/p/freesolid/patches/5/
+
+diff --git a/FreeSOLID.pc.in b/FreeSOLID.pc.in
+new file mode 100644
+index 0000000..c354f05
+--- /dev/null
++++ b/FreeSOLID.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: FreeSolid
++Description: 3D collision detection C++ library
++Version: @VERSION@
++
++Libs: -L${libdir} -lFreeSOLID @QHULL_LIBS@
++Cflags: -I${includedir} -I${includedir}/FreeSOLID
++
+diff --git a/configure.in b/configure.in
+index 41a761c..a4bc7d4 100644
+--- a/configure.in
++++ b/configure.in
+@@ -52,4 +52,11 @@ dnl Checks for library functions.
+ AC_CHECK_FUNCS(sqrt)
+ AC_CHECK_FUNCS(fabs)
+
+-AC_OUTPUT(doc/Makefile sample/Makefile Makefile libbroad/Makefile libmoto/Makefile libsolid/Makefile freesolid-config)
++AC_OUTPUT([ doc/Makefile
++ sample/Makefile
++ Makefile
++ libbroad/Makefile
++ libmoto/Makefile
++ libsolid/Makefile
++ freesolid-config
++ FreeSOLID.pc])
+--- a/Makefile.am 2024-10-28 10:49:24.006849578 +0900
++++ b/Makefile.am 2024-10-28 10:50:13.378839511 +0900
+@@ -3,3 +3,6 @@
+
+ EXTRA_DIST = include
+ bin_SCRIPTS = freesolid-config
++
++pkgconfigdir = $(libdir)/pkgconfig
++dist_pkgconfig_DATA = FreeSOLID.pc

base-commit: e4e1e16bc1b27684b55e6bf047f9f669e1a0c7b5
--
2.46.0
M
M
Maxim Cournoyer wrote on 28 Oct 07:26 +0100
[PATCH v2 2/3] gnu: plib: Build with -fPIC.
(address . 74054@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
50a1e682b5774829dbc1a9b0e625c69b38fd070a.1730096728.git.maxim.cournoyer@gmail.com
* gnu/packages/game-development.scm (plib) [configure-flags]: New argument.
[inputs]: Move field after...
[native-inputs]: ... this one.

Change-Id: Ieddfb8814632f74c98d0e2cda949709b718c7a0d
---

(no changes since v1)

gnu/packages/game-development.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 25cc021f6f..73ae3ef084 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2573,10 +2573,12 @@ (define-public plib
(patches (search-patches "plib-CVE-2011-4620.patch"
"plib-CVE-2012-4552.patch"))))
(build-system gnu-build-system)
- (inputs
- (list mesa libxi libxmu))
- (native-inputs
- (list pkg-config))
+ ;; plib exists only as a static library, per the author's choice (see:
+ ;; https://sourceforge.net/p/plib/mailman/message/10289018/). Build it
+ ;; with PIC, so that shared programs can at least "link" to it.
+ (arguments (list #:configure-flags #~(list "CXXFLAGS=-fPIC")))
+ (native-inputs (list autoconf automake pkg-config))
+ (inputs (list mesa libxi libxmu))
(home-page "https://plib.sourceforge.net/")
(synopsis "Suite of portable game libraries")
(description "PLIB is a set of libraries that will permit programmers to
--
2.46.0
M
M
Maxim Cournoyer wrote on 28 Oct 07:26 +0100
[PATCH v2 3/3] gnu: Add speed-dreams.
(address . 74054@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
a5cb320aeaa06fb9d1f2a9cc1c4a2c94bc3ea041.1730096728.git.maxim.cournoyer@gmail.com
* 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(+)

Toggle diff (135 lines)
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")
--
2.46.0
L
L
Liliana Marie Prikler wrote on 28 Oct 09:10 +0100
Re: [bug#74054] [PATCH v2 2/3] gnu: plib: Build with -fPIC.
e3667b3fe2b3c2f28b7863cde64711e6107640e0.camel@gmail.com
Am Montag, dem 28.10.2024 um 15:26 +0900 schrieb Maxim Cournoyer:
Toggle quote (2 lines)
> * gnu/packages/game-development.scm (plib) [configure-flags]: New
> argument.
That may be a typo – I think we use the #: part.
Alternatively you could write [arguments]: Add #:configure-flags.
Toggle quote (5 lines)
> [inputs]: Move field after...
> [native-inputs]: ... this one.
>
> Change-Id: Ieddfb8814632f74c98d0e2cda949709b718c7a0d
> ---
Cheers
L
L
Liliana Marie Prikler wrote on 28 Oct 09:12 +0100
Re: [bug#74054] [PATCH v2 3/3] gnu: Add speed-dreams.
0d561077581e794a174b161f83772a30e57f11c9.camel@gmail.com
Am Montag, dem 28.10.2024 um 15:26 +0900 schrieb Maxim Cournoyer:
Toggle quote (7 lines)
> * 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.
Typo: missing "s" in New variables.

Also, I don't think we differentiate much between variables and
procedures (procedures *are* variables).

Cheers
M
M
Maxim Cournoyer wrote on 29 Oct 01:04 +0100
Re: [bug#74054] [PATCH v2 2/3] gnu: plib: Build with -fPIC.
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87v7xb4vwu.fsf@gmail.com
Hi Liliana,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (6 lines)
> Am Montag, dem 28.10.2024 um 15:26 +0900 schrieb Maxim Cournoyer:
>> * gnu/packages/game-development.scm (plib) [configure-flags]: New
>> argument.
> That may be a typo – I think we use the #: part.
> Alternatively you could write [arguments]: Add #:configure-flags.

I see multiple variants in use. That's hard for newcomer and bad
consistency, but until someone distills 'The One True Changelog Format'
style to use, I think they are all acceptable. For example:

'(plib) [phases]: Add some phase.' is common for example.

'(plib) [configure-flags]: New argument.' is similar style.

A more verbose alternative, which is also used could be:

'(plib) [arguments] <configure-flags>: New argument.'

Thanks for taking a look.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 29 Oct 01:09 +0100
Re: [bug#74054] [PATCH v2 3/3] gnu: Add speed-dreams.
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87r07z4voi.fsf@gmail.com
Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (13 lines)
> Am Montag, dem 28.10.2024 um 15:26 +0900 schrieb Maxim Cournoyer:
>> * 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.
> Typo: missing "s" in New variables.
>
> Also, I don't think we differentiate much between variables and
> procedures (procedures *are* variables).

In Guix I've mostly seen we differentiate between procedure and
variables in changelog commit messages or documentation, but not between
functions and procedures (these are bunched together). I think being
more specific as opposed to general helps the reading a bit.

Thanks for the reading. Did you attempt to build/run it? It has some
bugs I've reported upstream:

1. (temperature sometimes get set to 'inf' and the driving experience
becomes like ice skating)

2. Occasional crash (segfault) (not reported yet -- couldn't catch a
nice backtrace with GDB).

It's still very much playable though, and upstream is still developing
the game, so hopefully these will get resolved in time.

--
Thanks,
Maxim
L
L
Liliana Marie Prikler wrote on 29 Oct 08:00 +0100
Re: [bug#74054] [PATCH v2 2/3] gnu: plib: Build with -fPIC.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
d9bf9a16750f6e756342b8b98a530278acff724f.camel@gmail.com
Am Dienstag, dem 29.10.2024 um 09:04 +0900 schrieb Maxim Cournoyer:
Toggle quote (23 lines)
> Hi Liliana,
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > Am Montag, dem 28.10.2024 um 15:26 +0900 schrieb Maxim Cournoyer:
> > > * gnu/packages/game-development.scm (plib) [configure-flags]: New
> > > argument.
> > That may be a typo – I think we use the #: part.
> > Alternatively you could write [arguments]: Add #:configure-flags.
>
> I see multiple variants in use.  That's hard for newcomer and bad
> consistency, but until someone distills 'The One True Changelog
> Format' style to use, I think they are all acceptable.  For example:
>
> '(plib) [phases]: Add some phase.' is common for example.
>
> '(plib) [configure-flags]: New argument.' is similar style.
>
> A more verbose alternative, which is also used could be:
>
> '(plib) [arguments] <configure-flags>: New argument.'
>
> Thanks for taking a look.
I'm fine with dropping the [arguments] part, but IMHO the #: marker
should be there, as it marks the thing as a keyword argument (thus also
making arguments superfluous – it's implied). That is, I'd also write
the phases example as #:phases.

But I haven't done a survey, so if you want to keep the ChangeLog as-
is, by all means do so.

Cheers
L
L
Liliana Marie Prikler wrote on 15 Nov 09:07 +0100
Re: [bug#74054] [PATCH v2 3/3] gnu: Add speed-dreams.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
d9d888d609800c8d99ed684404b1e929b3cb4aef.camel@gmail.com
Am Dienstag, dem 29.10.2024 um 09:09 +0900 schrieb Maxim Cournoyer:
Toggle quote (11 lines)
> Thanks for the reading.  Did you attempt to build/run it?  It has
> some bugs I've reported upstream:
>
> 1. (temperature sometimes get set to 'inf' and the driving experience
> becomes like ice skating)
>
> 2. Occasional crash (segfault) (not reported yet -- couldn't catch a
> nice backtrace with GDB).
>
> It's still very much playable though, and upstream is still
> developing the game, so hopefully these will get resolved in time.
I've built it now, but not yet run it. Anyhow, I take your word that
it's playable and pushed it – 2/3 was already pushed anyways.

Cheers
Closed
M
M
Maxim Cournoyer wrote on 17 Nov 05:14 +0100
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
878qtized2.fsf@gmail.com
Hi Liliana,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (15 lines)
> Am Dienstag, dem 29.10.2024 um 09:09 +0900 schrieb Maxim Cournoyer:
>> Thanks for the reading.  Did you attempt to build/run it?  It has
>> some bugs I've reported upstream:
>>
>> 1. (temperature sometimes get set to 'inf' and the driving experience
>> becomes like ice skating)
>>
>> 2. Occasional crash (segfault) (not reported yet -- couldn't catch a
>> nice backtrace with GDB).
>>
>> It's still very much playable though, and upstream is still
>> developing the game, so hopefully these will get resolved in time.
> I've built it now, but not yet run it. Anyhow, I take your word that
> it's playable and pushed it – 2/3 was already pushed anyways.

Thanks. I'll have a future update that uses the sources directly as it
fixes an annoying problem with the tire model of the latest release (the
tires get crazy hot and the car becomes uncontrollable); but there's
another serious problem in the unreleased sources where the game appears
to hang on the qualification screen there [0], so it's been on hold
until this gets resolved.

Anyway, thanks for the review/merge.


--
Thanks,
Maxim
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74054@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74054
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch