ports/162571: textproc/libmxml2: provide a way to disable iconv

Pedro Giffuni giffunip at tutopia.com
Tue Nov 15 03:40:03 UTC 2011


>Number:         162571
>Category:       ports
>Synopsis:       textproc/libmxml2: provide a way to disable iconv
>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:   Tue Nov 15 03:40:02 UTC 2011
>Closed-Date:
>Last-Modified:
>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 at 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 at FreeBSD.org
+MAINTAINER=	gnome at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list