xref: /OK3568_Linux_fs/buildroot/package/libkrb5/libkrb5.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# libkrb5
4#
5################################################################################
6
7LIBKRB5_VERSION_MAJOR = 1.18
8LIBKRB5_VERSION = $(LIBKRB5_VERSION_MAJOR).4
9LIBKRB5_SITE = https://web.mit.edu/kerberos/dist/krb5/$(LIBKRB5_VERSION_MAJOR)
10LIBKRB5_SOURCE = krb5-$(LIBKRB5_VERSION).tar.gz
11LIBKRB5_SUBDIR = src
12LIBKRB5_LICENSE = MIT
13LIBKRB5_LICENSE_FILES = NOTICE
14LIBKRB5_CPE_ID_VENDOR = mit
15LIBKRB5_CPE_ID_PRODUCT = kerberos_5
16LIBKRB5_DEPENDENCIES = host-bison $(TARGET_NLS_DEPENDENCIES)
17LIBKRB5_INSTALL_STAGING = YES
18
19# 0001-Fix-KDC-null-deref-on-TGS-inner-body-null-server.patch
20LIBKRB5_IGNORE_CVES += CVE-2021-37750
21
22# The configure script uses AC_TRY_RUN tests to check for those values,
23# which doesn't work in a cross-compilation scenario. Therefore,
24# we feed the configure script with the correct answer for those tests
25LIBKRB5_CONF_ENV = \
26	ac_cv_printf_positional=yes \
27	ac_cv_func_regcomp=yes \
28	krb5_cv_attr_constructor_destructor=yes,yes \
29	LIBS=$(TARGET_NLS_LIBS)
30
31# Never use the host packages
32LIBKRB5_CONF_OPTS = \
33	--without-system-db \
34	--without-system-et \
35	--without-system-ss \
36	--without-system-verto \
37	--without-tcl \
38	--disable-rpath
39
40ifeq ($(BR2_PACKAGE_OPENLDAP),y)
41LIBKRB5_CONF_OPTS += --with-ldap
42LIBKRB5_DEPENDENCIES += openldap
43else
44LIBKRB5_CONF_OPTS += --without-ldap
45endif
46
47ifeq ($(BR2_PACKAGE_OPENSSL),y)
48LIBKRB5_CONF_OPTS += \
49	--enable-pkinit \
50	--with-crypto-impl=openssl \
51	--with-spake-openssl \
52	--with-tls-impl=openssl
53LIBKRB5_DEPENDENCIES += openssl
54else
55LIBKRB5_CONF_OPTS += \
56	--disable-pkinit \
57	--with-crypto-impl=builtin \
58	--without-spake-openssl \
59	--without-tls-impl
60endif
61
62ifeq ($(BR2_PACKAGE_LIBEDIT),y)
63LIBKRB5_CONF_OPTS += --with-libedit
64LIBKRB5_DEPENDENCIES += host-pkgconf libedit
65else
66LIBKRB5_CONF_OPTS += --without-libedit
67endif
68
69ifeq ($(BR2_PACKAGE_READLINE),y)
70LIBKRB5_CONF_OPTS += --with-readline
71LIBKRB5_DEPENDENCIES += readline
72else
73LIBKRB5_CONF_OPTS += --without-readline
74endif
75
76ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
77LIBKRB5_CONF_OPTS += --disable-thread-support
78endif
79
80$(eval $(autotools-package))
81