diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile index d71d04c9cd14..4c737118242f 100644 --- a/textproc/libxml2/Makefile +++ b/textproc/libxml2/Makefile @@ -1,85 +1,65 @@ # Created by: Yukihiro Nakai # $FreeBSD$ # $MCom: ports/textproc/libxml2/Makefile,v 1.15 2012/11/26 19:55:23 kwm Exp $ PORTNAME= libxml2 PORTVERSION= 2.8.0 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES?= textproc gnome MASTER_SITES= ftp://xmlsoft.org/libxml2/ \ http://xmlsoft.org/sources/ \ ftp://gd.tuwien.ac.at/pub/libxml/ DIST_SUBDIR= gnome2 MAINTAINER?= gnome@FreeBSD.org COMMENT?= XML parser library for GNOME .if !defined(REFERENCE_PORT) - USE_CSTD= gnu89 GNU_CONFIGURE= yes USES= pathfix gmake iconv pkgconfig USE_LDCONFIG= yes CONFIGURE_ARGS?=--with-iconv=${ICONV_PREFIX} \ --with-html-dir=${PREFIX}/share/doc \ --with-html-subdir=${PORTNAME} \ --with-lzma=/usr \ --without-python .if !defined(MASTERDIR) -MAN1= xml2-config.1 xmllint.1 xmlcatalog.1 -MAN3= libxml.3 - OPTIONS_DEFINE= SCHEMA THREADS MEM_DEBUG XMLLINT_HIST THREAD_ALLOC OPTIONS_DEFAULT=SCHEMA THREADS + SCHEMA_DESC= XML schema support +SCHEMA_CONFIGURE_WITH= schemas THREADS_DESC= Threads support +THREADS_CONFIGURE_WITH= threads MEM_DEBUG_DESC= Memory debugging (DEVELOPERS ONLY!) +MEM_DEBUG_CONFIGURE_WITH= mem-debug XMLLINT_HIST_DESC= History for xmllint +XMLLINT_HIST_CONFIGURE_WITH= history THREAD_ALLOC_DESC= Per-thread memory (DEVELOPERS ONLY!) - -NO_STAGE= yes -.include - -.if ! ${PORT_OPTIONS:MSCHEMA} -CONFIGURE_ARGS+= --without-schemas -.endif - -.if ! ${PORT_OPTIONS:MTHREADS} -CONFIGURE_ARGS+= --without-threads -.endif - -.if ${PORT_OPTIONS:MMEM_DEBUG} -CONFIGURE_ARGS+= --with-mem-debug -.endif - -.if ${PORT_OPTIONS:MXMLLINT_HIST} -CONFIGURE_ARGS+= --with-history -.endif - -.if ${PORT_OPTIONS:MTHREAD_ALLOC} -CONFIGURE_ARGS+= --with-thread-alloc -.endif +THREAD_ALLOC_CONFIGURE_WITH= thread-alloc .endif # !defined(MASTERDIR) post-patch: .for d in . doc doc/devhelp doc/examples @${REINPLACE_CMD} -e '/^install-data-am:/ s|install-data-local||' \ - ${WRKSRC}/${d}/Makefile.in + ${WRKSRC}/${d}/Makefile.in .endfor .for f in catalog.c xmlcatalog.c xmllint.c doc/xmllint.1 @${REINPLACE_CMD} -e \ - 's|/etc/xml/catalog|${LOCALBASE}/share/xml/catalog|g; \ - s|/etc/sgml/catalog|${LOCALBASE}/share/sgml/catalog|g' ${WRKSRC}/${f} + 's|/etc/xml/catalog|${LOCALBASE}/share/xml/catalog|g; \ + s|/etc/sgml/catalog|${LOCALBASE}/share/sgml/catalog|g' \ + ${WRKSRC}/${f} .endfor # manual patch because WITH_FBSD10_FIX break the python bindings ${FIND} ${WRKSRC} -type f -name configure \ -exec ${SH} -c " \ mtime=\$$(date -r \$$(stat -f '%m' \$$0) '+%Y%m%d%H%M.%S'); \ ${SED} -i '.batman' -e 's|freebsd1\*)|freebsd1.\*)|g' \ -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \$$0; \ touch -mt \$$mtime \$$0" {} \; || /usr/bin/true .include .endif diff --git a/textproc/libxml2/files/patch-encoding.c b/textproc/libxml2/files/patch-encoding.c new file mode 100644 index 000000000000..c044357a2d27 --- /dev/null +++ b/textproc/libxml2/files/patch-encoding.c @@ -0,0 +1,21 @@ +--- encoding.c.orig 2012-05-08 22:55:13.000000000 +0900 ++++ encoding.c 2013-11-22 04:59:54.000000000 +0900 +@@ -1789,13 +1789,18 @@ + const char *icv_in = (const char *) in; + char *icv_out = (char *) out; + int ret; ++ int one; + ++ one = 1; + if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (in == NULL)) { + if (outlen != NULL) *outlen = 0; + return(-1); + } + icv_inlen = *inlen; + icv_outlen = *outlen; ++#ifdef ICONV_SET_ILSEQ_INVALID ++ iconvctl(cd, ICONV_SET_ILSEQ_INVALID, &one); ++#endif + ret = iconv(cd, (ICONV_CONST char **) &icv_in, &icv_inlen, &icv_out, &icv_outlen); + *inlen -= icv_inlen; + *outlen -= icv_outlen; diff --git a/textproc/libxml2/pkg-plist b/textproc/libxml2/pkg-plist index c1e7fae18fcc..2d2d90bd6965 100644 --- a/textproc/libxml2/pkg-plist +++ b/textproc/libxml2/pkg-plist @@ -1,59 +1,63 @@ bin/xml2-config bin/xmlcatalog bin/xmllint etc/xml2Conf.sh include/libxml2/libxml/DOCBparser.h include/libxml2/libxml/HTMLparser.h include/libxml2/libxml/HTMLtree.h include/libxml2/libxml/SAX.h include/libxml2/libxml/SAX2.h include/libxml2/libxml/c14n.h include/libxml2/libxml/catalog.h include/libxml2/libxml/chvalid.h include/libxml2/libxml/debugXML.h include/libxml2/libxml/dict.h include/libxml2/libxml/encoding.h include/libxml2/libxml/entities.h include/libxml2/libxml/globals.h include/libxml2/libxml/hash.h include/libxml2/libxml/list.h include/libxml2/libxml/nanoftp.h include/libxml2/libxml/nanohttp.h include/libxml2/libxml/parser.h include/libxml2/libxml/parserInternals.h include/libxml2/libxml/pattern.h include/libxml2/libxml/relaxng.h include/libxml2/libxml/schemasInternals.h include/libxml2/libxml/schematron.h include/libxml2/libxml/threads.h include/libxml2/libxml/tree.h include/libxml2/libxml/uri.h include/libxml2/libxml/valid.h include/libxml2/libxml/xinclude.h include/libxml2/libxml/xlink.h include/libxml2/libxml/xmlIO.h include/libxml2/libxml/xmlautomata.h include/libxml2/libxml/xmlerror.h include/libxml2/libxml/xmlexports.h include/libxml2/libxml/xmlmemory.h include/libxml2/libxml/xmlmodule.h include/libxml2/libxml/xmlreader.h include/libxml2/libxml/xmlregexp.h include/libxml2/libxml/xmlsave.h include/libxml2/libxml/xmlschemas.h include/libxml2/libxml/xmlschemastypes.h include/libxml2/libxml/xmlstring.h include/libxml2/libxml/xmlunicode.h include/libxml2/libxml/xmlversion.h include/libxml2/libxml/xmlwriter.h include/libxml2/libxml/xpath.h include/libxml2/libxml/xpathInternals.h include/libxml2/libxml/xpointer.h lib/libxml2.a lib/libxml2.la lib/libxml2.so lib/libxml2.so.5 libdata/pkgconfig/libxml-2.0.pc share/aclocal/libxml.m4 +man/man1/xml2-config.1.gz +man/man1/xmlcatalog.1.gz +man/man1/xmllint.1.gz +man/man3/libxml.3.gz @dirrm include/libxml2/libxml @dirrm include/libxml2