diff options
author | Pietro Cerutti <gahr@FreeBSD.org> | 2012-09-12 09:47:56 +0000 |
---|---|---|
committer | Pietro Cerutti <gahr@FreeBSD.org> | 2012-09-12 09:47:56 +0000 |
commit | 5a4dd8ebb65ac837a029563e194c125528450f2d (patch) | |
tree | 75623c66b2948274eb636043da40a714a715a6e5 /textproc/xerces-c3 | |
parent | 89ffb6c92634d1b5a67dbc83db256712da0321de (diff) | |
download | ports-5a4dd8ebb65ac837a029563e194c125528450f2d.tar.gz ports-5a4dd8ebb65ac837a029563e194c125528450f2d.zip |
Notes
Diffstat (limited to 'textproc/xerces-c3')
6 files changed, 133 insertions, 0 deletions
diff --git a/textproc/xerces-c3/Makefile b/textproc/xerces-c3/Makefile index 1cc2c19d1488..016df363ba17 100644 --- a/textproc/xerces-c3/Makefile +++ b/textproc/xerces-c3/Makefile @@ -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> diff --git a/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.cpp b/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.cpp new file mode 100644 index 000000000000..b26d7eafb481 --- /dev/null +++ b/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.cpp @@ -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 diff --git a/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.hpp b/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.hpp new file mode 100644 index 000000000000..a2804b4bc77f --- /dev/null +++ b/textproc/xerces-c3/files/patch-src-xercesc-util-XMLUTF8Transcoder.hpp @@ -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()); + } + diff --git a/textproc/xerces-c3/files/patch-src-xercesc-util-regx-ParserForXMLSchema.cpp b/textproc/xerces-c3/files/patch-src-xercesc-util-regx-ParserForXMLSchema.cpp new file mode 100644 index 000000000000..a409a53e1731 --- /dev/null +++ b/textproc/xerces-c3/files/patch-src-xercesc-util-regx-ParserForXMLSchema.cpp @@ -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()); + } + } diff --git a/textproc/xerces-c3/files/patch-src-xercesc-util-regx-RegxParser.cpp b/textproc/xerces-c3/files/patch-src-xercesc-util-regx-RegxParser.cpp new file mode 100644 index 000000000000..c1537d500c23 --- /dev/null +++ b/textproc/xerces-c3/files/patch-src-xercesc-util-regx-RegxParser.cpp @@ -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()); + } + } diff --git a/textproc/xerces-c3/files/patch-src-xercesc-validators-common-ContentSpecNode.cpp b/textproc/xerces-c3/files/patch-src-xercesc-validators-common-ContentSpecNode.cpp new file mode 100644 index 000000000000..c6ede7e6efe5 --- /dev/null +++ b/textproc/xerces-c3/files/patch-src-xercesc-validators-common-ContentSpecNode.cpp @@ -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); |