diff options
| author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2007-10-07 00:34:07 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2007-10-07 00:34:07 +0000 |
| commit | 2f8521c6d1173dd650d9ae2bba8c18e690fa3b1f (patch) | |
| tree | 06bc2b997b60797bc42f696f3427f92890089d2b /classes | |
| parent | 0d0bf315513039bd8560ac91865c7174e789d675 (diff) | |
| parent | 6e90aae26efa66553063b74b9afa9563b70fb982 (diff) | |
merge of '603b2d0c7e4ad80e5779bd3bbdb822331cc0ea2b'
and '6ab53da82d157971966f5a17d0c29d54df22cac9'
Diffstat (limited to 'classes')
35 files changed, 814 insertions, 469 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 9998982bd1..999d409914 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -374,6 +374,9 @@ oe_machinstall() { fi } +# Remove and re-create ${D} so that is it guaranteed to be empty +do_install[cleandirs] = "${D}" + addtask listtasks do_listtasks[nostamp] = "1" python do_listtasks() { @@ -482,8 +485,11 @@ python base_do_fetch() { (type,host,path,_,_,_) = bb.decodeurl(url) uri = "%s://%s%s" % (type,host,path) try: - if not base_chk_file(parser, pn, pv,uri, localpath, d): - bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri)) + if not base_chk_file(parser, pn, pv,uri, localpath, d): + if type != "file": + bb.note("%s-%s: %s has no entry in conf/checksums.ini, not checking URI" % (pn,pv,uri)) + else: + bb.debug("%s-%s: %s has no entry in conf/checksums.ini, not checking URI" % (pn,pv,uri)) except Exception: raise bb.build.FuncFailed("Checksum of '%s' failed" % uri) } @@ -573,10 +579,6 @@ python base_do_unpack() { local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata) except bb.MalformedUrl, e: raise FuncFailed('Unable to generate local path for malformed uri: %s' % e) - # dont need any parameters for extraction, strip them off - # RP: Insane. localpath shouldn't have parameters - # RP: Scehdule for removal with bitbake 1.8.8 - local = re.sub(';.*$', '', local) local = os.path.realpath(local) ret = oe_unpack_file(local, localdata, url) if not ret: @@ -681,7 +683,8 @@ do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${T ${STAGING_DATADIR} \ ${S} ${B}" -addtask populate_staging after do_package_write +# Could be compile but populate_staging and do_install shouldn't run at the same time +addtask populate_staging after do_install python do_populate_staging () { bb.build.exec_func('do_stage', d) @@ -724,7 +727,7 @@ def explode_deps(s): def packaged(pkg, d): import os, bb - return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK) + return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK) def read_pkgdatafile(fn): pkgdata = {} @@ -750,23 +753,23 @@ def read_pkgdatafile(fn): def has_subpkgdata(pkg, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d) + fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) return os.access(fn, os.R_OK) def read_subpkgdata(pkg, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d) + fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) return read_pkgdatafile(fn) def has_pkgdata(pn, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d) + fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) return os.access(fn, os.R_OK) def read_pkgdata(pn, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d) + fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) return read_pkgdatafile(fn) python read_subpackage_metadata () { @@ -847,7 +850,6 @@ def base_after_parse(d): paths = [] for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: - paths.append(bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)) path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d) if os.path.isdir(path): paths.append(path) @@ -864,65 +866,10 @@ def base_after_parse(d): bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d) return -# -# Various backwards compatibility stuff to be removed -# when we switch to bitbake 1.8.2+ as a minimum version -# -def base_oldbitbake_workarounds(d): - import bb - from bb import __version__ - from distutils.version import LooseVersion - - if (LooseVersion(__version__) > "1.8.0"): - return - - pn = bb.data.getVar('PN', d, True) - srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, True) - if srcdate != None: - bb.data.setVar('SRCDATE', srcdate, d) - depends = bb.data.getVar('DEPENDS', d, False) - patchdeps = bb.data.getVar("PATCHTOOL", d, True) - if patchdeps: - patchdeps = "%s-native " % patchdeps - if not patchdeps in bb.data.getVar("PROVIDES", d, True): - depends = patchdeps + depends - if bb.data.inherits_class('rootfs_ipk', d): - depends = "ipkg-native ipkg-utils-native fakeroot-native " + depends - if bb.data.inherits_class('rootfs_deb', d): - depends = "dpkg-native apt-native fakeroot-native " + depends - if bb.data.inherits_class('image', d): - depends = "makedevs-native " + depends - for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split(): - deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "" - if deps: - depends = depends + " %s" % deps - for dep in (bb.data.getVar('EXTRA_IMAGEDEPENDS', d, True) or "").split(): - depends = depends + " %s" % dep - - packages = bb.data.getVar('PACKAGES', d, True) - if packages != '': - if bb.data.inherits_class('package_ipk', d): - depends = "ipkg-utils-native " + depends - if bb.data.inherits_class('package_deb', d): - depends = "dpkg-native " + depends - if bb.data.inherits_class('package', d): - depends = "${PACKAGE_DEPENDS} fakeroot-native " + depends - - bb.data.setVar('DEPENDS', depends, d) - python () { - base_oldbitbake_workarounds(d) base_after_parse(d) } -# Remove me when we switch to bitbake 1.8.8 -def base_get_srcrev(d): - import bb - - if hasattr(bb.fetch, "get_srcrev"): - return bb.fetch.get_srcrev(d) - return "NOT IMPLEMENTED" - # Patch handling inherit patch diff --git a/classes/debian.bbclass b/classes/debian.bbclass index a0c78a25f4..a38f10d629 100644 --- a/classes/debian.bbclass +++ b/classes/debian.bbclass @@ -4,11 +4,13 @@ STAGING_PKGMAPS_DIR = "${STAGING_DIR}/pkgmaps/debian" # We therefore have to make sure we build all runtime packages # before building the current package to make the packages runtime # depends are correct -BUILD_ALL_DEPS = "1" - +# # Better expressed as ensure all RDEPENDS package before we package # This means we can't have circular RDEPENDS/RRECOMMENDS -do_package_write[rdeptask] = "do_package" +do_package_write_ipk[rdeptask] = "do_package" +do_package_write_deb[rdeptask] = "do_package" +do_package_write_tar[rdeptask] = "do_package" +do_package_write_rpm[rdeptask] = "do_package" python debian_package_name_hook () { import glob, copy, stat, errno, re diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass index d23c2a3b2e..c07a9911cd 100644 --- a/classes/distutils.bbclass +++ b/classes/distutils.bbclass @@ -9,7 +9,15 @@ distutils_do_compile() { distutils_stage_headers() { BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ ${STAGING_BINDIR_NATIVE}/python setup.py install_headers --install-dir=${STAGING_INCDIR}/${PYTHON_DIR} || \ - oefatal "python setup.py install execution failed." + oefatal "python setup.py install_headers execution failed." +} + +distutils_stage_all() { + install -d ${STAGING_INCDIR}/../${PYTHON_DIR}/site-packages + PYTHONPATH=${STAGING_INCDIR}/../${PYTHON_DIR}/site-packages \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${STAGING_INCDIR}/.. --install-data=${STAGING_INCDIR}/../share || \ + oefatal "python setup.py install (stage) execution failed." } distutils_do_install() { @@ -35,6 +43,7 @@ distutils_do_install() { done fi + rm -f ${D}${libdir}/${PYTHON_DIR}/site-packages/easy-install.pth } EXPORT_FUNCTIONS do_compile do_install diff --git a/classes/efl_base.bbclass b/classes/efl_base.bbclass index 7f170d70f2..3865441779 100644 --- a/classes/efl_base.bbclass +++ b/classes/efl_base.bbclass @@ -1,10 +1,5 @@ inherit autotools pkgconfig -#do_prepsources () { -# make clean distclean || true -#} -#addtask prepsources after do_fetch before do_unpack - SECTION = "e/libs" HOMEPAGE = "http://www.enlightenment.org" SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}" @@ -17,4 +12,3 @@ do_stage() { PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev" FILES_${PN}-dev += "${bindir}/${PN}-config ${libdir}/pkgconfig/* ${libdir}/lib*.?a ${libdir}/lib*.a" - diff --git a/classes/gnome.bbclass b/classes/gnome.bbclass index 8643989b73..b29d86cefd 100644 --- a/classes/gnome.bbclass +++ b/classes/gnome.bbclass @@ -1,6 +1,6 @@ def gnome_verdir(v): import re - m = re.match("([0-9]+)\.([0-9]+)\..*", v) + m = re.match("^([0-9]+)\.([0-9]+)", v) return "%s.%s" % (m.group(1), m.group(2)) SECTION ?= "x11/gnome" @@ -13,8 +13,6 @@ FILES_${PN} += "${datadir}/application-registry ${datadir}/mime-info \ inherit autotools pkgconfig gconf -EXTRA_AUTORECONF += "-I ${STAGING_DIR}/${HOST_SYS}/share/aclocal/gnome2-macros" - gnome_stage_includes() { autotools_stage_includes } diff --git a/classes/gtk-binver.bbclass b/classes/gtk-binver.bbclass index 8398cc5424..52082492e7 100644 --- a/classes/gtk-binver.bbclass +++ b/classes/gtk-binver.bbclass @@ -1,7 +1,7 @@ def gtkbinver_find(d): import bb try: - for line in file( "%s/gtk+-2.0.pc" % bb.data.getVar('PKG_CONFIG_PATH', d, 1) ).readlines(): + for line in file( "%s/gtk+-2.0.pc" % bb.data.getVar('PKG_CONFIG_DIR', d, 1) ).readlines(): if line.startswith( "gtk_binary_version" ): # bb.note( "gtk_binary_version = '%s'" % line.split("=")[1].strip() ) return line.split("=")[1].strip() diff --git a/classes/image.bbclass b/classes/image.bbclass index 248ccab60b..3420e3f53a 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -1,10 +1,14 @@ inherit rootfs_${IMAGE_PKGTYPE} +LICENSE = "MIT" PACKAGES = "" +RDEPENDS += "${IMAGE_INSTALL}" + +IMAGE_BASENAME[export] = "1" +export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" # We need to recursively follow RDEPENDS and RRECOMMENDS for images -BUILD_ALL_DEPS = "1" -do_rootfs[recrdeptask] = "do_package_write do_deploy do_populate_staging" +do_rootfs[recrdeptask] += "do_deploy do_populate_staging" # Images are generally built explicitly, do not need to be part of world. EXCLUDE_FROM_WORLD = "1" @@ -51,15 +55,14 @@ def get_devtable_list(d): return str IMAGE_POSTPROCESS_COMMAND ?= "" +MACHINE_POSTPROCESS_COMMAND ?= "" +ROOTFS_POSTPROCESS_COMMAND ?= "" # some default locales IMAGE_LINGUAS ?= "de-de fr-fr en-gb" LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, bb.data.getVar('IMAGE_LINGUAS', d, 1).split()))}" -ROOTFS_POSTPROCESS_COMMAND ?= "" -MACHINE_POSTPROCESS_COMMAND ?= "" - do_rootfs[nostamp] = "1" do_rootfs[dirs] = "${TOPDIR}" do_build[nostamp] = "1" @@ -69,9 +72,9 @@ do_build[nostamp] = "1" fakeroot do_rootfs () { set -x rm -rf ${IMAGE_ROOTFS} + mkdir -p ${IMAGE_ROOTFS} if [ "${USE_DEVFS}" != "1" ]; then - mkdir -p ${IMAGE_ROOTFS}/dev for devtable in ${@get_devtable_list(d)}; do makedevs -r ${IMAGE_ROOTFS} -D $devtable done diff --git a/classes/insane.bbclass b/classes/insane.bbclass index d54d6c7b9e..83f8c43bba 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -101,7 +101,7 @@ def package_qa_get_elf(path, bits32): def my_assert(expectation, result): if not expectation == result: #print "'%x','%x'" % (ord(expectation), ord(result)) - raise "This does not work as expected" + raise Exception("This does not work as expected") my_assert = staticmethod(my_assert) def __init__(self, name): @@ -124,13 +124,13 @@ def package_qa_get_elf(path, bits32): self.sex = self.data[ELFFile.EI_DATA] if self.sex == chr(ELFFile.ELFDATANONE): - raise "Can't be" + raise Exception("self.sex == ELFDATANONE") elif self.sex == chr(ELFFile.ELFDATA2LSB): self.sex = "<" elif self.sex == chr(ELFFile.ELFDATA2MSB): self.sex = ">" else: - raise "Even more worse" + raise Exception("Unknown self.sex") def osAbi(self): return ord(self.data[ELFFile.EI_OSABI]) @@ -376,7 +376,7 @@ def package_qa_check_rdepends(pkg, workdir, d): bb.data.setVar('ROOT', '', localdata) bb.data.setVar('ROOT_%s' % pkg, root, localdata) - pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1) + pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, True) if not pkgname: pkgname = pkg bb.data.setVar('PKG', pkgname, localdata) diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 0670da678d..5976f42c71 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -142,6 +142,7 @@ kernel_do_install() { install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} + install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} install -d ${D}/etc/modutils if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then install -d ${D}/etc/modprobe.d @@ -160,6 +161,18 @@ kernel_do_configure() { yes '' | oe_runmake oldconfig } +do_menuconfig() { + export TERMWINDOWTITLE="${PN} Kernel Configuration" + export SHELLCMDS="make menuconfig" + ${TERMCMDRUN} + if [ $? -ne 0 ]; then + echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable." + exit 1 + fi +} +do_menuconfig[nostamp] = "1" +addtask menuconfig after do_patch + pkg_postinst_kernel () { cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true } @@ -174,12 +187,15 @@ EXPORT_FUNCTIONS do_compile do_install do_stage do_configure # kernel-base becomes kernel-${KERNEL_VERSION} # kernel-image becomes kernel-image-${KERNEL_VERISON} -PACKAGES = "kernel kernel-base kernel-image kernel-dev" +PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux" FILES = "" FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" FILES_kernel-dev = "/boot/System.map* /boot/config*" +FILES_kernel-vmlinux = "/boot/vmlinux*" RDEPENDS_kernel = "kernel-base" -RDEPENDS_kernel-base = "kernel-image" +# Allow machines to override this dependency if kernel image files are +# not wanted in images as standard +RDEPENDS_kernel-base ?= "kernel-image" PKG_kernel-image = "kernel-image-${KERNEL_VERSION}" PKG_kernel-base = "kernel-${KERNEL_VERSION}" ALLOW_EMPTY_kernel = "1" diff --git a/classes/meta.bbclass b/classes/meta.bbclass index f7d41eec26..d35c40bccd 100644 --- a/classes/meta.bbclass +++ b/classes/meta.bbclass @@ -1,5 +1,4 @@ PACKAGES = "" -BUILD_ALL_DEPS = "1" do_build[recrdeptask] = "do_build"
\ No newline at end of file diff --git a/classes/mono.bbclass b/classes/mono.bbclass new file mode 100644 index 0000000000..c50274ed0c --- /dev/null +++ b/classes/mono.bbclass @@ -0,0 +1,218 @@ +def mono_get_file_table(packageversion, d): + # The packageversion is currently ignored, but might be used in the future + # if more than one mono version is available and different versions + # need to use different tables + + import bb, sys, os, glob, commands + curdir = os.path.dirname( bb.data.getVar('FILE', d, 1) ) + if curdir not in sys.path: sys.path.append( curdir ) + from mono_files import debian_mono_file_table + + # mono-jay is not being built (for all platforms at least) + IGNORE = ("mono-jay", ) + file_table = [ + # Standard package + {"name": "mono-doc"}, + + # Virtual packages + {"name": "mono"}, + {"name": "mono-runtime"}, + + # Not provided by Debian: + {"name": "libnunit2.2-cil", + "patterns": [ + "/usr/lib/mono/gac/nunit.*/2.2.*", + "/usr/lib/mono/1.0/nunit.*.dll", + "/usr/lib/pkgconfig/mono-nunit.pc", + ], + "assemblies": [ + ("nunit.core", "2.2.0.0"), + ("nunit.framework", "2.2.0.0"), + ("nunit.util", "2.2.0.0"), + ("nunit.mocks", "2.2.8.0"), + ], + }, + {"name": "libmono-cecil0.5-cil", + "patterns": [ + "/usr/lib/mono/gac/Mono.Cecil/0.5.*", + ], + "assemblies": [ + ("Mono.Cecil", "0.5.*"), + ], + }, + {"name": "libmono-db2-1.0-cil", + "patterns": [ + "/usr/lib/mono/gac/IBM.Data.DB2/1.0*", + "/usr/lib/mono/1.0/IBM.Data.DB2.dll", + ], + "assemblies": [ + ("IBM.Data.DB2", "1.0*"), + ], + }, + ] + debian_mono_file_table + + file_table = [e for e in file_table + if not (e.has_key("name") and e["name"] in IGNORE)] + + return file_table + +def mono_find_provides_and_requires(files, d): + provides = [] + requires = [] + + import bb, os, commands + + pathprefix = "export PATH=%s; export LANG=; export LC_ALL=; " % bb.data.getVar('PATH', d, 1) + for filename in files: + if not filename.endswith(".dll") and not filename.endswith(".exe"): + continue + if not os.path.isfile(filename) or os.path.islink(filename): + continue + + ## Provides + name, version = None, None + + ret, result = commands.getstatusoutput("%smonodis --assembly '%s'" % (pathprefix, filename)) + if ret: + bb.error("raw_provides_and_requires: monodis --assembly '%s' failed, dependency information will be inaccurate" % filename) + continue + for line in result.splitlines(): + if not ":" in line: continue + key, value = line.split(":", 1) + if key.strip() == "Name": + name = value.strip() + elif key.strip() == "Version": + version = value.strip() + if name is not None and version is not None: + if (name, version) not in provides: + provides.append( (name, version) ) + + ## Requires + name, version = None, None + ret, result = commands.getstatusoutput("%smonodis --assemblyref '%s'" % (pathprefix, filename)) + if ret: + bb.error("raw_provides_and_requires: monodis --assemblyref '%s' failed, dependency information will be inaccurate" % filename) + continue + for line in result.splitlines(): + if not "=" in line: continue + key, value = line.split("=", 1) + if ":" in key and key.split(":",1)[1].strip() == "Version": + version = value.strip() + elif key.strip() == "Name": + name = value.strip() + if name is not None and version is not None: + if (name, version) not in requires: + requires.append( (name, version) ) + name, version = None, None + + # Remove everything from requires that's already in provides as it's not actually required + # to be provided externally + requires = [e for e in requires if not e in provides] + return provides, requires + +python mono_do_clilibs() { + import bb, os, re, os.path + + exclude_clilibs = bb.data.getVar('EXCLUDE_FROM_CLILIBS', d, 0) + if exclude_clilibs: + bb.note("not generating clilibs") + return + + lib_re = re.compile("^lib.*\.so") + libdir_re = re.compile(".*/lib$") + + packages = bb.data.getVar('PACKAGES', d, 1) + + workdir = bb.data.getVar('WORKDIR', d, 1) + if not workdir: + bb.error("WORKDIR not defined") + return + + staging = bb.data.getVar('STAGING_DIR', d, 1) + if not staging: + bb.error("STAGING_DIR not defined") + return + + pkgdest = bb.data.getVar('PKGDEST', d, 1) + + clilibs_dir = os.path.join(staging, "clilibs") + bb.mkdirhier(clilibs_dir) + + provides, requires = {}, {} + private_libs = bb.data.getVar('PRIVATE_CLILIBS', d, 1) + for pkg in packages.split(): + bb.debug(2, "calculating clilib provides for %s" % pkg) + + files_to_check = [] + top = os.path.join(pkgdest, pkg) + for root, dirs, files in os.walk(top): + for file in files: + path = os.path.join(root, file) + if file.endswith(".exe") or file.endswith(".dll"): + files_to_check.append( path ) + provides[pkg], requires[pkg] = mono_find_provides_and_requires(files_to_check, d) + clilibs_file = os.path.join(clilibs_dir, pkg + ".list") + if os.path.exists(clilibs_file): + os.remove(clilibs_file) + if len(provides[pkg]) > 0: + fd = open(clilibs_file, 'w') + for s in provides[pkg]: + fd.write(" ".join(s) + '\n') + fd.close() + + clilib_provider = {} + list_re = re.compile('^(.*)\.list$') + for file in os.listdir(clilibs_dir): + m = list_re.match(file) + if m: + dep_pkg = m.group(1) + fd = open(os.path.join(clilibs_dir, file)) + lines = fd.readlines() + fd.close() + for l in lines: + clilib_provider[tuple(l.rstrip().split())] = dep_pkg + + for pkg in packages.split(): + bb.debug(2, "calculating clilib requirements for %s" % pkg) + + deps = [] + for n in requires[pkg]: + if n in clilib_provider.keys(): + dep_pkg = clilib_provider[n] + + if dep_pkg == pkg: + continue + + if not dep_pkg in deps: + deps.append(dep_pkg) + else: + bb.note("Couldn't find CLI library provider for %s" % (n,)) + + deps_file = os.path.join(pkgdest, pkg + ".clilibdeps") + if os.path.exists(deps_file): + os.remove(deps_file) + if len(deps) > 0: + fd = open(deps_file, 'w') + for dep in deps: + fd.write(dep + '\n') + fd.close() +} + +def mono_after_parse(d): + import bb + # Insert mono_do_clilibs into PACKAGEFUNCS + # Needs to be called after populate_packages, but before read_shlibdeps + PACKAGEFUNCS = bb.data.getVar("PACKAGEFUNCS", d, 1) + if PACKAGEFUNCS: + PACKAGEFUNCS = PACKAGEFUNCS.split() + if "read_shlibdeps" in PACKAGEFUNCS: + i = PACKAGEFUNCS.index("read_shlibdeps") + PACKAGEFUNCS.insert(i, "mono_do_clilibs") + elif "populate_packages" in PACKAGEFUNCS: + i = PACKAGEFUNCS.index("populate_packages") + PACKAGEFUNCS.insert(i+1, "mono_do_clilibs") + bb.data.setVar("PACKAGEFUNCS", " ".join(PACKAGEFUNCS), d) + +python () { + mono_after_parse(d) +} diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass index 4187a00ec3..945d22bfe0 100644 --- a/classes/multimachine.bbclass +++ b/classes/multimachine.bbclass @@ -1,6 +1,7 @@ STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}" WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}" STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel" +PKGDATA_DIR = "${STAGING_DIR}/pkgdata/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}" # Find any machine specific sub packages and if present, mark the # whole package as machine specific for multimachine purposes. diff --git a/classes/native.bbclass b/classes/native.bbclass index 43000f96bf..104d5a49da 100644 --- a/classes/native.bbclass +++ b/classes/native.bbclass @@ -11,13 +11,6 @@ PACKAGE_ARCH = "${BUILD_ARCH}" # RPROVIDES becomes unnecessary. RPROVIDES = "${PN}" -# Need to resolve package RDEPENDS as well as DEPENDS -BUILD_ALL_DEPS = "1" - -# Break the circular dependency as a result of DEPENDS -# in package.bbclass -PACKAGE_DEPENDS = "" - TARGET_ARCH = "${BUILD_ARCH}" TARGET_OS = "${BUILD_OS}" TARGET_VENDOR = "${BUILD_VENDOR}" @@ -98,3 +91,5 @@ do_stage () { do_install () { true } + +PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass index 872dd4915c..ef734e4311 100644 --- a/classes/openmoko2.bbclass +++ b/classes/openmoko2.bbclass @@ -29,5 +29,5 @@ S = "${WORKDIR}/${PN}" FILES_${PN} += "${datadir}/icons" -# SVNREV = "r${SRCREV}" -SVNREV = "${SRCDATE}" +SVNREV = "r${SRCREV}" +#SVNREV = "${SRCDATE}" diff --git a/classes/package.bbclass b/classes/package.bbclass index 95e4acd4d6..b114049b8e 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -2,6 +2,8 @@ # General packaging help functions # +PKGDEST = "${WORKDIR}/install" + def legitimize_package_name(s): """ Make sure package names are legitimate strings @@ -120,75 +122,68 @@ PACKAGE_DEPENDS += "file-native" |
