whois: fix build with NLS disabled
PATCH v2 1/2 whois: fix build with NLS disabled
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/
---
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
package/whois/0001-Makefile-allow-build-without-gettext.patch new file +54 -0
@@ -0,0 +1,54 @@ +From c75502b8b23a16704d02ae85fd325b181a8e909a Mon Sep 17 00:00:00 2001 +From: Baruch Siach <[email protected]> +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 <[email protected]> +--- +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 +
package/whois/whois.mk +4 -0
@@ -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
Signature · 1 line
2.14.1
PATCH v2 1/2 whois: fix build with NLS disabled
Hi Thomas, all,
Quoted 10 lines · Baruch Siach
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/
Quoted 4 lines
Cc Gustavo Zacarias <[email protected]>Signed-off-by Baruch Siach <[email protected]>---
v2: patch to addHAVE_GETTEXTthat 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
Quoted 81 lines
--- ...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.patchpackage/whois/0001-Makefile-allow-build-without-gettext.patch new file +54
-0@@ -0,0 +1,54 @@ +From c75502b8b23a16704d02ae85fd325b181a8e909a Mon Sep 17 00:00:00 2001 +From: Baruch Siach <[email protected]> +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 <[email protected]> +--- +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 +package/whois/whois.mk +4
-0@@ -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
Signature · 3 lines
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 -PATCH v2 1/2 whois: fix build with NLS disabled
Hello,
Quoted 13 lines · Baruch Siach
Hi Thomas, all,
Quoted 10 lines · Baruch Siach
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/
Quoted 8 lines
Quoted 4 lines
Cc Gustavo Zacarias <[email protected]>Signed-off-by Baruch Siach <[email protected]>---
v2: patch to addHAVE_GETTEXTthat 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 2/2 whois: use github repo as home page
In reply to Baruch SiachThe github repo is more informative than the list Marco's software on the previous link.
--- package/whois/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/whois/Config.in +1 -1
@@ -4,4 +4,4 @@ config BR2_PACKAGE_WHOIS help Improved whois client. - http://www.linux.it/~md/software/ + https://github.com/rfc1036/whois
Signature · 1 line
2.14.1
Thomas Petazzoni
AppliedPATCH v2 2/2 whois: use github repo as home page
Hello,
Quoted 8 lines · Baruch Siach
The github repo is more informative than the list Marco's software on the previous link.
Cc Gustavo Zacarias <[email protected]>Signed-off-by Baruch Siach <[email protected]>--- package/whois/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com