mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 22:50:23 -05:00
gnu: lz4: Add a :static output.
* gnu/packages/compression.scm (lz4)[outputs]: Add "static" to this new field. [arguments]: Replace the ‘delete-static-library’ phase with ‘move-static-library’.
This commit is contained in:
parent
0569a83268
commit
2e8a9db6ef
1 changed files with 19 additions and 14 deletions
|
@ -798,6 +798,7 @@ (define-public lz4
|
||||||
"0lpaypmk70ag2ks3kf2dl4ac3ba40n5kc1ainkp9wfjawz76mh61"))
|
"0lpaypmk70ag2ks3kf2dl4ac3ba40n5kc1ainkp9wfjawz76mh61"))
|
||||||
(file-name (git-file-name name version))))
|
(file-name (git-file-name name version))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
|
(outputs (list "out" "static"))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(;; For tests.
|
`(;; For tests.
|
||||||
("python" ,python)
|
("python" ,python)
|
||||||
|
@ -806,20 +807,24 @@ (define-public lz4
|
||||||
`(#:test-target "test"
|
`(#:test-target "test"
|
||||||
#:make-flags (list (string-append "CC=" ,(cc-for-target))
|
#:make-flags (list (string-append "CC=" ,(cc-for-target))
|
||||||
(string-append "prefix=" (assoc-ref %outputs "out")))
|
(string-append "prefix=" (assoc-ref %outputs "out")))
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases
|
||||||
(delete 'configure) ;no configure script
|
(modify-phases %standard-phases
|
||||||
(add-before 'check 'disable-broken-test
|
(delete 'configure) ; no configure script
|
||||||
(lambda _
|
(add-before 'check 'disable-broken-test
|
||||||
;; XXX: test_install.sh fails when prefix is a subdirectory.
|
(lambda _
|
||||||
(substitute* "tests/Makefile"
|
(substitute* "tests/Makefile"
|
||||||
(("^test: (.*) test-install" _ targets)
|
;; This fails when $prefix is not a single top-level directory.
|
||||||
(string-append "test: " targets)))
|
(("^test: (.*) test-install" _ targets)
|
||||||
#t))
|
(string-append "test: " targets)))
|
||||||
(add-after 'install 'delete-static-library
|
#t))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'install 'move-static-library
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(delete-file (string-append out "/lib/liblz4.a"))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
#t))))))
|
(static (assoc-ref outputs "static")))
|
||||||
|
(mkdir-p (string-append static "/lib"))
|
||||||
|
(rename-file (string-append out "/lib/liblz4.a")
|
||||||
|
(string-append static "/lib/liblz4.a"))
|
||||||
|
#t))))))
|
||||||
(home-page "https://www.lz4.org")
|
(home-page "https://www.lz4.org")
|
||||||
(synopsis "Compression algorithm focused on speed")
|
(synopsis "Compression algorithm focused on speed")
|
||||||
(description "LZ4 is a lossless compression algorithm, providing
|
(description "LZ4 is a lossless compression algorithm, providing
|
||||||
|
|
Loading…
Reference in a new issue