0001-Support-POTFILES-shell.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From d5bbd8f60aacb0f73ea5a0bde999152c467d0e78 Mon Sep 17 00:00:00 2001
  2. From: Colin Watson <cjwatson@debian.org>
  3. Date: Sun, 1 Mar 2020 11:57:58 +0000
  4. Subject: [PATCH 1/4] Support POTFILES-shell
  5. ---
  6. gettext-runtime/po/Makefile.in.in | 24 ++++++++++++++++++++++--
  7. 1 file changed, 22 insertions(+), 2 deletions(-)
  8. diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in
  9. index fabdc76c9..32e9323d3 100644
  10. --- a/gettext-runtime/po/Makefile.in.in
  11. +++ b/gettext-runtime/po/Makefile.in.in
  12. @@ -142,7 +142,7 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
  13. # The determination of whether the package xyz is a GNU one is based on the
  14. # heuristic whether some file in the top level directory mentions "GNU xyz".
  15. # If GNU 'find' is available, we avoid grepping through monster files.
  16. -$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
  17. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in $(srcdir)/POTFILES-shell.in remove-potcdate.sed
  18. if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
  19. LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
  20. else \
  21. @@ -175,7 +175,27 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
  22. --package-version='@VERSION@' \
  23. --msgid-bugs-address="$$msgid_bugs_address" \
  24. ;; \
  25. - esac
  26. + esac; \
  27. + case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
  28. + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
  29. + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
  30. + --add-comments=TRANSLATORS: @XGETTEXT_EXTRA_OPTIONS@ \
  31. + --files-from=$(srcdir)/POTFILES-shell.in \
  32. + --copyright-holder='$(COPYRIGHT_HOLDER)' \
  33. + --msgid-bugs-address="$$msgid_bugs_address" \
  34. + --join-existing --language=Shell --keyword=gettext_quoted \
  35. + ;; \
  36. + *) \
  37. + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
  38. + --add-comments=TRANSLATORS: @XGETTEXT_EXTRA_OPTIONS@ \
  39. + --files-from=$(srcdir)/POTFILES-shell.in \
  40. + --copyright-holder='$(COPYRIGHT_HOLDER)' \
  41. + --package-name="$${package_gnu}@PACKAGE@" \
  42. + --package-version='@VERSION@' \
  43. + --msgid-bugs-address="$$msgid_bugs_address" \
  44. + --join-existing --language=Shell --keyword=gettext_quoted \
  45. + ;; \
  46. + esac; \
  47. test ! -f $(DOMAIN).po || { \
  48. if test -f $(srcdir)/$(DOMAIN).pot; then \
  49. sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
  50. --
  51. 2.17.1