2021-04-12 18:40:10 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# libtalloc
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2024-02-07 12:24:34 +01:00
|
|
|
LIBTALLOC_VERSION = 2.4.2
|
2021-04-12 18:40:10 +02:00
|
|
|
LIBTALLOC_SOURCE = talloc-$(LIBTALLOC_VERSION).tar.gz
|
|
|
|
LIBTALLOC_SITE = https://www.samba.org/ftp/talloc
|
2021-09-09 10:02:21 +02:00
|
|
|
LIBTALLOC_LICENSE = LGPL-3.0+
|
|
|
|
LIBTALLOC_LICENSE_FILES = talloc.h
|
2021-04-12 18:40:10 +02:00
|
|
|
LIBTALLOC_INSTALL_STAGING = YES
|
|
|
|
|
2022-07-24 16:26:15 +02:00
|
|
|
# libtalloc is extracted from the samba source tree, and that has a workaround
|
|
|
|
# that requires PYTHONHASHSEED to be set, and to be set to 1.
|
|
|
|
# See https://gitlab.com/samba-team/samba/-/commit/420bbb1d92fd2a28725b53f425ba3d214831b660
|
|
|
|
LIBTALLOC_CONF_ENV = PYTHONHASHSEED=1
|
|
|
|
LIBTALLOC_MAKE_ENV = PYTHONHASHSEED=1
|
|
|
|
|
2021-04-12 18:40:10 +02:00
|
|
|
# --with-libiconv= is unconditionally passed, even if libiconv is not
|
|
|
|
# present. Indeed, waf will search for libiconv by default in
|
|
|
|
# /usr/local. Because of a bug in some waf python script, /usr/local
|
|
|
|
# is then used in many subsequent and unrelated checks, which
|
|
|
|
# ultimately causes a failure when BR2_COMPILER_PARANOID_UNSAFE_PATH
|
|
|
|
# is set. However no need to set libiconv as a dependency of
|
|
|
|
# libtalloc since it's optional.
|
|
|
|
LIBTALLOC_CONF_OPTS += --cross-compile \
|
|
|
|
--cross-answers=$(@D)/cache.txt \
|
2022-06-13 22:17:58 +02:00
|
|
|
--disable-stack-protector \
|
2021-04-12 18:40:10 +02:00
|
|
|
--hostcc=gcc \
|
|
|
|
--with-libiconv=$(STAGING_DIR)/usr
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
|
|
|
LIBTALLOC_DEPENDENCIES += libtirpc host-pkgconf
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
|
|
|
LIBTALLOC_DEPENDENCIES += host-python3 python3
|
|
|
|
LIBTALLOC_CONF_ENV += \
|
|
|
|
PYTHON="$(HOST_DIR)/bin/python3" \
|
|
|
|
PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config"
|
|
|
|
# There isn't any --enable-python configuration option
|
|
|
|
else
|
|
|
|
LIBTALLOC_CONF_OPTS += --disable-python
|
|
|
|
endif
|
|
|
|
|
|
|
|
LIBTALLOC_WAF = ./buildtools/bin/waf
|
|
|
|
|
|
|
|
# like samba4, libtalloc uses the waf build system which requires a
|
|
|
|
# proper answers file to configure package before build
|
|
|
|
define LIBTALLOC_POPULATE_WAF_CACHE
|
|
|
|
$(INSTALL) -m 0644 package/libtalloc/libtalloc-cache.txt $(@D)/cache.txt
|
|
|
|
echo 'Checking uname machine type: $(BR2_ARCH)' >> $(@D)/cache.txt
|
|
|
|
endef
|
|
|
|
|
|
|
|
LIBTALLOC_PRE_CONFIGURE_HOOKS += LIBTALLOC_POPULATE_WAF_CACHE
|
|
|
|
|
|
|
|
$(eval $(waf-package))
|