/usr/bin/startkde is executed by /bin/sh, thus it must be POSIX-compliant, because /bin/sh may not be a bash shell. In this case '==' is used for string comparison, instead of '='. Note that the original (upstream) script was fine, but it has been broken by this Gentoo patch: /usr/portage/kde-base/kdebase-startkde/files/gentoo-startkde4.patch The fix is 's/==/=/' on the patch file.
Thanks for the bug report. Fixed in the tree.