package/patch: add optional support for attr
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 21 Feb 2016 09:50:05 +0000 (10:50 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 21 Feb 2016 11:29:49 +0000 (12:29 +0100)
When attr was compiled before, patch will use it as optional dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/bin/patch | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libattr.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.1]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/patch/patch.mk

index 765dfa923bcb0eb17e0939c91563dfba8c671e4e..3a942524f0ed64cc385320c8464406f7d9302319 100644 (file)
@@ -10,4 +10,11 @@ PATCH_SITE = $(BR2_GNU_MIRROR)/patch
 PATCH_LICENSE = GPLv3+
 PATCH_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_ATTR),y)
+PATCH_CONF_OPTS += --enable-attr
+PATCH_DEPENDENCIES += attr
+else
+PATCH_CONF_OPTS += --disable-attr
+endif
+
 $(eval $(autotools-package))