ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/import_libevent
Revision: 1.22
Committed: Tue Dec 18 01:37:46 2007 UTC (16 years, 5 months ago) by root
Branch: MAIN
CVS Tags: rel-1_86
Changes since 1.21: +1 -1 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 root 1.15 cvs update -AdP libev
11 root 1.14 rsync -avP libev/. . --exclude CVS
12 root 1.13
13 root 1.21 rm -f configure.ac
14     mv LICENSE.libevent LICENSE
15    
16 root 1.7 LE=../libevent-1.4.0-beta
17 root 1.1
18     cp $LE/evdns.h .
19    
20     perl -ne '
21     s/\s+char buf\[64\];/\tchar buf[96];/;
22     if (/#include "event.h"/) {
23     print "#ifndef EV_STANDALONE\n$_#endif\n";
24     next;
25     }
26     if (/#include "misc.h"/) {
27     print "#ifndef EV_STANDALONE\n$_#endif\n";
28     next;
29     }
30 root 1.4 if (/#include "(unistd.h|sys\/time.h)"/) {
31 root 1.2 print "#ifndef WIN32\n$_#endif\n";
32     next;
33     }
34 root 1.1 next if /#include "log.h"/;
35    
36     print;
37     ' <$LE/evdns.c >evdns.c
38    
39 root 1.7 cp $LE/autogen.sh .
40 root 1.1 cp $LE/epoll_sub.c .
41     cp $LE/evbuffer.c .
42     cp $LE/buffer.c .
43     cp $LE/evhttp.h .
44 root 1.7 cp $LE/evutil.h .
45     cp $LE/evutil.c .
46     cp $LE/event-config.h .
47     cp $LE/event-internal.h .
48     cp $LE/evrpc.h .
49     cp $LE/evrpc.c .
50     cp $LE/evrpc-internal.h .
51 root 1.1 cp $LE/http.c .
52     cp $LE/event_tagging.c .
53     cp $LE/http-internal.h .
54     cp $LE/strlcpy-internal.h .
55     cp $LE/log.c .
56     cp $LE/log.h .
57     cp $LE/strlcpy.c .
58     rsync -a $LE/WIN32* $LE/sample $LE/test $LE/compat . --del
59 root 1.12 #rename 's/libevent/libev/' WIN32-Prj/lib*
60 root 1.1 cp $LE/aclocal.m4 .
61 root 1.7 #cp $LE/acconfig.h .
62 root 1.1 cp $LE/config.h.in .
63     cp $LE/event_rpcgen.py .
64     cp $LE/*.3 .
65    
66 root 1.12 #perl -i -pe 's/libevent/libev/g' sample/Makefile.am
67     #perl -i -pe 's/libevent/libev/g' test/Makefile.am
68 root 1.1
69     perl -i -pe 's/#include <event.h>$/#include "event.h"/' test/*.c
70    
71     perl -i -ne '
72     next if /"event-internal.h"/;
73     s/base\d?->sig.ev_signal_added/0/;
74     s/base\d?->sig.ev_signal_pair\[0\]/-1/;
75 root 1.7 s/base->sig.evsignal_caught/0/;
76     next if /^\ttest_signal_(dealloc|pipeloss|switchbase|assert|restore)\(\)/;
77     next if /^\ttest_simplesignal\(\)/; # non-default-loop
78     next if /^\ttest_immediatesignal\(\)/; # non-default-loop
79 root 1.1 next if /test_priorities\(\d\)/;
80     print;
81     ' test/regress.c
82    
83     perl -ne '
84 root 1.7 s/\bmin_heap.h\b//g;
85 root 1.1 s/\bsignal.c\b//g;
86     s/\bevport.c\b//g;
87     s/\bkqueue.c\b//g;
88     s/\bdevpoll.c\b//g;
89     s/\brtsig.c\b//g;
90     s/\bselect.c\b//g;
91     s/\bpoll.c\b//g;
92     s/\bepoll.c\b//g;
93     s/\bepoll_sub.c\b//g;
94     s/\bevent-internal.h\b//g;
95     s/\bevsignal.h\b//g;
96 root 1.7 s/^(man_MANS\s*=)/$1 ev.3 /;
97 root 1.21 s/^(EXTRA_DIST\s*=)/$1 LICENSE 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 /;
98 root 1.11 s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h ev++.h /;
99 root 1.7 s/^(CORE_SRC\s*=)/$1 ev.c /;
100     s/^(SYS_LIBS\s*=)/$1 -lm /;
101 root 1.12 #s/libevent/libev/g;
102 root 1.1 print;
103     ' <$LE/Makefile.am >Makefile.am
104    
105     perl -ne '
106 root 1.10 #s/-Wall/-Wall -Wno-comment -Wunused-function -Wno-unused-value/;
107     s/-Wall//g;
108 root 1.12 #s/libevent/libev/g;
109 root 1.20 #VERSION
110 root 1.22 s/AM_INIT_AUTOMAKE\s*\(.*,(.*)\)/AM_INIT_AUTOMAKE(libevent-$1+libev,1.86)/;
111 root 1.1 s/AC_LIBOBJ\(select\)/: ;/g;
112     s/AC_LIBOBJ\(poll\)/: ;/g;
113     s/AC_LIBOBJ\(kqueue\)/: ;/g;
114     s/AC_LIBOBJ\(epoll\)/: ;/g;
115     s/AC_LIBOBJ\(devpoll\)/: ;/g;
116     s/AC_LIBOBJ\(evport\)/: ;/g;
117     s/AC_LIBOBJ\(signal\)/: ;/g;
118     s/AC_LIBOBJ\(rtsig\)/: ;/g;
119 root 1.9 print "m4_include([libev.m4])\n" if /^AC_OUTPUT/;
120 root 1.1 print;
121     ' <$LE/configure.in >configure.in
122    
123     aclocal-1.7
124     automake-1.7 --add-missing
125     autoconf
126 root 1.9 autoheader
127 root 1.1 libtoolize
128     CC="ccache gcc" ./configure --prefix=/opt/libev --disable-shared "$@"
129    
130