ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/import_libevent
Revision: 1.13
Committed: Fri Dec 7 19:23:48 2007 UTC (16 years, 5 months ago) by root
Branch: MAIN
CVS Tags: rel-1_72
Changes since 1.12: +9 -0 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/bin/sh
2    
3 root 1.13 if ! [ -e evbuffer.c ]; then
4     echo do not run this programm unless you know what you are doing
5     exit 1
6     fi
7    
8     # this program combines libev and libevent into a single package
9    
10     cvs update -AdP
11    
12 root 1.7 LE=../libevent-1.4.0-beta
13 root 1.1
14     cp $LE/evdns.h .
15    
16     perl -ne '
17     s/\s+char buf\[64\];/\tchar buf[96];/;
18     if (/#include "event.h"/) {
19     print "#ifndef EV_STANDALONE\n$_#endif\n";
20     next;
21     }
22     if (/#include "misc.h"/) {
23     print "#ifndef EV_STANDALONE\n$_#endif\n";
24     next;
25     }
26 root 1.4 if (/#include "(unistd.h|sys\/time.h)"/) {
27 root 1.2 print "#ifndef WIN32\n$_#endif\n";
28     next;
29     }
30 root 1.1 next if /#include "log.h"/;
31    
32     print;
33     ' <$LE/evdns.c >evdns.c
34    
35 root 1.7 cp $LE/autogen.sh .
36 root 1.1 cp $LE/epoll_sub.c .
37     cp $LE/evbuffer.c .
38     cp $LE/buffer.c .
39     cp $LE/evhttp.h .
40 root 1.7 cp $LE/evutil.h .
41     cp $LE/evutil.c .
42     cp $LE/event-config.h .
43     cp $LE/event-internal.h .
44     cp $LE/evrpc.h .
45     cp $LE/evrpc.c .
46     cp $LE/evrpc-internal.h .
47 root 1.1 cp $LE/http.c .
48     cp $LE/event_tagging.c .
49     cp $LE/http-internal.h .
50     cp $LE/strlcpy-internal.h .
51     cp $LE/log.c .
52     cp $LE/log.h .
53     cp $LE/strlcpy.c .
54     rsync -a $LE/WIN32* $LE/sample $LE/test $LE/compat . --del
55 root 1.12 #rename 's/libevent/libev/' WIN32-Prj/lib*
56 root 1.1 cp $LE/aclocal.m4 .
57 root 1.7 #cp $LE/acconfig.h .
58 root 1.1 cp $LE/config.h.in .
59     cp $LE/event_rpcgen.py .
60     cp $LE/*.3 .
61    
62 root 1.12 #perl -i -pe 's/libevent/libev/g' sample/Makefile.am
63     #perl -i -pe 's/libevent/libev/g' test/Makefile.am
64 root 1.1
65     perl -i -pe 's/#include <event.h>$/#include "event.h"/' test/*.c
66    
67     perl -i -ne '
68     next if /"event-internal.h"/;
69     s/base\d?->sig.ev_signal_added/0/;
70     s/base\d?->sig.ev_signal_pair\[0\]/-1/;
71 root 1.7 s/base->sig.evsignal_caught/0/;
72     next if /^\ttest_signal_(dealloc|pipeloss|switchbase|assert|restore)\(\)/;
73     next if /^\ttest_simplesignal\(\)/; # non-default-loop
74     next if /^\ttest_immediatesignal\(\)/; # non-default-loop
75 root 1.1 next if /test_priorities\(\d\)/;
76     print;
77     ' test/regress.c
78    
79     perl -ne '
80 root 1.7 s/\bmin_heap.h\b//g;
81 root 1.1 s/\bsignal.c\b//g;
82     s/\bevport.c\b//g;
83     s/\bkqueue.c\b//g;
84     s/\bdevpoll.c\b//g;
85     s/\brtsig.c\b//g;
86     s/\bselect.c\b//g;
87     s/\bpoll.c\b//g;
88     s/\bepoll.c\b//g;
89     s/\bepoll_sub.c\b//g;
90     s/\bevent-internal.h\b//g;
91     s/\bevsignal.h\b//g;
92 root 1.7 s/^(man_MANS\s*=)/$1 ev.3 /;
93 root 1.11 s/^(EXTRA_DIST\s*=)/$1 libev.m4 ev.h ev_vars.h ev_wrap.h event_compat.h ev++.h ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c ev.3 ev.pod ev.html /;
94     s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h ev++.h /;
95 root 1.7 s/^(CORE_SRC\s*=)/$1 ev.c /;
96     s/^(SYS_LIBS\s*=)/$1 -lm /;
97 root 1.12 #s/libevent/libev/g;
98 root 1.1 print;
99     ' <$LE/Makefile.am >Makefile.am
100    
101     perl -ne '
102 root 1.10 #s/-Wall/-Wall -Wno-comment -Wunused-function -Wno-unused-value/;
103     s/-Wall//g;
104 root 1.12 #s/libevent/libev/g;
105     s/AM_INIT_AUTOMAKE\s*\(.*,(.*)\)/AM_INIT_AUTOMAKE(libevent-$1+libev,1.7)/;
106 root 1.1 s/AC_LIBOBJ\(select\)/: ;/g;
107     s/AC_LIBOBJ\(poll\)/: ;/g;
108     s/AC_LIBOBJ\(kqueue\)/: ;/g;
109     s/AC_LIBOBJ\(epoll\)/: ;/g;
110     s/AC_LIBOBJ\(devpoll\)/: ;/g;
111     s/AC_LIBOBJ\(evport\)/: ;/g;
112     s/AC_LIBOBJ\(signal\)/: ;/g;
113     s/AC_LIBOBJ\(rtsig\)/: ;/g;
114 root 1.9 print "m4_include([libev.m4])\n" if /^AC_OUTPUT/;
115 root 1.1 print;
116     ' <$LE/configure.in >configure.in
117    
118     aclocal-1.7
119     automake-1.7 --add-missing
120     autoconf
121 root 1.9 autoheader
122 root 1.1 libtoolize
123     CC="ccache gcc" ./configure --prefix=/opt/libev --disable-shared "$@"
124    
125