I have recently updated the macOS build to the current version on MacPorts, for anyone interested in that. It builds on all 64 bit Intel systems from 10.6.8 SnowLeopard to the current Monterey:
https://ports.macports.org/port/codeblocks/details/It defaults to building using wxWidgets-gtk 3.0, which also requires an x11 server (either XQuartz or the one from MacPorts).
The wxWidgets 3.0 cocoa build I thought worked pretty well on Mojave but not on Monterey (crashed) so I didn't default that version, unfortunately. Perhaps that crash is fixable. MacPorts supports variants, so you can build codeblocks with different wxWidgets flavours very easily if you are curious.
The arm64 builds are not presently working -- something to do with how MacPorts has implemented boost seems to be the issue. I don't have an arm Mac, so that will be harder for me to fix.
Homebrew is more popular than MacPorts, but MacPorts has some versatility that makes it more adapatable to building certain things I find, like gtk / x11 projects in particular.
The MacPorts installer is a very quick 2 minute installation. To install codeblocks you would then do something like this:
sudo port -v install codeblocks
(accept all the supporting ports that would be needed)
then install an x11 server if you need it, either from XQuartz.org or like this:
sudo port -v install xorg-server
(accept all the supporting ports that would be needed)
Then to run codeblocks there is a double-clickable icon in /Applications/MacPorts or you can run it from a terminal in the usual fashion, "codeblocks".
Best, K