mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] gettext: add envsubst option
@ 2019-07-24  9:04 Lars Pedersen
  2019-08-07 10:50 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Pedersen @ 2019-07-24  9:04 UTC (permalink / raw)
  To: ptxdist; +Cc: Lars Pedersen

For environment variable templating

Signed-off-by: Lars Pedersen <lapeddk@gmail.com>
---
 rules/gettext.in   | 14 +++++++++++++-
 rules/gettext.make |  4 ++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/rules/gettext.in b/rules/gettext.in
index 5b971f7d1..1b322ae35 100644
--- a/rules/gettext.in
+++ b/rules/gettext.in
@@ -1,5 +1,5 @@
 ## SECTION=system_libraries
-config GETTEXT
+menuconfig GETTEXT
 	tristate
 	prompt "gettext (gnu)"
 	select LIBC_M
@@ -10,3 +10,15 @@ config GETTEXT
 	  The gettext program translates a natural language
 	  message into the user's language, by looking up
 	  the translation in a message catalog.
+
+
+if GETTEXT
+
+config GETTEXT_ENVSUBST
+	bool
+	default n
+	prompt "envsubst"
+	help
+	  Substitutes environment variables in shell format strings
+
+endif
diff --git a/rules/gettext.make b/rules/gettext.make
index 0bda25c96..dd1d22ffb 100644
--- a/rules/gettext.make
+++ b/rules/gettext.make
@@ -71,6 +71,10 @@ $(STATEDIR)/gettext.targetinstall:
 	@$(call install_fixup, gettext,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
 	@$(call install_fixup, gettext,DESCRIPTION,missing)
 
+ifdef PTXCONF_GETTEXT_ENVSUBST
+	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/envsubst)
+endif
+
 	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/xgettext)
 	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/gettext)
 
-- 
2.21.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] gettext: add envsubst option
  2019-07-24  9:04 [ptxdist] [PATCH] gettext: add envsubst option Lars Pedersen
@ 2019-08-07 10:50 ` Michael Olbrich
  2019-08-26  9:54   ` [ptxdist] [PATCH v2] " Lars Pedersen
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2019-08-07 10:50 UTC (permalink / raw)
  To: ptxdist

On Wed, Jul 24, 2019 at 11:04:28AM +0200, Lars Pedersen wrote:
> For environment variable templating
> 
> Signed-off-by: Lars Pedersen <lapeddk@gmail.com>
> ---
>  rules/gettext.in   | 14 +++++++++++++-
>  rules/gettext.make |  4 ++++
>  2 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/rules/gettext.in b/rules/gettext.in
> index 5b971f7d1..1b322ae35 100644
> --- a/rules/gettext.in
> +++ b/rules/gettext.in
> @@ -1,5 +1,5 @@
>  ## SECTION=system_libraries
> -config GETTEXT
> +menuconfig GETTEXT
>  	tristate
>  	prompt "gettext (gnu)"

Add spaces at the end to align the '-->'

>  	select LIBC_M
> @@ -10,3 +10,15 @@ config GETTEXT
>  	  The gettext program translates a natural language
>  	  message into the user's language, by looking up
>  	  the translation in a message catalog.
> +
> +
> +if GETTEXT
> +
> +config GETTEXT_ENVSUBST
> +	bool
> +	default n

Remove this line. It's the default.

Michael

> +	prompt "envsubst"
> +	help
> +	  Substitutes environment variables in shell format strings
> +
> +endif
> diff --git a/rules/gettext.make b/rules/gettext.make
> index 0bda25c96..dd1d22ffb 100644
> --- a/rules/gettext.make
> +++ b/rules/gettext.make
> @@ -71,6 +71,10 @@ $(STATEDIR)/gettext.targetinstall:
>  	@$(call install_fixup, gettext,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
>  	@$(call install_fixup, gettext,DESCRIPTION,missing)
>  
> +ifdef PTXCONF_GETTEXT_ENVSUBST
> +	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/envsubst)
> +endif
> +
>  	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/xgettext)
>  	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/gettext)
>  
> -- 
> 2.21.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ptxdist] [PATCH v2] gettext: add envsubst option
  2019-08-07 10:50 ` Michael Olbrich
@ 2019-08-26  9:54   ` Lars Pedersen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Pedersen @ 2019-08-26  9:54 UTC (permalink / raw)
  To: ptxdist; +Cc: m.olbrich, Lars Pedersen

For environment variable templating

Signed-off-by: Lars Pedersen <lapeddk@gmail.com>
---
v2: Fix prompt spacing and remove default line
 rules/gettext.in   | 15 +++++++++++++--
 rules/gettext.make |  4 ++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/rules/gettext.in b/rules/gettext.in
index 5b971f7d1..dc0573912 100644
--- a/rules/gettext.in
+++ b/rules/gettext.in
@@ -1,7 +1,7 @@
 ## SECTION=system_libraries
-config GETTEXT
+menuconfig GETTEXT
 	tristate
-	prompt "gettext (gnu)"
+	prompt "gettext (gnu)                 "
 	select LIBC_M
 	select LIBC_DL
 	select GCCLIBS_CXX
@@ -10,3 +10,14 @@ config GETTEXT
 	  The gettext program translates a natural language
 	  message into the user's language, by looking up
 	  the translation in a message catalog.
+
+
+if GETTEXT
+
+config GETTEXT_ENVSUBST
+	bool
+	prompt "envsubst"
+	help
+	  Substitutes environment variables in shell format strings
+
+endif
diff --git a/rules/gettext.make b/rules/gettext.make
index 0bda25c96..dd1d22ffb 100644
--- a/rules/gettext.make
+++ b/rules/gettext.make
@@ -71,6 +71,10 @@ $(STATEDIR)/gettext.targetinstall:
 	@$(call install_fixup, gettext,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
 	@$(call install_fixup, gettext,DESCRIPTION,missing)
 
+ifdef PTXCONF_GETTEXT_ENVSUBST
+	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/envsubst)
+endif
+
 	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/xgettext)
 	@$(call install_copy, gettext, 0, 0, 0755, -, /usr/bin/gettext)
 
-- 
2.21.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-26  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24  9:04 [ptxdist] [PATCH] gettext: add envsubst option Lars Pedersen
2019-08-07 10:50 ` Michael Olbrich
2019-08-26  9:54   ` [ptxdist] [PATCH v2] " Lars Pedersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox