On Jan 11, 2009, at 1:38 PM, Aleksey Cheusov wrote:
I'm packaging a few Lua (lang/lua) modules in WIP, e.g. wip/lua-{stdlib,lrexlib-{onig,pcre,posix}}. Current Lua version is 5.1 and modules should be installed to lib/lua/5.1 directory, but it's not clear for me how to detect this directory properly from modules' Makefile. Probably lang/lua/module.mk should be created for this. Has anybody any idea? Or maybe somebody can implement this.
Aleksey, Thank you for working on Lua packages.I committed lang/lua/module.mk that I had in my local tree. It is functionally similar to yours except variable names. I used the same names as in the Lua source code (LUA_CDIR and LUA_LDIR) and followed the pkgsrc convention in other packages (LUA_PKGPREFIX).
Another difference is that your patch has two sets of variables for absolute and relative paths. I only added the relative ones because adding ${PREFIX} when needed is not much worse than remembering another variable name. That is also consistent with ruby and python packages.
-- Min Sik Kim