summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-12-01 22:36:52 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-12-01 22:36:52 +0000
commit9da116be59a7a608285a0f16da7e9a31566b5ccb (patch)
treed85f70784fd882aaf30b901e60cdce5c9e48c518 /classes
parent4ecc73daa223da420e273e74cf8eff18a95d4a33 (diff)
parent7181f2f12b9b48fa6666973da0e9c82ea9e57bd7 (diff)
merge of '80401af978389dc31680f5749d9a6b066bbee542'
and 'eb184b297334b4fd07df0787e5149d8be2c97b65'
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass25
-rw-r--r--classes/cross.bbclass2
-rw-r--r--classes/debian.bbclass2
-rw-r--r--classes/package.bbclass53
-rw-r--r--classes/siteinfo.bbclass1
5 files changed, 27 insertions, 56 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 1794382699..7526dff65e 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -315,7 +315,9 @@ oe_libinstall() {
# stop libtool using the final directory name for libraries
# in staging:
__runcmd rm -f $destpath/$libname.la
- __runcmd sed -e 's/^installed=yes$/installed=no/' -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' $dotlai >$destpath/$libname.la
+ __runcmd sed -e 's/^installed=yes$/installed=no/' \
+ -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \
+ $dotlai >$destpath/$libname.la
else
__runcmd install -m 0644 $dotlai $destpath/$libname.la
fi
@@ -702,7 +704,7 @@ do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${layout_bindir} ${STAGING_DI
addtask populate_staging after do_install
python do_populate_staging () {
- bb.build.exec_func('do_stage', d)
+ bb.build.exec_func('do_stage', d)
}
addtask install after do_compile
@@ -744,7 +746,7 @@ def explode_deps(s):
def packaged(pkg, d):
import os, bb
- return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK)
+ return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK)
def read_pkgdatafile(fn):
pkgdata = {}
@@ -768,16 +770,23 @@ def read_pkgdatafile(fn):
return pkgdata
+def get_subpkgedata_fn(pkg, d):
+ import bb, os
+ archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ")
+ archs.reverse()
+ for arch in archs:
+ fn = bb.data.expand('${STAGING_DIR}/pkgdata/' + arch + '${TARGET_VENDOR}-${TARGET_OS}/runtime/%s' % pkg, d)
+ if os.path.exists(fn):
+ return fn
+ return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
+
def has_subpkgdata(pkg, d):
import bb, os
- fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
- return os.access(fn, os.R_OK)
+ return os.access(get_subpkgedata_fn(pkg, d), os.R_OK)
def read_subpkgdata(pkg, d):
import bb, os
- fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
- return read_pkgdatafile(fn)
-
+ return read_pkgdatafile(get_subpkgedata_fn(pkg, d))
def has_pkgdata(pn, d):
import bb, os
diff --git a/classes/cross.bbclass b/classes/cross.bbclass
index 6e5480a2a0..89cb3e9569 100644
--- a/classes/cross.bbclass
+++ b/classes/cross.bbclass
@@ -20,6 +20,8 @@ CXXFLAGS = "${BUILD_CFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE}"
+TOOLCHAIN_OPTIONS = ""
+
# Overrides for paths
# Path prefixes
diff --git a/classes/debian.bbclass b/classes/debian.bbclass
index a38f10d629..dd0789adae 100644
--- a/classes/debian.bbclass
+++ b/classes/debian.bbclass
@@ -1,5 +1,3 @@
-STAGING_PKGMAPS_DIR = "${STAGING_DIR}/pkgmaps/debian"
-
# Debian package renaming only occurs when a package is built
# We therefore have to make sure we build all runtime packages
# before building the current package to make the packages runtime
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 6c61f7bdda..67aeb33a13 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -34,9 +34,6 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
return
packages = bb.data.getVar('PACKAGES', d, 1).split()
- if not packages:
- # nothing to do
- return
if postinst:
postinst = '#!/bin/sh\n' + postinst + '\n'
@@ -189,42 +186,15 @@ def runstrip(file, d):
# Package data handling routines
#
-STAGING_PKGMAPS_DIR ?= "${STAGING_DIR}/pkgmaps"
-
-def add_package_mapping (pkg, new_name, d):
- import bb, os
-
- def encode(str):
- import codecs
- c = codecs.getencoder("string_escape")
- return c(str)[0]
-
- pmap_dir = bb.data.getVar('STAGING_PKGMAPS_DIR', d, 1)
-
- bb.mkdirhier(pmap_dir)
-
- data_file = os.path.join(pmap_dir, pkg)
-
- f = open(data_file, 'w')
- f.write("%s\n" % encode(new_name))
- f.close()
-
def get_package_mapping (pkg, d):
import bb, os
- def decode(str):
- import codecs
- c = codecs.getdecoder("string_escape")
- return c(str)[0]
+ data = read_subpkgdata(pkg, d)
+ key = "PKG_%s" % pkg
- data_file = bb.data.expand("${STAGING_PKGMAPS_DIR}/%s" % pkg, d)
+ if key in data:
+ return data[key]
- if os.access(data_file, os.R_OK):
- f = file(data_file, 'r')
- lines = f.readlines()
- f.close()
- for l in lines:
- return decode(l).strip()
return pkg
def runtime_mapping_rename (varname, d):
@@ -258,9 +228,6 @@ python package_do_split_locales() {
return
packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
- if not packages:
- bb.debug(1, "no packages to build; not splitting locales")
- return
datadir = bb.data.getVar('datadir', d, 1)
if not datadir:
@@ -410,9 +377,6 @@ python populate_packages () {
bb.mkdirhier(dvar)
packages = bb.data.getVar('PACKAGES', d, 1)
- if not packages:
- bb.debug(1, "PACKAGES not defined, nothing to package")
- return
pn = bb.data.getVar('PN', d, 1)
if not pn:
@@ -516,8 +480,6 @@ python populate_packages () {
pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1)
if pkgname is None:
bb.data.setVar('PKG_%s' % pkg, pkg, d)
- else:
- add_package_mapping(pkg, pkgname, d)
dangling_links = {}
pkg_files = {}
@@ -604,6 +566,8 @@ python emit_pkgdata() {
sf.close()
allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % pkg, d, 1)
+ if not allow_empty:
+ allow_empty = bb.data.getVar('ALLOW_EMPTY', d, 1)
root = "%s/install/%s" % (workdir, pkg)
os.chdir(root)
g = glob('*')
@@ -903,10 +867,7 @@ python package_depchains() {
prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, 1) or '').split()
def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
- def packaged(pkg, d):
- return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK)
-
- #bb.note('rdepends for %s is %s' % (base, rdepends))
+ #bb.note('rdepends for %s is %s' % (base, rdepends))
rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "")
diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass
index c41a3ff369..a3b67b5798 100644
--- a/classes/siteinfo.bbclass
+++ b/classes/siteinfo.bbclass
@@ -25,6 +25,7 @@ def get_siteinfo_list(d):
"armeb-linux-gnueabi": "endian-big bit-32 common-glibc arm-common armeb-linux",\
"armeb-linux-uclibc": "endian-big bit-32 common-uclibc arm-common",\
"armeb-linux-uclibcgnueabi": "endian-big bit-32 common-uclibc arm-common armeb-linux-uclibc",\
+ "arm-darwin": "endian-little bit-32 common-darwin",\
"arm-linux": "endian-little bit-32 common-glibc arm-common",\
"arm-linux-gnueabi": "endian-little bit-32 common-glibc arm-common arm-linux",\
"arm-linux-uclibc": "endian-little bit-32 common-uclibc arm-common",\