From owner-svn-ports-head@FreeBSD.ORG Wed Sep 12 09:47:57 2012 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2DBC1065672; Wed, 12 Sep 2012 09:47:57 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CBEF8FC2D; Wed, 12 Sep 2012 09:47:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8C9lvSD039592; Wed, 12 Sep 2012 09:47:57 GMT (envelope-from gahr@svn.freebsd.org) Received: (from gahr@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8C9lv17039584; Wed, 12 Sep 2012 09:47:57 GMT (envelope-from gahr@svn.freebsd.org) Message-Id: <201209120947.q8C9lv17039584@svn.freebsd.org> From: Pietro Cerutti Date: Wed, 12 Sep 2012 09:47:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r304141 - in head/textproc/xerces-c3: . files X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 09:47:57 -0000 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 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 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(*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(*srcPtr) ,0}; ++ char byte1[2] = {static_cast(*(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(*srcPtr), 0}; ++ char byte1[2] = {static_cast(*(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(*srcPtr) ,0}; ++ char byte1[2] = {static_cast(*(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(*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(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(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(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(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(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(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(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);