Patchwork [1/3] gnu: lua: Update to 5.3.3.

login
register
mail settings
Submitter Marius Bakke
Date Oct. 31, 2016, 1:29 p.m.
Message ID <20161031132944.2353-2-mbakke@fastmail.com>
Download mbox | patch
Permalink /patch/17038/
State New
Headers show

Comments

Marius Bakke - Oct. 31, 2016, 1:29 p.m.
* gnu/packages/lua.scm (lua): Update to 5.3.3.
[source]: Use https URL.
[home-page]: Use https URL.
(lua-5.2): New variable.
(lua-5.1)[source]: Use https URL.
---
 gnu/packages/lua.scm | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)
Leo Famulari - Oct. 31, 2016, 5:55 p.m.
On Mon, Oct 31, 2016 at 01:29:42PM +0000, Marius Bakke wrote:
> * gnu/packages/lua.scm (lua): Update to 5.3.3.
> [source]: Use https URL.
> [home-page]: Use https URL.
> (lua-5.2): New variable.
> (lua-5.1)[source]: Use https URL.
> ---
>  gnu/packages/lua.scm | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
> index 8fdba61..55e529e 100644
> --- a/gnu/packages/lua.scm
> +++ b/gnu/packages/lua.scm
> @@ -40,13 +40,13 @@
>  (define-public lua
>    (package
>      (name "lua")
> -    (version "5.2.4")
> +    (version "5.3.3")
>      (source (origin
>               (method url-fetch)
> -             (uri (string-append "http://www.lua.org/ftp/lua-"
> +             (uri (string-append "https://www.lua.org/ftp/lua-"
>                                   version ".tar.gz"))
>               (sha256
> -              (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"))
> +              (base32 "18mcfbbmjyp8f2l9yy7n6dzk066nq6man0kpwly4bppphilc04si"))
>               (patches (search-patches "lua-pkgconfig.patch"
>                                        "lua52-liblua-so.patch"))))

Does this lua52-liblua-so.patch still apply / is it still needed for Lua
5.3? I remember that there were significant differences between how Lua
5.1 and 5.2 in terms of building a dynamic Lua library.

If so, I guess we should rename it.

>      (build-system gnu-build-system)
> @@ -69,7 +69,7 @@
>                                 (string-append "INSTALL_TOP=" out)
>                                 (string-append "INSTALL_MAN=" out
>                                                "/share/man/man1")))))))))
> -    (home-page "http://www.lua.org/")
> +    (home-page "https://www.lua.org/")
>      (synopsis "Embeddable scripting language")
>      (description
>       "Lua is a powerful, fast, lightweight, embeddable scripting language.  Lua
> @@ -80,12 +80,25 @@ automatic memory management with incremental garbage collection, making it ideal
>  for configuration, scripting, and rapid prototyping.")
>      (license license:x11)))
>  
> +(define-public lua-5.2
> +  (package (inherit lua)
> +           (version "5.2.4")
> +           (source
> +            (origin
> +              (method url-fetch)
> +              (uri (string-append "https://www.lua.org/ftp/lua-"
> +                                  version ".tar.gz"))
> +              (sha256
> +               (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"))
> +              (patches (search-patches "lua-pkgconfig.patch"
> +                                       "lua52-liblua-so.patch"))))))
> +
>  (define-public lua-5.1
>    (package (inherit lua)
>      (version "5.1.5")
>      (source (origin
>               (method url-fetch)
> -             (uri (string-append "http://www.lua.org/ftp/lua-"
> +             (uri (string-append "https://www.lua.org/ftp/lua-"
>                                   version ".tar.gz"))
>               (sha256
>                (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))
> -- 
> 2.10.1
> 
>
Marius Bakke - Oct. 31, 2016, 11:51 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Mon, Oct 31, 2016 at 01:29:42PM +0000, Marius Bakke wrote:
>> * gnu/packages/lua.scm (lua): Update to 5.3.3.
>> [source]: Use https URL.
>> [home-page]: Use https URL.
>> (lua-5.2): New variable.
>> (lua-5.1)[source]: Use https URL.
>> ---
>>  gnu/packages/lua.scm | 23 ++++++++++++++++++-----
>>  1 file changed, 18 insertions(+), 5 deletions(-)
>> 
>> diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
>> index 8fdba61..55e529e 100644
>> --- a/gnu/packages/lua.scm
>> +++ b/gnu/packages/lua.scm
>> @@ -40,13 +40,13 @@
>>  (define-public lua
>>    (package
>>      (name "lua")
>> -    (version "5.2.4")
>> +    (version "5.3.3")
>>      (source (origin
>>               (method url-fetch)
>> -             (uri (string-append "http://www.lua.org/ftp/lua-"
>> +             (uri (string-append "https://www.lua.org/ftp/lua-"
>>                                   version ".tar.gz"))
>>               (sha256
>> -              (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"))
>> +              (base32 "18mcfbbmjyp8f2l9yy7n6dzk066nq6man0kpwly4bppphilc04si"))
>>               (patches (search-patches "lua-pkgconfig.patch"
>>                                        "lua52-liblua-so.patch"))))
>
> Does this lua52-liblua-so.patch still apply / is it still needed for Lua
> 5.3? I remember that there were significant differences between how Lua
> 5.1 and 5.2 in terms of building a dynamic Lua library.
>
> If so, I guess we should rename it.

I tried building 5.3 initially without patches and noticed the shared
library was not created. It applies cleanly and works as advertised.

Should I rename it to just lua-liblua-so.patch? IMO the version number
is useful information, even if it applies for a later minor release. I'm
in favor of keeping it, and create the lua54 equivalent if/when needed.
Marius Bakke - Nov. 5, 2016, 6:43 p.m.
Marius Bakke <mbakke@fastmail.com> writes:

> Leo Famulari <leo@famulari.name> writes:
>
>> On Mon, Oct 31, 2016 at 01:29:42PM +0000, Marius Bakke wrote:
>>> * gnu/packages/lua.scm (lua): Update to 5.3.3.
>>> [source]: Use https URL.
>>> [home-page]: Use https URL.
>>> (lua-5.2): New variable.
>>> (lua-5.1)[source]: Use https URL.
>>> ---
>>>  gnu/packages/lua.scm | 23 ++++++++++++++++++-----
>>>  1 file changed, 18 insertions(+), 5 deletions(-)
>>> 
>>> diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
>>> index 8fdba61..55e529e 100644
>>> --- a/gnu/packages/lua.scm
>>> +++ b/gnu/packages/lua.scm
>>> @@ -40,13 +40,13 @@
>>>  (define-public lua
>>>    (package
>>>      (name "lua")
>>> -    (version "5.2.4")
>>> +    (version "5.3.3")
>>>      (source (origin
>>>               (method url-fetch)
>>> -             (uri (string-append "http://www.lua.org/ftp/lua-"
>>> +             (uri (string-append "https://www.lua.org/ftp/lua-"
>>>                                   version ".tar.gz"))
>>>               (sha256
>>> -              (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"))
>>> +              (base32 "18mcfbbmjyp8f2l9yy7n6dzk066nq6man0kpwly4bppphilc04si"))
>>>               (patches (search-patches "lua-pkgconfig.patch"
>>>                                        "lua52-liblua-so.patch"))))
>>
>> Does this lua52-liblua-so.patch still apply / is it still needed for Lua
>> 5.3? I remember that there were significant differences between how Lua
>> 5.1 and 5.2 in terms of building a dynamic Lua library.
>>
>> If so, I guess we should rename it.
>
> I tried building 5.3 initially without patches and noticed the shared
> library was not created. It applies cleanly and works as advertised.
>
> Should I rename it to just lua-liblua-so.patch? IMO the version number
> is useful information, even if it applies for a later minor release. I'm
> in favor of keeping it, and create the lua54 equivalent if/when needed.

How should we proceed with this? I think renaming it to
"lua-liblua-so.patch" is fine, since it applies to the current release.

Another option is "lua52-lua53-liblua-so.patch", although we will have
to keep renaming it for all future versions it applies to in that case,
which seems like unnecessary noise.

The third option is of course keeping the lua52 name, but I see how that
can be confusing for the next code spelunker.

I don't have a strong opinion either way, but will go ahead with the
first option unless there are any objections.
Leo Famulari - Nov. 5, 2016, 6:49 p.m.
On Sat, Nov 05, 2016 at 06:43:39PM +0000, Marius Bakke wrote:
> Marius Bakke <mbakke@fastmail.com> writes:
> > Leo Famulari <leo@famulari.name> writes:
> >> Does this lua52-liblua-so.patch still apply / is it still needed for Lua
> >> 5.3? I remember that there were significant differences between how Lua
> >> 5.1 and 5.2 in terms of building a dynamic Lua library.
> >>
> >> If so, I guess we should rename it.
> >
> > I tried building 5.3 initially without patches and noticed the shared
> > library was not created. It applies cleanly and works as advertised.
> >
> > Should I rename it to just lua-liblua-so.patch? IMO the version number
> > is useful information, even if it applies for a later minor release. I'm
> > in favor of keeping it, and create the lua54 equivalent if/when needed.
> 
> How should we proceed with this? I think renaming it to
> "lua-liblua-so.patch" is fine, since it applies to the current release.
> 
> Another option is "lua52-lua53-liblua-so.patch", although we will have
> to keep renaming it for all future versions it applies to in that case,
> which seems like unnecessary noise.
> 
> The third option is of course keeping the lua52 name, but I see how that
> can be confusing for the next code spelunker.
> 
> I don't have a strong opinion either way, but will go ahead with the
> first option unless there are any objections.

The first option sounds good. Please add a comment to the patch
mentioning which Lua versions it should be used for.
Marius Bakke - Nov. 6, 2016, 4:21 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Sat, Nov 05, 2016 at 06:43:39PM +0000, Marius Bakke wrote:
>> Marius Bakke <mbakke@fastmail.com> writes:
>> > Leo Famulari <leo@famulari.name> writes:
>> >> Does this lua52-liblua-so.patch still apply / is it still needed for Lua
>> >> 5.3? I remember that there were significant differences between how Lua
>> >> 5.1 and 5.2 in terms of building a dynamic Lua library.
>> >>
>> >> If so, I guess we should rename it.
>> >
>> > I tried building 5.3 initially without patches and noticed the shared
>> > library was not created. It applies cleanly and works as advertised.
>> >
>> > Should I rename it to just lua-liblua-so.patch? IMO the version number
>> > is useful information, even if it applies for a later minor release. I'm
>> > in favor of keeping it, and create the lua54 equivalent if/when needed.
>> 
>> How should we proceed with this? I think renaming it to
>> "lua-liblua-so.patch" is fine, since it applies to the current release.
>> 
>> Another option is "lua52-lua53-liblua-so.patch", although we will have
>> to keep renaming it for all future versions it applies to in that case,
>> which seems like unnecessary noise.
>> 
>> The third option is of course keeping the lua52 name, but I see how that
>> can be confusing for the next code spelunker.
>> 
>> I don't have a strong opinion either way, but will go ahead with the
>> first option unless there are any objections.
>
> The first option sounds good. Please add a comment to the patch
> mentioning which Lua versions it should be used for.

Good idea. I pushed these changes in f4dc22bcd95eaebb026457c0a36396517be64130.

Patch

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 8fdba61..55e529e 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -40,13 +40,13 @@ 
 (define-public lua
   (package
     (name "lua")
-    (version "5.2.4")
+    (version "5.3.3")
     (source (origin
              (method url-fetch)
-             (uri (string-append "http://www.lua.org/ftp/lua-"
+             (uri (string-append "https://www.lua.org/ftp/lua-"
                                  version ".tar.gz"))
              (sha256
-              (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"))
+              (base32 "18mcfbbmjyp8f2l9yy7n6dzk066nq6man0kpwly4bppphilc04si"))
              (patches (search-patches "lua-pkgconfig.patch"
                                       "lua52-liblua-so.patch"))))
     (build-system gnu-build-system)
@@ -69,7 +69,7 @@ 
                                (string-append "INSTALL_TOP=" out)
                                (string-append "INSTALL_MAN=" out
                                               "/share/man/man1")))))))))
-    (home-page "http://www.lua.org/")
+    (home-page "https://www.lua.org/")
     (synopsis "Embeddable scripting language")
     (description
      "Lua is a powerful, fast, lightweight, embeddable scripting language.  Lua
@@ -80,12 +80,25 @@  automatic memory management with incremental garbage collection, making it ideal
 for configuration, scripting, and rapid prototyping.")
     (license license:x11)))
 
+(define-public lua-5.2
+  (package (inherit lua)
+           (version "5.2.4")
+           (source
+            (origin
+              (method url-fetch)
+              (uri (string-append "https://www.lua.org/ftp/lua-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"))
+              (patches (search-patches "lua-pkgconfig.patch"
+                                       "lua52-liblua-so.patch"))))))
+
 (define-public lua-5.1
   (package (inherit lua)
     (version "5.1.5")
     (source (origin
              (method url-fetch)
-             (uri (string-append "http://www.lua.org/ftp/lua-"
+             (uri (string-append "https://www.lua.org/ftp/lua-"
                                  version ".tar.gz"))
              (sha256
               (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))