Salome GUI doesn't build on FreeBSD

Configure fails to find SIP:
CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find SIP (missing: SIP_INCLUDE_DIR SIP_EXECUTABLE SIP_PYTHONPATH)

I have py39-sip-6.7.12 installed. py39-sip-6.7.12 installs multiple executables:
/usr/local/bin/sip-build
/usr/local/bin/sip-distinfo
/usr/local/bin/sip-install
/usr/local/bin/sip-module
/usr/local/bin/sip-sdist
/usr/local/bin/sip-wheel

There is also the older py39-sip4-4.19.25 package available which does install one executable /usr/local/bin/sip.
Unfortunately, this sip executable fails to parse /usr/local/lib/python3.9/site-packages/PyQt5/bindings/QtCore/QtCoremod.sip:
sip: /usr/local/lib/python3.9/site-packages/PyQt5/bindings/QtCore/QtCoremod.sip:23: syntax error

QtCoremod.sip is installed by py39-qt5-pyqt-5.15.10.

What versions of packages does Salome require?
Why doesn’t cmake script complain about versions if they aren’t appropriate for Salome?

How can Salome GUI be built?