gnu: eudev: Use new package style.

* gnu/packages/linux.scm (eudev)[arguments]: Convert to list of G-Expressions.
[native-inputs]: Drop labels.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Felix Lechner 2023-05-28 16:28:20 -07:00 committed by Liliana Marie Prikler
parent 1e3ed56b17
commit 7ff003bcbf
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -4189,56 +4189,52 @@ (define-public eudev
(patches (search-patches "eudev-rules-directory.patch")))) (patches (search-patches "eudev-rules-directory.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-before 'bootstrap 'patch-file-names #~(modify-phases %standard-phases
(lambda* (#:key inputs native-inputs #:allow-other-keys) (add-before 'bootstrap 'patch-file-names
(substitute* "man/make.sh" (lambda* (#:key inputs native-inputs #:allow-other-keys)
(("/usr/bin/xsltproc") (substitute* "man/make.sh"
(string-append (assoc-ref (("/usr/bin/xsltproc")
(or native-inputs inputs) "xsltproc") (search-input-file (or native-inputs inputs) "/bin/xsltproc")))))
"/bin/xsltproc"))))) (add-after 'install 'move-static-library
(add-after 'install 'move-static-library (lambda _
(lambda* (#:key outputs #:allow-other-keys) (let ((source (string-append #$output "/lib/libudev.a"))
(let* ((out (assoc-ref outputs "out")) (target (string-append #$output:static "/lib/libudev.a")))
(static (assoc-ref outputs "static")) (mkdir-p (dirname target))
(source (string-append out "/lib/libudev.a")) (link source target)
(target (string-append static "/lib/libudev.a"))) (delete-file source)
(mkdir-p (dirname target)) ;; Remove reference to the static library from the .la file
(link source target) ;; such that Libtool looks for it in the usual places.
(delete-file source) (substitute* (string-append #$output "/lib/libudev.la")
;; Remove reference to the static library from the .la file (("old_library=.*")
;; such that Libtool looks for it in the usual places. "old_library=''\n")))))
(substitute* (string-append out "/lib/libudev.la") (add-after 'install 'build-hwdb
(("old_library=.*") (lambda _
"old_library=''\n"))))) ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
(add-after 'install 'build-hwdb ;; similar tools to display product names.
(lambda* (#:key outputs #:allow-other-keys) ;;
;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and ;; XXX: This can't be done when cross-compiling. Find another way
;; similar tools to display product names. ;; to generate hwdb.bin for cross-built systems.
;; #$@(if (%current-target-system)
;; XXX: This can't be done when cross-compiling. Find another way #~(#t)
;; to generate hwdb.bin for cross-built systems. #~((invoke (string-append #$output "/bin/udevadm")
(let ((out (assoc-ref outputs "out"))) "hwdb" "--update"))))))
,@(if (%current-target-system) #:configure-flags #~(list "--enable-manpages")))
'(#t)
'((invoke (string-append out "/bin/udevadm")
"hwdb" "--update")))))))
#:configure-flags (list "--enable-manpages")))
(native-inputs (native-inputs
`(("autoconf" ,autoconf) (list autoconf
("automake" ,automake) automake
("gperf" ,gperf) gperf
("libtool" ,libtool) libtool
("pkg-config" ,pkg-config) pkg-config
;; For tests. ;; For tests.
("perl" ,perl) perl
("python" ,python-wrapper) python-wrapper
;; For documentation. ;; For documentation.
("docbook-xml" ,docbook-xml-4.2) docbook-xml-4.2
("docbook-xsl" ,docbook-xsl) docbook-xsl
("libxml2" ,libxml2) ;for $XML_CATALOG_FILES libxml2 ;for $XML_CATALOG_FILES
("xsltproc" ,libxslt))) libxslt))
(inputs (inputs
;; When linked against libblkid, eudev can populate /dev/disk/by-label ;; When linked against libblkid, eudev can populate /dev/disk/by-label
;; and similar; it also installs the '60-persistent-storage.rules' file, ;; and similar; it also installs the '60-persistent-storage.rules' file,