Bug 186274 - [patch] net-im/ejabberd: does not compile in poudriere
Summary: [patch] net-im/ejabberd: does not compile in poudriere
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-30 13:10 UTC by David Demelier
Modified: 2014-02-05 08:30 UTC (History)
0 users

See Also:


Attachments
ejabberd.diff (478 bytes, patch)
2014-01-30 13:10 UTC, David Demelier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Demelier 2014-01-30 13:10:00 UTC
Does not compile in poudriere because it cannot find expat.h. I also wonder how it can compile outside poudriere.

The patch adds --with-expat and it seems to work, however I don't know which one from LOCALBASE
or PREFIX is the best.

checking for XML_ParserCreate in -lexpat... no
configure: error: Could not find development files of Expat library
===>  Script "configure" failed unexpectedly.
Please report the problem to ashish@FreeBSD.org [maintainer] and attach the
"/wrkdirs/usr/ports/net-im/ejabberd/work/ejabberd-2.1.13/src/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/net-im/ejabberd
===>  Cleaning for ejabberd-2.1.13
build of /usr/ports/net-im/ejabberd ended at Thu Jan 30 13:18:00 CET 2014
build time: 00:00:33
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-30 13:10:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ashish

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 David Demelier 2014-01-31 10:59:30 UTC
On 30/01/2014 17:58, Ashish SHUKLA wrote:
> Hi David,
>
> Could you please try the attached diff ?
>
> It adds STAGEing support as well. It's pending from quite sometime, I was
> hoping to update port to latest version, but chances are not that good atm, so
> I'll commit this, if it passes the build for you.
>
> Thanks!

It seems to work ;-).

Regards,
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-02-05 08:24:53 UTC
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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Ashish SHUKLA freebsd_committer freebsd_triage 2014-02-05 08:27:54 UTC
State Changed
From-To: open->closed

Committed. Thanks!