From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:46903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB4Hl-0006aF-Kc for guix-patches@gnu.org; Mon, 01 Apr 2019 17:16:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hB4Hi-0004J6-I3 for guix-patches@gnu.org; Mon, 01 Apr 2019 17:16:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hB4Hi-0004Iy-Ds for guix-patches@gnu.org; Mon, 01 Apr 2019 17:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hB4Hi-0004Ip-4f for guix-patches@gnu.org; Mon, 01 Apr 2019 17:16:02 -0400 Subject: [bug#34879] [PATCH] gnu: yamagi-quake2: Update to 7.40. Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:46817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB4HS-0006CL-LO for guix-patches@gnu.org; Mon, 01 Apr 2019 17:15:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hB4HQ-00046y-HG for guix-patches@gnu.org; Mon, 01 Apr 2019 17:15:46 -0400 Received: from pictor.uberspace.de ([95.143.172.207]:38888) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hB4HO-0003zG-NO for guix-patches@gnu.org; Mon, 01 Apr 2019 17:15:44 -0400 References: <874l83be27.fsf@nckx> From: nee Message-ID: <3e8808c3-0dde-f149-9573-3525bb2f680f@hidamari.blue> Date: Mon, 1 Apr 2019 23:15:28 +0200 MIME-Version: 1.0 In-Reply-To: <874l83be27.fsf@nckx> Content-Type: multipart/mixed; boundary="------------B9E7CCC7AA858361D07EC145" Content-Language: en-GB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: me@tobias.gr, 34879@debbugs.gnu.org This is a multi-part message in MIME format. --------------B9E7CCC7AA858361D07EC145 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hello, thank you for the review! Am 16.03.19 um 06:09 schrieb Tobias Geerinckx-Rice: > This version completely changes how it loads OpenAL.  The attached patch > keeps everything working, but embeds an absolute store reference in the > user's configuration file after the first run:> >  λ grep /gnu/store ~/.yq2/baseq2/config.cfg  set al_driver > "/gnu/store/…-openal-1.19.1/lib/libopenal.so.1" Good job spotting that, how do you get it to generate that though? I thought I didn't have it, because I had an old config, but now I moved mine and it still doesn't appear. Anyway, I looked at the code and curl seems to load the same way. > > Any ideas, anyone? > 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! --------------B9E7CCC7AA858361D07EC145 Content-Type: text/x-patch; name="0001-gnu-yamagi-quake2-Update-to-7.40.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-gnu-yamagi-quake2-Update-to-7.40.patch" =46rom a268a6d5390e562f4ed5cc28784f7d83a2eb6f9d Mon Sep 17 00:00:00 2001 From: nee 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 an= d other improvements.") (define-public yamagi-quake2 (package (name "yamagi-quake2") - (version "7.10") + (version "7.40") (source (origin (method url-fetch) @@ -5031,28 +5031,39 @@ some graphical niceities, and numerous bug-fixes = and other improvements.") version ".tar.xz")) (sha256 (base32 - "0psinbg25mysd58k99s1n34w31w5hj1vppb39gdjb0zqi6sl6cps")))) + "0aci73r15m1wbkrhpysxzdg77a294ywxfkd141gi5qgc2lwbsbqw")))) (build-system gnu-build-system) (arguments `(#:tests? #f #:make-flags (list "CC=3Dgcc" - ;; link openAL instead of using dlopen at runtime - "DLOPEN_OPENAL=3D\"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=3Dyes" "WITH_SYSTEMDIR=3D\"/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 t= hem, + ;; this prevents loading old or a garbage collected librari= es + (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"))) (mkdir-p (string-append out "/lib")) (mkdir-p (string-append out "/bin")) ;; The yamagi-quake2 binary must be in the same directory= - ;; as it's engine libraries, but symlinking it to /bin is= okay + ;; as its engine libraries, but symlinking it to /bin is = okay ;; https://github.com/yquake2/yquake2/blob/master/stuff/p= ackaging.md (copy-recursively "release" (string-append out "/lib/yamagi-quake2"= )) @@ -5060,11 +5071,12 @@ some graphical niceities, and numerous bug-fixes = and other improvements.") (string-append out "/bin/yamagi-quake2")) (symlink (string-append out "/lib/yamagi-quake2/q2ded") (string-append out "/bin/yamagi-q2ded")))))))) - (inputs `(("sdl2" ,sdl2) - ("mesa" ,mesa) + (inputs `(("curl" ,curl) ("libvorbis" ,libvorbis) - ("zlib" ,zlib) - ("openal" ,openal))) + ("mesa" ,mesa) + ("openal" ,openal) + ("sdl2" ,sdl2) + ("zlib" ,zlib))) (native-inputs `(("pkg-config" ,pkg-config))) (synopsis "First person shooter engine based on quake2") (description "Yamagi Quake II is an enhanced client for id Software'= s Quake II. --=20 2.20.1 --------------B9E7CCC7AA858361D07EC145--