Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 2014 08:24:45 +0000 (UTC)
From:      Ashish SHUKLA <ashish@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r342652 - in head/net-im/ejabberd: . files
Message-ID:  <201402050824.s158OjjX027632@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ashish
Date: Wed Feb  5 08:24:45 2014
New Revision: 342652
URL: http://svnweb.freebsd.org/changeset/ports/342652
QAT: https://qat.redports.org/buildarchive/r342652/

Log:
  - Fix brokenness on 10-RELEASE due to expat library
  - Remove ABI version from LIB_DEPENDS
  - Add STAGE support
  - Add option for documentation
  - Use OptionsNG helpers
  
  PR:		ports/186274 ports/185594

Modified:
  head/net-im/ejabberd/Makefile
  head/net-im/ejabberd/files/patch-src-Makefile.in
  head/net-im/ejabberd/files/pkg-install.in
  head/net-im/ejabberd/pkg-plist

Modified: head/net-im/ejabberd/Makefile
==============================================================================
--- head/net-im/ejabberd/Makefile	Wed Feb  5 08:22:02 2014	(r342651)
+++ head/net-im/ejabberd/Makefile	Wed Feb  5 08:24:45 2014	(r342652)
@@ -15,7 +15,7 @@ LICENSE_FILE=	${WRKDIR}/${PORTNAME}-${PO
 
 BUILD_DEPENDS=	erlc:${PORTSDIR}/lang/erlang
 RUN_DEPENDS=	erl:${PORTSDIR}/lang/erlang
-LIB_DEPENDS=	expat.6:${PORTSDIR}/textproc/expat2
+LIB_DEPENDS=	expat:${PORTSDIR}/textproc/expat2
 
 USERS=		ejabberd
 GROUPS=		${USERS}
@@ -25,57 +25,41 @@ USES=		iconv gmake pkgconfig
 USE_RC_SUBR=	${PORTNAME}
 NOPRECIOUSMAKEVARS=	yes
 
-OPTIONS_DEFINE=	ODBC PAM
+OPTIONS_DEFINE=	ODBC PAM DOCS
 
 MAKE_ENV=	PORTVERSION=${PORTVERSION}
-CONFIGURE_ARGS+=--localstatedir=/var --with-openssl=${OPENSSLBASE}
+CONFIGURE_ARGS+=--localstatedir=/var --with-openssl=${OPENSSLBASE} --with-expat=${LOCALBASE}
 PKGMESSAGE=	${WRKDIR}/pkg-message
 PKGINSTALL=	${WRKDIR}/pkg-install
 PLIST_SUB=	PORTNAME=${PORTNAME} PORTVERSION=${PORTVERSION}
 SUB_FILES=	pkg-message pkg-install
 SUB_LIST=	PORTNAME=${PORTNAME} PORTVERSION=${PORTVERSION} \
-		USERS=${USERS} GROUPS=${GROUPS}
+		USERS=${USERS} GROUPS=${GROUPS} SHAREMODE=${SHAREMODE} \
+		SHAREOWN=${SHAREOWN} SHAREGRP=${SHAREGRP}
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+OPTIONS_SUB=		PAM ODBC
+PAM_CONFIGURE_ENABLE=	pam
+ODBC_CONFIGURE_ENABLE=	odbc
+DOCS_MAKE_ARGS_OFF=	NOPORTDOCS=yes
 
 USE_OPENSSL=	yes
 
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
-
-.if ${PORT_OPTIONS:MODBC}
-CONFIGURE_ARGS+=--enable-odbc
-PLIST_SUB+=	ODBC=""
-.else
-PLIST_SUB+=	ODBC="@comment "
-.endif
+.include <bsd.port.pre.mk>
 
 .if ${PORT_OPTIONS:MPAM}
-CONFIGURE_ARGS+=--enable-pam
-PLIST_SUB+=	PAM=""
+SUB_LIST+=		PAM="1"
 .else
-PLIST_SUB+=	PAM="@comment "
-.endif
-
-.if ! ${PORT_OPTIONS:MDOCS}
-MAKE_ARGS+=	NOPORTDOCS=${NOPORTDOCS}
+SUB_LIST+=		PAM="0"
 .endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' ${WRKSRC}/configure
 
 post-install:
-	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-	@${FIND} ${PREFIX}/lib/erlang/lib/${DISTNAME} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE}
-	@${FIND} ${PREFIX}/lib/erlang/lib/${DISTNAME} -type f -print0 | ${XARGS} -0 ${CHOWN} ${SHAREOWN}:${SHAREGRP}
-
 .if ${PORT_OPTIONS:MPAM}
-	${CHMOD} 4750 ${PREFIX}/lib/erlang/lib/${DISTNAME}/priv/bin/epam
-	${CHOWN} root:ejabberd ${PREFIX}/lib/erlang/lib/${DISTNAME}/priv/bin/epam
-	${INSTALL} -m 444 ${FILESDIR}/pam_ejabberd ${PREFIX}/etc/pam.d/ejabberd
+	${INSTALL} -m 444 ${FILESDIR}/pam_ejabberd ${STAGEDIR}${PREFIX}/etc/pam.d/ejabberd
 .endif
-
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>

Modified: head/net-im/ejabberd/files/patch-src-Makefile.in
==============================================================================
--- head/net-im/ejabberd/files/patch-src-Makefile.in	Wed Feb  5 08:22:02 2014	(r342651)
+++ head/net-im/ejabberd/files/patch-src-Makefile.in	Wed Feb  5 08:24:45 2014	(r342652)
@@ -1,15 +1,18 @@
+
+$FreeBSD$
+
 --- Makefile.in.orig
 +++ Makefile.in
-@@ -89,7 +89,7 @@
+@@ -95,7 +95,7 @@
  SBINDIR = $(DESTDIR)@sbindir@
  
  # /lib/ejabberd/
 -EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
-+EJABBERDDIR = @libdir@/erlang/lib/ejabberd-$(PORTVERSION)
++EJABBERDDIR = $(DESTDIR)@libdir@/erlang/lib/ejabberd-$(PORTVERSION)
  
  # /share/doc/ejabberd
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
-@@ -115,7 +115,7 @@
+@@ -121,7 +121,7 @@
  MSGSDIR = $(PRIVDIR)/msgs
  
  # /var/lib/ejabberd/
@@ -18,7 +21,7 @@
  
  # /var/lock/ejabberdctl
  CTLLOCKDIR = $(DESTDIR)@localstatedir@/lock/ejabberdctl
-@@ -178,25 +178,22 @@
+@@ -184,25 +184,22 @@
  	#
  	# Configuration files
  	install -d -m 750 $(G_USER) $(ETCDIR)
@@ -51,7 +54,7 @@
  	#
  	# Init script
  	sed -e "s*@ctlscriptpath@*$(SBINDIR)*" \
-@@ -253,6 +250,7 @@
+@@ -260,6 +257,7 @@
  	chmod -R 750 $(LOGDIR)
  	#
  	# Documentation
@@ -59,7 +62,7 @@
  	install -d $(DOCDIR)
  	install -m 644 ../doc/dev.html $(DOCDIR)
  	install -m 644 ../doc/guide.html $(DOCDIR)
-@@ -262,6 +260,7 @@
+@@ -269,6 +267,7 @@
  		&& install -m 644 ../doc/guide.pdf $(DOCDIR) \
  		|| echo "No ../doc/guide.pdf was built"
  	install -m 644 ../COPYING $(DOCDIR)

Modified: head/net-im/ejabberd/files/pkg-install.in
==============================================================================
--- head/net-im/ejabberd/files/pkg-install.in	Wed Feb  5 08:22:02 2014	(r342651)
+++ head/net-im/ejabberd/files/pkg-install.in	Wed Feb  5 08:24:45 2014	(r342652)
@@ -10,5 +10,13 @@ install -d -m 750 -o %%USERS%% -g %%GROU
 
 chown -R %%USERS%%:%%GROUPS%%  %%PREFIX%%/etc/%%PORTNAME%%
 chown -R %%USERS%%:%%GROUPS%%  %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%
+	
+find %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%% -type f -print0 | xargs -0 chmod %%SHAREMODE%%
+find %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%% -type f -print0 | xargs -0 chown %%SHAREOWN%%:%%SHAREGRP%%
+
+if [ "%%PAM%%" = 1 ]; then
+	chmod 4750 %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/bin/epam
+	chown root:%%GROUPS%% %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/bin/epam
+fi
 
 exit 0

Modified: head/net-im/ejabberd/pkg-plist
==============================================================================
--- head/net-im/ejabberd/pkg-plist	Wed Feb  5 08:22:02 2014	(r342651)
+++ head/net-im/ejabberd/pkg-plist	Wed Feb  5 08:24:45 2014	(r342652)
@@ -2,8 +2,8 @@
 %%ETCDIR%%/%%PORTNAME%%ctl.cfg.example
 %%ETCDIR%%/inetrc.example
 @unexec if cmp -s %D/%%ETCDIR%%/%%PORTNAME%%.defaults.example %D/%%ETCDIR%%/%%PORTNAME%%.defaults; then rm -f %D/%%ETCDIR%%/%%PORTNAME%%.defaults; fi
-@unexec if cmp -s %D/%%ETCDIR%%/%%PORTNAME%%.inetrc.example %D/%%ETCDIR%%/%%PORTNAME%%.inetrc; then rm -f %D/%%ETCDIR%%/%%PORTNAME%%.inetrc; fi
-@exec [ ! -f %D/%%ETCDIR%%/%%PORTNAME%%.inetrc ] && cp %D/%%ETCDIR%%/%%PORTNAME%%.inetrc.example %D/%%ETCDIR%%/%%PORTNAME%%.inetrc
+@unexec if cmp -s %D/%%ETCDIR%%/inetrc.example %D/%%ETCDIR%%/inetrc; then rm -f %D/%%ETCDIR%%/inetrc; fi
+@exec [ ! -f %D/%%ETCDIR%%/inetrc ] && cp %D/%%ETCDIR%%/inetrc.example %D/%%ETCDIR%%/inetrc
 %%PAM%%etc/pam.d/%%PORTNAME%%
 lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/ELDAPv3.beam
 lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/XmppAddr.beam



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