guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#54069] [PATCH v2 2/4] gnu: pciutils: Unbundle pci.ids and use lates


From: Brendan Tildesley
Subject: [bug#54069] [PATCH v2 2/4] gnu: pciutils: Unbundle pci.ids and use latest.
Date: Sat, 26 Feb 2022 15:32:36 +1100

* gnu/packages/pciutils.scm (pciutils):
[inputs]: Add hwdata:pci for latest pci.ids file. Remove zlib since the ids
files aren't gzipped.
[arguments]: Don't install update-pciids script or it's man page. Don't
install bundled old pci.ids file, use hwdata instead.
---
 gnu/packages/pciutils.scm | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
index f16f420ec2..f7969e0c4d 100644
--- a/gnu/packages/pciutils.scm
+++ b/gnu/packages/pciutils.scm
@@ -92,7 +92,7 @@ (define-public pciutils
      `(#:phases
        (modify-phases %standard-phases
          (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; There's no 'configure' script, just a raw makefile.
              (substitute* "Makefile"
                ,@(if (%current-target-system)
@@ -122,13 +122,16 @@ (define-public pciutils
                (("^SHARED=.*$")
                 ;; Build libpciutils.so.
                 "SHARED := yes\n")
-               (("^ZLIB=.*$")
-                ;; Ask for zlib support, for 'pci.ids.gz' decompression.
-                "ZLIB := yes\n")
 
                (("^IDSDIR=.*$")
                 ;; Installation directory of 'pci.ids.gz'.
-                "IDSDIR = $(SHAREDIR)/hwdata\n"))))
+                (string-append "IDSDIR = " (assoc-ref inputs "hwdata:pci") 
"share/hwdata\n"))
+               ;; Don't install update script, its man page, or old bundled 
pci.ids file.
+               ((".*INSTALL.*update-pciids .*") "")
+               (("update-pciids update-pciids.8 ") "")
+               (("(.*INSTALL.*)(update-pciids.8)(.*)" _ a _ b)
+                (string-append a b))
+               ((".*INSTALL.*PCI_IDS.*") ""))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Install the commands, library, and .pc files.
@@ -157,7 +160,7 @@ (define-public pciutils
        ,@(if (hurd-target?)
              `(("hurd-patch" ,(search-patch "pciutils-hurd-fix.patch")))
              '())
-       ("zlib" ,zlib)))
+       ("hwdata:pci" ,hwdata "pci")))
     (home-page "https://mj.ucw.cz/sw/pciutils/";)
     (synopsis "Programs for inspecting and manipulating PCI devices")
     (description
-- 
2.34.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]