aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-07-16 21:14:59 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-07-19 00:53:10 +0200
commit50849734e986a5824bcca20fe64b2886f8f1a42b (patch)
treed85497cd6fe1f9bc15b977fcc74d833d147d8436 /gnu/packages
parent6c4709889c665f194822677dc7a1fcd513e46708 (diff)
downloadguix-50849734e986a5824bcca20fe64b2886f8f1a42b.tar
guix-50849734e986a5824bcca20fe64b2886f8f1a42b.tar.gz
gnu: pcre: Install static libraries to separate output.
* gnu/packages/pcre.scm (pcre)[outputs]: Add "static". [arguments]: Add 'move-static-libs' phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/pcre.scm17
1 files changed, 15 insertions, 2 deletions
diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm
index 5719b7bb45..21752e9cfd 100644
--- a/gnu/packages/pcre.scm
+++ b/gnu/packages/pcre.scm
@@ -50,7 +50,8 @@
(build-system gnu-build-system)
(outputs '("out" ;library & headers
"bin" ;depends on Readline (adds 20MiB to the closure)
- "doc")) ;1.8 MiB of HTML
+ "doc" ;1.8 MiB of HTML
+ "static")) ;1.8 MiB static libraries
(inputs `(("bzip2" ,bzip2)
("readline" ,readline)
("zlib" ,zlib)))
@@ -63,7 +64,19 @@
"--enable-unicode-properties"
"--enable-pcre16"
"--enable-pcre32"
- "--enable-jit")))
+ "--enable-jit")
+ #:phases (modify-phases %standard-phases
+ (add-after 'install 'move-static-libs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((source (string-append (assoc-ref outputs "out") "/lib"))
+ (static (string-append (assoc-ref outputs "static") "/lib")))
+ (mkdir-p static)
+ (for-each (lambda (lib)
+ (link lib (string-append static "/"
+ (basename lib)))
+ (delete-file lib))
+ (find-files source "\\.a$"))
+ #t))))))
(synopsis "Perl Compatible Regular Expressions")
(description
"The PCRE library is a set of functions that implement regular expression