summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-06-04 15:06:52 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-18 17:25:14 +0100
commitfd3e09c023bb6f3c59daea5357af841e76f22f70 (patch)
tree1d02e0dcfc5135f9626504ecea974d7a7cda8ff0 /meta/recipes-extended
parentbdc73dfc110b363fd7e8b424c3e53b97d9a3d654 (diff)
downloadpoky-fd3e09c023bb6f3c59daea5357af841e76f22f70.tar.gz
sat-solver: Fix build on uclibc
futimes is not available on uclibc so use utimes qsort is also not as expected by sat-solver therefore for uclibc we resort to using internal version of qsort (From OE-Core rev: e0800be814c8f8adf8d6682aacea1d3ce9b14c9e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/futimes.patch32
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver_git.bb3
2 files changed, 35 insertions, 0 deletions
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 0000000000..b24d852ae7
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
@@ -0,0 +1,32 @@
1This patch uses utimes instead of futimes for uclibc
2since futimes is not available
3
4Upstream-Status: Pending
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Index: git/examples/solv.c
8===================================================================
9--- git.orig/examples/solv.c 2012-06-01 12:06:22.041552848 -0700
10+++ git/examples/solv.c 2012-06-01 12:49:17.417677449 -0700
11@@ -1027,7 +1027,8 @@
12 int flags;
13
14 cinfo = repo->appdata;
15- if (!(fp = fopen(calccachepath(repo, repoext), "r")))
16+ const char* fname = calccachepath(repo, repoext);
17+ if (!(fp = fopen(fname, "r")))
18 return 0;
19 if (fseek(fp, -sizeof(mycookie), SEEK_END) || fread(mycookie, sizeof(mycookie), 1, fp) != 1)
20 {
21@@ -1068,7 +1069,11 @@
22 memcpy(cinfo->extcookie, myextcookie, sizeof(myextcookie));
23 }
24 if (mark)
25+#ifdef __UCLIBC__
26+ utimes(fname, 0); /* try to set modification time */
27+#else
28 futimes(fileno(fp), 0); /* try to set modification time */
29+#endif
30 fclose(fp);
31 return 1;
32 }
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
index b0382f6af0..e1054e9e22 100644
--- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -20,6 +20,7 @@ SRC_URI = "git://github.com/openSUSE/sat-solver.git;protocol=git \
20 file://sat-solver_core.patch \ 20 file://sat-solver_core.patch \
21 file://fix_gcc-4.6.0_compile_issue.patch \ 21 file://fix_gcc-4.6.0_compile_issue.patch \
22 file://0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch \ 22 file://0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch \
23 file://futimes.patch \
23 " 24 "
24 25
25S = "${WORKDIR}/git" 26S = "${WORKDIR}/git"
@@ -28,6 +29,8 @@ EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE"
28 29
29EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" 30EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
30 31
32TUNE_CCARGS_append_libc-uclibc = " -DUSE_OWN_QSORT=1 "
33
31inherit cmake pkgconfig 34inherit cmake pkgconfig
32 35
33RDEPENDS_${PN} = "rpm-libs" 36RDEPENDS_${PN} = "rpm-libs"