This makes waf compatible with Python 3.12 again.
Also, apply modifications needed for MacOS and add as a patch file (see
commits 0f2e3b2 and dc6c995).
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
This reverts commit cf3f8205c4.
It was a good initiative, but waf 2.0 introces backward incompatible
changes that break the pkg-config checks. The config checks will be
updated before migrating to waf 2.0.