diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2024-11-26 10:44:33 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2024-11-26 11:12:25 +0200 |
| commit | 5ff9e51e2c4dae0dc74f5c85ec553e89fe1824fd (patch) | |
| tree | a3d61bc0244c923ce89e441af49101c010233f1e | |
| parent | 276744f3d6a8a8d1a6227f393db5794616ec4b86 (diff) | |
gnu: the-powder-toy: Enable building on more architectures.
* gnu/packages/games.scm (the-powder-toy)[source]: Add a snippet to
identify more machines as 64-bit.
[arguments]: Add configure-flags when building with lua. Add a phase to
correctly use lua when necessary.
[inputs]: Build with luajit or lua-5.2 depending on platform support.
Change-Id: I7c1fda2d45f3e6c74475e33ec2a23f9accd6964f
| -rw-r--r-- | gnu/packages/games.scm | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 44dff4fe544..6d29f7ac005 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm | |||
| @@ -8175,15 +8175,31 @@ elements to achieve a simple goal in the most complex way possible.") | |||
| 8175 | (commit (string-append "v" version)))) | 8175 | (commit (string-append "v" version)))) |
| 8176 | (file-name (git-file-name name version)) | 8176 | (file-name (git-file-name name version)) |
| 8177 | (sha256 | 8177 | (sha256 |
| 8178 | (base32 "06l39w3ggrzn8799dqll606by4f88kjr60r879w8j26csx1py76g")))) | 8178 | (base32 "06l39w3ggrzn8799dqll606by4f88kjr60r879w8j26csx1py76g")) |
| 8179 | (snippet | ||
| 8180 | #~(begin (use-modules (guix build utils)) | ||
| 8181 | (substitute* "meson.build" | ||
| 8182 | (("'aarch64', 'x86_64'") | ||
| 8183 | (string-append "'aarch64', 'loongarch64', 'mips64', 'ppc64', " | ||
| 8184 | "'riscv64', 'sparc64', 'x86_64'"))))))) | ||
| 8179 | (build-system meson-build-system) | 8185 | (build-system meson-build-system) |
| 8180 | (arguments | 8186 | (arguments |
| 8181 | `(#:configure-flags (list (string-append | 8187 | `(#:configure-flags (list (string-append |
| 8182 | "-Dworkaround_elusive_bzip2_include_dir=" | 8188 | "-Dworkaround_elusive_bzip2_include_dir=" |
| 8183 | (assoc-ref %build-inputs "bzip2"))) | 8189 | (assoc-ref %build-inputs "bzip2")) |
| 8184 | ;; No install target | 8190 | ,@(if (this-package-input "lua") |
| 8191 | `("-Dlua=lua-5.2" | ||
| 8192 | "-Dworkaround_noncpp_lua=true") | ||
| 8193 | '())) | ||
| 8185 | #:phases | 8194 | #:phases |
| 8186 | (modify-phases %standard-phases | 8195 | (modify-phases %standard-phases |
| 8196 | ;; Our lua variants are named lua-<version>, not lua<version>. | ||
| 8197 | (add-after 'unpack 'adjust-lua-variant-names | ||
| 8198 | (lambda _ | ||
| 8199 | (substitute* '("meson.build" | ||
| 8200 | "meson_options.txt") | ||
| 8201 | (("lua5\\.") "lua-5.")))) | ||
| 8202 | ;; No install target | ||
| 8187 | (replace 'install | 8203 | (replace 'install |
| 8188 | (lambda _ | 8204 | (lambda _ |
| 8189 | (let* ((output (assoc-ref %outputs "out")) | 8205 | (let* ((output (assoc-ref %outputs "out")) |
| @@ -8205,14 +8221,18 @@ elements to achieve a simple goal in the most complex way possible.") | |||
| 8205 | (string-append dir "/powdertoy-powder.png")))) | 8221 | (string-append dir "/powdertoy-powder.png")))) |
| 8206 | '("16" "32" "48")))))))) | 8222 | '("16" "32" "48")))))))) |
| 8207 | (native-inputs (list pkg-config)) | 8223 | (native-inputs (list pkg-config)) |
| 8208 | (inputs (list bzip2 | 8224 | (inputs |
| 8209 | curl | 8225 | (append |
| 8210 | fftwf | 8226 | (list bzip2 |
| 8211 | jsoncpp | 8227 | curl |
| 8212 | libpng | 8228 | fftwf |
| 8213 | luajit | 8229 | jsoncpp |
| 8214 | sdl2 | 8230 | libpng) |
| 8215 | zlib)) | 8231 | (if (supported-package? luajit) |
| 8232 | (list luajit) | ||
| 8233 | (list lua-5.2)) | ||
| 8234 | (list sdl2 | ||
| 8235 | zlib))) | ||
| 8216 | (synopsis "Free physics sandbox game") | 8236 | (synopsis "Free physics sandbox game") |
| 8217 | (description | 8237 | (description |
| 8218 | "The Powder Toy is a free physics sandbox game, which simulates air | 8238 | "The Powder Toy is a free physics sandbox game, which simulates air |
