From ffff8fdc0edd01650f4c593be1e44a133a665117 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 25 Oct 2020 23:12:37 +0100 Subject: [PATCH] - add host-ninja --- make/helpers.mk | 5 +++++ make/host-tools.mk | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/make/helpers.mk b/make/helpers.mk index d0c92d24..bee28bec 100644 --- a/make/helpers.mk +++ b/make/helpers.mk @@ -41,6 +41,11 @@ APPLY_PATCHES = $(call apply_patches, $(PKG_PATCHES_DIR)) # ----------------------------------------------------------------------------- +# github(user,package,version): returns site of GitHub repository +github = https://github.com/$(1)/$(2)/archive/$(3) + +# ----------------------------------------------------------------------------- + # rewrite libtool libraries REWRITE_LIBTOOL_RULES = sed -i \ -e "s,^libdir=.*,libdir='$(TARGET_LIB_DIR)'," \ diff --git a/make/host-tools.mk b/make/host-tools.mk index 5f027c3c..94ea63d3 100644 --- a/make/host-tools.mk +++ b/make/host-tools.mk @@ -275,6 +275,33 @@ host-e2fsprocs: $(ARCHIVE)/$(HOST_E2FSPROGS_SOURCE) | $(HOST_DIR) # ----------------------------------------------------------------------------- +HOST_NINJA_VER = 1.10.0 +HOST_NINJA_TMP = ninja-$(HOST_NINJA_VER) +HOST_NINJA_SOURCE = ninja-$(HOST_NINJA_VER).tar.gz +HOST_NINJA_SITE = $(call github,ninja-build,ninja,v$(HOST_NINJA_VER)) + +HOST_NINJA_PATCH = ninja/0001-set-minimum-cmake-version-to-3.10.patch +HOST_NINJA_PATCH += ninja/0002-remove-fdiagnostics-color-from-make-command.patch +HOST_NINJA_PATCH += ninja/0003-CMake-fix-object-library-usage.patch + +$(ARCHIVE)/$(HOST_NINJA_SOURCE): + $(DOWNLOAD) $(HOST_NINJA_SITE)/$(HOST_NINJA_SOURCE) + +host-ninja: $(ARCHIVE)/$(HOST_NINJA_SOURCE) | $(HOST_DIR) + $(REMOVE)/$(HOST_NINJA_TMP) + $(UNTAR)/$(HOST_NINJA_SOURCE) + $(CHDIR)/$(HOST_NINJA_TMP); \ + $(call apply_patches, $(HOST_NINJA_PATCH)); \ + cmake . \ + -DCMAKE_INSTALL_PREFIX="" \ + ; \ + $(MAKE) + $(INSTALL_EXEC) -D $(BUILD_TMP)/$(HOST_NINJA_TMP)/ninja $(HOST_DIR)/bin/ninja + $(REMOVE)/$(HOST_NINJA_TMP) + $(TOUCH) + +# ----------------------------------------------------------------------------- + HOST_LUA_VER = $(LUA_VER) HOST_LUA_TMP = lua-$(HOST_LUA_VER) HOST_LUA_SOURCE = lua-$(HOST_LUA_VER).tar.gz