[MacPorts] #40390: codeblocks: fix compatibility with wxWidgets 2.9/3.0
MacPorts
noreply at macports.org
Sun Sep 29 11:36:28 PDT 2013
#40390: codeblocks: fix compatibility with wxWidgets 2.9/3.0
-------------------------+---------------------
Reporter: mojca@… | Owner: mojca@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: codeblocks |
-------------------------+---------------------
Comment (by mojca@…):
Next comes the `exporter` plugin:
{{{
libtool: compile: /usr/bin/clang++ -DHAVE_CONFIG_H -I.
-I../../../../../src/include
-I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include
/osx_cocoa-unicode-2.9
-I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9
-D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__
-D__WXOSX_COCOA__
-I../../../../../src/plugins/contrib/source_exporter/wxPdfDocument/include
-DwxPDF_USE_WXMODULE=0 -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math
-DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC
-DPIC -fexceptions -MT libwxPdfDocument_la-pdfdc.lo -MD -MP -MF .deps
/libwxPdfDocument_la-pdfdc.Tpo -c src/pdfdc.cpp -fno-common -DPIC -o
.libs/libwxPdfDocument_la-pdfdc.o
In file included from src/pdfdc.cpp:26:
src/pdfdc29.inc:30:14: error: allocating an object of abstract class type
'wxPdfDCImpl'
: wxDC(new wxPdfDCImpl(this))
^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/dc.h:609:18:
note: unimplemented pure virtual method 'DoDrawLines' in 'wxPdfDCImpl'
virtual void DoDrawLines(int n, const wxPoint points[],
^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/dc.h:614:18:
note: unimplemented pure virtual method 'DoDrawPolygon' in 'wxPdfDCImpl'
virtual void DoDrawPolygon(int n, const wxPoint points[],
^
In file included from src/pdfdc.cpp:26:
src/pdfdc29.inc:35:14: error: allocating an object of abstract class type
'wxPdfDCImpl'
: wxDC(new wxPdfDCImpl(this, printData))
^
src/pdfdc29.inc:40:14: error: allocating an object of abstract class type
'wxPdfDCImpl'
: wxDC(new wxPdfDCImpl(this, pdfDocument, templateWidth,
templateHeight))
^
3 errors generated.
make[5]: *** [libwxPdfDocument_la-pdfdc.lo] Error 1
}}}
The (partial cure) seems to be the following:
{{{
---
src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdc29.h.orig
+++ src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdc29.h
@@ -162,9 +162,9 @@ protected:
virtual void DoGetSize(int* width, int* height) const;
virtual void DoGetSizeMM(int* width, int* height) const;
- virtual void DoDrawLines(int n, wxPoint points[],
+ virtual void DoDrawLines(int n, const wxPoint points[],
wxCoord xoffset, wxCoord yoffset);
- virtual void DoDrawPolygon(int n, wxPoint points[],
+ virtual void DoDrawPolygon(int n, const wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle =
wxODDEVEN_RULE);
virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
--- src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc.orig
+++ src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc
@@ -1032,7 +1032,7 @@ wxPdfDCImpl::DoGetSizeMM(int* width, int* height)
const
}
void
-wxPdfDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset,
wxCoord yoffset)
+wxPdfDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset,
wxCoord yoffset)
{
wxCHECK_RET(m_pdfDocument, wxT("Invalid PDF DC"));
SetupPen();
@@ -1056,7 +1056,7 @@ wxPdfDCImpl::DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffs
}
void
-wxPdfDCImpl::DoDrawPolygon(int n, wxPoint points[],
+wxPdfDCImpl::DoDrawPolygon(int n, const wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle /* =
wxODDEVEN_RULE*/)
{
}}}
See http://forums.wxwidgets.org/viewtopic.php?t=37517&p=152780. The real
patch needs to take into account that the change apparently happened at
version 2.9.5, so that it will work with any version of wxWidgets.
--
Ticket URL: <https://trac.macports.org/ticket/40390#comment:8>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list