While testing the support for various lua versions in our lua ports, I noticed the case of luasec,lua53 and luasocket,lua53. luasocket doesn't work with lua53. I tried to limit its available flavors, but did not get the expected failure when installing luasec,lua53: luasocket,lua53 was still built and installed.
The goal of this diff is to be able to restrict the available lua flavors to the ones that have actually been tested. The luasocket diff is just here to serve as a proof of concept. Diff tested with: for sub in $(awk '/lua/ { print $3 }' Makefile); do make clean all repackage SUBDIR=$sub || break done in devel/ with no visible adverse effect. Thoughts? ok? Index: lang/lua/lua.port.mk =================================================================== RCS file: /cvs/ports/lang/lua/lua.port.mk,v retrieving revision 1.33 diff -u -p -r1.33 lua.port.mk --- lang/lua/lua.port.mk 18 Oct 2015 20:20:50 -0000 1.33 +++ lang/lua/lua.port.mk 17 May 2016 04:55:56 -0000 @@ -11,13 +11,14 @@ CATEGORIES += lang/lua MODLUA_DEFAULT_VERSION = 5.1 # If a port already has flavors, append our lua flavors to it, unless it -# requests a specific version of lua. Otherwise set the FLAVORS list to +# requests specific versions of lua. Otherwise set the FLAVORS list to # just the lua flavors. +_MODLUA_FLAVORS = lua52 lua53 .if !defined(MODLUA_VERSION) . if !defined(FLAVORS) -FLAVORS ?= lua52 lua53 -. else -FLAVORS += lua52 lua53 +FLAVORS ?= ${_MODLUA_FLAVORS} +. elif !${FLAVORS:M${_MODLUA_FLAVORS}} +FLAVORS += ${_MODLUA_FLAVORS} . endif .endif Index: net/luasocket/Makefile =================================================================== RCS file: /cvs/ports/net/luasocket/Makefile,v retrieving revision 1.32 diff -u -p -r1.32 Makefile --- net/luasocket/Makefile 18 Mar 2016 20:49:28 -0000 1.32 +++ net/luasocket/Makefile 17 May 2016 04:54:25 -0000 @@ -18,6 +18,9 @@ PERMIT_PACKAGE_CDROM= Yes MODULES= lang/lua NO_TEST= Yes +FLAVORS= lua52 +FLAVOR?= + USE_GMAKE= Yes MAKE_FILE= makefile -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE