Mirror of :pserver:anonymous@cvs.schmorp.de/schmorpforge libev http://software.schmorp.de/pkg/libev.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

132 lines
3.3 KiB

  1. #!/bin/sh
  2. LE=../libevent-1.4.3-stable
  3. 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. # this program combines libev and libevent into a single package
  8. cvs update -AdP libev
  9. rsync -avP libev/. . --exclude CVS
  10. rm -f configure.ac
  11. cp $LE/evdns.h .
  12. perl -i -pe 's%^/.libevent-include./%#include "event_compat.h"%' event.h
  13. perl -ne '
  14. s/\s+char buf\[64\];/\tchar buf[96];/;
  15. if (/#include "event.h"/) {
  16. print "#ifndef EV_STANDALONE\n$_#endif\n";
  17. next;
  18. }
  19. if (/#include "misc.h"/) {
  20. print "#ifndef EV_STANDALONE\n$_#endif\n";
  21. next;
  22. }
  23. if (/#include "(unistd.h|sys\/time.h)"/) {
  24. print "#ifndef WIN32\n$_#endif\n";
  25. next;
  26. }
  27. next if /#include "log.h"/;
  28. print;
  29. ' <$LE/evdns.c >evdns.c
  30. cp $LE/autogen.sh .
  31. cp $LE/epoll_sub.c .
  32. cp $LE/evbuffer.c .
  33. cp $LE/buffer.c .
  34. cp $LE/evhttp.h .
  35. cp $LE/evutil.h .
  36. cp $LE/evutil.c .
  37. cp $LE/event-config.h .
  38. cp $LE/event-internal.h .
  39. cp $LE/evrpc.h .
  40. cp $LE/evrpc.c .
  41. cp $LE/evrpc-internal.h .
  42. cp $LE/http.c .
  43. cp $LE/event_tagging.c .
  44. cp $LE/http-internal.h .
  45. cp $LE/strlcpy-internal.h .
  46. cp $LE/log.c .
  47. cp $LE/log.h .
  48. cp $LE/strlcpy.c .
  49. rsync -a $LE/WIN32* $LE/sample $LE/test $LE/compat . --del
  50. #rename 's/libevent/libev/' WIN32-Prj/lib*
  51. cp $LE/aclocal.m4 .
  52. #cp $LE/acconfig.h .
  53. cp $LE/config.h.in .
  54. cp $LE/event_rpcgen.py .
  55. cp $LE/*.3 .
  56. #perl -i -pe 's/libevent/libev/g' sample/Makefile.am
  57. #perl -i -pe 's/libevent/libev/g' test/Makefile.am
  58. perl -i -pe 's/#include <event.h>$/#include "event.h"/' test/*.c
  59. perl -i -ne '
  60. next if /"event-internal.h"/;
  61. s/base\d?->sig.ev_signal_added/0/;
  62. s/base\d?->sig.ev_signal_pair\[0\]/-1/;
  63. s/base->sig.evsignal_caught/0/;
  64. next if /^\ttest_signal_(dealloc|pipeloss|switchbase|assert|restore)\(\)/;
  65. next if /^\ttest_simplesignal\(\)/; # non-default-loop
  66. next if /^\ttest_immediatesignal\(\)/; # non-default-loop
  67. next if /test_priorities\(\d\)/;
  68. print;
  69. ' test/regress.c
  70. perl -ne '
  71. s/\bmin_heap.h\b//g;
  72. s/\bsignal.c\b//g;
  73. s/\bevport.c\b//g;
  74. s/\bkqueue.c\b//g;
  75. s/\bdevpoll.c\b//g;
  76. s/\brtsig.c\b//g;
  77. s/\bselect.c\b//g;
  78. s/\bpoll.c\b//g;
  79. s/\bepoll.c\b//g;
  80. s/\bepoll_sub.c\b//g;
  81. s/\bevent-internal.h\b//g;
  82. s/\bevsignal.h\b//g;
  83. 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 /;
  85. s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h ev++.h /;
  86. s/^(CORE_SRC\s*=)/$1 ev.c /;
  87. s/^(SYS_LIBS\s*=)/$1 -lm /;
  88. #s/libevent/libev/g;
  89. print;
  90. ' <$LE/Makefile.am >Makefile.am
  91. perl -ne '
  92. #s/-Wall/-Wall -Wno-comment -Wunused-function -Wno-unused-value/;
  93. s/-Wall//g;
  94. #s/libevent/libev/g;
  95. #VERSION
  96. s/AM_INIT_AUTOMAKE\s*\(.*,(.*)\)/AM_INIT_AUTOMAKE(libevent-$1+libev,3.1)/;
  97. s/AC_LIBOBJ\(select\)/: ;/g;
  98. s/AC_LIBOBJ\(poll\)/: ;/g;
  99. s/AC_LIBOBJ\(kqueue\)/: ;/g;
  100. s/AC_LIBOBJ\(epoll\)/: ;/g;
  101. s/AC_LIBOBJ\(devpoll\)/: ;/g;
  102. s/AC_LIBOBJ\(evport\)/: ;/g;
  103. s/AC_LIBOBJ\(signal\)/: ;/g;
  104. s/AC_LIBOBJ\(rtsig\)/: ;/g;
  105. print "m4_include([libev.m4])\n" if /^AC_OUTPUT/;
  106. print;
  107. ' <$LE/configure.in >configure.in
  108. aclocal-1.7
  109. automake-1.7 --add-missing
  110. autoconf
  111. autoheader
  112. libtoolize
  113. CC="ccache gcc" ./configure --prefix=/opt/libev --disable-shared "$@"