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.

112 lines
2.7 KiB

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