My Linux is CentOS 7, that won't help you much plus i didn't build any RPM's. This one does also only ship wx 3.0.4 and its build has all compatibility enabled, CB can be build against this out-of-the-box. I have some weak memory about CB having some issues with that wx version, there was a patch made for wx but i don't know if it was backported to 3.0.4 by the wx folks or the fedora team. Building CB against that system package basically boils down to:
./bootstrap
./configure --with-contrib-plugins=all,-NassiShneiderman
I disable NassiShneiderman because i don't have a system boost library available, you might need to specify the
lib directory if the wrong one gets chosen (
lib vs.
lib64).
Building a more recent wxWidgets version yourself is also not that difficult (at least a local version, don't know how easy it is to make a RPM, never did that, maybe you can download the source RPM and use its SPEC file on a git checkout of wx), the tricky part is to figure out the required packages. Basically i ran
./configure until it didn't complain about missing stuff or disabling elements because of missing stuff.
To build CB against a recent wx with all compatibility disabled you need these two patches:
https://sourceforge.net/p/codeblocks/tickets/687,
https://sourceforge.net/p/codeblocks/tickets/704