gnu: libextractor: Modernize.

* gnu/packages/gnunet.scm (libextractor): Move inputs, native-inputs after
arguments.
[arguments]: Use gexps.  Remove trailing #t.
[inputs]: Remove labels and sort.

Change-Id: Ia3950630bd0985e106fb92cce3f92732e93970df
This commit is contained in:
Maxim Cournoyer 2024-03-09 21:01:20 -05:00
parent a2bf7bda4c
commit dc24ee62ee
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -13,7 +13,7 @@
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2023 Adam Faiz <adam.faiz@disroot.org>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -93,6 +93,25 @@ (define-public libextractor
(base32
"0mgprmwdhdwq9xhfxfhcncd304425nvcc4zi8ci5f0nja4n333xv"))))
(build-system gnu-build-system)
(outputs '("out"
"static")) ; 420 KiB .a files
(arguments
(list #:configure-flags
#~(list (string-append "--with-ltdl="
#$(this-package-input "libltdl")))
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys)
;; Move static libraries to the "static" output.
(let* ((out #$output)
(lib (string-append out "/lib"))
(slib (string-append #$output:static "/lib")))
(mkdir-p slib)
(for-each (lambda (file)
(install-file file slib)
(delete-file file))
(find-files lib "\\.a$"))))))))
;; WARNING: Checks require /dev/shm to be in the build chroot, especially
;; not to be a symbolic link to /run/shm.
;; FIXME:
@ -100,50 +119,29 @@ (define-public libextractor
;; available for maximum coverage:
;; * librpm (rpm) ; investigate failure
;; * libtidy-html (tidy-html) ; investigate failure
(inputs
`(("exiv2" ,exiv2)
("bzip2" ,bzip2)
("flac" ,flac)
("file" ,file) ;libmagic, for the MIME plug-in
("glib" ,glib)
("giflib" ,giflib)
("gstreamer" ,gstreamer)
("gst-plugins-base" ,gst-plugins-base)
("gdk-pixbuf" ,gdk-pixbuf)
("libarchive" ,libarchive)
("libgsf" ,libgsf)
("libjpeg" ,libjpeg-turbo)
("libltdl" ,libltdl)
("libmpeg2" ,libmpeg2)
("libmp4v2" ,libmp4v2)
("libsmf" ,libsmf)
("libogg" ,libogg)
("libtiff" ,libtiff)
("libvorbis" ,libvorbis)
("zlib" ,zlib)))
(native-inputs
(list pkg-config))
(outputs '("out"
"static")) ; 420 KiB .a files
(arguments
`(#:configure-flags
(list (string-append "--with-ltdl="
(assoc-ref %build-inputs "libltdl")))
#:phases
(modify-phases %standard-phases
(add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys)
;; Move static libraries to the "static" output.
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(static (assoc-ref outputs "static"))
(slib (string-append static "/lib")))
(mkdir-p slib)
(for-each (lambda (file)
(install-file file slib)
(delete-file file))
(find-files lib "\\.a$"))
#t))))))
(inputs
(list bzip2
exiv2
file ;libmagic, for the MIME plug-in
flac
gdk-pixbuf
giflib
glib
gst-plugins-base
gstreamer
libarchive
libgsf
libjpeg-turbo
libltdl
libmp4v2
libmpeg2
libogg
libsmf
libtiff
libvorbis
zlib))
(synopsis "Library to extract meta-data from media files")
(description
"GNU libextractor is a library for extracting metadata from files. It