From nobody@FreeBSD.org  Tue Nov 15 03:30:50 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 68346106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Nov 2011 03:30:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3F2A18FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Nov 2011 03:30:50 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pAF3Undt029906
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Nov 2011 03:30:49 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id pAF3UnJw029905;
	Tue, 15 Nov 2011 03:30:49 GMT
	(envelope-from nobody)
Message-Id: <201111150330.pAF3UnJw029905@red.freebsd.org>
Date: Tue, 15 Nov 2011 03:30:49 GMT
From: Pedro Giffuni <giffunip@tutopia.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: textproc/libmxml2: provide a way to disable iconv
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         162571
>Category:       ports
>Synopsis:       textproc/libxml2: provide a way to disable iconv
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 15 03:40:02 UTC 2011
>Closed-Date:    Fri Mar 16 02:27:27 UTC 2012
>Last-Modified:  Fri Mar 16 02:30:01 UTC 2012
>Originator:     Pedro Giffuni
>Release:        9.0-BETA3
>Organization:
>Environment:
FreeBSD pcbsd-8714 9.0-BETA3 FreeBSD 9.0-BETA3 #1: Tue Sep 27 13:47:21 PDT 2011     root@build9x64.pcbsd.org:/usr/obj/pcbsd-build90/fbsd-source/9.0/sys/GENERIC  amd64

>Description:
Hi:

Everytime I #include <libxml/tree.h> in C++
I get something like this:

/usr/local/include/iconv.h:114: error: 'mbstate_t' does not name a type
..

This seems to be a GNU iconv issue but linux is not having this problem.

For the time being I would like an option to disable iconv in libxml,
so I added a knob.

The default hasn't changed so there is no need to bump the port version.
Also pet portlint while here.


>How-To-Repeat:
https://issues.apache.org/ooo/show_bug.cgi?id=118574

>Fix:


Patch attached with submission follows:

diff -ruN libxml2.orig/Makefile libxml2/Makefile
--- libxml2.orig/Makefile	2011-11-14 22:02:49.000000000 -0500
+++ libxml2/Makefile	2011-11-14 22:12:56.000000000 -0500
@@ -20,7 +20,7 @@
 		ftp://xmlsoft.org/libxml2/
 DIST_SUBDIR=	gnome2
 
-MAINTAINER?=	gnome@FreeBSD.org
+MAINTAINER=	gnome@FreeBSD.org
 COMMENT?=	XML parser library for GNOME
 
 .if !defined(REFERENCE_PORT)
@@ -28,17 +28,20 @@
 USE_CSTD=	gnu89
 USE_GMAKE=	yes
 MAKE_JOBS_SAFE=	yes
-USE_ICONV=	yes
 GNU_CONFIGURE=	yes
 USE_GNOME?=	gnomehack pkgconfig
 USE_LDCONFIG=	yes
-CONFIGURE_ARGS?=--with-iconv=${LOCALBASE} \
-		--with-html-dir=${PREFIX}/share/doc \
+CONFIGURE_ARGS?=--with-html-dir=${PREFIX}/share/doc \
 		--with-html-subdir=${PORTNAME} \
 		--without-python
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
+.if !defined(WITHOUT_ICONV)
+USE_ICONV=	yes
+CONFIGURE_ARGS+=--with-iconv=${LOCALBASE}
+.endif
+
 .if !defined(MASTERDIR)
 MAN1=		xml2-config.1 xmllint.1 xmlcatalog.1
 MAN3=		libxml.3
@@ -75,6 +78,6 @@
 		 s|/etc/sgml/catalog|${LOCALBASE}/share/sgml/catalog|g' ${WRKSRC}/${f}
 .endfor
 
-.include <bsd.port.mk>
-
 .endif
+
+.include <bsd.port.mk>


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: sunpoet 
Responsible-Changed-When: Wed Nov 16 02:53:19 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162571 
State-Changed-From-To: open->closed 
State-Changed-By: mezz 
State-Changed-When: Fri Mar 16 02:27:16 UTC 2012 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162571 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/162571: commit references a PR
Date: Fri, 16 Mar 2012 02:27:17 +0000 (UTC)

 mezz        2012-03-16 02:27:04 UTC
 
   FreeBSD ports repository
 
   Modified files:
     textproc/libxml2     Makefile 
   Log:
   -Make the iconv optional.
   
   PR:             ports/162571
   Submitted by:   Pedro Giffuni <giffunip@tutopia.com>
   Feature safe:   yes
   
   Revision  Changes    Path
   1.176     +6 -3      ports/textproc/libxml2/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
