xref: /OK3568_Linux_fs/buildroot/package/httping/0002-Makefile-allow-build-without-gettext.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom fe7d6c5a0e5dfe129f228498037393d23d6ae890 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Baruch Siach <baruch@tkos.co.il>
3*4882a593SmuzhiyunDate: Tue, 18 Jul 2017 19:09:03 +0300
4*4882a593SmuzhiyunSubject: [PATCH] Makefile: allow build without gettext
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThe msgfmt command is part of the gettext package, and is used to generate
7*4882a593Smuzhiyunbinary translation files. When gettext is not installed, build fails.
8*4882a593SmuzhiyunTranslation files are not always needed on size constrained embedded targets.
9*4882a593SmuzhiyunAdd an option to disable translation files generation using the NO_GETTEXT
10*4882a593Smuzhiyunvariable.
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunSigned-off-by: Baruch Siach <baruch@tkos.co.il>
13*4882a593Smuzhiyun---
14*4882a593SmuzhiyunUpstream status: https://github.com/flok99/httping/pull/36
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun Makefile | 4 ++++
17*4882a593Smuzhiyun 1 file changed, 4 insertions(+)
18*4882a593Smuzhiyun
19*4882a593Smuzhiyundiff --git a/Makefile b/Makefile
20*4882a593Smuzhiyunindex 46127f4cdde1..160cc1794ec8 100644
21*4882a593Smuzhiyun--- a/Makefile
22*4882a593Smuzhiyun+++ b/Makefile
23*4882a593Smuzhiyun@@ -55,7 +55,9 @@ MKDIR=/bin/mkdir
24*4882a593Smuzhiyun ARCHIVE=/bin/tar cf -
25*4882a593Smuzhiyun COMPRESS=/bin/gzip -9
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun+ifneq ($(NO_GETTEXT),yes)
28*4882a593Smuzhiyun TRANSLATIONS=nl.mo ru.mo
29*4882a593Smuzhiyun+endif
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun 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
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun@@ -118,10 +120,12 @@ install: $(TARGET) $(TRANSLATIONS)
34*4882a593Smuzhiyun ifneq ($(DEBUG),yes)
35*4882a593Smuzhiyun 	$(STRIP) $(DESTDIR)/$(BINDIR)/$(TARGET)
36*4882a593Smuzhiyun endif
37*4882a593Smuzhiyun+ifneq ($(NO_GETTEXT),yes)
38*4882a593Smuzhiyun 	mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES
39*4882a593Smuzhiyun 	cp nl.mo $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES/httping.mo
40*4882a593Smuzhiyun 	mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES
41*4882a593Smuzhiyun 	cp ru.mo $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES/httping.mo
42*4882a593Smuzhiyun+endif
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun makefile.inc:
46*4882a593Smuzhiyun--
47*4882a593Smuzhiyun2.13.2
48*4882a593Smuzhiyun
49