3 LE=../libevent-1.4.0-beta
5 if ! [ -e evbuffer.c ]; then
6 echo do not run this programm unless you know what you are doing
10 # this program combines libev and libevent into a single package
13 rsync -avP libev/. . --exclude CVS
19 perl -i -pe 's%^/.libevent-include./%#include "event_compat.h"%' event.h
22 s/\s+char buf\[64\];/\tchar buf[96];/;
23 if (/#include "event.h"/) {
24 print "#ifndef EV_STANDALONE\n$_#endif\n";
27 if (/#include "misc.h"/) {
28 print "#ifndef EV_STANDALONE\n$_#endif\n";
31 if (/#include "(unistd.h|sys\/time.h)"/) {
32 print "#ifndef WIN32\n$_#endif\n";
35 next if /#include "log.h"/;
38 ' <$LE/evdns.c >evdns.c
47 cp $LE/event-config.h .
48 cp $LE/event-internal.h .
51 cp $LE/evrpc-internal.h .
53 cp $LE/event_tagging.c .
54 cp $LE/http-internal.h .
55 cp $LE/strlcpy-internal.h .
59 rsync -a $LE/WIN32* $LE/sample $LE/test $LE/compat . --del
60 #rename 's/libevent/libev/' WIN32-Prj/lib*
64 cp $LE/event_rpcgen.py .
67 #perl -i -pe 's/libevent/libev/g' sample/Makefile.am
68 #perl -i -pe 's/libevent/libev/g' test/Makefile.am
70 perl -i -pe 's/#include <event.h>$/#include "event.h"/' test/*.c
73 next if /"event-internal.h"/;
74 s/base\d?->sig.ev_signal_added/0/;
75 s/base\d?->sig.ev_signal_pair\[0\]/-1/;
76 s/base->sig.evsignal_caught/0/;
77 next if /^\ttest_signal_(dealloc|pipeloss|switchbase|assert|restore)\(\)/;
78 next if /^\ttest_simplesignal\(\)/; # non-default-loop
79 next if /^\ttest_immediatesignal\(\)/; # non-default-loop
80 next if /test_priorities\(\d\)/;
95 s/\bevent-internal.h\b//g;
97 s/^(man_MANS\s*=)/$1 ev.3 /;
98 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 /;
99 s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h ev++.h /;
100 s/^(CORE_SRC\s*=)/$1 ev.c /;
101 s/^(SYS_LIBS\s*=)/$1 -lm /;
104 ' <$LE/Makefile.am >Makefile.am
107 #s/-Wall/-Wall -Wno-comment -Wunused-function -Wno-unused-value/;
111 s/AM_INIT_AUTOMAKE\s*\(.*,(.*)\)/AM_INIT_AUTOMAKE(libevent-$1+libev,2.01)/;
112 s/AC_LIBOBJ\(select\)/: ;/g;
113 s/AC_LIBOBJ\(poll\)/: ;/g;
114 s/AC_LIBOBJ\(kqueue\)/: ;/g;
115 s/AC_LIBOBJ\(epoll\)/: ;/g;
116 s/AC_LIBOBJ\(devpoll\)/: ;/g;
117 s/AC_LIBOBJ\(evport\)/: ;/g;
118 s/AC_LIBOBJ\(signal\)/: ;/g;
119 s/AC_LIBOBJ\(rtsig\)/: ;/g;
120 print "m4_include([libev.m4])\n" if /^AC_OUTPUT/;
122 ' <$LE/configure.in >configure.in
125 automake-1.7 --add-missing
129 CC="ccache gcc" ./configure --prefix=/opt/libev --disable-shared "$@"