On 2017/01/19 20:25, Edd Barrett wrote:
> Hi Jeremie, Stuart,
> 
> Thanks for the info and suggestions.
> 
> On Thu, Jan 19, 2017 at 06:03:10PM +0100, Jeremie Courreges-Anglas wrote:
> > LuaJIT is not portable.
> > 
> > ONLY_FOR_ARCHS = powerpc i386 amd64
> > 
> > IMHO this is the kind of fragile software you'd better avoid if you can.
> 
> Maybe we can try using regular lua until users (or ourselves) start
> complaining about performance. That seems like a decent incremental step
> forward.

Or use luajit on supported arches (luajit itself supports arm and mips
as well as x86/powerpc), and interpreted lua on others..

btw I am using luajit in production now, rspamd wants it - I haven't
noticed any fragility, it's just not particularly portable..

> > Please try to support as many versions as supported by upstream.  If you
> > find out that only 5.1 is supported, then setting MODLUA_VERSION to 5.1
> > makes sense to save other people's time (at least, that's the current
> > pattern I see).
> 
> It seems to build for all the lua versions we support, so good :)
> 
> > Regarding the port: better use "lua-mpack" or "lua-libmpack" as
> > PKGNAME-lua, for consistency and because the lang/lua module uses this
> > to provide automatic support for multiple versions.
> 
> I've renamed the lua MULTI_PACKAGE to lua-mpack, and added the lua
> flavors. Although this mostly works, the problem is, you get one flavor
> of the -main MULTI_PACKAGE (the C library, nothing to do with lua) for
> each lua version.
> 
> Is there a way to only FLAVOR the -lua MULTI_PACKAGE? I suspect not. In
> which case I suppose I will use sub-dirs that fetch the same DISTFILE
> with a Makefile.inc.

Yes, override FULLPKGPATH-main and FULLPKGNAME-main.

FULLPKGNAME-main= libmpack-$V
FULLPKGPATH-main= devel/libmpack,-main

I'm not sure but you may need ".include <bsd.port.arch.mk>" first.
Do some "make show=PKGNAMES", "FLAVOR=xx make show=PKGNAMES" etc to test.

Reply via email to