summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/libpcap
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 18:09:11 (GMT)
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 18:09:57 (GMT)
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-connectivity/libpcap
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity/libpcap')
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch165
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch22
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap.inc24
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb17
4 files changed, 228 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch
new file mode 100644
index 0000000..71fd8b9
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch
@@ -0,0 +1,165 @@
1diff -ruN libpcap-1.1.1-orig/aclocal.m4 libpcap-1.1.1/aclocal.m4
2--- libpcap-1.1.1-orig/aclocal.m4 2010-06-29 10:46:32.815117569 +0800
3+++ libpcap-1.1.1/aclocal.m4 2010-06-29 10:49:17.150149949 +0800
4@@ -37,7 +37,7 @@
5 dnl AC_LBL_C_INIT. Now, we run AC_LBL_C_INIT_BEFORE_CC, AC_PROG_CC,
6 dnl and AC_LBL_C_INIT at the top level.
7 dnl
8-AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
9+AC_DEFUN([AC_LBL_C_INIT_BEFORE_CC],
10 [AC_PREREQ(2.50)
11 AC_BEFORE([$0], [AC_LBL_C_INIT])
12 AC_BEFORE([$0], [AC_PROG_CC])
13@@ -90,7 +90,7 @@
14 dnl ac_cv_lbl_gcc_vers
15 dnl LBL_CFLAGS
16 dnl
17-AC_DEFUN(AC_LBL_C_INIT,
18+AC_DEFUN([AC_LBL_C_INIT],
19 [AC_PREREQ(2.50)
20 AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
21 AC_BEFORE([$0], [AC_LBL_DEVEL])
22@@ -217,7 +217,7 @@
23 dnl V_SONAME_OPT
24 dnl V_RPATH_OPT
25 dnl
26-AC_DEFUN(AC_LBL_SHLIBS_INIT,
27+AC_DEFUN([AC_LBL_SHLIBS_INIT],
28 [AC_PREREQ(2.50)
29 if test "$GCC" = yes ; then
30 #
31@@ -361,7 +361,7 @@
32 # Make sure we use the V_CCOPT flags, because some of those might
33 # disable inlining.
34 #
35-AC_DEFUN(AC_LBL_C_INLINE,
36+AC_DEFUN([AC_LBL_C_INLINE],
37 [AC_MSG_CHECKING(for inline)
38 save_CFLAGS="$CFLAGS"
39 CFLAGS="$V_CCOPT"
40@@ -407,7 +407,7 @@
41 dnl
42 dnl AC_LBL_FIXINCLUDES
43 dnl
44-AC_DEFUN(AC_LBL_FIXINCLUDES,
45+AC_DEFUN([AC_LBL_FIXINCLUDES],
46 [if test "$GCC" = yes ; then
47 AC_MSG_CHECKING(for ANSI ioctl definitions)
48 AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes,
49@@ -453,7 +453,7 @@
50 dnl $2 (yacc appended)
51 dnl $3 (optional flex and bison -P prefix)
52 dnl
53-AC_DEFUN(AC_LBL_LEX_AND_YACC,
54+AC_DEFUN([AC_LBL_LEX_AND_YACC],
55 [AC_ARG_WITH(flex, [ --without-flex don't use flex])
56 AC_ARG_WITH(bison, [ --without-bison don't use bison])
57 if test "$with_flex" = no ; then
58@@ -506,7 +506,7 @@
59 dnl
60 dnl DECLWAITSTATUS (defined)
61 dnl
62-AC_DEFUN(AC_LBL_UNION_WAIT,
63+AC_DEFUN([AC_LBL_UNION_WAIT],
64 [AC_MSG_CHECKING(if union wait is used)
65 AC_CACHE_VAL(ac_cv_lbl_union_wait,
66 AC_TRY_COMPILE([
67@@ -535,7 +535,7 @@
68 dnl
69 dnl HAVE_SOCKADDR_SA_LEN (defined)
70 dnl
71-AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN,
72+AC_DEFUN([AC_LBL_SOCKADDR_SA_LEN],
73 [AC_MSG_CHECKING(if sockaddr struct has the sa_len member)
74 AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len,
75 AC_TRY_COMPILE([
76@@ -560,7 +560,7 @@
77 dnl
78 dnl HAVE_SOCKADDR_STORAGE (defined)
79 dnl
80-AC_DEFUN(AC_LBL_SOCKADDR_STORAGE,
81+AC_DEFUN([AC_LBL_SOCKADDR_STORAGE],
82 [AC_MSG_CHECKING(if sockaddr_storage struct exists)
83 AC_CACHE_VAL(ac_cv_lbl_has_sockaddr_storage,
84 AC_TRY_COMPILE([
85@@ -593,7 +593,7 @@
86 dnl won't be using code that would use that member, or we wouldn't
87 dnl compile in any case).
88 dnl
89-AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1,
90+AC_DEFUN([AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1],
91 [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member)
92 AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
93 AC_TRY_COMPILE([
94@@ -619,7 +619,7 @@
95 dnl
96 dnl ac_cv_lbl_have_run_path (yes or no)
97 dnl
98-AC_DEFUN(AC_LBL_HAVE_RUN_PATH,
99+AC_DEFUN([AC_LBL_HAVE_RUN_PATH],
100 [AC_MSG_CHECKING(for ${CC-cc} -R)
101 AC_CACHE_VAL(ac_cv_lbl_have_run_path,
102 [echo 'main(){}' > conftest.c
103@@ -644,7 +644,7 @@
104 dnl
105 dnl LBL_ALIGN (DEFINED)
106 dnl
107-AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
108+AC_DEFUN([AC_LBL_UNALIGNED_ACCESS],
109 [AC_MSG_CHECKING(if unaligned accesses fail)
110 AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
111 [case "$host_cpu" in
112@@ -749,7 +749,7 @@
113 dnl HAVE_OS_PROTO_H (defined)
114 dnl os-proto.h (symlinked)
115 dnl
116-AC_DEFUN(AC_LBL_DEVEL,
117+AC_DEFUN([AC_LBL_DEVEL],
118 [rm -f os-proto.h
119 if test "${LBL_CFLAGS+set}" = set; then
120 $1="$$1 ${LBL_CFLAGS}"
121@@ -886,7 +886,7 @@
122 dnl statically and happen to have a libresolv.a lying around (and no
123 dnl libnsl.a).
124 dnl
125-AC_DEFUN(AC_LBL_LIBRARY_NET, [
126+AC_DEFUN([AC_LBL_LIBRARY_NET], [
127 # Most operating systems have gethostbyname() in the default searched
128 # libraries (i.e. libc):
129 # Some OSes (eg. Solaris) place it in libnsl
130@@ -909,7 +909,7 @@
131 dnl Test for __attribute__
132 dnl
133
134-AC_DEFUN(AC_C___ATTRIBUTE__, [
135+AC_DEFUN([AC_C___ATTRIBUTE__], [
136 AC_MSG_CHECKING(for __attribute__)
137 AC_CACHE_VAL(ac_cv___attribute__, [
138 AC_COMPILE_IFELSE(
139@@ -947,7 +947,7 @@
140 dnl
141 dnl -Scott Barron
142 dnl
143-AC_DEFUN(AC_LBL_TPACKET_STATS,
144+AC_DEFUN([AC_LBL_TPACKET_STATS],
145 [AC_MSG_CHECKING(if if_packet.h has tpacket_stats defined)
146 AC_CACHE_VAL(ac_cv_lbl_tpacket_stats,
147 AC_TRY_COMPILE([
148@@ -976,7 +976,7 @@
149 dnl doesn't have that member (which is OK, as either we won't be using
150 dnl code that would use that member, or we wouldn't compile in any case).
151 dnl
152-AC_DEFUN(AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI,
153+AC_DEFUN([AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI],
154 [AC_MSG_CHECKING(if tpacket_auxdata struct has tp_vlan_tci member)
155 AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
156 AC_TRY_COMPILE([
157@@ -1003,7 +1003,7 @@
158 dnl
159 dnl HAVE_DLPI_PASSIVE (defined)
160 dnl
161-AC_DEFUN(AC_LBL_DL_PASSIVE_REQ_T,
162+AC_DEFUN([AC_LBL_DL_PASSIVE_REQ_T],
163 [AC_MSG_CHECKING(if dl_passive_req_t struct exists)
164 AC_CACHE_VAL(ac_cv_lbl_has_dl_passive_req_t,
165 AC_TRY_COMPILE([
diff --git a/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
new file mode 100644
index 0000000..f29c7cb
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
@@ -0,0 +1,22 @@
1Index: libpcap-1.0.0/pcap-linux.c
2===================================================================
3--- libpcap-1.0.0.orig/pcap-linux.c 2009-01-28 11:58:54.000000000 +0300
4+++ libpcap-1.0.0/pcap-linux.c 2009-01-28 11:59:04.000000000 +0300
5@@ -1616,6 +1616,17 @@
6 * so let's use "Linux-cooked" mode. Jean II */
7 //handle->md.cooked = 1;
8 break;
9+#ifndef ARPHRD_IEEE80215
10+#define ARPHRD_IEEE80215 804
11+#endif
12+#ifndef ARPHRD_IEEE80215_PHY
13+#define ARPHRD_IEEE80215_PHY 805
14+#endif
15+
16+ case ARPHRD_IEEE80215:
17+ case ARPHRD_IEEE80215_PHY:
18+ handle->linktype = DLT_IEEE802_15_4;
19+ break;
20
21 /* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
22 * is needed, please report it to <daniele@orlandi.com> */
diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
new file mode 100644
index 0000000..2025d84
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -0,0 +1,24 @@
1DESCRIPTION = "Libpcap is a tool to capture network packages on Unix/Linux platform"
2HOMEPAGE = "http://www.tcpdump.org/"
3BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
4SECTION = "libs/network"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
7 file://pcap.h;beginline=1;endline=34;md5=8d6cf7e17d5745010d633e30bc529ea9"
8DEPENDS = "flex-native bison-native"
9
10SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz"
11
12inherit autotools
13
14EXTRA_OECONF = "--with-pcap=linux"
15
16CPPFLAGS_prepend = "-I${S} "
17CFLAGS_prepend = "-I${S} "
18CXXFLAGS_prepend = "-I${S} "
19
20do_configure_prepend () {
21 if [ ! -e acinclude.m4 ]; then
22 cat aclocal.m4 > acinclude.m4
23 fi
24}
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb b/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb
new file mode 100644
index 0000000..58ab5e6
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb
@@ -0,0 +1,17 @@
1require libpcap.inc
2
3PR = "r0"
4
5SRC_URI += "file://aclocal.patch \
6 file://ieee80215-arphrd.patch"
7
8#
9# make install doesn't cover the shared lib
10# make install-shared is just broken (no symlinks)
11#
12do_install_prepend () {
13 install -d ${D}${libdir}
14 install -d ${D}${bindir}
15 oe_runmake install-shared DESTDIR=${D}
16 oe_libinstall -a -so libpcap ${D}${libdir}
17}