0002-Makefile-allow-build-without-gettext.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From fe7d6c5a0e5dfe129f228498037393d23d6ae890 Mon Sep 17 00:00:00 2001
  2. From: Baruch Siach <baruch@tkos.co.il>
  3. Date: Tue, 18 Jul 2017 19:09:03 +0300
  4. Subject: [PATCH] Makefile: allow build without gettext
  5. The msgfmt command is part of the gettext package, and is used to generate
  6. binary translation files. When gettext is not installed, build fails.
  7. Translation files are not always needed on size constrained embedded targets.
  8. Add an option to disable translation files generation using the NO_GETTEXT
  9. variable.
  10. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  11. ---
  12. Upstream status: https://github.com/flok99/httping/pull/36
  13. Makefile | 4 ++++
  14. 1 file changed, 4 insertions(+)
  15. diff --git a/Makefile b/Makefile
  16. index 46127f4cdde1..160cc1794ec8 100644
  17. --- a/Makefile
  18. +++ b/Makefile
  19. @@ -55,7 +55,9 @@ MKDIR=/bin/mkdir
  20. ARCHIVE=/bin/tar cf -
  21. COMPRESS=/bin/gzip -9
  22. +ifneq ($(NO_GETTEXT),yes)
  23. TRANSLATIONS=nl.mo ru.mo
  24. +endif
  25. OBJS=gen.o http.o io.o error.o utils.o main.o tcp.o res.o socks5.o kalman.o cookies.o help.o colors.o
  26. @@ -118,10 +120,12 @@ install: $(TARGET) $(TRANSLATIONS)
  27. ifneq ($(DEBUG),yes)
  28. $(STRIP) $(DESTDIR)/$(BINDIR)/$(TARGET)
  29. endif
  30. +ifneq ($(NO_GETTEXT),yes)
  31. mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES
  32. cp nl.mo $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES/httping.mo
  33. mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES
  34. cp ru.mo $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES/httping.mo
  35. +endif
  36. makefile.inc:
  37. --
  38. 2.13.2