The DOCS option is broken on Lua versions other than 5.2 (which was EOLed 3 years ago) because the pkg-plist thinks it can hardcode the package name. Same bug is in lua-stdlib-debug.
Created attachment 195298 [details] Patch fixing DOCS Move documents under %%PORTDOCS%%%%DOCSDIR%%.
(In reply to Kan Sasaki from comment #1) That doesn't look right since it makes the docs dir not depend on the Lua version, causing a conflict if you try and install the port multiple times for different versions.
Created attachment 195320 [details] Suggested alternative patch As for -debug, I would suggest deleting the pkg-plist entirely - it's more trouble than it's worth for a trivial port like this - and do the work in the makefile as per the attached patch.
Created attachment 195338 [details] Patch fixing DOCS Move docs under doc/${PKGNAMEPREFIX}${PORTNAME}. I have tested with 5.2 and 5.3. I think the doc directory for this should be defined in .mk file such as lua.mk and docs should be placed under doc/lua${LUA_VER_STR}/${PORTNAME} like a ruby module. However, it will be a little big change, so I defined DOCSDIR at this time.
(In reply to Kan Sasaki from comment #4) I'm working with russ on updating the lua ports (for 5.3.5 and 5.4.0-work), the next versions of which will likely install the docs for Lua itself in doc/lua53 etc. That wouldn't work too well with your idea, but we could make the Lua port install docs in doc/lua53/lua so that modules can use doc/lua53/${PORTNAME} or similar.
*** This bug has been marked as a duplicate of bug 231733 ***