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 15:34:07 +0100 |
commit | b2996efc015bc5ae0b8246924083e76fb5129cea (patch) | |
tree | 367c71662a71f075bc4ea9bb84c1cb02dbab7c5e /meta/recipes-extended/sat-solver/sat-solver_git.bb | |
parent | 7178a540b35a4a5e4a5e0546eb0c2207d2033cdf (diff) | |
download | openembedded-core-b2996efc015bc5ae0b8246924083e76fb5129cea.tar.gz openembedded-core-b2996efc015bc5ae0b8246924083e76fb5129cea.tar.bz2 openembedded-core-b2996efc015bc5ae0b8246924083e76fb5129cea.tar.xz openembedded-core-b2996efc015bc5ae0b8246924083e76fb5129cea.zip |
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.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
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 33bf9392e..a6937763c 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" DEPENDS = "libcheck rpm zlib expat db" PV = "0.0-git${SRCPV}" -PR = "r7" +PR = "r8" SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \ file://sat-solver_rpm5.patch \ file://sat-solver_obsolete.patch \ file://cmake.patch \ file://db5.patch \ - file://builtin-arch.patch;apply=no \ - file://no-builtin-arch.patch;apply=no \ + file://sat-solver_poky.patch \ " S = "${WORKDIR}/git" @@ -26,20 +25,31 @@ inherit cmake pkgconfig PACKAGE_ARCH = "${MACHINE_ARCH}" -do_archpatch () { - PKG_ARCH_TAIL=`sed -n ${S}/src/poolarch.c -e "s|^ \"\(${BASE_PACKAGE_ARCH}\)\",.*\"\(.*\)\",.*$|\2|p"` - if [ "x${PKG_ARCH_TAIL}" == x ]; then - PATCHFILE=${WORKDIR}/no-builtin-arch.patch - else - PATCHFILE=${WORKDIR}/builtin-arch.patch - fi +do_archgen () { + # We need to dynamically generate our arch file based on the machine + # configuration - sed -i "${PATCHFILE}" \ - -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \ - -e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \ - -e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g" + INSTALL_PLATFORM_ARCHS="" + for each_arch in ${PACKAGE_ARCHS} ; do + case "$each_arch" in + all | any | noarch) + continue;; + esac + INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS" + done - patch -p1 -i "${PATCHFILE}" + echo "/* Automatically generated by the sat-solver recipe */" > src/poky-arch.h + echo "const char *archpolicies[] = {" >> src/poky-arch.h + + set -- $INSTALL_PLATFORM_ARCHS + + save_IFS=$IFS + IFS=: + while [ $# -gt 0 ]; do echo " \"$1\", "\""$*"\", >> src/poky-arch.h ; shift; done + IFS=$save_IFS + + echo " 0" >> src/poky-arch.h + echo "};" >> src/poky-arch.h } -addtask archpatch before do_patch after do_unpack +addtask archgen before do_configure after do_patch |