1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00

- Fix build with clang

This commit is contained in:
Pietro Cerutti 2013-08-07 13:59:55 +00:00
parent ca70e439c2
commit 39defe5150
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=324353
4 changed files with 70 additions and 6 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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 );

View File

@ -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 )
{