[oe] [PATCH][mete-oe] mariadb: fix floating dependency on krb5
rongqing.li at windriver.com
rongqing.li at windriver.com
Fri Jun 12 00:59:25 UTC 2015
From: Roy Li <rongqing.li at windriver.com>
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 at windriver.com>
---
meta-oe/recipes-support/mysql/mariadb.inc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta-oe/recipes-support/mysql/mariadb.inc b/meta-oe/recipes-support/mysql/mariadb.inc
index 00fa965..ddc0644 100644
--- a/meta-oe/recipes-support/mysql/mariadb.inc
+++ b/meta-oe/recipes-support/mysql/mariadb.inc
@@ -42,6 +42,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
@@ -84,6 +85,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"
--
1.9.1
More information about the Openembedded-devel
mailing list