From 1053d7820197dd3e13ab183de3ef7d05f43cb69f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 14 Feb 2018 20:13:35 +0100 Subject: [PATCH] ports: src/bash-minimal noux package --- repos/ports/recipes/src/bash-minimal/content.mk | 9 +++++++++ repos/ports/recipes/src/bash-minimal/hash | 1 + repos/ports/recipes/src/bash-minimal/used_apis | 3 +++ repos/ports/recipes/src/bash/content.mk | 4 +++- repos/ports/src/noux-pkg/bash-minimal/target.mk | 7 +++++++ repos/ports/src/noux-pkg/bash/target.inc | 14 ++++++++++++++ repos/ports/src/noux-pkg/bash/target.mk | 15 +-------------- 7 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 repos/ports/recipes/src/bash-minimal/content.mk create mode 100644 repos/ports/recipes/src/bash-minimal/hash create mode 100644 repos/ports/recipes/src/bash-minimal/used_apis create mode 100644 repos/ports/src/noux-pkg/bash-minimal/target.mk create mode 100644 repos/ports/src/noux-pkg/bash/target.inc diff --git a/repos/ports/recipes/src/bash-minimal/content.mk b/repos/ports/recipes/src/bash-minimal/content.mk new file mode 100644 index 0000000000..cec689005d --- /dev/null +++ b/repos/ports/recipes/src/bash-minimal/content.mk @@ -0,0 +1,9 @@ +# keep 'bash/target.inc' but not 'bash/target.mk' +BASH_SRC := src/noux-pkg/bash/target.inc + +include $(REP_DIR)/recipes/src/bash/content.mk + +content: src/noux-pkg/bash-minimal + +src/noux-pkg/bash-minimal: + $(mirror_from_rep_dir) diff --git a/repos/ports/recipes/src/bash-minimal/hash b/repos/ports/recipes/src/bash-minimal/hash new file mode 100644 index 0000000000..0e837b8bcb --- /dev/null +++ b/repos/ports/recipes/src/bash-minimal/hash @@ -0,0 +1 @@ +2018-02-14 79db70c2f818a2e41ba051821bded822cd6dbd9a diff --git a/repos/ports/recipes/src/bash-minimal/used_apis b/repos/ports/recipes/src/bash-minimal/used_apis new file mode 100644 index 0000000000..737e3c26a5 --- /dev/null +++ b/repos/ports/recipes/src/bash-minimal/used_apis @@ -0,0 +1,3 @@ +libc +noux +posix diff --git a/repos/ports/recipes/src/bash/content.mk b/repos/ports/recipes/src/bash/content.mk index f899d0658d..b1bf3439ea 100644 --- a/repos/ports/recipes/src/bash/content.mk +++ b/repos/ports/recipes/src/bash/content.mk @@ -1,3 +1,5 @@ +BASH_SRC ?= $(addprefix src/noux-pkg/bash/,target.inc target.mk) + content: src/noux-pkg/bash LICENSE PORT_DIR := $(call port_dir,$(REP_DIR)/ports/bash) @@ -5,7 +7,7 @@ PORT_DIR := $(call port_dir,$(REP_DIR)/ports/bash) src/noux-pkg/bash: mkdir -p $@ cp -a $(PORT_DIR)/src/noux-pkg/bash/* $@ - cp -a $(REP_DIR)/src/noux-pkg/bash/* $@ + cp -a $(addprefix $(REP_DIR)/,$(BASH_SRC)) $@ LICENSE: cp $(PORT_DIR)/src/noux-pkg/bash/COPYING $@ diff --git a/repos/ports/src/noux-pkg/bash-minimal/target.mk b/repos/ports/src/noux-pkg/bash-minimal/target.mk new file mode 100644 index 0000000000..d3f7d4912b --- /dev/null +++ b/repos/ports/src/noux-pkg/bash-minimal/target.mk @@ -0,0 +1,7 @@ +BINARIES := bash + +INSTALL_TAR_CONTENT := $(addprefix bin/,$(BINARIES)) + +PKG_DIR = $(call select_from_ports,bash)/src/noux-pkg/bash + +include $(REP_DIR)/src/noux-pkg/bash/target.inc diff --git a/repos/ports/src/noux-pkg/bash/target.inc b/repos/ports/src/noux-pkg/bash/target.inc new file mode 100644 index 0000000000..a0506d6758 --- /dev/null +++ b/repos/ports/src/noux-pkg/bash/target.inc @@ -0,0 +1,14 @@ +CONFIGURE_ARGS = --without-bash-malloc +CFLAGS += -Dsh_xfree=free + +# +# Do not expect the environment to be passed as third argument +# to the main function. The Genode startup code does only +# deliver 'argc' and 'argv'. +# +CFLAGS += -DNO_MAIN_ENV_ARG=1 + +# Prevent interactions with nonexisting tty driver +CFLAGS += -DNO_TTY_DRIVER + +include $(call select_from_repositories,mk/noux.mk) diff --git a/repos/ports/src/noux-pkg/bash/target.mk b/repos/ports/src/noux-pkg/bash/target.mk index a0506d6758..310689bf0c 100644 --- a/repos/ports/src/noux-pkg/bash/target.mk +++ b/repos/ports/src/noux-pkg/bash/target.mk @@ -1,14 +1 @@ -CONFIGURE_ARGS = --without-bash-malloc -CFLAGS += -Dsh_xfree=free - -# -# Do not expect the environment to be passed as third argument -# to the main function. The Genode startup code does only -# deliver 'argc' and 'argv'. -# -CFLAGS += -DNO_MAIN_ENV_ARG=1 - -# Prevent interactions with nonexisting tty driver -CFLAGS += -DNO_TTY_DRIVER - -include $(call select_from_repositories,mk/noux.mk) +include $(PRG_DIR)/target.inc