From c41a102bc49eba039ee582054266cc0f87355984 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 18 Sep 2014 16:06:53 +0200 Subject: [PATCH] Add 'check_tool' function to new ports mechanism Fixes #1254. --- repos/libports/ports/ncurses.hash | 2 +- repos/libports/ports/ncurses.port | 4 ++-- repos/libports/ports/openssl.hash | 2 +- repos/libports/ports/openssl.port | 2 +- tool/ports/mk/install.mk | 9 +++++++++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/repos/libports/ports/ncurses.hash b/repos/libports/ports/ncurses.hash index 1578e9049..c81a07859 100644 --- a/repos/libports/ports/ncurses.hash +++ b/repos/libports/ports/ncurses.hash @@ -1 +1 @@ -d3a823f4ef6b45a184fb7c349d8efc2e55b0df96 +dd40dba9c711e4342a8dd66912034c0bc8fdb8d3 diff --git a/repos/libports/ports/ncurses.port b/repos/libports/ports/ncurses.port index 50ad26fa6..65d25a1fd 100644 --- a/repos/libports/ports/ncurses.port +++ b/repos/libports/ports/ncurses.port @@ -13,8 +13,8 @@ DIR_CONTENT(include/ncurses) := \ nc_alloc.h nc_panel.h nc_tparm.h term_entry.h tic.h hashed_db.h \ capdefaults.c) -#$(call check_tool,sed) -#$(call check_tool,mawk) +$(call check_tool,sed) +$(call check_tool,mawk) gen_inc := curses.h ncurses_def.h ncurses_dll.h term.h \ unctrl.h termcap.h parametrized.h hashsize.h \ diff --git a/repos/libports/ports/openssl.hash b/repos/libports/ports/openssl.hash index 51ac88de2..89172f9be 100644 --- a/repos/libports/ports/openssl.hash +++ b/repos/libports/ports/openssl.hash @@ -1 +1 @@ -c43ce53cf840026e896b325c7ccded7506811f30 +d268763333f8e142ba331cfb5348e00e93bf3a96 diff --git a/repos/libports/ports/openssl.port b/repos/libports/ports/openssl.port index 249b1554f..990d5c8ea 100644 --- a/repos/libports/ports/openssl.port +++ b/repos/libports/ports/openssl.port @@ -19,7 +19,7 @@ DIR_CONTENT(include/openssl) = $(shell find src/lib/openssl/include/openssl/ -na # Generate ASM codes # -#$(call check_tool,sed) +$(call check_tool,perl) gen_files := src/lib/openssl/x86_64/modexp512.s src/lib/openssl/x86_64/rc4_md5.s diff --git a/tool/ports/mk/install.mk b/tool/ports/mk/install.mk index ec0c0b8e6..500d4fc7e 100644 --- a/tool/ports/mk/install.mk +++ b/tool/ports/mk/install.mk @@ -20,6 +20,11 @@ # XXX remove this line when the tool has stabilized STRICT_HASH ?= no +# +# Utility to check if a tool is installed +# +check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.)) + default: # repository that contains the port description, used to look up patch files @@ -45,6 +50,10 @@ include $(PORT) # include $(GENODE_DIR)/tool/ports/mk/common.inc +$(call check_tool,wget) +$(call check_tool,patch) +$(call check_tool, $(HASHSUM)) + # # Assertion for the presence of a LICENSE and VERSION declarations in the port # description