Update libpcap to 0.9.8 (#3571)
[openwrt.git] / package / libpcap / patches / 100-shared-lib.patch
index fbbef5b..aae77f8 100644 (file)
@@ -1,12 +1,12 @@
---- libpcap-0.8.3-orig/Makefile.in     2003-12-15 02:42:23.000000000 +0100
-+++ libpcap-0.8.3-7/Makefile.in        2005-03-08 03:38:22.000000000 +0100
+--- a/Makefile.in
++++ b/Makefile.in
 @@ -37,6 +37,15 @@
  srcdir = @srcdir@
  VPATH = @srcdir@
  
 +# some defines for shared library compilation
-+MAJ=0.8
-+MIN=3
++MAJ=0.9
++MIN=8
 +VERSION=$(MAJ).$(MIN)
 +LIBNAME=pcap
 +LIBRARY=lib$(LIBNAME).a
@@ -16,7 +16,7 @@
  #
  # You shouldn't need to edit anything below.
  #
-@@ -49,6 +58,7 @@
+@@ -52,6 +61,7 @@
  
  # Standard CFLAGS
  CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
  
  INSTALL = @INSTALL@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
-@@ -68,7 +78,11 @@
- # problem if you don't own the file but can write to the directory.
+@@ -72,7 +82,12 @@
  .c.o:
        @rm -f $@
--      $(CC) $(CFLAGS) -c $(srcdir)/$*.c
+       $(CC) $(CFLAGS) -c $(srcdir)/$*.c
 +      $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c
-+
 +%_pic.o: %.c
 +      @rm -f $@
 +      $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c
++      
  PSRC =        pcap-@V_PCAP@.c
  FSRC =  fad-@V_FINDALLDEVS@.c
-@@ -83,6 +97,7 @@
+ SSRC =  @SSRC@
+@@ -86,6 +101,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)
@@ -45,7 +45,7 @@
  HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
        ethertype.h gencode.h gnuc.h
  GENHDR = \
-@@ -94,15 +109,22 @@
+@@ -97,15 +113,23 @@
  TAGFILES = \
        $(SRC) $(HDR) $(TAGHDR)
  
 +      ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ)
 +      ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY)
 +
- scanner.c: $(srcdir)/scanner.l
-       @rm -f $@
-       $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
-@@ -110,6 +132,9 @@
++       
+ shared: libpcap.$(DYEXT)
+ #
+@@ -131,6 +155,10 @@
  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
-@@ -123,9 +148,17 @@
+@@ -144,9 +172,16 @@
        @rm -f $@
        $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.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
  
-@@ -151,10 +184,16 @@
+@@ -172,10 +207,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:
++
+ install: libpcap.a 
        [ -d $(DESTDIR)$(libdir) ] || \
            (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
        $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
This page took 0.024569 seconds and 4 git commands to generate.