On 2014/11/25 17:04, Landry Breuil wrote: > Hi, > > i need this to auth prosody users against ldap, basic testing seems to > work. It doesnt build with FLAVOR=lua52 though, and upstream is.. > 'dormant'.. what should we do in that case ? > > ok to import ? > > Landry
The lualdap port looks to be in good shape, I think it should have MODLUA_VERSION=5.1 set because we know this is 5.1-only, but otherwise OK to import. However looking at lua.port.mk flavour handling, something seems a little wrong. >8...snip... # 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 just the lua flavors. .if !defined(MODLUA_VERSION) && !defined(FLAVORS) FLAVORS?= lua52 .else FLAVORS+= lua52 .endif >8...snip... So first we can simplify, it doesn't actually matter whether a port has existing flavours, we can use += in both cases (the ?= doesn't do anything here; if somebody is overriding FLAVORS by setting it in their Makefile, this branch of the .if is not taken, so we might as well just use +=). And second, if MODLUA_VERSION is set, adding a lua-version related flavour is pointless, as we can't override it anyway. So I think we probably want this diff, but I don't have time to check it today. Index: lua.port.mk =================================================================== RCS file: /cvs/ports/lang/lua/lua.port.mk,v retrieving revision 1.28 diff -u -p -r1.28 lua.port.mk --- lua.port.mk 2 Jun 2013 16:59:48 -0000 1.28 +++ lua.port.mk 29 Nov 2014 13:43:49 -0000 @@ -10,11 +10,7 @@ CATEGORIES+= lang/lua # Define the default version and use that if MODLUA_VERSION is not set. 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 just the lua flavors. -.if !defined(MODLUA_VERSION) && !defined(FLAVORS) -FLAVORS?= lua52 -.else +.if !defined(MODLUA_VERSION) FLAVORS+= lua52 .endif