nano: fix build breakage with libmagic
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Thu, 14 Nov 2013 16:54:42 +0000 (13:54 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 14 Nov 2013 19:46:26 +0000 (20:46 +0100)
As reported by Cassiano Martin in bug #6692 if host == target the nano
package can pick up the host libmagic and break.
So add a check to see if the file package is enabled and use it,
otherwise just disable libmagic support.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/nano/nano.mk

index 3707e7753d69b7aca7bf8da31f6432619fc95a70..4609f723cc3f8ede05fbe1aa3c6ea02818cf44d4 100644 (file)
@@ -13,6 +13,12 @@ NANO_CONF_OPT = --without-slang
 NANO_CONF_ENV = ac_cv_prog_NCURSESW_CONFIG=false
 NANO_DEPENDENCIES = ncurses
 
+ifeq ($(BR2_PACKAGE_FILE),y)
+       NANO_DEPENDENCIES += file
+else
+       NANO_CONF_ENV += ac_cv_lib_magic_magic_open=no
+endif
+
 ifeq ($(BR2_PACKAGE_NANO_TINY),y)
        NANO_CONF_OPT += --enable-tiny
 endif