diff options
Diffstat (limited to 'textproc/xerces-c')
28 files changed, 1393 insertions, 1505 deletions
diff --git a/textproc/xerces-c/Makefile b/textproc/xerces-c/Makefile index 0d3ce669d20..f0d9ae67485 100644 --- a/textproc/xerces-c/Makefile +++ b/textproc/xerces-c/Makefile @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.28 2006/03/04 21:30:52 jlam Exp $ +# $NetBSD: Makefile,v 1.29 2006/08/10 13:44:21 abs Exp $ # -DISTNAME= xerces-c-src_2_3_0 +DISTNAME= xerces-c-src_2_7_0 PKGNAME= ${DISTNAME:S/-src_/-/:S/_/./g} -PKGREVISION= 3 CATEGORIES= textproc -MASTER_SITES= http://xml.apache.org/dist/xerces-c/stable/archives/Xerces-C_2_3_0/ +MASTER_SITES= http://apache.rmplc.co.uk/xml/xerces-c/source/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://xml.apache.org/xerces-c/ @@ -51,8 +50,8 @@ PLIST_SUBST+= ${PLIST_SUBST.${ICONV_TYPE}-iconv} .include "../../converters/libiconv/buildlink3.mk" pre-configure: - @${CP} ${PKGSRCDIR}/mk/gnu-config/config.guess ${WRKSRC} - @${CP} ${PKGSRCDIR}/mk/gnu-config/config.sub ${WRKSRC} + ${CP} ${PKGSRCDIR}/mk/gnu-config/config.guess ${WRKSRC} + ${CP} ${PKGSRCDIR}/mk/gnu-config/config.sub ${WRKSRC} post-install: ${INSTALL_DATA} ${WRKSRC}/dom/impl/*.hpp \ diff --git a/textproc/xerces-c/PLIST b/textproc/xerces-c/PLIST index 2ce48568e42..64b42884aa8 100644 --- a/textproc/xerces-c/PLIST +++ b/textproc/xerces-c/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2004/02/11 04:06:04 minskim Exp $ +@comment $NetBSD: PLIST,v 1.4 2006/08/10 13:44:21 abs Exp $ include/xercesc/dom/DOM.hpp include/xercesc/dom/DOMAttr.hpp include/xercesc/dom/DOMBuilder.hpp @@ -30,6 +30,7 @@ include/xercesc/dom/DOMNodeFilter.hpp include/xercesc/dom/DOMNodeIterator.hpp include/xercesc/dom/DOMNodeList.hpp include/xercesc/dom/DOMNotation.hpp +include/xercesc/dom/DOMPSVITypeInfo.hpp include/xercesc/dom/DOMProcessingInstruction.hpp include/xercesc/dom/DOMRange.hpp include/xercesc/dom/DOMRangeException.hpp @@ -39,6 +40,12 @@ include/xercesc/dom/DOMTypeInfo.hpp include/xercesc/dom/DOMUserDataHandler.hpp include/xercesc/dom/DOMWriter.hpp include/xercesc/dom/DOMWriterFilter.hpp +include/xercesc/dom/DOMXPathEvaluator.hpp +include/xercesc/dom/DOMXPathException.hpp +include/xercesc/dom/DOMXPathExpression.hpp +include/xercesc/dom/DOMXPathNSResolver.hpp +include/xercesc/dom/DOMXPathNamespace.hpp +include/xercesc/dom/DOMXPathResult.hpp include/xercesc/dom/StDOMNode.hpp include/xercesc/dom/deprecated/DOM.hpp include/xercesc/dom/deprecated/DOMParser.hpp @@ -107,6 +114,7 @@ include/xercesc/dom/impl/DOMTreeWalkerImpl.hpp include/xercesc/dom/impl/DOMTypeInfoImpl.hpp include/xercesc/dom/impl/DOMWriterImpl.hpp include/xercesc/dom/impl/XSDElementNSImpl.hpp +include/xercesc/framework/BinOutputStream.hpp include/xercesc/framework/LocalFileFormatTarget.hpp include/xercesc/framework/LocalFileInputSource.hpp include/xercesc/framework/MemBufFormatTarget.hpp @@ -115,6 +123,7 @@ include/xercesc/framework/MemoryManager.hpp include/xercesc/framework/StdInInputSource.hpp include/xercesc/framework/StdOutFormatTarget.hpp include/xercesc/framework/URLInputSource.hpp +include/xercesc/framework/ValidationContext.hpp include/xercesc/framework/Wrapper4DOMInputSource.hpp include/xercesc/framework/Wrapper4InputSource.hpp include/xercesc/framework/XMLAttDef.hpp @@ -123,6 +132,7 @@ include/xercesc/framework/XMLAttr.hpp include/xercesc/framework/XMLBuffer.hpp include/xercesc/framework/XMLBufferMgr.hpp include/xercesc/framework/XMLContentModel.hpp +include/xercesc/framework/XMLDTDDescription.hpp include/xercesc/framework/XMLDocumentHandler.hpp include/xercesc/framework/XMLElementDecl.hpp include/xercesc/framework/XMLEntityDecl.hpp @@ -130,30 +140,74 @@ include/xercesc/framework/XMLEntityHandler.hpp include/xercesc/framework/XMLErrorCodes.hpp include/xercesc/framework/XMLErrorReporter.hpp include/xercesc/framework/XMLFormatter.hpp +include/xercesc/framework/XMLGrammarDescription.hpp +include/xercesc/framework/XMLGrammarPool.hpp include/xercesc/framework/XMLNotationDecl.hpp include/xercesc/framework/XMLPScanToken.hpp include/xercesc/framework/XMLRecognizer.hpp include/xercesc/framework/XMLRefInfo.hpp +include/xercesc/framework/XMLSchemaDescription.hpp include/xercesc/framework/XMLValidator.hpp include/xercesc/framework/XMLValidityCodes.hpp +include/xercesc/framework/psvi/PSVIAttribute.hpp +include/xercesc/framework/psvi/PSVIAttributeList.hpp +include/xercesc/framework/psvi/PSVIElement.hpp +include/xercesc/framework/psvi/PSVIHandler.hpp +include/xercesc/framework/psvi/PSVIItem.hpp +include/xercesc/framework/psvi/XSAnnotation.hpp +include/xercesc/framework/psvi/XSAttributeDeclaration.hpp +include/xercesc/framework/psvi/XSAttributeGroupDefinition.hpp +include/xercesc/framework/psvi/XSAttributeUse.hpp +include/xercesc/framework/psvi/XSComplexTypeDefinition.hpp +include/xercesc/framework/psvi/XSConstants.hpp +include/xercesc/framework/psvi/XSElementDeclaration.hpp +include/xercesc/framework/psvi/XSFacet.hpp +include/xercesc/framework/psvi/XSIDCDefinition.hpp +include/xercesc/framework/psvi/XSModel.hpp +include/xercesc/framework/psvi/XSModelGroup.hpp +include/xercesc/framework/psvi/XSModelGroupDefinition.hpp +include/xercesc/framework/psvi/XSMultiValueFacet.hpp +include/xercesc/framework/psvi/XSNamedMap.c +include/xercesc/framework/psvi/XSNamedMap.hpp +include/xercesc/framework/psvi/XSNamespaceItem.hpp +include/xercesc/framework/psvi/XSNotationDeclaration.hpp +include/xercesc/framework/psvi/XSObject.hpp +include/xercesc/framework/psvi/XSParticle.hpp +include/xercesc/framework/psvi/XSSimpleTypeDefinition.hpp +include/xercesc/framework/psvi/XSTypeDefinition.hpp +include/xercesc/framework/psvi/XSValue.hpp +include/xercesc/framework/psvi/XSWildcard.hpp +include/xercesc/internal/BinFileOutputStream.hpp +include/xercesc/internal/BinMemOutputStream.hpp include/xercesc/internal/CharTypeTables.hpp include/xercesc/internal/DGXMLScanner.hpp include/xercesc/internal/ElemStack.hpp include/xercesc/internal/EndOfEntityException.hpp include/xercesc/internal/IANAEncodings.hpp include/xercesc/internal/IGXMLScanner.hpp +include/xercesc/internal/MemoryManagerArrayImpl.hpp include/xercesc/internal/MemoryManagerImpl.hpp include/xercesc/internal/ReaderMgr.hpp include/xercesc/internal/SGXMLScanner.hpp +include/xercesc/internal/ValidationContextImpl.hpp include/xercesc/internal/VecAttrListImpl.hpp include/xercesc/internal/VecAttributesImpl.hpp include/xercesc/internal/WFXMLScanner.hpp +include/xercesc/internal/XMLGrammarPoolImpl.hpp include/xercesc/internal/XMLInternalErrorHandler.hpp include/xercesc/internal/XMLReader.hpp include/xercesc/internal/XMLScanner.hpp include/xercesc/internal/XMLScannerResolver.hpp +include/xercesc/internal/XProtoType.hpp +include/xercesc/internal/XSAXMLScanner.hpp +include/xercesc/internal/XSObjectFactory.hpp +include/xercesc/internal/XSerializable.hpp +include/xercesc/internal/XSerializationException.hpp +include/xercesc/internal/XSerializeEngine.hpp +include/xercesc/internal/XTemplateSerializer.hpp include/xercesc/parsers/AbstractDOMParser.hpp include/xercesc/parsers/DOMBuilderImpl.hpp +include/xercesc/parsers/SAX2XMLFilterImpl.hpp include/xercesc/parsers/SAX2XMLReaderImpl.hpp include/xercesc/parsers/SAXParser.hpp include/xercesc/parsers/XercesDOMParser.hpp @@ -173,6 +227,7 @@ include/xercesc/sax2/ContentHandler.hpp include/xercesc/sax2/DeclHandler.hpp include/xercesc/sax2/DefaultHandler.hpp include/xercesc/sax2/LexicalHandler.hpp +include/xercesc/sax2/SAX2XMLFilter.hpp include/xercesc/sax2/SAX2XMLReader.hpp include/xercesc/sax2/XMLReaderFactory.hpp include/xercesc/util/ArrayIndexOutOfBoundsException.hpp @@ -233,10 +288,10 @@ include/xercesc/util/NameIdPool.c include/xercesc/util/NameIdPool.hpp include/xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp include/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.hpp -include/xercesc/util/NoDefTranscoderException.hpp include/xercesc/util/NoSuchElementException.hpp include/xercesc/util/NullPointerException.hpp include/xercesc/util/NumberFormatException.hpp +include/xercesc/util/OutOfMemoryException.hpp include/xercesc/util/PanicHandler.hpp include/xercesc/util/ParseException.hpp include/xercesc/util/PlatformUtils.hpp @@ -260,11 +315,12 @@ include/xercesc/util/RuntimeException.hpp include/xercesc/util/SchemaDateTimeException.hpp include/xercesc/util/SecurityManager.hpp include/xercesc/util/StringPool.hpp +include/xercesc/util/SynchronizedStringPool.hpp include/xercesc/util/TransENameMap.c include/xercesc/util/TransENameMap.hpp include/xercesc/util/TransService.hpp -${NATIVEICONV}include/xercesc/util/Transcoders/Iconv/IconvTransService.hpp ${GNUICONV}include/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.hpp +${NATIVEICONV}include/xercesc/util/Transcoders/Iconv/IconvTransService.hpp include/xercesc/util/TranscodingException.hpp include/xercesc/util/UTFDataFormatException.hpp include/xercesc/util/UnexpectedEOFException.hpp @@ -291,16 +347,22 @@ include/xercesc/util/XMLDeleterFor.c include/xercesc/util/XMLDeleterFor.hpp include/xercesc/util/XMLDouble.hpp include/xercesc/util/XMLEBCDICTranscoder.hpp +include/xercesc/util/XMLEntityResolver.hpp include/xercesc/util/XMLEnumerator.hpp include/xercesc/util/XMLExceptMsgs.hpp include/xercesc/util/XMLException.hpp include/xercesc/util/XMLFloat.hpp +include/xercesc/util/XMLHolder.c +include/xercesc/util/XMLHolder.hpp +include/xercesc/util/XMLIBM1047Transcoder.hpp include/xercesc/util/XMLIBM1140Transcoder.hpp +include/xercesc/util/XMLInitializer.hpp include/xercesc/util/XMLInteger.hpp include/xercesc/util/XMLMsgLoader.hpp include/xercesc/util/XMLNetAccessor.hpp include/xercesc/util/XMLNumber.hpp include/xercesc/util/XMLRegisterCleanup.hpp +include/xercesc/util/XMLResourceIdentifier.hpp include/xercesc/util/XMLString.hpp include/xercesc/util/XMLStringTokenizer.hpp include/xercesc/util/XMLUCS4Transcoder.hpp @@ -351,6 +413,7 @@ include/xercesc/validators/DTD/DTDGrammar.hpp include/xercesc/validators/DTD/DTDScanner.hpp include/xercesc/validators/DTD/DTDValidator.hpp include/xercesc/validators/DTD/DocTypeHandler.hpp +include/xercesc/validators/DTD/XMLDTDDescriptionImpl.hpp include/xercesc/validators/common/AllContentModel.hpp include/xercesc/validators/common/CMAny.hpp include/xercesc/validators/common/CMBinaryOp.hpp @@ -398,6 +461,7 @@ include/xercesc/validators/datatype/QNameDatatypeValidator.hpp include/xercesc/validators/datatype/StringDatatypeValidator.hpp include/xercesc/validators/datatype/TimeDatatypeValidator.hpp include/xercesc/validators/datatype/UnionDatatypeValidator.hpp +include/xercesc/validators/datatype/XMLCanRepGroup.hpp include/xercesc/validators/datatype/YearDatatypeValidator.hpp include/xercesc/validators/datatype/YearMonthDatatypeValidator.hpp include/xercesc/validators/schema/ComplexTypeInfo.hpp @@ -413,6 +477,7 @@ include/xercesc/validators/schema/SchemaSymbols.hpp include/xercesc/validators/schema/SchemaValidator.hpp include/xercesc/validators/schema/SubstitutionGroupComparator.hpp include/xercesc/validators/schema/TraverseSchema.hpp +include/xercesc/validators/schema/XMLSchemaDescriptionImpl.hpp include/xercesc/validators/schema/XSDDOMParser.hpp include/xercesc/validators/schema/XSDErrorReporter.hpp include/xercesc/validators/schema/XSDLocator.hpp @@ -428,6 +493,7 @@ include/xercesc/validators/schema/identity/IC_KeyRef.hpp include/xercesc/validators/schema/identity/IC_Selector.hpp include/xercesc/validators/schema/identity/IC_Unique.hpp include/xercesc/validators/schema/identity/IdentityConstraint.hpp +include/xercesc/validators/schema/identity/IdentityConstraintHandler.hpp include/xercesc/validators/schema/identity/ValueStore.hpp include/xercesc/validators/schema/identity/ValueStoreCache.hpp include/xercesc/validators/schema/identity/XPathException.hpp @@ -436,8 +502,8 @@ include/xercesc/validators/schema/identity/XPathMatcherStack.hpp include/xercesc/validators/schema/identity/XPathSymbols.hpp include/xercesc/validators/schema/identity/XercesXPath.hpp lib/libxerces-c.so -lib/libxerces-c.so.23 -lib/libxerces-c.so.23.0 +lib/libxerces-c.so.27 +lib/libxerces-c.so.27.0 @dirrm include/xercesc/validators/schema/identity @dirrm include/xercesc/validators/schema @dirrm include/xercesc/validators/datatype @@ -452,14 +518,16 @@ ${NATIVEICONV}@dirrm include/xercesc/util/Transcoders/Iconv @dirrm include/xercesc/util/Platforms @dirrm include/xercesc/util/NetAccessors/Socket @dirrm include/xercesc/util/NetAccessors -@dirrm include/xercesc/util/Compilers @dirrm include/xercesc/util/MsgLoaders/InMemory @dirrm include/xercesc/util/MsgLoaders +@dirrm include/xercesc/util/Compilers @dirrm include/xercesc/util @dirrm include/xercesc/sax2 @dirrm include/xercesc/sax @dirrm include/xercesc/parsers @dirrm include/xercesc/internal +@dirrm include/xercesc/framework/psvi +@dirrm include/xercesc/framework @dirrm include/xercesc/framework @dirrm include/xercesc/dom/impl @dirrm include/xercesc/dom/deprecated diff --git a/textproc/xerces-c/buildlink3.mk b/textproc/xerces-c/buildlink3.mk index dffc1c8516c..c81c2d39e5c 100644 --- a/textproc/xerces-c/buildlink3.mk +++ b/textproc/xerces-c/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.8 2006/07/08 23:11:11 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.9 2006/08/10 13:44:21 abs Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ XERCES_C_BUILDLINK3_MK:= ${XERCES_C_BUILDLINK3_MK}+ @@ -12,8 +12,8 @@ BUILDLINK_PACKAGES+= xerces-c BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}xerces-c .if !empty(XERCES_C_BUILDLINK3_MK:M+) -BUILDLINK_API_DEPENDS.xerces-c+= xerces-c>=2.3.0 -BUILDLINK_ABI_DEPENDS.xerces-c?= xerces-c>=2.3.0nb3 +BUILDLINK_API_DEPENDS.xerces-c+= xerces-c>=2.7.0 +BUILDLINK_ABI_DEPENDS.xerces-c?= xerces-c>=2.7.0 BUILDLINK_PKGSRCDIR.xerces-c?= ../../textproc/xerces-c .endif # XERCES_C_BUILDLINK3_MK diff --git a/textproc/xerces-c/distinfo b/textproc/xerces-c/distinfo index 0ce6cfc1ef4..20e10259a2f 100644 --- a/textproc/xerces-c/distinfo +++ b/textproc/xerces-c/distinfo @@ -1,29 +1,25 @@ -$NetBSD: distinfo,v 1.9 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: distinfo,v 1.10 2006/08/10 13:44:21 abs Exp $ -SHA1 (xerces-c-src_2_3_0.tar.gz) = ea47e1899d569344e7ff1ca09f31f725bbe92033 -RMD160 (xerces-c-src_2_3_0.tar.gz) = 65234d5b0a3a53ad088108710adbf6d419aa61b5 -Size (xerces-c-src_2_3_0.tar.gz) = 6885335 bytes -SHA1 (patch-aa) = e72de819f840a867d17db1a8b5d0198213497c54 -SHA1 (patch-ab) = 673eee8137b79deae52297424a68293a00b53a91 -SHA1 (patch-ac) = fb187d0c5b7dbc09d31be8dea09c88bea755f87d -SHA1 (patch-ad) = 9e6afe4ac10a34201f05198bb62829438de5dc7c -SHA1 (patch-ae) = 8e9abade53b8b390fe1e0d00bfa037ebc01f9deb -SHA1 (patch-af) = 232a0a8520df9896154a6de1c180558a41f9cce8 -SHA1 (patch-ag) = 1fc655d5271a7608db6b9c487936370f1a5e07f6 -SHA1 (patch-ah) = ea7118f8fbdcb8f74338bd3df8852c9b003ed9fb -SHA1 (patch-ai) = b17973cc69bc118ad4104e76a47a4623bd5aa469 -SHA1 (patch-aj) = d6c554ab31426bc14767945038aeeee7de460fd9 -SHA1 (patch-ak) = 7b5e5f45897e7b90c650df5c915c5e1565d72757 -SHA1 (patch-al) = 7521f31697a9898e2fa1de54e75aa408d00c4926 -SHA1 (patch-am) = 89ae1533f714a6bca9522c01c932d265b7eb6823 -SHA1 (patch-an) = a5163709320872b5d4c35be8fc33fc1cea237bae -SHA1 (patch-ao) = 1670e577ed0f4ae2d62383a3ec774a3089da9145 -SHA1 (patch-ap) = 3be27f7bdb09177af13360e9a7cddd97d4382b52 -SHA1 (patch-aq) = 34366da43cbea723c502e131fce2e5919193b885 -SHA1 (patch-ar) = 50b16ef061bc35bcc78d7b10fb8b12cbbf87274c -SHA1 (patch-as) = fc62935c5653e9ae9a0a8e53c910e8c57753d8cb -SHA1 (patch-at) = e153dc19474c0c2668c97dbd705d51fdc6dc1071 -SHA1 (patch-au) = d689cb28a58a60390bc046d56b507a7855182650 -SHA1 (patch-av) = 2eb019a7492e470d128ae4bc4332c7f85dc5ad84 -SHA1 (patch-aw) = ff41b39f0fca3f512362b51d1dec5c9113ca5f9d -SHA1 (patch-ax) = 7728907cc7a2ccfcbd659fcb13440c8f3c02008c +SHA1 (xerces-c-src_2_7_0.tar.gz) = 56f9587f33fca0a573a45f07762e3262a255d73f +RMD160 (xerces-c-src_2_7_0.tar.gz) = 80914da4898c694bf0299d612164483f83857baf +Size (xerces-c-src_2_7_0.tar.gz) = 7760004 bytes +SHA1 (patch-aa) = 11485b77929a72c693bd9fa94c20dbbdd461fb3d +SHA1 (patch-ab) = 581a7fb3faa93fd390af939d110c90d4b350910b +SHA1 (patch-ac) = 8fe9f17f1a8be5e251885efe1bcf7466cbea7714 +SHA1 (patch-ad) = 4ba3a565455cbc5202f309b36365297396221f51 +SHA1 (patch-ae) = fffbbe311499bba29825b21d6eb28f6ad9957320 +SHA1 (patch-af) = d4456b93e3d867cc1275c8e5d0b33f0dc121083b +SHA1 (patch-ag) = fac013068f8eae143995508352c0b0d8972ba0c9 +SHA1 (patch-ah) = fe86675faa35e458e7729d12c1c343fc1976c9ba +SHA1 (patch-ai) = 1259dc3f5f69a7a218199825cd085a80563c04f6 +SHA1 (patch-aj) = f3ebf6265573f93ff1b75eee55fb3698f7cdb841 +SHA1 (patch-ak) = d9fba073a165e8b5cfebe546afc35efd6c74f150 +SHA1 (patch-al) = ee9aeff252afec1eba6316118e825ef27f187a2d +SHA1 (patch-am) = d9fea604b7b34654ff6cb69d155f2d5e9ccde25b +SHA1 (patch-an) = 168ee08b79bba4cb5e0c8ec8567dbde09e8408f3 +SHA1 (patch-ao) = 6d72b85c9883797d80d469554817e5034a77b97b +SHA1 (patch-ap) = ff9169b12d936c9ca093e7e3ee30aa84a1c8ae7f +SHA1 (patch-aq) = 9e25a396655fe11a068ddb4a48c23902214273e6 +SHA1 (patch-ar) = 755c599abe9d28f1dac7fc53a61032debaede467 +SHA1 (patch-as) = 3eaec415b91dcd129eaa7c5c6e0b5b417ad651bc +SHA1 (patch-at) = 31682536fccb69cbf29872793b2eb798e15e3bda diff --git a/textproc/xerces-c/patches/patch-aa b/textproc/xerces-c/patches/patch-aa index 9b7c2baefed..d7e9a52cf8f 100644 --- a/textproc/xerces-c/patches/patch-aa +++ b/textproc/xerces-c/patches/patch-aa @@ -1,58 +1,26 @@ -$NetBSD: patch-aa,v 1.3 2004/02/11 04:06:05 minskim Exp $ +$NetBSD: patch-aa,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- util/Platforms/NetBSD/NetBSDPlatformUtils.cpp.orig 2003-05-27 10:04:53.000000000 -0500 -+++ util/Platforms/NetBSD/NetBSDPlatformUtils.cpp -@@ -92,6 +92,8 @@ +--- ../../samples/Makefile.incl.orig 2005-09-07 16:56:50.000000000 +0100 ++++ ../../samples/Makefile.incl +@@ -240,6 +240,21 @@ ifeq (${PLATFORM}, FREEBSD) + SHLIBSUFFIX=.so + endif - #if defined(XML_USE_ICU_TRANSCODER) - #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp> -+#elif defined (XML_USE_GNU_TRANSCODER) -+ #include <xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.hpp> - #else - // Use native transcoder. Same as -DXML_USE_NATIVE_TRANSCODER - #include <xercesc/util/Transcoders/Iconv/IconvTransService.hpp> -@@ -100,6 +102,8 @@ - - #if defined(XML_USE_ICU_MESSAGELOADER) - #include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp> -+#elif defined(XML_USE_ICONV_MESSAGELOADER) -+ #include <xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp> - #else - // Same as -DXML_USE_INMEM_MESSAGELOADER - #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp> -@@ -172,6 +176,8 @@ XMLMsgLoader* XMLPlatformUtils::loadAMsg - { - #if defined (XML_USE_ICU_MESSAGELOADER) - retVal = new ICUMsgLoader(msgDomain); -+#elif defined (XML_USE_ICONV_MESSAGELOADER) -+ retVal = new MsgCatalogLoader(msgDomain); - #else - // same as -DXML_USE_INMEM_MESSAGELOADER - retVal = new InMemMsgLoader(msgDomain); -@@ -199,6 +205,8 @@ XMLTransService* XMLPlatformUtils::makeT - // Use ICU transcoding services. - // same as -DXML_USE_ICU_MESSAGELOADER - return new ICUTransService; -+#elif defined (XML_USE_GNU_TRANSCODER) -+ return new IconvGNUTransService; - #else - // Use native transcoding services. - // same as -DXML_USE_INMEM_MESSAGELOADER -@@ -421,7 +429,7 @@ unsigned long XMLPlatformUtils::getCurre - return (unsigned long)(t.tv_sec*1000 + t.tv_usec); - } - --XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath) -+XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath, MemoryManager* const) - { - - // -@@ -463,7 +471,7 @@ bool XMLPlatformUtils::isRelative(const - return true; - } - --XMLCh* XMLPlatformUtils::getCurrentDirectory() -+XMLCh* XMLPlatformUtils::getCurrentDirectory(MemoryManager* const) - { - char dirBuf[PATH_MAX + 1]; - char *curDir = getcwd(&dirBuf[0], PATH_MAX + 1); ++#=============== DRAGONFLY SPECIFIC OPTIONS ========================= ++ifeq (${PLATFORM}, DRAGONFLY) ++ CMP= -c ${CXXFLAGS} ++ CC= ${COMPILER} -c -D${PLATFORM} -fPIC ++ LINK = ${COMPILER} -D${PLATFORM} -fPIC ${LDFLAGS} ++ PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib ++ ifdef ICUROOT ++ PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT} ++ EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS} ++ else ++ EXTRA_LINK_OPTIONS=${EXTRA_LIBS} -lstdc++ ++ endif ++ SHLIBSUFFIX=.so ++endif ++ + #=============== NETBSD SPECIFIC OPTIONS ========================= + ifeq (${PLATFORM}, NETBSD) + CMP= -c ${CXXFLAGS} diff --git a/textproc/xerces-c/patches/patch-ab b/textproc/xerces-c/patches/patch-ab index c34a59cabcf..2b64c531ae3 100644 --- a/textproc/xerces-c/patches/patch-ab +++ b/textproc/xerces-c/patches/patch-ab @@ -1,79 +1,12 @@ -$NetBSD: patch-ab,v 1.4 2004/02/15 04:14:04 minskim Exp $ +$NetBSD: patch-ab,v 1.5 2006/08/10 13:44:22 abs Exp $ ---- util/Transcoders/IconvGNU/IconvGNUTransService.cpp.orig 2003-05-27 10:04:57.000000000 -0500 -+++ util/Transcoders/IconvGNU/IconvGNUTransService.cpp -@@ -94,7 +94,11 @@ - #include <locale.h> - #include <iconv.h> - #include <errno.h> -+#ifdef __NetBSD__ -+#include <machine/endian.h> -+#else - #include <endian.h> -+#endif - - #include <xercesc/util/XMLString.hpp> - #include <xercesc/util/XMLUniDefs.hpp> -@@ -309,7 +313,7 @@ XMLCh IconvGNUWrapper::toUpper (const - xmlChToMbc (ch, wcbuf); - - char tmpArr[4]; -- char* ptr = wcbuf; -+ const char* ptr = wcbuf; - size_t len = fUChSize; - char *pTmpArr = tmpArr; - size_t bLen = 2; -@@ -341,7 +345,7 @@ XMLCh IconvGNUWrapper::toLower (const - xmlChToMbc (ch, wcbuf); - - char tmpArr[4]; -- char* ptr = wcbuf; -+ const char* ptr = wcbuf; - size_t len = fUChSize; - char *pTmpArr = tmpArr; - size_t bLen = 2; -@@ -373,7 +377,7 @@ bool IconvGNUWrapper::isSpace(const X - char tmpArr[4]; - - xmlChToMbc (toCheck, wcbuf); -- char* ptr = wcbuf; -+ const char* ptr = wcbuf; - size_t len = fUChSize; - char *pTmpArr = tmpArr; - size_t bLen = 2; -@@ -474,7 +478,7 @@ size_t IconvGNUWrapper::iconvFrom ( c - size_t toLen ) const - { - ICONV_LOCK; -- char ** tmpPtr = (char**)&fromPtr; -+ const char ** tmpPtr = &fromPtr; - return ::iconv (fCDFrom, tmpPtr, fromLen, toPtr, &toLen); - } - -@@ -484,7 +488,7 @@ size_t IconvGNUWrapper::iconvTo ( con - size_t toLen ) const - { - ICONV_LOCK; -- char ** tmpPtr = (char**)&fromPtr; -+ const char ** tmpPtr = &fromPtr; - return ::iconv (fCDTo, tmpPtr, fromLen, toPtr, &toLen); - } - -@@ -1051,7 +1055,7 @@ XMLCh* IconvGNULCPTranscoder::transcode( - if (*toTranscode) { - const unsigned int wLent = calcRequiredSize(toTranscode); - if (wLent == 0) { -- retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));/new XMLCh[1]; -+ retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));//new XMLCh[1]; - retVal[0] = 0; - return retVal; - } -@@ -1186,7 +1190,7 @@ IconvGNUTranscoder::IconvGNUTranscoder ( - , iconv_t cd_to - , size_t uchsize - , unsigned int ubo -- , MemoryManger* const manager -+ , MemoryManager* const manager - ) - : XMLTranscoder(encodingName, blockSize, manager) - , IconvGNUWrapper (cd_from, cd_to, uchsize, ubo) +--- ../../samples/configure.orig 2005-09-07 16:56:50.000000000 +0100 ++++ ../../samples/configure +@@ -1363,6 +1363,7 @@ case "${host}" in + *-*-linux*) platform=LINUX ;; + *-*-nto*) platform=QNX ;; + *-*-freebsd*) platform=FREEBSD ;; ++ *-*-dragonfly*) platform=DRAGONFLY ;; + *-*-netbsd*) platform=NETBSD ;; + *-*-irix*) platform=IRIX ;; + *-*-aix*) platform=AIX ;; diff --git a/textproc/xerces-c/patches/patch-ac b/textproc/xerces-c/patches/patch-ac index 0e29fcfba04..45ae87abb59 100644 --- a/textproc/xerces-c/patches/patch-ac +++ b/textproc/xerces-c/patches/patch-ac @@ -1,33 +1,14 @@ -$NetBSD: patch-ac,v 1.3 2004/02/11 04:06:05 minskim Exp $ +$NetBSD: patch-ac,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- framework/StdOutFormatTarget.cpp.orig 2003-05-27 10:04:45.000000000 -0500 -+++ framework/StdOutFormatTarget.cpp -@@ -80,7 +80,7 @@ - */ - - #include <xercesc/framework/StdOutFormatTarget.hpp> --#include <iostream.h> -+#include <iostream> - - XERCES_CPP_NAMESPACE_BEGIN - -@@ -92,7 +92,7 @@ StdOutFormatTarget::~StdOutFormatTarget( - - void StdOutFormatTarget::flush() - { -- cout.flush(); -+ std::cout.flush(); - } - - void StdOutFormatTarget::writeChars(const XMLByte* const toWrite -@@ -104,8 +104,8 @@ void StdOutFormatTarget::writeChars(cons - // Without the cast, it was printing the pointer value in hex. - // Quite annoying, considering every other platform printed - // the string with the explicit cast to char* below. -- cout.write((char *) toWrite, (int) count); -- cout.flush(); -+ std::cout.write((char *) toWrite, (int) count); -+ std::cout.flush(); - - } - +--- ../../samples/runConfigure.orig 2005-09-07 16:56:50.000000000 +0100 ++++ ../../samples/runConfigure +@@ -266,6 +266,9 @@ else + elif test $platform = "freebsd"; then + threadingLibs="-pthread -lc_r" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ elif test $platform = "dragonfly"; then ++ threadingLibs="-pthread -lc_r" ++ threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" + elif test $platform = "netbsd"; then + threadingLibs="-pthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" diff --git a/textproc/xerces-c/patches/patch-ad b/textproc/xerces-c/patches/patch-ad index 3ac7ffe32ac..0f4e85d470f 100644 --- a/textproc/xerces-c/patches/patch-ad +++ b/textproc/xerces-c/patches/patch-ad @@ -1,24 +1,74 @@ -$NetBSD: patch-ad,v 1.4 2004/03/22 17:04:13 kristerw Exp $ +$NetBSD: patch-ad,v 1.5 2006/08/10 13:44:22 abs Exp $ ---- dom/impl/DOMDeepNodeListPool.c.orig Mon Mar 22 17:44:12 2004 -+++ dom/impl/DOMDeepNodeListPool.c Mon Mar 22 17:45:08 2004 -@@ -89,9 +89,6 @@ - { - initialize(modulus); - -- // create default hasher -- fHash = new (fMemoryManager) HashPtr(); -- - // - // Allocate the initial id pointers array. We don't have to zero them - // out since the fIdCounter value tells us which ones are valid. The -@@ -102,6 +99,9 @@ - - fIdPtrs = (TVal**) fMemoryManager->allocate(fIdPtrsCount * sizeof(TVal*));//new TVal*[fIdPtrsCount]; - fIdPtrs[0] = 0; +--- util/Platforms/DragonFly/DragonFlyDefs.hpp.orig 2006-04-26 14:02:54.000000000 +0100 ++++ util/Platforms/DragonFly/DragonFlyDefs.hpp +@@ -0,0 +1,69 @@ ++/* ++ * The Apache Software License, Version 1.1 ++ * ++ * Copyright (c) 1999-2000 The Apache Software Foundation. All rights ++ * reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in ++ * the documentation and/or other materials provided with the ++ * distribution. ++ * ++ * 3. The end-user documentation included with the redistribution, ++ * if any, must include the following acknowledgment: ++ * "This product includes software developed by the ++ * Apache Software Foundation (http://www.apache.org/)." ++ * Alternately, this acknowledgment may appear in the software itself, ++ * if and wherever such third-party acknowledgments normally appear. ++ * ++ * 4. The names "Xerces" and "Apache Software Foundation" must ++ * not be used to endorse or promote products derived from this ++ * software without prior written permission. For written ++ * permission, please contact apache\@apache.org. ++ * ++ * 5. Products derived from this software may not be called "Apache", ++ * nor may "Apache" appear in their name, without prior written ++ * permission of the Apache Software Foundation. ++ * ++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ++ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ==================================================================== ++ * ++ * This software consists of voluntary contributions made by many ++ * individuals on behalf of the Apache Software Foundation, and was ++ * originally based on software copyright (c) 1999, International ++ * Business Machines, Inc., http://www.ibm.com . For more information ++ * on the Apache Software Foundation, please see ++ * <http://www.apache.org/>. ++ */ + -+ // create default hasher -+ fHash = new (fMemoryManager) HashPtr(); - } - - template <class TVal> ++/* ++ * ++ * ++ */ ++ ++ ++#define ENDIANMODE_LITTLE ++ ++typedef void* FileHandle; ++ ++#ifndef DRAGONFLY ++#define DRAGONFLY ++#endif diff --git a/textproc/xerces-c/patches/patch-ae b/textproc/xerces-c/patches/patch-ae index 8fb25be3076..1d48a8c8665 100644 --- a/textproc/xerces-c/patches/patch-ae +++ b/textproc/xerces-c/patches/patch-ae @@ -1,24 +1,667 @@ -$NetBSD: patch-ae,v 1.4 2004/03/22 17:04:13 kristerw Exp $ +$NetBSD: patch-ae,v 1.5 2006/08/10 13:44:22 abs Exp $ ---- util/RefHash3KeysIdPool.c.orig Mon Mar 22 17:54:00 2004 -+++ util/RefHash3KeysIdPool.c Mon Mar 22 17:54:25 2004 -@@ -117,9 +117,6 @@ - { - initialize(modulus); - -- // create default hasher -- fHash = new (fMemoryManager) HashXMLCh(); -- - // - // Allocate the initial id pointers array. We don't have to zero them - // out since the fIdCounter value tells us which ones are valid. The -@@ -129,6 +126,9 @@ - fIdPtrsCount = 256; - fIdPtrs = (TVal**) fMemoryManager->allocate(fIdPtrsCount * sizeof(TVal*)); //new TVal*[fIdPtrsCount]; - fIdPtrs[0] = 0; -+ -+ // create default hasher -+ fHash = new (fMemoryManager) HashXMLCh(); - } - - template <class TVal> +--- util/Platforms/DragonFly/DragonFlyPlatformUtils.cpp.orig 2006-04-26 14:02:54.000000000 +0100 ++++ util/Platforms/DragonFly/DragonFlyPlatformUtils.cpp +@@ -0,0 +1,662 @@ ++/* ++ * The Apache Software License, Version 1.1 ++ * ++ * Copyright (c) 1999-2000 The Apache Software Foundation. All rights ++ * reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in ++ * the documentation and/or other materials provided with the ++ * distribution. ++ * ++ * 3. The end-user documentation included with the redistribution, ++ * if any, must include the following acknowledgment: ++ * "This product includes software developed by the ++ * Apache Software Foundation (http://www.apache.org/)." ++ * Alternately, this acknowledgment may appear in the software itself, ++ * if and wherever such third-party acknowledgments normally appear. ++ * ++ * 4. The names "Xerces" and "Apache Software Foundation" must ++ * not be used to endorse or promote products derived from this ++ * software without prior written permission. For written ++ * permission, please contact apache\@apache.org. ++ * ++ * 5. Products derived from this software may not be called "Apache", ++ * nor may "Apache" appear in their name, without prior written ++ * permission of the Apache Software Foundation. ++ * ++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ++ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ==================================================================== ++ * ++ * This software consists of voluntary contributions made by many ++ * individuals on behalf of the Apache Software Foundation, and was ++ * originally based on software copyright (c) 1999, International ++ * Business Machines, Inc., http://www.ibm.com . For more information ++ * on the Apache Software Foundation, please see ++ * <http://www.apache.org/>. ++ */ ++ ++/* ++ * ++ * ++ */ ++ ++ ++// --------------------------------------------------------------------------- ++// Includes ++// --------------------------------------------------------------------------- ++ ++#if !defined(APP_NO_THREADS) ++#include <pthread.h> ++#endif ++ ++/* #ifndef __USE_UNIX98 ++ #error __USE_UNIX98 is not defined in your compile settings ++#endif */ ++ ++#include <unistd.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <errno.h> ++#include <libgen.h> ++#include <sys/time.h> ++#include <string.h> ++#include <strings.h>/* for strcasecmp & strncasecmp */ ++#include <wchar.h> /* for win_t */ ++#include <xercesc/util/PlatformUtils.hpp> ++#include <xercesc/util/RuntimeException.hpp> ++#include <xercesc/util/Janitor.hpp> ++#include <xercesc/util/Mutexes.hpp> ++#include <xercesc/util/XMLString.hpp> ++#include <xercesc/util/XMLUniDefs.hpp> ++#include <xercesc/util/XMLUni.hpp> ++#include <xercesc/util/PanicHandler.hpp> ++ ++#if defined(XML_USE_ICU_TRANSCODER) ++ #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp> ++#elif defined (XML_USE_GNU_TRANSCODER) ++ #include <xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.hpp> ++#else ++ // Use native transcoder. Same as -DXML_USE_NATIVE_TRANSCODER ++ #include <xercesc/util/Transcoders/Iconv/IconvTransService.hpp> ++#endif ++ ++ ++#if defined(XML_USE_ICU_MESSAGELOADER) ++ #include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp> ++#elif defined(XML_USE_ICONV_MESSAGELOADER) ++ #include <xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp> ++#else ++ // Same as -DXML_USE_INMEM_MESSAGELOADER ++ #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp> ++#endif ++ ++ ++#if defined (XML_USE_NETACCESSOR_SOCKET) ++ #include <xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp> ++#endif ++ ++XERCES_CPP_NAMESPACE_BEGIN ++ ++// --------------------------------------------------------------------------- ++// Local Methods ++// --------------------------------------------------------------------------- ++ ++static void WriteCharStr( FILE* stream, const char* const toWrite) ++{ ++ if (fputs(toWrite, stream) == EOF) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::Strm_StdErrWriteFailure); ++ } ++} ++ ++static void WriteUStrStdErr( const XMLCh* const toWrite) ++{ ++ char* tmpVal = XMLString::transcode(toWrite); ++ ArrayJanitor<char> janText(tmpVal); ++ if (fputs(tmpVal, stderr) == EOF) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::Strm_StdErrWriteFailure); ++ } ++} ++ ++static void WriteUStrStdOut( const XMLCh* const toWrite) ++ { ++ char* tmpVal = XMLString::transcode(toWrite); ++ ArrayJanitor<char> janText(tmpVal); ++ if (fputs(tmpVal, stdout) == EOF) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::Strm_StdOutWriteFailure); ++ } ++} ++ ++XMLNetAccessor* XMLPlatformUtils::makeNetAccessor() ++{ ++#if defined (XML_USE_NETACCESSOR_SOCKET) ++ return new SocketNetAccessor(); ++#else ++ return 0; ++#endif ++} ++ ++// --------------------------------------------------------------------------- ++// XMLPlatformUtils: Private Static Methods ++// --------------------------------------------------------------------------- ++ ++// ++// This method is called by the platform independent part of this class ++// when client code asks to have one of the supported message sets loaded. ++// ++ ++XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain) ++{ ++ XMLMsgLoader* retVal; ++ try ++ { ++#if defined (XML_USE_ICU_MESSAGELOADER) ++ retVal = new ICUMsgLoader(msgDomain); ++#elif defined (XML_USE_ICONV_MESSAGELOADER) ++ retVal = new MsgCatalogLoader(msgDomain); ++#else ++ // same as -DXML_USE_INMEM_MESSAGELOADER ++ retVal = new InMemMsgLoader(msgDomain); ++#endif ++ } ++ ++ catch(...) ++ { ++ panic(PanicHandler::Panic_CantLoadMsgDomain); ++ } ++ return retVal; ++} ++ ++ ++// ++// This method is called very early in the bootstrapping process. This guy ++// must create a transcoding service and return it. It cannot use any string ++// methods, any transcoding services, throw any exceptions, etc... It just ++// makes a transcoding service and returns it, or returns zero on failure. ++// ++ ++XMLTransService* XMLPlatformUtils::makeTransService() ++{ ++#if defined (XML_USE_ICU_TRANSCODER) ++ // Use ICU transcoding services. ++ // same as -DXML_USE_ICU_MESSAGELOADER ++ return new ICUTransService; ++#elif defined (XML_USE_GNU_TRANSCODER) ++ return new IconvGNUTransService; ++#else ++ // Use native transcoding services. ++ // same as -DXML_USE_INMEM_MESSAGELOADER ++ return new IconvTransService; ++ ++#endif ++} ++ ++// --------------------------------------------------------------------------- ++// XMLPlatformUtils: The panic method ++// --------------------------------------------------------------------------- ++void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason) ++{ ++ fgUserPanicHandler? fgUserPanicHandler->panic(reason) : fgDefaultPanicHandler->panic(reason); ++} ++ ++ ++// --------------------------------------------------------------------------- ++// XMLPlatformUtils: File Methods ++// --------------------------------------------------------------------------- ++ ++unsigned int XMLPlatformUtils::curFilePos(FileHandle theFile) ++{ ++ if (theFile == NULL) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ int curPos = ftell( (FILE*)theFile); ++ if (curPos == -1) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotGetSize); ++ ++ return (unsigned int)curPos; ++} ++ ++void XMLPlatformUtils::closeFile(FileHandle theFile) ++{ ++ if (theFile == NULL) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ if (fclose((FILE*)theFile)) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotCloseFile); ++} ++ ++unsigned int XMLPlatformUtils::fileSize(FileHandle theFile) ++{ ++ if (theFile == NULL) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ // Get the current position ++ long int curPos = ftell((FILE*) theFile); ++ if (curPos == -1) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotGetCurPos); ++ ++ // Seek to the end and save that value for return ++ if (fseek((FILE*) theFile, 0, SEEK_END)) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotSeekToEnd); ++ ++ long int retVal = ftell((FILE*)theFile); ++ if (retVal == -1) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotSeekToEnd); ++ ++ // And put the pointer back ++ ++ if (fseek( (FILE*)theFile, curPos, SEEK_SET) ) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotSeekToPos); ++ ++ return (unsigned int)retVal; ++} ++ ++FileHandle XMLPlatformUtils::openFile(const XMLCh* const fileName) ++{ ++ if (fileName == NULL) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ const char* tmpFileName = XMLString::transcode(fileName); ++ ArrayJanitor<char> janText((char*)tmpFileName); ++ FileHandle retVal = (FILE*)fopen( tmpFileName , "r+" ); ++ ++ if (retVal == NULL) ++ return 0; ++ return retVal; ++} ++ ++FileHandle XMLPlatformUtils::openFile(const char* const fileName) ++{ ++ if (fileName == NULL) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ FileHandle retVal = (FILE*)fopen( fileName , "r+" ); ++ ++ if (retVal == NULL) ++ return 0; ++ return retVal; ++} ++ ++FileHandle XMLPlatformUtils::openFileToWrite(const XMLCh* const fileName) ++{ ++ if (fileName == NULL) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ const char* tmpFileName = XMLString::transcode(fileName); ++ ArrayJanitor<char> janText((char*)tmpFileName); ++ ++ FileHandle retVal = (FILE*)fopen( tmpFileName, "r+" ); ++ if (retVal == NULL) ++ return 0; ++ return retVal; ++} ++ ++FileHandle XMLPlatformUtils::openFileToWrite(const char* const fileName) ++{ ++ if (fileName == NULL) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ FileHandle retVal = (FILE*)fopen( fileName, "r+" ); ++ ++ if (retVal == NULL) ++ return 0; ++ return retVal; ++} ++ ++FileHandle XMLPlatformUtils::openStdInHandle() ++{ ++ int nfd = dup(0); ++ if (nfd == -1) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotDupHandle); ++ return (FileHandle)fdopen(dup(0), "r"); ++} ++ ++ ++ ++unsigned int ++XMLPlatformUtils::readFileBuffer( FileHandle theFile ++ , const unsigned int toRead ++ , XMLByte* const toFill) ++{ ++ if ( !theFile || !toFill ) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ if (toRead == 0) ++ return 0; ++ size_t noOfItemsRead = fread((void*) toFill, 1, toRead, (FILE*)theFile); ++ ++ if(ferror((FILE*)theFile)) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotReadFromFile); ++ } ++ ++ return (unsigned int)noOfItemsRead; ++} ++ ++void XMLPlatformUtils::writeBufferToFile( FileHandle const theFile ++ , long toWrite ++ , const XMLByte* const toFlush ) ++{ ++ if ( !theFile || !toFlush ) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ if ( toWrite <= 0 ) ++ return; ++ ++ const XMLByte* tmpFlush = (const XMLByte*) toFlush; ++ size_t bytesWritten = 0; ++ ++ while (true) ++ { ++ bytesWritten = fwrite(tmpFlush, sizeof(XMLByte), toWrite, (FILE*)theFile); ++ ++ if(ferror((FILE*)theFile)) ++ { ++#if 0 ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotWriteToFile); ++#else ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotReadFromFile); ++#endif ++ } ++ ++ if (bytesWritten < (size_t) toWrite) //incomplete write ++ { ++ tmpFlush += bytesWritten; ++ toWrite -= bytesWritten; ++ bytesWritten = 0; ++ } ++ else ++ return; ++ } ++} ++ ++void XMLPlatformUtils::resetFile(FileHandle theFile) ++{ ++ if (theFile == NULL) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::CPtr_PointerIsZero); ++ // Seek to the start of the file ++ if (fseek((FILE*)theFile, 0, SEEK_SET)) ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotResetFile); ++} ++ ++ ++// --------------------------------------------------------------------------- ++// XMLPlatformUtils: Timing Methods ++// --------------------------------------------------------------------------- ++ ++unsigned long XMLPlatformUtils::getCurrentMillis() ++{ ++ struct timeval t; ++ struct timezone tz; ++ ++ gettimeofday(&t, &tz); ++ return (unsigned long)(t.tv_sec*1000 + t.tv_usec); ++} ++ ++XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath, MemoryManager* const) ++{ ++ ++ // ++ // NOTE: THe path provided has always already been opened successfully, ++ // so we know that its not some pathological freaky path. It comes in ++ // in native format, and goes out as Unicode always ++ // ++ char* newSrc = XMLString::transcode(srcPath); ++ ArrayJanitor<char> janText(newSrc); ++ ++ // Use a local buffer that is big enough for the largest legal path ++ char *absPath = new char[1024]; ++ // get the absolute path ++ char* retPath = realpath(newSrc, absPath); ++ ArrayJanitor<char> janText2(retPath); ++ ++ if (!retPath) ++ { ++ ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotGetBasePathName); ++ } ++ return XMLString::transcode(absPath); ++} ++ ++bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck) ++{ ++ // Check for pathological case of empty path ++ if (!toCheck[0]) ++ return false; ++ ++ // ++ // If it starts with a slash, then it cannot be relative. This covers ++ // both something like "\Test\File.xml" and an NT Lan type remote path ++ // that starts with a node like "\\MyNode\Test\File.xml". ++ // ++ if (toCheck[0] == XMLCh('/')) ++ return false; ++ ++ // Else assume its a relative path ++ return true; ++} ++ ++XMLCh* XMLPlatformUtils::getCurrentDirectory(MemoryManager* const) ++{ ++ char dirBuf[PATH_MAX + 1]; ++ char *curDir = getcwd(&dirBuf[0], PATH_MAX + 1); ++ ++ if (!curDir) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::File_CouldNotGetBasePathName); ++ } ++ ++ return XMLString::transcode(curDir); ++} ++ ++inline bool XMLPlatformUtils::isAnySlash(XMLCh c) ++{ ++ return ( chBackSlash == c || chForwardSlash == c); ++} ++ ++ ++// ----------------------------------------------------------------------- ++// Mutex methods ++// ----------------------------------------------------------------------- ++ ++#if !defined(APP_NO_THREADS) ++ ++// --------------------------------------------------------------------------- ++// XMLPlatformUtils: Platform init method ++// --------------------------------------------------------------------------- ++ ++static XMLMutex atomicOpsMutex; ++ ++void XMLPlatformUtils::platformInit() ++{ ++ // ++ // The atomicOps mutex needs to be created early. ++ // Normally, mutexes are created on first use, but there is a ++ // circular dependency between compareAndExchange() and ++ // mutex creation that must be broken. ++ ++ if (atomicOpsMutex.fHandle == 0) ++ atomicOpsMutex.fHandle = XMLPlatformUtils::makeMutex(); ++} ++ ++void* XMLPlatformUtils::makeMutex() ++{ ++ pthread_mutex_t* mutex = new pthread_mutex_t; ++ pthread_mutexattr_t* attr = new pthread_mutexattr_t; ++ pthread_mutexattr_init(attr); ++ pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); ++ if (pthread_mutex_init(mutex, attr)) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::Mutex_CouldNotCreate); ++ } ++ pthread_mutexattr_destroy(attr); ++ delete attr; ++ return (void*)(mutex); ++ ++} ++ ++void XMLPlatformUtils::closeMutex(void* const mtxHandle) ++{ ++ if (mtxHandle != NULL) ++ { ++ if (pthread_mutex_destroy((pthread_mutex_t*) mtxHandle)) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::Mutex_CouldNotDestroy); ++ } ++ delete (pthread_mutex_t*)mtxHandle; ++ } ++} ++ ++ ++void XMLPlatformUtils::lockMutex(void* const mtxHandle) ++{ ++ if (mtxHandle != NULL) ++ { ++ if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle)) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::Mutex_CouldNotLock); ++ } ++ } ++} ++ ++ ++void XMLPlatformUtils::unlockMutex(void* const mtxHandle) ++{ ++ if (mtxHandle != NULL) ++ { ++ if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle)) ++ { ++ ThrowXML(XMLPlatformUtilsException, ++ XMLExcepts::Mutex_CouldNotUnlock); ++ } ++ } ++} ++ ++ ++// ----------------------------------------------------------------------- ++// Miscellaneous synchronization methods ++// ----------------------------------------------------------------------- ++ ++void* XMLPlatformUtils::compareAndSwap(void** toFill ++ , const void* const newValue ++ , const void* const toCompare) ++{ ++ XMLMutexLock lockMutex(&atomicOpsMutex); ++ ++ void *retVal = *toFill; ++ if (*toFill == toCompare) ++ *toFill = (void *)newValue; ++ ++ return retVal; ++} ++ ++int XMLPlatformUtils::atomicIncrement(int &location) ++{ ++ XMLMutexLock localLock(&atomicOpsMutex); ++ ++ return ++location; ++} ++ ++int XMLPlatformUtils::atomicDecrement(int &location) ++{ ++ XMLMutexLock localLock(&atomicOpsMutex); ++ ++ return --location; ++} ++ ++#else // #if !defined (APP_NO_THREADS) ++ ++void XMLPlatformUtils::platformInit() ++{ ++} ++ ++void* XMLPlatformUtils::makeMutex() ++{ ++ return 0; ++} ++ ++void XMLPlatformUtils::closeMutex(void* const mtxHandle) ++{ ++} ++ ++void XMLPlatformUtils::lockMutex(void* const mtxHandle) ++{ ++} ++ ++void XMLPlatformUtils::unlockMutex(void* const mtxHandle) ++{ ++} ++ ++void* XMLPlatformUtils::compareAndSwap (void** toFill, ++ const void* const newValue, ++ const void* const toCompare) ++{ ++ void *retVal = *toFill; ++ if (*toFill == toCompare) ++ *toFill = (void *)newValue; ++ return retVal; ++} ++ ++int XMLPlatformUtils::atomicIncrement(int &location) ++{ ++ return ++location; ++} ++ ++int XMLPlatformUtils::atomicDecrement(int &location) ++{ ++ return --location; ++} ++ ++#endif // APP_NO_THREADS ++ ++void XMLPlatformUtils::platformTerm() ++{ ++#if !defined(APP_NO_THREADS) ++ // delete the mutex we created ++ closeMutex(atomicOpsMutex.fHandle); ++ atomicOpsMutex.fHandle = 0; ++#endif ++} ++ ++#include <xercesc/util/LogicalPath.c> ++ ++XERCES_CPP_NAMESPACE_END diff --git a/textproc/xerces-c/patches/patch-af b/textproc/xerces-c/patches/patch-af index 1b22f2a4fb6..45e4bacc98b 100644 --- a/textproc/xerces-c/patches/patch-af +++ b/textproc/xerces-c/patches/patch-af @@ -1,9 +1,9 @@ -$NetBSD: patch-af,v 1.5 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-af,v 1.6 2006/08/10 13:44:22 abs Exp $ ---- Makefile.incl.orig 2003-05-27 15:04:46.000000000 +0000 +--- Makefile.incl.orig 2005-09-07 16:55:53.000000000 +0100 +++ Makefile.incl -@@ -373,6 +373,21 @@ SHLIBSUFFIX=.so - LD_SONAME = -Wl,-soname,${SO_NAME} +@@ -423,6 +423,21 @@ LD_SONAME = -Wl,-soname,${SO_NAME} + LD_SODEPDOM = -Wl,-soname,${SO_DEPDOM} endif +#=============== DRAGONFLY SPECIFIC OPTIONS ========================= @@ -24,10 +24,10 @@ $NetBSD: patch-af,v 1.5 2005/12/31 00:56:42 joerg Exp $ #=============== NETBSD SPECIFIC OPTIONS ========================= ifeq (${PLATFORM}, NETBSD) MAKE_SHARED = ${CXX} -D${PLATFORM} -shared -fPIC ${LDFLAGS} -@@ -579,6 +594,11 @@ ifeq (${PLATFORM}, CYGWIN) +@@ -682,6 +697,11 @@ LINK_LIBNAME=xercesc + LIBDEPDOM=libxercesdepdom endif - +ifeq (${TRANSCODER}, IconvGNU) + ALLLIBS += -liconv +endif diff --git a/textproc/xerces-c/patches/patch-ag b/textproc/xerces-c/patches/patch-ag index c8655da362a..04480485c95 100644 --- a/textproc/xerces-c/patches/patch-ag +++ b/textproc/xerces-c/patches/patch-ag @@ -1,23 +1,28 @@ -$NetBSD: patch-ag,v 1.4 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-ag,v 1.5 2006/08/10 13:44:22 abs Exp $ ---- ../../tests/runConfigure.orig 2005-12-30 23:54:50.000000000 +0000 -+++ ../../tests/runConfigure -@@ -196,7 +196,7 @@ echo "Extra link options: $linkeroptions - # Now check if the options are correct or not, bail out if incorrect - # - case $platform in -- aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx) -+ aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx | dragonfly) - # platform has been recognized - ;; - *) -@@ -264,6 +264,9 @@ else - elif test $platform = "freebsd"; then - threadingLibs="-pthread -lc_r" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ elif test $platform = "dragonfly"; then -+ threadingLibs="-pthread -lc_r" -+ threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" - elif test $platform = "netbsd"; then - threadingLibs="-pthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" +--- configure.orig 2005-09-07 16:55:53.000000000 +0100 ++++ configure +@@ -1309,6 +1309,7 @@ case "${host}" in + *-*-nto*) platform=QNX ;; + *-*-linux*) platform=LINUX ;; + *-*-freebsd*) platform=FREEBSD ;; ++ *-*-dragonfly*) platform=DRAGONFLY ;; + *-*-netbsd*) platform=NETBSD ;; + *-*-irix*) platform=IRIX ;; + *-*-aix*) platform=AIX +@@ -1520,6 +1521,7 @@ util/Platforms/BeOS/Makefile \ + util/Platforms/QNX/Makefile \ + util/Platforms/Interix/Makefile \ + util/Platforms/Linux/Makefile \ ++util/Platforms/DragonFly/Makefile \ + util/Platforms/FreeBSD/Makefile \ + util/Platforms/NetBSD/Makefile \ + util/Platforms/HPUX/Makefile \ +@@ -1681,6 +1683,7 @@ util/Platforms/QNX/Makefile \ + util/Platforms/Interix/Makefile \ + util/Platforms/Linux/Makefile \ + util/Platforms/FreeBSD/Makefile \ ++util/Platforms/DragonFly/Makefile \ + util/Platforms/NetBSD/Makefile \ + util/Platforms/HPUX/Makefile \ + util/Platforms/OS390/Makefile \ diff --git a/textproc/xerces-c/patches/patch-ah b/textproc/xerces-c/patches/patch-ah index 232ae2a3b29..0167e4fe7bd 100644 --- a/textproc/xerces-c/patches/patch-ah +++ b/textproc/xerces-c/patches/patch-ah @@ -1,12 +1,14 @@ -$NetBSD: patch-ah,v 1.4 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-ah,v 1.5 2006/08/10 13:44:22 abs Exp $ ---- ../../tests/configure.orig 2005-12-30 23:55:36.000000000 +0000 -+++ ../../tests/configure -@@ -1363,6 +1363,7 @@ case "${host}" in - *-*-linux*) platform=LINUX ;; - *-*-nto*) platform=QNX ;; - *-*-freebsd*) platform=FREEBSD ;; -+ *-*-dragonfly*) platform=DRAGONFLY ;; - *-*-netbsd*) platform=NETBSD ;; - *-*-irix*) platform=IRIX ;; - *-*-aix*) platform=AIX ;; +--- dom/impl/DOMDeepNodeListPool.c.orig 2005-09-07 16:54:58.000000000 +0100 ++++ dom/impl/DOMDeepNodeListPool.c +@@ -97,6 +97,9 @@ DOMDeepNodeListPool<TVal>::DOMDeepNodeLi + + fIdPtrs = (TVal**) fMemoryManager->allocate(fIdPtrsCount * sizeof(TVal*));//new TVal*[fIdPtrsCount]; + fIdPtrs[0] = 0; ++ ++ // create default hasher ++ fHash = new (fMemoryManager) HashPtr(); + } + + template <class TVal> diff --git a/textproc/xerces-c/patches/patch-ai b/textproc/xerces-c/patches/patch-ai index c02b0f66ea9..a67eab06127 100644 --- a/textproc/xerces-c/patches/patch-ai +++ b/textproc/xerces-c/patches/patch-ai @@ -1,13 +1,23 @@ -$NetBSD: patch-ai,v 1.4 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-ai,v 1.5 2006/08/10 13:44:22 abs Exp $ ---- ../../tests/ThreadTest/ThreadTest.cpp.orig 2005-12-30 23:56:17.000000000 +0000 -+++ ../../tests/ThreadTest/ThreadTest.cpp -@@ -122,7 +122,7 @@ void ThreadFuncs::startThread(ThreadFunc - } +--- runConfigure.orig 2005-09-07 16:55:53.000000000 +0100 ++++ runConfigure +@@ -251,7 +251,7 @@ echo "Extra configure options: $configur + # - --#elif defined (AIX) || defined(SOLARIS) || defined(LINUX) || defined(HPUX) || defined (OS390) || defined(FREEBSD) || defined(__CYGWIN__) || defined(__QNXNTO__) -+#elif defined (AIX) || defined(SOLARIS) || defined(LINUX) || defined(HPUX) || defined (OS390) || defined(FREEBSD) || defined(__CYGWIN__) || defined(__QNXNTO__) || defined(DRAGONFLY) - #include <pthread.h> - #include <unistd.h> - #include <errno.h> + case $platform in +- aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10 | hp-11 | os400 | os390 | irix | ptx | tru64 | macosx | cygwin | qnx | interix | mingw-msys) ++ aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10 | hp-11 | os400 | os390 | irix | ptx | tru64 | macosx | cygwin | qnx | interix | mingw-msys | dragonfly) + # platform has been recognized + ;; + *) +@@ -334,6 +334,9 @@ else + elif test $platform = "freebsd"; then + threadingLibs="-pthread -lc_r" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ elif test $platform = "dragonfly"; then ++ threadingLibs="-pthread -lc_r" ++ threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" + elif test $platform = "netbsd"; then + threadingLibs="-pthread -lpthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" diff --git a/textproc/xerces-c/patches/patch-aj b/textproc/xerces-c/patches/patch-aj index a8e97bdd44f..b9c67421a32 100644 --- a/textproc/xerces-c/patches/patch-aj +++ b/textproc/xerces-c/patches/patch-aj @@ -1,26 +1,14 @@ -$NetBSD: patch-aj,v 1.3 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-aj,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- ../../tests/Makefile.incl.orig 2005-12-30 23:56:39.000000000 +0000 -+++ ../../tests/Makefile.incl -@@ -234,6 +234,21 @@ ifeq (${PLATFORM}, FREEBSD) - SHLIBSUFFIX=.so - endif - -+#=============== DRAGONFLY SPECIFIC OPTIONS ========================= -+ifeq (${PLATFORM}, DRAGONFLY) -+ CMP= -c ${CXXFLAGS} -+ CC= ${COMPILER} -c -D${PLATFORM} -fPIC -+ LINK = ${COMPILER} -D${PLATFORM} -fPIC ${LDFLAGS} -+ PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib -+ ifdef ICUROOT -+ PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT} -+ EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS} -+ else -+ EXTRA_LINK_OPTIONS=${EXTRA_LIBS} -lstdc++ -+ endif -+ SHLIBSUFFIX=.so -+endif -+ - #=============== NETBSD SPECIFIC OPTIONS ========================= - ifeq (${PLATFORM}, NETBSD) - CMP= -c ${CXXFLAGS} +--- util/AutoSense.hpp.orig 2005-09-07 16:55:50.000000000 +0100 ++++ util/AutoSense.hpp +@@ -61,6 +61,9 @@ + #elif defined(__FreeBSD__) + #define XML_FREEBSD + #define XML_UNIX ++#elif defined(__DragonFly__) ++ #define XML_DRAGONFLY ++ #define XML_UNIX + #elif defined(IRIX) || defined(__sgi) + #define XML_IRIX + #define XML_UNIX diff --git a/textproc/xerces-c/patches/patch-ak b/textproc/xerces-c/patches/patch-ak index 5b44bebd53b..de414d16a6d 100644 --- a/textproc/xerces-c/patches/patch-ak +++ b/textproc/xerces-c/patches/patch-ak @@ -1,26 +1,89 @@ -$NetBSD: patch-ak,v 1.3 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-ak,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- ../../samples/Makefile.incl.orig 2005-12-30 23:57:33.000000000 +0000 -+++ ../../samples/Makefile.incl -@@ -235,6 +235,21 @@ ifeq (${PLATFORM}, FREEBSD) - SHLIBSUFFIX=.so - endif - -+#=============== DRAGONFLY SPECIFIC OPTIONS ========================= -+ifeq (${PLATFORM}, DRAGONFLY) -+ CMP= -c ${CXXFLAGS} -+ CC= ${COMPILER} -c -D${PLATFORM} -fPIC -+ LINK = ${COMPILER} -D${PLATFORM} -fPIC ${LDFLAGS} -+ PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib -+ ifdef ICUROOT -+ PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT} -+ EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS} -+ else -+ EXTRA_LINK_OPTIONS=${EXTRA_LIBS} -lstdc++ -+ endif -+ SHLIBSUFFIX=.so -+endif +--- util/Platforms/DragonFly/Makefile.in.orig 2006-04-26 14:02:54.000000000 +0100 ++++ util/Platforms/DragonFly/Makefile.in +@@ -0,0 +1,84 @@ ++# ++# The Apache Software License, Version 1.1 ++# ++# Copyright (c) 2001 The Apache Software Foundation. All rights ++# reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions ++# are met: ++# ++# 1. Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# ++# 2. Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in ++# the documentation and/or other materials provided with the ++# distribution. ++# ++# 3. The end-user documentation included with the redistribution, ++# if any, must include the following acknowledgment: ++# "This product includes software developed by the ++# Apache Software Foundation (http://www.apache.org/)." ++# Alternately, this acknowledgment may appear in the software itself, ++# if and wherever such third-party acknowledgments normally appear. ++# ++# 4. The names "Xerces" and "Apache Software Foundation" must ++# not be used to endorse or promote products derived from this ++# software without prior written permission. For written ++# permission, please contact apache\@apache.org. ++# ++# 5. Products derived from this software may not be called "Apache", ++# nor may "Apache" appear in their name, without prior written ++# permission of the Apache Software Foundation. ++# ++# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ++# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ++# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++# SUCH DAMAGE. ++# ==================================================================== ++# ++# This software consists of voluntary contributions made by many ++# individuals on behalf of the Apache Software Foundation, and was ++# originally based on software copyright (c) 2001, International ++# Business Machines, Inc., http://www.ibm.com . For more information ++# on the Apache Software Foundation, please see ++# <http://www.apache.org/>. ++# ++# + - #=============== NETBSD SPECIFIC OPTIONS ========================= - ifeq (${PLATFORM}, NETBSD) - CMP= -c ${CXXFLAGS} ++PLATFORM = @platform@ ++CC = @cc@ ++CXX = @cxx@ ++GCC = @GCC@ ++GXX = @GXX@ ++CXXFLAGS = @cxxflags@ ++CFLAGS = @cflags@ ++PREFIX = @prefix@ ++PREFIX_INCLUDE = @prefix_include@ ++LDFLAGS = @ldflags@ ++LIBS = @libs@ ++OSVER = @osver@ ++USELIBWWW = @uselibwww@ ++MESSAGELOADER = @messageloader@ ++TRANSCODER = @transcoder@ ++THREADS = @threads@ ++ ++MODULE = util ++ ++include ../../../Makefile.incl ++ ++SUBMODULE = Platforms/DragonFly ++CXXFLAGS += -D_GNU_SOURCE -D__USE_GNU ++CPP_PUBHEADERS = DragonFlyDefs.hpp ++CPP_OBJECTS = DragonFlyPlatformUtils.$(TO) ++ ++include ../../Makefile.util.submodule diff --git a/textproc/xerces-c/patches/patch-al b/textproc/xerces-c/patches/patch-al index e23d6962247..064e4ff62a1 100644 --- a/textproc/xerces-c/patches/patch-al +++ b/textproc/xerces-c/patches/patch-al @@ -1,12 +1,14 @@ -$NetBSD: patch-al,v 1.3 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-al,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- ../../samples/configure.orig 2005-12-30 23:58:23.000000000 +0000 -+++ ../../samples/configure -@@ -1363,6 +1363,7 @@ case "${host}" in - *-*-linux*) platform=LINUX ;; - *-*-nto*) platform=QNX ;; - *-*-freebsd*) platform=FREEBSD ;; -+ *-*-dragonfly*) platform=DRAGONFLY ;; - *-*-netbsd*) platform=NETBSD ;; - *-*-irix*) platform=IRIX ;; - *-*-aix*) platform=AIX ;; +--- util/Platforms/Makefile.in.orig 2005-09-07 16:55:34.000000000 +0100 ++++ util/Platforms/Makefile.in +@@ -149,6 +149,9 @@ endif + ifeq (${PLATFORM}, FREEBSD) + SUBMODULE = FreeBSD + endif ++ifeq (${PLATFORM}, DRAGONFLY) ++ SUBMODULE = DragonFly ++endif + ifeq (${PLATFORM}, NETBSD) + SUBMODULE = NetBSD + endif diff --git a/textproc/xerces-c/patches/patch-am b/textproc/xerces-c/patches/patch-am index 28d1b39b5d9..59744537b16 100644 --- a/textproc/xerces-c/patches/patch-am +++ b/textproc/xerces-c/patches/patch-am @@ -1,23 +1,22 @@ -$NetBSD: patch-am,v 1.3 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-am,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- ../../samples/runConfigure.orig 2005-12-30 23:58:45.000000000 +0000 -+++ ../../samples/runConfigure -@@ -196,7 +196,7 @@ echo "Extra link options: $linkeroptions - # Now check if the options are correct or not, bail out if incorrect - # - case $platform in -- aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin) -+ aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | dragonfly) - # platform has been recognized - ;; - *) -@@ -264,6 +264,9 @@ else - elif test $platform = "freebsd"; then - threadingLibs="-pthread -lc_r" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ elif test $platform = "dragonfly"; then -+ threadingLibs="-pthread -lc_r" -+ threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" - elif test $platform = "netbsd"; then - threadingLibs="-pthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" +--- util/Platforms/NetBSD/NetBSDPlatformUtils.cpp.orig 2005-09-07 16:55:30.000000000 +0100 ++++ util/Platforms/NetBSD/NetBSDPlatformUtils.cpp +@@ -54,6 +54,8 @@ + + #if defined(XML_USE_ICU_TRANSCODER) + #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp> ++#elif defined (XML_USE_GNU_TRANSCODER) ++ #include <xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.hpp> + #else + // Use native transcoder. Same as -DXML_USE_NATIVE_TRANSCODER + #include <xercesc/util/Transcoders/Iconv/IconvTransService.hpp> +@@ -62,6 +64,8 @@ + + #if defined(XML_USE_ICU_MESSAGELOADER) + #include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp> ++#elif defined(XML_USE_ICONV_MESSAGELOADER) ++ #include <xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp> + #else + // Same as -DXML_USE_INMEM_MESSAGELOADER + #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp> diff --git a/textproc/xerces-c/patches/patch-an b/textproc/xerces-c/patches/patch-an index 4a6fcfbd749..d790a2a8c9c 100644 --- a/textproc/xerces-c/patches/patch-an +++ b/textproc/xerces-c/patches/patch-an @@ -1,28 +1,168 @@ -$NetBSD: patch-an,v 1.3 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-an,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- configure.orig 2005-12-31 00:00:01.000000000 +0000 -+++ configure -@@ -1309,6 +1309,7 @@ case "${host}" in - *-*-nto*) platform=QNX ;; - *-*-linux*) platform=LINUX ;; - *-*-freebsd*) platform=FREEBSD ;; -+ *-*-dragonfly*) platform=DRAGONFLY ;; - *-*-netbsd*) platform=NETBSD ;; - *-*-irix*) platform=IRIX ;; - *-*-aix*) platform=AIX -@@ -1512,6 +1513,7 @@ util/Platforms/AIX/Makefile \ - util/Platforms/BeOS/Makefile \ - util/Platforms/QNX/Makefile \ - util/Platforms/Linux/Makefile \ -+util/Platforms/DragonFly/Makefile \ - util/Platforms/FreeBSD/Makefile \ - util/Platforms/NetBSD/Makefile \ - util/Platforms/HPUX/Makefile \ -@@ -1669,6 +1671,7 @@ util/Platforms/BeOS/Makefile \ - util/Platforms/QNX/Makefile \ - util/Platforms/Linux/Makefile \ - util/Platforms/FreeBSD/Makefile \ -+util/Platforms/DragonFly/Makefile \ - util/Platforms/NetBSD/Makefile \ - util/Platforms/HPUX/Makefile \ - util/Platforms/OS390/Makefile \ +--- util/RefArrayOf.c.orig 2005-09-07 16:55:50.000000000 +0100 ++++ util/RefArrayOf.c +@@ -39,9 +39,9 @@ RefArrayOf<TElem>::RefArrayOf(const unsi + , fArray(0) + , fMemoryManager(manager) + { +- fArray = (TElem**) fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; +- for (unsigned int index = 0; index < fSize; index++) +- fArray[index] = 0; ++ this->fArray = (TElem**) this->fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; ++ for (unsigned int index = 0; index < this->fSize; index++) ++ this->fArray[index] = 0; + } + + template <class TElem> +@@ -53,9 +53,9 @@ RefArrayOf<TElem>::RefArrayOf(TElem* val + , fArray(0) + , fMemoryManager(manager) + { +- fArray = (TElem**) fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; +- for (unsigned int index = 0; index < fSize; index++) +- fArray[index] = values[index]; ++ this->fArray = (TElem**) this->fMemoryManager->allocate(this->fSize * sizeof(TElem*));//new TElem*[fSize]; ++ for (unsigned int index = 0; index < this->fSize; index++) ++ this->fArray[index] = values[index]; + } + + template <class TElem> RefArrayOf<TElem>:: +@@ -65,14 +65,14 @@ RefArrayOf(const RefArrayOf<TElem>& sour + , fArray(0) + , fMemoryManager(source.fMemoryManager) + { +- fArray = (TElem**) fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; +- for (unsigned int index = 0; index < fSize; index++) +- fArray[index] = source.fArray[index]; ++ this->fArray = (TElem**) this->fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; ++ for (unsigned int index = 0; index < this->fSize; index++) ++ this->fArray[index] = source.fArray[index]; + } + + template <class TElem> RefArrayOf<TElem>::~RefArrayOf() + { +- fMemoryManager->deallocate(fArray);//delete [] fArray; ++ this->fMemoryManager->deallocate(this->fArray);//delete [] fArray; + } + + +@@ -84,7 +84,7 @@ operator[](const unsigned int index) + { + if (index >= fSize) + ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Array_BadIndex, fMemoryManager); +- return fArray[index]; ++ return this->fArray[index]; + } + + template <class TElem> const TElem* RefArrayOf<TElem>:: +@@ -92,7 +92,7 @@ operator[](const unsigned int index) con + { + if (index >= fSize) + ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Array_BadIndex, fMemoryManager); +- return fArray[index]; ++ return this->fArray[index]; + } + + template <class TElem> RefArrayOf<TElem>& RefArrayOf<TElem>:: +@@ -104,14 +104,14 @@ operator=(const RefArrayOf<TElem>& toAss + // Reallocate if not the same size + if (toAssign.fSize != fSize) + { +- fMemoryManager->deallocate(fArray);//delete [] fArray; +- fSize = toAssign.fSize; +- fArray = (TElem**) fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; ++ this->fMemoryManager->deallocate(this->fArray);//delete [] fArray; ++ this->fSize = toAssign.fSize; ++ this->fArray = (TElem**) this->fMemoryManager->allocate(this->fSize * sizeof(TElem*));//new TElem*[fSize]; + } + + // Copy over the source elements + for (unsigned int index = 0; index < fSize; index++) +- fArray[index] = toAssign.fArray[index]; ++ this->fArray[index] = toAssign.fArray[index]; + + return *this; + } +@@ -182,16 +182,16 @@ template <class TElem> void RefArrayOf<T + if (index >= fSize) + ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Array_BadIndex, fMemoryManager); + +- delete fArray[index]; +- fArray[index] = 0; ++ delete this->fArray[index]; ++ this->fArray[index] = 0; + } + + template <class TElem> void RefArrayOf<TElem>::deleteAllElements() + { +- for (unsigned int index = 0; index < fSize; index++) ++ for (unsigned int index = 0; index < this->fSize; index++) + { + delete fArray[index]; +- fArray[index] = 0; ++ this->fArray[index] = 0; + } + } + +@@ -204,7 +204,7 @@ template <class TElem> void RefArrayOf<T + ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Array_BadNewSize, fMemoryManager); + + // Allocate the new array +- TElem** newArray = (TElem**) fMemoryManager->allocate ++ TElem** newArray = (TElem**) this->fMemoryManager->allocate + ( + newSize * sizeof(TElem*) + );//new TElem*[newSize]; +@@ -212,15 +212,15 @@ template <class TElem> void RefArrayOf<T + // Copy the existing values + unsigned int index = 0; + for (; index < fSize; index++) +- newArray[index] = fArray[index]; ++ newArray[index] = this->fArray[index]; + + for (; index < newSize; index++) + newArray[index] = 0; + + // Delete the old array and udpate our members +- fMemoryManager->deallocate(fArray);//delete [] fArray; +- fArray = newArray; +- fSize = newSize; ++ this->fMemoryManager->deallocate(fArray);//delete [] fArray; ++ this->fArray = newArray; ++ this->fSize = newSize; + } + + +@@ -241,7 +241,7 @@ RefArrayEnumerator( RefArrayOf<T + template <class TElem> RefArrayEnumerator<TElem>::~RefArrayEnumerator() + { + if (fAdopted) +- delete fToEnum; ++ delete this->fToEnum; + } + + +@@ -250,19 +250,19 @@ template <class TElem> RefArrayEnumerato + // --------------------------------------------------------------------------- + template <class TElem> bool RefArrayEnumerator<TElem>::hasMoreElements() const + { +- if (fCurIndex >= fToEnum->length()) ++ if (fCurIndex >= this->fToEnum->length()) + return false; + return true; + } + + template <class TElem> TElem& RefArrayEnumerator<TElem>::nextElement() + { +- return *(*fToEnum)[fCurIndex++]; ++ return *(*this->fToEnum)[this->fCurIndex++]; + } + + template <class TElem> void RefArrayEnumerator<TElem>::Reset() + { +- fCurIndex = 0; ++ this->fCurIndex = 0; + } + + XERCES_CPP_NAMESPACE_END diff --git a/textproc/xerces-c/patches/patch-ao b/textproc/xerces-c/patches/patch-ao index da5ec432ad7..ac653a39d7d 100644 --- a/textproc/xerces-c/patches/patch-ao +++ b/textproc/xerces-c/patches/patch-ao @@ -1,23 +1,14 @@ -$NetBSD: patch-ao,v 1.3 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-ao,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- runConfigure.orig 2005-12-31 00:00:43.000000000 +0000 -+++ runConfigure -@@ -227,7 +227,7 @@ echo "Extra configure options: $configur - # +--- util/RefHash3KeysIdPool.c.orig 2005-09-07 16:55:51.000000000 +0100 ++++ util/RefHash3KeysIdPool.c +@@ -97,6 +97,9 @@ RefHash3KeysIdPool<TVal>::RefHash3KeysId + fIdPtrsCount = 256; + fIdPtrs = (TVal**) fMemoryManager->allocate(fIdPtrsCount * sizeof(TVal*)); //new TVal*[fIdPtrsCount]; + fIdPtrs[0] = 0; ++ ++ // create default hasher ++ fHash = new (fMemoryManager) HashXMLCh(); + } - case $platform in -- aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx) -+ aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx | dragonfly) - # platform has been recognized - ;; - *) -@@ -305,6 +305,9 @@ else - elif test $platform = "freebsd"; then - threadingLibs="-pthread -lc_r" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ elif test $platform = "dragonfly"; then -+ threadingLibs="-pthread -lc_r" -+ threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" - elif test $platform = "netbsd"; then - threadingLibs="-pthread -lpthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" + template <class TVal> diff --git a/textproc/xerces-c/patches/patch-ap b/textproc/xerces-c/patches/patch-ap index f138af714c5..03c789a74a2 100644 --- a/textproc/xerces-c/patches/patch-ap +++ b/textproc/xerces-c/patches/patch-ap @@ -1,14 +1,61 @@ -$NetBSD: patch-ap,v 1.3 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-ap,v 1.4 2006/08/10 13:44:22 abs Exp $ ---- util/AutoSense.hpp.orig 2005-12-31 00:01:35.000000000 +0000 -+++ util/AutoSense.hpp -@@ -222,6 +222,9 @@ - #elif defined(__FreeBSD__) - #define XML_FREEBSD - #define XML_UNIX -+#elif defined(__DragonFly__) -+ #define XML_DRAGONFLY -+ #define XML_UNIX - #elif defined(IRIX) || defined(__sgi) - #define XML_IRIX - #define XML_UNIX +--- util/Transcoders/IconvGNU/IconvGNUTransService.cpp.orig 2005-09-07 16:55:44.000000000 +0100 ++++ util/Transcoders/IconvGNU/IconvGNUTransService.cpp +@@ -26,7 +26,11 @@ + #include <locale.h> + #include <iconv.h> + #include <errno.h> ++#ifdef __NetBSD__ ++#include <machine/endian.h> ++#else + #include <endian.h> ++#endif + + #include <xercesc/util/XMLString.hpp> + #include <xercesc/util/XMLUniDefs.hpp> +@@ -243,7 +247,7 @@ XMLCh IconvGNUWrapper::toUpper (const + xmlChToMbc (ch, wcbuf); + + char tmpArr[4]; +- char* ptr = wcbuf; ++ const char* ptr = wcbuf; + size_t len = fUChSize; + char *pTmpArr = tmpArr; + size_t bLen = 2; +@@ -275,7 +279,7 @@ XMLCh IconvGNUWrapper::toLower (const + xmlChToMbc (ch, wcbuf); + + char tmpArr[4]; +- char* ptr = wcbuf; ++ const char* ptr = wcbuf; + size_t len = fUChSize; + char *pTmpArr = tmpArr; + size_t bLen = 2; +@@ -307,7 +311,7 @@ bool IconvGNUWrapper::isSpace(const X + char tmpArr[4]; + + xmlChToMbc (toCheck, wcbuf); +- char* ptr = wcbuf; ++ const char* ptr = wcbuf; + size_t len = fUChSize; + char *pTmpArr = tmpArr; + size_t bLen = 2; +@@ -408,7 +412,7 @@ size_t IconvGNUWrapper::iconvFrom ( c + size_t toLen ) const + { + ICONV_LOCK; +- char ** tmpPtr = (char**)&fromPtr; ++ const char ** tmpPtr = &fromPtr; + return ::iconv (fCDFrom, tmpPtr, fromLen, toPtr, &toLen); + } + +@@ -418,7 +422,7 @@ size_t IconvGNUWrapper::iconvTo ( con + size_t toLen ) const + { + ICONV_LOCK; +- char ** tmpPtr = (char**)&fromPtr; ++ const char ** tmpPtr = &fromPtr; + return ::iconv (fCDTo, tmpPtr, fromLen, toPtr, &toLen); + } + diff --git a/textproc/xerces-c/patches/patch-aq b/textproc/xerces-c/patches/patch-aq index 71b7038ffb3..e7c33a6ab44 100644 --- a/textproc/xerces-c/patches/patch-aq +++ b/textproc/xerces-c/patches/patch-aq @@ -1,14 +1,15 @@ -$NetBSD: patch-aq,v 1.1 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-aq,v 1.2 2006/08/10 13:44:22 abs Exp $ ---- util/Platforms/Makefile.in.orig 2005-12-31 00:12:22.000000000 +0000 -+++ util/Platforms/Makefile.in -@@ -172,6 +172,9 @@ endif - ifeq (${PLATFORM}, FREEBSD) - SUBMODULE = FreeBSD - endif -+ifeq (${PLATFORM}, DRAGONFLY) -+ SUBMODULE = DragonFly -+endif - ifeq (${PLATFORM}, NETBSD) - SUBMODULE = NetBSD - endif +--- util/XercesDefs.hpp.orig 2005-09-07 16:55:50.000000000 +0100 ++++ util/XercesDefs.hpp +@@ -266,6 +266,10 @@ + #include <xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp> + #endif + ++#if defined(XML_DRAGONFLY) ++#include <xercesc/util/Platforms/DragonFly/DragonFlyDefs.hpp> ++#endif ++ + #if defined(XML_OS390) + #include <xercesc/util/Platforms/OS390/OS390Defs.hpp> + #endif diff --git a/textproc/xerces-c/patches/patch-ar b/textproc/xerces-c/patches/patch-ar index 1d1ec1c6bbb..c5f0b954d7c 100644 --- a/textproc/xerces-c/patches/patch-ar +++ b/textproc/xerces-c/patches/patch-ar @@ -1,15 +1,26 @@ -$NetBSD: patch-ar,v 1.1 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-ar,v 1.2 2006/08/10 13:44:22 abs Exp $ ---- util/XercesDefs.hpp.orig 2005-12-31 00:13:13.000000000 +0000 -+++ util/XercesDefs.hpp -@@ -280,6 +280,10 @@ - #include <xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp> - #endif +--- ../../tests/Makefile.incl.orig 2005-09-07 16:56:40.000000000 +0100 ++++ ../../tests/Makefile.incl +@@ -240,6 +240,21 @@ ifeq (${PLATFORM}, FREEBSD) + SHLIBSUFFIX=.so + endif -+#if defined(XML_DRAGONFLY) -+#include <xercesc/util/Platforms/DragonFly/DragonFlyDefs.hpp> -+#endif ++#=============== DRAGONFLY SPECIFIC OPTIONS ========================= ++ifeq (${PLATFORM}, DRAGONFLY) ++ CMP= -c ${CXXFLAGS} ++ CC= ${COMPILER} -c -D${PLATFORM} -fPIC ++ LINK = ${COMPILER} -D${PLATFORM} -fPIC ${LDFLAGS} ++ PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib ++ ifdef ICUROOT ++ PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT} ++ EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS} ++ else ++ EXTRA_LINK_OPTIONS=${EXTRA_LIBS} -lstdc++ ++ endif ++ SHLIBSUFFIX=.so ++endif + - #if defined(XML_OS390) - #include <xercesc/util/Platforms/OS390/OS390Defs.hpp> - #endif + #=============== NETBSD SPECIFIC OPTIONS ========================= + ifeq (${PLATFORM}, NETBSD) + CMP= -c ${CXXFLAGS} diff --git a/textproc/xerces-c/patches/patch-as b/textproc/xerces-c/patches/patch-as index 19696bf4cdd..7bc63fc99a6 100644 --- a/textproc/xerces-c/patches/patch-as +++ b/textproc/xerces-c/patches/patch-as @@ -1,74 +1,12 @@ -$NetBSD: patch-as,v 1.1 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-as,v 1.2 2006/08/10 13:44:22 abs Exp $ ---- /dev/null 2005-12-31 00:16:10.000000000 +0000 -+++ util/Platforms/DragonFly/DragonFlyDefs.hpp -@@ -0,0 +1,69 @@ -+/* -+ * The Apache Software License, Version 1.1 -+ * -+ * Copyright (c) 1999-2000 The Apache Software Foundation. All rights -+ * reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * -+ * 3. The end-user documentation included with the redistribution, -+ * if any, must include the following acknowledgment: -+ * "This product includes software developed by the -+ * Apache Software Foundation (http://www.apache.org/)." -+ * Alternately, this acknowledgment may appear in the software itself, -+ * if and wherever such third-party acknowledgments normally appear. -+ * -+ * 4. The names "Xerces" and "Apache Software Foundation" must -+ * not be used to endorse or promote products derived from this -+ * software without prior written permission. For written -+ * permission, please contact apache\@apache.org. -+ * -+ * 5. Products derived from this software may not be called "Apache", -+ * nor may "Apache" appear in their name, without prior written -+ * permission of the Apache Software Foundation. -+ * -+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR -+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ * ==================================================================== -+ * -+ * This software consists of voluntary contributions made by many -+ * individuals on behalf of the Apache Software Foundation, and was -+ * originally based on software copyright (c) 1999, International -+ * Business Machines, Inc., http://www.ibm.com . For more information -+ * on the Apache Software Foundation, please see -+ * <http://www.apache.org/>. -+ */ -+ -+/* -+ * -+ * -+ */ -+ -+ -+#define ENDIANMODE_LITTLE -+ -+typedef void* FileHandle; -+ -+#ifndef DRAGONFLY -+#define DRAGONFLY -+#endif +--- ../../tests/configure.orig 2005-09-07 16:56:40.000000000 +0100 ++++ ../../tests/configure +@@ -1363,6 +1363,7 @@ case "${host}" in + *-*-linux*) platform=LINUX ;; + *-*-nto*) platform=QNX ;; + *-*-freebsd*) platform=FREEBSD ;; ++ *-*-dragonfly*) platform=DRAGONFLY ;; + *-*-netbsd*) platform=NETBSD ;; + *-*-irix*) platform=IRIX ;; + *-*-aix*) platform=AIX ;; diff --git a/textproc/xerces-c/patches/patch-at b/textproc/xerces-c/patches/patch-at index 36077dc4109..adde0612e1e 100644 --- a/textproc/xerces-c/patches/patch-at +++ b/textproc/xerces-c/patches/patch-at @@ -1,667 +1,14 @@ -$NetBSD: patch-at,v 1.1 2005/12/31 00:56:42 joerg Exp $ +$NetBSD: patch-at,v 1.2 2006/08/10 13:44:22 abs Exp $ ---- /dev/null 2005-12-31 00:16:30.000000000 +0000 -+++ util/Platforms/DragonFly/DragonFlyPlatformUtils.cpp -@@ -0,0 +1,662 @@ -+/* -+ * The Apache Software License, Version 1.1 -+ * -+ * Copyright (c) 1999-2000 The Apache Software Foundation. All rights -+ * reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * -+ * 3. The end-user documentation included with the redistribution, -+ * if any, must include the following acknowledgment: -+ * "This product includes software developed by the -+ * Apache Software Foundation (http://www.apache.org/)." -+ * Alternately, this acknowledgment may appear in the software itself, -+ * if and wherever such third-party acknowledgments normally appear. -+ * -+ * 4. The names "Xerces" and "Apache Software Foundation" must -+ * not be used to endorse or promote products derived from this -+ * software without prior written permission. For written -+ * permission, please contact apache\@apache.org. -+ * -+ * 5. Products derived from this software may not be called "Apache", -+ * nor may "Apache" appear in their name, without prior written -+ * permission of the Apache Software Foundation. -+ * -+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR -+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ * ==================================================================== -+ * -+ * This software consists of voluntary contributions made by many -+ * individuals on behalf of the Apache Software Foundation, and was -+ * originally based on software copyright (c) 1999, International -+ * Business Machines, Inc., http://www.ibm.com . For more information -+ * on the Apache Software Foundation, please see -+ * <http://www.apache.org/>. -+ */ -+ -+/* -+ * -+ * -+ */ -+ -+ -+// --------------------------------------------------------------------------- -+// Includes -+// --------------------------------------------------------------------------- -+ -+#if !defined(APP_NO_THREADS) -+#include <pthread.h> -+#endif -+ -+/* #ifndef __USE_UNIX98 -+ #error __USE_UNIX98 is not defined in your compile settings -+#endif */ -+ -+#include <unistd.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <errno.h> -+#include <libgen.h> -+#include <sys/time.h> -+#include <string.h> -+#include <strings.h>/* for strcasecmp & strncasecmp */ -+#include <wchar.h> /* for win_t */ -+#include <xercesc/util/PlatformUtils.hpp> -+#include <xercesc/util/RuntimeException.hpp> -+#include <xercesc/util/Janitor.hpp> -+#include <xercesc/util/Mutexes.hpp> -+#include <xercesc/util/XMLString.hpp> -+#include <xercesc/util/XMLUniDefs.hpp> -+#include <xercesc/util/XMLUni.hpp> -+#include <xercesc/util/PanicHandler.hpp> -+ -+#if defined(XML_USE_ICU_TRANSCODER) -+ #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp> -+#elif defined (XML_USE_GNU_TRANSCODER) -+ #include <xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.hpp> -+#else -+ // Use native transcoder. Same as -DXML_USE_NATIVE_TRANSCODER -+ #include <xercesc/util/Transcoders/Iconv/IconvTransService.hpp> -+#endif -+ -+ -+#if defined(XML_USE_ICU_MESSAGELOADER) -+ #include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp> -+#elif defined(XML_USE_ICONV_MESSAGELOADER) -+ #include <xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp> -+#else -+ // Same as -DXML_USE_INMEM_MESSAGELOADER -+ #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp> -+#endif -+ -+ -+#if defined (XML_USE_NETACCESSOR_SOCKET) -+ #include <xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp> -+#endif -+ -+XERCES_CPP_NAMESPACE_BEGIN -+ -+// --------------------------------------------------------------------------- -+// Local Methods -+// --------------------------------------------------------------------------- -+ -+static void WriteCharStr( FILE* stream, const char* const toWrite) -+{ -+ if (fputs(toWrite, stream) == EOF) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::Strm_StdErrWriteFailure); -+ } -+} -+ -+static void WriteUStrStdErr( const XMLCh* const toWrite) -+{ -+ char* tmpVal = XMLString::transcode(toWrite); -+ ArrayJanitor<char> janText(tmpVal); -+ if (fputs(tmpVal, stderr) == EOF) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::Strm_StdErrWriteFailure); -+ } -+} -+ -+static void WriteUStrStdOut( const XMLCh* const toWrite) -+ { -+ char* tmpVal = XMLString::transcode(toWrite); -+ ArrayJanitor<char> janText(tmpVal); -+ if (fputs(tmpVal, stdout) == EOF) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::Strm_StdOutWriteFailure); -+ } -+} -+ -+XMLNetAccessor* XMLPlatformUtils::makeNetAccessor() -+{ -+#if defined (XML_USE_NETACCESSOR_SOCKET) -+ return new SocketNetAccessor(); -+#else -+ return 0; -+#endif -+} -+ -+// --------------------------------------------------------------------------- -+// XMLPlatformUtils: Private Static Methods -+// --------------------------------------------------------------------------- -+ -+// -+// This method is called by the platform independent part of this class -+// when client code asks to have one of the supported message sets loaded. -+// -+ -+XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain) -+{ -+ XMLMsgLoader* retVal; -+ try -+ { -+#if defined (XML_USE_ICU_MESSAGELOADER) -+ retVal = new ICUMsgLoader(msgDomain); -+#elif defined (XML_USE_ICONV_MESSAGELOADER) -+ retVal = new MsgCatalogLoader(msgDomain); -+#else -+ // same as -DXML_USE_INMEM_MESSAGELOADER -+ retVal = new InMemMsgLoader(msgDomain); -+#endif -+ } -+ -+ catch(...) -+ { -+ panic(PanicHandler::Panic_CantLoadMsgDomain); -+ } -+ return retVal; -+} -+ -+ -+// -+// This method is called very early in the bootstrapping process. This guy -+// must create a transcoding service and return it. It cannot use any string -+// methods, any transcoding services, throw any exceptions, etc... It just -+// makes a transcoding service and returns it, or returns zero on failure. -+// -+ -+XMLTransService* XMLPlatformUtils::makeTransService() -+{ -+#if defined (XML_USE_ICU_TRANSCODER) -+ // Use ICU transcoding services. -+ // same as -DXML_USE_ICU_MESSAGELOADER -+ return new ICUTransService; -+#elif defined (XML_USE_GNU_TRANSCODER) -+ return new IconvGNUTransService; -+#else -+ // Use native transcoding services. -+ // same as -DXML_USE_INMEM_MESSAGELOADER -+ return new IconvTransService; -+ -+#endif -+} -+ -+// --------------------------------------------------------------------------- -+// XMLPlatformUtils: The panic method -+// --------------------------------------------------------------------------- -+void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason) -+{ -+ fgUserPanicHandler? fgUserPanicHandler->panic(reason) : fgDefaultPanicHandler->panic(reason); -+} -+ -+ -+// --------------------------------------------------------------------------- -+// XMLPlatformUtils: File Methods -+// --------------------------------------------------------------------------- -+ -+unsigned int XMLPlatformUtils::curFilePos(FileHandle theFile) -+{ -+ if (theFile == NULL) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ int curPos = ftell( (FILE*)theFile); -+ if (curPos == -1) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotGetSize); -+ -+ return (unsigned int)curPos; -+} -+ -+void XMLPlatformUtils::closeFile(FileHandle theFile) -+{ -+ if (theFile == NULL) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ if (fclose((FILE*)theFile)) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotCloseFile); -+} -+ -+unsigned int XMLPlatformUtils::fileSize(FileHandle theFile) -+{ -+ if (theFile == NULL) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ // Get the current position -+ long int curPos = ftell((FILE*) theFile); -+ if (curPos == -1) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotGetCurPos); -+ -+ // Seek to the end and save that value for return -+ if (fseek((FILE*) theFile, 0, SEEK_END)) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotSeekToEnd); -+ -+ long int retVal = ftell((FILE*)theFile); -+ if (retVal == -1) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotSeekToEnd); -+ -+ // And put the pointer back -+ -+ if (fseek( (FILE*)theFile, curPos, SEEK_SET) ) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotSeekToPos); -+ -+ return (unsigned int)retVal; -+} -+ -+FileHandle XMLPlatformUtils::openFile(const XMLCh* const fileName) -+{ -+ if (fileName == NULL) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ const char* tmpFileName = XMLString::transcode(fileName); -+ ArrayJanitor<char> janText((char*)tmpFileName); -+ FileHandle retVal = (FILE*)fopen( tmpFileName , "r+" ); -+ -+ if (retVal == NULL) -+ return 0; -+ return retVal; -+} -+ -+FileHandle XMLPlatformUtils::openFile(const char* const fileName) -+{ -+ if (fileName == NULL) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ FileHandle retVal = (FILE*)fopen( fileName , "r+" ); -+ -+ if (retVal == NULL) -+ return 0; -+ return retVal; -+} -+ -+FileHandle XMLPlatformUtils::openFileToWrite(const XMLCh* const fileName) -+{ -+ if (fileName == NULL) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ const char* tmpFileName = XMLString::transcode(fileName); -+ ArrayJanitor<char> janText((char*)tmpFileName); -+ -+ FileHandle retVal = (FILE*)fopen( tmpFileName, "r+" ); -+ if (retVal == NULL) -+ return 0; -+ return retVal; -+} -+ -+FileHandle XMLPlatformUtils::openFileToWrite(const char* const fileName) -+{ -+ if (fileName == NULL) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ FileHandle retVal = (FILE*)fopen( fileName, "r+" ); -+ -+ if (retVal == NULL) -+ return 0; -+ return retVal; -+} -+ -+FileHandle XMLPlatformUtils::openStdInHandle() -+{ -+ int nfd = dup(0); -+ if (nfd == -1) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotDupHandle); -+ return (FileHandle)fdopen(dup(0), "r"); -+} -+ -+ -+ -+unsigned int -+XMLPlatformUtils::readFileBuffer( FileHandle theFile -+ , const unsigned int toRead -+ , XMLByte* const toFill) -+{ -+ if ( !theFile || !toFill ) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ if (toRead == 0) -+ return 0; -+ size_t noOfItemsRead = fread((void*) toFill, 1, toRead, (FILE*)theFile); -+ -+ if(ferror((FILE*)theFile)) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotReadFromFile); -+ } -+ -+ return (unsigned int)noOfItemsRead; -+} -+ -+void XMLPlatformUtils::writeBufferToFile( FileHandle const theFile -+ , long toWrite -+ , const XMLByte* const toFlush ) -+{ -+ if ( !theFile || !toFlush ) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ if ( toWrite <= 0 ) -+ return; -+ -+ const XMLByte* tmpFlush = (const XMLByte*) toFlush; -+ size_t bytesWritten = 0; -+ -+ while (true) -+ { -+ bytesWritten = fwrite(tmpFlush, sizeof(XMLByte), toWrite, (FILE*)theFile); -+ -+ if(ferror((FILE*)theFile)) -+ { -+#if 0 -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotWriteToFile); -+#else -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotReadFromFile); -+#endif -+ } -+ -+ if (bytesWritten < (size_t) toWrite) //incomplete write -+ { -+ tmpFlush += bytesWritten; -+ toWrite -= bytesWritten; -+ bytesWritten = 0; -+ } -+ else -+ return; -+ } -+} -+ -+void XMLPlatformUtils::resetFile(FileHandle theFile) -+{ -+ if (theFile == NULL) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::CPtr_PointerIsZero); -+ // Seek to the start of the file -+ if (fseek((FILE*)theFile, 0, SEEK_SET)) -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotResetFile); -+} -+ -+ -+// --------------------------------------------------------------------------- -+// XMLPlatformUtils: Timing Methods -+// --------------------------------------------------------------------------- -+ -+unsigned long XMLPlatformUtils::getCurrentMillis() -+{ -+ struct timeval t; -+ struct timezone tz; -+ -+ gettimeofday(&t, &tz); -+ return (unsigned long)(t.tv_sec*1000 + t.tv_usec); -+} -+ -+XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath, MemoryManager* const) -+{ -+ -+ // -+ // NOTE: THe path provided has always already been opened successfully, -+ // so we know that its not some pathological freaky path. It comes in -+ // in native format, and goes out as Unicode always -+ // -+ char* newSrc = XMLString::transcode(srcPath); -+ ArrayJanitor<char> janText(newSrc); -+ -+ // Use a local buffer that is big enough for the largest legal path -+ char *absPath = new char[1024]; -+ // get the absolute path -+ char* retPath = realpath(newSrc, absPath); -+ ArrayJanitor<char> janText2(retPath); -+ -+ if (!retPath) -+ { -+ ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotGetBasePathName); -+ } -+ return XMLString::transcode(absPath); -+} -+ -+bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck) -+{ -+ // Check for pathological case of empty path -+ if (!toCheck[0]) -+ return false; -+ -+ // -+ // If it starts with a slash, then it cannot be relative. This covers -+ // both something like "\Test\File.xml" and an NT Lan type remote path -+ // that starts with a node like "\\MyNode\Test\File.xml". -+ // -+ if (toCheck[0] == XMLCh('/')) -+ return false; -+ -+ // Else assume its a relative path -+ return true; -+} -+ -+XMLCh* XMLPlatformUtils::getCurrentDirectory(MemoryManager* const) -+{ -+ char dirBuf[PATH_MAX + 1]; -+ char *curDir = getcwd(&dirBuf[0], PATH_MAX + 1); -+ -+ if (!curDir) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::File_CouldNotGetBasePathName); -+ } -+ -+ return XMLString::transcode(curDir); -+} -+ -+inline bool XMLPlatformUtils::isAnySlash(XMLCh c) -+{ -+ return ( chBackSlash == c || chForwardSlash == c); -+} -+ -+ -+// ----------------------------------------------------------------------- -+// Mutex methods -+// ----------------------------------------------------------------------- -+ -+#if !defined(APP_NO_THREADS) -+ -+// --------------------------------------------------------------------------- -+// XMLPlatformUtils: Platform init method -+// --------------------------------------------------------------------------- -+ -+static XMLMutex atomicOpsMutex; -+ -+void XMLPlatformUtils::platformInit() -+{ -+ // -+ // The atomicOps mutex needs to be created early. -+ // Normally, mutexes are created on first use, but there is a -+ // circular dependency between compareAndExchange() and -+ // mutex creation that must be broken. -+ -+ if (atomicOpsMutex.fHandle == 0) -+ atomicOpsMutex.fHandle = XMLPlatformUtils::makeMutex(); -+} -+ -+void* XMLPlatformUtils::makeMutex() -+{ -+ pthread_mutex_t* mutex = new pthread_mutex_t; -+ pthread_mutexattr_t* attr = new pthread_mutexattr_t; -+ pthread_mutexattr_init(attr); -+ pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); -+ if (pthread_mutex_init(mutex, attr)) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::Mutex_CouldNotCreate); -+ } -+ pthread_mutexattr_destroy(attr); -+ delete attr; -+ return (void*)(mutex); -+ -+} -+ -+void XMLPlatformUtils::closeMutex(void* const mtxHandle) -+{ -+ if (mtxHandle != NULL) -+ { -+ if (pthread_mutex_destroy((pthread_mutex_t*) mtxHandle)) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::Mutex_CouldNotDestroy); -+ } -+ delete (pthread_mutex_t*)mtxHandle; -+ } -+} -+ -+ -+void XMLPlatformUtils::lockMutex(void* const mtxHandle) -+{ -+ if (mtxHandle != NULL) -+ { -+ if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle)) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::Mutex_CouldNotLock); -+ } -+ } -+} -+ -+ -+void XMLPlatformUtils::unlockMutex(void* const mtxHandle) -+{ -+ if (mtxHandle != NULL) -+ { -+ if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle)) -+ { -+ ThrowXML(XMLPlatformUtilsException, -+ XMLExcepts::Mutex_CouldNotUnlock); -+ } -+ } -+} -+ -+ -+// ----------------------------------------------------------------------- -+// Miscellaneous synchronization methods -+// ----------------------------------------------------------------------- -+ -+void* XMLPlatformUtils::compareAndSwap(void** toFill -+ , const void* const newValue -+ , const void* const toCompare) -+{ -+ XMLMutexLock lockMutex(&atomicOpsMutex); -+ -+ void *retVal = *toFill; -+ if (*toFill == toCompare) -+ *toFill = (void *)newValue; -+ -+ return retVal; -+} -+ -+int XMLPlatformUtils::atomicIncrement(int &location) -+{ -+ XMLMutexLock localLock(&atomicOpsMutex); -+ -+ return ++location; -+} -+ -+int XMLPlatformUtils::atomicDecrement(int &location) -+{ -+ XMLMutexLock localLock(&atomicOpsMutex); -+ -+ return --location; -+} -+ -+#else // #if !defined (APP_NO_THREADS) -+ -+void XMLPlatformUtils::platformInit() -+{ -+} -+ -+void* XMLPlatformUtils::makeMutex() -+{ -+ return 0; -+} -+ -+void XMLPlatformUtils::closeMutex(void* const mtxHandle) -+{ -+} -+ -+void XMLPlatformUtils::lockMutex(void* const mtxHandle) -+{ -+} -+ -+void XMLPlatformUtils::unlockMutex(void* const mtxHandle) -+{ -+} -+ -+void* XMLPlatformUtils::compareAndSwap (void** toFill, -+ const void* const newValue, -+ const void* const toCompare) -+{ -+ void *retVal = *toFill; -+ if (*toFill == toCompare) -+ *toFill = (void *)newValue; -+ return retVal; -+} -+ -+int XMLPlatformUtils::atomicIncrement(int &location) -+{ -+ return ++location; -+} -+ -+int XMLPlatformUtils::atomicDecrement(int &location) -+{ -+ return --location; -+} -+ -+#endif // APP_NO_THREADS -+ -+void XMLPlatformUtils::platformTerm() -+{ -+#if !defined(APP_NO_THREADS) -+ // delete the mutex we created -+ closeMutex(atomicOpsMutex.fHandle); -+ atomicOpsMutex.fHandle = 0; -+#endif -+} -+ -+#include <xercesc/util/LogicalPath.c> -+ -+XERCES_CPP_NAMESPACE_END +--- ../../tests/runConfigure.orig 2005-09-07 16:56:40.000000000 +0100 ++++ ../../tests/runConfigure +@@ -265,6 +265,9 @@ else + elif test $platform = "freebsd"; then + threadingLibs="-pthread -lc_r" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ elif test $platform = "dragonfly"; then ++ threadingLibs="-pthread -lc_r" ++ threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" + elif test $platform = "netbsd"; then + threadingLibs="-pthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" diff --git a/textproc/xerces-c/patches/patch-au b/textproc/xerces-c/patches/patch-au deleted file mode 100644 index 170f644d614..00000000000 --- a/textproc/xerces-c/patches/patch-au +++ /dev/null @@ -1,89 +0,0 @@ -$NetBSD: patch-au,v 1.1 2005/12/31 00:56:42 joerg Exp $ - ---- /dev/null 2005-12-31 00:15:57.000000000 +0000 -+++ util/Platforms/DragonFly/Makefile.in -@@ -0,0 +1,84 @@ -+# -+# The Apache Software License, Version 1.1 -+# -+# Copyright (c) 2001 The Apache Software Foundation. All rights -+# reserved. -+# -+# Redistribution and use in source and binary forms, with or without -+# modification, are permitted provided that the following conditions -+# are met: -+# -+# 1. Redistributions of source code must retain the above copyright -+# notice, this list of conditions and the following disclaimer. -+# -+# 2. Redistributions in binary form must reproduce the above copyright -+# notice, this list of conditions and the following disclaimer in -+# the documentation and/or other materials provided with the -+# distribution. -+# -+# 3. The end-user documentation included with the redistribution, -+# if any, must include the following acknowledgment: -+# "This product includes software developed by the -+# Apache Software Foundation (http://www.apache.org/)." -+# Alternately, this acknowledgment may appear in the software itself, -+# if and wherever such third-party acknowledgments normally appear. -+# -+# 4. The names "Xerces" and "Apache Software Foundation" must -+# not be used to endorse or promote products derived from this -+# software without prior written permission. For written -+# permission, please contact apache\@apache.org. -+# -+# 5. Products derived from this software may not be called "Apache", -+# nor may "Apache" appear in their name, without prior written -+# permission of the Apache Software Foundation. -+# -+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR -+# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+# SUCH DAMAGE. -+# ==================================================================== -+# -+# This software consists of voluntary contributions made by many -+# individuals on behalf of the Apache Software Foundation, and was -+# originally based on software copyright (c) 2001, International -+# Business Machines, Inc., http://www.ibm.com . For more information -+# on the Apache Software Foundation, please see -+# <http://www.apache.org/>. -+# -+# -+ -+PLATFORM = @platform@ -+CC = @cc@ -+CXX = @cxx@ -+GCC = @GCC@ -+GXX = @GXX@ -+CXXFLAGS = @cxxflags@ -+CFLAGS = @cflags@ -+PREFIX = @prefix@ -+PREFIX_INCLUDE = @prefix_include@ -+LDFLAGS = @ldflags@ -+LIBS = @libs@ -+OSVER = @osver@ -+USELIBWWW = @uselibwww@ -+MESSAGELOADER = @messageloader@ -+TRANSCODER = @transcoder@ -+THREADS = @threads@ -+ -+MODULE = util -+ -+include ../../../Makefile.incl -+ -+SUBMODULE = Platforms/DragonFly -+CXXFLAGS += -D_GNU_SOURCE -D__USE_GNU -+CPP_PUBHEADERS = DragonFlyDefs.hpp -+CPP_OBJECTS = DragonFlyPlatformUtils.$(TO) -+ -+include ../../Makefile.util.submodule diff --git a/textproc/xerces-c/patches/patch-av b/textproc/xerces-c/patches/patch-av deleted file mode 100644 index a739b1abdb4..00000000000 --- a/textproc/xerces-c/patches/patch-av +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-av,v 1.1 2005/12/31 00:56:42 joerg Exp $ - ---- util/RefVectorOf.c.orig 2005-12-31 00:35:24.000000000 +0000 -+++ util/RefVectorOf.c -@@ -136,7 +136,7 @@ template <class TElem> RefVectorOf<TElem - for (unsigned int index = 0; index < this->fCurCount; index++) - delete this->fElemList[index]; - } -- fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList; -+ this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList; - } - - diff --git a/textproc/xerces-c/patches/patch-aw b/textproc/xerces-c/patches/patch-aw deleted file mode 100644 index 55901cf1a32..00000000000 --- a/textproc/xerces-c/patches/patch-aw +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-aw,v 1.1 2005/12/31 00:56:42 joerg Exp $ - ---- util/RefArrayVectorOf.c.orig 2005-12-31 00:36:54.000000000 +0000 -+++ util/RefArrayVectorOf.c -@@ -22,12 +22,12 @@ RefArrayVectorOf<TElem>::RefArrayVectorO - - template <class TElem> RefArrayVectorOf<TElem>::~RefArrayVectorOf() - { -- if (fAdoptedElems) -+ if (this->fAdoptedElems) - { -- for (unsigned int index = 0; index < fCurCount; index++) -- fMemoryManager->deallocate(fElemList[index]);//delete[] fElemList[index]; -+ for (unsigned int index = 0; index < this->fCurCount; index++) -+ this->fMemoryManager->deallocate(this->fElemList[index]);//delete[] fElemList[index]; - } -- fMemoryManager->deallocate(fElemList);//delete [] fElemList; -+ this->fMemoryManager->deallocate(this->fElemList);//delete [] fElemList; - } - - diff --git a/textproc/xerces-c/patches/patch-ax b/textproc/xerces-c/patches/patch-ax deleted file mode 100644 index a5cef1208a7..00000000000 --- a/textproc/xerces-c/patches/patch-ax +++ /dev/null @@ -1,171 +0,0 @@ -$NetBSD: patch-ax,v 1.1 2005/12/31 00:56:42 joerg Exp $ - ---- util/RefArrayOf.c.orig 2005-12-31 00:39:18.000000000 +0000 -+++ util/RefArrayOf.c -@@ -105,9 +105,9 @@ RefArrayOf<TElem>::RefArrayOf(const unsi - , fArray(0) - , fMemoryManager(manager) - { -- fArray = (TElem**) fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; -- for (unsigned int index = 0; index < fSize; index++) -- fArray[index] = 0; -+ this->fArray = (TElem**) this->fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; -+ for (unsigned int index = 0; index < this->fSize; index++) -+ this->fArray[index] = 0; - } - - template <class TElem> -@@ -119,9 +119,9 @@ RefArrayOf<TElem>::RefArrayOf(TElem* val - , fArray(0) - , fMemoryManager(manager) - { -- fArray = (TElem**) fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; -- for (unsigned int index = 0; index < fSize; index++) -- fArray[index] = values[index]; -+ this->fArray = (TElem**) this->fMemoryManager->allocate(this->fSize * sizeof(TElem*));//new TElem*[fSize]; -+ for (unsigned int index = 0; index < this->fSize; index++) -+ this->fArray[index] = values[index]; - } - - template <class TElem> RefArrayOf<TElem>:: -@@ -131,14 +131,14 @@ RefArrayOf(const RefArrayOf<TElem>& sour - , fArray(0) - , fMemoryManager(source.fMemoryManager) - { -- fArray = (TElem**) fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; -- for (unsigned int index = 0; index < fSize; index++) -- fArray[index] = source.fArray[index]; -+ this->fArray = (TElem**) this->fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; -+ for (unsigned int index = 0; index < this->fSize; index++) -+ this->fArray[index] = source.fArray[index]; - } - - template <class TElem> RefArrayOf<TElem>::~RefArrayOf() - { -- fMemoryManager->deallocate(fArray);//delete [] fArray; -+ this->fMemoryManager->deallocate(this->fArray);//delete [] fArray; - } - - -@@ -148,9 +148,9 @@ template <class TElem> RefArrayOf<TElem> - template <class TElem> TElem*& RefArrayOf<TElem>:: - operator[](const unsigned int index) - { -- if (index >= fSize) -+ if (index >= this->fSize) - ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::Array_BadIndex); -- return fArray[index]; -+ return this->fArray[index]; - } - - template <class TElem> const TElem* RefArrayOf<TElem>:: -@@ -158,7 +158,7 @@ operator[](const unsigned int index) con - { - if (index >= fSize) - ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::Array_BadIndex); -- return fArray[index]; -+ return this->fArray[index]; - } - - template <class TElem> RefArrayOf<TElem>& RefArrayOf<TElem>:: -@@ -170,14 +170,14 @@ operator=(const RefArrayOf<TElem>& toAss - // Reallocate if not the same size - if (toAssign.fSize != fSize) - { -- fMemoryManager->deallocate(fArray);//delete [] fArray; -- fSize = toAssign.fSize; -- fArray = (TElem**) fMemoryManager->allocate(fSize * sizeof(TElem*));//new TElem*[fSize]; -+ this->fMemoryManager->deallocate(this->fArray);//delete [] fArray; -+ this->fSize = toAssign.fSize; -+ this->fArray = (TElem**) this->fMemoryManager->allocate(this->fSize * sizeof(TElem*));//new TElem*[fSize]; - } - - // Copy over the source elements - for (unsigned int index = 0; index < fSize; index++) -- fArray[index] = toAssign.fArray[index]; -+ this->fArray[index] = toAssign.fArray[index]; - - return *this; - } -@@ -248,16 +248,16 @@ template <class TElem> void RefArrayOf<T - if (index >= fSize) - ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::Array_BadIndex); - -- delete fArray[index]; -- fArray[index] = 0; -+ delete this->fArray[index]; -+ this->fArray[index] = 0; - } - - template <class TElem> void RefArrayOf<TElem>::deleteAllElements() - { -- for (unsigned int index = 0; index < fSize; index++) -+ for (unsigned int index = 0; index < this->fSize; index++) - { - delete fArray[index]; -- fArray[index] = 0; -+ this->fArray[index] = 0; - } - } - -@@ -270,7 +270,7 @@ template <class TElem> void RefArrayOf<T - ThrowXML(IllegalArgumentException, XMLExcepts::Array_BadNewSize); - - // Allocate the new array -- TElem** newArray = (TElem**) fMemoryManager->allocate -+ TElem** newArray = (TElem**) this->fMemoryManager->allocate - ( - newSize * sizeof(TElem*) - );//new TElem*[newSize]; -@@ -278,15 +278,15 @@ template <class TElem> void RefArrayOf<T - // Copy the existing values - unsigned int index = 0; - for (; index < fSize; index++) -- newArray[index] = fArray[index]; -+ newArray[index] = this->fArray[index]; - - for (; index < newSize; index++) - newArray[index] = 0; - - // Delete the old array and udpate our members -- fMemoryManager->deallocate(fArray);//delete [] fArray; -- fArray = newArray; -- fSize = newSize; -+ this->fMemoryManager->deallocate(fArray);//delete [] fArray; -+ this->fArray = newArray; -+ this->fSize = newSize; - } - - -@@ -307,7 +307,7 @@ RefArrayEnumerator( RefArrayOf<T - template <class TElem> RefArrayEnumerator<TElem>::~RefArrayEnumerator() - { - if (fAdopted) -- delete fToEnum; -+ delete this->fToEnum; - } - - -@@ -316,19 +316,19 @@ template <class TElem> RefArrayEnumerato - // --------------------------------------------------------------------------- - template <class TElem> bool RefArrayEnumerator<TElem>::hasMoreElements() const - { -- if (fCurIndex >= fToEnum->length()) -+ if (fCurIndex >= this->fToEnum->length()) - return false; - return true; - } - - template <class TElem> TElem& RefArrayEnumerator<TElem>::nextElement() - { -- return *(*fToEnum)[fCurIndex++]; -+ return *(*this->fToEnum)[this->fCurIndex++]; - } - - template <class TElem> void RefArrayEnumerator<TElem>::Reset() - { -- fCurIndex = 0; -+ this->fCurIndex = 0; - } - - XERCES_CPP_NAMESPACE_END |