aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-06-04 11:24:07 +0200
committerLudovic Courtès <ludo@gnu.org>2015-06-04 11:24:07 +0200
commit696062b1f06194f6c276ff6889ce2f19b1755eaf (patch)
tree9e7da1465f0182f970ba6585355a2a56d7637d16 /gnu
parentf683d67d66786efe003f6431a471aa7b36dcf7fa (diff)
downloadpatches-696062b1f06194f6c276ff6889ce2f19b1755eaf.tar
patches-696062b1f06194f6c276ff6889ce2f19b1755eaf.tar.gz
gnu: perl: Strip the DSOs.
* gnu/packages/perl.scm (perl)[arguments]: Add 'make-shared-objects-writable' phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/perl.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 5ace05d0f3..09e57578d8 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -72,7 +72,18 @@
"-Dinstallstyle=lib/perl5"
"-Duseshrplib"
(string-append "-Dlocincpth=" libc "/include")
- (string-append "-Dloclibpth=" libc "/lib")))))))))
+ (string-append "-Dloclibpth=" libc "/lib"))))))
+
+ (add-before
+ 'strip 'make-shared-objects-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The 'lib/perl5' directory contains ~50 MiB of .so. Make them
+ ;; writable so that 'strip' actually strips them.
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib")))
+ (for-each (lambda (dso)
+ (chmod dso #o755))
+ (find-files lib "\\.so$"))))))))
(native-search-paths (list (search-path-specification
(variable "PERL5LIB")
(files '("lib/perl5/site_perl")))))