Re: lua.port.mk FLAVOR handling

2016-06-07 Thread Jeremie Courreges-Anglas
Florian Stinglmayr  writes:

> On Fri, May 27, 2016 at 02:21:39PM +0200, Jeremie Courreges-Anglas wrote:
>> j...@wxcvbn.org (Jeremie Courreges-Anglas) writes:
>>
>> > 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.
>> >
>
> I submitted a patch recently that made luasocket work with lua53. This
> patch is already upstream and would make it to ports if they decide to
> make a new release.

Committed, thanks.

> But otherwise I am fine with the changes.

(ua.port.mk diff also committed).

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



Re: lua.port.mk FLAVOR handling

2016-05-27 Thread Florian Stinglmayr
On Fri, May 27, 2016 at 02:21:39PM +0200, Jeremie Courreges-Anglas wrote:
> j...@wxcvbn.org (Jeremie Courreges-Anglas) writes:
>
> > 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.
> >

I submitted a patch recently that made luasocket work with lua53. This
patch is already upstream and would make it to ports if they decide to
make a new release.

But otherwise I am fine with the changes.

Index: Makefile
===
RCS file: /cvs/ports/net/luasocket/Makefile,v
retrieving revision 1.31
diff -u -p -u -r1.31 Makefile
--- Makefile5 Apr 2015 13:31:14 -   1.31
+++ Makefile3 Apr 2016 18:26:55 -
@@ -7,7 +7,7 @@ V=  3.0-rc1
 GH_ACCOUNT=diegonehab
 GH_PROJECT=luasocket
 GH_TAGNAME=v$V
-REVISION=  0
+REVISION=  1
 DISTNAME=  ${GH_PROJECT}-$V
 PKGNAME=   ${DISTNAME:S/-rc/rc/}
 CATEGORIES=net
@@ -27,7 +27,8 @@ MAKE_FILE=makefile
 MAKE_FLAGS=CC_linux=${CC} \
LD_linux=${CC} \
CFLAGS_linux="${CFLAGS} -I${MODLUA_INCL_DIR} -fPIC \
- -DPIC -DUNIX_HAS_SUN_LEN" \
+ -DPIC -DUNIX_HAS_SUN_LEN \
+ -DLUA_COMPAT_APIINTCASTS" \
LDFLAGS_linux="${LDFLAGS} -shared -fPIC -o "
 
 do-install:



Re: lua.port.mk FLAVOR handling

2016-05-27 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes:

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

ping

> 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 -  1.33
> +++ lang/lua/lua.port.mk  17 May 2016 04:55:56 -
> @@ -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/Makefile18 Mar 2016 20:49:28 -  1.32
> +++ net/luasocket/Makefile17 May 2016 04:54:25 -
> @@ -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



lua.port.mk FLAVOR handling

2016-05-16 Thread Jeremie Courreges-Anglas

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.mk18 Oct 2015 20:20:50 -  1.33
+++ lang/lua/lua.port.mk17 May 2016 04:55:56 -
@@ -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 -  1.32
+++ net/luasocket/Makefile  17 May 2016 04:54:25 -
@@ -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