[oe-commits] Roy Li : mariadb: fix floating dependency on krb5
git at git.openembedded.org
git at git.openembedded.org
Wed Jun 17 20:36:16 UTC 2015
Module: meta-openembedded.git
Branch: master
Commit: c099952f144e1303cd59455635c257ee8c9c8293
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=c099952f144e1303cd59455635c257ee8c9c8293
Author: Roy Li <rongqing.li at windriver.com>
Date: Fri Jun 12 08:59:25 2015 +0800
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 at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.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 e7e2805..955402a 100644
--- a/meta-oe/recipes-support/mysql/mariadb.inc
+++ b/meta-oe/recipes-support/mysql/mariadb.inc
@@ -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"
More information about the Openembedded-commits
mailing list