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

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/bin/zsh | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libgdbm.so.4]
[...]

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

index 03456b886d24c5b25bf35ed63eb6d9abf8508d79..c3af03410183862a599da25746382788d32d127a 100644 (file)
@@ -12,6 +12,13 @@ ZSH_CONF_OPTS = --bindir=/bin
 ZSH_LICENSE = MIT-like
 ZSH_LICENSE_FILES = LICENCE
 
+ifeq ($(BR2_PACKAGE_GDBM),y)
+ZSH_CONF_OPTS += --enable-gdbm
+ZSH_DEPENDENCIES += gdbm
+else
+ZSH_CONF_OPTS += --disable-gdbm
+endif
+
 # Remove versioned zsh-x.y.z binary taking up space
 define ZSH_TARGET_INSTALL_FIXUPS
        rm -f $(TARGET_DIR)/bin/zsh-$(ZSH_VERSION)