libpcap: add pkg-config support
PATCH 1/1 libpcap: add pkg-config support
libpcap was not previously installing a pkg-config file. Add a basic one that will allow using 'pkg-config --libs libpcap', for example, in recipes rather than 'pcap-config', which frequently returns incorrect information.
---
I'm not convinced that this is necessary, but when I tried to convert the ptpd recipe in meta-networking to stop failing by using pcap-config it seems like libpcap was never actually installing a reasonable .pc file. The only other example I could find in meta-networking switched from using pcap-config to an internal pcap library, rather than using the oe-core version, so maybe it really isn't working for anyone right now. I created something that at least gets ptpd to stop blowing up, but if there's a proper way to do this for ptpd, I'd be happy to adopt that instead.
-J.
meta/recipes-connectivity/libpcap/libpcap.inc | 2 +- .../libpcap/libpcap-pkgconfig-support.patch | 71 ++++++++++++++++++++++ meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb | 6 +- 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch
meta/recipes-connectivity/libpcap/libpcap.inc +1 -1
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \ file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2" DEPENDS = "flex-native bison-native" -inherit bluetooth +inherit bluetooth pkgconfig PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}" PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch new file +71 -0
71 lines not on this page · raw message
meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb +5 -1
@@ -1,6 +1,8 @@ require libpcap.inc -SRC_URI += "file://aclocal.patch" +SRC_URI += "file://aclocal.patch \ + file://libpcap-pkgconfig-support.patch \ + " SRC_URI[md5sum] = "5f14191c1a684a75532c739c2c4059fa" SRC_URI[sha256sum] = "5db3e2998f1eeba2c76da55da5d474248fe19c44f49e15cac8a796a2c7e19690"
@@ -19,4 +21,6 @@ do_install_prepend () { install -d ${D}${bindir} oe_runmake install-shared DESTDIR=${D} oe_libinstall -a -so libpcap ${D}${libdir} + sed "s|@VERSION@|${PV}|" -i ${B}/libpcap.pc + install -D -m 0644 libpcap.pc ${D}${libdir}/pkgconfig/libpcap.pc }
Signature · 1 line
1.9.1