]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/libpcap/libpcap-0.7.2/libpcap-shared.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / libpcap / libpcap-0.7.2 / libpcap-shared.patch
1 --- libpcap-0.7.2.orig/nametoaddr.c
2 +++ libpcap-0.7.2/nametoaddr.c
3 @@ -310,7 +310,7 @@
4         e = ep = (u_char *)malloc(6);
5  
6         while (*s) {
7 -               if (*s == ':')
8 +               if (*s == ':' || *s == '.')
9                         s += 1;
10                 d = xdtoi(*s++);
11                 if (isxdigit((unsigned char)*s)) {
12 --- libpcap-0.7.2.orig/debian/libpcap0.postinst
13 +++ libpcap-0.7.2/debian/libpcap0.postinst
14 @@ -0,0 +1,7 @@
15 +#! /bin/sh
16 +
17 +if [ "$1" = "configure" ]; then
18 +       ldconfig
19 +fi
20 +
21 +#DEBHELPER#
22 --- libpcap-0.7.2.orig/debian/copyright
23 +++ libpcap-0.7.2/debian/copyright
24 @@ -0,0 +1,37 @@
25 +This package was debianized by Anand Kumria <wildfire@progsoc.org> on
26 +Sun, 12 Nov 2000 03:19:44 +1100.
27 +
28 +It was downloaded from http://www.tcpdump.org/
29 +
30 +Upstream Author(s): patches@tcpdump.org
31 +
32 +Copyright:
33 +
34 +The licence-style of this software is BSD. However this version (0.5)
35 +fails to include a file containing the licence. A similar version
36 +of the licence is available in /usr/share/common-licenses/BSD.
37 +Future versions of libpcap will contain the licence located at
38 +<URL: http://cvs.tcpdump.org/cgi-bin/cvsweb/libpcap/LICENSE?rev=1.1>
39 +which is what I describe below.
40 +
41 +The differences are:
42 +       - Item 3, replace "University" with "Authors"
43 +       - The LEGALESE (uppercase portion) ends after
44 +         the words "A PARTICULAR PURPOSE"
45 +       - The copyright holders are listed below (the CREDITS
46 +         file is canonical, this is merely a convienent listing)
47 +
48 +people who contributed to libpcap or tcpdump:
49 +       Bill Fenner             <fenner@research.att.com>
50 +       Assar Westerlund        <assar@sics.se>
51 +       Alexei                  <kuznet@ms2.inr.ac.ru>
52 +       Jun-ichiro itojun Hagino <itojun@iijlab.net>
53 +       Guy Harris              <gharris@flashcom.net>
54 +       Torsten Landschoff      <t.landschoff@gmx.net>
55 +       Michael Richardson      <mcr@sandelman.ottawa.on.ca>
56 +
57 +The original LBL crew:
58 +       Steve McCanne
59 +       Craig Leres
60 +       Van Jacobson
61 +
62 --- libpcap-0.7.2.orig/debian/libpcap0.postrm
63 +++ libpcap-0.7.2/debian/libpcap0.postrm
64 @@ -0,0 +1,7 @@
65 +#! /bin/sh
66 +
67 +if [ "$1" = "remove" ]; then
68 +       ldconfig
69 +fi
70 +
71 +#DEBHELPER#
72 --- libpcap-0.7.2.orig/debian/libpcap-dev.dirs
73 +++ libpcap-0.7.2/debian/libpcap-dev.dirs
74 @@ -0,0 +1,4 @@
75 +usr/lib
76 +usr/include
77 +usr/include/net
78 +usr/share/man/man3
79 --- libpcap-0.7.2.orig/debian/README.Debian
80 +++ libpcap-0.7.2/debian/README.Debian
81 @@ -0,0 +1,13 @@
82 +libpcap for Debian
83 +------------------
84 +
85 + If you receive messages telling you the packet type is not supported
86 + or is deprecated check that CONFIG_PACKET is set to either `Y' or `M'.
87 +
88 + You should also check that /etc/modules.conf has the line
89 +
90 +       alias net-pf-17 af_packet
91 +
92 + Feel free to report bugs.
93 +
94 + -- Anand Kumria <wildfire@progsoc.org>, Tue, 28 Nov 2000 02:04:28 EST
95 --- libpcap-0.7.2.orig/debian/libpcap0.docs
96 +++ libpcap-0.7.2/debian/libpcap0.docs
97 @@ -0,0 +1,2 @@
98 +README
99 +CREDITS
100 --- libpcap-0.7.2.orig/debian/libpcap0.7.postinst
101 +++ libpcap-0.7.2/debian/libpcap0.7.postinst
102 @@ -0,0 +1,8 @@
103 +#! /bin/sh
104 +
105 +if [ "$1" = "configure" ]; then
106 +       ldconfig
107 +fi
108 +
109 +#DEBHELPER#
110 +
111 --- libpcap-0.7.2.orig/debian/libpcap0.7.postrm
112 +++ libpcap-0.7.2/debian/libpcap0.7.postrm
113 @@ -0,0 +1,8 @@
114 +#! /bin/sh
115 +
116 +if [ "$1" = "remove" ]; then
117 +       ldconfig
118 +fi
119 +
120 +#DEBHELPER#
121 +
122 --- libpcap-0.7.2.orig/debian/changelog
123 +++ libpcap-0.7.2/debian/changelog
124 @@ -0,0 +1,135 @@
125 +libpcap (0.7.2-1) unstable; urgency=low
126 +
127 +  * New upstream release (closes: #145538).
128 +  * debian/rules: Build the library with _FILE_OFFSET_BITS set to 64
129 +    to allow for files bigger than 2GB (closes: #129213).
130 +  * Rename the library package to libpcap0.7 and change the SONAME so that we
131 +    can account for interface changes (closes: #132359).
132 +  * Run ldconfig as appropriate (lintian).
133 +  * Remove watch.ex template and the silly symlink from libpcap-dev's 
134 +    documentation to libpcap0 (lintian).
135 +
136 + -- Torsten Landschoff <torsten@debian.org>  Sat,  3 Aug 2002 23:33:56 +0200
137 +
138 +libpcap (0.6.2-2) unstable; urgency=low
139 +
140 +  * debian/control: Change section of libpcap0 from net to libs
141 +    (Debian installer message).
142 +  * aclocal.m4: Treat the ia64 as a cpu which can't handle unaligned 
143 +    memory access (closes: #112152). Thanks for the report go to 
144 +    John R. Daily.
145 +
146 + -- Torsten Landschoff <torsten@debian.org>  Fri, 14 Sep 2001 10:15:52 +0200
147 +
148 +libpcap (0.6.2-1) unstable; urgency=medium
149 +
150 +  * New upstream release.
151 +  * debian/control: Removed Build-Depends already satisfied by the
152 +    build-essential package.
153 +  * gencode.c (gen_scode): Add the missing default branch of the protocol
154 +    family switch (closes: 88688).
155 +  * debian/libpcap.post{rm,inst}: Run ldconfig (lintian).
156 +  * debian/copyright: Fix the "similiar" typo (lintian).
157 +
158 + -- Torsten Landschoff <torsten@debian.org>  Tue,  6 Mar 2001 04:27:27 +0100
159 +
160 +libpcap (0.6.1-2) unstable; urgency=low
161 +
162 +  * debian/rules: Changed the shlibs info so that only pcap 0.6
163 +    is okay for packages linked against this version.
164 +
165 + -- Torsten Landschoff <torsten@debian.org>  Thu, 18 Jan 2001 01:13:20 +0100
166 +
167 +libpcap (0.6.1-1) unstable; urgency=low
168 +
169 +  * Taking back the package. Kudos to Anand for helping out.
170 +  * debian/rules: Pass --enable-ipv6 to configure (closes: #80223).
171 +
172 + -- Torsten Landschoff <torsten@debian.org>  Tue, 16 Jan 2001 15:40:37 +0100
173 +
174 +libpcap (0.5.2-2) unstable; urgency=low
175 +
176 +  * Update config.guess and config.sub (Closes #26031)
177 +  * Source builds would not always work. Fix that.
178 +  * Kernel interface problem is really a module not loaded problem. 
179 +    Note this in README.Debian. (Closes #21356)
180 +
181 + -- Anand Kumria <wildfire@progsoc.org>  Tue, 28 Nov 2000 02:03:25 +1100
182 +
183 +libpcap (0.5.2-1) unstable; urgency=low
184 +
185 +  * New upstream release
186 +  * New maintainer
187 +  * Migrate to Debhelper and insert Build-Depends
188 +
189 + -- Anand Kumria <wildfire@progsoc.org>  Sun, 12 Nov 2000 03:19:44 +1100
190 +
191 +libpcap (0.4a6-3) unstable; urgency=low
192 +
193 +  * New maintainer.
194 +  * scanner.l: Allow a 12 digit hex number as ether address as well as 
195 +    BB.BB.BB.BB.BB.BB (closes: #48735)
196 +  * nametoaddr.c (pcap_ether_aton): Adjust for change in scanner.l
197 +
198 + -- Torsten Landschoff <torsten@debian.org>  Mon, 22 Nov 1999 02:39:45 +0100
199 +
200 +libpcap (0.4a6-2.1) unstable; urgency=low
201 +
202 +  * Non maintainer upload.
203 +    config.{guess,sub} changed to recognize a Arm architecture.
204 +
205 + -- Turbo Fredriksson <turbo@debian.org>  Thu, 20 Aug 1998 23:12:36 -0400
206 +
207 +libpcap (0.4a6-2) frozen unstable; urgency=low
208 +
209 +  * renamed /usr/doc/libpcap to /usr/doc/libpcap0 (should fix several
210 +    lintian warnings)
211 +  * updated standards-version
212 +  * rebuild with latest debmake
213 +
214 + -- Peter Tobias <tobias@et-inf.fho-emden.de>  Mon, 30 Mar 1998 00:46:44 +0200
215 +
216 +
217 +libpcap (0.4a6-1) unstable; urgency=low
218 +
219 +  * upgraded to latest upstream version, fixes: Bug#17164
220 +  * added patch from Michael Alan Dorman <mdorman@mdorman.law.miami.edu>
221 +    for building libpcap on alpha systems, fixes: Bug#15556
222 +  * fixed aclocal.m4 script
223 +
224 + -- Peter Tobias <tobias@et-inf.fho-emden.de>  Sat, 31 Jan 1998 23:19:42 +0100
225 +
226 +
227 +libpcap (0.4a2-2) unstable; urgency=low
228 +
229 +  * fixed detection of IFF_LOOPBACK for linux systems
230 +  * link shared library with -l
231 +
232 + -- Peter Tobias <tobias@et-inf.fho-emden.de>  Wed, 19 Nov 1997 23:44:34 +0100
233 +
234 +
235 +libpcap (0.4a2-1) unstable; urgency=low
236 +
237 +  * new maintainer
238 +  * latest upstream release
239 +  * libc6 version
240 +  * compiled with _REENTRANT
241 +
242 + -- Peter Tobias <tobias@et-inf.fho-emden.de>  Wed, 17 Sep 1997 20:40:01 +0200
243 +
244 +
245 +libpcap (0.3.1a3-1) unstable; urgency=low
246 +
247 +  * Latest upstream release.  Fixes bug #6670.
248 +
249 + -- Karl Sackett <krs@debian.org>  Wed, 2 Apr 1997 10:19:28 -0600
250 +
251 +
252 +libpcap (0.3-1) unstable; urgency=low
253 +
254 +  * First Debian release.
255 +  * Makefile.in: supports libpcap.so target.
256 +
257 + -- Karl Sackett <krs@debian.org>  Wed, 8 Jan 1997 09:38:31 -0600
258 +
259 +
260 --- libpcap-0.7.2.orig/debian/rules
261 +++ libpcap-0.7.2/debian/rules
262 @@ -0,0 +1,87 @@
263 +#!/usr/bin/make -f
264 +# Sample debian/rules that uses debhelper.
265 +# GNU copyright 1997 to 1999 by Joey Hess.
266 +
267 +# Uncomment this to turn on verbose mode.
268 +#export DH_VERBOSE=1
269 +
270 +# This is the debhelper compatability version to use.
271 +export DH_COMPAT=2
272 +
273 +# shared library versions, option 1
274 +version=0.7.2
275 +major=0.7
276 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
277 +#version=`ls src/.libs/lib*.so.* | \
278 +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
279 +#major=`ls src/.libs/lib*.so.* | \
280 +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
281 +
282 +build: build-stamp
283 +build-stamp:
284 +       dh_testdir
285 +
286 +       CFLAGS=-D_FILE_OFFSET_BITS=64 ./configure --prefix=/usr --mandir=\$${prefix}/share/man  \
287 +               --enable-ipv6 --infodir=\$${prefix}/share/info
288 +       # Add here commands to compile the package.
289 +       $(MAKE)
290 +
291 +       touch build-stamp
292 +
293 +clean:
294 +       dh_testdir
295 +       dh_testroot
296 +       rm -f build-stamp
297 +
298 +       # Add here commands to clean up after the build process.
299 +       -$(MAKE) distclean
300 +
301 +       rm -f net/net
302 +
303 +       dh_clean
304 +
305 +install: build
306 +       dh_testdir
307 +       dh_testroot
308 +       dh_clean -k
309 +       dh_installdirs
310 +
311 +       $(MAKE) install prefix=`pwd`/debian/libpcap-dev/usr
312 +
313 +# Build architecture-independent files here.
314 +binary-indep: build install
315 +# We have nothing to do by default.
316 +
317 +# Build architecture-dependent files here.
318 +binary-arch: build install
319 +#      dh_testversion
320 +       dh_testdir
321 +       dh_testroot
322 +        #
323 +        # build libpcap${major} package by moving files from libpcap-dev
324 +        #
325 +       dh_movefiles -plibpcap$(major) --sourcedir=debian/libpcap-dev \
326 +               usr/lib/libpcap.so.$(major)        \
327 +               usr/lib/libpcap.so.$(version)
328 +
329 +#      dh_installdebconf       
330 +       dh_installdocs
331 +       dh_installexamples
332 +       dh_installmenu
333 +       dh_installmanpages -plibpcap-dev
334 +       dh_installinfo
335 +#      dh_undocumented
336 +       dh_installchangelogs CHANGES
337 +       dh_link -plibpcap-dev
338 +       dh_strip
339 +       dh_compress
340 +       dh_fixperms
341 +       dh_makeshlibs
342 +       dh_installdeb
343 +       dh_shlibdeps 
344 +       dh_gencontrol
345 +       dh_md5sums
346 +       dh_builddeb
347 +
348 +binary: binary-indep binary-arch
349 +.PHONY: build clean binary-indep binary-arch binary install
350 --- libpcap-0.7.2.orig/debian/control
351 +++ libpcap-0.7.2/debian/control
352 @@ -0,0 +1,30 @@
353 +Source: libpcap
354 +Section: devel
355 +Priority: optional
356 +Maintainer: Torsten Landschoff <torsten@debian.org>
357 +Build-Depends: debhelper, flex, bison
358 +Standards-Version: 3.0.1
359 +
360 +Package: libpcap-dev
361 +Section: devel
362 +Architecture: any
363 +Depends: libpcap0.7 (= ${Source-Version}), libc6-dev
364 +Description: Development library for libpcap.
365 + Includes headers, static libraries, and documentation.
366 +
367 +Package: libpcap0.7
368 +Section: libs
369 +Architecture: any
370 +Depends: ${shlibs:Depends}
371 +Description: System interface for user-level packet capture.
372 + libpcap (Packet CAPture) provides a portable framework for low-level 
373 + network monitoring.  Applications include network statistics collection, 
374 + security monitoring, network debugging, etc.  
375 + .
376 + Since almost every system vendor provides a different interface for 
377 + packet capture, and since there are several tools that require this 
378 + functionality, we've created this system-independent API to ease in 
379 + porting and to alleviate the need for several system-dependent packet 
380 + capture modules in each application.
381 + .
382 + Further information is available at <URL: http://www.tcpdump.org/>
383 --- libpcap-0.7.2.orig/scanner.l
384 +++ libpcap-0.7.2/scanner.l
385 @@ -75,6 +75,7 @@
386  N              ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
387  B              ([0-9A-Fa-f][0-9A-Fa-f]?)
388  W              ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
389 +X              [0-9A-Fa-f]
390  
391  %a 15000
392  %o 17000
393 @@ -261,7 +262,7 @@
394  {N}                    { yylval.i = stoi((char *)yytext); return NUM; }
395  ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N})        {
396                         yylval.s = sdup((char *)yytext); return HID; }
397 -{B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext);
398 +({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) { yylval.e = pcap_ether_aton((char *)yytext);
399                           return EID; }
400  {V6}                   {
401  #ifdef INET6
402 @@ -279,6 +280,8 @@
403  #endif /*INET6*/
404                         }
405  {B}:+({B}:+)+          { bpf_error("bogus ethernet address %s", yytext); }
406 +{X}{12}                        { yylval.e = pcap_ether_aton((char *)yytext); return EID;}
407 +
408  icmptype               { yylval.i = 0; return NUM; }
409  icmpcode               { yylval.i = 1; return NUM; }
410  icmp-echoreply         { yylval.i = 0; return NUM; }
411 --- libpcap-0.7.2.orig/Makefile.in
412 +++ libpcap-0.7.2/Makefile.in
413 @@ -37,6 +37,15 @@
414  srcdir = @srcdir@
415  VPATH = @srcdir@
416  
417 +# some defines for shared library compilation - FIXME
418 +MAJ=0.7
419 +MIN=2
420 +VERSION=$(MAJ).$(MIN)
421 +LIBNAME=pcap
422 +LIBRARY=lib$(LIBNAME).a
423 +SOLIBRARY=lib$(LIBNAME).so
424 +SHAREDLIB=$(SOLIBRARY).$(VERSION)
425 +
426  #
427  # You shouldn't need to edit anything below.
428  #
429 @@ -48,6 +57,7 @@
430  
431  # Standard CFLAGS
432  CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
433 +CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ)
434  
435  INSTALL = @INSTALL@
436  INSTALL_PROGRAM = @INSTALL_PROGRAM@
437 @@ -67,7 +77,11 @@
438  # problem if you don't own the file but can write to the directory.
439  .c.o:
440         @rm -f $@
441 -       $(CC) $(CFLAGS) -c $(srcdir)/$*.c
442 +       $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c
443 +
444 +%_pic.o: %.c
445 +       @rm -f $@
446 +       $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c
447  
448  PSRC = pcap-@V_PCAP@.c
449  CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \
450 @@ -80,6 +94,7 @@
451  # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
452  # hack the extra indirection
453  OBJ =  $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o) # $(LIBOBJS)
454 +OBJ_PIC = $(PSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(GENSRC:.c=_pic.o)
455  HDR =  pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
456         ethertype.h gencode.h gnuc.h
457  GENHDR = \
458 @@ -91,15 +106,22 @@
459  TAGFILES = \
460         $(SRC) $(HDR) $(TAGHDR)
461  
462 -CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
463 +CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so*
464  
465 -all: libpcap.a
466 +all: libpcap.a $(SHAREDLIB)
467  
468  libpcap.a: $(OBJ)
469         @rm -f $@
470         ar rc $@ $(OBJ)
471         $(RANLIB) $@
472  
473 +$(SHAREDLIB): $(OBJ_PIC)
474 +       -@rm -f $@
475 +       -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ)
476 +       $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc
477 +       ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ)
478 +       ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY)
479 +
480  scanner.c: $(srcdir)/scanner.l
481         @rm -f $@
482         $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
483 @@ -107,6 +129,9 @@
484  scanner.o: scanner.c tokdefs.h
485         $(CC) $(CFLAGS) -c scanner.c
486  
487 +scanner_pic.o: scanner.c tokdefs.h
488 +       $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c
489 +
490  tokdefs.h: grammar.c
491  grammar.c: $(srcdir)/grammar.y
492         @rm -f grammar.c tokdefs.h
493 @@ -118,9 +143,16 @@
494         @rm -f $@
495         $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
496  
497 +grammar_pic.o: grammar.c
498 +       @rm -f $@
499 +       $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c 
500 +
501  version.o: version.c
502         $(CC) $(CFLAGS) -c version.c
503  
504 +version_pic.o: version.c
505 +       $(CC) -fPIC $(CFLAGS) -c version.c -o $@
506 +
507  snprintf.o: $(srcdir)/../tcpdump/missing/snprintf.c
508         $(CC) $(CFLAGS) -o $@ -c $(srcdir)/../tcpdump/missing/snprintf.c
509  
510 @@ -135,10 +167,16 @@
511  bpf_filter.o: bpf_filter.c
512         $(CC) $(CFLAGS) -c bpf_filter.c
513  
514 +bpf_filter_pic.o: bpf_filter.c
515 +       $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@
516 +
517  install:
518         [ -d $(DESTDIR)$(libdir) ] || \
519             (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
520         $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
521 +       $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/
522 +       ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ)
523 +       ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY)
524         $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
525         [ -d $(DESTDIR)$(includedir) ] || \
526             (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))