All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit
@ 2020-07-27 20:56 James Hilliard
  2020-07-28  7:09 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: James Hilliard @ 2020-07-27 20:56 UTC (permalink / raw)
  To: buildroot

Since minetest has a fallback to a bundled lua when luajit is not
available we don't need to depend on luajit or any lua version at all.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/minetest/Config.in   |  2 --
 package/minetest/minetest.mk | 10 ++++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/minetest/Config.in b/package/minetest/Config.in
index b8ee175d52..19da290df4 100644
--- a/package/minetest/Config.in
+++ b/package/minetest/Config.in
@@ -5,7 +5,6 @@ config BR2_PACKAGE_MINETEST
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_PACKAGE_XORG7 # irrlicht
 	depends on BR2_PACKAGE_HAS_LIBGL # irrlicht
-	depends on BR2_PACKAGE_LUAJIT
 	select BR2_PACKAGE_IRRLICHT
 	select BR2_PACKAGE_GMP
 	select BR2_PACKAGE_JSONCPP
@@ -52,7 +51,6 @@ comment "sound support needs a toolchain w/ threads NPTL"
 endif
 
 comment "minetest needs a toolchain w/ C++, gcc >= 4.9, threads"
-	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
 	depends on !BR2_INSTALL_LIBSTDCPP \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
 		|| !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/minetest/minetest.mk b/package/minetest/minetest.mk
index e8fe5b45ce..c0301273be 100644
--- a/package/minetest/minetest.mk
+++ b/package/minetest/minetest.mk
@@ -9,12 +9,11 @@ MINETEST_SITE = $(call github,minetest,minetest,$(MINETEST_VERSION))
 MINETEST_LICENSE = LGPL-2.1+ (code), CC-BY-SA-3.0 (textures and sounds)
 MINETEST_LICENSE_FILES = LICENSE.txt
 
-MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp luajit sqlite zlib
+MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp sqlite zlib
 
 MINETEST_CONF_OPTS = \
 	-DDEFAULT_RUN_IN_PLACE=OFF \
 	-DENABLE_GLES=OFF \
-	-DENABLE_LUAJIT=ON \
 	-DENABLE_CURSES=OFF \
 	-DAPPLY_LOCALE_BLACKLIST=OFF \
 	-DENABLE_SYSTEM_GMP=ON \
@@ -75,6 +74,13 @@ else
 MINETEST_CONF_OPTS += -DENABLE_SPATIAL=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+MINETEST_DEPENDENCIES += luajit
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=ON
+else
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
 MINETEST_DEPENDENCIES += postgresql
 MINETEST_CONF_OPTS += -DENABLE_POSTGRESQL=ON
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit
  2020-07-27 20:56 [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit James Hilliard
@ 2020-07-28  7:09 ` Thomas Petazzoni
  2020-07-28 10:17   ` James Hilliard
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2020-07-28  7:09 UTC (permalink / raw)
  To: buildroot

On Mon, 27 Jul 2020 14:56:21 -0600
James Hilliard <james.hilliard1@gmail.com> wrote:

> Since minetest has a fallback to a bundled lua when luajit is not
> available we don't need to depend on luajit or any lua version at all.

In general, I think we try to not use bundled libraries even when they
exist. If minetest needs a Lua interpreter, it should always use an
external Lua interpreter, I believe.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit
  2020-07-28  7:09 ` Thomas Petazzoni
@ 2020-07-28 10:17   ` James Hilliard
  2020-07-28 11:48     ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: James Hilliard @ 2020-07-28 10:17 UTC (permalink / raw)
  To: buildroot

On Tue, Jul 28, 2020 at 1:09 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Mon, 27 Jul 2020 14:56:21 -0600
> James Hilliard <james.hilliard1@gmail.com> wrote:
>
> > Since minetest has a fallback to a bundled lua when luajit is not
> > available we don't need to depend on luajit or any lua version at all.
>
> In general, I think we try to not use bundled libraries even when they
> exist. If minetest needs a Lua interpreter, it should always use an
> external Lua interpreter, I believe.
From my understanding luajit is the only supported external lua
interpreter for minetest. So I think it makes sense to not require
a specific lua interpreter for flexibility.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit
  2020-07-28 10:17   ` James Hilliard
@ 2020-07-28 11:48     ` Thomas Petazzoni
  2020-07-28 19:36       ` Yann E. MORIN
  2020-07-28 20:44       ` James Hilliard
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-07-28 11:48 UTC (permalink / raw)
  To: buildroot

On Tue, 28 Jul 2020 04:17:26 -0600
James Hilliard <james.hilliard1@gmail.com> wrote:

> On Tue, Jul 28, 2020 at 1:09 AM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> >
> > On Mon, 27 Jul 2020 14:56:21 -0600
> > James Hilliard <james.hilliard1@gmail.com> wrote:
> >  
> > > Since minetest has a fallback to a bundled lua when luajit is not
> > > available we don't need to depend on luajit or any lua version at all.  
> >
> > In general, I think we try to not use bundled libraries even when they
> > exist. If minetest needs a Lua interpreter, it should always use an
> > external Lua interpreter, I believe.  
> From my understanding luajit is the only supported external lua
> interpreter for minetest. So I think it makes sense to not require
> a specific lua interpreter for flexibility.

I don't understand your reply, as I was not talking about using other
Lua interpreters.

What I'm saying is that if minetest has a mandatory dependency on
LuaJIT, then it should *always* use the external LuaJIT and never use
the bundled one. We prefer external libraries over bundled libraries in
general in the context of Buildroot.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit
  2020-07-28 11:48     ` Thomas Petazzoni
@ 2020-07-28 19:36       ` Yann E. MORIN
  2020-07-28 20:44       ` James Hilliard
  1 sibling, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2020-07-28 19:36 UTC (permalink / raw)
  To: buildroot

James, All,

On 2020-07-28 13:48 +0200, Thomas Petazzoni spake thusly:
> On Tue, 28 Jul 2020 04:17:26 -0600
> James Hilliard <james.hilliard1@gmail.com> wrote:
> > On Tue, Jul 28, 2020 at 1:09 AM Thomas Petazzoni
> > <thomas.petazzoni@bootlin.com> wrote:
> > > On Mon, 27 Jul 2020 14:56:21 -0600
> > > James Hilliard <james.hilliard1@gmail.com> wrote:
> > > > Since minetest has a fallback to a bundled lua when luajit is not
> > > > available we don't need to depend on luajit or any lua version at all.  
> > > In general, I think we try to not use bundled libraries even when they
> > > exist. If minetest needs a Lua interpreter, it should always use an
> > > external Lua interpreter, I believe.  
> > From my understanding luajit is the only supported external lua
> > interpreter for minetest. So I think it makes sense to not require
> > a specific lua interpreter for flexibility.
> I don't understand your reply, as I was not talking about using other
> Lua interpreters.
> What I'm saying is that if minetest has a mandatory dependency on
> LuaJIT, then it should *always* use the external LuaJIT and never use
> the bundled one. We prefer external libraries over bundled libraries in
> general in the context of Buildroot.

James, I think both Thomas and I understand your point of view. However,
I do agree with Thomas on that topic, that we do use external libraries
over bundled ones, even if that restricts the possibilities.

Besides, minetest is a game; it is not a critical component for which we
could consider bending the rules. Restricting minetest to use the
external luajit will not be a major hindrance for the overwhelming
majority of bBuildroot users, if at all (sorry Romain! ;-] ).

So I've marked this patch as rejected in patchwork.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit
  2020-07-28 11:48     ` Thomas Petazzoni
  2020-07-28 19:36       ` Yann E. MORIN
@ 2020-07-28 20:44       ` James Hilliard
  2020-07-28 21:47         ` Romain Naour
  1 sibling, 1 reply; 7+ messages in thread
From: James Hilliard @ 2020-07-28 20:44 UTC (permalink / raw)
  To: buildroot

On Tue, Jul 28, 2020 at 5:48 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Tue, 28 Jul 2020 04:17:26 -0600
> James Hilliard <james.hilliard1@gmail.com> wrote:
>
> > On Tue, Jul 28, 2020 at 1:09 AM Thomas Petazzoni
> > <thomas.petazzoni@bootlin.com> wrote:
> > >
> > > On Mon, 27 Jul 2020 14:56:21 -0600
> > > James Hilliard <james.hilliard1@gmail.com> wrote:
> > >
> > > > Since minetest has a fallback to a bundled lua when luajit is not
> > > > available we don't need to depend on luajit or any lua version at all.
> > >
> > > In general, I think we try to not use bundled libraries even when they
> > > exist. If minetest needs a Lua interpreter, it should always use an
> > > external Lua interpreter, I believe.
> > From my understanding luajit is the only supported external lua
> > interpreter for minetest. So I think it makes sense to not require
> > a specific lua interpreter for flexibility.
>
> I don't understand your reply, as I was not talking about using other
> Lua interpreters.
>
> What I'm saying is that if minetest has a mandatory dependency on
> LuaJIT, then it should *always* use the external LuaJIT and never use
> the bundled one. We prefer external libraries over bundled libraries in
> general in the context of Buildroot.
Oh, it doesn't have a mandatory LuaJIT dependency, the internal version
is not LuaJIT but some bundled regular Lua 5.1 variant AFAIK.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit
  2020-07-28 20:44       ` James Hilliard
@ 2020-07-28 21:47         ` Romain Naour
  0 siblings, 0 replies; 7+ messages in thread
From: Romain Naour @ 2020-07-28 21:47 UTC (permalink / raw)
  To: buildroot

Hi James, all,

Le 28/07/2020 ? 22:44, James Hilliard a ?crit?:
> On Tue, Jul 28, 2020 at 5:48 AM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
>>
>> On Tue, 28 Jul 2020 04:17:26 -0600
>> James Hilliard <james.hilliard1@gmail.com> wrote:
>>
>>> On Tue, Jul 28, 2020 at 1:09 AM Thomas Petazzoni
>>> <thomas.petazzoni@bootlin.com> wrote:
>>>>
>>>> On Mon, 27 Jul 2020 14:56:21 -0600
>>>> James Hilliard <james.hilliard1@gmail.com> wrote:
>>>>
>>>>> Since minetest has a fallback to a bundled lua when luajit is not
>>>>> available we don't need to depend on luajit or any lua version at all.
>>>>
>>>> In general, I think we try to not use bundled libraries even when they
>>>> exist. If minetest needs a Lua interpreter, it should always use an
>>>> external Lua interpreter, I believe.
>>> From my understanding luajit is the only supported external lua
>>> interpreter for minetest. So I think it makes sense to not require
>>> a specific lua interpreter for flexibility.
>>
>> I don't understand your reply, as I was not talking about using other
>> Lua interpreters.
>>
>> What I'm saying is that if minetest has a mandatory dependency on
>> LuaJIT, then it should *always* use the external LuaJIT and never use
>> the bundled one. We prefer external libraries over bundled libraries in
>> general in the context of Buildroot.
> Oh, it doesn't have a mandatory LuaJIT dependency, the internal version
> is not LuaJIT but some bundled regular Lua 5.1 variant AFAIK.

When I packaged minetest, I looked at distribution packaging:

https://www.archlinux.org/packages/community/x86_64/minetest/
https://src.fedoraproject.org/rpms/minetest/blob/master/f/minetest.spec#_38
https://salsa.debian.org/games-team/minetest/-/blob/master/debian/control#L22

minetest use luajit when available.
Only Debian support liblua5.1 when luajit is not supported.

I'm not sure it worth the effort since minetest require x11 and libgl.

Best regards,
Romain


>>
>> Thomas
>> --
>> Thomas Petazzoni, CTO, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-28 21:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 20:56 [Buildroot] [PATCH 1/1] package/minetest: don't depend on luajit James Hilliard
2020-07-28  7:09 ` Thomas Petazzoni
2020-07-28 10:17   ` James Hilliard
2020-07-28 11:48     ` Thomas Petazzoni
2020-07-28 19:36       ` Yann E. MORIN
2020-07-28 20:44       ` James Hilliard
2020-07-28 21:47         ` Romain Naour

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.