trunk supposedly supports lua-5.2 for over a year now, but that has not been pushed into the releases yet for some reason.
Oops, accidentally set it as dependant on lua-5.2 tracker, rather than as a blocker...
Created attachment 344320 [details, diff]
Derived from git commit a957114421fd2e875432e5fde0448ffc1ae60cfd
Fixes some things, but still breaks elsewhere.
This is fixed in newer versions that are and/or will be available today in the Portage tree; so, as older versions like 2.0.5 will be masked by security bugs soon, instead of fixing this I suggest you to look into upgrading later today or tomorrow.