It would be nice to have Lua search both /usr/ and /usr/local/ for modules. This is exactly what the patch module_paths.patch in src_prepare() does. But then, in multilib_src_configure(), the sed expression rewrites all /usr/local/ to /usr/, so /usr/local/ is not added as intended (and /usr/ appears twice in the paths).
Created attachment 779603 [details] ebuild that keeps /usr/local in lua paths
Created attachment 786377 [details, diff] ebuild patch that keeps /usr/local in lua paths
After investigating the landscape of multiple scripting languages, I have come to the conclusion that we won't add this feature. Rationale: Guile, PHP, Python, Ruby and Tcl do not add any subdirectory of /usr/local to their search path. All of these languages have mechanisms to add extra paths via environment variables. Perl does add /usr/local to its INC path, but is the odd one out from all the languages I looked at. Given these facts and the fact that you can always use LUA_PATH to inject a path into the list of search paths, we won't act on this.