[MacPorts] #31804: wxWidgets-python 2.8.10.1 + --enable-graphics_ctx -> error: build failure
MacPorts
noreply at macports.org
Sun Aug 11 01:37:43 PDT 2013
#31804: wxWidgets-python 2.8.10.1 + --enable-graphics_ctx -> error: build failure
-----------------------------------------+--------------------------------
Reporter: guillaume.chevrot@… | Owner: macports-tickets@…
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: wxWidgets-python wxWidgets |
-----------------------------------------+--------------------------------
Changes (by mojca@…):
* cc: justjoheinz@…, jwa@…, jameskyle@…, ryandesign@…, mojca@… (added)
* status: closed => reopened
* version: 2.0.3 =>
* resolution: invalid =>
* port: wxWidgets-python => wxWidgets-python wxWidgets
Comment:
I tested with {{{wxWidgets}}} 2.8.12, not with {{{wxWidgets-python}}}, but
it shouldn't make a difference. I succeeded to compile the package as
64-bit on 10.7 by using {{{gtk2/x11}}}. To allow the switch {{{--enable-
graphics_ctx}}} to work I had to do the following (I still need to come up
with a proper patch):
- the following code in {{{build/lib/wx/include/gtk2-unicode-
release-2.8/wx/setup.h}}} is problematic and I defined {{{wxUSE_CAIRO}}}
to {{{1}}} unconditionally:
{{{
#if !defined(__WIN32__) && !defined(__APPLE__)
#define wxUSE_CAIRO 1
#else
#define wxUSE_CAIRO 0
#endif
}}}
- not sure if needed, but a patch from a later upstream version:
{{{
--- src/generic/graphicc.cpp.orig
+++ src/generic/graphicc.cpp
@@ -1474,10 +1480,10 @@ wxGraphicsContext *
wxCairoRenderer::CreateContext( const wxMemoryDC& dc)
wxGraphicsContext * wxCairoRenderer::CreateContextFromNativeContext( void
* context )
{
-#if __WXMSW__
+#ifdef __WXMSW__
return new wxCairoContext(this,(HDC)context);
#endif
-#if __WXGTK__
+#ifdef __WXGTK__
return new wxCairoContext(this,(cairo_t*)context);
#endif
}
}}}
- I had to add {{{-lcairo, -lGL -lGLU}}} to {{{build/Makefile}}} (I'm not
sure if both GL and GLU are needed, but some symbols were undefined and I
didn't test if adding just one or the other would still work.)
After that the port installed fine. If anyone has more experience with
coming up with a nice patch (given that it compiles on >= 10.6), I would
be grateful. I'm attaching a {{{Portfile}}} (it might have some
dependencies from browser:users/mojca/wxports, but it should be enough to
get the idea of what I have I tested / how I configured the port).
--
Ticket URL: <https://trac.macports.org/ticket/31804#comment:3>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list