Edd Barrett <e...@theunixzoo.co.uk> writes:

> 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.
>
>> 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 :)

This is often not enough: pure lua builds typically don't run the code
at build time, and C lua extensions might use lua C API functions only
available is some lua versions, with a failure to resolve missing
symbols at runtime.

The best way to know if things are right is probably to have a test
target for the lua module. ;)

>> 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.

No way that I am aware of, but I didn't really look the details.

> In
> which case I suppose I will use sub-dirs that fetch the same DISTFILE
> with a Makefile.inc.
>
> What do you think?

Something like

libmpack/
  Makefile.inc
  libmpack/
  lua-libmpack/

would be a possible workaround indeed.  And it will probably help
lang/lua set the FULLPKGNAME according to the lua FLAVOR.

Of course, make sure you use MODLUA_WANTLIB.

Do you have any reason to remove libmpack.la?

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to