summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2011-03-10 18:28:55 +0800
committerSaul Wold <sgw@linux.intel.com>2011-03-14 17:41:46 -0700
commitb8f4c95e21c9997b115e8c99a25ac79fdcff6ee9 (patch)
treecb4a58f8c9d1e12e4388037c3e7c6e10b97e5aab /meta/recipes-extended
parent498c628a1e92831a5331cdaf4d5286246f8f9024 (diff)
downloadpoky-b8f4c95e21c9997b115e8c99a25ac79fdcff6ee9.tar.gz
sat-solver: add machine arch support
(From OE-Core rev: ca758fa404fa447689ff205ee3b4b76bd3f1068a) Signed-off-by: Qing He <qing.he@intel.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/builtin-arch.patch28
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch29
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver_git.bb28
3 files changed, 83 insertions, 2 deletions
diff --git a/meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch b/meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch
new file mode 100644
index 0000000000..c228c36e49
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch
@@ -0,0 +1,28 @@
1This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to
2sat-solver available archs, see do_archpatch in .bb for more
3details, this is the version for ${BASE_PACKAGE_ARCH} already
4recognized in sat-sovler.
5
6Signed-off-by: Qing He <qing.he@intel.com>
7
8diff --git a/src/poolarch.c b/src/poolarch.c
9index 34a14a3..660959b 100644
10--- a/src/poolarch.c
11+++ b/src/poolarch.c
12@@ -21,6 +21,7 @@
13 #include "util.h"
14
15 const char *archpolicies[] = {
16+ "@MACHINE_ARCH@", "@MACHINE_ARCH@:@PKG_ARCH_TAIL@",
17 "x86_64", "x86_64:i686:i586:i486:i386",
18 "i686", "i686:i586:i486:i386",
19 "i586", "i586:i486:i386",
20@@ -72,7 +74,7 @@ pool_setarch(Pool *pool, const char *arch)
21 return;
22 }
23 #ifndef DEBIAN_SEMANTICS
24- id = ARCH_NOARCH;
25+ id = ARCH_ALL;
26 #else
27 id = ARCH_ALL;
28 #endif
diff --git a/meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch b/meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch
new file mode 100644
index 0000000000..225fbfe159
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch
@@ -0,0 +1,29 @@
1This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to
2sat-solver available archs, see do_archpatch in .bb for more
3details, this is the version for ${BASE_PACKAGE_ARCH} not
4recognized in sat-sovler.
5
6Signed-off-by: Qing He <qing.he@intel.com>
7
8diff --git a/src/poolarch.c b/src/poolarch.c
9index 34a14a3..36367ba 100644
10--- a/src/poolarch.c
11+++ b/src/poolarch.c
12@@ -21,6 +21,8 @@
13 #include "util.h"
14
15 const char *archpolicies[] = {
16+ "@MACHINE_ARCH@", "@MACHINE_ARCH@:@PKG_ARCH@",
17+ "@PKG_ARCH@", "@PKG_ARCH@",
18 "x86_64", "x86_64:i686:i586:i486:i386",
19 "i686", "i686:i586:i486:i386",
20 "i586", "i586:i486:i386",
21@@ -72,7 +74,7 @@ pool_setarch(Pool *pool, const char *arch)
22 return;
23 }
24 #ifndef DEBIAN_SEMANTICS
25- id = ARCH_NOARCH;
26+ id = ARCH_ALL;
27 #else
28 id = ARCH_ALL;
29 #endif
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
index 02b6c75507..54420cd154 100644
--- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -7,14 +7,38 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
7DEPENDS = "libcheck rpm zlib expat db" 7DEPENDS = "libcheck rpm zlib expat db"
8 8
9PV = "0.0-git${SRCPV}" 9PV = "0.0-git${SRCPV}"
10PR = "r3" 10PR = "r4"
11 11
12SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \ 12SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
13 file://cmake.patch \ 13 file://cmake.patch \
14 file://rpm5.patch \ 14 file://rpm5.patch \
15 file://db5.patch" 15 file://db5.patch \
16 file://builtin-arch.patch;apply=no \
17 file://no-builtin-arch.patch;apply=no \
18 "
16 19
17S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
18 21
19EXTRA_OECMAKE += "-DLIB=lib" 22EXTRA_OECMAKE += "-DLIB=lib"
23
20inherit cmake pkgconfig 24inherit cmake pkgconfig
25
26PACKAGE_ARCH = "${MACHINE_ARCH}"
27
28do_archpatch () {
29 PKG_ARCH_TAIL=`sed -n ${S}/src/poolarch.c -e "s|^ \"\(${BASE_PACKAGE_ARCH}\)\",.*\"\(.*\)\",.*$|\2|p"`
30 if [ "x${PKG_ARCH_TAIL}" == x ]; then
31 PATCHFILE=${WORKDIR}/no-builtin-arch.patch
32 else
33 PATCHFILE=${WORKDIR}/builtin-arch.patch
34 fi
35
36 sed -i "${PATCHFILE}" \
37 -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \
38 -e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \
39 -e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g"
40
41 patch -p1 -i "${PATCHFILE}"
42}
43
44addtask archpatch before do_patch after do_unpack