diff mbox

[pkg-luarocks,infra,V4,02/10] luajit: allow to build Lua extensions without lua

Message ID 1384520859-3189-2-git-send-email-francois.perrad@gadz.org
State Superseded
Headers show

Commit Message

Francois Perrad Nov. 15, 2013, 1:07 p.m. UTC
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/luajit/luajit-05-install-inc.patch |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 package/luajit/luajit-05-install-inc.patch

Comments

Thomas Petazzoni Dec. 22, 2013, 5:23 p.m. UTC | #1
Dear Francois Perrad,

On Fri, 15 Nov 2013 14:07:31 +0100, Francois Perrad wrote:
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/luajit/luajit-05-install-inc.patch |   17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 package/luajit/luajit-05-install-inc.patch

I don't understand what are the consequence of this patch or why it is
needed. Could you expand the commit log a little bit?

Thanks!

Thomas
Francois Perrad Jan. 7, 2014, 2:11 p.m. UTC | #2
2013/12/22 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Fri, 15 Nov 2013 14:07:31 +0100, Francois Perrad wrote:
>>
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>>  package/luajit/luajit-05-install-inc.patch |   17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>  create mode 100644 package/luajit/luajit-05-install-inc.patch
>
> I don't understand what are the consequence of this patch or why it is
> needed. Could you expand the commit log a little bit?
>

A Lua native module, like LuaFileSystem, needs the Lua includes at compile time.
Both lua package and luajit package supply these files.
The lua package installs them in /usr/include, and luafilesystem, like
other Lua modules, expects them at this place.
In LuaJIT upstream, these files are installed
/usr/include/luajit-2.0.2 in order to not override the Lua ones if
they are already installed.
Before the introduction of virtual package luainterpreter,
luafilesystem depends on lua package.
Now, it depends on luainterpreter. When luainterpreter is supplied by
luajit, the include from LuaJIT must be installed in the same place as
Lua one's.

So, the patch luajit-05-install-inc.patch contains the comment :
"Install includes like lua's ones"

François

> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni Jan. 10, 2014, 2:34 a.m. UTC | #3
Dear François Perrad,

On Tue, 7 Jan 2014 15:11:16 +0100, François Perrad wrote:

> A Lua native module, like LuaFileSystem, needs the Lua includes at compile time.
> Both lua package and luajit package supply these files.
> The lua package installs them in /usr/include, and luafilesystem, like
> other Lua modules, expects them at this place.
> In LuaJIT upstream, these files are installed
> /usr/include/luajit-2.0.2 in order to not override the Lua ones if
> they are already installed.
> Before the introduction of virtual package luainterpreter,
> luafilesystem depends on lua package.
> Now, it depends on luainterpreter. When luainterpreter is supplied by
> luajit, the include from LuaJIT must be installed in the same place as
> Lua one's.

Ok, now it makes a lot of sense.

> So, the patch luajit-05-install-inc.patch contains the comment :
> "Install includes like lua's ones"

I think your patch description would have been immensely better if you
had included an explanation like you did above!

Thanks!

Thomas
diff mbox

Patch

diff --git a/package/luajit/luajit-05-install-inc.patch b/package/luajit/luajit-05-install-inc.patch
new file mode 100644
index 0000000..1fd11b1
--- /dev/null
+++ b/package/luajit/luajit-05-install-inc.patch
@@ -0,0 +1,17 @@ 
+Install includes like lua's ones
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/Makefile
+===================================================================
+--- a/Makefile
++++ b/Makefile
+@@ -31,7 +31,7 @@ DPREFIX= $(DESTDIR)$(PREFIX)
+ INSTALL_BIN=   $(DPREFIX)/bin
+ INSTALL_LIB=   $(DPREFIX)/lib
+ INSTALL_SHARE= $(DPREFIX)/share
+-INSTALL_INC=   $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
++INSTALL_INC=   $(DPREFIX)/include
+ 
+ INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION)
+ INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit