lshw: fix build with no LOCALE support
authorArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thu, 1 Nov 2012 14:36:00 +0000 (15:36 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 30 Jul 2013 21:36:39 +0000 (23:36 +0200)
lshw doesn't need libintl if -DNONLS is defined.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/lshw/Config.in
package/lshw/lshw.mk

index 98beacd797dd5b69b6dc53149c568c6a00f94894..afefa6c46723d55340be9a1c53e98f40ede6f4f1 100644 (file)
@@ -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.
index 71f52a58122ec8ca64836fb2f66b1bed63a2d6d6..cc003473ea236fb0e265f3f4616fd622003158b3 100644 (file)
@@ -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)