add tinyxml need for older games who works not with tinyxml2
This commit is contained in:
@@ -0,0 +1,164 @@
|
||||
--- Makefile.orig 2010-08-21 20:52:22.923386908 +0000
|
||||
+++ Makefile 2010-08-21 14:29:13.000000000 +0000
|
||||
@@ -1,130 +1,33 @@
|
||||
-#****************************************************************************
|
||||
-#
|
||||
-# Makefile for TinyXml test.
|
||||
-# Lee Thomason
|
||||
-# www.grinninglizard.com
|
||||
-#
|
||||
-# This is a GNU make (gmake) makefile
|
||||
-#****************************************************************************
|
||||
-
|
||||
-# DEBUG can be set to YES to include debugging info, or NO otherwise
|
||||
-DEBUG := NO
|
||||
-
|
||||
-# PROFILE can be set to YES to include profiling info, or NO otherwise
|
||||
-PROFILE := NO
|
||||
-
|
||||
-# TINYXML_USE_STL can be used to turn on STL support. NO, then STL
|
||||
-# will not be used. YES will include the STL files.
|
||||
-TINYXML_USE_STL := NO
|
||||
-
|
||||
-#****************************************************************************
|
||||
-
|
||||
-CC := gcc
|
||||
-CXX := g++
|
||||
-LD := g++
|
||||
-AR := ar rc
|
||||
-RANLIB := ranlib
|
||||
-
|
||||
-DEBUG_CFLAGS := -Wall -Wno-format -g -DDEBUG
|
||||
-RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3
|
||||
-
|
||||
-LIBS :=
|
||||
-
|
||||
-DEBUG_CXXFLAGS := ${DEBUG_CFLAGS}
|
||||
-RELEASE_CXXFLAGS := ${RELEASE_CFLAGS}
|
||||
-
|
||||
-DEBUG_LDFLAGS := -g
|
||||
-RELEASE_LDFLAGS :=
|
||||
-
|
||||
-ifeq (YES, ${DEBUG})
|
||||
- CFLAGS := ${DEBUG_CFLAGS}
|
||||
- CXXFLAGS := ${DEBUG_CXXFLAGS}
|
||||
- LDFLAGS := ${DEBUG_LDFLAGS}
|
||||
-else
|
||||
- CFLAGS := ${RELEASE_CFLAGS}
|
||||
- CXXFLAGS := ${RELEASE_CXXFLAGS}
|
||||
- LDFLAGS := ${RELEASE_LDFLAGS}
|
||||
-endif
|
||||
-
|
||||
-ifeq (YES, ${PROFILE})
|
||||
- CFLAGS := ${CFLAGS} -pg -O3
|
||||
- CXXFLAGS := ${CXXFLAGS} -pg -O3
|
||||
- LDFLAGS := ${LDFLAGS} -pg
|
||||
-endif
|
||||
-
|
||||
-#****************************************************************************
|
||||
-# Preprocessor directives
|
||||
-#****************************************************************************
|
||||
-
|
||||
-ifeq (YES, ${TINYXML_USE_STL})
|
||||
- DEFS := -DTIXML_USE_STL
|
||||
-else
|
||||
- DEFS :=
|
||||
-endif
|
||||
-
|
||||
-#****************************************************************************
|
||||
-# Include paths
|
||||
-#****************************************************************************
|
||||
-
|
||||
-#INCS := -I/usr/include/g++-2 -I/usr/local/include
|
||||
-INCS :=
|
||||
-
|
||||
-
|
||||
-#****************************************************************************
|
||||
-# Makefile code common to all platforms
|
||||
-#****************************************************************************
|
||||
-
|
||||
-CFLAGS := ${CFLAGS} ${DEFS}
|
||||
-CXXFLAGS := ${CXXFLAGS} ${DEFS}
|
||||
-
|
||||
-#****************************************************************************
|
||||
-# Targets of the build
|
||||
-#****************************************************************************
|
||||
-
|
||||
-OUTPUT := xmltest
|
||||
-
|
||||
-all: ${OUTPUT}
|
||||
-
|
||||
-
|
||||
-#****************************************************************************
|
||||
-# Source files
|
||||
-#****************************************************************************
|
||||
-
|
||||
-SRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp tinystr.cpp
|
||||
-
|
||||
-# Add on the sources for libraries
|
||||
-SRCS := ${SRCS}
|
||||
-
|
||||
-OBJS := $(addsuffix .o,$(basename ${SRCS}))
|
||||
-
|
||||
-#****************************************************************************
|
||||
-# Output
|
||||
-#****************************************************************************
|
||||
-
|
||||
-${OUTPUT}: ${OBJS}
|
||||
- ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
|
||||
-
|
||||
-#****************************************************************************
|
||||
-# common rules
|
||||
-#****************************************************************************
|
||||
-
|
||||
-# Rules for compiling source files to object files
|
||||
-%.o : %.cpp
|
||||
- ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
|
||||
-
|
||||
-%.o : %.c
|
||||
- ${CC} -c ${CFLAGS} ${INCS} $< -o $@
|
||||
-
|
||||
-dist:
|
||||
- bash makedistlinux
|
||||
+AR ?= ar
|
||||
+CXX ?= g++
|
||||
+CXXFLAGS += -Wall
|
||||
+RANLIB ?= ranlib
|
||||
+
|
||||
+name = libtinyxml
|
||||
+major = @MAJOR_V@
|
||||
+minor = @MINOR_V@
|
||||
+version = $(major).$(minor)
|
||||
+
|
||||
+src = tinyxml.cpp tinyxmlparser.cpp tinyxmlerror.cpp tinystr.cpp
|
||||
+lo = $(addsuffix .lo,$(basename ${src}))
|
||||
+o = $(addsuffix .o,$(basename ${src}))
|
||||
+
|
||||
+all: $(name).a $(name).so
|
||||
+
|
||||
+%.o: %.cpp
|
||||
+ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
|
||||
+
|
||||
+$(name).a: $(o)
|
||||
+ $(AR) rc $(name).a $(o)
|
||||
+ $(RANLIB) $(name).a
|
||||
+
|
||||
+%.lo: %.cpp
|
||||
+ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -fPIC $< -o $@
|
||||
+
|
||||
+$(name).so: $(lo)
|
||||
+ $(CXX) $(LDFLAGS) -fPIC -shared $(lo) -Wl,-soname,$(name).so.$(major) -o $(name).so.$(version)
|
||||
+ ln -s $(name).so.$(version) $(name).so.$(major)
|
||||
+ ln -s $(name).so.$(version) $(name).so
|
||||
|
||||
clean:
|
||||
- -rm -f core ${OBJS} ${OUTPUT}
|
||||
-
|
||||
-depend:
|
||||
- #makedepend ${INCS} ${SRCS}
|
||||
-
|
||||
-tinyxml.o: tinyxml.h tinystr.h
|
||||
-tinyxmlparser.o: tinyxml.h tinystr.h
|
||||
-xmltest.o: tinyxml.h tinystr.h
|
||||
-tinyxmlerror.o: tinyxml.h tinystr.h
|
||||
+ -rm -f *.o *.lo *.so* *.a
|
||||
@@ -0,0 +1,18 @@
|
||||
Description: TinyXml is built with TIXML_USE_STL, so we have to
|
||||
enforce it when the library is used.
|
||||
Author: Felix Geyer <debfx-pkg@fobos.de>
|
||||
|
||||
diff -Nur tinyxml-2.5.3/tinyxml.h tinyxml-2.5.3.patch/tinyxml.h
|
||||
--- tinyxml-2.5.3/tinyxml.h 2007-05-07 00:41:23.000000000 +0200
|
||||
+++ tinyxml-2.5.3.patch/tinyxml.h 2009-07-08 22:32:03.000000000 +0200
|
||||
@@ -26,6 +26,10 @@
|
||||
#ifndef TINYXML_INCLUDED
|
||||
#define TINYXML_INCLUDED
|
||||
|
||||
+#ifndef TIXML_USE_STL
|
||||
+ #define TIXML_USE_STL
|
||||
+#endif
|
||||
+
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4530 )
|
||||
@@ -0,0 +1,64 @@
|
||||
? entity.patch
|
||||
Index: tinyxml.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/tinyxml/tinyxml/tinyxml.cpp,v
|
||||
retrieving revision 1.105
|
||||
diff -u -r1.105 tinyxml.cpp
|
||||
--- tinyxml.cpp 5 Jun 2010 19:06:57 -0000 1.105
|
||||
+++ tinyxml.cpp 19 Jul 2010 21:24:16 -0000
|
||||
@@ -57,30 +57,7 @@
|
||||
{
|
||||
unsigned char c = (unsigned char) str[i];
|
||||
|
||||
- if ( c == '&'
|
||||
- && i < ( (int)str.length() - 2 )
|
||||
- && str[i+1] == '#'
|
||||
- && str[i+2] == 'x' )
|
||||
- {
|
||||
- // Hexadecimal character reference.
|
||||
- // Pass through unchanged.
|
||||
- // © -- copyright symbol, for example.
|
||||
- //
|
||||
- // The -1 is a bug fix from Rob Laveaux. It keeps
|
||||
- // an overflow from happening if there is no ';'.
|
||||
- // There are actually 2 ways to exit this loop -
|
||||
- // while fails (error case) and break (semicolon found).
|
||||
- // However, there is no mechanism (currently) for
|
||||
- // this function to return an error.
|
||||
- while ( i<(int)str.length()-1 )
|
||||
- {
|
||||
- outString->append( str.c_str() + i, 1 );
|
||||
- ++i;
|
||||
- if ( str[i] == ';' )
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- else if ( c == '&' )
|
||||
+ if ( c == '&' )
|
||||
{
|
||||
outString->append( entity[0].str, entity[0].strLength );
|
||||
++i;
|
||||
Index: xmltest.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/tinyxml/tinyxml/xmltest.cpp,v
|
||||
retrieving revision 1.89
|
||||
diff -u -r1.89 xmltest.cpp
|
||||
--- xmltest.cpp 5 Jun 2010 17:41:52 -0000 1.89
|
||||
+++ xmltest.cpp 19 Jul 2010 21:24:16 -0000
|
||||
@@ -1340,6 +1340,16 @@
|
||||
}*/
|
||||
}
|
||||
|
||||
+ #ifdef TIXML_USE_STL
|
||||
+ {
|
||||
+ TiXmlDocument xml;
|
||||
+ xml.Parse("<foo>foo&#xa+bar</foo>");
|
||||
+ std::string str;
|
||||
+ str << xml;
|
||||
+ XmlTest( "Entity escaping", "<foo>foo&#xa+bar</foo>", str.c_str() );
|
||||
+ }
|
||||
+ #endif
|
||||
+
|
||||
/* 1417717 experiment
|
||||
{
|
||||
TiXmlDocument xml;
|
||||
@@ -0,0 +1,10 @@
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: TinyXml
|
||||
Description: simple, small, C++ XML parser
|
||||
Version: 2.6.2
|
||||
Libs: -L${libdir} -ltinyxml
|
||||
Cflags: -I${includedir}
|
||||
Reference in New Issue
Block a user