[Buildroot] [pkg-luarocks 4/6] pkg-luarocks: add support of host-luarocks-package
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Fri Mar 20 21:48:29 UTC 2020
Hello François,
On Wed, 18 Sep 2019 08:19:13 +0200
Francois Perrad <fperrad at gmail.com> wrote:
> $(2)_BUILD_OPTS ?=
> -$(2)_NAME_UPSTREAM ?= $(1)
> -$(2)_SUBDIR ?= $$($(2)_NAME_UPSTREAM)-$$(shell echo "$$($(2)_VERSION)" | sed -e "s/-[0-9]$$$$//")
> -$(2)_ROCKSPEC ?= $$(call LOWERCASE,$$($(2)_NAME_UPSTREAM))-$$($(2)_VERSION).rockspec
> -$(2)_SOURCE ?= $$(call LOWERCASE,$$($(2)_NAME_UPSTREAM))-$$($(2)_VERSION).src.rock
> -$(2)_SITE ?= $$(call qstrip,$$(BR2_LUAROCKS_MIRROR))
> +$(3)_NAME_UPSTREAM ?= $(1)
> +$(3)_SUBDIR ?= $$($(3)_NAME_UPSTREAM)-$$(shell echo "$$($(3)_VERSION)" | sed -e "s/-[0-9]$$$$//")
> +$(3)_ROCKSPEC ?= $$(call LOWERCASE,$$($(3)_NAME_UPSTREAM))-$$($(3)_VERSION).rockspec
> +$(3)_SOURCE ?= $$(call LOWERCASE,$$($(3)_NAME_UPSTREAM))-$$($(3)_VERSION).src.rock
> +$(3)_SITE ?= $$(call qstrip,$$(BR2_LUAROCKS_MIRROR))
I think this is not good, because it means that if a package "lua-foo"
has both a host and a target variant, then LUA_FOO_NAME_UPSTREAM will
be defined twice by the package infrastructure.
Instead, we want to do something like this:
ifndef $(2)_NAME_UPSTREAM
ifdef $(3)_NAME_UPSTREAM
$(2)_NAME_UPSTREAM = $($(3)_NAME_UPSTREAM)
else
$(2)_NAME_UPSTREAM ?= $(1)
endif
endif
And so on for the different variables.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the buildroot
mailing list