Bug 199403 - [patch] x11-toolkits/wxPython30: update to 3.0.2.0, drop GCC dep and fix bugs
Summary: [patch] x11-toolkits/wxPython30: update to 3.0.2.0, drop GCC dep and fix bugs
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: John Marino
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-04-12 18:27 UTC by Matthew Rezny
Modified: 2015-04-14 06:45 UTC (History)
1 user (show)

See Also:


Attachments
update and bugfix wxPython30 (3.31 KB, patch)
2015-04-12 18:27 UTC, Matthew Rezny
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Rezny freebsd_committer 2015-04-12 18:27:05 UTC
Created attachment 155522 [details]
update and bugfix wxPython30

x11-toolkits/wxPython30 recently got smacked with USE_GCC.

Quoting that commit:
"It turns out that wxPython30 won't build with clang at all.  The c++ code
is illegal according to clang (e.g. illegal cast), so remove the
USES=compiler setting and replace with USE_GCC=yes.  Tested on F8 and F10.
I apologize for adding the GCC dependence for F10+ users but I didn't see
any other simple fix."

However, I see a much simpler fix thatn pulling in GCC, which is to use a static_cast instead of reinterpret_cast. Building with Clang exposed two other bugs in the code thanks to the actually useful warnings.

1) if (depth = 32) should be if (depth == 32), corrected by updating to 3.0.2

2) two functions return a pointer to a string allocated on the local stack, corrected by using static allocation for the string constant

It is much better to fix the bugs than to use a compiler that accepts buggy code.
Comment 1 commit-hook freebsd_committer 2015-04-14 06:44:00 UTC
A commit references this bug:

Author: marino
Date: Tue Apr 14 06:43:12 UTC 2015
New revision: 383979
URL: https://svnweb.freebsd.org/changeset/ports/383979

Log:
  x11-toolkits/py-wxPython30: Fix c++ code, drop gcc requirement

  While here, upgrade from version 3.0.0 to 3.0.2
  wxPython30 was obligated to build under c++11 standards, but the code
  was not compliant.  It now builds on system clang again.

  PR:		199403
  Submitted by:	matthew (reztec.cz)
  Approved by:	blanket (fixes previous "fix")

Changes:
  head/x11-toolkits/py-wxPython30/Makefile
  head/x11-toolkits/py-wxPython30/distinfo
  head/x11-toolkits/py-wxPython30/files/patch-src_gtk___gdi__wrap.cpp
  head/x11-toolkits/py-wxPython30/files/patch-src_gtk_propgrid__wrap.cpp
Comment 2 John Marino freebsd_committer 2015-04-14 06:45:17 UTC
Thanks.  
I'm on the road so I don't have access to poudriere facilities, so I really hope this builds on all platforms.  In other words, I just committed it without testing it myself (other than checksum)