gnu: expat: Install the static library.

* gnu/packages/xml.scm (expat)[outputs]: New field.
[arguments]: Remove #:configure-flags.  Add #:phases.
* gnu/packages/commencement.scm (expat-sans-tests)[outputs]: New field.
[arguments]: Add #:phases.
This commit is contained in:
Marius Bakke 2021-06-05 15:35:42 +02:00
parent 557084a0c9
commit a6c292a6f1
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
2 changed files with 15 additions and 1 deletions

View File

@ -3053,6 +3053,7 @@ memoized as a function of '%current-system'."
(package
(inherit expat)
(inputs (%boot0-inputs))
(outputs '("out"))
(arguments
;; XXX: Linking 'runtestscpp' fails with things like:
;;
@ -3067,6 +3068,7 @@ memoized as a function of '%current-system'."
;; Since we're not passing the right -Wl,-rpath flags, build the
;; static library to avoid RUNPATH validation failure.
`(cons "--disable-shared" ,flags))
((#:phases phases) '%standard-phases)
((#:tests? _ #f) #f))))))
(define python-boot0

View File

@ -135,7 +135,19 @@ the entire document.")
"0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg")))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
'(#:phases (modify-phases %standard-phases
(add-after 'install 'move-static-library
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(static (assoc-ref outputs "static")))
(mkdir-p (string-append static "/lib"))
(link (string-append out "/lib/libexpat.a")
(string-append static "/lib/libexpat.a"))
(delete-file (string-append out "/lib/libexpat.a"))
(substitute* (string-append out "/lib/libexpat.la")
(("old_library=.*")
"old_library=''"))))))))
(outputs '("out" "static"))
(home-page "https://libexpat.github.io/")
(synopsis "Stream-oriented XML parser library written in C")
(description