mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: newt: Fix cross-compilation.
* gnu/packages/slang.scm (newt): Fix-cross compilation. [arguments]: Use G-Expressions for `#:configure-flags', `#:make-flags' and `#:phases', also set correct path for `python-config'. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
parent
bb5afc5b9e
commit
c0e713f6e2
1 changed files with 28 additions and 21 deletions
|
@ -147,34 +147,41 @@ (define-public newt
|
||||||
(inputs
|
(inputs
|
||||||
(list slang popt python fribidi))
|
(list slang popt python fribidi))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; no test suite
|
(list
|
||||||
|
#:tests? #f ; no test suite
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
;; Set the correct RUNPATH in binaries.
|
;; Set the correct RUNPATH in binaries.
|
||||||
(list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
|
#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
|
||||||
#:make-flags
|
#:make-flags
|
||||||
;; configure uses a hard-coded search of /usr/include/python* to set
|
;; configure uses a hard-coded search of /usr/include/python* to set
|
||||||
;; this variable, and does not allow us to override it from the
|
;; this variable, and does not allow us to override it from the
|
||||||
;; command line. Fortunately, the Makefile does, so provide it here.
|
;; command line. Fortunately, the Makefile does, so provide it here.
|
||||||
(list (string-append "PYTHONVERS=python"
|
#~(list
|
||||||
,(version-major+minor (package-version python))))
|
(string-append "PYTHONVERS=python"
|
||||||
|
#$(version-major+minor (package-version python))))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after
|
(add-after 'unpack 'patch-/usr/bin/install
|
||||||
'unpack 'patch-/usr/bin/install
|
(lambda _
|
||||||
(lambda _
|
(substitute* "po/Makefile"
|
||||||
(substitute* "po/Makefile"
|
(("/usr/bin/install") "install"))))
|
||||||
(("/usr/bin/install") "install"))
|
(add-before 'build 'add-python-config-to-path
|
||||||
#t))
|
(lambda* (#:key target #:allow-other-keys)
|
||||||
(add-after
|
;; When cross-compiling python-config is not present in $PATH.
|
||||||
'install 'move-python
|
;;
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
;; It is a shell script without dependencies on target binaries
|
||||||
(let ((out (assoc-ref outputs "out"))
|
;; so it can be run on the host to allow cross-compilation.
|
||||||
(py (assoc-ref outputs "python"))
|
(when target
|
||||||
(ver ,(version-major+minor (package-version python))))
|
(let ((path (getenv "PATH"))
|
||||||
(mkdir-p (string-append py "/lib"))
|
(py (string-append #$python "/bin")))
|
||||||
(rename-file (string-append out "/lib/python" ver)
|
(setenv "PATH" (string-append path ":" py))))))
|
||||||
(string-append py "/lib/python" ver))
|
(add-after 'install 'move-python
|
||||||
#t))))))
|
(lambda* _
|
||||||
|
(let ((ver #$(version-major+minor (package-version python))))
|
||||||
|
(mkdir-p (string-append #$output:python "/lib"))
|
||||||
|
(rename-file
|
||||||
|
(string-append #$output "/lib/python" ver)
|
||||||
|
(string-append #$output:python "/lib/python" ver))))))))
|
||||||
(home-page "https://pagure.io/newt")
|
(home-page "https://pagure.io/newt")
|
||||||
(synopsis "Not Erik's Windowing Toolkit - text mode windowing with slang")
|
(synopsis "Not Erik's Windowing Toolkit - text mode windowing with slang")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in a new issue