Patchwork [3,5/9] lshw: fix build with no LOCALE support

login
register
mail settings
Submitter Arnout Vandecappelle
Date Nov. 1, 2012, 2:36 p.m.
Message ID <20121101143600.8550.67194.stgit@localhost>
Download mbox | patch
Permalink /patch/196235/
State Accepted
Headers show

Comments

Arnout Vandecappelle - Nov. 1, 2012, 2:36 p.m.
From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

lshw doesn't need libintl if -DNONLS is defined.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/lshw/Config.in |    2 +-
 package/lshw/lshw.mk   |   12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
Thomas Petazzoni - July 31, 2013, 4:16 p.m.
Dear Arnout Vandecappelle \(Essensium/Mind\),

On Thu, 01 Nov 2012 15:36:00 +0100, Arnout Vandecappelle
\(Essensium/Mind\) wrote:
> From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
> lshw doesn't need libintl if -DNONLS is defined.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  package/lshw/Config.in |    2 +-
>  package/lshw/lshw.mk   |   12 +++++++++---
>  2 files changed, 10 insertions(+), 4 deletions(-)

I've applied the following patches of this series:

09704e7ee8a6e49d68359df7b4ebffb4d7819965 libsoup: Remove redundant dependency on gettext
de1932aaff2d0662b268a4ad71905f987155f0bf gdk-pixbuf: remove dependency on gettext
3cb28e173ca15a7ae9e7b741464f6e3e6936165f pulseaudio: remove dependency on gettext
0c2de8da28b859d0ace26743095fb73ae1a94940 avahi: remove double dependency on gettext
cdc2420b4c332a0d69b8198c756bb054386c912a lshw: fix build with no LOCALE support
da8860e4da533bbe3d684354b37174adb0e23b98 util-linux: only needs gettext if locale is selected

I think those ones were the remaining non-applied patches for this series.

Thanks!

Thomas
Arnout Vandecappelle - Aug. 11, 2013, 2:25 p.m.
On 31/07/13 18:16, Thomas Petazzoni wrote:
> Dear Arnout Vandecappelle \(Essensium/Mind\),
>
> On Thu, 01 Nov 2012 15:36:00 +0100, Arnout Vandecappelle
> \(Essensium/Mind\) wrote:
>> From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>>
>> lshw doesn't need libintl if -DNONLS is defined.
>>
>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>> ---
>>   package/lshw/Config.in |    2 +-
>>   package/lshw/lshw.mk   |   12 +++++++++---
>>   2 files changed, 10 insertions(+), 4 deletions(-)
>
> I've applied the following patches of this series:
>
> 09704e7ee8a6e49d68359df7b4ebffb4d7819965 libsoup: Remove redundant dependency on gettext
> de1932aaff2d0662b268a4ad71905f987155f0bf gdk-pixbuf: remove dependency on gettext
> 3cb28e173ca15a7ae9e7b741464f6e3e6936165f pulseaudio: remove dependency on gettext
> 0c2de8da28b859d0ace26743095fb73ae1a94940 avahi: remove double dependency on gettext
> cdc2420b4c332a0d69b8198c756bb054386c912a lshw: fix build with no LOCALE support
> da8860e4da533bbe3d684354b37174adb0e23b98 util-linux: only needs gettext if locale is selected
>
> I think those ones were the remaining non-applied patches for this series.

  Yep, looks complete to me.

  Regards,
  Arnout

Patch

diff --git a/package/lshw/Config.in b/package/lshw/Config.in
index 98beacd..afefa6c 100644
--- a/package/lshw/Config.in
+++ b/package/lshw/Config.in
@@ -3,7 +3,7 @@  config BR2_PACKAGE_LSHW
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  lshw (Hardware Lister) is a small tool to provide
 	  detailed information on the hardware configuration of the machine.
diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk
index 68daa0d..b3c2214 100644
--- a/package/lshw/lshw.mk
+++ b/package/lshw/lshw.mk
@@ -6,10 +6,16 @@ 
 
 LSHW_VERSION = B.02.16
 LSHW_SITE = http://ezix.org/software/files
+
+LSHW_CFLAGS = $(TARGET_CFLAGS)
+ifeq ($(BR2_ENABLE_LOCALE),)
+LSHW_CFLAGS += -DNONLS
+endif
+
 LSHW_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \
-	RPM_OPT_FLAGS="$(TARGET_CFLAGS)" all
-LSHW_MAKE_ENV = LIBS="$(if $(BR2_NEEDS_GETTEXT),-lintl)"
-LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext)
+	RPM_OPT_FLAGS="$(LSHW_CFLAGS)" all
+LSHW_MAKE_ENV = LIBS="$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
+LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 
 define LSHW_BUILD_CMDS
 	$(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPT)