[yocto] [meta-cgl][PATCH 8/9] pacemaker: fix building with xml-config now being disabled
Dmitry Eremin-Solenikov
dmitry_eremin at mentor.com
Fri Apr 24 13:29:30 PDT 2015
OE-Core now forbids using of xml-config, thus pacemaker is now broken.
Rewrite configure.ac to use pkg-config instead of xml-config.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin at mentor.com>
---
.../pacemaker-fix-xml-config.patch | 53 ++++++++++++++++++++++
.../recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb | 3 +-
2 files changed, 55 insertions(+), 1 deletion(-)
create mode 100644 meta-cgl-common/recipes-cgl/pacemaker/pacemaker-1.0.9.1/pacemaker-fix-xml-config.patch
diff --git a/meta-cgl-common/recipes-cgl/pacemaker/pacemaker-1.0.9.1/pacemaker-fix-xml-config.patch b/meta-cgl-common/recipes-cgl/pacemaker/pacemaker-1.0.9.1/pacemaker-fix-xml-config.patch
new file mode 100644
index 0000000..553c3f3
--- /dev/null
+++ b/meta-cgl-common/recipes-cgl/pacemaker/pacemaker-1.0.9.1/pacemaker-fix-xml-config.patch
@@ -0,0 +1,53 @@
+Index: pacemaker-1.0-Pacemaker-1.0.9.1/configure.ac
+===================================================================
+--- pacemaker-1.0-Pacemaker-1.0.9.1.orig/configure.ac
++++ pacemaker-1.0-Pacemaker-1.0.9.1/configure.ac
+@@ -22,6 +22,7 @@ dnl checks for system services
+ AC_INIT(pacemaker, 1.0.9, pacemaker at oss.clusterlabs.org)
+ CRM_DTD_VERSION="1.0"
+
++m4_pattern_allow([PKG_FEATURES])
+ PKG_FEATURES=""
+ HB_PKG=heartbeat
+
+@@ -97,7 +98,7 @@ dnl ====================================
+ cc_supports_flag() {
+ local CFLAGS="$@"
+ AC_MSG_CHECKING(whether $CC supports "$@")
+- AC_COMPILE_IFELSE([int main(){return 0;}] ,[RC=0; AC_MSG_RESULT(yes)],[RC=1; AC_MSG_RESULT(no)])
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(){return 0;}])] ,[RC=0; AC_MSG_RESULT(yes)],[RC=1; AC_MSG_RESULT(no)])
+ return $RC
+ }
+
+@@ -502,7 +503,6 @@ AC_PATH_PROGS(TAR, tar)
+ AC_PATH_PROGS(MD5, md5)
+ AC_PATH_PROGS(TEST, test)
+ AC_PATH_PROGS(PKGCONFIG, pkg-config)
+-AC_PATH_PROGS(XML2CONFIG, xml2-config)
+ AC_PATH_PROGS(VALGRIND_BIN, valgrind, /usr/bin/valgrind)
+ AC_DEFINE_UNQUOTED(VALGRIND_BIN, "$VALGRIND_BIN", Valgrind command)
+
+@@ -671,17 +671,13 @@ dnl AC_CHECK_HEADERS(netinet/icmp6.h)
+ dnl AC_CHECK_HEADERS(netinet/ip6.h)
+ dnl AC_CHECK_HEADERS(netinet/ip_icmp.h)
+
+-AC_MSG_CHECKING(for special libxml2 includes)
+-if test "x$XML2CONFIG" = "x"; then
+- AC_MSG_ERROR(libxml2 config not found)
+-else
+- XML2HEAD="`$XML2CONFIG --cflags`"
+- AC_MSG_RESULT($XML2HEAD)
+- AC_CHECK_LIB(xml2, xmlReadMemory)
+- AC_CHECK_LIB(xslt, xsltApplyStylesheet)
+-fi
++PKG_CHECK_MODULES([XML], [libxml-2.0])
++PKG_CHECK_MODULES([XSLT], [libxslt])
++
++AC_CHECK_LIB(xml2, xmlReadMemory)
++AC_CHECK_LIB(xslt, xsltApplyStylesheet)
+
+-CPPFLAGS="$CPPFLAGS $XML2HEAD"
++CPPFLAGS="$CPPFLAGS $XML_CFLAGS"
+
+ AC_CHECK_HEADERS(libxml/xpath.h)
+ AC_CHECK_HEADERS(libxslt/xslt.h)
diff --git a/meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb b/meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb
index e492102..174ebd1 100644
--- a/meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb
+++ b/meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb
@@ -25,12 +25,13 @@ SRC_URI = " \
file://pacemaker-dont-use-help2man.patch \
file://fix-header-defs-lookup.patch \
file://pacemaker-remove-ptest-functionality.patch \
+ file://pacemaker-fix-xml-config.patch \
file://volatiles \
"
SRC_URI_append_libc-uclibc = " file://kill-stack-protector.patch"
SRC_URI[md5sum] = "103fb2e804be3f8ace17021c5d9ad15d"
SRC_URI[sha256sum] = "aabfc9ee1c66804151d973d0ed0323798ffebe49e1c2219fa804dc6898a69a1e"
-inherit autotools-brokensep python-dir
+inherit autotools-brokensep python-dir pkgconfig
S = "${WORKDIR}/pacemaker-1.0-Pacemaker-${PV}"
--
2.1.4
More information about the yocto
mailing list