diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/libpcap | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/libpcap')
-rw-r--r-- | recipes/libpcap/libpcap-0.9.3/shared.patch | 119 | ||||
-rw-r--r-- | recipes/libpcap/libpcap-0.9.5/shared.patch | 119 | ||||
-rw-r--r-- | recipes/libpcap/libpcap-0.9.8/aclocal.patch | 156 | ||||
-rw-r--r-- | recipes/libpcap/libpcap-0.9.8/shared.patch | 119 | ||||
-rw-r--r-- | recipes/libpcap/libpcap-1.0.0/aclocal.patch | 156 | ||||
-rw-r--r-- | recipes/libpcap/libpcap-1.0.0/ieee80215-arphrd.patch | 22 | ||||
-rw-r--r-- | recipes/libpcap/libpcap-1.0.0/shared.patch | 0 | ||||
-rw-r--r-- | recipes/libpcap/libpcap.inc | 35 | ||||
-rw-r--r-- | recipes/libpcap/libpcap_0.9.3.bb | 3 | ||||
-rw-r--r-- | recipes/libpcap/libpcap_0.9.5.bb | 3 | ||||
-rw-r--r-- | recipes/libpcap/libpcap_0.9.8.bb | 5 | ||||
-rw-r--r-- | recipes/libpcap/libpcap_1.0.0.bb | 29 |
12 files changed, 766 insertions, 0 deletions
diff --git a/recipes/libpcap/libpcap-0.9.3/shared.patch b/recipes/libpcap/libpcap-0.9.3/shared.patch new file mode 100644 index 0000000000..cc66a5e5ef --- /dev/null +++ b/recipes/libpcap/libpcap-0.9.3/shared.patch @@ -0,0 +1,119 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- libpcap-0.9.3/Makefile.in~shared ++++ libpcap-0.9.3/Makefile.in +@@ -37,6 +37,15 @@ + srcdir = @srcdir@ + VPATH = @srcdir@ + ++# some defines for shared library compilation - FIXME, if not matching ++MAJ=0.9 ++MIN=3 ++VERSION=$(MAJ).$(MIN) ++LIBNAME=pcap ++LIBRARY=lib$(LIBNAME).a ++SOLIBRARY=lib$(LIBNAME).so ++SHAREDLIB=$(SOLIBRARY).$(VERSION) ++ + # + # You shouldn't need to edit anything below. + # +@@ -50,6 +59,7 @@ + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(INCLS) $(DEFS) ++CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ) + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -70,6 +80,9 @@ + .c.o: + @rm -f $@ + $(CC) $(CFLAGS) -c $(srcdir)/$*.c ++%_pic.o: %.c ++ @rm -f $@ ++ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c + + PSRC = pcap-@V_PCAP@.c + FSRC = fad-@V_FINDALLDEVS@.c +@@ -84,6 +97,7 @@ + # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot + # hack the extra indirection + OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) ++OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=.o) $(CSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) + HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ + ethertype.h gencode.h gnuc.h + GENHDR = \ +@@ -95,15 +109,22 @@ + TAGFILES = \ + $(SRC) $(HDR) $(TAGHDR) + +-CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c ++CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* + +-all: libpcap.a ++all: libpcap.a $(SHAREDLIB) + + libpcap.a: $(OBJ) + @rm -f $@ + ar rc $@ $(OBJ) $(LIBS) + $(RANLIB) $@ + ++$(SHAREDLIB): $(OBJ_PIC) ++ -@rm -f $@ ++ -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) ++ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc ++ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) ++ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) ++ + shared: libpcap.$(DYEXT) + + # +@@ -129,6 +150,9 @@ + scanner.o: scanner.c tokdefs.h + $(CC) $(CFLAGS) -c scanner.c + ++scanner_pic.o: scanner.c tokdefs.h ++ $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c ++ + pcap.o: version.h + + tokdefs.h: grammar.c +@@ -142,9 +166,16 @@ + @rm -f $@ + $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c + ++grammer_pic.o: grammar.c ++ @rm -f $@ ++ $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c ++ + version.o: version.c + $(CC) $(CFLAGS) -c version.c + ++version_pic.o: version.c ++ $(CC) -fPIC $(CFLAGS) -c version.c -o $@ ++ + snprintf.o: $(srcdir)/missing/snprintf.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + +@@ -170,11 +201,17 @@ + bpf_filter.o: bpf_filter.c + $(CC) $(CFLAGS) -c bpf_filter.c + ++bpf_filter_pic.o: bpf_filter.c ++ $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@ ++ + install: libpcap.a + [ -d $(DESTDIR)$(libdir) ] || \ + (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) + $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a + $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a ++ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ ++ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) ++ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) + [ -d $(DESTDIR)$(includedir) ] || \ + (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) + $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h diff --git a/recipes/libpcap/libpcap-0.9.5/shared.patch b/recipes/libpcap/libpcap-0.9.5/shared.patch new file mode 100644 index 0000000000..d8118cf142 --- /dev/null +++ b/recipes/libpcap/libpcap-0.9.5/shared.patch @@ -0,0 +1,119 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- libpcap-0.9.3/Makefile.in~shared ++++ libpcap-0.9.3/Makefile.in +@@ -37,6 +37,15 @@ + srcdir = @srcdir@ + VPATH = @srcdir@ + ++# some defines for shared library compilation - FIXME, if not matching ++MAJ=0.9 ++MIN=5 ++VERSION=$(MAJ).$(MIN) ++LIBNAME=pcap ++LIBRARY=lib$(LIBNAME).a ++SOLIBRARY=lib$(LIBNAME).so ++SHAREDLIB=$(SOLIBRARY).$(VERSION) ++ + # + # You shouldn't need to edit anything below. + # +@@ -50,6 +59,7 @@ + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(INCLS) $(DEFS) ++CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ) + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -70,6 +80,9 @@ + .c.o: + @rm -f $@ + $(CC) $(CFLAGS) -c $(srcdir)/$*.c ++%_pic.o: %.c ++ @rm -f $@ ++ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c + + PSRC = pcap-@V_PCAP@.c + FSRC = fad-@V_FINDALLDEVS@.c +@@ -84,6 +97,7 @@ + # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot + # hack the extra indirection + OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) ++OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=.o) $(CSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) + HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ + ethertype.h gencode.h gnuc.h + GENHDR = \ +@@ -95,15 +109,22 @@ + TAGFILES = \ + $(SRC) $(HDR) $(TAGHDR) + +-CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c ++CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* + +-all: libpcap.a ++all: libpcap.a $(SHAREDLIB) + + libpcap.a: $(OBJ) + @rm -f $@ + ar rc $@ $(OBJ) $(LIBS) + $(RANLIB) $@ + ++$(SHAREDLIB): $(OBJ_PIC) ++ -@rm -f $@ ++ -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) ++ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc ++ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) ++ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) ++ + shared: libpcap.$(DYEXT) + + # +@@ -129,6 +150,9 @@ + scanner.o: scanner.c tokdefs.h + $(CC) $(CFLAGS) -c scanner.c + ++scanner_pic.o: scanner.c tokdefs.h ++ $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c ++ + pcap.o: version.h + + tokdefs.h: grammar.c +@@ -142,9 +166,16 @@ + @rm -f $@ + $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c + ++grammer_pic.o: grammar.c ++ @rm -f $@ ++ $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c ++ + version.o: version.c + $(CC) $(CFLAGS) -c version.c + ++version_pic.o: version.c ++ $(CC) -fPIC $(CFLAGS) -c version.c -o $@ ++ + snprintf.o: $(srcdir)/missing/snprintf.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + +@@ -170,11 +201,17 @@ + bpf_filter.o: bpf_filter.c + $(CC) $(CFLAGS) -c bpf_filter.c + ++bpf_filter_pic.o: bpf_filter.c ++ $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@ ++ + install: libpcap.a + [ -d $(DESTDIR)$(libdir) ] || \ + (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) + $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a + $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a ++ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ ++ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) ++ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) + [ -d $(DESTDIR)$(includedir) ] || \ + (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) + $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h diff --git a/recipes/libpcap/libpcap-0.9.8/aclocal.patch b/recipes/libpcap/libpcap-0.9.8/aclocal.patch new file mode 100644 index 0000000000..29cd275d58 --- /dev/null +++ b/recipes/libpcap/libpcap-0.9.8/aclocal.patch @@ -0,0 +1,156 @@ +diff -Naru libpcap-0.9.7.orig/aclocal.m4 libpcap-0.9.7/acinclude.m4 +--- libpcap-0.9.7.orig/aclocal.m4 2007-09-16 01:19:51.000000000 +0200 ++++ libpcap-0.9.7/aclocal.m4 2007-09-16 02:45:52.000000000 +0200 +@@ -42,7 +42,7 @@ + dnl ac_cv_lbl_gcc_vers + dnl LBL_CFLAGS + dnl +-AC_DEFUN(AC_LBL_C_INIT, ++AC_DEFUN([AC_LBL_C_INIT], + [AC_PREREQ(2.12) + AC_BEFORE([$0], [AC_PROG_CC]) + AC_BEFORE([$0], [AC_LBL_FIXINCLUDES]) +@@ -169,7 +169,7 @@ + # Make sure we use the V_CCOPT flags, because some of those might + # disable inlining. + # +-AC_DEFUN(AC_LBL_C_INLINE, ++AC_DEFUN([AC_LBL_C_INLINE], + [AC_MSG_CHECKING(for inline) + save_CFLAGS="$CFLAGS" + CFLAGS="$V_CCOPT" +@@ -225,7 +225,7 @@ + dnl LIBS + dnl LBL_LIBS + dnl +-AC_DEFUN(AC_LBL_LIBPCAP, ++AC_DEFUN([AC_LBL_LIBPCAP], + [AC_REQUIRE([AC_LBL_LIBRARY_NET]) + dnl + dnl save a copy before locating libpcap.a +@@ -293,7 +293,7 @@ + dnl RETSIGTYPE (defined) + dnl RETSIGVAL (defined) + dnl +-AC_DEFUN(AC_LBL_TYPE_SIGNAL, ++AC_DEFUN([AC_LBL_TYPE_SIGNAL], + [AC_BEFORE([$0], [AC_LBL_LIBPCAP]) + AC_TYPE_SIGNAL + if test "$ac_cv_type_signal" = void ; then +@@ -323,7 +323,7 @@ + dnl + dnl AC_LBL_FIXINCLUDES + dnl +-AC_DEFUN(AC_LBL_FIXINCLUDES, ++AC_DEFUN([AC_LBL_FIXINCLUDES], + [if test "$GCC" = yes ; then + AC_MSG_CHECKING(for ANSI ioctl definitions) + AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes, +@@ -369,7 +369,7 @@ + dnl $2 (yacc appended) + dnl $3 (optional flex and bison -P prefix) + dnl +-AC_DEFUN(AC_LBL_LEX_AND_YACC, ++AC_DEFUN([AC_LBL_LEX_AND_YACC], + [AC_ARG_WITH(flex, [ --without-flex don't use flex]) + AC_ARG_WITH(bison, [ --without-bison don't use bison]) + if test "$with_flex" = no ; then +@@ -422,7 +422,7 @@ + dnl + dnl DECLWAITSTATUS (defined) + dnl +-AC_DEFUN(AC_LBL_UNION_WAIT, ++AC_DEFUN([AC_LBL_UNION_WAIT], + [AC_MSG_CHECKING(if union wait is used) + AC_CACHE_VAL(ac_cv_lbl_union_wait, + AC_TRY_COMPILE([ +@@ -451,7 +451,7 @@ + dnl + dnl HAVE_SOCKADDR_SA_LEN (defined) + dnl +-AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN, ++AC_DEFUN([AC_LBL_SOCKADDR_SA_LEN], + [AC_MSG_CHECKING(if sockaddr struct has sa_len member) + AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len, + AC_TRY_COMPILE([ +@@ -476,7 +476,7 @@ + dnl + dnl HAVE_SOCKADDR_STORAGE (defined) + dnl +-AC_DEFUN(AC_LBL_SOCKADDR_STORAGE, ++AC_DEFUN([AC_LBL_SOCKADDR_STORAGE], + [AC_MSG_CHECKING(if sockaddr_storage struct exists) + AC_CACHE_VAL(ac_cv_lbl_has_sockaddr_storage, + AC_TRY_COMPILE([ +@@ -509,7 +509,7 @@ + dnl won't be using code that would use that member, or we wouldn't + dnl compile in any case). + dnl +-AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1, ++AC_DEFUN([AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1], + [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member) + AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1, + AC_TRY_COMPILE([ +@@ -535,7 +535,7 @@ + dnl + dnl ac_cv_lbl_have_run_path (yes or no) + dnl +-AC_DEFUN(AC_LBL_HAVE_RUN_PATH, ++AC_DEFUN([AC_LBL_HAVE_RUN_PATH], + [AC_MSG_CHECKING(for ${CC-cc} -R) + AC_CACHE_VAL(ac_cv_lbl_have_run_path, + [echo 'main(){}' > conftest.c +@@ -561,7 +561,7 @@ + dnl int32_t (defined) + dnl u_int32_t (defined) + dnl +-AC_DEFUN(AC_LBL_CHECK_TYPE, ++AC_DEFUN([AC_LBL_CHECK_TYPE], + [AC_MSG_CHECKING(for $1 using $CC) + AC_CACHE_VAL(ac_cv_lbl_have_$1, + AC_TRY_COMPILE([ +@@ -590,7 +590,7 @@ + dnl + dnl LBL_ALIGN (DEFINED) + dnl +-AC_DEFUN(AC_LBL_UNALIGNED_ACCESS, ++AC_DEFUN([AC_LBL_UNALIGNED_ACCESS], + [AC_MSG_CHECKING(if unaligned accesses fail) + AC_CACHE_VAL(ac_cv_lbl_unaligned_fail, + [case "$host_cpu" in +@@ -695,7 +695,7 @@ + dnl HAVE_OS_PROTO_H (defined) + dnl os-proto.h (symlinked) + dnl +-AC_DEFUN(AC_LBL_DEVEL, ++AC_DEFUN([AC_LBL_DEVEL], + [rm -f os-proto.h + if test "${LBL_CFLAGS+set}" = set; then + $1="$$1 ${LBL_CFLAGS}" +@@ -825,7 +825,7 @@ + dnl statically and happen to have a libresolv.a lying around (and no + dnl libnsl.a). + dnl +-AC_DEFUN(AC_LBL_LIBRARY_NET, [ ++AC_DEFUN([AC_LBL_LIBRARY_NET], [ + # Most operating systems have gethostbyname() in the default searched + # libraries (i.e. libc): + # Some OSes (eg. Solaris) place it in libnsl +@@ -848,7 +848,7 @@ + dnl Test for __attribute__ + dnl + +-AC_DEFUN(AC_C___ATTRIBUTE__, [ ++AC_DEFUN([AC_C___ATTRIBUTE__], [ + AC_MSG_CHECKING(for __attribute__) + AC_CACHE_VAL(ac_cv___attribute__, [ + AC_COMPILE_IFELSE( +@@ -886,7 +886,7 @@ + dnl + dnl -Scott Barron + dnl +-AC_DEFUN(AC_LBL_TPACKET_STATS, ++AC_DEFUN([AC_LBL_TPACKET_STATS], + [AC_MSG_CHECKING(if if_packet.h has tpacket_stats defined) + AC_CACHE_VAL(ac_cv_lbl_tpacket_stats, + AC_TRY_COMPILE([ diff --git a/recipes/libpcap/libpcap-0.9.8/shared.patch b/recipes/libpcap/libpcap-0.9.8/shared.patch new file mode 100644 index 0000000000..159389bb87 --- /dev/null +++ b/recipes/libpcap/libpcap-0.9.8/shared.patch @@ -0,0 +1,119 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- libpcap-0.9.3/Makefile.in~shared ++++ libpcap-0.9.3/Makefile.in +@@ -37,6 +37,15 @@ + srcdir = @srcdir@ + VPATH = @srcdir@ + ++# some defines for shared library compilation - FIXME, if not matching ++MAJ=0.9 ++MIN=6 ++VERSION=$(MAJ).$(MIN) ++LIBNAME=pcap ++LIBRARY=lib$(LIBNAME).a ++SOLIBRARY=lib$(LIBNAME).so ++SHAREDLIB=$(SOLIBRARY).$(VERSION) ++ + # + # You shouldn't need to edit anything below. + # +@@ -50,6 +59,7 @@ + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(INCLS) $(DEFS) ++CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ) + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -70,6 +80,9 @@ + .c.o: + @rm -f $@ + $(CC) $(CFLAGS) -c $(srcdir)/$*.c ++%_pic.o: %.c ++ @rm -f $@ ++ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c + + PSRC = pcap-@V_PCAP@.c + FSRC = fad-@V_FINDALLDEVS@.c +@@ -84,6 +97,7 @@ + # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot + # hack the extra indirection + OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) ++OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=.o) $(CSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) + HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ + ethertype.h gencode.h gnuc.h + GENHDR = \ +@@ -95,15 +109,22 @@ + TAGFILES = \ + $(SRC) $(HDR) $(TAGHDR) + +-CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c ++CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* + +-all: libpcap.a ++all: libpcap.a $(SHAREDLIB) + + libpcap.a: $(OBJ) + @rm -f $@ + ar rc $@ $(OBJ) $(LIBS) + $(RANLIB) $@ + ++$(SHAREDLIB): $(OBJ_PIC) ++ -@rm -f $@ ++ -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) ++ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc ++ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) ++ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) ++ + shared: libpcap.$(DYEXT) + + # +@@ -129,6 +150,9 @@ + scanner.o: scanner.c tokdefs.h + $(CC) $(CFLAGS) -c scanner.c + ++scanner_pic.o: scanner.c tokdefs.h ++ $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c ++ + pcap.o: version.h + + tokdefs.h: grammar.c +@@ -142,9 +166,16 @@ + @rm -f $@ + $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c + ++grammer_pic.o: grammar.c ++ @rm -f $@ ++ $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c ++ + version.o: version.c + $(CC) $(CFLAGS) -c version.c + ++version_pic.o: version.c ++ $(CC) -fPIC $(CFLAGS) -c version.c -o $@ ++ + snprintf.o: $(srcdir)/missing/snprintf.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + +@@ -170,11 +201,17 @@ + bpf_filter.o: bpf_filter.c + $(CC) $(CFLAGS) -c bpf_filter.c + ++bpf_filter_pic.o: bpf_filter.c ++ $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@ ++ + install: libpcap.a + [ -d $(DESTDIR)$(libdir) ] || \ + (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) + $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a + $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a ++ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ ++ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) ++ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) + [ -d $(DESTDIR)$(includedir) ] || \ + (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) + $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h diff --git a/recipes/libpcap/libpcap-1.0.0/aclocal.patch b/recipes/libpcap/libpcap-1.0.0/aclocal.patch new file mode 100644 index 0000000000..29cd275d58 --- /dev/null +++ b/recipes/libpcap/libpcap-1.0.0/aclocal.patch @@ -0,0 +1,156 @@ +diff -Naru libpcap-0.9.7.orig/aclocal.m4 libpcap-0.9.7/acinclude.m4 +--- libpcap-0.9.7.orig/aclocal.m4 2007-09-16 01:19:51.000000000 +0200 ++++ libpcap-0.9.7/aclocal.m4 2007-09-16 02:45:52.000000000 +0200 +@@ -42,7 +42,7 @@ + dnl ac_cv_lbl_gcc_vers + dnl LBL_CFLAGS + dnl +-AC_DEFUN(AC_LBL_C_INIT, ++AC_DEFUN([AC_LBL_C_INIT], + [AC_PREREQ(2.12) + AC_BEFORE([$0], [AC_PROG_CC]) + AC_BEFORE([$0], [AC_LBL_FIXINCLUDES]) +@@ -169,7 +169,7 @@ + # Make sure we use the V_CCOPT flags, because some of those might + # disable inlining. + # +-AC_DEFUN(AC_LBL_C_INLINE, ++AC_DEFUN([AC_LBL_C_INLINE], + [AC_MSG_CHECKING(for inline) + save_CFLAGS="$CFLAGS" + CFLAGS="$V_CCOPT" +@@ -225,7 +225,7 @@ + dnl LIBS + dnl LBL_LIBS + dnl +-AC_DEFUN(AC_LBL_LIBPCAP, ++AC_DEFUN([AC_LBL_LIBPCAP], + [AC_REQUIRE([AC_LBL_LIBRARY_NET]) + dnl + dnl save a copy before locating libpcap.a +@@ -293,7 +293,7 @@ + dnl RETSIGTYPE (defined) + dnl RETSIGVAL (defined) + dnl +-AC_DEFUN(AC_LBL_TYPE_SIGNAL, ++AC_DEFUN([AC_LBL_TYPE_SIGNAL], + [AC_BEFORE([$0], [AC_LBL_LIBPCAP]) + AC_TYPE_SIGNAL + if test "$ac_cv_type_signal" = void ; then +@@ -323,7 +323,7 @@ + dnl + dnl AC_LBL_FIXINCLUDES + dnl +-AC_DEFUN(AC_LBL_FIXINCLUDES, ++AC_DEFUN([AC_LBL_FIXINCLUDES], + [if test "$GCC" = yes ; then + AC_MSG_CHECKING(for ANSI ioctl definitions) + AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes, +@@ -369,7 +369,7 @@ + dnl $2 (yacc appended) + dnl $3 (optional flex and bison -P prefix) + dnl +-AC_DEFUN(AC_LBL_LEX_AND_YACC, ++AC_DEFUN([AC_LBL_LEX_AND_YACC], + [AC_ARG_WITH(flex, [ --without-flex don't use flex]) + AC_ARG_WITH(bison, [ --without-bison don't use bison]) + if test "$with_flex" = no ; then +@@ -422,7 +422,7 @@ + dnl + dnl DECLWAITSTATUS (defined) + dnl +-AC_DEFUN(AC_LBL_UNION_WAIT, ++AC_DEFUN([AC_LBL_UNION_WAIT], + [AC_MSG_CHECKING(if union wait is used) + AC_CACHE_VAL(ac_cv_lbl_union_wait, + AC_TRY_COMPILE([ +@@ -451,7 +451,7 @@ + dnl + dnl HAVE_SOCKADDR_SA_LEN (defined) + dnl +-AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN, ++AC_DEFUN([AC_LBL_SOCKADDR_SA_LEN], + [AC_MSG_CHECKING(if sockaddr struct has sa_len member) + AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len, + AC_TRY_COMPILE([ +@@ -476,7 +476,7 @@ + dnl + dnl HAVE_SOCKADDR_STORAGE (defined) + dnl +-AC_DEFUN(AC_LBL_SOCKADDR_STORAGE, ++AC_DEFUN([AC_LBL_SOCKADDR_STORAGE], + [AC_MSG_CHECKING(if sockaddr_storage struct exists) + AC_CACHE_VAL(ac_cv_lbl_has_sockaddr_storage, + AC_TRY_COMPILE([ +@@ -509,7 +509,7 @@ + dnl won't be using code that would use that member, or we wouldn't + dnl compile in any case). + dnl +-AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1, ++AC_DEFUN([AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1], + [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member) + AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1, + AC_TRY_COMPILE([ +@@ -535,7 +535,7 @@ + dnl + dnl ac_cv_lbl_have_run_path (yes or no) + dnl +-AC_DEFUN(AC_LBL_HAVE_RUN_PATH, ++AC_DEFUN([AC_LBL_HAVE_RUN_PATH], + [AC_MSG_CHECKING(for ${CC-cc} -R) + AC_CACHE_VAL(ac_cv_lbl_have_run_path, + [echo 'main(){}' > conftest.c +@@ -561,7 +561,7 @@ + dnl int32_t (defined) + dnl u_int32_t (defined) + dnl +-AC_DEFUN(AC_LBL_CHECK_TYPE, ++AC_DEFUN([AC_LBL_CHECK_TYPE], + [AC_MSG_CHECKING(for $1 using $CC) + AC_CACHE_VAL(ac_cv_lbl_have_$1, + AC_TRY_COMPILE([ +@@ -590,7 +590,7 @@ + dnl + dnl LBL_ALIGN (DEFINED) + dnl +-AC_DEFUN(AC_LBL_UNALIGNED_ACCESS, ++AC_DEFUN([AC_LBL_UNALIGNED_ACCESS], + [AC_MSG_CHECKING(if unaligned accesses fail) + AC_CACHE_VAL(ac_cv_lbl_unaligned_fail, + [case "$host_cpu" in +@@ -695,7 +695,7 @@ + dnl HAVE_OS_PROTO_H (defined) + dnl os-proto.h (symlinked) + dnl +-AC_DEFUN(AC_LBL_DEVEL, ++AC_DEFUN([AC_LBL_DEVEL], + [rm -f os-proto.h + if test "${LBL_CFLAGS+set}" = set; then + $1="$$1 ${LBL_CFLAGS}" +@@ -825,7 +825,7 @@ + dnl statically and happen to have a libresolv.a lying around (and no + dnl libnsl.a). + dnl +-AC_DEFUN(AC_LBL_LIBRARY_NET, [ ++AC_DEFUN([AC_LBL_LIBRARY_NET], [ + # Most operating systems have gethostbyname() in the default searched + # libraries (i.e. libc): + # Some OSes (eg. Solaris) place it in libnsl +@@ -848,7 +848,7 @@ + dnl Test for __attribute__ + dnl + +-AC_DEFUN(AC_C___ATTRIBUTE__, [ ++AC_DEFUN([AC_C___ATTRIBUTE__], [ + AC_MSG_CHECKING(for __attribute__) + AC_CACHE_VAL(ac_cv___attribute__, [ + AC_COMPILE_IFELSE( +@@ -886,7 +886,7 @@ + dnl + dnl -Scott Barron + dnl +-AC_DEFUN(AC_LBL_TPACKET_STATS, ++AC_DEFUN([AC_LBL_TPACKET_STATS], + [AC_MSG_CHECKING(if if_packet.h has tpacket_stats defined) + AC_CACHE_VAL(ac_cv_lbl_tpacket_stats, + AC_TRY_COMPILE([ diff --git a/recipes/libpcap/libpcap-1.0.0/ieee80215-arphrd.patch b/recipes/libpcap/libpcap-1.0.0/ieee80215-arphrd.patch new file mode 100644 index 0000000000..f29c7cb54c --- /dev/null +++ b/recipes/libpcap/libpcap-1.0.0/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@orlandi.com> */ diff --git a/recipes/libpcap/libpcap-1.0.0/shared.patch b/recipes/libpcap/libpcap-1.0.0/shared.patch new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/recipes/libpcap/libpcap-1.0.0/shared.patch diff --git a/recipes/libpcap/libpcap.inc b/recipes/libpcap/libpcap.inc new file mode 100644 index 0000000000..4468a4b89e --- /dev/null +++ b/recipes/libpcap/libpcap.inc @@ -0,0 +1,35 @@ +DESCRIPTION = "Network Packet Capture Library" +HOMEPAGE = "http://www.tcpdump.org/" +SECTION = "libs/network" +LICENSE = "BSD" +DEPENDS = "bluez-libs flex-native bison-native" + +PR = "r1" + +# Don't forget to edit shared.patch to have the correct version number inside +SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz \ + file://shared.patch;patch=1" + +inherit autotools + +EXTRA_OECONF = "--with-pcap=linux" + +CPPFLAGS_prepend = "-I${S} " +CFLAGS_prepend = "-I${S} " +CXXFLAGS_prepend = "-I${S} " + +do_configure_prepend () { + if [ ! -e acinclude.m4 ]; then + cat aclocal.m4 > acinclude.m4 + fi +} + +do_stage () { + install -m 0644 pcap.h ${STAGING_INCDIR}/pcap.h + install -m 0644 pcap-namedb.h ${STAGING_INCDIR}/pcap-namedb.h + install -m 0644 pcap-bpf.h ${STAGING_INCDIR}/pcap-bpf.h + oe_libinstall -a -so libpcap ${STAGING_LIBDIR} + install -d ${STAGING_INCDIR}/net + ln -sf ${STAGING_INCDIR}/pcap-bpf.h ${STAGING_INCDIR}/net/bpf.h + install -m 0644 acinclude.m4 ${STAGING_DATADIR}/aclocal/libpcap.m4 +} diff --git a/recipes/libpcap/libpcap_0.9.3.bb b/recipes/libpcap/libpcap_0.9.3.bb new file mode 100644 index 0000000000..865e57ab93 --- /dev/null +++ b/recipes/libpcap/libpcap_0.9.3.bb @@ -0,0 +1,3 @@ +require libpcap.inc + +PR = "r2" diff --git a/recipes/libpcap/libpcap_0.9.5.bb b/recipes/libpcap/libpcap_0.9.5.bb new file mode 100644 index 0000000000..865e57ab93 --- /dev/null +++ b/recipes/libpcap/libpcap_0.9.5.bb @@ -0,0 +1,3 @@ +require libpcap.inc + +PR = "r2" diff --git a/recipes/libpcap/libpcap_0.9.8.bb b/recipes/libpcap/libpcap_0.9.8.bb new file mode 100644 index 0000000000..8003d4491f --- /dev/null +++ b/recipes/libpcap/libpcap_0.9.8.bb @@ -0,0 +1,5 @@ +require libpcap.inc + +PR = "r3" + +SRC_URI += "file://aclocal.patch;patch=1" diff --git a/recipes/libpcap/libpcap_1.0.0.bb b/recipes/libpcap/libpcap_1.0.0.bb new file mode 100644 index 0000000000..b85bf4c5d4 --- /dev/null +++ b/recipes/libpcap/libpcap_1.0.0.bb @@ -0,0 +1,29 @@ +require libpcap.inc + +PR = "r5" +SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz" +SRC_URI += "file://aclocal.patch;patch=1" +SRC_URI += "file://ieee80215-arphrd.patch;patch=1" + +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} +} + +do_stage_append () { + install -d ${STAGING_INCDIR}/pcap + install -m 0644 pcap/pcap.h ${STAGING_INCDIR}/pcap/pcap.h + install -m 0644 pcap/namedb.h ${STAGING_INCDIR}/pcap/namedb.h + install -m 0644 pcap/bpf.h ${STAGING_INCDIR}/pcap/bpf.h +} + + |