1 | #!/bin/sh |
1 | #!/bin/sh |
2 | |
2 | |
3 | LE=../libevent-1.4.0-beta |
3 | LE=../libevent-1.4.2-rc |
|
|
4 | |
|
|
5 | if ! [ -e evbuffer.c ]; then |
|
|
6 | echo do not run this programm unless you know what you are doing |
|
|
7 | exit 1 |
|
|
8 | fi |
|
|
9 | |
|
|
10 | # this program combines libev and libevent into a single package |
|
|
11 | |
|
|
12 | cvs update -AdP libev |
|
|
13 | rsync -avP libev/. . --exclude CVS |
|
|
14 | |
|
|
15 | rm -f configure.ac |
4 | |
16 | |
5 | cp $LE/evdns.h . |
17 | cp $LE/evdns.h . |
|
|
18 | |
|
|
19 | perl -i -pe 's%^/.libevent-include./%#include "event_compat.h"%' event.h |
6 | |
20 | |
7 | perl -ne ' |
21 | perl -ne ' |
8 | s/\s+char buf\[64\];/\tchar buf[96];/; |
22 | s/\s+char buf\[64\];/\tchar buf[96];/; |
9 | if (/#include "event.h"/) { |
23 | if (/#include "event.h"/) { |
10 | print "#ifndef EV_STANDALONE\n$_#endif\n"; |
24 | print "#ifndef EV_STANDALONE\n$_#endif\n"; |
… | |
… | |
79 | s/\bepoll.c\b//g; |
93 | s/\bepoll.c\b//g; |
80 | s/\bepoll_sub.c\b//g; |
94 | s/\bepoll_sub.c\b//g; |
81 | s/\bevent-internal.h\b//g; |
95 | s/\bevent-internal.h\b//g; |
82 | s/\bevsignal.h\b//g; |
96 | s/\bevsignal.h\b//g; |
83 | s/^(man_MANS\s*=)/$1 ev.3 /; |
97 | s/^(man_MANS\s*=)/$1 ev.3 /; |
84 | 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 /; |
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 /; |
85 | s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h ev++.h /; |
99 | s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h ev++.h /; |
86 | s/^(CORE_SRC\s*=)/$1 ev.c /; |
100 | s/^(CORE_SRC\s*=)/$1 ev.c /; |
87 | s/^(SYS_LIBS\s*=)/$1 -lm /; |
101 | s/^(SYS_LIBS\s*=)/$1 -lm /; |
88 | #s/libevent/libev/g; |
102 | #s/libevent/libev/g; |
89 | print; |
103 | print; |
… | |
… | |
91 | |
105 | |
92 | perl -ne ' |
106 | perl -ne ' |
93 | #s/-Wall/-Wall -Wno-comment -Wunused-function -Wno-unused-value/; |
107 | #s/-Wall/-Wall -Wno-comment -Wunused-function -Wno-unused-value/; |
94 | s/-Wall//g; |
108 | s/-Wall//g; |
95 | #s/libevent/libev/g; |
109 | #s/libevent/libev/g; |
|
|
110 | #VERSION |
96 | s/AM_INIT_AUTOMAKE\s*\(.*,(.*)\)/AM_INIT_AUTOMAKE(libevent-$1+libev,1.7)/; |
111 | s/AM_INIT_AUTOMAKE\s*\(.*,(.*)\)/AM_INIT_AUTOMAKE(libevent-$1+libev,3.1)/; |
97 | s/AC_LIBOBJ\(select\)/: ;/g; |
112 | s/AC_LIBOBJ\(select\)/: ;/g; |
98 | s/AC_LIBOBJ\(poll\)/: ;/g; |
113 | s/AC_LIBOBJ\(poll\)/: ;/g; |
99 | s/AC_LIBOBJ\(kqueue\)/: ;/g; |
114 | s/AC_LIBOBJ\(kqueue\)/: ;/g; |
100 | s/AC_LIBOBJ\(epoll\)/: ;/g; |
115 | s/AC_LIBOBJ\(epoll\)/: ;/g; |
101 | s/AC_LIBOBJ\(devpoll\)/: ;/g; |
116 | s/AC_LIBOBJ\(devpoll\)/: ;/g; |