Skip to contentSkip to conversation

udev: Don't introduce usb or pci dependencies without usb or pci being featured

PATCH RESEND In review Jens Rehsack 1 participant 1 message Feb 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/7 udev: Don't introduce usb or pci dependencies without usb or pci being featured

Fixes that udev always requires PCI or USB, idenpendently from DISTRO_FEATURES or PACKAGECONFIG.

---
 meta/recipes-core/udev/udev.inc | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
meta/recipes-core/udev/udev.inc +8 -5
index 93d7369..df41f11 100644
@@ -12,7 +12,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
 LDFLAGS += "-lrt"
 
-DEPENDS = "glib-2.0 libusb usbutils pciutils glib-2.0-native gperf-native libxslt-native util-linux"
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'usbhost', 'usb', '', d)} \
+  ${@base_contains('DISTRO_FEATURES', 'pci', 'pci', '', d)}"
+
+DEPENDS = "glib-2.0 glib-2.0-native gperf-native libxslt-native util-linux"
+
+PACKAGECONFIG[usb] = "--with-usb-ids-path=${datadir}/usb.ids,--without-usb-ids-path,libusb usbutils"
+PACKAGECONFIG[pci] = "--with-pci-ids-path=${datadir}/pci.ids ac_cv_file__usr_share_pci_ids=no ac_cv_file__usr_share_hwdata_pci_ids=no ac_cv_file__usr_share_misc_pci_ids=yes,--without-pci-ids-path,pciutils"
+
 RPROVIDES_${PN} = "hotplug"
 
 PROVIDES = "libgudev"
@@ -42,10 +49,6 @@ RDEPENDS_${PN}-ptest += "make perl python"
 libexecdir = "${base_libdir}"
 EXTRA_OECONF = "--disable-introspection \
                 --with-rootlibdir=${base_libdir} \
-                --with-pci-ids-path=${datadir}/pci.ids \
-                ac_cv_file__usr_share_pci_ids=no \
-                ac_cv_file__usr_share_hwdata_pci_ids=no \
-                ac_cv_file__usr_share_misc_pci_ids=yes \
                 --sbindir=${base_sbindir} \
                 --libexecdir=${nonarch_base_libdir} \
                 --with-rootlibdir=${base_libdir} \

--
2.6.3

--
Jens Rehsack - [email protected]