aboutsummaryrefslogtreecommitdiff
path: root/devel/libevent
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2006-11-29 17:13:24 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2006-11-29 17:13:24 +0000
commit485e3029aa4dc108ab10212de5871564001bf773 (patch)
treed431a1b83ed940e5ee90aaf8e274d3618a9a1b2a /devel/libevent
parent78e58eb7b038a2d85c0839c6d536a925c2ef42a3 (diff)
downloadports-485e3029aa4dc108ab10212de5871564001bf773.tar.gz
ports-485e3029aa4dc108ab10212de5871564001bf773.zip
- Fix build in FreeBSD < 5.1
- Take MAINTAINER
Notes
Notes: svn path=/head/; revision=178266
Diffstat (limited to 'devel/libevent')
-rw-r--r--devel/libevent/Makefile13
-rw-r--r--devel/libevent/files/patch-event.h16
-rw-r--r--devel/libevent/files/patch-test-regress_http.c55
3 files changed, 72 insertions, 12 deletions
diff --git a/devel/libevent/Makefile b/devel/libevent/Makefile
index 7fbd57be2df3..77305a2ddf6d 100644
--- a/devel/libevent/Makefile
+++ b/devel/libevent/Makefile
@@ -11,9 +11,10 @@ PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://monkey.org/~provos/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= mnag@FreeBSD.org
COMMENT= Provides an API to execute callback functions on certain events
+USE_GETOPT_LONG=yes
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
@@ -88,11 +89,7 @@ MLINKS= event.3 event_init.3 \
post-patch:
@${REINPLACE_CMD} -e 's,CFLAGS =,CFLAGS +=,' ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e 's|<stdint.h>|<inttypes.h>|' \
+ ${WRKSRC}/epoll.c ${WRKSRC}/epoll_sub.c ${WRKSRC}/evdns.c
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-BROKEN= Does not compile on 4.x
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/libevent/files/patch-event.h b/devel/libevent/files/patch-event.h
new file mode 100644
index 000000000000..65232cbfa5bb
--- /dev/null
+++ b/devel/libevent/files/patch-event.h
@@ -0,0 +1,16 @@
+#
+# Define CLOCK_MONOTONIC if FreeBSD < 5.1
+#
+--- event.h.orig Wed Nov 29 12:09:48 2006
++++ event.h Wed Nov 29 12:10:25 2006
+@@ -56,6 +56,10 @@
+ #define EV_SIGNAL 0x08
+ #define EV_PERSIST 0x10 /* Persistant event */
+
++#if defined(__FreeBSD__) && (__FreeBSD_version < 501000)
++#define CLOCK_MONOTONIC 4
++#endif
++
+ /* Fix so that ppl dont have to run with <sys/queue.h> */
+ #ifndef TAILQ_ENTRY
+ #define _EVENT_DEFINED_TQENTRY
diff --git a/devel/libevent/files/patch-test-regress_http.c b/devel/libevent/files/patch-test-regress_http.c
index 8ffc604d0d91..3d49d6fe6d6e 100644
--- a/devel/libevent/files/patch-test-regress_http.c
+++ b/devel/libevent/files/patch-test-regress_http.c
@@ -1,6 +1,44 @@
---- test/regress_http.c.orig Sun Oct 15 15:51:59 2006
-+++ test/regress_http.c Tue Oct 31 04:13:45 2006
-@@ -365,7 +365,7 @@
+--- test/regress_http.c.orig Sun Oct 15 18:51:59 2006
++++ test/regress_http.c Wed Nov 29 15:00:35 2006
+@@ -125,13 +125,14 @@
+ http_readcb(struct bufferevent *bev, void *arg)
+ {
+ const char *what = "This is funny";
++ int done;
+
+ event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bev->input)));
+
+ if (evbuffer_find(bev->input, what, strlen(what)) != NULL) {
+ struct evhttp_request *req = evhttp_request_new(NULL, NULL);
+ req->kind = EVHTTP_RESPONSE;
+- int done = evhttp_parse_lines(req, bev->input);
++ done = evhttp_parse_lines(req, bev->input);
+
+ if (done == 1 &&
+ evhttp_find_header(req->input_headers,
+@@ -163,9 +164,11 @@
+ void
+ http_basic_cb(struct evhttp_request *req, void *arg)
+ {
++ struct evbuffer *evb;
++
+ event_debug((stderr, "%s: called\n", __func__));
+
+- struct evbuffer *evb = evbuffer_new();
++ evb = evbuffer_new();
+ evbuffer_add_printf(evb, "This is funny");
+
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
+@@ -355,6 +358,8 @@
+ void
+ http_post_cb(struct evhttp_request *req, void *arg)
+ {
++ struct evbuffer *evb;
++
+ event_debug((stderr, "%s: called\n", __func__));
+
+ /* Yes, we are expecting a post request */
+@@ -365,7 +370,7 @@
if (EVBUFFER_LENGTH(req->input_buffer) != strlen(POST_DATA)) {
fprintf(stdout, "FAILED (length: %ld vs %ld)\n",
@@ -9,7 +47,16 @@
exit(1);
}
-@@ -403,7 +403,7 @@
+@@ -377,7 +382,7 @@
+ exit(1);
+ }
+
+- struct evbuffer *evb = evbuffer_new();
++ evb = evbuffer_new();
+ evbuffer_add_printf(evb, "This is funny");
+
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
+@@ -403,7 +408,7 @@
if (EVBUFFER_LENGTH(req->input_buffer) != strlen(what)) {
fprintf(stderr, "FAILED (length %ld vs %ld)\n",