mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: ruby: Fix cross-compilation.
* gnu/packages/ruby.scm (ruby-2.6,ruby-2.7): Fix cross-compilation. [native-inputs]: When cross compiling, add this-package. [arguments]<#:configure-flags>: When cross compiling, add LDFLAGS. Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
parent
34d57ba3e3
commit
e35b7c5386
1 changed files with 22 additions and 3 deletions
|
@ -34,6 +34,7 @@
|
||||||
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
|
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
|
||||||
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
|
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
|
||||||
;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -129,7 +130,13 @@
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:test-target "test"
|
`(#:test-target "test"
|
||||||
#:configure-flags '("--enable-shared") ; dynamic linking
|
#:configure-flags
|
||||||
|
,(if (%current-target-system)
|
||||||
|
'(list (string-append
|
||||||
|
"LDFLAGS=-Wl,-rpath="
|
||||||
|
(assoc-ref %outputs "out") "/lib")
|
||||||
|
"--enable-shared")
|
||||||
|
''("--enable-shared")) ; dynamic linking
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'configure 'replace-bin-sh-and-remove-libffi
|
(add-before 'configure 'replace-bin-sh-and-remove-libffi
|
||||||
|
@ -147,6 +154,9 @@
|
||||||
"tool/rbinstall.rb")
|
"tool/rbinstall.rb")
|
||||||
(("/bin/sh") (which "sh")))
|
(("/bin/sh") (which "sh")))
|
||||||
#t)))))
|
#t)))))
|
||||||
|
(native-inputs (if (%current-target-system)
|
||||||
|
(list this-package)
|
||||||
|
'()))
|
||||||
(inputs
|
(inputs
|
||||||
(list readline openssl-1.1 libffi gdbm))
|
(list readline openssl-1.1 libffi gdbm))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
|
@ -177,7 +187,13 @@ a focus on simplicity and productivity.")
|
||||||
"042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877"))))
|
"042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877"))))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:test-target "test"
|
`(#:test-target "test"
|
||||||
#:configure-flags '("--enable-shared") ; dynamic linking
|
#:configure-flags
|
||||||
|
,(if (%current-target-system)
|
||||||
|
'(list (string-append
|
||||||
|
"LDFLAGS=-Wl,-rpath="
|
||||||
|
(assoc-ref %outputs "out") "/lib")
|
||||||
|
"--enable-shared")
|
||||||
|
''("--enable-shared")) ; dynamic linking
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'configure 'replace-bin-sh-and-remove-libffi
|
(add-before 'configure 'replace-bin-sh-and-remove-libffi
|
||||||
|
@ -204,7 +220,10 @@ a focus on simplicity and productivity.")
|
||||||
(delete-file "test/ruby/test_io.rb"))))
|
(delete-file "test/ruby/test_io.rb"))))
|
||||||
'()))))
|
'()))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list autoconf))))
|
(append (if (%current-target-system)
|
||||||
|
(list this-package)
|
||||||
|
'())
|
||||||
|
(list autoconf)))))
|
||||||
|
|
||||||
(define ruby-2.7-fixed
|
(define ruby-2.7-fixed
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue