summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/libpcap
diff options
context:
space:
mode:
authorJoe MacDonald <joe_macdonald@mentor.com>2015-02-24 23:39:01 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-27 07:38:41 +0000
commitde638414f731838b06e41ff1d975e48ec0b58ee8 (patch)
tree9229469d305d66f8c42339fd1c70f27a258f05ef /meta/recipes-connectivity/libpcap
parent7ce7756adfce50ba12be319b1f087f31064376b8 (diff)
downloadpoky-de638414f731838b06e41ff1d975e48ec0b58ee8.tar.gz
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. (From OE-Core rev: 0f51c1260ac53aa4843e29b00cd600eb64074260) Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/libpcap')
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap.inc2
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch71
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb6
3 files changed, 77 insertions, 2 deletions
diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
index 979665c008..0c608b5967 100644
--- a/meta/recipes-connectivity/libpcap/libpcap.inc
+++ b/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
10 file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2" 10 file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2"
11DEPENDS = "flex-native bison-native" 11DEPENDS = "flex-native bison-native"
12 12
13inherit bluetooth 13inherit bluetooth pkgconfig
14 14
15PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}" 15PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
16PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4" 16PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
diff --git a/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch b/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch
new file mode 100644
index 0000000000..9cfb9df880
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch
@@ -0,0 +1,71 @@
1From 8887132e85892a72a84ca3878e60f254ad2ce939 Mon Sep 17 00:00:00 2001
2From: Joe MacDonald <joe_macdonald@mentor.com>
3Date: Tue, 24 Feb 2015 15:56:06 -0500
4Subject: [PATCH] libpcap: pkgconfig support
5
6Adding basic structure to support pkg-config.
7
8Upstream-status: Inappropriate [embedded specific]
9
10Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
11---
12 Makefile.in | 5 +++++
13 configure.in | 1 +
14 libpcap.pc.in | 10 ++++++++++
15 3 files changed, 16 insertions(+)
16 create mode 100644 libpcap.pc.in
17
18diff --git a/Makefile.in b/Makefile.in
19index 1c2d745..1f25faf 100644
20--- a/Makefile.in
21+++ b/Makefile.in
22@@ -60,6 +60,10 @@ V_RPATH_OPT = @V_RPATH_OPT@
23 DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
24 PROG=libpcap
25
26+# pkgconfig support
27+pkgconfigdir = $(libdir)/pkgconfig
28+pkgconfig_DATA = libpcap.pc
29+
30 # Standard CFLAGS
31 FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
32
33@@ -275,6 +279,7 @@ EXTRA_DIST = \
34 lbl/os-solaris2.h \
35 lbl/os-sunos4.h \
36 lbl/os-ultrix4.h \
37+ libpcap.pc \
38 missing/snprintf.c \
39 mkdep \
40 msdos/bin2c.c \
41diff --git a/configure.in b/configure.in
42index 8f5c86b..fb51b35 100644
43--- a/configure.in
44+++ b/configure.in
45@@ -1700,6 +1700,7 @@ esac
46 AC_PROG_INSTALL
47
48 AC_CONFIG_HEADER(config.h)
49+AC_CONFIG_FILES([libpcap.pc])
50
51 AC_OUTPUT_COMMANDS([if test -f .devel; then
52 echo timestamp > stamp-h
53diff --git a/libpcap.pc.in b/libpcap.pc.in
54new file mode 100644
55index 0000000..4f78ad8
56--- /dev/null
57+++ b/libpcap.pc.in
58@@ -0,0 +1,10 @@
59+prefix=@prefix@
60+exec_prefix=@exec_prefix@
61+libdir=@libdir@
62+includedir=@includedir@
63+
64+Name: libpcap
65+Description: System-independent interface for user-level packet capture.
66+Version: @VERSION@
67+Libs: -L${libdir} -lpcap
68+Cflags: -I${includedir}
69--
701.9.1
71
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb b/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
index a2d5ef46d7..611543e42c 100644
--- a/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
+++ b/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
@@ -1,6 +1,8 @@
1require libpcap.inc 1require libpcap.inc
2 2
3SRC_URI += "file://aclocal.patch" 3SRC_URI += "file://aclocal.patch \
4 file://libpcap-pkgconfig-support.patch \
5 "
4SRC_URI[md5sum] = "5f14191c1a684a75532c739c2c4059fa" 6SRC_URI[md5sum] = "5f14191c1a684a75532c739c2c4059fa"
5SRC_URI[sha256sum] = "5db3e2998f1eeba2c76da55da5d474248fe19c44f49e15cac8a796a2c7e19690" 7SRC_URI[sha256sum] = "5db3e2998f1eeba2c76da55da5d474248fe19c44f49e15cac8a796a2c7e19690"
6 8
@@ -19,4 +21,6 @@ do_install_prepend () {
19 install -d ${D}${bindir} 21 install -d ${D}${bindir}
20 oe_runmake install-shared DESTDIR=${D} 22 oe_runmake install-shared DESTDIR=${D}
21 oe_libinstall -a -so libpcap ${D}${libdir} 23 oe_libinstall -a -so libpcap ${D}${libdir}
24 sed "s|@VERSION@|${PV}|" -i ${B}/libpcap.pc
25 install -D -m 0644 libpcap.pc ${D}${libdir}/pkgconfig/libpcap.pc
22} 26}