When emerging openmotif-2.2.2 and then emerge clean to get rid of the old version, it deletes xmkmf and imake which for example the KDE 3.0.3 makefiles need. It could be possible that to new 2.2.2 version does not create new xmkmf and imake binaries so it emerge clean deletes them.
openmotif-2.1.30 ebuilds overwrote xmkmf and imake. the openmotif-2.2.2 ebuilds do not. You will need to re-emerge xfree to get imake and xmkmf back on the system. I have also released openmotif-2.2.2-r1 today which installs all files into /usr/X11R6 instead of /usr. emerge rsync emerge xfree emerge openmotif Please let me know how things go after the updates.