diff options
-rw-r--r-- | textproc/libxml2/Makefile | 28 | ||||
-rw-r--r-- | textproc/libxml2/distinfo | 4 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-Makefile.in | 62 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-configure | 20 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-doc_devhelp_Makefile.in | 11 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-include_libxml_parser.h | 10 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-parser.c | 343 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-parserInternals.c | 11 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-python_Makefile.in | 36 | ||||
-rw-r--r-- | textproc/libxml2/pkg-plist | 8 | ||||
-rw-r--r-- | textproc/py-libxml2/Makefile | 10 | ||||
-rw-r--r-- | textproc/py-libxml2/pkg-plist | 55 |
12 files changed, 55 insertions, 543 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile index 725f8f24f..55129c8a7 100644 --- a/textproc/libxml2/Makefile +++ b/textproc/libxml2/Makefile @@ -1,10 +1,10 @@ # Created by: Yukihiro Nakai <Nakai@technologist.com> # $FreeBSD$ -# $MCom: ports/trunk/textproc/libxml2/Makefile 18610 2013-06-30 16:33:05Z marcus $ +# $MCom$ PORTNAME= libxml2 -PORTVERSION= 2.8.0 -PORTREVISION?= 2 +PORTVERSION= 2.9.1 +PORTREVISION?= 0 CATEGORIES?= textproc gnome MASTER_SITES= ftp://xmlsoft.org/libxml2/ \ http://xmlsoft.org/sources/ \ @@ -14,22 +14,20 @@ DIST_SUBDIR= gnome2 MAINTAINER?= gnome@FreeBSD.org COMMENT?= XML parser library for GNOME -NO_STAGE= yes - .if !defined(REFERENCE_PORT) GNU_CONFIGURE= yes -USES= gmake iconv pathfix pkgconfig +USES= gmake iconv pathfix pkgconfig shebangfix +USE_GNOME+= ltverhack USE_LDCONFIG= yes -CONFIGURE_ARGS?=--with-iconv=${LOCALBASE} \ +CONFIGURE_ARGS?=--with-iconv=${ICONVBASE} \ --with-html-dir=${PREFIX}/share/doc \ --with-html-subdir=${PORTNAME} \ --with-lzma=/usr \ --without-python +SHEBANG_FILES= *.py */*.py */*/*.py .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 @@ -72,13 +70,11 @@ post-patch: '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 + +.if !defined(MASTERDIR) +post-install: + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libxml2.so.2 +.endif .include <bsd.port.mk> diff --git a/textproc/libxml2/distinfo b/textproc/libxml2/distinfo index 19079f765..608b41ab7 100644 --- a/textproc/libxml2/distinfo +++ b/textproc/libxml2/distinfo @@ -1,2 +1,2 @@ -SHA256 (gnome2/libxml2-2.8.0.tar.gz) = f2e2d0e322685193d1affec83b21dc05d599e17a7306d7b90de95bb5b9ac622a -SIZE (gnome2/libxml2-2.8.0.tar.gz) = 4915203 +SHA256 (gnome2/libxml2-2.9.1.tar.gz) = fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb +SIZE (gnome2/libxml2-2.9.1.tar.gz) = 5172503 diff --git a/textproc/libxml2/files/patch-Makefile.in b/textproc/libxml2/files/patch-Makefile.in index df4c9761d..f1d4208f6 100644 --- a/textproc/libxml2/files/patch-Makefile.in +++ b/textproc/libxml2/files/patch-Makefile.in @@ -1,69 +1,29 @@ - $FreeBSD$ - ---- Makefile.in.orig 2012-08-16 19:38:10.000000000 +0200 -+++ Makefile.in 2012-08-16 19:39:09.000000000 +0200 -@@ -586,7 +586,7 @@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - ACLOCAL_AMFLAGS = -I m4 --SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@ -+SUBDIRS = include . doc example xstc @WITH_PYTHON_TRUE@ @PYTHON_SUBDIR@ - DIST_SUBDIRS = include . doc example python xstc - INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ @LZMA_CFLAGS@ - bin_SCRIPTS = xml2-config -@@ -596,7 +596,7 @@ - @USE_VERSION_SCRIPT_TRUE@LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms - libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \ - $(LIBXML2_VERSION_SCRIPT) \ -- -version-info @LIBXML_VERSION_INFO@ \ -+ -version-info 5:0:0 \ - @MODULE_PLATFORM_LIBS@ - - @WITH_TRIO_SOURCES_FALSE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ -@@ -712,7 +712,7 @@ - runxmlconf_DEPENDENCIES = $(DEPS) - runxmlconf_LDADD = $(LDADDS) - CLEANFILES = xml2Conf.sh *.gcda *.gcno --confexecdir = $(libdir) -+confexecdir = $(sysconfdir) - confexec_DATA = xml2Conf.sh - CVS_EXTRA_DIST = - EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ -@@ -735,8 +735,8 @@ - # Install the tests program sources as examples - # - BASE_DIR = $(datadir)/doc --DOC_MODULE = libxml2-$(VERSION) --EXAMPLES_DIR = $(BASE_DIR)/$(DOC_MODULE)/examples -+DOC_MODULE = libxml2 -+EXAMPLES_DIR = $(datadir)/examples/libxml2 - - # - # Coverage support, largely borrowed from libvirt -@@ -1094,7 +1094,7 @@ - @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +--- Makefile.in.orig 2013-11-24 09:26:25.000000000 +0100 ++++ Makefile.in 2013-11-24 09:26:37.000000000 +0100 +@@ -1130,7 +1130,7 @@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -fPIC -DPIC -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo - @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@@ -1574,7 +1574,7 @@ - exit 1; } >&2 + @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@@ -1635,7 +1635,7 @@ check-am: all-am - check: check-recursive + check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ +all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \ config.h install-binPROGRAMS: install-libLTLIBRARIES -@@ -1634,7 +1634,7 @@ +@@ -1703,7 +1703,7 @@ info-am: -install-data-am: install-data-local install-m4dataDATA install-man \ -+install-data-am: install-m4dataDATA install-man \ ++install-data-am: install-m4dataDATA install-man \ install-pkgconfigDATA install-dvi: install-dvi-recursive diff --git a/textproc/libxml2/files/patch-configure b/textproc/libxml2/files/patch-configure index e930a1da7..4105c2da4 100644 --- a/textproc/libxml2/files/patch-configure +++ b/textproc/libxml2/files/patch-configure @@ -1,20 +1,6 @@ ---- configure.orig 2012-08-04 11:48:19.000000000 +0200 -+++ configure 2012-08-04 11:50:50.000000000 +0200 -@@ -14228,11 +14228,12 @@ fi - fi - if test "$PYTHON_VERSION" != "" - then -+ with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` - if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ - -d $with_python/lib/python$PYTHON_VERSION/site-packages - then - PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION -- PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages -+ PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages - else - if test -r $prefix/include/python$PYTHON_VERSION/Python.h - then -@@ -14635,6 +14636,8 @@ fi +--- configure.orig 2013-11-24 09:41:13.000000000 +0100 ++++ configure 2013-11-24 09:41:55.000000000 +0100 +@@ -14499,6 +14499,8 @@ fi fi ;; diff --git a/textproc/libxml2/files/patch-doc_devhelp_Makefile.in b/textproc/libxml2/files/patch-doc_devhelp_Makefile.in deleted file mode 100644 index d7581357d..000000000 --- a/textproc/libxml2/files/patch-doc_devhelp_Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- doc/devhelp/Makefile.in.orig 2008-01-22 15:49:34.000000000 -0500 -+++ doc/devhelp/Makefile.in 2008-01-22 15:49:58.000000000 -0500 -@@ -259,7 +259,7 @@ sysconfdir = @sysconfdir@ - target_alias = @target_alias@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --DEVHELP_DIR = $(datadir)/gtk-doc/html/libxml2 -+DEVHELP_DIR = $(datadir)/doc/libxml2/html - HTML_FILES = index.html general.html $(HTML_MODULES) - HTML_MODULES = \ - libxml2-c14n.html \ diff --git a/textproc/libxml2/files/patch-include_libxml_parser.h b/textproc/libxml2/files/patch-include_libxml_parser.h deleted file mode 100644 index 03632be45..000000000 --- a/textproc/libxml2/files/patch-include_libxml_parser.h +++ /dev/null @@ -1,10 +0,0 @@ ---- include/libxml/parser.h.orig 2012-05-15 03:09:43.000000000 +0000 -+++ include/libxml/parser.h 2013-03-13 09:42:57.000000000 +0000 -@@ -310,6 +310,7 @@ - xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */ - - int input_id; /* we need to label inputs */ -+ unsigned long sizeentcopy; /* volume of entity copy */ - }; - - /** diff --git a/textproc/libxml2/files/patch-parser.c b/textproc/libxml2/files/patch-parser.c deleted file mode 100644 index 1316d921d..000000000 --- a/textproc/libxml2/files/patch-parser.c +++ /dev/null @@ -1,343 +0,0 @@ - ---- parser.c.orig 2013-03-13 09:36:07.000000000 +0000 -+++ parser.c 2013-03-13 09:35:54.000000000 +0000 -@@ -40,6 +40,7 @@ - #endif - - #include <stdlib.h> -+#include <limits.h> - #include <string.h> - #include <stdarg.h> - #include <libxml/xmlmemory.h> -@@ -117,16 +118,33 @@ - * parser option. - */ - static int --xmlParserEntityCheck(xmlParserCtxtPtr ctxt, unsigned long size, -- xmlEntityPtr ent) -+xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size, -+ xmlEntityPtr ent, size_t replacement) - { -- unsigned long consumed = 0; -+ size_t consumed = 0; - - if ((ctxt == NULL) || (ctxt->options & XML_PARSE_HUGE)) - return (0); - if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP) - return (1); -- if (size != 0) { -+ if (replacement != 0) { -+ if (replacement < XML_MAX_TEXT_LENGTH) -+ return(0); -+ -+ /* -+ * If the volume of entity copy reaches 10 times the -+ * amount of parsed data and over the large text threshold -+ * then that's very likely to be an abuse. -+ */ -+ if (ctxt->input != NULL) { -+ consumed = ctxt->input->consumed + -+ (ctxt->input->cur - ctxt->input->base); -+ } -+ consumed += ctxt->sizeentities; -+ -+ if (replacement < XML_PARSER_NON_LINEAR * consumed) -+ return(0); -+ } else if (size != 0) { - /* - * Do the check based on the replacement size of the entity - */ -@@ -172,7 +190,6 @@ - */ - return (0); - } -- - xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL); - return (1); - } -@@ -2589,15 +2606,17 @@ - - /* - * Macro used to grow the current buffer. -+ * buffer##_size is expected to be a size_t -+ * mem_error: is expected to handle memory allocation failures - */ - #define growBuffer(buffer, n) { \ - xmlChar *tmp; \ -- buffer##_size *= 2; \ -- buffer##_size += n; \ -- tmp = (xmlChar *) \ -- xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \ -+ size_t new_size = buffer##_size * 2 + n; \ -+ if (new_size < buffer##_size) goto mem_error; \ -+ tmp = (xmlChar *) xmlRealloc(buffer, new_size); \ - if (tmp == NULL) goto mem_error; \ - buffer = tmp; \ -+ buffer##_size = new_size; \ - } - - /** -@@ -2623,14 +2642,14 @@ - xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, - int what, xmlChar end, xmlChar end2, xmlChar end3) { - xmlChar *buffer = NULL; -- int buffer_size = 0; -+ size_t buffer_size = 0; -+ size_t nbchars = 0; - - xmlChar *current = NULL; - xmlChar *rep = NULL; - const xmlChar *last; - xmlEntityPtr ent; - int c,l; -- int nbchars = 0; - - if ((ctxt == NULL) || (str == NULL) || (len < 0)) - return(NULL); -@@ -2647,7 +2666,7 @@ - * allocate a translation buffer. - */ - buffer_size = XML_PARSER_BIG_BUFFER_SIZE; -- buffer = (xmlChar *) xmlMallocAtomic(buffer_size * sizeof(xmlChar)); -+ buffer = (xmlChar *) xmlMallocAtomic(buffer_size); - if (buffer == NULL) goto mem_error; - - /* -@@ -2667,7 +2686,7 @@ - if (val != 0) { - COPY_BUF(0,buffer,nbchars,val); - } -- if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { -+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) { - growBuffer(buffer, XML_PARSER_BUFFER_SIZE); - } - } else if ((c == '&') && (what & XML_SUBSTITUTE_REF)) { -@@ -2685,7 +2704,7 @@ - (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { - if (ent->content != NULL) { - COPY_BUF(0,buffer,nbchars,ent->content[0]); -- if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { -+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) { - growBuffer(buffer, XML_PARSER_BUFFER_SIZE); - } - } else { -@@ -2702,9 +2721,8 @@ - current = rep; - while (*current != 0) { /* non input consuming loop */ - buffer[nbchars++] = *current++; -- if (nbchars > -- buffer_size - XML_PARSER_BUFFER_SIZE) { -- if (xmlParserEntityCheck(ctxt, nbchars, ent)) -+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) { -+ if (xmlParserEntityCheck(ctxt, nbchars, ent, 0)) - goto int_error; - growBuffer(buffer, XML_PARSER_BUFFER_SIZE); - } -@@ -2717,7 +2735,7 @@ - const xmlChar *cur = ent->name; - - buffer[nbchars++] = '&'; -- if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) { -+ if (nbchars + i + XML_PARSER_BUFFER_SIZE > buffer_size) { - growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE); - } - for (;i > 0;i--) -@@ -2745,9 +2763,8 @@ - current = rep; - while (*current != 0) { /* non input consuming loop */ - buffer[nbchars++] = *current++; -- if (nbchars > -- buffer_size - XML_PARSER_BUFFER_SIZE) { -- if (xmlParserEntityCheck(ctxt, nbchars, ent)) -+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) { -+ if (xmlParserEntityCheck(ctxt, nbchars, ent, 0)) - goto int_error; - growBuffer(buffer, XML_PARSER_BUFFER_SIZE); - } -@@ -2759,8 +2776,8 @@ - } else { - COPY_BUF(l,buffer,nbchars,c); - str += l; -- if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { -- growBuffer(buffer, XML_PARSER_BUFFER_SIZE); -+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) { -+ growBuffer(buffer, XML_PARSER_BUFFER_SIZE); - } - } - if (str < last) -@@ -3764,8 +3781,8 @@ - xmlChar limit = 0; - xmlChar *buf = NULL; - xmlChar *rep = NULL; -- int len = 0; -- int buf_size = 0; -+ size_t len = 0; -+ size_t buf_size = 0; - int c, l, in_space = 0; - xmlChar *current = NULL; - xmlEntityPtr ent; -@@ -3787,7 +3804,7 @@ - * allocate a translation buffer. - */ - buf_size = XML_PARSER_BUFFER_SIZE; -- buf = (xmlChar *) xmlMallocAtomic(buf_size * sizeof(xmlChar)); -+ buf = (xmlChar *) xmlMallocAtomic(buf_size); - if (buf == NULL) goto mem_error; - - /* -@@ -3804,7 +3821,7 @@ - - if (val == '&') { - if (ctxt->replaceEntities) { -- if (len > buf_size - 10) { -+ if (len + 10 > buf_size) { - growBuffer(buf, 10); - } - buf[len++] = '&'; -@@ -3813,7 +3830,7 @@ - * The reparsing will be done in xmlStringGetNodeList() - * called by the attribute() function in SAX.c - */ -- if (len > buf_size - 10) { -+ if (len + 10 > buf_size) { - growBuffer(buf, 10); - } - buf[len++] = '&'; -@@ -3823,7 +3840,7 @@ - buf[len++] = ';'; - } - } else if (val != 0) { -- if (len > buf_size - 10) { -+ if (len + 10 > buf_size) { - growBuffer(buf, 10); - } - len += xmlCopyChar(0, &buf[len], val); -@@ -3835,7 +3852,7 @@ - ctxt->nbentities += ent->owner; - if ((ent != NULL) && - (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { -- if (len > buf_size - 10) { -+ if (len + 10 > buf_size) { - growBuffer(buf, 10); - } - if ((ctxt->replaceEntities == 0) && -@@ -3863,7 +3880,7 @@ - current++; - } else - buf[len++] = *current++; -- if (len > buf_size - 10) { -+ if (len + 10 > buf_size) { - growBuffer(buf, 10); - } - } -@@ -3871,7 +3888,7 @@ - rep = NULL; - } - } else { -- if (len > buf_size - 10) { -+ if (len + 10 > buf_size) { - growBuffer(buf, 10); - } - if (ent->content != NULL) -@@ -3899,7 +3916,7 @@ - * Just output the reference - */ - buf[len++] = '&'; -- while (len > buf_size - i - 10) { -+ while (len + i + 10 > buf_size) { - growBuffer(buf, i + 10); - } - for (;i > 0;i--) -@@ -3912,7 +3929,7 @@ - if ((len != 0) || (!normalize)) { - if ((!normalize) || (!in_space)) { - COPY_BUF(l,buf,len,0x20); -- while (len > buf_size - 10) { -+ while (len + 10 > buf_size) { - growBuffer(buf, 10); - } - } -@@ -3921,7 +3938,7 @@ - } else { - in_space = 0; - COPY_BUF(l,buf,len,c); -- if (len > buf_size - 10) { -+ if (len + 10 > buf_size) { - growBuffer(buf, 10); - } - } -@@ -3931,7 +3948,7 @@ - c = CUR_CHAR(l); - } - if ((in_space) && (normalize)) { -- while (buf[len - 1] == 0x20) len--; -+ while ((len > 0) && (buf[len - 1] == 0x20)) len--; - } - buf[len] = 0; - if (RAW == '<') { -@@ -3946,7 +3963,18 @@ - } - } else - NEXT; -- if (attlen != NULL) *attlen = len; -+ -+ /* -+ * There we potentially risk an overflow, don't allow attribute value of -+ * lenght more than INT_MAX it is a very reasonnable assumption ! -+ */ -+ if (len >= INT_MAX) { -+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED, -+ "AttValue lenght too long\n"); -+ goto mem_error; -+ } -+ -+ if (attlen != NULL) *attlen = (int) len; - return(buf); - - mem_error: -@@ -6964,7 +6992,7 @@ - xmlFreeNodeList(list); - return; - } -- if (xmlParserEntityCheck(ctxt, 0, ent)) { -+ if (xmlParserEntityCheck(ctxt, 0, ent, 0)) { - xmlFreeNodeList(list); - return; - } -@@ -7124,6 +7152,13 @@ - xmlNodePtr nw = NULL, cur, firstChild = NULL; - - /* -+ * We are copying here, make sure there is no abuse -+ */ -+ ctxt->sizeentcopy += ent->length; -+ if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy)) -+ return; -+ -+ /* - * when operating on a reader, the entities definitions - * are always owning the entities subtree. - if (ctxt->parseMode == XML_PARSE_READER) -@@ -7163,6 +7198,14 @@ - } else if (list == NULL) { - xmlNodePtr nw = NULL, cur, next, last, - firstChild = NULL; -+ -+ /* -+ * We are copying here, make sure there is no abuse -+ */ -+ ctxt->sizeentcopy += ent->length; -+ if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy)) -+ return; -+ - /* - * Copy the entity child list and make it the new - * entity child list. The goal is to make sure any -@@ -14343,6 +14386,7 @@ - ctxt->catalogs = NULL; - ctxt->nbentities = 0; - ctxt->sizeentities = 0; -+ ctxt->sizeentcopy = 0; - xmlInitNodeInfoSeq(&ctxt->node_seq); - - if (ctxt->attsDefault != NULL) { diff --git a/textproc/libxml2/files/patch-parserInternals.c b/textproc/libxml2/files/patch-parserInternals.c deleted file mode 100644 index ac0123de0..000000000 --- a/textproc/libxml2/files/patch-parserInternals.c +++ /dev/null @@ -1,11 +0,0 @@ ---- parserInternals.c.orig 2012-05-15 03:16:38.000000000 +0000 -+++ parserInternals.c 2013-03-13 09:35:54.000000000 +0000 -@@ -1761,6 +1761,8 @@ - ctxt->charset = XML_CHAR_ENCODING_UTF8; - ctxt->catalogs = NULL; - ctxt->nbentities = 0; -+ ctxt->sizeentities = 0; -+ ctxt->sizeentcopy = 0; - ctxt->input_id = 1; - xmlInitNodeInfoSeq(&ctxt->node_seq); - return(0); diff --git a/textproc/libxml2/files/patch-python_Makefile.in b/textproc/libxml2/files/patch-python_Makefile.in index 564271951..6477ed688 100644 --- a/textproc/libxml2/files/patch-python_Makefile.in +++ b/textproc/libxml2/files/patch-python_Makefile.in @@ -1,26 +1,20 @@ ---- python/Makefile.in.orig 2012-08-04 12:00:53.000000000 +0200 -+++ python/Makefile.in 2012-08-04 12:02:59.000000000 +0200 -@@ -395,7 +395,7 @@ - -I$(top_builddir)/include \ - -I$(top_builddir)/$(subdir) +--- python/Makefile.in.orig 2013-11-24 08:47:04.000000000 +0100 ++++ python/Makefile.in 2013-11-24 08:51:02.000000000 +0100 +@@ -415,7 +415,7 @@ --docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) -+docsdir = $(datadir)/doc/py-libxml2 - # libxml2class.txt is generated + # Makefile for libxml2 python library + AUTOMAKE_OPTIONS = 1.4 foreign +-SUBDIRS = . tests ++SUBDIRS = . + docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) dist_docs_DATA = TODO EXTRA_DIST = \ -@@ -408,12 +408,12 @@ - - libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version - @WITH_PYTHON_TRUE@mylibs = \ --@WITH_PYTHON_TRUE@ $(top_builddir)/libxml2.la -+@WITH_PYTHON_TRUE@ -lxml2 - +@@ -435,7 +435,7 @@ @WITH_PYTHON_TRUE@python_LTLIBRARIES = libxml2mod.la - @WITH_PYTHON_TRUE@libxml2mod_la_SOURCES = $(srcdir)/libxml.c $(srcdir)/types.c - @WITH_PYTHON_TRUE@nodist_libxml2mod_la_SOURCES = libxml2-py.c --@WITH_PYTHON_TRUE@libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ @WIN32_EXTRA_PYTHON_LIBADD@ @PYTHON_LIBS@ -lpython$(PYTHON_VERSION) -+@WITH_PYTHON_TRUE@libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ @WIN32_EXTRA_PYTHON_LIBADD@ @PYTHON_LIBS@ - @WITH_PYTHON_TRUE@python_DATA = \ - @WITH_PYTHON_TRUE@ libxml2.py + @WITH_PYTHON_TRUE@libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c + @WITH_PYTHON_TRUE@libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \ +-@WITH_PYTHON_TRUE@ $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) ++@WITH_PYTHON_TRUE@ -lxml2 $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) + @WITH_PYTHON_TRUE@BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c + @WITH_PYTHON_TRUE@dist_python_DATA = \ diff --git a/textproc/libxml2/pkg-plist b/textproc/libxml2/pkg-plist index c1e7fae18..7bad9137a 100644 --- a/textproc/libxml2/pkg-plist +++ b/textproc/libxml2/pkg-plist @@ -1,7 +1,6 @@ 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 @@ -52,8 +51,13 @@ include/libxml2/libxml/xpointer.h lib/libxml2.a lib/libxml2.la lib/libxml2.so -lib/libxml2.so.5 +lib/libxml2.so.2 +lib/xml2Conf.sh libdata/pkgconfig/libxml-2.0.pc share/aclocal/libxml.m4 +man/man1/xml2-config.1.gz +man/man1/xmllint.1.gz +man/man1/xmlcatalog.1.gz +man/man3/libxml.3.gz @dirrm include/libxml2/libxml @dirrm include/libxml2 diff --git a/textproc/py-libxml2/Makefile b/textproc/py-libxml2/Makefile index 4063e5ceb..e7be0bb30 100644 --- a/textproc/py-libxml2/Makefile +++ b/textproc/py-libxml2/Makefile @@ -1,6 +1,6 @@ # Created by: Alexander Nedotsukov <bland@FreeBSD.org> # $FreeBSD$ -# $MCom: ports/trunk/textproc/py-libxml2/Makefile 18396 2013-04-27 14:52:06Z kwm $ +# $MCom$ PORTREVISION= 0 CATEGORIES= textproc gnome python @@ -17,9 +17,12 @@ PLIST= ${.CURDIR}/pkg-plist USE_GNOME+= libxml2 USE_PYTHON= -2.7 +USE_PYDISTUTILS=yes +PYDISTUTILS_EGGINFO= libxml2_python-${PORTVERSION}-py${PYTHON_VER}.egg-info + CPPFLAGS+= `${PYTHON_VERSION}-config --cflags` LDFLAGS+= -L${LOCALBASE}/lib `${PYTHON_VERSION}-config --libs` -CONFIGURE_ARGS= --with-iconv=${LOCALBASE} \ +CONFIGURE_ARGS= --with-iconv=${ICONV_PREFIX} \ --with-html-dir=${PREFIX}/share/doc \ --with-html-subdir=${PORTNAME} \ --with-python=${PYTHON_CMD} @@ -28,7 +31,6 @@ DOCSDIR= ${PREFIX}/share/doc/py-libxml2 EXAMPLESDIR= ${PREFIX}/share/examples/py-libxml2 post-install: - @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -l ${PYTHON_SITELIBDIR} - @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py -l ${PYTHON_SITELIBDIR} + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/libxml2mod.so .include "${MASTERDIR}/Makefile" diff --git a/textproc/py-libxml2/pkg-plist b/textproc/py-libxml2/pkg-plist index bfa1da59c..9c9155aa2 100644 --- a/textproc/py-libxml2/pkg-plist +++ b/textproc/py-libxml2/pkg-plist @@ -4,59 +4,4 @@ %%PYTHON_SITELIBDIR%%/libxml2.py %%PYTHON_SITELIBDIR%%/libxml2.pyc %%PYTHON_SITELIBDIR%%/libxml2.pyo -%%PYTHON_SITELIBDIR%%/libxml2mod.a -%%PYTHON_SITELIBDIR%%/libxml2mod.la %%PYTHON_SITELIBDIR%%/libxml2mod.so -%%DOCSDIR%%/TODO -%%EXAMPLESDIR%%/attribs.py -%%EXAMPLESDIR%%/build.py -%%EXAMPLESDIR%%/compareNodes.py -%%EXAMPLESDIR%%/ctxterror.py -%%EXAMPLESDIR%%/cutnpaste.py -%%EXAMPLESDIR%%/dtdvalid.py -%%EXAMPLESDIR%%/error.py -%%EXAMPLESDIR%%/inbuf.py -%%EXAMPLESDIR%%/indexes.py -%%EXAMPLESDIR%%/invalid.xml -%%EXAMPLESDIR%%/nsdel.py -%%EXAMPLESDIR%%/outbuf.py -%%EXAMPLESDIR%%/push.py -%%EXAMPLESDIR%%/pushSAX.py -%%EXAMPLESDIR%%/pushSAXhtml.py -%%EXAMPLESDIR%%/reader.py -%%EXAMPLESDIR%%/reader2.py -%%EXAMPLESDIR%%/reader3.py -%%EXAMPLESDIR%%/reader4.py -%%EXAMPLESDIR%%/reader5.py -%%EXAMPLESDIR%%/reader6.py -%%EXAMPLESDIR%%/reader7.py -%%EXAMPLESDIR%%/reader8.py -%%EXAMPLESDIR%%/readererr.py -%%EXAMPLESDIR%%/readernext.py -%%EXAMPLESDIR%%/regexp.py -%%EXAMPLESDIR%%/relaxng.py -%%EXAMPLESDIR%%/resolver.py -%%EXAMPLESDIR%%/schema.py -%%EXAMPLESDIR%%/serialize.py -%%EXAMPLESDIR%%/sync.py -%%EXAMPLESDIR%%/test.dtd -%%EXAMPLESDIR%%/thread2.py -%%EXAMPLESDIR%%/tst.py -%%EXAMPLESDIR%%/tst.xml -%%EXAMPLESDIR%%/tstLastError.py -%%EXAMPLESDIR%%/tstURI.py -%%EXAMPLESDIR%%/tstmem.py -%%EXAMPLESDIR%%/tstxpath.py -%%EXAMPLESDIR%%/valid.xml -%%EXAMPLESDIR%%/validDTD.py -%%EXAMPLESDIR%%/validRNG.py -%%EXAMPLESDIR%%/validSchemas.py -%%EXAMPLESDIR%%/validate.py -%%EXAMPLESDIR%%/walker.py -%%EXAMPLESDIR%%/xpath.py -%%EXAMPLESDIR%%/xpathext.py -%%EXAMPLESDIR%%/xpathleak.py -%%EXAMPLESDIR%%/xpathns.py -%%EXAMPLESDIR%%/xpathret.py -@dirrm %%EXAMPLESDIR%% -@dirrm %%DOCSDIR%% |