mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
mariadb: fix floating dependency on krb5
Mariadb depends on openssl, openssl conditionally depends on krb5 by checking if OPENSSL_NO_KRB5 is defined, but cmake can not handle "ifndef" and always ask krb5.h if krb5.h exist when cmake make_depend; Faking a kssl.h if krb5 is not in PACKAGECONF, which does not include krb5 related declaration, install the faked kssl.h into build dir to be searched firstly Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
@@ -43,6 +43,7 @@ PACKAGECONFIG_class-native = ""
|
||||
PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
|
||||
PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITHOUT_VALGRIND=TRUE,valgrind"
|
||||
PACKAGECONFIG[libedit] = "-DLIBEDIT_INTERFACE=TRUE,-DLIBEDIT_INTERFACE=FALSE,libedit"
|
||||
PACKAGECONFIG[krb5] = ", ,krb5"
|
||||
|
||||
# MariaDB doesn't link properly with gold
|
||||
# https://mariadb.atlassian.net/browse/MDEV-5982
|
||||
@@ -85,6 +86,14 @@ do_compile_prepend_class-target () {
|
||||
# and since we're cross-compiling that is disabled
|
||||
cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra
|
||||
cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts
|
||||
|
||||
if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then
|
||||
mkdir ${B}/include/openssl
|
||||
echo "#ifndef KSSL_H" >${B}/include/openssl/kssl.h
|
||||
echo "#define KSSL_H" >>${B}/include/openssl/kssl.h
|
||||
echo "#include <openssl/opensslconf.h>">>${B}/include/openssl/kssl.h
|
||||
echo "#endif" >>${B}/include/openssl/kssl.h
|
||||
fi
|
||||
}
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
|
||||
|
||||
Reference in New Issue
Block a user