slang2: Avoid building dependencies unless necessary
This also hides the module packages in menuconfig unless the libslang2 package is selected. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
parent
86522d77f1
commit
03ef02f0f4
|
@ -23,7 +23,12 @@ PKG_LICENSE_FILES:=COPYING
|
||||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=0
|
PKG_BUILD_PARALLEL:=0
|
||||||
PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
CONFIG_BUILD_NLS \
|
||||||
|
CONFIG_PACKAGE_libslang2-mod-onig \
|
||||||
|
CONFIG_PACKAGE_libslang2-mod-pcre \
|
||||||
|
CONFIG_PACKAGE_libslang2-mod-png \
|
||||||
|
CONFIG_PACKAGE_libslang2-mod-zlib
|
||||||
|
|
||||||
SLANG_MODULES:= base64 chksum csv fcntl fork histogram iconv json onig pcre \
|
SLANG_MODULES:= base64 chksum csv fcntl fork histogram iconv json onig pcre \
|
||||||
png rand select slsmg socket stats sysconf termios varray zlib
|
png rand select slsmg socket stats sysconf termios varray zlib
|
||||||
|
@ -39,9 +44,10 @@ define Package/libslang2/Default
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2/Default/description
|
define Package/libslang2/Default/description
|
||||||
Multi-platform programmer's library providing facilities for interactive
|
Multi-platform programmer's library providing facilities for interactive
|
||||||
applications. Includes such things as display/screen management,
|
applications. Includes such things as display/screen management,
|
||||||
keyboard input, keymaps, etc. Includes the embeddable S-Lang interpreter.
|
keyboard input, keymaps, etc. Includes the embeddable S-Lang
|
||||||
|
interpreter.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2
|
define Package/libslang2
|
||||||
|
@ -56,43 +62,48 @@ endef
|
||||||
define Package/libslang2-modules
|
define Package/libslang2-modules
|
||||||
$(call Package/libslang2/Default)
|
$(call Package/libslang2/Default)
|
||||||
TITLE+= (all modules)
|
TITLE+= (all modules)
|
||||||
DEPENDS:=$(foreach mod,$(SLANG_MODULES),+libslang2-mod-$(mod))
|
DEPENDS:=@PACKAGE_libslang2 $(foreach mod,$(SLANG_MODULES),+libslang2-mod-$(mod))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2-modules/description
|
define Package/libslang2-modules/description
|
||||||
$(call Package/libslang2/Default/description)
|
$(call Package/libslang2/Default/description)
|
||||||
|
|
||||||
This installs all of S-Lang's bundled modules.
|
This package installs all of S-Lang's bundled modules.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libslang2-mod/Default
|
||||||
|
$(call Package/libslang2/Default)
|
||||||
|
DEPENDS:=@PACKAGE_libslang2
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2-mod-iconv
|
define Package/libslang2-mod-iconv
|
||||||
$(call Package/libslang2/Default)
|
$(call Package/libslang2-mod/Default)
|
||||||
TITLE+= (iconv module)
|
TITLE+= (iconv module)
|
||||||
DEPENDS:=$(ICONV_DEPENDS)
|
DEPENDS+=$(ICONV_DEPENDS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2-mod-onig
|
define Package/libslang2-mod-onig
|
||||||
$(call Package/libslang2/Default)
|
$(call Package/libslang2-mod/Default)
|
||||||
TITLE+= (onig module)
|
TITLE+= (onig module)
|
||||||
DEPENDS:=+oniguruma
|
DEPENDS+=+PACKAGE_libslang2-mod-onig:oniguruma
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2-mod-pcre
|
define Package/libslang2-mod-pcre
|
||||||
$(call Package/libslang2/Default)
|
$(call Package/libslang2-mod/Default)
|
||||||
TITLE+= (pcre module)
|
TITLE+= (pcre module)
|
||||||
DEPENDS:=+libpcre
|
DEPENDS+=+PACKAGE_libslang2-mod-pcre:libpcre
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2-mod-png
|
define Package/libslang2-mod-png
|
||||||
$(call Package/libslang2/Default)
|
$(call Package/libslang2-mod/Default)
|
||||||
TITLE+= (png module)
|
TITLE+= (png module)
|
||||||
DEPENDS:=+libpng
|
DEPENDS+=+PACKAGE_libslang2-mod-png:libpng
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2-mod-zlib
|
define Package/libslang2-mod-zlib
|
||||||
$(call Package/libslang2/Default)
|
$(call Package/libslang2-mod/Default)
|
||||||
TITLE+= (zlib module)
|
TITLE+= (zlib module)
|
||||||
DEPENDS:=+zlib
|
DEPENDS+=+PACKAGE_libslang2-mod-zlib:zlib
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/slsh
|
define Package/slsh
|
||||||
|
@ -104,8 +115,8 @@ define Package/slsh
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/slsh/description
|
define Package/slsh/description
|
||||||
This is a shell which is mostly just a wrapper around the S-Lang Interpreter,
|
This is a shell which is mostly just a wrapper around the S-Lang
|
||||||
which is part of the S-Lang Library.
|
Interpreter, which is part of the S-Lang Library.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
TARGET_CFLAGS+= $(FPIC)
|
TARGET_CFLAGS+= $(FPIC)
|
||||||
|
@ -113,14 +124,14 @@ TARGET_CFLAGS+= $(FPIC)
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
--enable-largefile \
|
--enable-largefile \
|
||||||
--enable-warnings \
|
--enable-warnings \
|
||||||
--with-terminfo=default \
|
|
||||||
--with-readline=slang \
|
--with-readline=slang \
|
||||||
$(if $(CONFIG_BUILD_NLS),--with-iconv=$(ICONV_PREFIX)) \
|
--with-terminfo=default \
|
||||||
--with-onig="$(STAGING_DIR)/usr" \
|
--without-x \
|
||||||
--with-pcre="$(STAGING_DIR)/usr" \
|
$(if $(CONFIG_BUILD_NLS),--with-iconv="$(ICONV_PREFIX)",--without-iconv) \
|
||||||
--with-png="$(STAGING_DIR)/usr" \
|
$(if $(CONFIG_PACKAGE_libslang2-mod-onig),--with-onig="$(STAGING_DIR)/usr",--without-onig) \
|
||||||
--with-z="$(STAGING_DIR)/usr" \
|
$(if $(CONFIG_PACKAGE_libslang2-mod-pcre),--with-pcre="$(STAGING_DIR)/usr",--without-pcre) \
|
||||||
--without-x
|
$(if $(CONFIG_PACKAGE_libslang2-mod-png),--with-png="$(STAGING_DIR)/usr",--without-png) \
|
||||||
|
$(if $(CONFIG_PACKAGE_libslang2-mod-zlib),--with-z="$(STAGING_DIR)/usr",--without-z)
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call Build/Compile/Default,)
|
$(call Build/Compile/Default,)
|
||||||
|
@ -165,15 +176,15 @@ endef
|
||||||
define BuildModule
|
define BuildModule
|
||||||
ifndef Package/libslang2-mod-$(1)
|
ifndef Package/libslang2-mod-$(1)
|
||||||
define Package/libslang2-mod-$(1)
|
define Package/libslang2-mod-$(1)
|
||||||
$$(call Package/libslang2/Default)
|
$$(call Package/libslang2-mod/Default)
|
||||||
TITLE+= ($(1) module)
|
TITLE+= ($(1) module)
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define Package/libslang2-mod-$(1)/description
|
define Package/libslang2-mod-$(1)/description
|
||||||
$$(call Package/libslang2/Default/description)
|
$$(call Package/libslang2/Default/description)
|
||||||
|
|
||||||
This contains the $(1) module.
|
This package contains the $(1) module.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libslang2-mod-$(1)/install
|
define Package/libslang2-mod-$(1)/install
|
||||||
|
|
Loading…
Reference in New Issue