[oe-commits] Roman I Khimov : cluster-resource-agents: fix headers define extraction
git version control
git at git.openembedded.org
Thu Apr 8 20:55:18 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: c4aa10367bbb99ec72fd9e61ab27e083a0e03f7c
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=c4aa10367bbb99ec72fd9e61ab27e083a0e03f7c
Author: Roman I Khimov <khimov at altell.ru>
Date: Wed Apr 7 12:39:37 2010 +0400
cluster-resource-agents: fix headers define extraction
Header define extraction routine tries to execute test binary which
may or may not work depending on target architecture. Redo it using
preprocessor only.
Fixes wrong OCF_ROOT_DIR.
Signed-off-by: Roman I Khimov <khimov at altell.ru>
---
.../fix-header-defs-lookup.patch | 16 ++++++++++++++++
recipes/linux-ha/cluster-resource-agents_1.0.2.bb | 7 ++++++-
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/recipes/linux-ha/cluster-resource-agents/fix-header-defs-lookup.patch b/recipes/linux-ha/cluster-resource-agents/fix-header-defs-lookup.patch
new file mode 100644
index 0000000..ebd13de
--- /dev/null
+++ b/recipes/linux-ha/cluster-resource-agents/fix-header-defs-lookup.patch
@@ -0,0 +1,16 @@
+Index: Cluster-Resource-Agents-agents-1.0.2/configure.in
+===================================================================
+--- Cluster-Resource-Agents-agents-1.0.2.orig/configure.in 2010-04-06 12:51:22.000000000 +0400
++++ Cluster-Resource-Agents-agents-1.0.2/configure.in 2010-04-06 12:54:10.000000000 +0400
+@@ -91,9 +91,8 @@
+ Cfile=/tmp/extract_define.$2.${$}
+ printf "#include <stdio.h>\n" > ${Cfile}.c
+ printf "#include <%s>\n" $1 >> ${Cfile}.c
+- printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c
+- $CC $CFLAGS ${Cfile}.c -o ${Cfile}
+- value=`${Cfile}`
++ printf "\"%s\":%s\n" $2 $2 >> ${Cfile}.c
++ value=`$CC $CFLAGS -E ${Cfile}.c | grep \"$2\" | cut -f 2 -d ':'`
+ AC_MSG_RESULT($value)
+ printf $value
+ rm -f ${Cfile}.c ${Cfile}
diff --git a/recipes/linux-ha/cluster-resource-agents_1.0.2.bb b/recipes/linux-ha/cluster-resource-agents_1.0.2.bb
index cdc8165..326f39c 100644
--- a/recipes/linux-ha/cluster-resource-agents_1.0.2.bb
+++ b/recipes/linux-ha/cluster-resource-agents_1.0.2.bb
@@ -2,7 +2,12 @@ DESCRIPTION = "OCF resource agents for use by compatible cluster managers"
LICENSE = "GPL"
DEPENDS = "cluster-glue"
-SRC_URI = "http://hg.linux-ha.org/agents/archive/agents-${PV}.tar.bz2;name=tar"
+PR = "r1"
+
+SRC_URI = " \
+ http://hg.linux-ha.org/agents/archive/agents-${PV}.tar.bz2;name=tar \
+ file://fix-header-defs-lookup.patch;patch=1 \
+ "
SRC_URI[tar.md5sum] = "b536dea1b1f642bdc3607cb85ea0b89d"
SRC_URI[tar.sha256sum] = "c5a1ea9a83c578672cd475ab4af5c2e40736669bae0eb70bb9bb6124074e5e5e"
More information about the Openembedded-commits
mailing list