diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-03-28 22:07:02 -0500 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-05-06 17:44:22 -0700 |
commit | 60ab27d71ba8e6bba49d1158d2668d6c739e2840 (patch) | |
tree | 375d03ead306a30e5a18cf8c34f4895b1a6fee49 /meta/recipes-extended/sat-solver/sat-solver_git.bb | |
parent | d739fc53ebd49c9735f78b6036f54669ba825ea7 (diff) | |
download | poky-60ab27d71ba8e6bba49d1158d2668d6c739e2840.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 ba5af67f70..9892d14ecc 100644 --- a/meta/recipes-extended/sat-solver/sat-solver_git.bb +++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb | |||
@@ -7,14 +7,13 @@ 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 = "r6" | 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://cmake.patch \ | 14 | file://cmake.patch \ |
15 | file://db5.patch \ | 15 | file://db5.patch \ |
16 | file://builtin-arch.patch;apply=no \ | 16 | file://sat-solver_poky.patch \ |
17 | file://no-builtin-arch.patch;apply=no \ | ||
18 | " | 17 | " |
19 | 18 | ||
20 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
@@ -25,20 +24,31 @@ inherit cmake pkgconfig | |||
25 | 24 | ||
26 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 25 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
27 | 26 | ||
28 | do_archpatch () { | 27 | do_archgen () { |
29 | PKG_ARCH_TAIL=`sed -n ${S}/src/poolarch.c -e "s|^ \"\(${BASE_PACKAGE_ARCH}\)\",.*\"\(.*\)\",.*$|\2|p"` | 28 | # We need to dynamically generate our arch file based on the machine |
30 | if [ "x${PKG_ARCH_TAIL}" == x ]; then | 29 | # configuration |
31 | PATCHFILE=${WORKDIR}/no-builtin-arch.patch | ||
32 | else | ||
33 | PATCHFILE=${WORKDIR}/builtin-arch.patch | ||
34 | fi | ||
35 | 30 | ||
36 | sed -i "${PATCHFILE}" \ | 31 | INSTALL_PLATFORM_ARCHS="" |
37 | -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \ | 32 | for each_arch in ${PACKAGE_ARCHS} ; do |
38 | -e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \ | 33 | case "$each_arch" in |
39 | -e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g" | 34 | all | any | noarch) |
35 | continue;; | ||
36 | esac | ||
37 | INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS" | ||
38 | done | ||
40 | 39 | ||
41 | patch -p1 -i "${PATCHFILE}" | 40 | echo "/* Automatically generated by the sat-solver recipe */" > src/poky-arch.h |
41 | echo "const char *archpolicies[] = {" >> src/poky-arch.h | ||
42 | |||
43 | set -- $INSTALL_PLATFORM_ARCHS | ||
44 | |||
45 | save_IFS=$IFS | ||
46 | IFS=: | ||
47 | while [ $# -gt 0 ]; do echo " \"$1\", "\""$*"\", >> src/poky-arch.h ; shift; done | ||
48 | IFS=$save_IFS | ||
49 | |||
50 | echo " 0" >> src/poky-arch.h | ||
51 | echo "};" >> src/poky-arch.h | ||
42 | } | 52 | } |
43 | 53 | ||
44 | addtask archpatch before do_patch after do_unpack | 54 | addtask archgen before do_configure after do_patch |