summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-05-25 20:12:26 +0200
committerLudovic Courtès <ludo@gnu.org>2013-05-25 20:16:45 +0200
commitf755aa3f7ac7a413d8fcc35b1264aff813cd9313 (patch)
tree466149e6c017412618b71e34059ddab5981e47b9 /gnu
parent089b06348e8129980660c69f8122015c1ad6ae9c (diff)
gnu: ncurses, readline: Allow cross-compilation.
* gnu/packages/ncurses.scm (ncurses): Add `cross-pre-install-phase'. Use different phases when (%current-target-system) is true. * gnu/packages/readline.scm (readline): Use %standard-cross-phases as the base when (%current-target-system) is true.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/ncurses.scm41
-rw-r--r--gnu/packages/readline.scm4
2 files changed, 34 insertions, 11 deletions
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 5199ec7c23c..c1badae8a38 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -42,7 +42,16 @@
42 (string-append "CONFIG_SHELL=" bash) 42 (string-append "CONFIG_SHELL=" bash)
43 (string-append "--prefix=" out) 43 (string-append "--prefix=" out)
44 configure-flags))))) 44 configure-flags)))))
45 (cross-pre-install-phase
46 '(lambda _
47 ;; Run the native `tic' program, not the cross-built one.
48 (substitute* "misc/run_tic.sh"
49 (("\\{TIC_PATH:=.*\\}")
50 "{TIC_PATH:=true}")
51 (("cross_compiling:=no")
52 "cross_compiling:=yes"))))
45 (post-install-phase 53 (post-install-phase
54 ;; FIXME: The `tic' binary lacks a RUNPATH; fix it.
46 '(lambda* (#:key outputs #:allow-other-keys) 55 '(lambda* (#:key outputs #:allow-other-keys)
47 (let ((out (assoc-ref outputs "out"))) 56 (let ((out (assoc-ref outputs "out")))
48 ;; When building a wide-character (Unicode) build, create backward 57 ;; When building a wide-character (Unicode) build, create backward
@@ -97,16 +106,28 @@
97 '("--without-cxx-binding") 106 '("--without-cxx-binding")
98 '())) 107 '()))
99 #:tests? #f ; no "check" target 108 #:tests? #f ; no "check" target
100 #:phases (alist-cons-after 109 #:phases ,(if (%current-target-system)
101 'install 'post-install ,post-install-phase 110
102 (alist-cons-before 111 `(alist-cons-before ; cross build
103 'configure 'patch-makefile-SHELL 112 'configure 'patch-makefile-SHELL
104 ,patch-makefile-phase 113 ,patch-makefile-phase
105 (alist-replace 114 (alist-cons-before
106 'configure 115 'install 'pre-install
107 ,configure-phase 116 ,cross-pre-install-phase
108 %standard-phases))))) 117 (alist-cons-after
109 (self-native-input? #t) 118 'install 'post-install ,post-install-phase
119 %standard-cross-phases)))
120
121 `(alist-cons-after ; native build
122 'install 'post-install ,post-install-phase
123 (alist-cons-before
124 'configure 'patch-makefile-SHELL
125 ,patch-makefile-phase
126 (alist-replace
127 'configure
128 ,configure-phase
129 %standard-phases))))))
130 (self-native-input? #t) ; for `tic'
110 (synopsis "Terminal emulation (termcap, terminfo) library") 131 (synopsis "Terminal emulation (termcap, terminfo) library")
111 (description 132 (description
112 "The Ncurses (new curses) library is a free software emulation of curses 133 "The Ncurses (new curses) library is a free software emulation of curses
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index 8857666fcc4..1fb43769712 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -61,7 +61,9 @@
61 #:phases (alist-cons-after 61 #:phases (alist-cons-after
62 'install 'post-install 62 'install 'post-install
63 ,post-install-phase 63 ,post-install-phase
64 %standard-phases))) 64 ,(if (%current-target-system)
65 '%standard-cross-phases
66 '%standard-phases))))
65 (synopsis "Edit command lines while typing, with history support") 67 (synopsis "Edit command lines while typing, with history support")
66 (description 68 (description
67 "The GNU Readline library provides a set of functions for use by 69 "The GNU Readline library provides a set of functions for use by