Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2013 05:48:19 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/185319: net-im/jabber: Fix build
Message-ID:  <20131231054819.7c5185bdd1a53250381fc60e@yahoo.com>
Resent-Message-ID: <201312302110.rBULA3vG098642@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         185319
>Category:       ports
>Synopsis:       net-im/jabber: Fix build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 30 21:10:03 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/net-im/jabber/Makefile net-im/jabber/Makefile
--- /usr/ports/net-im/jabber/Makefile	2013-11-06 21:59:13.000000000 +0900
+++ net-im/jabber/Makefile	2013-12-31 00:00:00.000000000 +0900
@@ -6,8 +6,8 @@
 PORTREVISION=	14
 PORTEPOCH=	1
 CATEGORIES=	net-im ipv6
-MASTER_SITES=	http://download.jabberd.org/jabberd14/ \
-		http://download.jabberd.org/jabberd14/old/
+MASTER_SITES=	http://download.jabberd.org/jabberd14/%SUBDIR%/
+MASTER_SITE_SUBDIR=	. old
 DISTNAME=	jabberd14-${PORTVERSION}
 DIST_SUBDIR=	jabber
 
@@ -16,57 +16,46 @@
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	pth:${PORTSDIR}/devel/pth-hard \
-		popt:${PORTSDIR}/devel/popt \
-		idn:${PORTSDIR}/dns/libidn \
-		expat:${PORTSDIR}/textproc/expat2 \
-		tasn1:${PORTSDIR}/security/libtasn1 \
-		gnutls:${PORTSDIR}/security/gnutls \
-		gcrypt:${PORTSDIR}/security/libgcrypt
+LIB_DEPENDS=	libpopt.so:${PORTSDIR}/devel/popt \
+		libpth.so:${PORTSDIR}/devel/pth-hard \
+		libidn.so:${PORTSDIR}/dns/libidn \
+		libgnutls.so:${PORTSDIR}/security/gnutls \
+		libexpat.so:${PORTSDIR}/textproc/expat2
 
 OPTIONS_DEFINE= IPV6 MYSQL PGSQL
 
 USE_RC_SUBR=	jabber
-USE_GMAKE=	yes
-USES=		gettext iconv pkgconfig
+USES=		gettext gmake iconv pkgconfig
 USE_AUTOTOOLS=	libtool
-USE_LDCONFIG=	${PREFIX}/lib/jabber
-MAKE_JOBS_UNSAFE=	yes
-
-.if !defined(NO_INSTALL_MANPAGES)
-MAN5=		jabber.xml.5
-MAN8=		jabberd14.8
-.endif
-
-JABBER_USER=	jabber
-JABBER_UID=	93
-JABBER_GROUP=	${JABBER_USER}
-JABBER_GID=	${JABBER_UID}
-JABBER_ETCDIR=	"${PREFIX}/etc"
-JABBER_RUNDIR=	"/var/run/jabberd"
-JABBER_SPOOLDIR="/var/spool/jabberd"
-JABBER_LOGDIR=	"/var/log/jabberd"
-
 CONFIGURE_ARGS=	--localstatedir=/var \
 		--sysconfdir=${JABBER_ETCDIR} \
 		--includedir=${PREFIX}/include/jabber \
 		--libdir=${PREFIX}/lib/jabber
+USE_LDCONFIG=	${PREFIX}/lib/jabber
+MAKE_JOBS_UNSAFE=	yes
 
-CPPFLAGS+=	-I${LOCALBASE}/include/pth -I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib/pth -L${LOCALBASE}/lib -ltasn1 -lgcrypt
+CPPFLAGS+=	$$(pth-config --cflags) \
+		-I${LOCALBASE}/include
+LDFLAGS+=	$$(pth-config --ldflags) \
+		-L${LOCALBASE}/lib
 
-SUB_FILES+=	pkg-install pkg-deinstall pkg-message
-SUB_LIST+=	JABBER_USER=${JABBER_USER} JABBER_UID=${JABBER_UID} \
+SUB_FILES=	pkg-install pkg-deinstall pkg-message
+SUB_LIST=	JABBER_USER=${JABBER_USER} JABBER_UID=${JABBER_UID} \
 		JABBER_GROUP=${JABBER_GROUP} JABBER_GID=${JABBER_GID} \
 		JABBER_ETCDIR="${JABBER_ETCDIR}" \
 		JABBER_LOGDIR="${JABBER_LOGDIR}" \
 		JABBER_SPOOLDIR="${JABBER_SPOOLDIR}" \
 		JABBER_RUNDIR="${JABBER_RUNDIR}"
 
-DOCS=		AUTHORS ChangeLog INSTALL NEWS README README.SQL README.config \
-		README.filespool README.karma README.protocols TODO UPGRADE mysql.sql
+JABBER_USER=	jabber
+JABBER_UID=	93
+JABBER_GROUP=	${JABBER_USER}
+JABBER_GID=	${JABBER_UID}
+JABBER_ETCDIR=	"${PREFIX}/etc"
+JABBER_RUNDIR=	"/var/run/jabberd"
+JABBER_SPOOLDIR="/var/spool/jabberd"
+JABBER_LOGDIR=	"/var/log/jabberd"
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MMYSQL}
@@ -88,29 +77,36 @@
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e "s|\\\$$(localstatedir)/log/jabberd|${JABBER_LOGDIR}|g" \
-		-e "s|\\\$$(localstatedir)/spool/jabberd|${JABBER_SPOOLDIR}|g" \
-		-e "s|\\\$$(localstatedir)/run/jabberd|${JABBER_RUNDIR}|g" \
+	@${REINPLACE_CMD} -e \
+		's|\\\$$(localstatedir)/log/jabberd|${JABBER_LOGDIR}|g ; \
+		 s|\\\$$(localstatedir)/spool/jabberd|${JABBER_SPOOLDIR}| ; \
+		 s|\\\$$(localstatedir)/run/jabberd|${JABBER_RUNDIR}|g' \
 		${WRKSRC}/Makefile.in
-	@${REINPLACE_CMD} -e "s|@localstatedir@/log/jabberd|${JABBER_LOGDIR}|g" \
-		-e "s|@localstatedir@/spool/jabberd|${JABBER_SPOOLDIR}|g" \
-		-e "s|@localstatedir@/run/jabberd|${JABBER_RUNDIR}|g" \
+	@${REINPLACE_CMD} -e \
+		's|@localstatedir@/log/jabberd|${JABBER_LOGDIR}|g ; \
+		 s|@localstatedir@/spool/jabberd|${JABBER_SPOOLDIR}|g ; \
+		 s|@localstatedir@/run/jabberd|${JABBER_RUNDIR}|g' \
 		${WRKSRC}/jabber.xml.dist.in
-	@${LN} -s ${WRKSRC}/man/jabberd.8.in ${WRKSRC}/man/jabberd14.8.in
+	@${REINPLACE_CMD} -e \
+		'/<gcrypt.h>/s|^|//| ; \
+		 /gcry_control/s|^|//|' \
+		${WRKSRC}/jabberd/gcrypt_init.c
+	@${REINPLACE_CMD} -e \
+		's|locale, LOCALEDIR)|locale)|' \
+		${WRKSRC}/jabberd/lib/messages.cc
+	@${REINPLACE_CMD} -e \
+		's|"$(localedir)|"$$(DESTDIR)$(localedir)|' \
+		${WRKSRC}/po/Makefile.in
+	@${LN} -s jabberd.8.in ${WRKSRC}/man/jabberd14.8.in
 
 post-install:
-	@${TOUCH} ${PREFIX}/include/jabber/platform-settings
-	@${INSTALL_DATA} ${WRKSRC}/jabber.xml.dist ${PREFIX}/etc/jabber.xml.sample
-.if !defined(NO_INSTALL_MANPAGES)
-	@cd ${WRKSRC}/man && make install-man
-.endif
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-.for FILE in ${DOCS}
-	@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}/${FILE}
+	@${TOUCH} ${STAGEDIR}${PREFIX}/include/jabber/platform-settings
+	(cd ${WRKSRC} && ${INSTALL_DATA} jabber.xml.dist \
+		${STAGEDIR}${PREFIX}/etc/jabber.xml.sample)
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for i in AUTHORS ChangeLog INSTALL NEWS README README.SQL README.config \
+	README.filespool README.karma README.protocols TODO UPGRADE mysql.sql
+	(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
 .endfor
-.endif
-	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
diff -urN /usr/ports/net-im/jabber/files/patch-jabberd-mio_tls.cc net-im/jabber/files/patch-jabberd-mio_tls.cc
--- /usr/ports/net-im/jabber/files/patch-jabberd-mio_tls.cc	2013-11-06 21:59:13.000000000 +0900
+++ net-im/jabber/files/patch-jabberd-mio_tls.cc	2013-12-31 00:00:00.000000000 +0900
@@ -1,6 +1,14 @@
 --- jabberd/mio_tls.cc.orig	2008-03-06 10:21:01.669677189 +0100
 +++ jabberd/mio_tls.cc	2008-03-06 10:35:04.744064592 +0100
-@@ -612,7 +612,7 @@
+@@ -39,7 +39,6 @@
+ #include <set>
+ #include <string>
+ #include <sstream>
+-#include <gcrypt.h>
+ #include <vector>
+ #include <list>
+ #include <iostream>
+@@ -612,7 +611,7 @@
  	    }
  
  	    // load OpenPGP key/certificate
@@ -9,7 +17,7 @@
  	    if (ret < 0) {
  		log_error(NULL, "Error loading OpenPGP key pub=%s/priv=%s: %s", pubfile, privfile, gnutls_strerror(ret));
  		continue;
-@@ -631,7 +631,7 @@
+@@ -631,7 +630,7 @@
  	    }
  
  	    // load the OpenPGP keyring
@@ -18,7 +26,7 @@
  	    if (ret < 0) {
  		log_error(NULL, "Error loading OpenPGP keyring %s: %s", file, gnutls_strerror(ret));
  		continue;
-@@ -640,23 +640,6 @@
+@@ -640,23 +639,6 @@
  	    continue;
  	}
  
@@ -42,3 +50,90 @@
  	// setup protocols to use
  	if (j_strcmp(xmlnode_get_localname(cur), "protocols") == 0) {
  	    char const *const protocols_data = xmlnode_get_data(cur);
+@@ -916,7 +898,7 @@
+     /* load asn1 tree to be used by libtasn1 */
+     ret = asn1_array2tree(subjectAltName_asn1_tab, &mio_tls_asn1_tree, NULL);
+     if (ret != ASN1_SUCCESS) {
+-	std::cerr << "Error preparing the libtasn1 library: " << libtasn1_strerror(ret) << std::endl;
++	std::cerr << "Error preparing the libtasn1 library: " << asn1_strerror(ret) << std::endl;
+ 	return false;
+ 	/* XXX we have to delete the structure on shutdown using asn1_delete_structure(&mio_tls_asn1_tree) */
+     }
+@@ -1684,14 +1666,14 @@
+ 		    /* init subjectAltName_element */
+ 		    ret = asn1_create_element(mio_tls_asn1_tree, "PKIX1.SubjectAltName", &subjectAltName_element);
+ 		    if (ret != ASN1_SUCCESS) {
+-			log_warn(log_id.c_str(), "error creating asn1 element for PKIX1.SubjectAltName: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str());
++			log_warn(log_id.c_str(), "error creating asn1 element for PKIX1.SubjectAltName: %s (%s)", asn1_strerror(ret), cert_subject.c_str());
+ 			break;
+ 		    }
+ 
+ 		    /* decode the extension */
+ 		    ret = asn1_der_decoding(&subjectAltName_element, subjectAltName, subjectAltName_size, NULL);
+ 		    if (ret != ASN1_SUCCESS) {
+-			log_warn(log_id.c_str(), "error DER decoding subjectAltName extension: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str());
++			log_warn(log_id.c_str(), "error DER decoding subjectAltName extension: %s (%s)", asn1_strerror(ret), cert_subject.c_str());
+ 			asn1_delete_structure(&subjectAltName_element);
+ 			break;
+ 		    }
+@@ -1712,7 +1694,7 @@
+ 			    break;
+ 			}
+ 			if (ret != ASN1_SUCCESS) {
+-			    log_notice(log_id.c_str(), "error accessing type for %s in subjectAltName: %s (%s)", cnt_string, libtasn1_strerror(ret), cert_subject.c_str());
++			    log_notice(log_id.c_str(), "error accessing type for %s in subjectAltName: %s (%s)", cnt_string, asn1_strerror(ret), cert_subject.c_str());
+ 			    break;
+ 			}
+ 
+@@ -1732,7 +1714,7 @@
+ 
+ 				ret = asn1_read_value(subjectAltName_element, access_string, dNSName, &dNSName_len);
+ 				if (ret != ASN1_SUCCESS) {
+-				    log_notice(log_id.c_str(), "error accessing %s in subjectAltName: %s (%s)", access_string, libtasn1_strerror(ret), cert_subject.c_str());
++				    log_notice(log_id.c_str(), "error accessing %s in subjectAltName: %s (%s)", access_string, asn1_strerror(ret), cert_subject.c_str());
+ 				    break;
+ 				}
+ 
+@@ -1772,7 +1754,7 @@
+ 			    /* get the OID of the otherName */
+ 			    ret = asn1_read_value(subjectAltName_element, access_string_type, otherNameType, &otherNameType_len);
+ 			    if (ret != ASN1_SUCCESS) {
+-				log_notice(log_id.c_str(), "error accessing type information %s in subjectAltName: %s (%s)", access_string_type, libtasn1_strerror(ret), cert_subject.c_str());
++				log_notice(log_id.c_str(), "error accessing type information %s in subjectAltName: %s (%s)", access_string_type, asn1_strerror(ret), cert_subject.c_str());
+ 				break;
+ 			    }
+ 
+@@ -1785,7 +1767,7 @@
+ 			    /* get the value of the otherName */
+ 			    ret = asn1_read_value(subjectAltName_element, access_string_value, otherNameValue, &otherNameValue_len);
+ 			    if (ret != ASN1_SUCCESS) {
+-				log_notice(log_id.c_str(), "error accessing value of othername %s in subjectAltName: %s (%s)", access_string_value, libtasn1_strerror(ret), cert_subject.c_str());
++				log_notice(log_id.c_str(), "error accessing value of othername %s in subjectAltName: %s (%s)", access_string_value, asn1_strerror(ret), cert_subject.c_str());
+ 				break;
+ 			    }
+ 
+@@ -1799,21 +1781,21 @@
+ 
+ 				ret = asn1_create_element(mio_tls_asn1_tree, "PKIX1.DirectoryString", &directoryString_element);
+ 				if (ret != ASN1_SUCCESS) {
+-				    log_notice(log_id.c_str(), "error creating DirectoryString element: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str());
++				    log_notice(log_id.c_str(), "error creating DirectoryString element: %s (%s)", asn1_strerror(ret), cert_subject.c_str());
+ 				    asn1_delete_structure(&directoryString_element);
+ 				    break;
+ 				}
+ 
+ 				ret = asn1_der_decoding(&directoryString_element, otherNameValue, otherNameValue_len, NULL);
+ 				if (ret != ASN1_SUCCESS) {
+-				    log_notice(log_id.c_str(), "error decoding DirectoryString: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str());
++				    log_notice(log_id.c_str(), "error decoding DirectoryString: %s (%s)", asn1_strerror(ret), cert_subject.c_str());
+ 				    asn1_delete_structure(&directoryString_element);
+ 				    break;
+ 				}
+ 
+ 				ret = asn1_read_value(directoryString_element, "utf8String", thisIdOnXMPPaddr, &thisIdOnXMPPaddr_len);
+ 				if (ret != ASN1_SUCCESS) {
+-				    log_notice(log_id.c_str(), "error accessing utf8String of DirectoryString: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str());
++				    log_notice(log_id.c_str(), "error accessing utf8String of DirectoryString: %s (%s)", asn1_strerror(ret), cert_subject.c_str());
+ 				    asn1_delete_structure(&directoryString_element);
+ 				    break;
+ 				}
diff -urN /usr/ports/net-im/jabber/files/patch-man-Makefile.in net-im/jabber/files/patch-man-Makefile.in
--- /usr/ports/net-im/jabber/files/patch-man-Makefile.in	2013-11-06 21:59:12.000000000 +0900
+++ net-im/jabber/files/patch-man-Makefile.in	2013-12-31 00:00:00.000000000 +0900
@@ -11,12 +11,3 @@
  edit = sed \
  	-e 's,\@sysconfdir\@,$(sysconfdir),g' \
  	-e 's,\@VERSION\@,$(VERSION),g'
-@@ -387,7 +387,7 @@
- 
- info-am:
- 
--install-data-am: install-man
-+install-data-am:
- 
- install-exec-am:
- 
diff -urN /usr/ports/net-im/jabber/pkg-plist net-im/jabber/pkg-plist
--- /usr/ports/net-im/jabber/pkg-plist	2013-11-06 21:59:13.000000000 +0900
+++ net-im/jabber/pkg-plist	2013-12-31 00:00:00.000000000 +0900
@@ -32,6 +32,8 @@
 lib/jabber/libjabberdxdbsql.la
 lib/jabber/libjabberdxdbsql.so
 lib/jabber/libjabberdxdbsql.so.2
+man/man5/jabber.xml.5.gz
+man/man8/jabberd14.8.gz
 share/locale/de/LC_MESSAGES/jabberd14.mo
 share/locale/fr/LC_MESSAGES/jabberd14.mo
 share/locale/hu/LC_MESSAGES/jabberd14.mo
>Release-Note:
>Audit-Trail:
>Unformatted:



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