Patchwork [2/2] dropwatch: link with libintl if present

login
register
mail settings
Submitter Gustavo Zacarias
Date July 31, 2013, 7:26 p.m.
Message ID <1375298801-18548-2-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/263796/
State Accepted
Headers show

Comments

Gustavo Zacarias - July 31, 2013, 7:26 p.m.
binutils libbfd links to libintl if present, so dropwatch needs it too.
Ugly hardcoded LDFLAGS, but then that's what the dropwatch Makefile
does. Fixes:
http://autobuild.buildroot.net/results/549/54917e7943143e47263b60b4eee3dfc6f0801407/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/dropwatch/dropwatch.mk | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

Patch

diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk
index 6c3dc75..09dff6b 100644
--- a/package/dropwatch/dropwatch.mk
+++ b/package/dropwatch/dropwatch.mk
@@ -11,20 +11,28 @@  DROPWATCH_DEPENDENCIES = binutils libnl readline host-pkgconf
 DROPWATCH_LICENSE = GPLv2
 DROPWATCH_LICENSE_FILES = COPYING
 
+# libbfd may be linked to libintl
+# Ugly... but LDFLAGS are hardcoded anyway
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+DROPWATCH_LDFLAGS = LDFLAGS="-lintl -lbfd -lreadline -lnl-3 -lnl-genl-3"
+endif
+
 define DROPWATCH_BUILD_CMDS
-  $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) build
+	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		$(DROPWATCH_LDFLAGS) build
 endef
 
 define DROPWATCH_CLEAN_CMDS
-  $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
+	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
 endef
 
 define DROPWATCH_INSTALL_TARGET_CMDS
-  $(INSTALL) -D -m 0755 $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin/dropwatch
+	$(INSTALL) -D -m 0755 $(@D)/src/dropwatch \
+		$(TARGET_DIR)/usr/bin/dropwatch
 endef
 
 define DROPWATCH_UNINSTALL_CMDS
-  rm -f $(TARGET_DIR)/usr/bin/dropwatch
+	rm -f $(TARGET_DIR)/usr/bin/dropwatch
 endef
 
 $(eval $(generic-package))