diff options
-rw-r--r-- | meta/classes/autotools.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/base.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/native.bbclass | 72 | ||||
-rw-r--r-- | meta/classes/nativesdk.bbclass | 23 | ||||
-rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.4.0.bb | 6 |
6 files changed, 58 insertions, 49 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 27f4a01f12..98c871acc3 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
@@ -21,8 +21,6 @@ def autotools_dep_prepend(d): | |||
21 | EXTRA_OEMAKE = "" | 21 | EXTRA_OEMAKE = "" |
22 | 22 | ||
23 | DEPENDS_prepend = "${@autotools_dep_prepend(d)}" | 23 | DEPENDS_prepend = "${@autotools_dep_prepend(d)}" |
24 | DEPENDS_virtclass-native_prepend = "${@autotools_dep_prepend(d)}" | ||
25 | DEPENDS_virtclass-nativesdk_prepend = "${@autotools_dep_prepend(d)}" | ||
26 | 24 | ||
27 | inherit siteinfo | 25 | inherit siteinfo |
28 | 26 | ||
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 26c59abf8e..e740650cfd 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -69,8 +69,6 @@ def base_dep_prepend(d): | |||
69 | BASEDEPENDS = "${@base_dep_prepend(d)}" | 69 | BASEDEPENDS = "${@base_dep_prepend(d)}" |
70 | 70 | ||
71 | DEPENDS_prepend="${BASEDEPENDS} " | 71 | DEPENDS_prepend="${BASEDEPENDS} " |
72 | DEPENDS_virtclass-native_prepend="${BASEDEPENDS} " | ||
73 | DEPENDS_virtclass-nativesdk_prepend="${BASEDEPENDS} " | ||
74 | 72 | ||
75 | FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}" | 73 | FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}" |
76 | # THISDIR only works properly with imediate expansion as it has to run | 74 | # THISDIR only works properly with imediate expansion as it has to run |
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index 1b510f6c90..90fcd131c6 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass | |||
@@ -85,17 +85,25 @@ EXTRA_NATIVE_PKGCONFIG_PATH ?= "" | |||
85 | PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" | 85 | PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" |
86 | PKG_CONFIG_SYSROOT_DIR = "" | 86 | PKG_CONFIG_SYSROOT_DIR = "" |
87 | 87 | ||
88 | ORIG_DEPENDS := "${DEPENDS}" | 88 | python native_virtclass_handler () { |
89 | ORIG_RDEPENDS := "${RDEPENDS}" | 89 | if not isinstance(e, bb.event.RecipePreFinalise): |
90 | 90 | return | |
91 | DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}" | 91 | |
92 | RDEPENDS_virtclass-native ?= "${ORIG_RDEPENDS}" | 92 | classextend = bb.data.getVar('BBCLASSEXTEND', e.data, True) or "" |
93 | 93 | if "native" not in classextend: | |
94 | python __anonymous () { | 94 | return |
95 | if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): | 95 | |
96 | pn = bb.data.getVar("PN", d, True) | 96 | pn = bb.data.getVar("PN", e.data, True) |
97 | depends = bb.data.getVar("DEPENDS_virtclass-native", d, True) | 97 | if not pn.endswith("-native"): |
98 | deps = bb.utils.explode_deps(depends) | 98 | return |
99 | |||
100 | def map_dependencies(varname, d, suffix = ""): | ||
101 | if suffix: | ||
102 | varname = varname + "_" + suffix | ||
103 | deps = bb.data.getVar(varname, d, True) | ||
104 | if not deps: | ||
105 | return | ||
106 | deps = bb.utils.explode_deps(deps) | ||
99 | newdeps = [] | 107 | newdeps = [] |
100 | for dep in deps: | 108 | for dep in deps: |
101 | if dep.endswith("-cross"): | 109 | if dep.endswith("-cross"): |
@@ -104,29 +112,29 @@ python __anonymous () { | |||
104 | newdeps.append(dep + "-native") | 112 | newdeps.append(dep + "-native") |
105 | else: | 113 | else: |
106 | newdeps.append(dep) | 114 | newdeps.append(dep) |
107 | bb.data.setVar("DEPENDS_virtclass-native", " ".join(newdeps), d) | 115 | bb.data.setVar(varname, " ".join(newdeps), d) |
108 | rdepends = bb.data.getVar("RDEPENDS_virtclass-native", d, True) | 116 | |
109 | rdeps = bb.utils.explode_deps(rdepends) | 117 | map_dependencies("DEPENDS", e.data) |
110 | newdeps = [] | 118 | for pkg in (e.data.getVar("PACKAGES", True).split() + [""]): |
111 | for dep in rdeps: | 119 | map_dependencies("RDEPENDS", e.data, pkg) |
112 | if dep.endswith("-cross"): | 120 | map_dependencies("RRECOMMENDS", e.data, pkg) |
113 | newdeps.append(dep.replace("-cross", "-native")) | 121 | map_dependencies("RSUGGESTS", e.data, pkg) |
114 | elif not dep.endswith("-native"): | 122 | map_dependencies("RPROVIDES", e.data, pkg) |
115 | newdeps.append(dep + "-native") | 123 | map_dependencies("RREPLACES", e.data, pkg) |
116 | else: | 124 | |
117 | newdeps.append(dep) | 125 | provides = bb.data.getVar("PROVIDES", e.data, True) |
118 | bb.data.setVar("RDEPENDS_virtclass-native", " ".join(newdeps), d) | 126 | for prov in provides.split(): |
119 | provides = bb.data.getVar("PROVIDES", d, True) | 127 | if prov.find(pn) != -1: |
120 | for prov in provides.split(): | 128 | continue |
121 | if prov.find(pn) != -1: | 129 | if not prov.endswith("-native"): |
122 | continue | 130 | provides = provides.replace(prov, prov + "-native") |
123 | if not prov.endswith("-native"): | 131 | bb.data.setVar("PROVIDES", provides, e.data) |
124 | 132 | ||
125 | provides = provides.replace(prov, prov + "-native") | 133 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-native", e.data) |
126 | bb.data.setVar("PROVIDES", provides, d) | ||
127 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-native", d) | ||
128 | } | 134 | } |
129 | 135 | ||
136 | addhandler native_virtclass_handler | ||
137 | |||
130 | do_package[noexec] = "1" | 138 | do_package[noexec] = "1" |
131 | do_package_write_ipk[noexec] = "1" | 139 | do_package_write_ipk[noexec] = "1" |
132 | do_package_write_deb[noexec] = "1" | 140 | do_package_write_deb[noexec] = "1" |
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass index cd34a798ef..644e73121b 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass | |||
@@ -54,12 +54,15 @@ FILES_${PN}-dbg += "${prefix}/.debug \ | |||
54 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" | 54 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" |
55 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" | 55 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" |
56 | 56 | ||
57 | ORIG_DEPENDS := "${DEPENDS}" | 57 | python nativesdk_virtclass_handler () { |
58 | DEPENDS_virtclass-nativesdk ?= "${ORIG_DEPENDS}" | 58 | if not isinstance(e, bb.event.RecipePreFinalise): |
59 | return | ||
59 | 60 | ||
60 | python __anonymous () { | 61 | pn = bb.data.getVar("PN", e.data, True) |
61 | pn = bb.data.getVar("PN", d, True) | 62 | if not pn.endswith("-nativesdk"): |
62 | depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True) | 63 | return |
64 | |||
65 | depends = bb.data.getVar("DEPENDS", e.data, True) | ||
63 | deps = bb.utils.explode_deps(depends) | 66 | deps = bb.utils.explode_deps(depends) |
64 | newdeps = [] | 67 | newdeps = [] |
65 | for dep in deps: | 68 | for dep in deps: |
@@ -71,16 +74,18 @@ python __anonymous () { | |||
71 | newdeps.append(dep + "-nativesdk") | 74 | newdeps.append(dep + "-nativesdk") |
72 | else: | 75 | else: |
73 | newdeps.append(dep) | 76 | newdeps.append(dep) |
74 | bb.data.setVar("DEPENDS_virtclass-nativesdk", " ".join(newdeps), d) | 77 | bb.data.setVar("DEPENDS", " ".join(newdeps), e.data) |
75 | provides = bb.data.getVar("PROVIDES", d, True) | 78 | provides = bb.data.getVar("PROVIDES", e.data, True) |
76 | for prov in provides.split(): | 79 | for prov in provides.split(): |
77 | if prov.find(pn) != -1: | 80 | if prov.find(pn) != -1: |
78 | continue | 81 | continue |
79 | if not prov.endswith("-nativesdk"): | 82 | if not prov.endswith("-nativesdk"): |
80 | provides = provides.replace(prov, prov + "-nativesdk") | 83 | provides = provides.replace(prov, prov + "-nativesdk") |
81 | bb.data.setVar("PROVIDES", provides, d) | 84 | bb.data.setVar("PROVIDES", provides, e.data) |
82 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-nativesdk", d) | 85 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-nativesdk", e.data) |
83 | } | 86 | } |
84 | 87 | ||
88 | addhandler nativesdk_virtclass_handler | ||
89 | |||
85 | do_populate_sysroot[stamp-extra-info] = "" | 90 | do_populate_sysroot[stamp-extra-info] = "" |
86 | do_package[stamp-extra-info] = "" | 91 | do_package[stamp-extra-info] = "" |
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 4b361005ed..b77266af11 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc | |||
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=9c920d811858a74b67a36ba23cbaa95f | |||
15 | 15 | ||
16 | inherit autotools gettext pkgconfig | 16 | inherit autotools gettext pkgconfig |
17 | DEPENDS = "zlib ncurses" | 17 | DEPENDS = "zlib ncurses" |
18 | DEPENDS_virtclass-native_append = " lzo-native" | 18 | DEPENDS_virtclass-native = " lzo-native" |
19 | 19 | ||
20 | 20 | ||
21 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux-ng/v${MAJOR_VERSION}/util-linux-${PV}.tar.bz2 \ | 21 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux-ng/v${MAJOR_VERSION}/util-linux-${PV}.tar.bz2 \ |
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb index 5c30f1cbf7..0c88f91761 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb | |||
@@ -42,9 +42,9 @@ HOMEPAGE = "http://rpm5.org/" | |||
42 | LICENSE = "LGPL 2.1" | 42 | LICENSE = "LGPL 2.1" |
43 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" | 43 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" |
44 | 44 | ||
45 | rpmdeps = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt" | 45 | DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}" |
46 | DEPENDS = "${rpmdeps} python perl" | 46 | extrarpmdeps = "python perl" |
47 | DEPENDS_virtclass-native = "${rpmdeps}" | 47 | extrarpmdeps_virtclass-native = "" |
48 | PR = "r17" | 48 | PR = "r17" |
49 | 49 | ||
50 | # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed | 50 | # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed |