summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libzypp/libzypp_git.bb
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-03-28 22:07:02 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-31 22:02:46 +0100
commit41efbe13cb2f8b4b78c6049446cd14f9b086520d (patch)
tree506dcc9fcfa94fbd38eb0eadafb213e249d1f60d /meta/recipes-extended/libzypp/libzypp_git.bb
parent133f7e8cdd5a2b8f205ae1c2128f2e4fb6eb2cf4 (diff)
downloadpoky-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/libzypp/libzypp_git.bb')
-rw-r--r--meta/recipes-extended/libzypp/libzypp_git.bb97
1 files changed, 76 insertions, 21 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index 621ce45da4..809c1877f5 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -13,16 +13,14 @@ RDEPENDS_${PN} = "sat-solver"
13 13
14S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
15PV = "0.0-git${SRCPV}" 15PV = "0.0-git${SRCPV}"
16PR = "r8" 16PR = "r9"
17 17
18SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \ 18SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \
19 file://no-doc.patch \ 19 file://no-doc.patch \
20 file://rpm5.patch \ 20 file://rpm5.patch \
21 file://rpm5-no-rpmdbinit.patch \ 21 file://rpm5-no-rpmdbinit.patch \
22 file://builtin-arch.patch;apply=no \
23 file://no-builtin-arch.patch;apply=no \
24 file://archconf.patch;apply=no \
25 file://config-release.patch \ 22 file://config-release.patch \
23 file://libzypp-pokyarch.patch \
26 " 24 "
27 25
28SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" 26SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
@@ -34,23 +32,80 @@ EXTRA_OECMAKE += "-DLIB=lib"
34 32
35PACKAGE_ARCH = "${MACHINE_ARCH}" 33PACKAGE_ARCH = "${MACHINE_ARCH}"
36 34
37do_archpatch () { 35do_archgen () {
38 PKG_ARCH_TAIL=`sed -n ${S}/zypp/Arch.cc -e "s|^.*defCompatibleWith( _${BASE_PACKAGE_ARCH},[ \t]*\(.*\) .*$|\1|p"` 36 # We need to dynamically generate our arch file based on the machine
39 if [ "x${PKG_ARCH_TAIL}" == x ]; then 37 # configuration
40 PATCHFILE=${WORKDIR}/no-builtin-arch.patch 38 echo "/* Automatically generated by the libzypp recipes */" > zypp/poky-arch.h
41 else 39 echo "" >> zypp/poky-arch.h
42 PATCHFILE=${WORKDIR}/builtin-arch.patch 40 echo "#ifndef POKY_ARCH_H" >> zypp/poky-arch.h
43 fi 41 echo "#define POKY_ARCH_H 1" >> zypp/poky-arch.h
42 echo "#define Arch_machine Arch_${MACHINE_ARCH}" >> zypp/poky-arch.h
43 echo "#endif /* POKY_ARCH_H */" >> zypp/poky-arch.h
44 echo "" >> zypp/poky-arch.h
45 echo "#ifdef DEF_BUILTIN" >> zypp/poky-arch.h
46 echo "/* Specify builtin types */" >> zypp/poky-arch.h
47 for each_arch in ${PACKAGE_ARCHS} ; do
48 case "$each_arch" in
49 all | any | noarch)
50 continue;;
51 esac
52 echo " DEF_BUILTIN( ${each_arch} );" >> zypp/poky-arch.h
53 done
54 echo "#endif /* DEF_BUILTIN */" >> zypp/poky-arch.h
55 echo "" >> zypp/poky-arch.h
56 echo "#ifdef POKY_EXTERN_PROTO" >> zypp/poky-arch.h
57 echo "/* Specify extern prototypes */" >> zypp/poky-arch.h
58 for each_arch in ${PACKAGE_ARCHS} ; do
59 case "$each_arch" in
60 all | any | noarch)
61 continue;;
62 esac
63 echo " extern const Arch Arch_${each_arch};" >> zypp/poky-arch.h
64 done
65 echo "#endif /* POKY_EXTERN_PROTO */" >> zypp/poky-arch.h
66 echo "" >> zypp/poky-arch.h
67 echo "#ifdef POKY_PROTO" >> zypp/poky-arch.h
68 echo "/* Specify prototypes */" >> zypp/poky-arch.h
69 for each_arch in ${PACKAGE_ARCHS} ; do
70 case "$each_arch" in
71 all | any | noarch)
72 continue;;
73 esac
74 echo " const Arch Arch_${each_arch} (_${each_arch});" >> zypp/poky-arch.h
75 done
76 echo "#endif /* POKY_PROTO */" >> zypp/poky-arch.h
77 echo "" >> zypp/poky-arch.h
78 echo "#ifdef POKY_DEF_COMPAT" >> zypp/poky-arch.h
79 echo "/* Specify compatibility information */" >> zypp/poky-arch.h
80 INSTALL_PLATFORM_ARCHS=""
81 for each_arch in ${PACKAGE_ARCHS} ; do
82 INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS"
83 done
44 84
45 sed -i "${PATCHFILE}" \ 85 COMPAT_WITH=""
46 -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \ 86 set -- ${INSTALL_PLATFORM_ARCHS}
47 -e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \ 87 while [ $# -gt 0 ]; do
48 -e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g" 88 case "$1" in
49 89 all | any | noarch)
50 patch -p1 -i "${PATCHFILE}" 90 shift ; continue;;
51 91 esac
52 sed -i ${WORKDIR}/archconf.patch -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" 92 ARCH=_"$1"
53 patch -p1 -i ${WORKDIR}/archconf.patch 93 shift
94 COMPAT=""
95 for each_arch in "$@"; do
96 if [ -z "$COMPAT" ]; then
97 COMPAT=_"$each_arch"
98 else
99 COMPAT=_"$each_arch,$COMPAT"
100 fi
101 done
102 COMPAT_WITH="${ARCH},${COMPAT} $COMPAT_WITH"
103 done
104 for each_compat in ${COMPAT_WITH} ; do
105 echo " defCompatibleWith( ${each_compat} );" >> zypp/poky-arch.h
106 done
107 echo "#endif /* DEF_COMPAT */" >> zypp/poky-arch.h
108 echo "" >> zypp/poky-arch.h
54} 109}
55 110
56addtask archpatch before do_patch after do_unpack 111addtask archgen before do_configure after do_patch