[oe-commits] Nicolas Boichat : libpcap 1.1.1 recipe.
git version control
git at git.openembedded.org
Fri Jul 23 21:33:02 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 7b9e14891f7d69b5376041fc15df3d5f13f41855
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=7b9e14891f7d69b5376041fc15df3d5f13f41855
Author: Nicolas Boichat <nicolas at boichat.ch>
Date: Fri Jul 23 11:27:05 2010 +0200
libpcap 1.1.1 recipe.
Notes about patches from 1.0.0:
- ieee80215-arphrd.patch: ported to 1.1.1
- aclocal.patch: does not seem to be needed (unsure)
- 0001-Fix-some-problems-that-show-up-in-autoconf-2.64-and-.patch: same
- ldflags.patch: fixed upstream
Other main difference:
- pcap-config is installed in the dev package, as well as in the staging
directory.
Signed-off-by: Koen Kooi <koen at openembedded.org>
---
.../libpcap/libpcap-1.1.1/ieee80215-arphrd.patch | 22 +++++++++++
recipes/libpcap/libpcap_1.1.1.bb | 40 ++++++++++++++++++++
2 files changed, 62 insertions(+), 0 deletions(-)
diff --git a/recipes/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch b/recipes/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
new file mode 100644
index 0000000..f29c7cb
--- /dev/null
+++ b/recipes/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
@@ -0,0 +1,22 @@
+Index: libpcap-1.0.0/pcap-linux.c
+===================================================================
+--- libpcap-1.0.0.orig/pcap-linux.c 2009-01-28 11:58:54.000000000 +0300
++++ libpcap-1.0.0/pcap-linux.c 2009-01-28 11:59:04.000000000 +0300
+@@ -1616,6 +1616,17 @@
+ * so let's use "Linux-cooked" mode. Jean II */
+ //handle->md.cooked = 1;
+ break;
++#ifndef ARPHRD_IEEE80215
++#define ARPHRD_IEEE80215 804
++#endif
++#ifndef ARPHRD_IEEE80215_PHY
++#define ARPHRD_IEEE80215_PHY 805
++#endif
++
++ case ARPHRD_IEEE80215:
++ case ARPHRD_IEEE80215_PHY:
++ handle->linktype = DLT_IEEE802_15_4;
++ break;
+
+ /* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
+ * is needed, please report it to <daniele at orlandi.com> */
diff --git a/recipes/libpcap/libpcap_1.1.1.bb b/recipes/libpcap/libpcap_1.1.1.bb
new file mode 100644
index 0000000..a1a244c
--- /dev/null
+++ b/recipes/libpcap/libpcap_1.1.1.bb
@@ -0,0 +1,40 @@
+require libpcap.inc
+
+PR = "r1"
+SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz"
+SRC_URI += "file://ieee80215-arphrd.patch;patch=1"
+
+BINCONFIG_GLOB = "pcap-config"
+
+inherit binconfig
+
+do_configure_prepend() {
+ cat ${S}/aclocal.m4 >>${S}/acinclude.m4
+}
+
+do_compile () {
+ oe_runmake
+ rm -f *.o
+ oe_runmake shared
+}
+
+do_install () {
+ install -d ${D}${libdir}
+ install -d ${D}${bindir}
+ oe_runmake install DESTDIR=${D}
+ oe_runmake install-shared DESTDIR=${D}
+ oe_libinstall -a -so libpcap ${D}${libdir}
+
+ install -d ${D}${includedir}/pcap
+ install -m 0644 pcap/pcap.h ${D}${includedir}/pcap/pcap.h
+ install -m 0644 pcap/namedb.h ${D}${includedir}/pcap/namedb.h
+ install -m 0644 pcap/bpf.h ${D}${includedir}/pcap/bpf.h
+
+ install -m 0755 ${S}/pcap-config ${D}${bindir}
+}
+
+FILES_${PN}-dev += "${bindir}/pcap-config"
+
+SRC_URI[md5sum] = "1bca27d206970badae248cfa471bbb47"
+SRC_URI[sha256sum] = "508cca15547e55d1318498b838456a21770c450beb2dc7d7d4a96d90816e5a85"
+
More information about the Openembedded-commits
mailing list