Commit graph

65 commits

Author SHA1 Message Date
Bartosz Bilas 25bd8ba690 package/luarocks: fix copying our custom command if dest dir exists
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
[yann.morin.1998@free.fr:
  - use $(INSTALL), not "mkdir -p + cp"
  - split to its own patch
  - rewrite commit title
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-01-03 09:59:06 +01:00
Francois Perrad b2364df837 package/luarocks: bump to version 3.5.0
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-12-13 10:36:40 +01:00
Francois Perrad 5e196f97c9 package/luarocks: refactor infrastructure with DEPS_DIR
DEPS_DIR is a new CLI option introduced by the version 3.4.0,
which avoids the use of `external_deps_dirs` in the config files.

now, the host config doesn't need to be altered.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-09-30 22:48:44 +02:00
Francois Perrad 06140ef93d package/luarocks: bump to version 3.4.0
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-09-26 15:31:19 +02:00
Francois Perrad de29a00a63 package/luarocks: fix typo
many build are broken, that starts by this kind of message:
 Warning: could not load configuration file `.../host/etc/luarocks/config.lua` given in environment variable LUAROCKS_CONFIG

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-19 10:23:22 +02:00
Francois Perrad 060eb0e7e4 package/pkg-luarocks.mk: add support of host-luarocks-package
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-12 14:48:18 +02:00
Francois Perrad a850cdce53 package/pkg-luarocks.mk: use custom luarocks config file
In preparation for the addition of the support for host-luarocks
packages, this commit changes the luarocks logic to use a custom
configuration file in $(HOST_DIR)/etc/luarocks/config.lua instead of
the default
$(HOST_DIR)/etc/luarocks/config-$(LUAINTERPRETER_ABIVER).lua.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[Thomas: extracted from a larger patch from François]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-12 14:48:18 +02:00
Francois Perrad 0526292914 package/pkg-luarocks.mk: prepare infrastructure for host package support
In preparation for the introduction of support for host Luarocks
packages, this commit reworks the luarocks-package infrastructure:

 - A number of variables that were defined in
   package/luarocks/luarocks-br-config.lua are now passed on the
   luarocks command line in $(2)_INSTALL_TARGET_CMDS in
   pkg-luarocks.mk.

 - The LUAROCKS_CFLAGS logic is moved from
   package/luarocks/luarocks.mk to package/pkg-luarocks.mk.

 - The LUAROCKS_RUN_ENV variable is no longer needed, as all details
   are now passed on the luarocks command line in pkg-luarocks.mk.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-12 11:02:59 +02:00
Francois Perrad a27d01cde1 package/luarocks: luajit is now detected automatically by luarocks
Since luarocks commit
ffab9f3269,
available since luarocks v3.2.0, LuaJIT is now detected
automatically. It is therefore no longer necessary to explicitly
indicate in lua_interpreter that LuaJIT is used.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-11 15:58:42 +02:00
Francois Perrad e3d9ca7a63 package/luarocks: fix buildroot addon vs 3.3.x
an internal API change introduced by version 3.3.0 causes the following failure:
```
Error: LuaRocks 3.3.1 bug (please report at https://github.com/luarocks/luarocks/issues).
Arch.: linux-x86_64
.../user/build/qarm/host/share/lua/5.3/luarocks/queries.lua:55: assertion failed!
stack traceback:
	[C]: in function 'assert'
	.../user/build/qarm/host/share/lua/5.3/luarocks/queries.lua:55: in function 'luarocks.queries.new'
	...m/host/share/lua/5.3/luarocks/cmd/external/buildroot.lua:322: in function 'luarocks.cmd.external.buildroot.command'
	(...tail calls...)
	[C]: in function 'xpcall'
	/home/user/build/qarm/host/share/lua/5.3/luarocks/cmd.lua:620: in function 'luarocks.cmd.run_command'
	/home/user/build/qarm/host/bin/luarocks:38: in main chunk
	[C]: in ?
```

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-02-08 19:54:01 +01:00
Francois Perrad 5d004460fe package/luarocks: bump to version 3.3.1
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-02-07 16:53:20 +01:00
Francois Perrad db78559f6a package/luarocks: bump to version 3.3.0
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-01-29 17:17:23 +01:00
Francois Perrad a766aa818b package/luarocks: refactor Buildroot addon with new argparse module
The wellknown module `argparse` is now used by LuaRocks 3.2.0, instead
of a homemade argument parsing.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 15:54:45 +02:00
Francois Perrad f947d52b39 package/luarocks: fix generated configuration when luajit
this trick removes the need of the patch

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 15:53:53 +02:00
Francois Perrad 41278d88e3 package/luarocks: bump to version 3.2.1
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 15:42:39 +02:00
Francois Perrad de1313fb06 package/luarocks: fix test file creation on br-external
first, add the creation of the needed subdirectories

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-09 23:40:08 +02:00
Francois Perrad c3e364199b package/luarocks: bump to version 3.1.3
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-06-08 11:59:04 +02:00
Francois Perrad 19b74fb003 package/luarocks: bump to version 3.1.2
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-23 10:03:58 +02:00
Francois Perrad 18bd9a440a package/luarocks: bump to version 3.1.1
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-07 22:23:35 +02:00
Francois Perrad e084ed9fdb package/luarocks: bump to version 3.1.0
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-01 09:06:33 +02:00
Francois Perrad 2206299031 package/luarocks: better choice of modules in generated test
the name derived from package name is not suitable,
so, we search in the built modules.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-31 12:09:11 +02:00
Francois Perrad ecf6d005ba package/luarocks: add generation of test
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-28 17:19:57 +01:00
Francois Perrad 88fdc6223f package/luarocks: refactor buildroot addon without patch
addon commands are actually implemented in luarocks 3.0.4,
and they must be located in luarocks/cmd/external.

so, it is useless to patch luarocks.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-02-06 12:59:07 +01:00
Francois Perrad f2b783a8f2 package/luarocks: fix generation of license file list in Buildroot addon
check-package requires an hardtab instead of 4 spaces.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-01-01 11:13:03 +01:00
Francois Perrad b389924498 package/luarocks: add buildroot addon
This addon allows to generate a Buildroot package from a Luarocks
package definition.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-31 17:40:58 +01:00
Thomas Petazzoni 819e2b9c34 package/luarocks: rework configuration file for per-package directories
Currently, luarocks.mk generates a configuration file with hardcoded
STAGING_DIR, TARGET_DIR, TARGET_CC, LUAROCKS_CFLAGS and TARGET_LDFLAGS
values. This is not compatible with per-package directories, where the
value of STAGING_DIR, TARGET_DIR, TARGET_CC and possibly
TARGET_CFLAGS/TARGET_LDFLAGS may be different from one package to the
other.

Based on input from François Perrad, this commit:

 - Changes the Luarocks configuration file to use os_getenv() for the
   appropriate variables. Since the contents of this file is not
   fixed, it is no longer generated by luarocks.mk using a series of
   'echo' but simply concatenated with the rest of the Luarocks
   configuration file.

 - Adjusts LUAROCKS_RUNV_ENV so that the necessary environment
   variables are now passed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-01 22:54:41 +01:00
Francois Perrad 864f85262f luarocks: bump to version 3.0.4
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-31 09:37:11 +01:00
Francois Perrad 588bcf8e8a luarocks: bump to version 3.0.3
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-16 15:40:32 +02:00
Thomas Petazzoni 9e3a92a263 luarocks: add hash for license file
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-08 15:07:45 +02:00
Francois Perrad ba5d0dd1ef luarocks: bump to version 3.0.2
(remove 2 unused variables)

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-08 15:06:53 +02:00
Francois Perrad a5374ceeee luarocks: bump to version 3.0.1
The meaning of --sysconfdir has changed (see announcement
http://lua-users.org/lists/lua-l/2018-08/msg00101.html), So,
LUAROCKS_CONFIG_DIR & LUAROCKS_CONFIG_FILE are adjusted.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-16 11:58:08 +02:00
Francois Perrad bcccf22814 luarocks: fix lua modules building with luajit
currently, when luajit is selected as luainterpreter,
all lua module fails to build with the message:
    Error: Failed finding Lua library. You may need to configure LUA_LIBDIR.

see http://autobuild.buildroot.net/results/66de049c306d7aff66894d53e2f4fa755fd01594

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-05 12:06:56 +02:00
Francois Perrad c83f2c14f8 luarocks: bump to version 3.0.0
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-25 23:29:12 +02:00
Peter Korsgaard 0bd23f0603 lua: always use host-lua for host-luainterpreter
Similar to how we do for openssl.

host-luainterpreter is only used by the luarocks infrastructure, and there
is afaik no specific reason why the host lua variant must match the target one.

Luajit only supports a limited number of architectures, so building it for
the host limits the architectures Buildroot can be used on (E.G. powerpc64
autobuilders).

To fix this, always use host-lua.  Slightly rework lua.mk to ensure
host-lua-5.1 is used when luajit is selected, and drop the logic for using
host-luajit.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-03-31 21:01:03 +02:00
Francois Perrad 6b68c83282 luarocks: bump to version 2.4.4
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-03-13 22:14:56 +01:00
Francois Perrad 302bcee76b luarocks: bump to version 2.4.3
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-09-13 11:49:34 +02:00
Arnout Vandecappelle 685f44de98 Globally replace $(HOST_DIR)/usr with $(HOST_DIR)
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '\$(HOST_DIR)/usr' | xargs sed -i 's%\$(HOST_DIR)/usr%$(HOST_DIR)%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:22:29 +02:00
Arnout Vandecappelle 3b91bd4791 Globally replace $(HOST_DIR)/usr/share with $(HOST_DIR)/share
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/share' | xargs sed -i 's%$(HOST_DIR)/usr/share%$(HOST_DIR)/share%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:21:31 +02:00
Arnout Vandecappelle 0f9c0bf3d5 Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:29 +02:00
Arnout Vandecappelle 15bff58f3e generic packages: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix
Remove the redundant usr/ component of the HOST_DIR paths. Since a
previous commit added a symlink from $(HOST_DIR)/usr to $(HOST_DIR),
everything keeps on working.

This is a mechanical change with
git grep -l '\$(HOST_DIR)/usr' | xargs sed -i 's%\(prefix\|PREFIX\)=\("\?\)\$(HOST_DIR)/usr%\1=\2$(HOST_DIR)%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:02 +02:00
Danomi Manchego e298cf06f6 luarocks: fix target-finalize hook processing
The LUAROCKS_TARGET_FINALIZE_HOOKS is not running, so detritus is being left
in /usr/lib/luarocks.  This is because host-luarocks is built by being a
dependency in the luarocks package infrastructure, not by being selected by
kconfig symbol.  This means that the $(PKG)_KCONFIG_VAR in pkg-generic.mk is
not met, and (HOST_)LUAROCKS_TARGET_FINALIZE_HOOKS is not added to the
global TARGET_FINALIZE_HOOKS.

This mod fixes this issue by adding the host-luarocks hook directly
to TARGET_FINALIZE_HOOKS when either lua or luajit is enabled.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-28 23:55:11 +01:00
Francois Perrad b022d9301f luarocks: bump to version 2.4.2
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-30 22:10:42 +01:00
Francois Perrad 83f9b65c5e luarocks: bump to version 2.4.1
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-07 14:47:41 +02:00
Francois Perrad 80e85e9b47 luarocks: bump to version 2.4.0
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-09-09 17:01:16 +02:00
Yann E. MORIN 50adab522c packages: use the <PKG>_TARGET_FINALIZE_HOOKS
Register package-specific target-finalize hooks with the
newly-introduced <PKG>_TARGET_FINALIZE_HOOKS.

This incidentally fixes luarocks, which was registering target-finalize
hooks even when it was not enabled.

To be noted, the skeleton package is not converted, because it is not
optional, we always have it; so its hooks would always be registered
anyway. Besides, the followup patches would render this conversion moot
anyway, since those hooks would be spread across the various skeleton
packages.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-05 15:53:05 +02:00
Francois Perrad cf903fa515 luarocks: bump to version 2.3.0
[Peter: add .hash file]
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-01-12 22:26:53 +01:00
Fabio Porcedda 22b327fc74 pkg-luarocks: fix top-level parallel makefile support
In the *-install-target phase the manifest file is being updated, if multiply packages try to update it they fail.

To avoid multiple access to the manifest file use flock to sync
multiple luarocks packages.

e.g. installing three luarocks packages:
make lua-cjson-build lua-coat-build lua-coatpersistent-build
make lua-cjson lua-coat lua-coatpersistent -j

Fix error:
Updating manifest for /home/tetsuya/buildroot/br2/output/target/usr/lib/luarocks/rocks
No existing manifest. Attempting to rebuild...

Error: rock_manifest file not found for lua-coat 0.9.1-1 - not a LuaRocks 2 tree?

[Thomas: get rid of LUAROCKS_RUN, and use LUAROCKS_RUN_ENV +
LUAROCKS_RUN_CMD everywhere.]

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-04 15:21:33 +02:00
Francois Perrad aa0dc35df4 luarocks: bump to version 2.2.2
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-25 11:26:00 +02:00
Jerzy Grzegorek bd8c733fb4 packages: indentation cleanup
This commit doesn't touch infra packages.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-31 13:57:41 +02:00
Francois Perrad 48634552d6 luarocks: bump to version 2.2.1
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-17 21:31:01 +01:00