unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: nee <nee-git@hidamari.blue>
Cc: 34879-done@debbugs.gnu.org, me@tobias.gr
Subject: bug#34879: [PATCH] gnu: yamagi-quake2: Update to 7.40.
Date: Fri, 06 Aug 2021 00:04:52 -0400	[thread overview]
Message-ID: <87bl6bkyl7.fsf_-_@gmail.com> (raw)
In-Reply-To: <3e8808c3-0dde-f149-9573-3525bb2f680f@hidamari.blue> (nee's message of "Mon, 1 Apr 2019 23:15:28 +0200")

Hi!

nee <nee-git@hidamari.blue> writes:

[...]

> I think it's the best to just hard-code the path where it loads those
> libraries. That prevents it from loading outdated or garbage collected
> ones before the compiled one. Also curl doesn't have a default fallback
> in the Makefile.
>
> Try the new patch and do this to the config:
> echo 'set al_driver "/tmp/non-existing-garbage-collected-library"' >>
> ~/.yq2/baseq2/config.cfg
> echo 'set cl_libcurl "/tmp/non-existing-garbage-collected-library"' >>
> ~/.yq2/baseq2/config.cfg
>
> I tested this new patch and the old patch, and the new one works while
> the old one logs to stdout that failed to load curl and openal with that
> config and falls back to sdl-audio.
>
> Happy hacking!
>
> From a268a6d5390e562f4ed5cc28784f7d83a2eb6f9d Mon Sep 17 00:00:00 2001
> From: nee <nee-git@hidamari.blue>
> Date: Fri, 15 Mar 2019 20:56:47 +0100
> Subject: [PATCH] gnu: yamagi-quake2: Update to 7.40.
>
> * gnu/packages/games.scm (yamagi-quake2): Update to 7.40.
> [arguments](phases): Add 'hard-code-dynamicly-loaded-libs phase.
> [inputs]: Add curl.
> ---
>  gnu/packages/games.scm | 34 +++++++++++++++++++++++-----------
>  1 file changed, 23 insertions(+), 11 deletions(-)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 46b58e352c..69e259f044 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -5023,7 +5023,7 @@ some graphical niceities, and numerous bug-fixes and other improvements.")
>  (define-public yamagi-quake2
>    (package
>      (name "yamagi-quake2")
> -    (version "7.10")
> +    (version "7.40")

We're now at 7.45 on master but loading the OpenAL library was
failing...

[...]

> -             ;; link openAL instead of using dlopen at runtime
> -             "DLOPEN_OPENAL=\"no\""
> -             ;; an optional directory where it will look for quake2 data files
> -             ;; in addition to the current working directory
> +             ;; An optional directory where it will look for quake2 data files
> +             ;; In addition to the current working directory
>               "WITH_SYSTEMWIDE=yes"
>               "WITH_SYSTEMDIR=\"/opt/quake2\"")
>         #:phases
>         (modify-phases %standard-phases
>           (delete 'configure)
> +         (add-before 'build 'hard-code-dynamicly-loaded-libs
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             ;; The game writes paths to openal.so and curl.so to ~/.yq2/...
> +             ;; Workaround: hard-code the compiled paths where it load them,
> +             ;; this prevents loading old or a garbage collected libraries
> +             (substitute* "src/client/sound/qal.c"
> +               (("al_driver->string")
> +                (string-append "\""(assoc-ref inputs "openal")
> +                               "/lib/libopenal.so\"")))
> +             (substitute* "src/client/curl/qcurl.c"
> +               (("cl_libcurl->string")
> +                (string-append "\"" (assoc-ref inputs "curl")
> +                               "/lib/libcurl.so\"")))))

... until I applied the above forgotten patch!  Finally applied as
c64c49b152.

Thank you!

Closing.

Maxim




      reply	other threads:[~2021-08-06  4:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 23:19 [bug#34879] [PATCH] gnu: yamagi-quake2: Update to 7.40 nee
2019-03-16  5:09 ` Tobias Geerinckx-Rice
2019-04-01 21:15   ` nee
2021-08-06  4:04     ` Maxim Cournoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bl6bkyl7.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=34879-done@debbugs.gnu.org \
    --cc=me@tobias.gr \
    --cc=nee-git@hidamari.blue \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).