diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-03-28 22:07:02 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-31 22:02:46 +0100 |
commit | 41efbe13cb2f8b4b78c6049446cd14f9b086520d (patch) | |
tree | 506dcc9fcfa94fbd38eb0eadafb213e249d1f60d /meta/recipes-extended/sat-solver/sat-solver_git.bb | |
parent | 133f7e8cdd5a2b8f205ae1c2128f2e4fb6eb2cf4 (diff) | |
download | poky-41efbe13cb2f8b4b78c6049446cd14f9b086520d.tar.gz |
Fix integration of zypper and sat-solver
Adjust the integration of zypper and sat-solver to ensure that all of the
defined architectures for a given machine are defined identically to Poky.
(From OE-Core rev: b2996efc015bc5ae0b8246924083e76fb5129cea)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sat-solver/sat-solver_git.bb')
-rw-r--r-- | meta/recipes-extended/sat-solver/sat-solver_git.bb | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb index 33bf9392e2..a6937763cb 100644 --- a/meta/recipes-extended/sat-solver/sat-solver_git.bb +++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb | |||
@@ -7,15 +7,14 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8" | |||
7 | DEPENDS = "libcheck rpm zlib expat db" | 7 | DEPENDS = "libcheck rpm zlib expat db" |
8 | 8 | ||
9 | PV = "0.0-git${SRCPV}" | 9 | PV = "0.0-git${SRCPV}" |
10 | PR = "r7" | 10 | PR = "r8" |
11 | 11 | ||
12 | SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \ | 12 | SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \ |
13 | file://sat-solver_rpm5.patch \ | 13 | file://sat-solver_rpm5.patch \ |
14 | file://sat-solver_obsolete.patch \ | 14 | file://sat-solver_obsolete.patch \ |
15 | file://cmake.patch \ | 15 | file://cmake.patch \ |
16 | file://db5.patch \ | 16 | file://db5.patch \ |
17 | file://builtin-arch.patch;apply=no \ | 17 | file://sat-solver_poky.patch \ |
18 | file://no-builtin-arch.patch;apply=no \ | ||
19 | " | 18 | " |
20 | 19 | ||
21 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
@@ -26,20 +25,31 @@ inherit cmake pkgconfig | |||
26 | 25 | ||
27 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 26 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
28 | 27 | ||
29 | do_archpatch () { | 28 | do_archgen () { |
30 | PKG_ARCH_TAIL=`sed -n ${S}/src/poolarch.c -e "s|^ \"\(${BASE_PACKAGE_ARCH}\)\",.*\"\(.*\)\",.*$|\2|p"` | 29 | # We need to dynamically generate our arch file based on the machine |
31 | if [ "x${PKG_ARCH_TAIL}" == x ]; then | 30 | # configuration |
32 | PATCHFILE=${WORKDIR}/no-builtin-arch.patch | ||
33 | else | ||
34 | PATCHFILE=${WORKDIR}/builtin-arch.patch | ||
35 | fi | ||
36 | 31 | ||
37 | sed -i "${PATCHFILE}" \ | 32 | INSTALL_PLATFORM_ARCHS="" |
38 | -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \ | 33 | for each_arch in ${PACKAGE_ARCHS} ; do |
39 | -e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \ | 34 | case "$each_arch" in |
40 | -e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g" | 35 | all | any | noarch) |
36 | continue;; | ||
37 | esac | ||
38 | INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS" | ||
39 | done | ||
41 | 40 | ||
42 | patch -p1 -i "${PATCHFILE}" | 41 | echo "/* Automatically generated by the sat-solver recipe */" > src/poky-arch.h |
42 | echo "const char *archpolicies[] = {" >> src/poky-arch.h | ||
43 | |||
44 | set -- $INSTALL_PLATFORM_ARCHS | ||
45 | |||
46 | save_IFS=$IFS | ||
47 | IFS=: | ||
48 | while [ $# -gt 0 ]; do echo " \"$1\", "\""$*"\", >> src/poky-arch.h ; shift; done | ||
49 | IFS=$save_IFS | ||
50 | |||
51 | echo " 0" >> src/poky-arch.h | ||
52 | echo "};" >> src/poky-arch.h | ||
43 | } | 53 | } |
44 | 54 | ||
45 | addtask archpatch before do_patch after do_unpack | 55 | addtask archgen before do_configure after do_patch |