distro: readline: Allow stripping of the libraires.

* distro/packages/readline.scm (readline)[arguments]: Add `post-install'
  phase to make libraries writable.
This commit is contained in:
Ludovic Courtès 2012-11-05 23:47:39 +01:00
parent 0af2c24ef7
commit 4500581a7c
1 changed files with 15 additions and 1 deletions

View File

@ -45,7 +45,21 @@
#:configure-flags #:configure-flags
(list (string-append "LDFLAGS=-Wl,-rpath -Wl," (list (string-append "LDFLAGS=-Wl,-rpath -Wl,"
(assoc-ref %build-inputs "ncurses") (assoc-ref %build-inputs "ncurses")
"/lib")))) "/lib"))
#:phases (alist-cons-after
'install 'post-install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib")))
;; Make libraries writable so that `strip' can
;; work. Failing to do that, it bails out with
;; "Permission denied".
(for-each (lambda (f) (chmod f #o755))
(find-files lib "\\.so"))
(for-each (lambda (f) (chmod f #o644))
(find-files lib "\\.a"))))
%standard-phases)))
(synopsis "GNU Readline, a library for interactive line editing") (synopsis "GNU Readline, a library for interactive line editing")
(description (description
"The GNU Readline library provides a set of functions for use by "The GNU Readline library provides a set of functions for use by