aboutsummaryrefslogtreecommitdiff
path: root/www/httpsqs
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2011-04-27 11:23:33 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2011-04-27 11:23:33 +0000
commit2ecfdbfa142af14ff4ed646d66f14e7e2eb169af (patch)
tree5f54c26547eefc48d11d6f4ac7edbeddb7eb214a /www/httpsqs
parent5f6923d97bb2de4cadde9f4db675cf6047b36c5c (diff)
downloadports-2ecfdbfa142af14ff4ed646d66f14e7e2eb169af.tar.gz
ports-2ecfdbfa142af14ff4ed646d66f14e7e2eb169af.zip
Notes
Diffstat (limited to 'www/httpsqs')
-rw-r--r--www/httpsqs/Makefile35
-rw-r--r--www/httpsqs/distinfo2
-rw-r--r--www/httpsqs/files/Makefile18
-rw-r--r--www/httpsqs/files/patch-httpsqs.c19
-rw-r--r--www/httpsqs/pkg-descr5
5 files changed, 79 insertions, 0 deletions
diff --git a/www/httpsqs/Makefile b/www/httpsqs/Makefile
new file mode 100644
index 000000000000..543afb1dd9ca
--- /dev/null
+++ b/www/httpsqs/Makefile
@@ -0,0 +1,35 @@
+# New ports collection makefile for: httpsqs
+# Date created: 2011-04-22
+# Whom: Zhihao Yuan <lichray@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= httpsqs
+PORTVERSION= 1.6
+CATEGORIES= www devel
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+
+MAINTAINER= lichray@gmail.com
+COMMENT= Simple Queue Service based on HTTP GET/POST protocol
+
+LIB_DEPENDS+= tokyocabinet:${PORTSDIR}/databases/tokyocabinet \
+ event-2.0:${PORTSDIR}/devel/libevent2
+
+BUILD_DEPENDS+= pkg-config:${PORTSDIR}/devel/pkg-config
+
+MAKE_ENV= LIBS="${PTHREAD_LIBS}"
+
+LICENSE= BSD
+
+PLIST_FILES= bin/${PORTNAME}
+
+post-patch:
+ ${CP} ${PATCHDIR}/Makefile ${WRKSRC}
+ @${REINPLACE_CMD} -e 's|{ 0 }|"${PREFIX}/bin/${PORTNAME}"|' \
+ ${WRKSRC}/httpsqs.c
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/www/httpsqs/distinfo b/www/httpsqs/distinfo
new file mode 100644
index 000000000000..c7ba39bbf715
--- /dev/null
+++ b/www/httpsqs/distinfo
@@ -0,0 +1,2 @@
+SHA256 (httpsqs-1.6.tar.gz) = 784043357e52556830e9efa20dfb1d66161cbca781dcd6c367b017fe5d3dbb68
+SIZE (httpsqs-1.6.tar.gz) = 8871
diff --git a/www/httpsqs/files/Makefile b/www/httpsqs/files/Makefile
new file mode 100644
index 000000000000..36c03389a073
--- /dev/null
+++ b/www/httpsqs/files/Makefile
@@ -0,0 +1,18 @@
+# $FreeBSD$
+# Makefile for httpsqs (pmake)
+
+tokyocabinet_CFLAGS!= pkg-config --cflags tokyocabinet
+libevent_CFLAGS!= pkg-config --cflags libevent
+tokyocabinet_LIBS!= pkg-config --libs tokyocabinet
+libevent_LIBS!= pkg-config --libs libevent
+CFLAGS+= ${tokyocabinet_CFLAGS} ${libevent_CFLAGS}
+LIBS+= ${tokyocabinet_LIBS} ${libevent_LIBS}
+
+all: httpsqs
+
+httpsqs: httpsqs.o prename.o
+ ${CC} ${LDFLAGS} ${LIBS} -o ${.TARGET} ${.ALLSRC}
+httpsqs.o: httpsqs.c
+prename.o: prename.c
+
+install: httpsqs
diff --git a/www/httpsqs/files/patch-httpsqs.c b/www/httpsqs/files/patch-httpsqs.c
new file mode 100644
index 000000000000..58fd2ef8dc2c
--- /dev/null
+++ b/www/httpsqs/files/patch-httpsqs.c
@@ -0,0 +1,19 @@
+--- httpsqs.c.orig 2011-04-14 00:46:09.000000000 -0500
++++ httpsqs.c 2011-04-23 03:19:34.920926265 -0500
+@@ -30,6 +30,7 @@ This is free software, and you are welco
+ #include <signal.h>
+ #include <stdbool.h>
+ #include <pthread.h>
++#include <sys/wait.h>
+
+ #include <err.h>
+ #include <event.h>
+@@ -656,7 +657,7 @@ int main(int argc, char *argv[], char *e
+ char httpsqs_path_file[1024] = { 0 }; // httpsqs_path_file 为 httpsqs 程序的绝对路径
+ struct evbuffer *httpsqs_prename_buf; /* 原命令行参数 */
+ httpsqs_prename_buf = evbuffer_new();
+- readlink("/proc/self/exe", httpsqs_path_file, sizeof(httpsqs_path_file));
++ //readlink("/proc/self/exe", httpsqs_path_file, sizeof(httpsqs_path_file));
+ evbuffer_add_printf(httpsqs_prename_buf, "%s", httpsqs_path_file);
+ for (httpsqs_prename_num = 1; httpsqs_prename_num < argc; httpsqs_prename_num++) {
+ evbuffer_add_printf(httpsqs_prename_buf, " %s", argv[httpsqs_prename_num]);
diff --git a/www/httpsqs/pkg-descr b/www/httpsqs/pkg-descr
new file mode 100644
index 000000000000..8581c82a07c2
--- /dev/null
+++ b/www/httpsqs/pkg-descr
@@ -0,0 +1,5 @@
+HTTPSQS is a Simple Queue Service based on HTTP GET/POST protocol. It can
+handle more than 10000 requests/sec concurrent connections. Currently it's
+widely deployed throughout the xoyo.com under the Kingsoft Corporation.
+
+WWW: https://code.google.com/p/httpsqs/