svn commit: r345851 - in head/games/glest: . files
Baptiste Daroussin
bapt at FreeBSD.org
Mon Feb 24 14:32:28 UTC 2014
Author: bapt
Date: Mon Feb 24 14:32:27 2014
New Revision: 345851
URL: http://svnweb.freebsd.org/changeset/ports/345851
QAT: https://qat.redports.org/buildarchive/r345851/
Log:
Make glest use xerces-c3
Obtained from: Gentoo
Added:
head/games/glest/files/patch-xerces-c3 (contents, props changed)
Modified:
head/games/glest/Makefile
Modified: head/games/glest/Makefile
==============================================================================
--- head/games/glest/Makefile Mon Feb 24 14:19:07 2014 (r345850)
+++ head/games/glest/Makefile Mon Feb 24 14:32:27 2014 (r345851)
@@ -3,7 +3,7 @@
PORTNAME= glest
PORTVERSION= 3.2.2
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20source/${PORTVERSION}
DISTNAME= ${PORTNAME}_source_${PORTVERSION}
@@ -12,8 +12,8 @@ DIST_SUBDIR= ${PORTNAME}
MAINTAINER= acm at FreeBSD.org
COMMENT= Free 3D real-time customizable strategy game
-LIB_DEPENDS= xerces-c.27:${PORTSDIR}/textproc/xerces-c2 \
- vorbis.4:${PORTSDIR}/audio/libvorbis
+LIB_DEPENDS= libxerces-c.so:${PORTSDIR}/textproc/xerces-c3 \
+ libvorbis.so:${PORTSDIR}/audio/libvorbis
BUILD_DEPENDS= jam:${PORTSDIR}/devel/jam
RUN_DEPENDS= ${DATADIR}/servers.ini:${PORTSDIR}/games/glest-data
Added: head/games/glest/files/patch-xerces-c3
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/glest/files/patch-xerces-c3 Mon Feb 24 14:32:27 2014 (r345851)
@@ -0,0 +1,48 @@
+--- source/shared_lib/sources/xml/xml_parser.cpp.orig 2014-02-24 15:26:00.412992000 +0100
++++ source/shared_lib/sources/xml/xml_parser.cpp 2014-02-24 15:28:23.623987237 +0100
+@@ -87,10 +87,17 @@
+
+ try{
+ ErrorHandler errorHandler;
+- DOMBuilder *parser= (static_cast<DOMImplementationLS*>(implementation))->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
+- parser->setErrorHandler(&errorHandler);
+- parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true);
+- parser->setFeature(XMLUni::fgDOMValidation, true);
++#if XERCES_VERSION_MAJOR < 3
++ DOMBuilder *parser= (static_cast<DOMImplementationLS*>(implementation))->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++ parser->setErrorHandler(&errorHandler);
++ parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true);
++ parser->setFeature(XMLUni::fgDOMValidation, true);
++#else
++ DOMLSParser *parser = (static_cast<DOMImplementationLS*>(implementation))->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++ DOMConfiguration *config = parser->getDomConfig();
++ config->setParameter(XMLUni::fgXercesSchemaFullChecking, true);
++ config->setParameter(XMLUni::fgDOMValidate, true);
++#endif
+ DOMDocument *document= parser->parseURI(path.c_str());
+
+ if(document==NULL){
+@@ -119,9 +126,20 @@
+ }
+
+ LocalFileFormatTarget file(path.c_str());
+- DOMWriter* writer = implementation->createDOMWriter();
+- writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
+- writer->writeNode(&file, *document);
++#if XERCES_VERSION_MAJOR < 3
++ DOMWriter* writer = implementation->createDOMWriter();
++ writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
++ writer->writeNode(&file, *document);
++#else
++ DOMLSSerializer *serializer = implementation->createLSSerializer();
++ DOMLSOutput* output=implementation->createLSOutput();
++ DOMConfiguration* config=serializer->getDomConfig();
++ config->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,true);
++ output->setByteStream(&file);
++ serializer->write(document,output);
++ output->release();
++ serializer->release();
++#endif
+ document->release();
+ }
+ catch(const DOMException &e){
More information about the svn-ports-all
mailing list