Stuart Henderson <s...@spacehopper.org> writes:

> On 2017/01/22 16:50, Edd Barrett wrote:
>> Hi,
>> 
>> On Thu, Jan 19, 2017 at 10:07:30PM +0100, Jeremie Courreges-Anglas wrote:
>> > > 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.
>> 
>> I've added a (minimal) test case, which seems to work for lua51-53,
>> which is 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 think I got this (almost) right, but I had to jump through some hoops
>> to get the lua subpackages with the right name (I think complicated by
>> the fact that the lua bindings are MULTI_PACKAGES).
>> 
>> I have a feeling that the FULLPKGPATH-lua needs a version suffix, but
>> couldn't find a satisfying way (although what I currently have doesn't
>> seem to cause any superficial issues). Any ideas?

If you're talking about having an additional -lua52/-lua53 suffix, then
I can't see a reason for it and I'd find this confusing at best.

>> Updated tarball attached.
>> 
>> -- 
>> Best Regards
>> Edd Barrett
>> 
>> http://www.theunixzoo.co.uk
>
>
>
> I think you can get rid of the FULLPKGPATH-lua and use PKGNAME-lua
> instead of FULLPKGNAME-lua. And adjust TEST_DEPENDS:
>
> $ grep PKG.*lua Makefile
> PKGNAME-lua = ${_MODLUA_PKG_PREFIX}-mpack-${V}
> TEST_DEPENDS +=       ${PKGNAME-lua}:${FULLPKGPATH-lua}
>
> This gives these, which seem right to me :
>
> $ make show=FULLPKGPATH-lua
> devel/libmpack,-lua
> $ make show=PKGNAMES
> libmpack-1.0.3 lua-mpack-1.0.3
> $ make show=TEST_DEPENDS
> lua-mpack-1.0.3:devel/libmpack,-lua
>
> $ FLAVOR=lua53 make show=FULLPKGPATH-lua
> devel/libmpack,-lua,lua53
> $ FLAVOR=lua53 make show=PKGNAMES
> libmpack-1.0.3 lua53-mpack-1.0.3-lua53
                                  ^^^^^^
This doesn't look right, I expect "lua53-mpack-1.0.3", which is what
I get with Edd's tarball.  I can't find a meaning for
"lua53-mpack-1.0.3-lua53": is it a lua53 FLAVOR of "lua53-mpack-1.0.3"?
AFAIK no other port is named lua53-foo-lua53.

> $ FLAVOR=lua53 make show=TEST_DEPENDS
> lua53-mpack-1.0.3-lua53:devel/libmpack,-lua,lua53
                   ^^^^^^ Same here.

The port looks fine, but I find all this FULLPKG-fu confusing.
Splitting the port would make things more readable IMHO.

Also:
- please use
  FLAVORS =       lua52 lua53
  FLAVOR ?=
  just like in other lua ports
- y u no like libmpack.la? :)

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

Reply via email to