1*4882a593Smuzhiyun################################################################################ 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# libtalloc 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun################################################################################ 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunLIBTALLOC_VERSION = 2.3.3 8*4882a593SmuzhiyunLIBTALLOC_SOURCE = talloc-$(LIBTALLOC_VERSION).tar.gz 9*4882a593SmuzhiyunLIBTALLOC_SITE = https://www.samba.org/ftp/talloc 10*4882a593SmuzhiyunLIBTALLOC_LICENSE = LGPL-3.0+ 11*4882a593SmuzhiyunLIBTALLOC_LICENSE_FILES = talloc.h 12*4882a593SmuzhiyunLIBTALLOC_INSTALL_STAGING = YES 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun# --with-libiconv= is unconditionally passed, even if libiconv is not 15*4882a593Smuzhiyun# present. Indeed, waf will search for libiconv by default in 16*4882a593Smuzhiyun# /usr/local. Because of a bug in some waf python script, /usr/local 17*4882a593Smuzhiyun# is then used in many subsequent and unrelated checks, which 18*4882a593Smuzhiyun# ultimately causes a failure when BR2_COMPILER_PARANOID_UNSAFE_PATH 19*4882a593Smuzhiyun# is set. However no need to set libiconv as a dependency of 20*4882a593Smuzhiyun# libtalloc since it's optional. 21*4882a593SmuzhiyunLIBTALLOC_CONF_OPTS += --cross-compile \ 22*4882a593Smuzhiyun --cross-answers=$(@D)/cache.txt \ 23*4882a593Smuzhiyun --hostcc=gcc \ 24*4882a593Smuzhiyun --with-libiconv=$(STAGING_DIR)/usr 25*4882a593Smuzhiyun 26*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBTIRPC),y) 27*4882a593SmuzhiyunLIBTALLOC_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc` 28*4882a593SmuzhiyunLIBTALLOC_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc` 29*4882a593SmuzhiyunLIBTALLOC_DEPENDENCIES += libtirpc host-pkgconf 30*4882a593Smuzhiyunendif 31*4882a593Smuzhiyun 32*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_PYTHON3),y) 33*4882a593SmuzhiyunLIBTALLOC_DEPENDENCIES += host-python3 python3 34*4882a593SmuzhiyunLIBTALLOC_CONF_ENV += \ 35*4882a593Smuzhiyun PYTHON="$(HOST_DIR)/bin/python3" \ 36*4882a593Smuzhiyun PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" 37*4882a593Smuzhiyun# There isn't any --enable-python configuration option 38*4882a593Smuzhiyunelse 39*4882a593SmuzhiyunLIBTALLOC_CONF_OPTS += --disable-python 40*4882a593Smuzhiyunendif 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunLIBTALLOC_WAF = ./buildtools/bin/waf 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun# like samba4, libtalloc uses the waf build system which requires a 45*4882a593Smuzhiyun# proper answers file to configure package before build 46*4882a593Smuzhiyundefine LIBTALLOC_POPULATE_WAF_CACHE 47*4882a593Smuzhiyun $(INSTALL) -m 0644 package/libtalloc/libtalloc-cache.txt $(@D)/cache.txt 48*4882a593Smuzhiyun echo 'Checking uname machine type: $(BR2_ARCH)' >> $(@D)/cache.txt 49*4882a593Smuzhiyunendef 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunLIBTALLOC_PRE_CONFIGURE_HOOKS += LIBTALLOC_POPULATE_WAF_CACHE 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun$(eval $(waf-package)) 54