diff options
| author | Zheng Junjie <z572@z572.online> | 2025-03-30 13:38:00 +0800 |
|---|---|---|
| committer | Christopher Baines <mail@cbaines.net> | 2025-04-06 17:24:08 +0100 |
| commit | dc2d7d0cd2019c58270c9926bcb9da63b46a57a5 (patch) | |
| tree | 7762a78a9dc6344aeb9a2bccbb745ecf0222eb5b /gnu/packages/lua.scm | |
| parent | 926b6d98e5800973877ba512e08a508475b29ef8 (diff) | |
gnu: luajit: Add riscv64 support.
* gnu/packages/lua.scm (luajit)[arguments]: Use G-expression, when target
riscv64, Add luajit-add-riscv64-support.patch.
[supported-systems]: Add riscv64-linux.
* gnu/packages/patches/luajit-add-riscv64-support.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Change-Id: Ibdb40a99bc0d7709887cfe772e6d9dae5083592c
Signed-off-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'gnu/packages/lua.scm')
| -rw-r--r-- | gnu/packages/lua.scm | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index cbac56e1313..59598f20c55 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -23,6 +23,7 @@ ;;; Copyright © 2023 Timo Wilken <guix@twilken.net> ;;; Copyright © 2024 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl> ;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2025 Zheng Junjie <z572@z572.online> ;;; ;;; This file is part of GNU Guix. ;;; @@ -191,19 +192,28 @@ for configuration, scripting, and rapid prototyping.") "0srwk9nmiz8a93f70inq2597ff6xy203ckr4c0k7jcksdixymi9v")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; luajit is distributed without tests - #:phases - (modify-phases %standard-phases - (delete 'configure)) ; no configure script - #:make-flags (list (string-append "PREFIX=" - (assoc-ref %outputs "out"))))) + (list #:tests? #f ; luajit is distributed without tests + #:phases + #~(modify-phases %standard-phases + #$@(if (target-riscv64?) + #~((add-after 'unpack 'patch + (lambda _ + (invoke + "patch" "--force" "-p1" "-i" + #$(local-file + (search-patch + "luajit-add-riscv64-support.patch")))))) + #~()) + (delete 'configure)) ; no configure script + #:make-flags #~(list (string-append "PREFIX=" + (assoc-ref %outputs "out"))))) (home-page "https://www.luajit.org/") (synopsis "Just in time compiler for Lua programming language version 5.1") ;; On powerpc64le-linux, the build fails with an error: "No support for ;; PowerPC 64 bit mode (yet)". See: https://issues.guix.gnu.org/49220 (supported-systems (fold delete %supported-systems - (list "powerpc64le-linux" "riscv64-linux"))) + (list "powerpc64le-linux"))) (description "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language. Lua is a powerful, dynamic and light-weight programming |
