summaryrefslogtreecommitdiff
path: root/meta/recipes-extended/libzypp/libzypp_git.bb
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2011-03-11 17:16:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-14 20:45:52 +0000
commitb463188407c0c783c8d5aeb0098fc59445db57bf (patch)
tree6252a2c7a2f10607814395c61491100e874eb151 /meta/recipes-extended/libzypp/libzypp_git.bb
parentca758fa404fa447689ff205ee3b4b76bd3f1068a (diff)
downloadopenembedded-core-b463188407c0c783c8d5aeb0098fc59445db57bf.tar.gz
openembedded-core-b463188407c0c783c8d5aeb0098fc59445db57bf.tar.bz2
openembedded-core-b463188407c0c783c8d5aeb0098fc59445db57bf.zip
libzypp: add machine arch support
Signed-off-by: Qing He <qing.he@intel.com>
Diffstat (limited to 'meta/recipes-extended/libzypp/libzypp_git.bb')
-rw-r--r--meta/recipes-extended/libzypp/libzypp_git.bb28
1 files changed, 27 insertions, 1 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index b9110eb09e..825339d126 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -13,12 +13,15 @@ RDEPENDS_${PN} = "sat-solver"
S = "${WORKDIR}/git"
PV = "0.0-git${SRCPV}"
-PR = "r6"
+PR = "r7"
SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \
file://no-doc.patch \
file://rpm5.patch \
file://rpm5-no-rpmdbinit.patch \
+ file://builtin-arch.patch;apply=no \
+ file://no-builtin-arch.patch;apply=no \
+ file://archconf.patch;apply=no \
"
SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
@@ -27,3 +30,26 @@ FILES_${PN} += "${libdir}/zypp ${datadir}/zypp ${datadir}/icons"
FILES_${PN}-dev += "${datadir}/cmake"
EXTRA_OECMAKE += "-DLIB=lib"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_archpatch () {
+ PKG_ARCH_TAIL=`sed -n ${S}/zypp/Arch.cc -e "s|^.*defCompatibleWith( _${BASE_PACKAGE_ARCH},[ \t]*\(.*\) .*$|\1|p"`
+ if [ "x${PKG_ARCH_TAIL}" == x ]; then
+ PATCHFILE=${WORKDIR}/no-builtin-arch.patch
+ else
+ PATCHFILE=${WORKDIR}/builtin-arch.patch
+ fi
+
+ 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"
+
+ patch -p1 -i "${PATCHFILE}"
+
+ sed -i ${WORKDIR}/archconf.patch -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g"
+ patch -p1 -i ${WORKDIR}/archconf.patch
+}
+
+addtask archpatch before do_patch after do_unpack