aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2013-05-24 04:31:42 +0800
committerolgeni <olgeni@FreeBSD.org>2013-05-24 04:31:42 +0800
commite31d7a699c5d31b06edf0f8e536cc11a85bc2759 (patch)
tree806d025dd9135cb7c5bedc2ec0b52258d9905312
parent3427fd3d04304de82e3c18075f6e141f027a68c9 (diff)
downloadfreebsd-ports-gnome-e31d7a699c5d31b06edf0f8e536cc11a85bc2759.tar.gz
freebsd-ports-gnome-e31d7a699c5d31b06edf0f8e536cc11a85bc2759.tar.zst
freebsd-ports-gnome-e31d7a699c5d31b06edf0f8e536cc11a85bc2759.zip
Add net/ranch, an Erlang library to accept TCP connections with a
small code base and low latency.
-rw-r--r--net/Makefile1
-rw-r--r--net/ranch/Makefile42
-rw-r--r--net/ranch/distinfo2
-rw-r--r--net/ranch/pkg-descr14
-rw-r--r--net/ranch/pkg-plist40
5 files changed, 99 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index b6d26466b016..f19c58a55302 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -974,6 +974,7 @@
SUBDIR += radsecproxy
SUBDIR += radvd
SUBDIR += raggle
+ SUBDIR += ranch
SUBDIR += rdesktop
SUBDIR += rdist6
SUBDIR += recvnet
diff --git a/net/ranch/Makefile b/net/ranch/Makefile
new file mode 100644
index 000000000000..ead0e1c5722c
--- /dev/null
+++ b/net/ranch/Makefile
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+PORTNAME= ranch
+PORTVERSION= 0.8.3
+CATEGORIES= net
+MASTER_SITES= GH
+
+MAINTAINER= olgeni@FreeBSD.org
+COMMENT= Erlang socket acceptor pool for TCP protocols
+
+BUILD_DEPENDS= erlc:${PORTSDIR}/lang/erlang
+RUN_DEPENDS= erl:${PORTSDIR}/lang/erlang
+
+PLIST_SUB= VERSION="${PORTVERSION}"
+
+USE_GMAKE= yes
+USE_GITHUB= yes
+GH_ACCOUNT= extend
+GH_PROJECT= ranch
+GH_COMMIT= 53be20d
+GH_TAGNAME= ${PORTVERSION}
+
+PORTDOCS= *
+
+.include <bsd.port.options.mk>
+
+do-install:
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/guide/* ${DOCSDIR}
+.endif
+.if ${PORT_OPTIONS:MEXAMPLES}
+ @${MKDIR} ${EXAMPLESDIR}
+ cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
+.endif
+ @${MKDIR} ${PREFIX}/lib/erlang/lib/ranch-${PORTVERSION}
+ @${MKDIR} ${PREFIX}/lib/erlang/lib/ranch-${PORTVERSION}/ebin
+ @${MKDIR} ${PREFIX}/lib/erlang/lib/ranch-${PORTVERSION}/src
+ ${INSTALL_DATA} ${WRKSRC}/ebin/* ${PREFIX}/lib/erlang/lib/ranch-${PORTVERSION}/ebin
+ ${INSTALL_DATA} ${WRKSRC}/src/* ${PREFIX}/lib/erlang/lib/ranch-${PORTVERSION}/src
+
+.include <bsd.port.mk>
diff --git a/net/ranch/distinfo b/net/ranch/distinfo
new file mode 100644
index 000000000000..8876b3221e27
--- /dev/null
+++ b/net/ranch/distinfo
@@ -0,0 +1,2 @@
+SHA256 (ranch-0.8.3.tar.gz) = e1ad2b4ce1ae0dddb6bb986f26011a97118bef126c7b7383078bdac3f61d3b49
+SIZE (ranch-0.8.3.tar.gz) = 28272
diff --git a/net/ranch/pkg-descr b/net/ranch/pkg-descr
new file mode 100644
index 000000000000..3c9215a4642d
--- /dev/null
+++ b/net/ranch/pkg-descr
@@ -0,0 +1,14 @@
+Ranch aims to provide everything you need to accept TCP connections
+with a small code base and low latency while being easy to use
+directly as an application or to embed into your own.
+
+Ranch provides a modular design, letting you choose which transport
+and protocol are going to be used for a particular listener. Listeners
+accept and manage connections on one port, and include facilities to
+limit the number of concurrent connections. Connections are sorted
+into pools, each pool having a different configurable limit.
+
+Ranch also allows you to upgrade the acceptor pool without having to
+close any of the currently opened sockets.
+
+WWW: https://github.com/extend/ranch
diff --git a/net/ranch/pkg-plist b/net/ranch/pkg-plist
new file mode 100644
index 000000000000..54068d21cf68
--- /dev/null
+++ b/net/ranch/pkg-plist
@@ -0,0 +1,40 @@
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch.app
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_acceptor.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_acceptors_sup.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_app.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_conns_sup.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_listener_sup.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_protocol.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_server.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_ssl.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_sup.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_tcp.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin/ranch_transport.beam
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch.app.src
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_acceptor.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_acceptors_sup.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_app.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_conns_sup.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_listener_sup.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_protocol.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_server.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_ssl.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_sup.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_tcp.erl
+%%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src/ranch_transport.erl
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp_echo/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp_echo/rebar.config
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp_echo/src/echo_protocol.erl
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp_echo/src/tcp_echo.app.src
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp_echo/src/tcp_echo.erl
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp_echo/src/tcp_echo_app.erl
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp_echo/src/tcp_echo_sup.erl
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp_echo/start.sh
+@dirrm %%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/src
+@dirrm %%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%/ebin
+@dirrm %%LIB32DIR%%/erlang/lib/ranch-%%VERSION%%
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/tcp_echo/src
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/tcp_echo
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%