Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2012 09:47:57 +0000 (UTC)
From:      Pietro Cerutti <gahr@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r304141 - in head/textproc/xerces-c3: . files
Message-ID:  <201209120947.q8C9lv17039584@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gahr
Date: Wed Sep 12 09:47:56 2012
New Revision: 304141
URL: http://svn.freebsd.org/changeset/ports/304141

Log:
  - Add patches to address upstream the following upstream issues [1]
    * https://issues.apache.org/jira/browse/XERCESC-1994
    * https://issues.apache.org/jira/browse/XERCESC-1995
  - Bump PORTREVISION
  - While at it, add a 'test' target to run the provided test suite
  
  PR:		171537 [1]
  Submitted by:	Michael Gmelin <freebsd@grem.de>

Added:
  head/textproc/xerces-c3/files/
  head/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.cpp   (contents, props changed)
  head/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.hpp   (contents, props changed)
  head/textproc/xerces-c3/files/patch-src-xercesc-util-regx-ParserForXMLSchema.cpp   (contents, props changed)
  head/textproc/xerces-c3/files/patch-src-xercesc-util-regx-RegxParser.cpp   (contents, props changed)
  head/textproc/xerces-c3/files/patch-src-xercesc-validators-common-ContentSpecNode.cpp   (contents, props changed)
Modified:
  head/textproc/xerces-c3/Makefile   (contents, props changed)

Modified: head/textproc/xerces-c3/Makefile
==============================================================================
--- head/textproc/xerces-c3/Makefile	Wed Sep 12 09:06:06 2012	(r304140)
+++ head/textproc/xerces-c3/Makefile	Wed Sep 12 09:47:56 2012	(r304141)
@@ -7,6 +7,7 @@
 
 PORTNAME=	xerces-c3
 PORTVERSION=	3.1.1
+PORTREVISION=	1
 CATEGORIES=	textproc
 MASTER_SITES=	${MASTER_SITE_APACHE}
 MASTER_SITE_SUBDIR=	xerces/c/3/sources
@@ -30,4 +31,7 @@ MAKE_JOBS_UNSAFE=yes
 post-install:
 	${LN} -sf libxerces-c-${PORTVERSION:R}.so ${PREFIX}/lib/libxerces-c.so.${PORTVERSION:R:R}
 
+test:
+	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check
+
 .include <bsd.port.mk>

Added: head/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.cpp	Wed Sep 12 09:47:56 2012	(r304141)
@@ -0,0 +1,53 @@
+--- src/xercesc/util/XMLUTF8Transcoder.cpp.orig
++++ src/xercesc/util/XMLUTF8Transcoder.cpp
+@@ -178,7 +178,7 @@ XMLUTF8Transcoder::transcodeFrom(const  XMLByte* const          srcData
+         if((gUTFByteIndicatorTest[trailingBytes] & *srcPtr) != gUTFByteIndicator[trailingBytes]) {
+             char pos[2] = {(char)0x31, 0}; 
+             char len[2] = {(char)(trailingBytes+0x31), 0};
+-            char byte[2] = {*srcPtr,0};
++            char byte[2] = {static_cast<char>(*srcPtr),0};
+             ThrowXMLwithMemMgr3(UTFDataFormatException, XMLExcepts::UTF8_FormatError, pos, byte, len, getMemoryManager());
+         }
+ 
+@@ -246,8 +246,8 @@ XMLUTF8Transcoder::transcodeFrom(const  XMLByte* const          srcData
+                 //
+                 if (( *srcPtr == 0xE0) && ( *(srcPtr+1) < 0xA0)) 
+                 {
+-                    char byte0[2] = {*srcPtr    ,0};
+-                    char byte1[2] = {*(srcPtr+1),0};
++                    char byte0[2] = {static_cast<char>(*srcPtr)    ,0};
++                    char byte1[2] = {static_cast<char>(*(srcPtr+1)),0};
+ 
+                     ThrowXMLwithMemMgr2(UTFDataFormatException
+                                       , XMLExcepts::UTF8_Invalid_3BytesSeq
+@@ -284,8 +284,8 @@ XMLUTF8Transcoder::transcodeFrom(const  XMLByte* const          srcData
+ 
+                 if ((*srcPtr == 0xED) && (*(srcPtr+1) >= 0xA0))
+                 {
+-                    char byte0[2] = {*srcPtr,    0};
+-                    char byte1[2] = {*(srcPtr+1),0};
++                    char byte0[2] = {static_cast<char>(*srcPtr),    0};
++                    char byte1[2] = {static_cast<char>(*(srcPtr+1)),0};
+ 
+                      ThrowXMLwithMemMgr2(UTFDataFormatException
+                               , XMLExcepts::UTF8_Irregular_3BytesSeq
+@@ -310,8 +310,8 @@ XMLUTF8Transcoder::transcodeFrom(const  XMLByte* const          srcData
+                 if (((*srcPtr == 0xF0) && (*(srcPtr+1) < 0x90)) ||
+                     ((*srcPtr == 0xF4) && (*(srcPtr+1) > 0x8F))  )
+                 {
+-                    char byte0[2] = {*srcPtr    ,0};
+-                    char byte1[2] = {*(srcPtr+1),0};
++                    char byte0[2] = {static_cast<char>(*srcPtr)    ,0};
++                    char byte1[2] = {static_cast<char>(*(srcPtr+1)),0};
+ 
+                     ThrowXMLwithMemMgr2(UTFDataFormatException
+                                       , XMLExcepts::UTF8_Invalid_4BytesSeq
+@@ -344,7 +344,7 @@ XMLUTF8Transcoder::transcodeFrom(const  XMLByte* const          srcData
+                  * surrogates, nor U+FFFE and U+FFFF (but it does allow other noncharacters).
+                  ***/
+                 char len[2]  = {(char)(trailingBytes+0x31), 0};
+-                char byte[2] = {*srcPtr,0};
++                char byte[2] = {static_cast<char>(*srcPtr),0};
+ 
+                 ThrowXMLwithMemMgr2(UTFDataFormatException
+                                   , XMLExcepts::UTF8_Exceeds_BytesLimit

Added: head/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.hpp	Wed Sep 12 09:47:56 2012	(r304141)
@@ -0,0 +1,11 @@
+--- src/xercesc/util/XMLUTF8Transcoder.hpp.orig
++++ src/xercesc/util/XMLUTF8Transcoder.hpp
+@@ -107,7 +107,7 @@ void XMLUTF8Transcoder::checkTrailingBytes(const XMLByte      toCheck
+     {
+         char len[2]  = {(char)(trailingBytes+0x31), 0};
+         char pos[2]  = {(char)(position+0x31), 0};
+-        char byte[2] = {toCheck,0};
++        char byte[2] = {static_cast<char>(toCheck),0};
+         ThrowXMLwithMemMgr3(UTFDataFormatException, XMLExcepts::UTF8_FormatError, pos, byte, len, getMemoryManager());
+     }
+ 

Added: head/textproc/xerces-c3/files/patch-src-xercesc-util-regx-ParserForXMLSchema.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xerces-c3/files/patch-src-xercesc-util-regx-ParserForXMLSchema.cpp	Wed Sep 12 09:47:56 2012	(r304141)
@@ -0,0 +1,11 @@
+--- src/xercesc/util/regx/ParserForXMLSchema.cpp.orig
++++ src/xercesc/util/regx/ParserForXMLSchema.cpp
+@@ -156,7 +156,7 @@ XMLInt32 ParserForXMLSchema::decodeEscaped() {
+         break;
+     default:
+         {
+-        XMLCh chString[] = {chBackSlash, ch, chNull};        
++        XMLCh chString[] = {chBackSlash, static_cast<XMLCh>(ch), chNull};        
+         ThrowXMLwithMemMgr1(ParseException,XMLExcepts::Parser_Process2, chString, getMemoryManager());
+         }
+     }

Added: head/textproc/xerces-c3/files/patch-src-xercesc-util-regx-RegxParser.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xerces-c3/files/patch-src-xercesc-util-regx-RegxParser.cpp	Wed Sep 12 09:47:56 2012	(r304141)
@@ -0,0 +1,43 @@
+--- src/xercesc/util/regx/RegxParser.cpp.orig
++++ src/xercesc/util/regx/RegxParser.cpp
+@@ -691,11 +691,11 @@ RangeToken* RegxParser::parseCharacterClass(const bool useNRange) {
+                     || (ch == chDash && getCharData() == chCloseSquare && firstLoop))) {
+                 // if regex = [-] then invalid...
+                 // '[', ']', '-' not allowed and should be escaped
+-                XMLCh chStr[] = { ch, chNull };
++                XMLCh chStr[] = { static_cast<XMLCh>(ch), chNull };
+                 ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_CC6, chStr, chStr, getMemoryManager());
+             }
+             if (ch == chDash && getCharData() == chDash && getState() != REGX_T_BACKSOLIDUS && !wasDecoded) {
+-                XMLCh chStr[] = { ch, chNull };
++                XMLCh chStr[] = { static_cast<XMLCh>(ch), chNull };
+                 ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_CC6, chStr, chStr, getMemoryManager());
+             }
+ 
+@@ -720,7 +720,7 @@ RangeToken* RegxParser::parseCharacterClass(const bool useNRange) {
+                 else {
+ 
+                     XMLInt32 rangeEnd = getCharData();
+-                    XMLCh rangeEndStr[] = { rangeEnd, chNull };
++                    XMLCh rangeEndStr[] = { static_cast<XMLCh>(rangeEnd), chNull };
+ 
+                     if (type == REGX_T_CHAR) {
+ 
+@@ -737,7 +737,7 @@ RangeToken* RegxParser::parseCharacterClass(const bool useNRange) {
+                     processNext();
+ 
+                     if (ch > rangeEnd) {
+-                        XMLCh chStr[] = { ch, chNull };
++                        XMLCh chStr[] = { static_cast<XMLCh>(ch), chNull };
+                         ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_Ope3, rangeEndStr, chStr, getMemoryManager());
+                     }
+ 
+@@ -845,7 +845,7 @@ XMLInt32 RegxParser::decodeEscaped() {
+         break;
+     default:
+     {
+-        XMLCh chString[] = {chBackSlash, ch, chNull};        
++        XMLCh chString[] = {chBackSlash, static_cast<XMLCh>(ch), chNull};        
+         ThrowXMLwithMemMgr1(ParseException,XMLExcepts::Parser_Process2, chString, getMemoryManager());
+     }
+     }

Added: head/textproc/xerces-c3/files/patch-src-xercesc-validators-common-ContentSpecNode.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xerces-c3/files/patch-src-xercesc-validators-common-ContentSpecNode.cpp	Wed Sep 12 09:47:56 2012	(r304141)
@@ -0,0 +1,11 @@
+--- orig/xercesc/validators/common/ContentSpecNode.cpp.orig
++++ src/xercesc/validators/common/ContentSpecNode.cpp
+@@ -259,7 +259,7 @@ int ContentSpecNode::getMaxTotalRange() const {
+             else {
+ 
+                 if ((fType & 0x0f) == ContentSpecNode::Choice) {
+-                    max = max * (maxFirst > maxSecond) ? maxFirst : maxSecond;
++                    max = max * ((maxFirst > maxSecond) ? maxFirst : maxSecond);
+                 }
+                 else {
+                     max = max * (maxFirst + maxSecond);



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