summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libzypp/libzypp_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/libzypp/libzypp_git.bb')
-rw-r--r--meta/recipes-extended/libzypp/libzypp_git.bb47
1 files changed, 37 insertions, 10 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index 809c1877f5..b473b9ff96 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -25,6 +25,9 @@ SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \
25 25
26SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" 26SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
27 27
28# ARM specific global constructor workaround
29SRC_URI_append_arm = " file://arm-workaround-global-constructor.patch"
30
28FILES_${PN} += "${libdir}/zypp ${datadir}/zypp ${datadir}/icons" 31FILES_${PN} += "${libdir}/zypp ${datadir}/zypp ${datadir}/icons"
29FILES_${PN}-dev += "${datadir}/cmake" 32FILES_${PN}-dev += "${datadir}/cmake"
30 33
@@ -32,27 +35,38 @@ EXTRA_OECMAKE += "-DLIB=lib"
32 35
33PACKAGE_ARCH = "${MACHINE_ARCH}" 36PACKAGE_ARCH = "${MACHINE_ARCH}"
34 37
38AVOID_CONSTRUCTOR = ""
39
40# Due to an ARM specific compiler issue
41AVOID_CONSTRUCTOR_arm = "true"
42
43# Due to a potential conflict with '_mips' being a define
44AVOID_CONSTRUCTOR_mips = "true"
45
35do_archgen () { 46do_archgen () {
36 # We need to dynamically generate our arch file based on the machine 47 # We need to dynamically generate our arch file based on the machine
37 # configuration 48 # configuration
38 echo "/* Automatically generated by the libzypp recipes */" > zypp/poky-arch.h 49 echo "/* Automatically generated by the libzypp recipes */" > zypp/poky-arch.h
50 echo "/* Avoid Constructor: ${AVOID_CONSTRUCTOR} */" >> zypp/poky-arch.h
39 echo "" >> zypp/poky-arch.h 51 echo "" >> zypp/poky-arch.h
40 echo "#ifndef POKY_ARCH_H" >> zypp/poky-arch.h 52 echo "#ifndef POKY_ARCH_H" >> zypp/poky-arch.h
41 echo "#define POKY_ARCH_H 1" >> zypp/poky-arch.h 53 echo "#define POKY_ARCH_H 1" >> zypp/poky-arch.h
42 echo "#define Arch_machine Arch_${MACHINE_ARCH}" >> zypp/poky-arch.h 54 echo "#define Arch_machine Arch_${MACHINE_ARCH}" >> zypp/poky-arch.h
43 echo "#endif /* POKY_ARCH_H */" >> zypp/poky-arch.h 55 echo "#endif /* POKY_ARCH_H */" >> zypp/poky-arch.h
44 echo "" >> zypp/poky-arch.h 56 echo "" >> zypp/poky-arch.h
45 echo "#ifdef DEF_BUILTIN" >> zypp/poky-arch.h 57 if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
46 echo "/* Specify builtin types */" >> zypp/poky-arch.h 58 echo "#ifdef DEF_BUILTIN" >> zypp/poky-arch.h
47 for each_arch in ${PACKAGE_ARCHS} ; do 59 echo "/* Specify builtin types */" >> zypp/poky-arch.h
60 for each_arch in ${PACKAGE_ARCHS} ; do
48 case "$each_arch" in 61 case "$each_arch" in
49 all | any | noarch) 62 all | any | noarch)
50 continue;; 63 continue;;
51 esac 64 esac
52 echo " DEF_BUILTIN( ${each_arch} );" >> zypp/poky-arch.h 65 echo " DEF_BUILTIN( ${each_arch} );" >> zypp/poky-arch.h
53 done 66 done
54 echo "#endif /* DEF_BUILTIN */" >> zypp/poky-arch.h 67 echo "#endif /* DEF_BUILTIN */" >> zypp/poky-arch.h
55 echo "" >> zypp/poky-arch.h 68 echo "" >> zypp/poky-arch.h
69 fi
56 echo "#ifdef POKY_EXTERN_PROTO" >> zypp/poky-arch.h 70 echo "#ifdef POKY_EXTERN_PROTO" >> zypp/poky-arch.h
57 echo "/* Specify extern prototypes */" >> zypp/poky-arch.h 71 echo "/* Specify extern prototypes */" >> zypp/poky-arch.h
58 for each_arch in ${PACKAGE_ARCHS} ; do 72 for each_arch in ${PACKAGE_ARCHS} ; do
@@ -71,7 +85,11 @@ do_archgen () {
71 all | any | noarch) 85 all | any | noarch)
72 continue;; 86 continue;;
73 esac 87 esac
74 echo " const Arch Arch_${each_arch} (_${each_arch});" >> zypp/poky-arch.h 88 if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
89 echo " const Arch Arch_${each_arch} (_${each_arch});" >> zypp/poky-arch.h
90 else
91 echo " const Arch Arch_${each_arch} ( IdString ( \"${each_arch}\" ) );" >> zypp/poky-arch.h
92 fi
75 done 93 done
76 echo "#endif /* POKY_PROTO */" >> zypp/poky-arch.h 94 echo "#endif /* POKY_PROTO */" >> zypp/poky-arch.h
77 echo "" >> zypp/poky-arch.h 95 echo "" >> zypp/poky-arch.h
@@ -89,14 +107,23 @@ do_archgen () {
89 all | any | noarch) 107 all | any | noarch)
90 shift ; continue;; 108 shift ; continue;;
91 esac 109 esac
92 ARCH=_"$1" 110 if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
111 ARCH="_$1"
112 else
113 ARCH="IdString(\"$1\")"
114 fi
93 shift 115 shift
94 COMPAT="" 116 COMPAT=""
95 for each_arch in "$@"; do 117 for each_arch in "$@"; do
118 if [ -z "${AVOID_CONSTRUCTOR}" ]; then
119 arch_val="_${each_arch}"
120 else
121 arch_val="IdString(\"${each_arch}\")"
122 fi
96 if [ -z "$COMPAT" ]; then 123 if [ -z "$COMPAT" ]; then
97 COMPAT=_"$each_arch" 124 COMPAT=${arch_val}
98 else 125 else
99 COMPAT=_"$each_arch,$COMPAT" 126 COMPAT="${arch_val},$COMPAT"
100 fi 127 fi
101 done 128 done
102 COMPAT_WITH="${ARCH},${COMPAT} $COMPAT_WITH" 129 COMPAT_WITH="${ARCH},${COMPAT} $COMPAT_WITH"