diff options
author | gahr <gahr@FreeBSD.org> | 2013-08-07 21:59:55 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2013-08-07 21:59:55 +0800 |
commit | 2ef005a85254db3b09e1bcd3d62301216208cbfd (patch) | |
tree | c1db4ffd9a38c71f48232a853899d39bddce8d41 /editors | |
parent | e1d59bae7d278db3d48c3da263eeed5ffe98e3bf (diff) | |
download | freebsd-ports-gnome-2ef005a85254db3b09e1bcd3d62301216208cbfd.tar.gz freebsd-ports-gnome-2ef005a85254db3b09e1bcd3d62301216208cbfd.tar.zst freebsd-ports-gnome-2ef005a85254db3b09e1bcd3d62301216208cbfd.zip |
- Fix build with clang
Diffstat (limited to 'editors')
-rw-r--r-- | editors/xmlcopyeditor/Makefile | 7 | ||||
-rw-r--r-- | editors/xmlcopyeditor/files/patch-src_housestyle.h | 13 | ||||
-rw-r--r-- | editors/xmlcopyeditor/files/patch-src_xmlcopyeditor.cpp | 45 | ||||
-rw-r--r-- | editors/xmlcopyeditor/files/patch-src_xmlschemagenerator.cpp | 11 |
4 files changed, 70 insertions, 6 deletions
diff --git a/editors/xmlcopyeditor/Makefile b/editors/xmlcopyeditor/Makefile index 4c343b4f8600..983fea120c2d 100644 --- a/editors/xmlcopyeditor/Makefile +++ b/editors/xmlcopyeditor/Makefile @@ -17,12 +17,7 @@ WX_COMPS= wx contrib WX_CONF_ARGS= absolute WX_UNICODE= yes USES= gettext -USE_DOS2UNIX= src/templates/DTD.dtd \ - src/templates/OpenLearn_document.xml \ - src/rng/docbookxi.rnc \ - src/rng/tei_all.rnc \ - src/rng/xhtml-strict.rng \ - src/rng/xhtml.rng +USE_DOS2UNIX= yes BUILD_DEPENDS+= ${LOCALBASE}/include/boost/shared_ptr.hpp:${PORTSDIR}/devel/boost-libs LIB_DEPENDS= xerces-c.3:${PORTSDIR}/textproc/xerces-c3 \ diff --git a/editors/xmlcopyeditor/files/patch-src_housestyle.h b/editors/xmlcopyeditor/files/patch-src_housestyle.h new file mode 100644 index 000000000000..4e9d0f14cff4 --- /dev/null +++ b/editors/xmlcopyeditor/files/patch-src_housestyle.h @@ -0,0 +1,13 @@ +--- src/housestyle.h.orig 2013-08-07 15:30:44.000000000 +0200 ++++ src/housestyle.h 2013-08-07 15:31:08.000000000 +0200 +@@ -68,8 +68,9 @@ + filterDirectory, + filterFile, + pathSeparator, +- error, ++ error + #ifdef __WXMSW__ ++ , + aspellDataPath, + aspellDictPath + #endif diff --git a/editors/xmlcopyeditor/files/patch-src_xmlcopyeditor.cpp b/editors/xmlcopyeditor/files/patch-src_xmlcopyeditor.cpp new file mode 100644 index 000000000000..d4bad7d52609 --- /dev/null +++ b/editors/xmlcopyeditor/files/patch-src_xmlcopyeditor.cpp @@ -0,0 +1,45 @@ +--- src/xmlcopyeditor.cpp.orig 2013-08-07 15:31:32.000000000 +0200 ++++ src/xmlcopyeditor.cpp 2013-08-07 15:35:13.000000000 +0200 +@@ -2887,7 +2887,7 @@ + + const int arraySize = templateArray.GetCount(); + +- wxString choiceArray[arraySize + 1]; ++ wxString *choiceArray = new wxString[arraySize + 1]; + for ( int i = 0; i < arraySize; ++i ) + * ( choiceArray + i ) = templateArray.Item ( i ); + +@@ -2901,6 +2901,7 @@ + return; + } + typeSelection = scd.GetStringSelection(); ++ delete [] choiceArray; + } + + if ( typeSelection == defaultSelection ) +@@ -4384,20 +4385,23 @@ + encodingVector.push_back ( _T ( "ISO-8859-1" ) ); + encodingVector.push_back ( _T ( "US-ASCII" ) ); + const int vectorSize = encodingVector.size(); +- wxString choiceArray[vectorSize + 1]; ++ wxString *choiceArray = new wxString[vectorSize + 1]; + for ( int i = 0; i < vectorSize; ++i ) + * ( choiceArray + i ) = encodingVector.at ( i ); + wxSingleChoiceDialog scd ( + this, _ ( "Choose an encoding:" ), _ ( "Encoding" ), vectorSize, choiceArray ); + +- if ( scd.ShowModal() == wxID_CANCEL ) ++ if ( scd.ShowModal() == wxID_CANCEL ) { ++ delete [] choiceArray; + return; ++ } + + wxString selection; + std::string selectionUtf8, bufferUtf8; + + selection = scd.GetStringSelection(); + selectionUtf8 = selection.mb_str ( wxConvUTF8 ); ++ delete [] choiceArray; + + getRawText ( doc, bufferUtf8 ); + XmlEncodingHandler::setUtf8 ( bufferUtf8, true ); diff --git a/editors/xmlcopyeditor/files/patch-src_xmlschemagenerator.cpp b/editors/xmlcopyeditor/files/patch-src_xmlschemagenerator.cpp new file mode 100644 index 000000000000..aa48ef7c6a57 --- /dev/null +++ b/editors/xmlcopyeditor/files/patch-src_xmlschemagenerator.cpp @@ -0,0 +1,11 @@ +--- src/xmlschemagenerator.cpp.orig 2013-08-07 15:53:21.000000000 +0200 ++++ src/xmlschemagenerator.cpp 2013-08-07 15:54:00.000000000 +0200 +@@ -203,7 +203,7 @@ + continue; + for ( attrItr = attrMap.begin(); attrItr != attrMap.end(); attrItr++ ) + { +- const static wxMBConvUTF16 conv; ++ static wxMBConvUTF16 conv; + if ( attrs->getNamedItem ( ( const XMLCh * ) ( const char * ) + attrItr->first.mb_str ( conv ) ) == NULL ) + { |