summaryrefslogtreecommitdiffstats
path: root/meta/packages/libpcap/libpcap-1.0.0/shared.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/libpcap/libpcap-1.0.0/shared.patch')
-rw-r--r--meta/packages/libpcap/libpcap-1.0.0/shared.patch116
1 files changed, 0 insertions, 116 deletions
diff --git a/meta/packages/libpcap/libpcap-1.0.0/shared.patch b/meta/packages/libpcap/libpcap-1.0.0/shared.patch
deleted file mode 100644
index cbdb181633..0000000000
--- a/meta/packages/libpcap/libpcap-1.0.0/shared.patch
+++ /dev/null
@@ -1,116 +0,0 @@
1Patch currently not applied but would be better or worse than customised do_install?
2
3--- libpcap-0.9.3/Makefile.in~shared
4+++ libpcap-0.9.3/Makefile.in
5@@ -37,6 +37,15 @@
6 srcdir = @srcdir@
7 VPATH = @srcdir@
8
9+# some defines for shared library compilation - FIXME, if not matching
10+MAJ=0.9
11+MIN=3
12+VERSION=$(MAJ).$(MIN)
13+LIBNAME=pcap
14+LIBRARY=lib$(LIBNAME).a
15+SOLIBRARY=lib$(LIBNAME).so
16+SHAREDLIB=$(SOLIBRARY).$(VERSION)
17+
18 #
19 # You shouldn't need to edit anything below.
20 #
21@@ -50,6 +59,7 @@
22
23 # Standard CFLAGS
24 CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
25+CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ)
26
27 INSTALL = @INSTALL@
28 INSTALL_PROGRAM = @INSTALL_PROGRAM@
29@@ -70,6 +80,9 @@
30 .c.o:
31 @rm -f $@
32 $(CC) $(CFLAGS) -c $(srcdir)/$*.c
33+%_pic.o: %.c
34+ @rm -f $@
35+ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c
36
37 PSRC = pcap-@V_PCAP@.c
38 FSRC = fad-@V_FINDALLDEVS@.c
39@@ -84,6 +97,7 @@
40 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
41 # hack the extra indirection
42 OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
43+OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=.o) $(CSRC:.c=_pic.o) $(GENSRC:.c=_pic.o)
44 HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
45 ethertype.h gencode.h gnuc.h
46 GENHDR = \
47@@ -95,15 +109,22 @@
48 TAGFILES = \
49 $(SRC) $(HDR) $(TAGHDR)
50
51-CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
52+CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so*
53
54-all: libpcap.a
55+all: libpcap.a $(SHAREDLIB)
56
57 libpcap.a: $(OBJ)
58 @rm -f $@
59 ar rc $@ $(OBJ) $(LIBS)
60 $(RANLIB) $@
61
62+$(SHAREDLIB): $(OBJ_PIC)
63+ -@rm -f $@
64+ -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ)
65+ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc
66+ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ)
67+ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY)
68+
69 shared: libpcap.$(DYEXT)
70
71 #
72@@ -129,6 +150,9 @@
73 scanner.o: scanner.c tokdefs.h
74 $(CC) $(CFLAGS) -c scanner.c
75
76+scanner_pic.o: scanner.c tokdefs.h
77+ $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c
78+
79 pcap.o: version.h
80
81 tokdefs.h: grammar.c
82@@ -142,9 +166,16 @@
83 @rm -f $@
84 $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
85
86+grammer_pic.o: grammar.c
87+ @rm -f $@
88+ $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c
89+
90 version.o: version.c
91 $(CC) $(CFLAGS) -c version.c
92
93+version_pic.o: version.c
94+ $(CC) -fPIC $(CFLAGS) -c version.c -o $@
95+
96 snprintf.o: $(srcdir)/missing/snprintf.c
97 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
98
99@@ -170,11 +201,17 @@
100 bpf_filter.o: bpf_filter.c
101 $(CC) $(CFLAGS) -c bpf_filter.c
102
103+bpf_filter_pic.o: bpf_filter.c
104+ $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@
105+
106 install: libpcap.a
107 [ -d $(DESTDIR)$(libdir) ] || \
108 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
109 $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
110 $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
111+ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/
112+ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ)
113+ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY)
114 [ -d $(DESTDIR)$(includedir) ] || \
115 (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
116 $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h