summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-11 14:44:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-25 14:36:30 +0100
commit5aa96bd0ef51b355d52e0fa1a62bb446d01c3583 (patch)
tree862766d7672934904ac9ac73e70958ffc90aed5a /meta
parent4cb97ca18cf0dffcb30da01061deb7b72116b90f (diff)
downloadpoky-5aa96bd0ef51b355d52e0fa1a62bb446d01c3583.tar.gz
bitbake.conf/classes: Variable cleanup
This patch removes the variables BASE_PACKAGE_ARCH, BASEPKG_HOST_SYS, BASEPKG_TARGET_SYS and also removes the immediate assignments in several core classes as these are no longer required. This should make it clearer what some of the core variables do and simplfy some overly complex and confusing class code. (From OE-Core rev: d5521be2dcbaf213c140b0d12a4176380874426b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/allarch.bbclass1
-rw-r--r--meta/classes/cross-canadian.bbclass13
-rw-r--r--meta/classes/cross.bbclass14
-rw-r--r--meta/classes/crosssdk.bbclass4
-rw-r--r--meta/classes/native.bbclass4
-rw-r--r--meta/classes/nativesdk.bbclass11
-rw-r--r--meta/classes/sstate.bbclass6
-rw-r--r--meta/conf/bitbake.conf7
-rw-r--r--meta/recipes-graphics/xorg-font/font-util_1.2.0.bb2
9 files changed, 19 insertions, 43 deletions
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index e3ac3922ed..26fca70635 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -2,7 +2,6 @@
2# This class is used for architecture independent recipes/data files (usally scripts) 2# This class is used for architecture independent recipes/data files (usally scripts)
3# 3#
4 4
5BASE_PACKAGE_ARCH = "all"
6PACKAGE_ARCH = "all" 5PACKAGE_ARCH = "all"
7 6
8# No need for virtual/libc or a cross compiler 7# No need for virtual/libc or a cross compiler
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index edd51da87b..c878d7f5a5 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -9,15 +9,12 @@
9# or indirectly via dependency. No need to be in 'world'. 9# or indirectly via dependency. No need to be in 'world'.
10EXCLUDE_FROM_WORLD = "1" 10EXCLUDE_FROM_WORLD = "1"
11 11
12STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${OLD_BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" 12STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
13 13
14# 14#
15# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS 15# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
16# 16#
17OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}" 17PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
18OLD_MULTIMACH_TARGET_SYS := "${MULTIMACH_TARGET_SYS}"
19OLD_BASE_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
20BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
21python () { 18python () {
22 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() 19 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
23 sdkarchs = [] 20 sdkarchs = []
@@ -66,12 +63,12 @@ target_exec_prefix := "${exec_prefix}"
66base_prefix = "${SDKPATHNATIVE}" 63base_prefix = "${SDKPATHNATIVE}"
67prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" 64prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
68exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" 65exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
69bindir = "${exec_prefix}/bin/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" 66bindir = "${exec_prefix}/bin/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
70sbindir = "${bindir}" 67sbindir = "${bindir}"
71base_bindir = "${bindir}" 68base_bindir = "${bindir}"
72base_sbindir = "${bindir}" 69base_sbindir = "${bindir}"
73libdir = "${exec_prefix}/lib/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" 70libdir = "${exec_prefix}/lib/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
74libexecdir = "${exec_prefix}/libexec/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" 71libexecdir = "${exec_prefix}/libexec/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
75 72
76FILES_${PN} = "${prefix}" 73FILES_${PN} = "${prefix}"
77FILES_${PN}-dbg += "${prefix}/.debug \ 74FILES_${PN}-dbg += "${prefix}/.debug \
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 81358ec8dd..050d63e412 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -4,14 +4,6 @@ inherit relocatable
4# no need for them to be a direct target of 'world' 4# no need for them to be a direct target of 'world'
5EXCLUDE_FROM_WORLD = "1" 5EXCLUDE_FROM_WORLD = "1"
6 6
7# Save PACKAGE_ARCH before changing HOST_ARCH
8OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}"
9PACKAGE_ARCH = "${OLD_PACKAGE_ARCH}"
10# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it
11OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}"
12BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
13BASEPKG_HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
14
15PACKAGES = "" 7PACKAGES = ""
16 8
17HOST_ARCH = "${BUILD_ARCH}" 9HOST_ARCH = "${BUILD_ARCH}"
@@ -20,10 +12,10 @@ HOST_OS = "${BUILD_OS}"
20HOST_PREFIX = "${BUILD_PREFIX}" 12HOST_PREFIX = "${BUILD_PREFIX}"
21HOST_CC_ARCH = "${BUILD_CC_ARCH}" 13HOST_CC_ARCH = "${BUILD_CC_ARCH}"
22 14
23STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}" 15STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
24 16
25export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig" 17export PKG_CONFIG_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
26export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" 18export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
27 19
28CPPFLAGS = "${BUILD_CPPFLAGS}" 20CPPFLAGS = "${BUILD_CPPFLAGS}"
29CFLAGS = "${BUILD_CFLAGS}" 21CFLAGS = "${BUILD_CFLAGS}"
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index 3952ebdca4..a2e5a222fc 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -1,8 +1,8 @@
1inherit cross 1inherit cross
2 2
3BASE_PACKAGE_ARCH = "${SDK_ARCH}" 3PACKAGE_ARCH = "${SDK_ARCH}"
4PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
5STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" 4STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
5STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
6 6
7TARGET_ARCH = "${SDK_ARCH}" 7TARGET_ARCH = "${SDK_ARCH}"
8TARGET_VENDOR = "${SDK_VENDOR}" 8TARGET_VENDOR = "${SDK_VENDOR}"
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 1e8de95207..00f7b9f02d 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -15,10 +15,6 @@ PACKAGE_ARCH = "${BUILD_ARCH}"
15OECMAKE_RPATH = "${libdir}" 15OECMAKE_RPATH = "${libdir}"
16OECMAKE_RPATH_virtclass-native = "${libdir}" 16OECMAKE_RPATH_virtclass-native = "${libdir}"
17 17
18BASE_PACKAGE_ARCH = "${BUILD_ARCH}"
19BASEPKG_HOST_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
20BASEPKG_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
21
22# When this class has packaging enabled, setting 18# When this class has packaging enabled, setting
23# RPROVIDES becomes unnecessary. 19# RPROVIDES becomes unnecessary.
24RPROVIDES = "${PN}" 20RPROVIDES = "${PN}"
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 3fe4bf9a07..de7a88317c 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -5,10 +5,9 @@ EXCLUDE_FROM_WORLD = "1"
5STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}" 5STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}"
6 6
7# 7#
8# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS 8# Update PACKAGE_ARCH and PACKAGE_ARCHS
9# 9#
10OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH} 10PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
11BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
12python () { 11python () {
13 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() 12 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
14 sdkarchs = [] 13 sdkarchs = []
@@ -17,10 +16,8 @@ python () {
17 bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d) 16 bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
18} 17}
19 18
20#STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk" 19STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}"
21#STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk" 20STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}"
22STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
23STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
24 21
25HOST_ARCH = "${SDK_ARCH}" 22HOST_ARCH = "${SDK_ARCH}"
26HOST_VENDOR = "${SDK_VENDOR}" 23HOST_VENDOR = "${SDK_VENDOR}"
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 62c7c4327e..c057cc7441 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -22,14 +22,14 @@ python () {
22 if bb.data.inherits_class('native', d): 22 if bb.data.inherits_class('native', d):
23 bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d) 23 bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d)
24 elif bb.data.inherits_class('cross', d): 24 elif bb.data.inherits_class('cross', d):
25 bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d) 25 bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${TUNE_PKGARCH}", d), d)
26 bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${BUILD_ARCH}_${MACHINE}", d), d) 26 bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${BUILD_ARCH}_${MACHINE}", d), d)
27 elif bb.data.inherits_class('crosssdk', d): 27 elif bb.data.inherits_class('crosssdk', d):
28 bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d) 28 bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${PACKAGE_ARCH}", d), d)
29 elif bb.data.inherits_class('nativesdk', d): 29 elif bb.data.inherits_class('nativesdk', d):
30 bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}", d), d) 30 bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}", d), d)
31 elif bb.data.inherits_class('cross-canadian', d): 31 elif bb.data.inherits_class('cross-canadian', d):
32 bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${BASE_PACKAGE_ARCH}", d), d) 32 bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${PACKAGE_ARCH}", d), d)
33 else: 33 else:
34 bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${MACHINE}", d), d) 34 bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${MACHINE}", d), d)
35 35
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 2954faa5d0..9d1c7690bc 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -98,8 +98,7 @@ SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), '']
98SDK_PREFIX = "${SDK_SYS}-" 98SDK_PREFIX = "${SDK_SYS}-"
99SDK_CC_ARCH = "${BUILD_CC_ARCH}" 99SDK_CC_ARCH = "${BUILD_CC_ARCH}"
100 100
101BASE_PACKAGE_ARCH = "${TUNE_PKGARCH}" 101PACKAGE_ARCH = "${TUNE_PKGARCH}"
102PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
103MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}" 102MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}"
104PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}" 103PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}"
105PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}" 104PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
@@ -109,8 +108,6 @@ PACKAGE_ARCHS[vardepsexclude] = "MACHINE_ARCH"
109 108
110MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" 109MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
111MULTIMACH_HOST_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" 110MULTIMACH_HOST_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
112BASEPKG_HOST_SYS = "${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
113BASEPKG_TARGET_SYS = "${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
114 111
115# select proper CPU to get binary locales generated 112# select proper CPU to get binary locales generated
116QEMU_OPTIONS = "" 113QEMU_OPTIONS = ""
@@ -317,7 +314,7 @@ STAGING_DIR = "${TMPDIR}/sysroots"
317STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}" 314STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
318STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}" 315STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}"
319STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts" 316STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts"
320STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${BASEPKG_TARGET_SYS}" 317STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
321STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}" 318STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}"
322STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}" 319STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}"
323STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}" 320STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
diff --git a/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb b/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
index a04bd6d5a3..8834708644 100644
--- a/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
+++ b/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
@@ -8,8 +8,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c0067273d90f6336008cb2504e14bd32 \
8 file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \ 8 file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \
9 file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34" 9 file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34"
10 10
11PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
12
13DEPENDS = "encodings util-macros" 11DEPENDS = "encodings util-macros"
14DEPENDS_virtclass-native = "util-macros-native" 12DEPENDS_virtclass-native = "util-macros-native"
15RDEPENDS_${PN} = "mkfontdir mkfontscale encodings" 13RDEPENDS_${PN} = "mkfontdir mkfontscale encodings"