* [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled
@ 2017-08-15 19:14 Baruch Siach
2017-08-15 19:14 ` [Buildroot] [PATCH v2 2/2] whois: use github repo as home page Baruch Siach
2017-08-16 3:40 ` [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled Baruch Siach
0 siblings, 2 replies; 5+ messages in thread
From: Baruch Siach @ 2017-08-15 19:14 UTC (permalink / raw)
To: buildroot
whois build uses the xgettext utility to build translation files.
This utility may not be available when NLS is disabled. Add a patch that
allows skipping the generation of translation files. Use that to skip
the translation when NLS is disabled.
Fixes:
http://autobuild.buildroot.net/results/862/862d8165a59711c970c65d90009a527315a1a6b4/
http://autobuild.buildroot.net/results/b62/b62ec9d6f350e409731d47ffb585344c516944e8/
http://autobuild.buildroot.net/results/be2/be28d06ae004a46c87133d6f07709c6f909288d8/
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v2: patch to add HAVE_GETTEXT that allows disable for gettext (Thomas P)
---
...0001-Makefile-allow-build-without-gettext.patch | 54 ++++++++++++++++++++++
package/whois/whois.mk | 4 ++
2 files changed, 58 insertions(+)
create mode 100644 package/whois/0001-Makefile-allow-build-without-gettext.patch
diff --git a/package/whois/0001-Makefile-allow-build-without-gettext.patch b/package/whois/0001-Makefile-allow-build-without-gettext.patch
new file mode 100644
index 000000000000..ed27129fe37c
--- /dev/null
+++ b/package/whois/0001-Makefile-allow-build-without-gettext.patch
@@ -0,0 +1,54 @@
+From c75502b8b23a16704d02ae85fd325b181a8e909a Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 15 Aug 2017 21:50:18 +0300
+Subject: [PATCH] Makefile: allow build without gettext
+
+Build fails when gettext is not installed, because the xgettext and
+msgfmt utilities are not available. With this patch, setting
+HAVE_GETTEXT to an empty string allows the build to succeed. This is
+useful for space constrained targets where translation files are not
+needed.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: https://github.com/rfc1036/whois/pull/58
+
+ Makefile | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 74ccb0063238..abe4a46a003a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -58,6 +58,8 @@ endif
+ mkpasswd_LDADD += -lcrypt
+ endif
+
++HAVE_GETTEXT ?= YES
++
+ CPPFLAGS += $(DEFS) $(INCLUDES)
+
+ ##############################################################################
+@@ -132,7 +134,9 @@ install-mkpasswd: mkpasswd
+ $(INSTALL) -m 0644 mkpasswd.1 $(BASEDIR)$(prefix)/share/man/man1/
+
+ install-pos:
++ifdef HAVE_GETTEXT
+ cd po && $(MAKE) install
++endif
+
+ distclean: clean
+ rm -f po/whois.pot
+@@ -143,7 +147,9 @@ clean:
+ rm -f po/*.mo
+
+ pos:
++ifdef HAVE_GETTEXT
+ cd po && $(MAKE)
++endif
+
+ depend: Makefile.depend
+ Makefile.depend:
+--
+2.14.1
+
diff --git a/package/whois/whois.mk b/package/whois/whois.mk
index f22446b83917..54966ac9073f 100644
--- a/package/whois/whois.mk
+++ b/package/whois/whois.mk
@@ -27,6 +27,10 @@ WHOIS_DEPENDENCIES += libidn
WHOIS_MAKE_ENV += HAVE_LIBIDN=1
endif
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
+WHOIS_MAKE_ENV += HAVE_GETTEXT=
+endif
+
define WHOIS_BUILD_CMDS
$(WHOIS_MAKE_ENV) $(MAKE) $(WHOIS_MAKE_OPTS) -C $(@D)
endef
--
2.14.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 2/2] whois: use github repo as home page
2017-08-15 19:14 [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled Baruch Siach
@ 2017-08-15 19:14 ` Baruch Siach
2017-08-16 21:10 ` Thomas Petazzoni
2017-08-16 3:40 ` [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled Baruch Siach
1 sibling, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2017-08-15 19:14 UTC (permalink / raw)
To: buildroot
The github repo is more informative than the list Marco's software on
the previous link.
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
package/whois/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/whois/Config.in b/package/whois/Config.in
index 9505d5832056..d2a030282b76 100644
--- a/package/whois/Config.in
+++ b/package/whois/Config.in
@@ -4,4 +4,4 @@ config BR2_PACKAGE_WHOIS
help
Improved whois client.
- http://www.linux.it/~md/software/
+ https://github.com/rfc1036/whois
--
2.14.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 2/2] whois: use github repo as home page
2017-08-15 19:14 ` [Buildroot] [PATCH v2 2/2] whois: use github repo as home page Baruch Siach
@ 2017-08-16 21:10 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2017-08-16 21:10 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 15 Aug 2017 22:14:41 +0300, Baruch Siach wrote:
> The github repo is more informative than the list Marco's software on
> the previous link.
>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> package/whois/Config.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled
2017-08-15 19:14 [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled Baruch Siach
2017-08-15 19:14 ` [Buildroot] [PATCH v2 2/2] whois: use github repo as home page Baruch Siach
@ 2017-08-16 3:40 ` Baruch Siach
2017-08-16 8:39 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2017-08-16 3:40 UTC (permalink / raw)
To: buildroot
Hi Thomas, all,
On Tue, Aug 15, 2017 at 10:14:40PM +0300, Baruch Siach wrote:
> whois build uses the xgettext utility to build translation files.
> This utility may not be available when NLS is disabled. Add a patch that
> allows skipping the generation of translation files. Use that to skip
> the translation when NLS is disabled.
>
> Fixes:
> http://autobuild.buildroot.net/results/862/862d8165a59711c970c65d90009a527315a1a6b4/
> http://autobuild.buildroot.net/results/b62/b62ec9d6f350e409731d47ffb585344c516944e8/
> http://autobuild.buildroot.net/results/be2/be28d06ae004a46c87133d6f07709c6f909288d8/
>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v2: patch to add HAVE_GETTEXT that allows disable for gettext (Thomas P)
Upstream rejected[1] the patch, basically suggesting the approach of v1[2],
that is, make only the targets we want while omitting the gettext targets. So
we can either carry this patch forever, or apply [2].
[1] https://github.com/rfc1036/whois/pull/58
[2] https://patchwork.ozlabs.org/patch/801031/
baruch
> ---
> ...0001-Makefile-allow-build-without-gettext.patch | 54 ++++++++++++++++++++++
> package/whois/whois.mk | 4 ++
> 2 files changed, 58 insertions(+)
> create mode 100644 package/whois/0001-Makefile-allow-build-without-gettext.patch
>
> diff --git a/package/whois/0001-Makefile-allow-build-without-gettext.patch b/package/whois/0001-Makefile-allow-build-without-gettext.patch
> new file mode 100644
> index 000000000000..ed27129fe37c
> --- /dev/null
> +++ b/package/whois/0001-Makefile-allow-build-without-gettext.patch
> @@ -0,0 +1,54 @@
> +From c75502b8b23a16704d02ae85fd325b181a8e909a Mon Sep 17 00:00:00 2001
> +From: Baruch Siach <baruch@tkos.co.il>
> +Date: Tue, 15 Aug 2017 21:50:18 +0300
> +Subject: [PATCH] Makefile: allow build without gettext
> +
> +Build fails when gettext is not installed, because the xgettext and
> +msgfmt utilities are not available. With this patch, setting
> +HAVE_GETTEXT to an empty string allows the build to succeed. This is
> +useful for space constrained targets where translation files are not
> +needed.
> +
> +Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> +---
> +Upstream status: https://github.com/rfc1036/whois/pull/58
> +
> + Makefile | 6 ++++++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/Makefile b/Makefile
> +index 74ccb0063238..abe4a46a003a 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -58,6 +58,8 @@ endif
> + mkpasswd_LDADD += -lcrypt
> + endif
> +
> ++HAVE_GETTEXT ?= YES
> ++
> + CPPFLAGS += $(DEFS) $(INCLUDES)
> +
> + ##############################################################################
> +@@ -132,7 +134,9 @@ install-mkpasswd: mkpasswd
> + $(INSTALL) -m 0644 mkpasswd.1 $(BASEDIR)$(prefix)/share/man/man1/
> +
> + install-pos:
> ++ifdef HAVE_GETTEXT
> + cd po && $(MAKE) install
> ++endif
> +
> + distclean: clean
> + rm -f po/whois.pot
> +@@ -143,7 +147,9 @@ clean:
> + rm -f po/*.mo
> +
> + pos:
> ++ifdef HAVE_GETTEXT
> + cd po && $(MAKE)
> ++endif
> +
> + depend: Makefile.depend
> + Makefile.depend:
> +--
> +2.14.1
> +
> diff --git a/package/whois/whois.mk b/package/whois/whois.mk
> index f22446b83917..54966ac9073f 100644
> --- a/package/whois/whois.mk
> +++ b/package/whois/whois.mk
> @@ -27,6 +27,10 @@ WHOIS_DEPENDENCIES += libidn
> WHOIS_MAKE_ENV += HAVE_LIBIDN=1
> endif
>
> +ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
> +WHOIS_MAKE_ENV += HAVE_GETTEXT=
> +endif
> +
> define WHOIS_BUILD_CMDS
> $(WHOIS_MAKE_ENV) $(MAKE) $(WHOIS_MAKE_OPTS) -C $(@D)
> endef
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled
2017-08-16 3:40 ` [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled Baruch Siach
@ 2017-08-16 8:39 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2017-08-16 8:39 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 16 Aug 2017 06:40:27 +0300, Baruch Siach wrote:
> Hi Thomas, all,
>
> On Tue, Aug 15, 2017 at 10:14:40PM +0300, Baruch Siach wrote:
> > whois build uses the xgettext utility to build translation files.
> > This utility may not be available when NLS is disabled. Add a patch that
> > allows skipping the generation of translation files. Use that to skip
> > the translation when NLS is disabled.
> >
> > Fixes:
> > http://autobuild.buildroot.net/results/862/862d8165a59711c970c65d90009a527315a1a6b4/
> > http://autobuild.buildroot.net/results/b62/b62ec9d6f350e409731d47ffb585344c516944e8/
> > http://autobuild.buildroot.net/results/be2/be28d06ae004a46c87133d6f07709c6f909288d8/
> >
> > Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > v2: patch to add HAVE_GETTEXT that allows disable for gettext (Thomas P)
>
> Upstream rejected[1] the patch, basically suggesting the approach of v1[2],
> that is, make only the targets we want while omitting the gettext targets. So
> we can either carry this patch forever, or apply [2].
OK, fair enough, let's take your original PATCH 1/3. Thanks for pushing
this further anyway!
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-16 21:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 19:14 [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled Baruch Siach
2017-08-15 19:14 ` [Buildroot] [PATCH v2 2/2] whois: use github repo as home page Baruch Siach
2017-08-16 21:10 ` Thomas Petazzoni
2017-08-16 3:40 ` [Buildroot] [PATCH v2 1/2] whois: fix build with NLS disabled Baruch Siach
2017-08-16 8:39 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox