* [Buildroot] [lua V4 0/4] lua
@ 2014-07-19 14:38 Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 1/4] luajit: add host variant Francois Perrad
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Francois Perrad @ 2014-07-19 14:38 UTC (permalink / raw
To: buildroot
delta V4 vs V3 (remaining)
- refactor with the host-virtual-package infrastructure
Francois Perrad (4):
luajit: add host variant
luainterpreter: add host variant
luarocks: allow to work with host-luainterpreter
lua-iconv: new package
package/Config.in | 1 +
package/lua-iconv/Config.in | 8 ++++++++
package/lua-iconv/lua-iconv.mk | 14 ++++++++++++++
package/luainterpreter/luainterpreter.mk | 3 +++
package/luajit/luajit.mk | 9 +++++++++
package/luarocks/luarocks.mk | 18 ++++++++++++------
6 files changed, 47 insertions(+), 6 deletions(-)
create mode 100644 package/lua-iconv/Config.in
create mode 100644 package/lua-iconv/lua-iconv.mk
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [lua V4 1/4] luajit: add host variant
2014-07-19 14:38 [Buildroot] [lua V4 0/4] lua Francois Perrad
@ 2014-07-19 14:38 ` Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 2/4] luainterpreter: " Francois Perrad
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Francois Perrad @ 2014-07-19 14:38 UTC (permalink / raw
To: buildroot
the goal is to use host-luajit with pkg-luarocks
when luajit is on the selected luainterpreter for the target
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/luajit/luajit.mk | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
index 72240b2..42d6a72 100644
--- a/package/luajit/luajit.mk
+++ b/package/luajit/luajit.mk
@@ -64,4 +64,13 @@ define LUAJIT_INSTALL_TARGET_CMDS
$(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" LDCONFIG=true -C $(@D) install
endef
+define HOST_LUAJIT_BUILD_CMDS
+ $(MAKE) PREFIX="/usr" BUILDMODE=static -C $(@D) amalg
+endef
+
+define HOST_LUAJIT_INSTALL_CMDS
+ $(MAKE) PREFIX="/usr" DESTDIR="$(HOST_DIR)" -C $(@D) install
+endef
+
$(eval $(generic-package))
+$(eval $(host-generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [lua V4 2/4] luainterpreter: add host variant
2014-07-19 14:38 [Buildroot] [lua V4 0/4] lua Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 1/4] luajit: add host variant Francois Perrad
@ 2014-07-19 14:38 ` Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 3/4] luarocks: allow to work with host-luainterpreter Francois Perrad
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Francois Perrad @ 2014-07-19 14:38 UTC (permalink / raw
To: buildroot
host-luainterpreter is host-lua or host-luajit
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/luainterpreter/luainterpreter.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
index aa02696..4ef0a45 100644
--- a/package/luainterpreter/luainterpreter.mk
+++ b/package/luainterpreter/luainterpreter.mk
@@ -7,3 +7,4 @@
LUAINTERPRETER_ABIVER = $(call qstrip,$(BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION))
$(eval $(virtual-package))
+$(eval $(host-virtual-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [lua V4 3/4] luarocks: allow to work with host-luainterpreter
2014-07-19 14:38 [Buildroot] [lua V4 0/4] lua Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 1/4] luajit: add host variant Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 2/4] luainterpreter: " Francois Perrad
@ 2014-07-19 14:38 ` Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 4/4] lua-iconv: new package Francois Perrad
2014-07-27 12:31 ` [Buildroot] [lua V4 0/4] lua Thomas Petazzoni
4 siblings, 0 replies; 7+ messages in thread
From: Francois Perrad @ 2014-07-19 14:38 UTC (permalink / raw
To: buildroot
when we embed luajit on target,
we use luarocks with host-luajit instead of host-lua,
in order to use the same interpreter on the both side.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/luainterpreter/luainterpreter.mk | 2 ++
package/luarocks/luarocks.mk | 18 ++++++++++++------
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
index 4ef0a45..a6c98ab 100644
--- a/package/luainterpreter/luainterpreter.mk
+++ b/package/luainterpreter/luainterpreter.mk
@@ -8,3 +8,5 @@ LUAINTERPRETER_ABIVER = $(call qstrip,$(BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION))
$(eval $(virtual-package))
$(eval $(host-virtual-package))
+
+LUA_RUN = $(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_PACKAGE_PROVIDES_LUAINTERPRETER))
diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
index 926fd04..5680ab4 100644
--- a/package/luarocks/luarocks.mk
+++ b/package/luarocks/luarocks.mk
@@ -9,16 +9,22 @@ LUAROCKS_SITE = http://luarocks.org/releases/
LUAROCKS_LICENSE = MIT
LUAROCKS_LICENSE_FILES = COPYING
-HOST_LUAROCKS_DEPENDENCIES = host-lua
+HOST_LUAROCKS_DEPENDENCIES = host-luainterpreter
LUAROCKS_CONFIG_DIR = $(HOST_DIR)/usr/etc/luarocks
LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-$(LUAINTERPRETER_ABIVER).lua
+HOST_LUAROCKS_CONF_OPT = \
+ --prefix=$(HOST_DIR)/usr \
+ --sysconfdir=$(LUAROCKS_CONFIG_DIR) \
+ --with-lua=$(HOST_DIR)/usr
+
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+HOST_LUAROCKS_CONF_OPT += --lua-suffix=jit
+endif
+
define HOST_LUAROCKS_CONFIGURE_CMDS
- cd $(@D) && ./configure \
- --prefix=$(HOST_DIR)/usr \
- --sysconfdir=$(LUAROCKS_CONFIG_DIR) \
- --with-lua=$(HOST_DIR)/usr
+ cd $(@D) && ./configure $(HOST_LUAROCKS_CONF_OPT)
endef
define HOST_LUAROCKS_INSTALL_CMDS
@@ -43,4 +49,4 @@ endef
$(eval $(host-generic-package))
LUAROCKS_RUN = LUA_PATH="$(HOST_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)/?.lua" \
- $(HOST_DIR)/usr/bin/lua $(HOST_DIR)/usr/bin/luarocks
+ $(LUA_RUN) $(HOST_DIR)/usr/bin/luarocks
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [lua V4 4/4] lua-iconv: new package
2014-07-19 14:38 [Buildroot] [lua V4 0/4] lua Francois Perrad
` (2 preceding siblings ...)
2014-07-19 14:38 ` [Buildroot] [lua V4 3/4] luarocks: allow to work with host-luainterpreter Francois Perrad
@ 2014-07-19 14:38 ` Francois Perrad
2015-07-12 16:51 ` Thomas Petazzoni
2014-07-27 12:31 ` [Buildroot] [lua V4 0/4] lua Thomas Petazzoni
4 siblings, 1 reply; 7+ messages in thread
From: Francois Perrad @ 2014-07-19 14:38 UTC (permalink / raw
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/Config.in | 1 +
package/lua-iconv/Config.in | 8 ++++++++
package/lua-iconv/lua-iconv.mk | 14 ++++++++++++++
3 files changed, 23 insertions(+)
create mode 100644 package/lua-iconv/Config.in
create mode 100644 package/lua-iconv/lua-iconv.mk
diff --git a/package/Config.in b/package/Config.in
index db2d114..55265f1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -404,6 +404,7 @@ menu "Lua libraries/modules"
source "package/lua-coatpersistent/Config.in"
source "package/lua-csnappy/Config.in"
source "package/lua-ev/Config.in"
+ source "package/lua-iconv/Config.in"
source "package/lua-messagepack/Config.in"
source "package/lua-msgpack-native/Config.in"
source "package/lua-testmore/Config.in"
diff --git a/package/lua-iconv/Config.in b/package/lua-iconv/Config.in
new file mode 100644
index 0000000..cad7c7c
--- /dev/null
+++ b/package/lua-iconv/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LUA_ICONV
+ bool "lua-iconv"
+ select BR2_PACKAGE_LIBICONV
+ depends on !BR2_ENABLE_LOCALE
+ help
+ Lua binding to the POSIX 'iconv' library
+
+ http://ittner.github.io/lua-iconv/
diff --git a/package/lua-iconv/lua-iconv.mk b/package/lua-iconv/lua-iconv.mk
new file mode 100644
index 0000000..22f66de
--- /dev/null
+++ b/package/lua-iconv/lua-iconv.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# lua-iconv
+#
+################################################################################
+
+LUA_ICONV_VERSION_UPSTREAM = 7
+LUA_ICONV_VERSION = $(LUA_ICONV_VERSION_UPSTREAM)-1
+LUA_ICONV_SUBDIR = lua-iconv-$(LUA_ICONV_VERSION_UPSTREAM)
+LUA_ICONV_DEPENDENCIES = luainterpreter libiconv
+LUA_ICONV_LICENSE = MIT
+LUA_ICONV_LICENSE_FILES = $(LUA_ICONV_SUBDIR)/COPYING
+
+$(eval $(luarocks-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [lua V4 0/4] lua
2014-07-19 14:38 [Buildroot] [lua V4 0/4] lua Francois Perrad
` (3 preceding siblings ...)
2014-07-19 14:38 ` [Buildroot] [lua V4 4/4] lua-iconv: new package Francois Perrad
@ 2014-07-27 12:31 ` Thomas Petazzoni
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2014-07-27 12:31 UTC (permalink / raw
To: buildroot
Dear Francois Perrad,
On Sat, 19 Jul 2014 16:38:54 +0200, Francois Perrad wrote:
> delta V4 vs V3 (remaining)
> - refactor with the host-virtual-package infrastructure
>
> Francois Perrad (4):
> luajit: add host variant
> luainterpreter: add host variant
> luarocks: allow to work with host-luainterpreter
Those three patches have been applied, thanks!
> lua-iconv: new package
This one remains in the queue for now.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [lua V4 4/4] lua-iconv: new package
2014-07-19 14:38 ` [Buildroot] [lua V4 4/4] lua-iconv: new package Francois Perrad
@ 2015-07-12 16:51 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-07-12 16:51 UTC (permalink / raw
To: buildroot
Dear Francois Perrad,
On Sat, 19 Jul 2014 16:38:58 +0200, Francois Perrad wrote:
> diff --git a/package/lua-iconv/Config.in b/package/lua-iconv/Config.in
> new file mode 100644
> index 0000000..cad7c7c
> --- /dev/null
> +++ b/package/lua-iconv/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_LUA_ICONV
> + bool "lua-iconv"
> + select BR2_PACKAGE_LIBICONV
> + depends on !BR2_ENABLE_LOCALE
As Arnout told you in February 2014, this needs to be:
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
Back then, you replied:
""
I don't think,
lua-iconv is binding of iconv, so iconv is not an optional dependency
""
But what you're missing is that when the toolchain has locale support,
the iconv() function is provided by the C library itself. libiconv is
only needed to provide iconv() for toolchains that don't have locale
support.
So basically, if BR2_ENABLE_LOCALE=y, the C library provides iconv()
and lua-iconv doesn't need any dependency on libiconv. However, when
BR2_ENABLE_LOCALE is not set, the C library does *not* provide iconv(),
and lua-iconv needs to depend on libiconv.
> diff --git a/package/lua-iconv/lua-iconv.mk b/package/lua-iconv/lua-iconv.mk
> new file mode 100644
> index 0000000..22f66de
> --- /dev/null
> +++ b/package/lua-iconv/lua-iconv.mk
> @@ -0,0 +1,14 @@
> +################################################################################
> +#
> +# lua-iconv
> +#
> +################################################################################
> +
> +LUA_ICONV_VERSION_UPSTREAM = 7
> +LUA_ICONV_VERSION = $(LUA_ICONV_VERSION_UPSTREAM)-1
> +LUA_ICONV_SUBDIR = lua-iconv-$(LUA_ICONV_VERSION_UPSTREAM)
Remove redundant space before =. However, isn't this SUBDIR thing
already handled by the luarocks-package infrastructure?
> +LUA_ICONV_DEPENDENCIES = luainterpreter libiconv
The dependency on libiconv should be:
$(if $(BR2_PACKAGE_LIBICONV),libiconv)
as already suggested by Arnout. And the luainterpreter dependency is
also already handled by the luarocks-package infra.
Could you fix those issues and resend? In the mean time, we'll mark
your patch as Changes Requested.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-12 16:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-19 14:38 [Buildroot] [lua V4 0/4] lua Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 1/4] luajit: add host variant Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 2/4] luainterpreter: " Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 3/4] luarocks: allow to work with host-luainterpreter Francois Perrad
2014-07-19 14:38 ` [Buildroot] [lua V4 4/4] lua-iconv: new package Francois Perrad
2015-07-12 16:51 ` Thomas Petazzoni
2014-07-27 12:31 ` [Buildroot] [lua V4 0/4] lua Thomas Petazzoni
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.