gnu: 0ad: Fix building with mozjs version other than 78.6.
Fixes <https://issues.guix.gnu.org/52913>. * gnu/packages/games.scm (0ad)[native-inputs]: Remove labels. [arguments]: Add 'fix-mozjs-compatibility' phase.master
parent
f107c20e50
commit
fea60a2fff
|
@ -42,7 +42,7 @@
|
||||||
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
|
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
|
||||||
;;; Copyright © 2019, 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
|
;;; Copyright © 2019, 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
|
||||||
;;; Copyright © 2019 Dan Frumin <dfrumin@cs.ru.nl>
|
;;; Copyright © 2019 Dan Frumin <dfrumin@cs.ru.nl>
|
||||||
;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
|
;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
|
;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
|
||||||
;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
|
;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
|
||||||
;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
|
;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
|
||||||
|
@ -6617,12 +6617,12 @@ fight against their plot and save his fellow rabbits from slavery.")
|
||||||
wxwidgets
|
wxwidgets
|
||||||
zlib))
|
zlib))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("boost" ,boost)
|
(list boost
|
||||||
("cmake" ,cmake-minimal)
|
cmake-minimal
|
||||||
("cxxtest" ,cxxtest)
|
cxxtest
|
||||||
("mesa" ,mesa)
|
mesa
|
||||||
("pkg-config" ,pkg-config)
|
pkg-config
|
||||||
("python-2" ,python-2)))
|
python-2))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:make-flags '("config=release" "verbose=1" "-C" "build/workspaces/gcc")
|
`(#:make-flags '("config=release" "verbose=1" "-C" "build/workspaces/gcc")
|
||||||
|
@ -6638,6 +6638,18 @@ fight against their plot and save his fellow rabbits from slavery.")
|
||||||
(string-append "\"" (assoc-ref inputs "cxxtest")
|
(string-append "\"" (assoc-ref inputs "cxxtest")
|
||||||
"/bin/cxxtestgen"
|
"/bin/cxxtestgen"
|
||||||
"\"")))))
|
"\"")))))
|
||||||
|
(add-after 'unpack 'fix-mozjs-compatibility
|
||||||
|
;; 0ad only builds fine with a specific version of mozjs
|
||||||
|
;; (version 78.6 for 0ad-0.0.25).
|
||||||
|
;; Here we change the error in case of version mismatch to a warning,
|
||||||
|
;; and add some minor compatibility fixes.
|
||||||
|
(lambda _
|
||||||
|
(substitute* "source/scriptinterface/ScriptTypes.h"
|
||||||
|
(("#error Your compiler is trying to use")
|
||||||
|
"#warning Your compiler is trying to use"))
|
||||||
|
(substitute* "source/scriptinterface/ScriptContext.cpp"
|
||||||
|
(("JS::PrepareZoneForGC\\(")
|
||||||
|
"JS::PrepareZoneForGC(m_cx, "))))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||||
(let* ((jobs (number->string (parallel-job-count)))
|
(let* ((jobs (number->string (parallel-job-count)))
|
||||||
|
|
Reference in New Issue