[PATCH] gnu: Add exult.

  • Done
  • quality assurance status badge
Details
4 participants
  • Maxime Devos
  • Tobias Geerinckx-Rice
  • (
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Tobias Geerinckx-Rice
Severity
normal
T
T
Tobias Geerinckx-Rice wrote on 31 Jul 2022 12:46
(address . guix-patches@gnu.org)
20220731104635.31835-1-me@tobias.gr
* gnu/packages/games.scm (exult): New public variable.
---

Hi Guix,

This started as a series of ‘guix shell’ questions by ncbfg36 in #guix, and as those tend to turn into packages, especially when you're waiting for Dell firmware to decide how it's going to fail to boot in 2 minutes, here's one.

gnu/packages/games.scm | 64 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)

Toggle diff (77 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index b00bff3e7b..f7b86ae3d5 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3909,6 +3909,70 @@ (define-public extremetuxracer
(home-page "https://sourceforge.net/projects/extremetuxracer/")
(license license:gpl2+)))
+(define-public exult
+ (package
+ (name "exult")
+ (version "1.8")
+ (source
+ (origin
+ ;; The release tarball isn't bootstrapped, and Git is more robust (SWH).
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/exult/exult")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1qfbkz05w8989vafc6dvw1wmdi1mvkr4kkgk3ccixadf4616kcb3"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "--enable-shared"
+ "--disable-static"
+ "--enable-lto"
+ "--enable-exult-studio"
+ "--enable-exult-studio-support"
+ "--enable-compiler"
+ "--enable-mods"
+ "--enable-gimp-plugin"
+ ;; A few lines on stdout can save a lot of head-scratching:
+ "CPPFLAGS=-DDEBUG_PATHS=1")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-game-home-directory
+ (lambda _
+ (substitute* "gamemgr/modmgr.cc"
+ ;; EXULT_DATADIR is in the store where it's rather hard for
+ ;; users to put game assets. Use a more writable home by
+ ;; default, which users can override in their ~/.exult.cfg.
+ (("<GAMEHOME>")
+ (string-append "<HOME>/.local/share/exult"))
+ ;; …however, this causes a regression: the mods which we'll
+ ;; install to EXULT_DATADIR are no longer found. So: don't
+ ;; look for mods alongside the assets by default. This too
+ ;; can be overridden in users' ~/.exult.cfg.
+ (("game_path( \\+ \"/mods\")" _ +suffix)
+ (string-append "get_system_path(\"<GAMEHOME>/\") + "
+ "cfgname" +suffix))))))))
+ (native-inputs
+ (list autoconf automake libtool pkg-config
+ ;; The following are needed only by the Usecode compiler.
+ bison flex))
+ (inputs
+ (list fluidsynth freetype libvorbis sdl2
+ ;; GTK is needed only by Exult Studio.
+ gtk+))
+ (synopsis "Role-playing game engine compatible with Ultima VII")
+ (description
+ "Exult is an Ultima 7 game engine that runs on modern operating systems.
+Ultima 7 (or Ultima VII) is a two-part @acronym{RPG, role-playing game} from the
+early 1990s.
+
+Exult is fully compatible with the original Ultima 7, but doesn't require any
+of its data files to be useful. Explore entirely new game worlds---or create
+your own with the included game and map editor, Exult Studio.")
+ (home-page "http://exult.info/")
+ (license license:gpl2+)))
+
(define-public supertuxkart
(package
(name "supertuxkart")
--
2.37.1
(
CLTTJGWSHQ25.3J8PC4T4D80AD@guix-aspire
Hello!

On Sun Jul 31, 2022 at 11:46 AM BST, Tobias Geerinckx-Rice via Guix-patches via wrote:
Toggle quote (9 lines)
> + (origin
> + ;; The release tarball isn't bootstrapped, and Git is more robust (SWH).
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/exult/exult")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "1qfbkz05w8989vafc6dvw1wmdi1mvkr4kkgk3ccixadf4616kcb3"))))
I don't think it's really necessary to justify the use of Git here, since Git
is preferred over tarballs anyway.

-- (
T
T
Tobias Geerinckx-Rice wrote on 31 Jul 2022 15:26
(name . ()(address . paren@disroot.org)(address . 56852@debbugs.gnu.org)
87ilndxvd5@nckx
( ???
Toggle quote (4 lines)
> I don't think it's really necessary to justify the use of Git
> here, since Git
> is preferred over tarballs anyway.

Agreed insofar as I just wanted to point out the surprising lack
of bootstrapping in the tarball, and then hey, 80 characters is 80
characters, what else can we chat about before they run out. If
it's read as ‘justifying’ anything, that was not the intention.

I'm not sure we ever reached consensus on preferring Git? I'm
pro-git myself, but if there's consensus we should advertise it
more prominently.

Thanks for the review!

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYuaD9g0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15oCoBAOjmnMFEnfwRIQKOikHUPMvr+FxxiyDji7HcsqVQ
bi2UAQCAezfv5OwsJZ42yWCHm1rad7MryZe1BPitEwnRpVrXCA==
=/8pF
-----END PGP SIGNATURE-----

(
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 56852@debbugs.gnu.org)
CLTVV07C6OAO.5SDZ57OBIKKG@guix-aspire
On Sun Jul 31, 2022 at 2:26 PM BST, Tobias Geerinckx-Rice wrote:
Toggle quote (1 lines)
> Thanks for the review!
Not much of a review, but you're welcome nonetheless :)

-- (
(
CLTWQV98YDW4.142L9O3SZZBNO@guix-aspire
I just thought of some more possible improvements:

On Sun Jul 31, 2022 at 11:46 AM BST, Tobias Geerinckx-Rice via Guix-patches via wrote:
Toggle quote (1 lines)
> + "--enable-exult-studio"
Couldn't this go in a new `exult:studio` output?

Toggle quote (1 lines)
> + "--enable-compiler"
I'm not sure what this compiler is, but if it's a separate program I guess it could
use `exult:compiler`.

Toggle quote (1 lines)
> + "--enable-gimp-plugin"
And this could go in `exult:gimp`.

Toggle quote (13 lines)
> + (substitute* "gamemgr/modmgr.cc"
> + ;; EXULT_DATADIR is in the store where it's rather hard for
> + ;; users to put game assets. Use a more writable home by
> + ;; default, which users can override in their ~/.exult.cfg.
> + (("<GAMEHOME>")
> + (string-append "<HOME>/.local/share/exult"))
> + ;; …however, this causes a regression: the mods which we'll
> + ;; install to EXULT_DATADIR are no longer found. So: don't
> + ;; look for mods alongside the assets by default. This too
> + ;; can be overridden in users' ~/.exult.cfg.
> + (("game_path( \\+ \"/mods\")" _ +suffix)
> + (string-append "get_system_path(\"<GAMEHOME>/\") + "
> + "cfgname" +suffix))))))))
Perhaps we could patch in a GUIX_EXULT_PATH env var so we can add a search path for
packaging mods.

-- (
M
M
Maxime Devos wrote on 31 Jul 2022 16:31
(address . 56852@debbugs.gnu.org)
b61e92bb-950d-ff7e-a040-9469651f01e5@telenet.be
On 31-07-2022 15:26, Tobias Geerinckx-Rice via Guix-patches via wrote:
Toggle quote (2 lines)
> I'm not sure we ever reached consensus on preferring Git?  I'm pro-git
> myself, but if there's consensus we should advertise it more prominently.
I am not aware of a consensus on preferring Git, but using Git had been
noted to be a convenient method for avoiding Autotools binaries (*) and
building from source (*).
However, that's not directly relevant here, as (IIUC your comment
correctly) in this case, the tarball doesn't contain those Autotools
binaries.
Greetings,
Maxime
(*) in the sense used by the GPL and referred to by explanations of '4
freedoms', not in the 'input/output to C compiler / shell interpreter /
...' sense.
Attachment: OpenPGP_signature
T
T
Tobias Geerinckx-Rice wrote on 12 Aug 2022 21:46
(name . ()(address . paren@disroot.org)(address . 56852@debbugs.gnu.org)
87czd51be7.fsf@nckx
Hi!

I managed to miss this when replying to your previous mail.

( ???
Toggle quote (7 lines)
> I just thought of some more possible improvements:
>
> On Sun Jul 31, 2022 at 11:46 AM BST, Tobias Geerinckx-Rice via
> Guix-patches via wrote:
>> + "--enable-exult-studio"
> Couldn't this go in a new `exult:studio` output?

I tried, but splitting out a Studio that doesn't randomly crash
during normal usage proved too hard for me. It's dangerously easy
to split out one that appears to run fine at first glance.

I wouldn't call Exult frustrating in that department, but some
file name assumptions aren't as trivial to patch or even find as
one would hope. Apparently.

Toggle quote (5 lines)
>> + "--enable-compiler"
> I'm not sure what this compiler is, but if it's a separate
> program I guess it could
> use `exult:compiler`.

With its grand total size of 2.7 MiB (out of a 915-MiB closure),
I'd rather not.

Toggle quote (3 lines)
>> + "--enable-gimp-plugin"
> And this could go in `exult:gimp`.

Ack.

Toggle quote (26 lines)
>> + (substitute* "gamemgr/modmgr.cc"
>> + ;; EXULT_DATADIR is in the store where
>> it's rather hard for
>> + ;; users to put game assets. Use a more
>> writable home by
>> + ;; default, which users can override in
>> their ~/.exult.cfg.
>> + (("<GAMEHOME>")
>> + (string-append
>> "<HOME>/.local/share/exult"))
>> + ;; …however, this causes a regression:
>> the mods which we'll
>> + ;; install to EXULT_DATADIR are no longer
>> found. So: don't
>> + ;; look for mods alongside the assets by
>> default. This too
>> + ;; can be overridden in users'
>> ~/.exult.cfg.
>> + (("game_path( \\+ \"/mods\")" _ +suffix)
>> + (string-append
>> "get_system_path(\"<GAMEHOME>/\") + "
>> + "cfgname" +suffix))))))))
> Perhaps we could patch in a GUIX_EXULT_PATH env var so we can
> add a search path for
> packaging mods.

That's a lot of original code to add in a patch… and the current
codez all assume file names, not paths.

I'll think about it.

Thanks,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYvaxEA0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15C+sA/R2N0Q3RcBmPiQlMUG2BrbjVqk840rASloxh7Bn+
+IucAP0droa7xyCdFucMEo5fnqqdijsFAJ+u9nYWYRMIlRhfCg==
=+LUv
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 2 Sep 2023 05:38
87ledpp7lu.fsf@wireframe
On 2022-07-31, Tobias Geerinckx-Rice wrote:
Toggle quote (1 lines)
> * gnu/packages/games.scm (exult): New public variable.
...
Toggle quote (5 lines)
> +(define-public exult
> + (package
> + (name "exult")
> + (version "1.8")

exult 1.8 is present in guix now:

26c2a8a32730f376345b3562c7a252869d63aadd gnu: Add exult.

Marking as done.

live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZPKuPQAKCRDcUY/If5cW
qmVVAP4taxpTUGMHETou5eNCWYHgdn/R2m/qAIxSZDpN9i9QjgD+IJY7UcEUQsWl
ARM6xL2c6cvmCwzcFigjf0+7jVSW0wI=
=0Bxs
-----END PGP SIGNATURE-----

Closed
?