- Switch to xerces-c3

- Add empty directory to plist
This commit is contained in:
Dmitry Marakasov 2014-12-11 23:13:35 +00:00
parent a770b14f8e
commit 83ff7c7746
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=374556
4 changed files with 91 additions and 8 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= enigma
PORTVERSION= 1.01
PORTREVISION= 13
PORTREVISION= 14
CATEGORIES= games
MASTER_SITES= BERLIOS/enigma-game
DISTNAME= ${PORTNAME}-${PORTVERSION}-64bit
@ -11,7 +11,7 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-64bit
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Enigma is a reimplementation of Oxyd, a puzzle game
LIB_DEPENDS= libxerces-c.so.27:${PORTSDIR}/textproc/xerces-c2 \
LIB_DEPENDS= libxerces-c.so.3:${PORTSDIR}/textproc/xerces-c3 \
libpng.so:${PORTSDIR}/graphics/png \
libtolua++-${LUA_VER}.so:${PORTSDIR}/lang/tolua++
BUILD_DEPENDS= ${LOCALBASE}/lib/libenet.a:${PORTSDIR}/net/enet

View file

@ -1,6 +1,6 @@
--- configure.orig 2007-09-08 14:39:18.000000000 +0200
+++ configure 2011-08-01 09:59:45.000000000 +0200
@@ -753,8 +753,7 @@ CPP
--- configure.orig 2007-09-08 16:39:18.000000000 +0400
+++ configure 2014-12-11 18:27:47.000000000 +0300
@@ -753,8 +753,7 @@
CXX
CXXFLAGS
CCC'
@ -10,7 +10,25 @@
# Initialize some variables set by options.
ac_init_help=
@@ -15279,10 +15278,10 @@ fi
@@ -14740,7 +14739,7 @@
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gXercesMajVersion = 3" >/dev/null 2>&1; then
+ $EGREP "XERCES_VERSION_MAJOR 3" >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
else
@@ -14848,7 +14847,7 @@
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gXercesMajVersion = 3" >/dev/null 2>&1; then
+ $EGREP "XERCES_VERSION_MAJOR 3" >/dev/null 2>&1; then
xerces3exp="yes"
else
xerces3exp="no"
@@ -15279,10 +15278,10 @@
subdirs="$subdirs lib-src/zipios++"
@ -23,7 +41,7 @@
ac_config_files="$ac_config_files etc/mingw32-dist.sh"
@@ -15912,7 +15911,6 @@ do
@@ -15912,7 +15911,6 @@
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
@ -31,7 +49,7 @@
"data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
"data/gfx/Makefile") CONFIG_FILES="$CONFIG_FILES data/gfx/Makefile" ;;
"data/gfx32/Makefile") CONFIG_FILES="$CONFIG_FILES data/gfx32/Makefile" ;;
@@ -15955,10 +15953,8 @@ do
@@ -15955,10 +15953,8 @@
"etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
"lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
"lib-src/oxydlib/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/oxydlib/Makefile" ;;

View file

@ -0,0 +1,64 @@
--- src/lev/ScoreManager.cc
+++ src/lev/ScoreManager.cc
@@ -65,15 +65,23 @@
class ScoreDomSerFilter : public DOMWriterFilter {
#endif
public:
+#if _XERCES_VERSION >= 30000
+ virtual DOMNodeFilter::FilterAction acceptNode(const DOMNode *node) const;
+#else
virtual short acceptNode(const DOMNode *node) const;
+#endif
virtual unsigned long getWhatToShow () const {
return DOMNodeFilter::SHOW_ALL;
}
virtual void setWhatToShow (unsigned long toShow) {}
};
-
+
+#if _XERCES_VERSION >= 30000
+ DOMNodeFilter::FilterAction ScoreDomSerFilter::acceptNode(const DOMNode *node) const {
+#else
short ScoreDomSerFilter::acceptNode(const DOMNode *node) const {
- if (node->getNodeType () == DOMNode::ELEMENT_NODE &&
+#endif
+ if (node->getNodeType () == DOMNode::ELEMENT_NODE &&
std::string(XMLtoUtf8(node->getNodeName()).c_str()) == "level") {
const DOMElement *e = dynamic_cast<const DOMElement *>(node);
std::string id = XMLtoUtf8(e->getAttribute(Utf8ToXML("id").x_str())).c_str();
--- src/Utf8ToXML.cc~ 2008-12-29 00:12:26.000000000 +0600
+++ src/Utf8ToXML.cc 2008-12-29 00:15:19.000000000 +0600
@@ -40,11 +40,11 @@
}
void Utf8ToXML::init(const char * const toTranscode) {
- unsigned int srcLength = std::strlen(toTranscode) + 1;
+ XMLSize_t srcLength = std::strlen(toTranscode) + 1;
// make safe assumptions on utf-16 size
- unsigned int maxDestLength = srcLength;
- unsigned int charsEaten;
- unsigned int destLength;
+ XMLSize_t maxDestLength = srcLength;
+ XMLSize_t charsEaten;
+ XMLSize_t destLength;
unsigned char *charSizes = new unsigned char[maxDestLength]; // just junk
// make a buffer - size does not matter - the object is temporary
xmlString = new XMLCh[maxDestLength];
--- src/XMLtoUtf8.cc~ 2008-12-29 00:12:12.000000000 +0600
+++ src/XMLtoUtf8.cc 2008-12-29 00:14:47.000000000 +0600
@@ -27,11 +27,11 @@
namespace enigma
{
XMLtoUtf8::XMLtoUtf8(const XMLCh* const toTranscode) {
- unsigned int srcLength = XMLString::stringLen(toTranscode) + 1;
+ XMLSize_t srcLength = XMLString::stringLen(toTranscode) + 1;
// make safe assumptions on utf-8 size
- unsigned int maxDestLength = 3 * srcLength;
- unsigned int charsEaten;
- unsigned int destLength;
+ XMLSize_t maxDestLength = 3 * srcLength;
+ XMLSize_t charsEaten;
+ XMLSize_t destLength;
// make a buffer - size does not matter - the object is temporary
utf8String = new char[maxDestLength];
// transcode to utf-8 -- there are no unrepresentable chars

View file

@ -13,3 +13,4 @@ share/icons/hicolor/48x48/apps/enigma.png
%%NLS%%share/locale/ru/LC_MESSAGES/enigma.mo
%%NLS%%share/locale/sv/LC_MESSAGES/enigma.mo
share/pixmaps/enigma.png
@dir %%DATADIR%%/levels/enigma_stable