gnu: libpciaccess: Refer to 'pci.ids' from pciutils.

Prior to this change libpciaccess would try to read from
/usr/share/hwdata/pci.ids.

* gnu/packages/xorg.scm (libpciaccess)[arguments]: New field.
[inputs]: Add PCIUTILS.
This commit is contained in:
Ludovic Courtès 2017-07-10 10:53:50 +02:00 committed by Ludovic Courtès
parent a48da398b3
commit ab2a8cac58
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 23 additions and 1 deletions

View File

@ -57,6 +57,7 @@
#:use-module (gnu packages llvm)
#:use-module (gnu packages m4)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@ -1112,8 +1113,29 @@ themselves.")
(base32
"16dr80rdw5bzdyhahvilfjrflj7scs2yl2mmghsb84f3nglm8b3m"))))
(build-system gnu-build-system)
(arguments
'(;; Make sure libpciaccess can read compressed 'pci.ids' files as
;; provided by pciutils.
#:configure-flags
(list "--with-zlib"
(string-append "--with-pciids-path="
(assoc-ref %build-inputs "pciutils")
"/share/hwdata"))
#:phases
(modify-phases %standard-phases
(add-after 'install 'add-L-zlib
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Provide '-LZLIB/lib' next to '-lz' in the .la file.
(let ((zlib (assoc-ref inputs "zlib"))
(out (assoc-ref outputs "out")))
(substitute* (string-append out "/lib/libpciaccess.la")
(("-lz")
(string-append "-L" zlib "/lib -lz")))
#t))))))
(inputs
`(("zlib" ,zlib)))
`(("zlib" ,zlib)
("pciutils" ,pciutils))) ;for 'pci.ids.gz'
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "https://www.x.org/wiki/")