xref: /OK3568_Linux_fs/buildroot/package/slang/slang.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# slang
4#
5################################################################################
6
7SLANG_VERSION = 2.3.2
8SLANG_SOURCE = slang-$(SLANG_VERSION).tar.bz2
9SLANG_SITE = http://www.jedsoft.org/releases/slang
10SLANG_LICENSE = GPL-2.0+
11SLANG_LICENSE_FILES = COPYING
12SLANG_INSTALL_STAGING = YES
13SLANG_CONF_OPTS = --with-onig=no
14SLANG_MAKE = $(MAKE1)
15
16# Racy and we don't have/do libtermcap
17define SLANG_DISABLE_TERMCAP
18	$(SED) '/^TERMCAP=/s:=.*:=:' $(@D)/configure
19endef
20SLANG_POST_PATCH_HOOKS += SLANG_DISABLE_TERMCAP
21
22# Absolute path hell, sigh...
23ifeq ($(BR2_PACKAGE_LIBPNG),y)
24SLANG_CONF_OPTS += --with-png=$(STAGING_DIR)/usr
25SLANG_DEPENDENCIES += libpng
26else
27SLANG_CONF_OPTS += --with-png=no
28endif
29ifeq ($(BR2_PACKAGE_PCRE),y)
30SLANG_CONF_OPTS += --with-pcre=$(STAGING_DIR)/usr
31SLANG_DEPENDENCIES += pcre
32else
33SLANG_CONF_OPTS += --with-pcre=no
34endif
35ifeq ($(BR2_PACKAGE_ZLIB),y)
36SLANG_CONF_OPTS += --with-z=$(STAGING_DIR)/usr
37SLANG_DEPENDENCIES += zlib
38else
39SLANG_CONF_OPTS += --with-z=no
40endif
41
42ifeq ($(BR2_PACKAGE_NCURSES),y)
43SLANG_DEPENDENCIES += ncurses
44SLANG_CONF_ENV += ac_cv_path_nc5config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
45else
46SLANG_CONF_OPTS += ac_cv_path_nc5config=no
47endif
48
49ifeq ($(BR2_PACKAGE_READLINE),y)
50SLANG_CONF_OPTS += --with-readline=gnu
51SLANG_DEPENDENCIES += readline
52ifeq ($(BR2_STATIC_LIBS),y)
53SLANG_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) --libs`"
54endif
55endif
56
57ifeq ($(BR2_STATIC_LIBS),y)
58SLANG_MAKE_OPTS = static
59SLANG_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-static
60SLANG_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-static
61endif
62
63$(eval $(autotools-package))
64