Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2020 15:49:37 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r531700 - in head: . Mk/Uses archivers archivers/lua-lzlib archivers/lua-zlib archivers/lua51-zlib astro/celestia audio audio/aqualung audio/lua-mpd converters converters/lua-iconv conv...
Message-ID:  <202004141549.03EFnbfj073539@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Tue Apr 14 15:49:36 2020
New Revision: 531700
URL: https://svnweb.freebsd.org/changeset/ports/531700

Log:
  USES=lua gained flavors.
  
  Ports using USES=lua:module or lua:flavors will be flavored.  A range of
  supported lua versions can be set using XX-YY (or XX-, or -YY, or simply ZZ)
  for ports not supporting all lua versions.
  
  USES=lua sets LUA_FLAVOR that needs to be used on all dependencies of
  flavored lua ports, in a similar way as PHP or Python flavors.
  
  PR:		245038
  Submitted by:	andrew tao11 riddles org uk
  Reviewed by:	mat, kevans, russ haley gmail com
  Approved by:	mat (portmgr)
  Differential Revision:	https://reviews.freebsd.org/D16494

Added:
  head/archivers/lua-zlib/
     - copied from r531692, head/archivers/lua51-zlib/
  head/audio/lua-mpd/
     - copied from r531692, head/audio/lua51-mpd/
  head/devel/lua-libevent/
     - copied from r531692, head/devel/lua51-libevent/
Deleted:
  head/archivers/lua51-zlib/
  head/converters/lua51-iconv/
  head/devel/lua51-bitop/
  head/devel/lua51-cjson/
  head/devel/lua51-libevent/
  head/devel/luafilesystem-51/
  head/net/lualdap-51/
  head/net/luasocket-51/
  head/net/luasocket-53/
  head/security/luasec-51/
  head/textproc/luaexpat-51/
Modified:
  head/CHANGES
  head/MOVED
  head/Mk/Uses/lua.mk
  head/archivers/Makefile
  head/archivers/lua-lzlib/Makefile
  head/archivers/lua-zlib/Makefile
  head/astro/celestia/Makefile
  head/audio/Makefile
  head/audio/aqualung/Makefile
  head/audio/lua-mpd/Makefile
  head/converters/Makefile
  head/converters/lua-iconv/Makefile
  head/converters/lua-json/Makefile
  head/databases/lua-lsqlite3/Makefile
  head/databases/lua-xapian/Makefile
  head/databases/luadbi/Makefile
  head/databases/luasql-mysql/Makefile
  head/databases/redis-devel/Makefile
  head/databases/xapian-bindings/Makefile
  head/devel/Makefile
  head/devel/lua-MessagePack/Makefile
  head/devel/lua-bitlib/Makefile
  head/devel/lua-bitop/Makefile
  head/devel/lua-cjson/Makefile
  head/devel/lua-gettext/Makefile
  head/devel/lua-lgi/Makefile
  head/devel/lua-libevent/Makefile
  head/devel/lua-lpeg/Makefile
  head/devel/lua-luacheck/Makefile
  head/devel/lua-posix/Makefile
  head/devel/lua-pty/Makefile
  head/devel/lua-stdlib-debug/Makefile
  head/devel/lua-stdlib-normalize/Makefile
  head/devel/lua-stdlib/Makefile
  head/devel/lua-sysctl/Makefile
  head/devel/luafilesystem/Makefile
  head/devel/swig30/Makefile
  head/dns/knot-resolver/Makefile
  head/editors/fxite/Makefile
  head/editors/mle/Makefile
  head/editors/neovim/Makefile
  head/editors/wordgrinder/Makefile
  head/finance/moneymanagerex/Makefile
  head/games/corsix-th/Makefile
  head/graphics/lua-gd/Makefile
  head/lang/lua-ada/Makefile
  head/lang/lua51/Makefile
  head/lang/lua52/Makefile
  head/lang/lua53/Makefile
  head/math/plplot/Makefile
  head/multimedia/libquvi-scripts09/Makefile
  head/net-im/prosody/Makefile
  head/net/Makefile
  head/net/freeswitch/Makefile
  head/net/lualdap/Makefile
  head/net/luasocket/Makefile
  head/net/wireshark/Makefile
  head/security/Makefile
  head/security/cardpeek/Makefile
  head/security/lua-bcrypt/Makefile
  head/security/luasec/Makefile
  head/textproc/Makefile
  head/textproc/lua-lyaml/Makefile
  head/textproc/luaexpat/Makefile
  head/www/luakit/Makefile
  head/www/volta/Makefile
  head/x11-wm/awesome/Makefile

Modified: head/CHANGES
==============================================================================
--- head/CHANGES	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/CHANGES	Tue Apr 14 15:49:36 2020	(r531700)
@@ -10,6 +10,18 @@ in the release notes and/or placed into UPDATING.
 
 All ports committers are allowed to commit to this file.
 
+20200414:
+AUTHOR: mat@FreeBSD.org
+
+  USES=lua gained flavors.
+
+  Ports using USES=lua:module or lua:flavors will be flavored.  A range of
+  supported lua versions can be set using XX-YY (or XX-, or -YY, or simply ZZ)
+  for ports not supporting all lua versions.
+
+  USES=lua sets LUA_FLAVOR that needs to be used on all dependencies of
+  flavored lua ports, in a similar way as PHP or Python flavors.
+  
 20200115:
 AUTHOR: bapt@FreeBSD.org
 

Modified: head/MOVED
==============================================================================
--- head/MOVED	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/MOVED	Tue Apr 14 15:49:36 2020	(r531700)
@@ -14529,3 +14529,15 @@ databases/mariadb55-client|databases/mariadb102-client
 devel/aws-c-commons|devel/aws-c-common|2020-04-12|Renamed to the correct name
 textproc/itstool22|textproc/itstool|2020-04-14|Has expired: Uses deprecated version of python, use textproc/itstool instead
 science/ncnn|misc/ncnn|2020-04-14|Move to misc/ because ncnn isn't related to science
+archivers/lua51-zlib|archivers/lua-zlib@lua51|2020-04-14|Switched to use flavors
+audio/lua51-mpd|audio/lua-mpd@lua51|2020-04-14|Switched to use flavors
+converters/lua51-iconv|converters/lua-iconv@lua51|2020-04-14|Switched to use flavors
+devel/lua51-bitop|devel/lua-bitop@lua51|2020-04-14|Switched to use flavors
+devel/lua51-cjson|devel/lua-cjson@lua51|2020-04-14|Switched to use flavors
+devel/lua51-libevent|devel/lua-libevent@lua51|2020-04-14|Switched to use flavors
+devel/luafilesystem-51|devel/luafilesystem@lua51|2020-04-14|Switched to use flavors
+net/lualdap-51|net/lualdap@lua51|2020-04-14|Switched to use flavors
+net/luasocket-51|net/luasocket@lua51|2020-04-14|Switched to use flavors
+net/luasocket-53|net/luasocket@lua53|2020-04-14|Switched to use flavors
+security/luasec-51|security/luasec@lua51|2020-04-14|Switched to use flavors
+textproc/luaexpat-51|textproc/luaexpat@lua51|2020-04-14|Switched to use flavors

Modified: head/Mk/Uses/lua.mk
==============================================================================
--- head/Mk/Uses/lua.mk	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/Mk/Uses/lua.mk	Tue Apr 14 15:49:36 2020	(r531700)
@@ -5,16 +5,101 @@
 # MAINTAINER: ports@FreeBSD.org
 # Usage:
 #
-# USES+=	lua[:version]
+# USES+=	lua[:options,...]
 #
+# Options:
+#
+#   NN    (e.g. 52)  - specify an allowed Lua version (can use multiple times)
+#   NN+   (e.g. 52+) - specify a minimum Lua version (discouraged)
+#   -NN   (e.g. -53) - specify a maximum allowed version
+#   NN-NN (e.g. 51-53) - specify a range of allowed versions
+#
+#   flavors	define FLAVOR / FLAVORS as luaNN from the allowed versions
+#
+#   noflavors	don't use flavors
+#
+#   module	(implies flavors) specifies that the port is a Lua module
+#		(i.e. that it installes files in MODLIBDIR etc.)
+#
+#   build	add dependency to BUILD_DEPENDS instead of LIB_DEPENDS
+#   run		add dependency to RUN_DEPENDS instead of LIB_DEPENDS
+#
+#   env		define only the LUA_* vars and add them to PLIST_SUB and
+#		MAKE_ENV, do not add dependencies or other global state
+#
+#   core	for building Lua itself
+#
+# If more than one version is allowed, then the LUA_DEFAULT version
+# (as set in DEFAULT_VERSIONS) is chosen if it is allowed, otherwise
+# the highest allowed version is chosen. But if "flavors" was requested,
+# and FLAVOR is set, we use that version.
+#
+# LUA_FLAVOR is defined to the desired flavor whether or not "flavors" was
+# selected; ports should use this to specify the flavor of dependencies
+# which are Lua modules or otherwise Lua-flavored.
+#
+# It's not generally expected that applications that embed Lua, or apps
+# written in Lua, would use USES=lua:flavors. Given that Lua is lightweight
+# and does not carry around a whole lot of module ecosystem with it, it is
+# best that application ports simply specify the Lua version or range of
+# versions that they support, and let the default one or the latest one be
+# used. However, they should still use LUA_FLAVOR as needed when specifying
+# dependencies.
+#
 .if !defined(_INCLUDE_USES_LUA_MK)
 _INCLUDE_USES_LUA_MK=	yes
 
 # When adding a version, please keep the comment in
 # Mk/bsd.default-versions.mk in sync.
-_LUA_VALID_VERSIONS=	53 52 51
+_LUA_VALID_VERSIONS:=	53 52 51
+.if defined(_LUA_EXTRA_VER)
+_LUA_VALID_VERSIONS+= ${_LUA_EXTRA_VER}
+.endif
 
-_LUA_DEFAULT_VERSION=	${LUA_DEFAULT:S/.//}
+_LUA_DEFAULT_VERSION:=	${LUA_DEFAULT:S/.//}
+
+# args
+_LUA_ARG_FLAVORS:=
+_LUA_ARG_MODULE:=
+_LUA_ARG_ENV:=
+_LUA_ARG_CORE:=
+.if ${lua_ARGS:Mmodule}
+_LUA_ARG_FLAVORS:=yes
+_LUA_ARG_MODULE:=yes
+.endif
+.if ${lua_ARGS:Mflavors}
+_LUA_ARG_FLAVORS:=yes
+.endif
+.if ${lua_ARGS:Mnoflavors}
+_LUA_ARG_FLAVORS:=
+.endif
+.if ${lua_ARGS:Menv}
+_LUA_ARG_ENV:=yes
+.endif
+.if ${lua_ARGS:Mcore}
+_LUA_ARG_CORE:=yes
+_LUA_ARG_ENV:=yes
+_LUA_ARG_FLAVORS:=
+_LUA_ARG_MODULE:=
+.endif
+
+# core is for building Lua itself, so it overrides all version checks
+.if ${_LUA_ARG_CORE}
+
+_LUA_WANTED_VERSION:=${lua_ARGS:M[1-9][0-9]:[1]}
+
+.  if ${lua_ARGS:M[1-9][0-9]:[#]} != 1
+IGNORE= USES=lua:core must also specify exactly one version number
+# set to avoid spurious errors below
+_LUA_WANTED_VERSION:=${_LUA_DEFAULT_VERSION}
+.  endif
+
+_LUA_VALID_VERSIONS:=${_LUA_WANTED_VERSION}
+_LUA_WANTED_VERSIONS:=${_LUA_WANTED_VERSION}
+_LUA_DEFAULT_VERSION:=${_LUA_WANTED_VERSION}
+
+.endif # _LUA_ARG_CORE
+
 .if ! ${_LUA_VALID_VERSIONS:M${_LUA_DEFAULT_VERSION}}
 IGNORE=	Invalid lua version ${LUA_DEFAULT}
 .endif
@@ -22,89 +107,164 @@ IGNORE=	Invalid lua version ${LUA_DEFAULT}
 #
 # Parse a ver+ argument
 #
-.if ${lua_ARGS:M*+}
-_LUA_MIN_VERSION:=	${lua_ARGS:M*+:S/+//}
+.if ${lua_ARGS:M??+}
+_LUA_MIN_VERSION:=	${lua_ARGS:M??+:S/+//}
+_LUA_MAX_VERSION:=	99
+.endif
+
 #
-# Resolve minimum versions (ver+). Append anything greater or equal than the
-# specified minimum version to the list of wanted versions.
+# Parse a -ver argument
 #
-.  for _v in ${_LUA_VALID_VERSIONS}
-.    if ${_LUA_MIN_VERSION} <= ${_v}
+.if ${lua_ARGS:M-??}
+_LUA_MAX_VERSION:=	${lua_ARGS:M-??:S/-//}
+_LUA_MIN_VERSION:=	0
+.endif
+
+#
+# Parse a ver-ver argument
+#
+.if ${lua_ARGS:M??-??}
+_LUA_MIN_VERSION:=	${lua_ARGS:M??-??:C/-.*//}
+_LUA_MAX_VERSION:=	${lua_ARGS:M??-??:C/.*-//}
+.endif
+
+#
+# Parse one or more ver arguments
+#
+.if ${lua_ARGS:M[1-9][0-9]}
+.  for _v in ${lua_ARGS:M[1-9][0-9]}
+.    if ${_LUA_VALID_VERSIONS:M${_v}}
 _LUA_WANTED_VERSIONS+=${_v}
 .    endif
 .  endfor
+.  if empty(_LUA_WANTED_VERSIONS)
+IGNORE= USES=lua:nn did not find any valid version number
+.  endif
 .endif
 
 #
-# Parse one or more ver arguments
+# Resolve version ranges. Append anything within the range to the list of
+# wanted versions.
 #
-.if ${lua_ARGS:M5[1-3]}
-_LUA_WANTED_VERSIONS:=	${lua_ARGS:M5[1-3]}
+.if defined(_LUA_MIN_VERSION) && defined(_LUA_MAX_VERSION)
+.  for _v in ${_LUA_VALID_VERSIONS}
+.    if ${_LUA_MIN_VERSION} <= ${_v} && ${_LUA_MAX_VERSION} >= ${_v}
+_LUA_WANTED_VERSIONS+=${_v}
+.    endif
+.  endfor
+.  if empty(_LUA_WANTED_VERSIONS)
+IGNORE= USES=lua:xx-yy did not find any valid version
+.  endif
 .endif
 
 #
-# If no version was specified with any of the ver or ver+ arguments, set the
-# default version.
+# If no version was specified with any of the ver or ver+ arguments, allow
+# all versions.
 #
-.if !defined(_LUA_WANTED_VERSIONS)
-_LUA_WANTED_VERSIONS=	${_LUA_DEFAULT_VERSION}
+.if empty(_LUA_WANTED_VERSIONS)
+_LUA_WANTED_VERSIONS:=	${_LUA_VALID_VERSIONS}
 .endif
 
 #
-# Right now we have built a list of potential versions that we may depend on.
-# Let's sort them and remove any duplicates. We then locate the highest one
-# already installed, if any.
+# By now, _LUA_WANTED_VERSIONS is the list of valid version numbers that the
+# caller has allowed through. We want to put the default version, if it's in
+# the list, first, followed by all other versions in desc order; then the
+# first element is the one we want (or the default flavor in the flavor case)
 #
-.for _v in ${_LUA_WANTED_VERSIONS:O:u}
-_LUA_HIGHEST_VERSION:=${_v}
-.  if exists(${LOCALBASE}/bin/lua${_v})
-_LUA_HIGHEST_INSTALLED_VERSION:=	${_v}
+_LUA_WANTED_VERSIONS:= \
+	${_LUA_WANTED_VERSIONS:M${_LUA_DEFAULT_VERSION}} \
+	${_LUA_WANTED_VERSIONS:N${_LUA_DEFAULT_VERSION}:O:u:[-1..1]}
+
+.if ${_LUA_ARG_FLAVORS}
+.  if empty(FLAVORS)
+FLAVORS= ${_LUA_WANTED_VERSIONS:S/^/lua/}
 .  endif
-.endfor
+.  if empty(FLAVOR)
+FLAVOR= ${FLAVORS:[1]}
+.  endif
+_LUA_WANTED_VERSION:= ${FLAVOR:S/^lua//}
+.else
+_LUA_WANTED_VERSION:= ${_LUA_WANTED_VERSIONS:[1]}
+.endif
 
+# If we're building Lua itself, everything should be in $PREFIX. If
+# we're building a module or app, then the stuff we're installing goes
+# in $PREFIX but references to Lua itself are in $LOCALBASE.
 #
-# Depend on the default version if it fits, or the highest installed version,
-# or the highest version.
-#
-.if ${_LUA_WANTED_VERSIONS:M${_LUA_DEFAULT_VERSION}}
-_LUA_WANTED_VERSION:=	${_LUA_DEFAULT_VERSION}
-.elif defined(_LUA_HIGHEST_INSTALLED_VERSION)
-_LUA_WANTED_VERSION:=	${_LUA_HIGHEST_INSTALLED_VERSION}
+# The assumption is the LUA_MOD* directories are where we're going to
+# install (this is common for both modules and apps), and so we also
+# define LUA_REFMOD* relative to LOCALBASE for use when specifying
+# dependencies and so on.
+
+.if ${_LUA_ARG_CORE}
+LUA_BASE=${PREFIX}
 .else
-_LUA_WANTED_VERSION:=	${_LUA_HIGHEST_VERSION}
+LUA_BASE=${LOCALBASE}
 .endif
 
+LUA_PREFIX=${PREFIX}
+
 #
 # Exported variables
 #
 LUA_VER_STR=		${_LUA_WANTED_VERSION}
-LUA_VER=		${_LUA_WANTED_VERSION:S/5/5./}
-LUA_CMD=		lua${_LUA_WANTED_VERSION}
-LUAC_CMD=		luac${_LUA_WANTED_VERSION}
-LUA_INCDIR=		${LOCALBASE}/include/lua${_LUA_WANTED_VERSION}
-LUA_MODLIBDIR=		${LOCALBASE}/lib/lua/${LUA_VER}
-LUA_MODSHAREDIR=	${LOCALBASE}/share/lua/${LUA_VER}
-LUA_LIBDIR=		${LOCALBASE}/lib
+LUA_VER=		${_LUA_WANTED_VERSION:S/^5/5./}
+LUA_FLAVOR=		${_LUA_WANTED_VERSION:S/^/lua/}
+
+LUA_CMD=		lua${LUA_VER_STR}
+LUAC_CMD=		luac${LUA_VER_STR}
 LUA_PKGNAMEPREFIX=	lua${LUA_VER_STR}-
 
-PLIST_SUB+=	LUA_MODLIBDIR=${LUA_MODLIBDIR:S,^${LOCALBASE}/,,} \
-		LUA_MODSHAREDIR=${LUA_MODSHAREDIR:S,^${LOCALBASE}/,,} \
+LUA_LIBDIR=		${LUA_BASE}/lib
+LUA_INCDIR=		${LUA_BASE}/include/lua${LUA_VER_STR}
+
+LUA_MODLIBDIR=		${LUA_PREFIX}/lib/lua/${LUA_VER}
+LUA_MODSHAREDIR=	${LUA_PREFIX}/share/lua/${LUA_VER}
+LUA_MODDOCSDIR=		${LUA_PREFIX}/share/doc/lua${LUA_VER_STR}
+LUA_MODEXAMPLESDIR=	${LUA_PREFIX}/share/examples/lua${LUA_VER_STR}
+
+LUA_REFMODLIBDIR=	${LUA_BASE}/lib/lua/${LUA_VER}
+LUA_REFMODSHAREDIR=	${LUA_BASE}/share/lua/${LUA_VER}
+
+PLIST_SUB+=	LUA_MODLIBDIR=${LUA_MODLIBDIR:S,^${LUA_PREFIX}/,,} \
+		LUA_MODSHAREDIR=${LUA_MODSHAREDIR:S,^${LUA_PREFIX}/,,} \
+		LUA_MODDOCSDIR=${LUA_MODDOCSDIR:S,^${LUA_PREFIX}/,,} \
+		LUA_INCDIR=${LUA_INCDIR:S,^${LUA_BASE}/,,} \
+		LUA_LIBDIR=${LUA_LIBDIR:S,^${LUA_BASE}/,,} \
 		LUA_VER=${LUA_VER} \
-		LUA_INCDIR=${LUA_INCDIR:S,^${LOCALBASE}/,,} \
-		LUA_LIBDIR=${LUA_LIBDIR:S,^${LOCALBASE}/,,} \
 		LUA_VER_STR=${LUA_VER_STR}
 MAKE_ENV+=	LUA_MODLIBDIR=${LUA_MODLIBDIR} \
 		LUA_MODSHAREDIR=${LUA_MODSHAREDIR} \
-		LUA_VER=${LUA_VER} \
+		LUA_MODDOCSDIR=${LUA_MODDOCSDIR} \
 		LUA_INCDIR=${LUA_INCDIR} \
-		LUA_LIBDIR=${LUA_LIBDIR}
+		LUA_LIBDIR=${LUA_LIBDIR} \
+		LUA_VER=${LUA_VER} \
+		LUA_VER_STR=${LUA_VER_STR}
 
-.if ${lua_ARGS:Mbuild}
+# if building a module or Lua itself, or if the port defined LUA_DOCSUBDIR,
+# then define LUA_DOCSDIR and LUA_EXAMPLESDIR too
+.if ${_LUA_ARG_CORE} || ${_LUA_ARG_MODULE}
+LUA_DOCSUBDIR?=${PORTNAME}
+.endif
+.if !empty(LUA_DOCSUBDIR)
+LUA_DOCSDIR=	${LUA_MODDOCSDIR}/${LUA_DOCSUBDIR}
+LUA_EXAMPLESDIR=${LUA_MODEXAMPLESDIR}/${LUA_DOCSUBDIR}
+PLIST_SUB+=	LUA_DOCSDIR=${LUA_DOCSDIR:S,^${LUA_PREFIX}/,,}
+PLIST_SUB+=	LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR:S,^${LUA_PREFIX}/,,}
+MAKE_ENV+=	LUA_DOCSDIR=${LUA_DOCSDIR}
+MAKE_ENV+=	LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR}
+.endif
+
+.if empty(_LUA_ARG_ENV)
+.  if ${lua_ARGS:Mbuild}
 BUILD_DEPENDS+=	${LUA_CMD}:lang/lua${LUA_VER_STR}
-.elif ${lua_ARGS:Mrun}
+.  endif
+.  if ${lua_ARGS:Mrun}
 RUN_DEPENDS+=	${LUA_CMD}:lang/lua${LUA_VER_STR}
-.else
+.  endif
+.  if !${lua_ARGS:Mbuild} && !${lua_ARGS:Mrun}
 LIB_DEPENDS+=	liblua-${LUA_VER}.so:lang/lua${LUA_VER_STR}
+.  endif
 .endif
 
 .endif

Modified: head/archivers/Makefile
==============================================================================
--- head/archivers/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/archivers/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -71,7 +71,7 @@
     SUBDIR += lizard
     SUBDIR += lrzip
     SUBDIR += lua-lzlib
-    SUBDIR += lua51-zlib
+    SUBDIR += lua-zlib
     SUBDIR += lzfse
     SUBDIR += lzip
     SUBDIR += lziprecover

Modified: head/archivers/lua-lzlib/Makefile
==============================================================================
--- head/archivers/lua-lzlib/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/archivers/lua-lzlib/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -2,6 +2,7 @@
 
 PORTNAME=	lzlib
 PORTVERSION=	0.4.3
+PORTREVISION=	1
 CATEGORIES=	archivers
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
@@ -10,7 +11,7 @@ COMMENT=	Lua bindings to the ZLib compression library
 
 LICENSE=	MIT
 
-USES=		cmake lua
+USES=		cmake lua:51-52,module
 USE_GITHUB=	yes
 GH_ACCOUNT=	LuaDist
 CMAKE_ARGS=	-DINSTALL_LMOD="${LUA_MODSHAREDIR}" \

Modified: head/archivers/lua-zlib/Makefile
==============================================================================
--- head/archivers/lua51-zlib/Makefile	Tue Apr 14 14:07:08 2020	(r531692)
+++ head/archivers/lua-zlib/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,9 +3,10 @@
 
 PORTNAME=	zlib
 PORTVERSION=	1.2
+PORTREVISION=	1
 DISTVERSIONPREFIX=v
 CATEGORIES=	archivers
-PKGNAMEPREFIX=	lua51-
+PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
 MAINTAINER=	sirl33tname@gmail.com
 COMMENT=	Simple streaming interface to zlib for the Lua Programming Language
@@ -16,7 +17,7 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	brimworks
 GH_PROJECT=	lua-zlib
 
-USES=		lua:51
+USES=		lua:51,module
 
 ALL_TARGET=	bsd
 MAKE_ENV+=	LUAPATH="${LOCALBASE}"

Modified: head/astro/celestia/Makefile
==============================================================================
--- head/astro/celestia/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/astro/celestia/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -15,7 +15,7 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libpng.so:graphics/png
 
-USES=		compiler:c++11-lang gettext gl gmake jpeg libtool lua pkgconfig
+USES=		compiler:c++11-lang gettext gl gmake jpeg libtool lua:52 pkgconfig
 USE_GL=		gl
 GNU_CONFIGURE=	yes
 EXTRA_PATCHES=	${FILESDIR}/celestia-1.6.1-lua-5.2.patch:-p1 \

Modified: head/audio/Makefile
==============================================================================
--- head/audio/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/audio/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -462,7 +462,7 @@
     SUBDIR += lollypop
     SUBDIR += lpac
     SUBDIR += lsp-plugins-lv2
-    SUBDIR += lua51-mpd
+    SUBDIR += lua-mpd
     SUBDIR += luppp
     SUBDIR += lv2
     SUBDIR += lv2file

Modified: head/audio/aqualung/Makefile
==============================================================================
--- head/audio/aqualung/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/audio/aqualung/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,7 +3,7 @@
 
 PORTNAME=	aqualung
 PORTVERSION=	1.0
-PORTREVISION=	13
+PORTREVISION=	14
 CATEGORIES=	audio
 MASTER_SITES=	SF
 
@@ -30,7 +30,7 @@ LIB_DEPENDS=	libFLAC.so:audio/flac \
 		libcdio_paranoia.so:sysutils/libcdio-paranoia \
 		liblrdf.so:textproc/liblrdf
 
-USES=		compiler:c++11-lang gettext gnome localbase lua pkgconfig
+USES=		compiler:c++11-lang gettext gnome localbase lua:52 pkgconfig
 USE_GNOME=	gtk20 libxml2 libxslt
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-ifp=no

Modified: head/audio/lua-mpd/Makefile
==============================================================================
--- head/audio/lua51-mpd/Makefile	Tue Apr 14 14:07:08 2020	(r531692)
+++ head/audio/lua-mpd/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -2,6 +2,7 @@
 
 PORTNAME=	mpd
 PORTVERSION=	0.1
+PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	audio
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
@@ -9,15 +10,15 @@ PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 MAINTAINER=	demelier.david@gmail.com
 COMMENT=	Lua library for musicpd
 
-RUN_DEPENDS=	${LUA_MODLIBDIR}/socket/core.so:net/luasocket-51
+RUN_DEPENDS=	${LUA_REFMODLIBDIR}/socket/core.so:net/luasocket@${LUA_FLAVOR}
 
 OPTIONS_DEFINE=	DOCS
-DOCSDIR=	${PREFIX}/share/doc/${PKGBASE}
+DOCSDIR=	${LUA_DOCSDIR}
 
 GH_ACCOUNT=	silentbicycle
 GH_PROJECT=	lua-mpd
 
-USES=		lua:51
+USES=		lua:51,module
 USE_GITHUB=	yes
 NO_BUILD=	yes
 

Modified: head/converters/Makefile
==============================================================================
--- head/converters/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/converters/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -49,7 +49,6 @@
     SUBDIR += linux-c7-fribidi
     SUBDIR += lua-iconv
     SUBDIR += lua-json
-    SUBDIR += lua51-iconv
     SUBDIR += mimelib
     SUBDIR += mmencode
     SUBDIR += mpack

Modified: head/converters/lua-iconv/Makefile
==============================================================================
--- head/converters/lua-iconv/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/converters/lua-iconv/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,7 +3,7 @@
 
 PORTNAME=	iconv
 PORTVERSION=	7
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	converters
 MASTER_SITES=	GHC
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
@@ -13,13 +13,11 @@ MAINTAINER=	vanilla@FreeBSD.org
 COMMENT=	Iconv binding for Lua 5
 
 BROKEN=		unfetchable
-DEPRECATED=	Broken for more than 6 months
-EXPIRATION_DATE=	2020-05-05
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		pkgconfig iconv lua
+USES=		pkgconfig iconv lua:module
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	ittner

Modified: head/converters/lua-json/Makefile
==============================================================================
--- head/converters/lua-json/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/converters/lua-json/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,17 +3,18 @@
 
 PORTNAME=	json
 PORTVERSION=	1.3.4
+PORTREVISION=	1
 CATEGORIES=	converters
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	JSON parser/creator for Lua
 
-RUN_DEPENDS=	${LUA_PKGNAMEPREFIX}lpeg>=0.8.1:devel/lua-lpeg
+RUN_DEPENDS=	${LUA_PKGNAMEPREFIX}lpeg>=0.8.1:devel/lua-lpeg@${LUA_FLAVOR}
 
 MAKE_ARGS=	INSTALL_CMOD=${LUA_MODLIBDIR} INSTALL_LMOD=${LUA_MODSHAREDIR}
 NO_ARCH=	yes
-USES=		lua:run
+USES=		lua:run,module
 
 GH_ACCOUNT=	harningt
 GH_PROJECT=	lua${PORTNAME}

Modified: head/databases/lua-lsqlite3/Makefile
==============================================================================
--- head/databases/lua-lsqlite3/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/databases/lua-lsqlite3/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,6 +3,7 @@
 
 PORTNAME=	lsqlite3
 PORTVERSION=	0.9.5
+PORTREVISION=	1
 CATEGORIES=	databases
 MASTER_SITES=	http://Lua.SQLite.org/index.cgi/zip/
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
@@ -15,30 +16,20 @@ LICENSE=	MIT
 
 BUILD_DEPENDS=	${NONEXISTENT}:databases/sqlite3:patch
 
-USES=		localbase:ldflags sqlite:3 zip
+USES=		localbase:ldflags sqlite:3 zip lua:module
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
-OPTIONS_SINGLE=	LUA_VERSION
-OPTIONS_SINGLE_LUA_VERSION=	LUA51 LUA52 LUA53
-OPTIONS_DEFAULT=LUA${LUA_DEFAULT:S/.//}
 
-LUA51_DESC=	Build for Lua 5.1 and LuaJIT
-LUA51_USES=	lua:51
-LUA52_DESC=	Build for Lua 5.2
-LUA52_USES=	lua:52
-LUA53_DESC=	Build for Lua 5.3
-LUA53_USES=	lua:53
-
 CFLAGS+=	-pedantic -Wall -Qunused-arguments -fPIC -DPIC\
 		-std=c99 -fno-strict-aliasing -I${LUA_INCDIR}\
 		-DLSQLITE_VERSION=\"${PORTVERSION}\"
 LDFLAGS+=	-shared -pthread -lm -L${LOCALBASE}/lib
 
-DOCSDIR=	${PREFIX}/share/doc/lua${LUA_VER_STR}/${PORTNAME}
-EXAMPLESDIR=	${PREFIX}/share/examples/lua${LUA_VER_STR}/${PORTNAME}
+DOCSDIR=	${LUA_DOCSDIR}
+EXAMPLESDIR=	${LUA_EXAMPLESDIR}
 
 pre-configure:
-	@${CP} -p `${MAKE} -V WRKSRC -C ${PORTSDIR}/databases/sqlite3`/sqlite3.[ch] ${WRKSRC}
+	@${CP} -p `${SETENV} -u FLAVOR ${MAKE} -V WRKSRC -C ${PORTSDIR}/databases/sqlite3`/sqlite3.[ch] ${WRKSRC}
 
 do-build:
 	cd ${WRKSRC} &&\

Modified: head/databases/lua-xapian/Makefile
==============================================================================
--- head/databases/lua-xapian/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/databases/lua-xapian/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -4,6 +4,7 @@
 PORTNAME=	xapian
 PORTVERSION=	1.4.15
 DISTVERSIONPREFIX=	bindings-
+PORTREVISION=	1
 CATEGORIES=	databases
 MASTER_SITES=	https://oligarchy.co.uk/xapian/${PORTVERSION}/ \
 		LOCAL/sunpoet
@@ -24,7 +25,9 @@ OPTIONS_DEFINE=	DOCS
 
 PORTSCOUT=	limitw:1,even
 
-USES=		compiler:c++11-lang libtool lua tar:xz
+USES=		compiler:c++11-lang libtool lua:module tar:xz
+
+DOCSDIR=	${LUA_DOCSDIR}
 
 CONFIGURE_ARGS=	--datarootdir=${DATADIR} \
 		--docdir=${DOCSDIR} \

Modified: head/databases/luadbi/Makefile
==============================================================================
--- head/databases/luadbi/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/databases/luadbi/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -4,6 +4,7 @@
 PORTNAME=	luadbi
 PORTVERSION=	0.6
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	databases
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
@@ -12,7 +13,7 @@ COMMENT=	LuaDBI driver
 
 LICENSE=	MIT
 
-USES=		gmake shebangfix
+USES=		gmake shebangfix lua:module
 SHEBANG_FILES=	DBI.lua
 
 USE_GITHUB=	yes
@@ -30,17 +31,11 @@ MAKE_ENV+=	LUA_INC="-I${LUA_INCDIR}"
 
 MAKE_JOBS_UNSAFE=yes
 
-OPTIONS_SINGLE=	LUA_VERSION
-OPTIONS_SINGLE_LUA_VERSION=	LUA51 LUA52 LUA53
 OPTIONS_MULTI=	DATABASE
 OPTIONS_MULTI_DATABASE=	MYSQL SQLITE3 PGSQL
-OPTIONS_DEFAULT=	MYSQL LUA52
+OPTIONS_DEFAULT=	MYSQL
 
 PLIST_FILES=	%%LUA_MODSHAREDIR%%/DBI.lua
-
-LUA51_USES=	lua:51
-LUA52_USES=	lua:52
-LUA53_USES=	lua:53
 
 MYSQL_USES=		mysql
 MYSQL_ALL_TARGET=	mysql

Modified: head/databases/luasql-mysql/Makefile
==============================================================================
--- head/databases/luasql-mysql/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/databases/luasql-mysql/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,8 +3,10 @@
 
 PORTNAME=	luasql
 PORTVERSION=	2.5.0
+PORTREVISION=	1
 CATEGORIES=	databases
 PKGNAMESUFFIX=	-${LUASQL_DRIVER}
+PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
 MAINTAINER=	mbeis@xs4all.nl
 COMMENT=	LuaSQL driver
@@ -14,7 +16,7 @@ LICENSE=	MIT
 USE_GITHUB=	yes
 GH_ACCOUNT=	keplerproject
 
-USES=		lua gmake dos2unix
+USES=		lua:module gmake dos2unix
 DOS2UNIX_FILES=	src/*.c
 ALL_TARGET=	${LUASQL_DRIVER}
 
@@ -30,8 +32,7 @@ MAKE_ARGS=	LUA_DIR=${LUA_SUBDIR} \
 
 CFLAGS+=	-Wno-return-type
 
-PLIST_SUB=	LUA_MIDLIBDIR=${LUA_MODLIBDIR} \
-		LUASQL_DRIVER=${LUASQL_DRIVER}
+PLIST_SUB=	LUASQL_DRIVER=${LUASQL_DRIVER}
 
 .if ${LUASQL_DRIVER} == "mysql"
 COMMENT=	Lua interface to MySQL

Modified: head/databases/redis-devel/Makefile
==============================================================================
--- head/databases/redis-devel/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/databases/redis-devel/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -31,7 +31,7 @@ MAKE_ENV=	V=yo OPTIMIZATION=
 
 JEMALLOC_MAKE_ENV=	USE_JEMALLOC=yes
 
-LUA_USE=		lua=51
+LUA_USES=		lua:51
 LUA_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src-Makefile.lua
 LUA_VARS=		_addflags=true
 

Modified: head/databases/xapian-bindings/Makefile
==============================================================================
--- head/databases/xapian-bindings/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/databases/xapian-bindings/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -17,7 +17,7 @@ PORTSCOUT=	limitw:1,even
 
 USES=		metaport
 
-LUA_RUN_DEPENDS=	${LUA_PKGNAMEPREFIX}xapian>=${PORTVERSION}:databases/lua-xapian
+LUA_RUN_DEPENDS=	${LUA_PKGNAMEPREFIX}xapian>=${PORTVERSION}:databases/lua-xapian@${LUA_FLAVOR}
 LUA_USES=		lua:run
 PERL_RUN_DEPENDS=	p5-Xapian>=${PORTVERSION}:databases/p5-Xapian
 PHP_RUN_DEPENDS=	php-xapian>=${PORTVERSION}:databases/php-xapian

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -1460,6 +1460,7 @@
     SUBDIR += lua-cjson
     SUBDIR += lua-gettext
     SUBDIR += lua-lgi
+    SUBDIR += lua-libevent
     SUBDIR += lua-lpeg
     SUBDIR += lua-luacheck
     SUBDIR += lua-luarocks
@@ -1472,12 +1473,8 @@
     SUBDIR += lua-stdlib-debug
     SUBDIR += lua-stdlib-normalize
     SUBDIR += lua-sysctl
-    SUBDIR += lua51-bitop
-    SUBDIR += lua51-cjson
-    SUBDIR += lua51-libevent
     SUBDIR += luabind
     SUBDIR += luafilesystem
-    SUBDIR += luafilesystem-51
     SUBDIR += luajava
     SUBDIR += lutok
     SUBDIR += luv

Modified: head/devel/lua-MessagePack/Makefile
==============================================================================
--- head/devel/lua-MessagePack/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-MessagePack/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -2,6 +2,7 @@
 
 PORTNAME=	MessagePack
 PORTVERSION=	0.3.5
+PORTREVISION=	1
 CATEGORIES=	devel
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
@@ -15,7 +16,7 @@ EXPIRATION_DATE=	2020-05-05
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYRIGHT
 
-USES=		lua
+USES=		lua:module
 NO_BUILD=	yes
 NO_ARCH=	yes
 

Modified: head/devel/lua-bitlib/Makefile
==============================================================================
--- head/devel/lua-bitlib/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-bitlib/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,6 +3,7 @@
 
 PORTNAME=	bitlib
 PORTVERSION=	24
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	http://luaforge.net/frs/download.php/2715/
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
@@ -10,7 +11,7 @@ PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Tiny library for bitwise operations
 
-USES=		lua
+USES=		lua:module
 
 PLIST_FILES=	%%LUA_MODLIBDIR%%/bit.so
 

Modified: head/devel/lua-bitop/Makefile
==============================================================================
--- head/devel/lua-bitop/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-bitop/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,7 +3,7 @@
 
 PORTNAME=	bitop
 PORTVERSION=	1.0.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 MASTER_SITES=	http://bitop.luajit.org/download/ \
 		LOCAL/sunpoet
@@ -18,7 +18,7 @@ LICENSE=	MIT
 CFLAGS+=	-I${LUA_INCDIR}
 MAKE_ARGS=	CC=${CC} LUA=${LUA_CMD}
 TEST_TARGET=	test
-USES?=		gmake lua
+USES=		gmake lua:module
 
 PLIST_FILES=	${LUA_MODLIBDIR}/bit.so
 

Modified: head/devel/lua-cjson/Makefile
==============================================================================
--- head/devel/lua-cjson/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-cjson/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,18 +3,19 @@
 
 PORTNAME=	cjson
 PORTVERSION=	2.1.0
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	http://www.kyne.com.au/~mark/software/download/
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 DISTNAME=	lua-cjson-${PORTVERSION}
 
 MAINTAINER=	osa@FreeBSD.org
-COMMENT?=	Fast JSON parsing and encoding support for Lua
+COMMENT=	Fast JSON parsing and encoding support for Lua
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES?=		lua
+USES=		lua:module
 
 MAKE_ARGS=	LUA_VERSION=${LUA_VER}
 

Modified: head/devel/lua-gettext/Makefile
==============================================================================
--- head/devel/lua-gettext/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-gettext/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gettext
 PORTVERSION=	1.5
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	devel
 MASTER_SITES=	https://raw.githubusercontent.com/nuclewall/bsdinstaller/${COMMIT}/src/lib/lua/gettext/ \
 		https://BSDforge.com/projects/source/devel/lua-gettext/
@@ -14,7 +14,7 @@ DIST_SUBDIR=	lua-${PORTNAME}-${COMMIT}
 MAINTAINER=	portmaster@BSDforge.com
 COMMENT=	Gettext binding for Lua 5
 
-USES=		gettext lua:51
+USES=		gettext lua:51,module
 
 CVER=		1.15
 LVER=		${PORTVERSION}

Modified: head/devel/lua-lgi/Makefile
==============================================================================
--- head/devel/lua-lgi/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-lgi/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -2,10 +2,11 @@
 
 PORTNAME=	lgi
 PORTVERSION=	0.9.2
+PORTREVISION=	1
 CATEGORIES=	devel
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	andrew@tao11.riddles.org.uk
 COMMENT=	Lua bindings to libraries using GObject-Introspection
 
 LICENSE=	MIT
@@ -14,7 +15,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 USE_GITHUB=	yes
 GH_ACCOUNT=	pavouk
 
-USES=		gmake gnome lua pkgconfig
+USES=		gmake gnome lua:module pkgconfig
 USE_GNOME=	introspection:build,run
 MAKE_ENV=	LUA_CFLAGS="-I${LUA_INCDIR}"
 MAKE_ARGS=	PREFIX="${PREFIX}" LUA_LIBDIR="${LUA_MODLIBDIR}" \

Modified: head/devel/lua-libevent/Makefile
==============================================================================
--- head/devel/lua51-libevent/Makefile	Tue Apr 14 14:07:08 2020	(r531692)
+++ head/devel/lua-libevent/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -1,12 +1,12 @@
 # Created by: Sir l33tname <sirl33tname@gmail.com>
 # $FreeBSD$
 
-PORTNAME=	lua51
+PORTNAME=	libevent
 PORTVERSION=	0.4.6
 DISTVERSIONPREFIX=v
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
-PKGNAMESUFFIX=	-libevent
+PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
 MAINTAINER=	sirl33tname@gmail.com
 COMMENT=	Lua libevent binding
@@ -14,9 +14,9 @@ COMMENT=	Lua libevent binding
 LICENSE=	MIT
 
 LIB_DEPENDS=	libevent.so:devel/libevent
-RUN_DEPENDS=	${LUA_MODLIBDIR}/socket/core.so:net/luasocket-51
+RUN_DEPENDS=	${LUA_REFMODLIBDIR}/socket/core.so:net/luasocket@${LUA_FLAVOR}
 
-USES=		gmake pkgconfig lua:51
+USES=		gmake pkgconfig lua:51,module
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	harningt

Modified: head/devel/lua-lpeg/Makefile
==============================================================================
--- head/devel/lua-lpeg/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-lpeg/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -2,6 +2,7 @@
 
 PORTNAME=	lpeg
 PORTVERSION=	1.0.2
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	http://www.inf.puc-rio.br/~roberto/lpeg/ \
 		LOCAL/sunpoet
@@ -12,7 +13,7 @@ COMMENT=	PEG-based pattern-matching library for Lua
 
 LICENSE=	MIT
 
-USES=		lua
+USES=		lua:module
 
 ALL_TARGET=	linux
 MAKE_ARGS=	CC=${CC} LUADIR=${LUA_INCDIR}

Modified: head/devel/lua-luacheck/Makefile
==============================================================================
--- head/devel/lua-luacheck/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-luacheck/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -11,7 +11,7 @@ COMMENT=	Linter and static analyzer for lua files
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-RUN_DEPENDS=	${LUA_MODLIBDIR}/lfs.so:devel/luafilesystem
+RUN_DEPENDS=	${LUA_REFMODLIBDIR}/lfs.so:devel/luafilesystem@${LUA_FLAVOR}
 
 USES=	lua
 NO_ARCH=	yes

Modified: head/devel/lua-posix/Makefile
==============================================================================
--- head/devel/lua-posix/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-posix/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -4,6 +4,7 @@
 PORTNAME=	posix
 PORTVERSION=	34.1.1
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	devel
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
@@ -13,9 +14,9 @@ COMMENT=	Lua bindings for POSIX APIs
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-RUN_DEPENDS=	${LUA_PKGNAMEPREFIX}stdlib-normalize>=0:devel/lua-stdlib-normalize
+RUN_DEPENDS=	${LUA_PKGNAMEPREFIX}stdlib-normalize>=0:devel/lua-stdlib-normalize@${LUA_FLAVOR}
 
-USES=		lua shebangfix
+USES=		lua:module shebangfix
 SHEBANG_FILES=	build-aux/luke
 
 USE_GITHUB=	yes

Modified: head/devel/lua-pty/Makefile
==============================================================================
--- head/devel/lua-pty/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-pty/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,6 +3,7 @@
 
 PORTNAME=	pty
 PORTVERSION=	1.25
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	https://raw.githubusercontent.com/nuclewall/bsdinstaller/${COMMIT}/src/lib/lua/pty/ \
 		https://BSDforge.com/projects/source/devel/lua-pty/
@@ -13,7 +14,7 @@ DIST_SUBDIR=	lua-${PORTNAME}-${COMMIT}
 MAINTAINER=	portmaster@BSDforge.com
 COMMENT=	Pty (pseudo-terminal) bindings for Lua 5
 
-USES=		lua:51
+USES=		lua:51,module
 
 COMMIT=		8323bb9
 MAKEFILE=	${FILESDIR}/Makefile

Modified: head/devel/lua-stdlib-debug/Makefile
==============================================================================
--- head/devel/lua-stdlib-debug/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-stdlib-debug/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,6 +3,7 @@
 PORTNAME=	stdlib-debug
 PORTVERSION=	1.0.1
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	devel
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
@@ -13,7 +14,7 @@ LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
 NO_ARCH=	yes
-USES=		lua
+USES=		lua:module
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	lua-stdlib
@@ -21,7 +22,7 @@ GH_PROJECT=	_debug
 
 OPTIONS_DEFINE=	DOCS
 
-DOCSDIR=	${PREFIX}/share/doc/lua${LUA_VER_STR}/${PORTNAME}
+DOCSDIR=	${LUA_DOCSDIR}
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${LUA_MODSHAREDIR}/std/_debug

Modified: head/devel/lua-stdlib-normalize/Makefile
==============================================================================
--- head/devel/lua-stdlib-normalize/Makefile	Tue Apr 14 15:34:40 2020	(r531699)
+++ head/devel/lua-stdlib-normalize/Makefile	Tue Apr 14 15:49:36 2020	(r531700)
@@ -3,6 +3,7 @@
 PORTNAME=	stdlib-normalize
 PORTVERSION=	2.0.2
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	devel
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
@@ -12,10 +13,10 @@ COMMENT=	Collection of normalized lua functions
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-RUN_DEPENDS=	${LUA_PKGNAMEPREFIX}stdlib-debug>=0:devel/lua-stdlib-debug
+RUN_DEPENDS=	${LUA_PKGNAMEPREFIX}stdlib-debug>=0:devel/lua-stdlib-debug@${LUA_FLAVOR}
 
 NO_ARCH=	yes
-USES=		lua
+USES=		lua:module
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	lua-stdlib
@@ -23,7 +24,7 @@ GH_PROJECT=	normalize
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004141549.03EFnbfj073539>