me
/
guix
Archived
1
0
Fork 0

gnu: pcre: Install static libraries to separate output.

* gnu/packages/pcre.scm (pcre)[outputs]: Add "static".
[arguments]: Add 'move-static-libs' phase.
master
Marius Bakke 2018-07-16 21:14:59 +02:00
parent 6c4709889c
commit 50849734e9
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 15 additions and 2 deletions

View File

@ -50,7 +50,8 @@
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs '("out" ;library & headers (outputs '("out" ;library & headers
"bin" ;depends on Readline (adds 20MiB to the closure) "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) (inputs `(("bzip2" ,bzip2)
("readline" ,readline) ("readline" ,readline)
("zlib" ,zlib))) ("zlib" ,zlib)))
@ -63,7 +64,19 @@
"--enable-unicode-properties" "--enable-unicode-properties"
"--enable-pcre16" "--enable-pcre16"
"--enable-pcre32" "--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") (synopsis "Perl Compatible Regular Expressions")
(description (description
"The PCRE library is a set of functions that implement regular expression "The PCRE library is a set of functions that implement regular expression