diff options
-rw-r--r-- | classes/base.bbclass | 8 | ||||
-rw-r--r-- | classes/package.bbclass | 6 | ||||
-rw-r--r-- | classes/package_ipk.bbclass | 3 | ||||
-rw-r--r-- | classes/package_rpm.bbclass | 3 | ||||
-rw-r--r-- | classes/package_tar.bbclass | 3 | ||||
-rw-r--r-- | classes/src_distribute.bbclass | 40 | ||||
-rw-r--r-- | packages/meta/task-python-everything_0.9.1.bb | 62 | ||||
-rw-r--r-- | packages/misc-binary-only/tda1004x-firmware.bb | 38 |
8 files changed, 150 insertions, 13 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 4c2c58e8d2..1ce9918cb8 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -314,9 +314,9 @@ addtask fetch do_fetch[dirs] = "${DL_DIR}" do_fetch[nostamp] = "1" python base_do_fetch() { - import sys, copy + import sys - localdata = copy.deepcopy(d) + localdata = bb.data.createCopy(d) bb.data.update_data(localdata) src_uri = bb.data.getVar('SRC_URI', localdata, 1) @@ -393,9 +393,9 @@ def oe_unpack_file(file, data, url = None): addtask unpack after do_fetch do_unpack[dirs] = "${WORKDIR}" python base_do_unpack() { - import re, copy, os + import re, os - localdata = copy.deepcopy(d) + localdata = bb.data.createCopy(d) bb.data.update_data(localdata) src_uri = bb.data.getVar('SRC_URI', localdata) diff --git a/classes/package.bbclass b/classes/package.bbclass index 9abecd5550..d6a2193404 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -82,7 +82,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst bb.data.setVar('PACKAGES', ' '.join(packages), d) python populate_packages () { - import glob, stat, errno, re, copy + import glob, stat, errno, re workdir = bb.data.getVar('WORKDIR', d, 1) if not workdir: @@ -122,7 +122,7 @@ python populate_packages () { return (s[stat.ST_MODE] & stat.S_IEXEC) for pkg in packages.split(): - localdata = copy.deepcopy(d) + localdata = bb.data.createCopy(d) root = os.path.join(workdir, "install", pkg) os.system('rm -rf %s' % root) @@ -457,7 +457,7 @@ python package_do_pkgconfig () { for file in files: m = pc_re.match(file) if m: - pd = {} + pd = bb.data.init() name = m.group(1) pkgconfig_provided[pkg].append(name) path = os.path.join(root, file) diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index e1d87f6d9f..3c6125d9e3 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -98,8 +98,7 @@ python do_package_ipk () { return for pkg in packages.split(): - from copy import deepcopy - localdata = deepcopy(d) + localdata = bb.data.createCopy(d) root = "%s/install/%s" % (workdir, pkg) bb.data.setVar('ROOT', '', localdata) diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass index ff5e4ee3a8..c29ab5f423 100644 --- a/classes/package_rpm.bbclass +++ b/classes/package_rpm.bbclass @@ -108,8 +108,7 @@ python do_package_rpm () { packages = bb.data.expand(packages, d) for pkg in packages.split(): - from copy import copy, deepcopy - localdata = deepcopy(d) + localdata = bb.data.createCopy(d) root = "%s/install/%s" % (workdir, pkg) bb.data.setVar('ROOT', '', localdata) diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass index 2d169c7491..359e35f113 100644 --- a/classes/package_tar.bbclass +++ b/classes/package_tar.bbclass @@ -61,8 +61,7 @@ python do_package_tar () { return for pkg in packages.split(): - from copy import copy, deepcopy - localdata = deepcopy(d) + localdata = bb.data.createCopy(d) root = "%s/install/%s" % (workdir, pkg) bb.data.setVar('ROOT', '', localdata) diff --git a/classes/src_distribute.bbclass b/classes/src_distribute.bbclass index e69de29bb2..5daf526018 100644 --- a/classes/src_distribute.bbclass +++ b/classes/src_distribute.bbclass @@ -0,0 +1,40 @@ +include conf/licenses.conf + +SRC_DISTRIBUTECOMMAND[func] = "1" +python do_distribute_sources () { + l = bb.data.createCopy(d) + bb.data.update_data(l) + licenses = (bb.data.getVar('LICENSE', d, 1) or "").split() + if not licenses: + bb.note("LICENSE not defined") + src_distribute_licenses = (bb.data.getVar('SRC_DISTRIBUTE_LICENSES', d, 1) or "").split() + # Explanation: + # Space seperated items in LICENSE must *all* be distributable + # Each space seperated item may be used under any number of | seperated licenses. + # If any of those | seperated licenses are distributable, then that component is. + # i.e. LICENSE = "GPL LGPL" + # In this case, both components are distributable. + # LICENSE = "GPL|QPL|Proprietary" + # In this case, GPL is distributable, so the component is. + valid = 1 + for l in licenses: + lvalid = 0 + for i in l.split("|"): + if i in src_distribute_licenses: + lvalid = 1 + if lvalid != 1: + valid = 0 + if valid == 0: + bb.note("Licenses (%s) are not all listed in SRC_DISTRIBUTE_LICENSES, skipping source distribution" % licenses) + return + import re + for s in (bb.data.getVar('A', d, 1) or "").split(): + s = re.sub(';.*$', '', s) + cmd = bb.data.getVar('SRC_DISTRIBUTECOMMAND', d, 1) + if not cmd: + raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined") + bb.data.setVar('SRC', s, d) + bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d) +} + +addtask distribute_sources before do_build after do_fetch diff --git a/packages/meta/task-python-everything_0.9.1.bb b/packages/meta/task-python-everything_0.9.1.bb index e69de29bb2..90ec184e2d 100644 --- a/packages/meta/task-python-everything_0.9.1.bb +++ b/packages/meta/task-python-everything_0.9.1.bb @@ -0,0 +1,62 @@ +DESCRIPTION= "Everything Python" +MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>" +PR = "r1" +DEPENDS = " python-ao \ + python-constraint \ + python-crypto \ + python-dialog \ + python-egenix-mx-base \ + python-pycurl \ + python-fnorb \ + python-fpconst \ + python-gmpy \ + python-gnosis \ + python-hmm \ + python-irclib \ + python-irclib \ + python-logilab \ + python-libgmail \ + python-mad \ + python-native \ + python-numeric \ + python-ogg \ + python-pexpect \ + python-pychecker \ + python-pycodes \ + python-pygame \ + python-pygoogle \ + python-pygtk \ + python-pygtk2 \ + python-pylinda \ + python-pylint \ + python-pyqt \ + python-pyqwt \ + python-pyreverse \ + python-pyro \ + python-pyserial \ + python-pyxml \ + python-pyxmlrpc \ + python-quicklauncher \ + python-scapy \ + python-scons \ + python-sip \ + python-sgmlop \ + python-snmplib \ + python-soappy \ + python-pysqlite \ + python-pysqlite2 \ + python-tlslite \ + python-urwid \ + python-vmaps \ + python-vorbis \ + moin \ + plone \ + twisted \ + zope" +RDEPENDS=${DEPENDS} + +#fixme add python-pycap once libdnet is in again +#fixme add python-pyx once kpathwhich-native is there +#fixme add packages dynamically +#fixme python-numarray doesn't work with soft-float +LICENSE = MIT diff --git a/packages/misc-binary-only/tda1004x-firmware.bb b/packages/misc-binary-only/tda1004x-firmware.bb index e69de29bb2..bce3bac29f 100644 --- a/packages/misc-binary-only/tda1004x-firmware.bb +++ b/packages/misc-binary-only/tda1004x-firmware.bb @@ -0,0 +1,38 @@ +SECTION = "base" +DEPENDS = "unzip-native" + +SRC_URI = "http://hauppauge.lightpath.net/de/nova-pci216.exe" +FILES_${PN} = '*' + +python do_unpack() { + import re + + localdata = bb.data.createCopy(d) + overrides = bb.data.getVar('OVERRIDES', localdata, 1) + if not overrides: + raise bb.build.FuncFailed('OVERRIDES not defined') + bb.data.setVar('OVERRIDES', overrides+':'+bb.data.getVar('PN', localdata, 1), localdata) + + bb.data.update_data(localdata) + + src_uri = bb.data.getVar('SRC_URI', localdata) + if not src_uri: + return + src_uri = bb.data.expand(src_uri, localdata) + + local = bb.data.expand(bb.fetch.localpath(src_uri, localdata), localdata) + # dont need any parameters for extraction, strip them off + local = re.sub(';.*$', '', local) + bindir = bb.data.getVar('STAGING_BINDIR', localdata, 1) + cmd = '%s/unzip %s' % (bindir, local) + if not os.path.exists(bb.data.getVar('S', localdata, 1)): + os.mkdir(bb.data.getVar('S', localdata, 1)) + os.chdir(bb.data.getVar('S', localdata, 1)) + bb.note("Unpacking %s to %s/" % (local, os.getcwd())) + ret = os.system(cmd) +} + +do_install() { + install -d ${D}${prefix}/lib/hotplug/firmware + install -m 0644 software/OEM/PCI/App/ttlcdacc.dll ${D}${prefix}/lib/hotplug/firmware/tda1004x.bin +} |