guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: yamagi-quake2: Patch dynamically loaded libr


From: guix-commits
Subject: branch master updated: gnu: yamagi-quake2: Patch dynamically loaded libraries.
Date: Fri, 06 Aug 2021 00:04:18 -0400

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new c64c49b  gnu: yamagi-quake2: Patch dynamically loaded libraries.
c64c49b is described below

commit c64c49b152b7713a5e09ae0cfdc1de86fb215966
Author: nee <nee-git@hidamari.blue>
AuthorDate: Fri Mar 15 20:56:47 2019 +0100

    gnu: yamagi-quake2: Patch dynamically loaded libraries.
    
    * gnu/packages/games.scm (yamagi-quake2)
    [arguments]{make-flags}: Remove the DLOPEN_OPENAL=no make flag, which was
    not working as intended.
    [phases]{patch-libraries}: New phase.
    
    Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
    Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 gnu/packages/games.scm | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index f34f3a9..468b0d5 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7209,15 +7209,26 @@ some graphical niceities, and numerous bug-fixes and 
other improvements.")
      `(#:tests? #f
        #:make-flags
        (list "CC=gcc"
-             ;; 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 'patch-libraries
+           (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 loads them;
+             ;; this prevents loading old or 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\"")))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]