[OE-core] [PATCH 06/16] sat-solver: Fix build on uclibc
Khem Raj
raj.khem at gmail.com
Sat Jun 9 16:43:04 UTC 2012
futimes is not available on uclibc so use utimes
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
.../sat-solver/sat-solver/futimes.patch | 32 ++++++++++++++++++++
meta/recipes-extended/sat-solver/sat-solver_git.bb | 7 +++-
2 files changed, 37 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patch
diff --git a/meta/recipes-extended/sat-solver/sat-solver/futimes.patch b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
new file mode 100644
index 0000000..b24d852
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
@@ -0,0 +1,32 @@
+This patch uses utimes instead of futimes for uclibc
+since futimes is not available
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+
+Index: git/examples/solv.c
+===================================================================
+--- git.orig/examples/solv.c 2012-06-01 12:06:22.041552848 -0700
++++ git/examples/solv.c 2012-06-01 12:49:17.417677449 -0700
+@@ -1027,7 +1027,8 @@
+ int flags;
+
+ cinfo = repo->appdata;
+- if (!(fp = fopen(calccachepath(repo, repoext), "r")))
++ const char* fname = calccachepath(repo, repoext);
++ if (!(fp = fopen(fname, "r")))
+ return 0;
+ if (fseek(fp, -sizeof(mycookie), SEEK_END) || fread(mycookie, sizeof(mycookie), 1, fp) != 1)
+ {
+@@ -1068,7 +1069,11 @@
+ memcpy(cinfo->extcookie, myextcookie, sizeof(myextcookie));
+ }
+ if (mark)
++#ifdef __UCLIBC__
++ utimes(fname, 0); /* try to set modification time */
++#else
+ futimes(fileno(fp), 0); /* try to set modification time */
++#endif
+ fclose(fp);
+ return 1;
+ }
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
index 9d8422f..743c6f8 100644
--- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -8,7 +8,7 @@ DEPENDS = "libcheck rpm zlib expat db"
SRCREV = "0a7378d5f482f477a01cf1690d76871ab8bdcc32"
PV = "0.0-git${SRCPV}"
-PR = "r13"
+PR = "r14"
PARALLEL_MAKE=""
@@ -20,14 +20,17 @@ SRC_URI = "git://github.com/openSUSE/sat-solver.git;protocol=git \
file://sat-solver_core.patch \
file://fix_gcc-4.6.0_compile_issue.patch \
file://0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch \
+ file://futimes.patch \
"
S = "${WORKDIR}/git"
-EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE"
+EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE -DUSE_OWN_QSORT=1"
EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
+TUNE_CCARGS += "-DUSE_OWN_QSORT=1"
+
inherit cmake pkgconfig
RDEPENDS_${PN} = "rpm-libs"
--
1.7.5.4
More information about the Openembedded-core
mailing list