Skip to contentSkip to conversation

host-gettext fixes

PATCH New Peter Korsgaard 2 participants 7 messages Jun 21, 2016 – Jun 28, 2016

lore
Share & tools
lore
#0 lore raw

cover host-gettext fixes

This series fixes/cleans up a number of minor issues with our host-gettext handling that I noticed while reviewing the libuio package.

--
Bye, Peter Korsgaard

#1 lore raw

PATCH 1/2 gettext: drop host-gettextize eye candy fixups

The real functional change (to not wait for confirmation) was alredy handled below in HOST_GETTEXT_GETTEXTIZE_CONFIRMATION, and we otherwise don't patch upstream purely for cosmetical reasons so drop it.

gettextize is also quite noisy as is, so the single 'Press return' line imho isn't a big issue:

Quoted 1 line
Quoted 1 line
Quoted 1 line

fetchmail 6.3.26 Gettextizing

Copying file config.rpath
Not copying intl/ directory.
Copying file po/Makefile.in.in
Copying file po/Makevars.template
Copying file po/Rules-quot
Copying file po/boldquot.sed
Copying file po/en at boldquot.header Copying file po/en at quot.header
Copying file po/insert-header.sin
Copying file po/quot.sed
Copying file po/remove-potcdate.sin Creating po/ChangeLog
Copying file m4/gettext.m4
Copying file m4/iconv.m4
Copying file m4/lib-ld.m4
Copying file m4/lib-link.m4
Copying file m4/lib-prefix.m4
Copying file m4/nls.m4
Copying file m4/po.m4
Copying file m4/progtest.m4
Creating m4/ChangeLog
Updating configure.ac (backup is in configure.ac~) Creating ChangeLog

Please update po/Makevars so that it defines all the variables mentioned in po/Makevars.template.
You can then remove po/Makevars.template.

Please run 'aclocal -I m4 -I m4-local' to regenerate the aclocal.m4 file. You need aclocal from GNU automake 1.9 (or newer) to do this. Then run 'autoconf' to regenerate the configure file.

You might also want to copy the convenience header file gettext.h
from the /home/peko/source/buildroot/output-test/host/usr/share/gettext directory into your package. It is a wrapper around <libintl.h> that implements the configure --disable-nls option.

Press Return to acknowledge the previous three paragraphs.

Quoted 1 line
Quoted 1 line
Quoted 1 line

fetchmail 6.3.26 Autoreconfiguring

---
 package/gettext/gettext.mk | 6 ------
 1 file changed, 6 deletions(-)
package/gettext/gettext.mk +0 -6
index 71fcb00..8cbb112 100644
@@ -60,12 +60,6 @@ endef
 
 GETTEXT_POST_INSTALL_TARGET_HOOKS += GETTEXT_REMOVE_UNNEEDED
 
-define GETTEXT_GETTEXTIZE_EYE_CANDY
-	$(SED) '/Press Return\|read dummy/d' $(HOST_DIR)/usr/bin/gettextize
-endef
-
-HOST_GETTEXT_POST_INSTALL_HOOKS += GETTEXT_GETTEXTIZE_EYE_CANDY
-
 # Force build with NLS support, otherwise libintl is not built
 # This is needed because some packages (eg. libglib2) requires
 # locales, but do not properly depend on BR2_ENABLE_LOCALE, and
Signature · 1 line
2.7.0
#3 lore raw

PATCH 2/2 gettext: install ABOUT-NLS for the host

In reply to Peter Korsgaard

gettextize copies a number of files from usr/share/gettext into the project when it is run. One of these is ABOUT-NLS, which is simply a text file explaining some details about gettext - So it isn't really critical but autoreconf fails if gettext functionality is used and ABOUT-NLS is missing.

Normally this isn't an issue as the release tarball typically already contains an ABOUT-NLS file, but as this is a generated file it normally isn't checked into git so it fails for packages from git snapshots using <foo>_GETTEXTIZE = YES (E.G. libuio):

configure.ac:42: error: required file './ABOUT-NLS' not found

As is evident from GETTEXT_REMOVE_UNNEEDED, this file normally gets installed by gettext-runtime, but as we don't build/install that for the host instead install it by hand.

---
 package/gettext/gettext.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/gettext/gettext.mk +10 -0
index 8cbb112..1435388 100644
@@ -75,6 +75,16 @@ define HOST_GETTEXT_GETTEXTIZE_CONFIRMATION
 endef
 HOST_GETTEXT_POST_INSTALL_HOOKS += HOST_GETTEXT_GETTEXTIZE_CONFIRMATION
 
+# autoreconf expects gettextize to install ABOUT-NLS, but it only gets
+# installed by gettext-runtime which we don't build/install for the
+# host, so do it manually
+define HOST_GETTEXT_ADD_ABOUT_NLS
+	$(INSTALL) -m 0644 $(@D)/$(HOST_GETTEXT_SUBDIR)/ABOUT-NLS \
+		$(HOST_DIR)/usr/share/gettext/ABOUT-NLS
+endef
+
+HOST_GETTEXT_POST_INSTALL_HOOKS += HOST_GETTEXT_ADD_ABOUT_NLS
+
 GETTEXTIZE = $(HOST_CONFIGURE_OPTS) AUTOM4TE=$(HOST_DIR)/usr/bin/autom4te $(HOST_DIR)/usr/bin/gettextize -f
 
 $(eval $(autotools-package))
Signature · 1 line
2.7.0
#4 lore raw

PATCH 2/2 gettext: install ABOUT-NLS for the host

Hello Peter,

Will this patch fix the libuio <foo>_AUTORECONF=YES issue?

regards
Joris

Quoted 42 lines · Peter Korsgaard

gettextize copies a number of files from usr/share/gettext into the project when it is run. One of these is ABOUT-NLS, which is simply a text file explaining some details about gettext - So it isn't really critical but autoreconf fails if gettext functionality is used and ABOUT-NLS is missing.

Normally this isn't an issue as the release tarball typically already contains an ABOUT-NLS file, but as this is a generated file it normally isn't checked into git so it fails for packages from git snapshots using <foo>_GETTEXTIZE = YES (E.G. libuio):

configure.ac:42: error: required file './ABOUT-NLS' not found

As is evident from GETTEXT_REMOVE_UNNEEDED, this file normally gets installed by gettext-runtime, but as we don't build/install that for the host instead install it by hand.

---
 package/gettext/gettext.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/gettext/gettext.mk +10 -0
index 8cbb112..1435388 100644
@@ -75,6 +75,16 @@ define HOST_GETTEXT_GETTEXTIZE_CONFIRMATION
 endef
 HOST_GETTEXT_POST_INSTALL_HOOKS += HOST_GETTEXT_GETTEXTIZE_CONFIRMATION
 
+# autoreconf expects gettextize to install ABOUT-NLS, but it only gets
+# installed by gettext-runtime which we don't build/install for the
+# host, so do it manually
+define HOST_GETTEXT_ADD_ABOUT_NLS
+       $(INSTALL) -m 0644 $(@D)/$(HOST_GETTEXT_SUBDIR)/ABOUT-NLS \
+               $(HOST_DIR)/usr/share/gettext/ABOUT-NLS
+endef
+
+HOST_GETTEXT_POST_INSTALL_HOOKS += HOST_GETTEXT_ADD_ABOUT_NLS
+
 GETTEXTIZE = $(HOST_CONFIGURE_OPTS) AUTOM4TE=$(HOST_DIR)/usr/bin/autom4te

$(HOST_DIR)/usr/bin/gettextize -f

Quoted 9 lines

$(eval $(autotools-package))
--
2.7.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160621/a2155f22/attachment.html>

#5 lore raw

PATCH 2/2 gettext: install ABOUT-NLS for the host

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joris" == Joris Lijssens <[email protected]> writes:

Hello Peter,
Will this patch fix the libuio <foo>_AUTORECONF=YES issue?

Yes (almost). There's still a minor problem in configure.ac, but I'll reply to the patch with details later today.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#2 lore raw

PATCH 1/2 gettext: drop host-gettextize eye candy fixups

In reply to Peter Korsgaard
Quoted 47 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

The real functional change (to not wait for confirmation) was alredy handled below in HOST_GETTEXT_GETTEXTIZE_CONFIRMATION, and we otherwise don't patch upstream purely for cosmetical reasons so drop it.

gettextize is also quite noisy as is, so the single 'Press return' line imho isn't a big issue:

Quoted 1 line
Quoted 1 line
Quoted 1 line

fetchmail 6.3.26 Gettextizing

Copying file config.rpath
Not copying intl/ directory.
Copying file po/Makefile.in.in
Copying file po/Makevars.template
Copying file po/Rules-quot
Copying file po/boldquot.sed
Copying file po/en at boldquot.header Copying file po/en at quot.header
Copying file po/insert-header.sin
Copying file po/quot.sed
Copying file po/remove-potcdate.sin Creating po/ChangeLog
Copying file m4/gettext.m4
Copying file m4/iconv.m4
Copying file m4/lib-ld.m4
Copying file m4/lib-link.m4
Copying file m4/lib-prefix.m4
Copying file m4/nls.m4
Copying file m4/po.m4
Copying file m4/progtest.m4
Creating m4/ChangeLog
Updating configure.ac (backup is in configure.ac~) Creating ChangeLog

Please update po/Makevars so that it defines all the variables mentioned in po/Makevars.template.
You can then remove po/Makevars.template.

Please run 'aclocal -I m4 -I m4-local' to regenerate the aclocal.m4 file. You need aclocal from GNU automake 1.9 (or newer) to do this. Then run 'autoconf' to regenerate the configure file.

You might also want to copy the convenience header file gettext.h
from the /home/peko/source/buildroot/output-test/host/usr/share/gettext directory into your package. It is a wrapper around <libintl.h> that implements the configure --disable-nls option.

Quoted 5 lines

Press Return to acknowledge the previous three paragraphs.

Quoted 1 line
Quoted 1 line
Quoted 1 line

fetchmail 6.3.26 Autoreconfiguring

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#6 lore raw

PATCH 2/2 gettext: install ABOUT-NLS for the host

In reply to Peter Korsgaard
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

gettextize copies a number of files from usr/share/gettext into the project when it is run. One of these is ABOUT-NLS, which is simply a text file explaining some details about gettext - So it isn't really critical but autoreconf fails if gettext functionality is used and ABOUT-NLS is missing.

Normally this isn't an issue as the release tarball typically already contains an ABOUT-NLS file, but as this is a generated file it normally isn't checked into git so it fails for packages from git snapshots using <foo>_GETTEXTIZE = YES (E.G. libuio):

Quoted 7 lines

configure.ac:42: error: required file './ABOUT-NLS' not found

As is evident from GETTEXT_REMOVE_UNNEEDED, this file normally gets installed by gettext-runtime, but as we don't build/install that for the host instead install it by hand.

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard