kumquat-buildroot/package/ninja/ninja.mk
Avi Shukron f31cd33cef package/ninja: invoke python3 explicitly to configure the package
ninja depends on python3 specifically, but the configure.py file
simply uses "env python". Where no python is selected for the target
you simply won't get a python symlink in $(HOST_DIR)/usr/bin, so the
configure.py script fails to run since it can't find "python".

Notice that in order to reproduce the issue, you must not have
python2 installed on your host machine.

Signed-off-by: Avi Shukron <avraham.shukron@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-11-12 21:55:57 +01:00

28 lines
900 B
Makefile

################################################################################
#
# ninja
#
################################################################################
NINJA_VERSION = 1.9.0
NINJA_SITE = $(call github,ninja-build,ninja,v$(NINJA_VERSION))
NINJA_LICENSE = Apache-2.0
NINJA_LICENSE_FILES = COPYING
# Although Ninja supports both Python2 and Python3, we enforce Python3
# on the host for the following reason: Meson is the only package
# using Ninja so far and Meson requires Python3. In this way, we
# prevent both Python2 and Python3 from being created on the host,
# which is time consuming and without benefit.
HOST_NINJA_DEPENDENCIES = host-python3
define HOST_NINJA_BUILD_CMDS
(cd $(@D); $(HOST_DIR)/bin/python3 configure.py --bootstrap)
endef
define HOST_NINJA_INSTALL_CMDS
$(INSTALL) -m 0755 -D $(@D)/ninja $(HOST_DIR)/bin/ninja
endef
$(eval $(host-generic-package))