On 2021/11/09 10:18, Omar Polo wrote: > > Stuart Henderson <[email protected]> writes: > > > Flavours would be a more natural fit for this - they don't have to > > conflict, for example see every pecl-* port. > > Of course, I didn't try to alter the default FULLPKGNAME so every flavor > had the same stem and that was why I couldn't install multiple flavors > at the same time. (hope I'm not getting the terminology wrong ^^') > Thanks for the tip! > > Attaching an updated tarball which produces > > % for v in 51 52 53; do FLAVOR=lua$v make install; done > ... > % pkg_info | grep luarocks > luarocks-lua51-3.8.0 package manager for lua 5.1 > luarocks-lua52-3.8.0 package manager for lua 5.2 > luarocks-lua53-3.8.0 package manager for lua 5.3 > > I've also tweaked the DESCR, now it reads: > > > LuaRocks is the package manager for Lua modules. It allows you to > > create and install Lua modules as self-contained packages called > > rocks. > > (i.e. without ${MODLUA_VERSION})
Great, that's looking better.
One last thing, you have it looking for configs in share/examples at
runtime, it needs the diff below or similar so the config can be edited
without causing problems at update time. New tgz attached is ok with me
to import.
diff --git devel/luarocks/Makefile devel/luarocks/Makefile
index 0a2156d..9790234 100644
--- devel/luarocks/Makefile
+++ devel/luarocks/Makefile
@@ -27,8 +27,9 @@ USE_GMAKE = Yes
CONFIGURE_STYLE = simple
CONFIGURE_ARGS = --with-lua-include=${MODLUA_INCL_DIR} \
--with-lua-lib=${LOCALBASE}/lib \
- --sysconfdir=${PREFIX}/share/examples/luarocks \
+ --sysconfdir=${SYSCONFDIR} \
--lua-version=${MODLUA_VERSION}
+FAKE_FLAGS = sysconfdir=${PREFIX}/share/examples
NO_TEST = Yes
diff --git devel/luarocks/pkg/PLIST devel/luarocks/pkg/PLIST
index ec1b9ec..a3b0555 100644
--- devel/luarocks/pkg/PLIST
+++ devel/luarocks/pkg/PLIST
@@ -2,8 +2,8 @@
bin/luarocks-${MODLUA_VERSION}
bin/luarocks-admin-${MODLUA_VERSION}
share/examples/luarocks/
-share/examples/luarocks/luarocks/
-share/examples/luarocks/luarocks/config-${MODLUA_VERSION}.lua
+share/examples/luarocks/config-${MODLUA_VERSION}.lua
+@sample ${SYSCONFDIR}/luarocks/config-${MODLUA_VERSION}.lua
share/lua/${MODLUA_VERSION}/luarocks/
share/lua/${MODLUA_VERSION}/luarocks/admin/
share/lua/${MODLUA_VERSION}/luarocks/admin/cache.lua
luarocks.tgz
Description: application/tar-gz
