summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/base.bbclass10
-rw-r--r--meta/conf/bitbake.conf17
2 files changed, 22 insertions, 5 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 76b21382f5..404c319d04 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -167,6 +167,14 @@ def base_both_contain(variable1, variable2, checkvalue, d):
167 167
168DEPENDS_prepend="${@base_dep_prepend(d)} " 168DEPENDS_prepend="${@base_dep_prepend(d)} "
169 169
170def base_prune_suffix(var, suffixes, d):
171 # See if var ends with any of the suffixes listed and
172 # remove it if found
173 for suffix in suffixes:
174 if var.endswith(suffix):
175 return var.replace(suffix, "")
176 return var
177
170def base_set_filespath(path, d): 178def base_set_filespath(path, d):
171 import os, bb 179 import os, bb
172 filespath = [] 180 filespath = []
@@ -177,7 +185,7 @@ def base_set_filespath(path, d):
177 filespath.append(os.path.join(p, o)) 185 filespath.append(os.path.join(p, o))
178 return ":".join(filespath) 186 return ":".join(filespath)
179 187
180FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}" 188FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
181 189
182def oe_filter(f, str, d): 190def oe_filter(f, str, d):
183 from re import match 191 from re import match
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index fddfd1ffe0..4387ef061c 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -144,13 +144,20 @@ EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
144DEBPV = "${EXTENDPEVER}${PV}-${PR}" 144DEBPV = "${EXTENDPEVER}${PV}-${PR}"
145P = "${PN}-${PV}" 145P = "${PN}-${PV}"
146 146
147# Base package name
148# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
149# otherwise it is the same as PN and P
150SPECIAL_PKGSUFFIX = "-native -cross -sdk -cross-sdk -initial -intermediate"
151BPN = "${@base_prune_suffix(bb.data.getVar('PN', d, True), bb.data.getVar('SPECIAL_PKGSUFFIX', d, True).split(), d)}"
152BP = "${BPN}-${PV}"
153
147# Package info. 154# Package info.
148 155
149SECTION = "base" 156SECTION = "base"
150PRIORITY = "optional" 157PRIORITY = "optional"
151DESCRIPTION = "Version ${PV}-${PR} of package ${PN}" 158DESCRIPTION = "Version ${PV}-${PR} of package ${PN}"
152LICENSE = "unknown" 159LICENSE = "unknown"
153MAINTAINER = "OpenedHand <poky@openedhand.com>" 160MAINTAINER = "Poky Team <poky@openedhand.com>"
154HOMEPAGE = "unknown" 161HOMEPAGE = "unknown"
155 162
156# Package dependencies and provides. 163# Package dependencies and provides.
@@ -210,8 +217,10 @@ FILES_${PN}-locale = "${datadir}/locale"
210# File manifest 217# File manifest
211 218
212FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}" 219FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
213FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" 220# FILESPATH is set in base.bbclass
214FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}" 221#FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
222# Giving FILESDIR this default value is pointless as FILESPATH is always searched first - RP
223#FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
215 224
216################################################################## 225##################################################################
217# General work and output directories for the build system. 226# General work and output directories for the build system.
@@ -230,7 +239,7 @@ STAMP = "${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}"
230WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" 239WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}"
231T = "${WORKDIR}/temp" 240T = "${WORKDIR}/temp"
232D = "${WORKDIR}/image" 241D = "${WORKDIR}/image"
233S = "${WORKDIR}/${P}" 242S = "${WORKDIR}/${BP}"
234B = "${S}" 243B = "${S}"
235 244
236STAGING_DIR = "${TMPDIR}/staging" 245STAGING_DIR = "${TMPDIR}/staging"