Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jun 2014 22:56:34 +0000 (UTC)
From:      David Thiel <lx@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r356555 - in head/net-im/prosody: . files
Message-ID:  <201406042256.s54MuY5m066350@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lx
Date: Wed Jun  4 22:56:34 2014
New Revision: 356555
URL: http://svnweb.freebsd.org/changeset/ports/356555
QAT: https://qat.redports.org/buildarchive/r356555/

Log:
  Update to 0.9.4, rc file notice about daemonize, and support for LUAJIT.
  
  PR:		188223
  Submitted by:	dar

Modified:
  head/net-im/prosody/Makefile
  head/net-im/prosody/distinfo
  head/net-im/prosody/files/prosody.in

Modified: head/net-im/prosody/Makefile
==============================================================================
--- head/net-im/prosody/Makefile	Wed Jun  4 22:51:12 2014	(r356554)
+++ head/net-im/prosody/Makefile	Wed Jun  4 22:56:34 2014	(r356555)
@@ -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>

Modified: head/net-im/prosody/distinfo
==============================================================================
--- head/net-im/prosody/distinfo	Wed Jun  4 22:51:12 2014	(r356554)
+++ head/net-im/prosody/distinfo	Wed Jun  4 22:56:34 2014	(r356555)
@@ -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

Modified: head/net-im/prosody/files/prosody.in
==============================================================================
--- head/net-im/prosody/files/prosody.in	Wed Jun  4 22:51:12 2014	(r356554)
+++ head/net-im/prosody/files/prosody.in	Wed Jun  4 22:56:34 2014	(r356555)
@@ -25,14 +25,25 @@ pidfile=${prosody_pidfile:-"%%PREFIX%%/v
 
 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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406042256.s54MuY5m066350>