Commit graph

53 commits

Author SHA1 Message Date
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
Francois Perrad 7b3dc5c370 lua: add 5.3.x serie
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-02-02 15:52:41 +01:00
Thomas De Schampheleire f268f7131b .mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 15:00:28 +02:00
Thomas De Schampheleire aaffd209fa packages: rename FOO_CONF_OPT into FOO_CONF_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_CONF_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_CONF_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:54:16 +02:00
Francois Perrad 5f7a2f5bd4 luarocks: bump to version 2.2.0
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-06 22:40:00 +02:00
Jerzy Grzegorek c7f4b96471 package: remove the trailing slash sign from <PKG>_SITE variable
Since the trailing slash is stripped from $($(PKG)_SITE) by pkg-generic.mk:

$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE))

so it is redundant.
This patch removes it from $(PKG)_SITE variable for BR consistency.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-31 23:17:46 +02:00
Francois Perrad b8d5182b93 luarocks: refactor with TARGET_FINALIZE_HOOKS
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 20:22:58 +02:00
Francois Perrad 513b1b9b75 luarocks: allow to work with host-luainterpreter
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-27 10:44:50 +02:00
Francois Perrad 5363cf1733 luarocks: move the option --deps-mode
The option moves from `luarocks make` command to the LuaRocks config file.

This change and the merge of PR https://github.com/keplerproject/luarocks/pull/236
in LuaRocks 2.2.0 avoids the confusing message "Missing dependency"

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-26 09:04:05 +02:00
Francois Perrad 0b8411afac luarocks: bump to version 2.2.0beta1
this version includes a new default repository for rocks

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-26 09:03:22 +02:00
Francois Perrad 7669aab6b4 luarocks: remove luainterpreter dependency
All packages using the luarocks infrastructure need a dependency on
luainterpreter, because having the Lua interpreter for the target is
needed to built native Lua modules. This dependency is already taken
care of in pkg-luarocks.mk.

However, host-luarocks, which is built as a dependency of the extract
step of any luarocks package, also had a dependency on
luainterpreter. Not only this was not necessary, but it was causing
problems with 'make legal-info'. Since 'make legal-info' triggers the
extraction of all packages, as soon as a luarocks package was enabled,
it would trigger the build of host-luarocks, itself triggering the
build of luainterpreter and therefore its dependencies, amongst which
the entire cross-compilation toolchain.

[Thomas: reword commit log to include more detailed explanations.]

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-01 23:47:40 +01:00
Francois Perrad 29e583388f luarocks: never wraps script
this config prevents the introduction of some HOST_DIR paths on target

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-26 17:22:56 +01:00
Francois Perrad 751d85a7f8 lua-modules: choice between Lua 5.1.x & Lua 5.2.x
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-21 23:27:50 +01:00