aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authorlx <lx@FreeBSD.org>2014-06-05 06:56:34 +0800
committerlx <lx@FreeBSD.org>2014-06-05 06:56:34 +0800
commit58db7a1d159f818b0e98d1e0eeadc3daba3dcd68 (patch)
tree591e96a1dbab88ab6308c97c26f89e46a3df762d /net-im
parenta94588aa982b220e0a6f272de3b02ecbbb110b05 (diff)
downloadfreebsd-ports-gnome-58db7a1d159f818b0e98d1e0eeadc3daba3dcd68.tar.gz
freebsd-ports-gnome-58db7a1d159f818b0e98d1e0eeadc3daba3dcd68.tar.zst
freebsd-ports-gnome-58db7a1d159f818b0e98d1e0eeadc3daba3dcd68.zip
Update to 0.9.4, rc file notice about daemonize, and support for LUAJIT.
PR: 188223 Submitted by: dar
Diffstat (limited to 'net-im')
-rw-r--r--net-im/prosody/Makefile24
-rw-r--r--net-im/prosody/distinfo4
-rw-r--r--net-im/prosody/files/prosody.in15
3 files changed, 32 insertions, 11 deletions
diff --git a/net-im/prosody/Makefile b/net-im/prosody/Makefile
index 08e1f9cb6de9..be4712e07a8b 100644
--- a/net-im/prosody/Makefile
+++ b/net-im/prosody/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= prosody
-PORTVERSION= 0.9.3
+PORTVERSION= 0.9.4
CATEGORIES= net-im
MASTER_SITES= http://prosody.im/downloads/source/ \
http://redundancy.redundancy.org/mirror/
@@ -25,13 +25,23 @@ GROUPS= ${USERS}
USE_RC_SUBR= prosody
MANCOMPRESSED= no
-USES= gmake lua:51 shebangfix
-SHEBANG_LANG= lua
-SHEBANG_FILES= prosody prosodyctl
-lua_OLD_CMD= ${SETENV} lua
-lua_CMD= ${LUA_CMD}
+OPTIONS_DEFINE= LUAJIT
+LUAJIT_DESC= Run prosody using luajit
+LUAJIT_LIB_DEPENDS= libluajit-5.1.so:${PORTSDIR}/lang/luajit
+
+.include <bsd.port.options.mk>
+
+USES= gmake lua:51
+LUA_PREMK= yes
+
+.include <bsd.port.pre.mk>
HAS_CONFIGURE= yes
+.if ${PORT_OPTIONS:MLUAJIT}
+CONFIGURE_ARGS+= --runwith=`which luajit`
+.else
+CONFIGURE_ARGS+= --runwith=`which ${LUA_CMD}`
+.endif
CONFIGURE_ARGS+= --ostype=freebsd --c-compiler="${CC}" --linker="${LD}"
CONFIGURE_ENV+= LOCALBASE="${LOCALBASE}" PREFIX="${PREFIX}" LUA_SUFFIX="-${LUA_VER}" LUA_LIBDIR="${LUA_LIBDIR}" LUA_INCDIR="${LUA_INCDIR}"
@@ -39,4 +49,4 @@ SUB_FILES= pkg-deinstall
SUB_LIST= USERS=${USERS} GROUPS=${GROUPS}
PLIST_SUB= PROSODY_USER=${USERS} PROSODY_GROUP=${GROUPS}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net-im/prosody/distinfo b/net-im/prosody/distinfo
index 74a17b3e2806..d298fe2bcbd5 100644
--- a/net-im/prosody/distinfo
+++ b/net-im/prosody/distinfo
@@ -1,2 +1,2 @@
-SHA256 (prosody-0.9.3.tar.gz) = 22d2427fae4858d15b4f695348fb7781e4c65c04a24171837985024e76799ea0
-SIZE (prosody-0.9.3.tar.gz) = 264318
+SHA256 (prosody-0.9.4.tar.gz) = be87cf31901a25477869b4ebd52e298f63a5effacae526911a0be876cc82e1c6
+SIZE (prosody-0.9.4.tar.gz) = 265898
diff --git a/net-im/prosody/files/prosody.in b/net-im/prosody/files/prosody.in
index 46facf947b80..ee48176af067 100644
--- a/net-im/prosody/files/prosody.in
+++ b/net-im/prosody/files/prosody.in
@@ -25,14 +25,25 @@ pidfile=${prosody_pidfile:-"%%PREFIX%%/var/lib/prosody/prosody.pid"}
extra_commands="status"
-start_cmd="prosody_cmd start"
+start_cmd="prosody_start"
stop_cmd="prosody_cmd stop"
restart_cmd="$stop_cmd; $start_cmd"
status_cmd="prosody_cmd status"
+prosody_start()
+{
+ config="%%PREFIX%%/etc/prosody/prosody.cfg.lua"
+ if grep -q '^daemonize[[:blank:]]*=[[:blank:]]*false' $config; then
+ # Prosody's not going to daemonize on its own, use daemon(8)
+ daemon $command start
+ else
+ $command start
+ fi
+}
+
prosody_cmd()
{
- %%PREFIX%%/bin/prosodyctl $1
+ $command $1
}
run_rc_command "$1"