bb.data.setVar(key, sdata[key], d)
}
-python __anonymous () {
- import exceptions
- need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1)
- if need_host:
- import re
- this_host = bb.data.getVar('HOST_SYS', d, 1)
- if not re.match(need_host, this_host):
- raise bb.parse.SkipPackage("incompatible with host %s" % this_host)
-
- need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1)
- if need_machine:
- import re
- this_machine = bb.data.getVar('MACHINE', d, 1)
- if this_machine and not re.match(need_machine, this_machine):
- raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
-
- pn = bb.data.getVar('PN', d, 1)
-
- # OBSOLETE in bitbake 1.7.4
- srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1)
- if srcdate != None:
- bb.data.setVar('SRCDATE', srcdate, d)
+def base_after_parse_two(d):
+ import bb
+ import exceptions
+ need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1)
+ if need_host:
+ import re
+ this_host = bb.data.getVar('HOST_SYS', d, 1)
+ if not re.match(need_host, this_host):
+ raise bb.parse.SkipPackage("incompatible with host %s" % this_host)
+
+ need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1)
+ if need_machine:
+ import re
+ this_machine = bb.data.getVar('MACHINE', d, 1)
+ if this_machine and not re.match(need_machine, this_machine):
+ raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
+
+ pn = bb.data.getVar('PN', d, 1)
+
+ # OBSOLETE in bitbake 1.7.4
+ srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1)
+ if srcdate != None:
+ bb.data.setVar('SRCDATE', srcdate, d)
+
+ use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1)
+ if use_nls != None:
+ bb.data.setVar('USE_NLS', use_nls, d)
+
+def base_after_parse(d):
+ import bb, os
+ mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1)
+ old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1)
+ if (old_arch == mach_arch):
+ # Nothing to do
+ return
+ if (bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) == '0'):
+ return
+ paths = []
+ for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]:
+ paths.append(bb.data.expand(os.path.join(p, mach_arch), d))
+ for s in bb.data.getVar('SRC_URI', d, 1).split():
+ local = bb.data.expand(bb.fetch.localpath(s, d), d)
+ for mp in paths:
+ if local.startswith(mp):
+ #bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch))
+ bb.data.setVar('PACKAGE_ARCH', mach_arch, d)
+ return
- use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1)
- if use_nls != None:
- bb.data.setVar('USE_NLS', use_nls, d)
-}
python () {
- import bb, os
- mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1)
- old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1)
- if (old_arch == mach_arch):
- # Nothing to do
- return
- if (bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) == '0'):
- return
- paths = []
- for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]:
- paths.append(bb.data.expand(os.path.join(p, mach_arch), d))
- for s in bb.data.getVar('SRC_URI', d, 1).split():
- local = bb.data.expand(bb.fetch.localpath(s, d), d)
- for mp in paths:
- if local.startswith(mp):
-# bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch))
- bb.data.setVar('PACKAGE_ARCH', mach_arch, d)
- return
+ base_after_parse_two(d)
+ base_after_parse(d)
}
+
# Patch handling
inherit patch
# gcc-3.4 blows up in gtktext with -frename-registers on arm-linux
python () {
- cflags = (bb.data.getVar('CFLAGS', d, 1) or '').replace('-frename-registers', '')
- bb.data.setVar('CFLAGS', cflags, d)
+ cflags = (bb.data.getVar('CFLAGS', d, 1) or '').replace('-frename-registers', '')
+ bb.data.setVar('CFLAGS', cflags, d)
}
+def gettext_after_parse(d):
+ import bb
+ # Remove the NLS bits if USE_NLS is no.
+ if bb.data.getVar('USE_NLS', d, 1) == 'no':
+ cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d)
+ cfg += " --disable-nls"
+ depends = bb.data.getVar('DEPENDS', d, 1) or ""
+ bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl)$', depends, d), d)
+ bb.data.setVar('EXTRA_OECONF', cfg, d)
+
python () {
- # Remove the NLS bits if USE_NLS is no.
- if bb.data.getVar('USE_NLS', d, 1) == 'no':
- cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d)
- cfg += " --disable-nls"
- depends = bb.data.getVar('DEPENDS', d, 1) or ""
- bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl)$', depends, d), d)
- bb.data.setVar('EXTRA_OECONF', cfg, d)
+ gettext_after_parse(d)
}
DEPENDS =+ "gettext-native"
# Find any machine specific sub packages and if present, mark the
# whole package as machine specific for multimachine purposes.
-python __anonymous () {
- packages = bb.data.getVar('PACKAGES', d, 1).split()
- macharch = bb.data.getVar('MACHINE_ARCH', d, 1)
- multiarch = bb.data.getVar('PACKAGE_ARCH', d, 1)
- for pkg in packages:
- pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1)
- # We could look for != PACKAGE_ARCH here but how to choose
- # if multiple differences are present?
- # Look through IPKG_ARCHS for the priority order?
- if pkgarch and pkgarch == macharch:
- multiarch = macharch
+def multi_machine_after_parse(d):
+ import bb
+ packages = bb.data.getVar('PACKAGES', d, 1).split()
+ macharch = bb.data.getVar('MACHINE_ARCH', d, 1)
+ multiarch = bb.data.getVar('PACKAGE_ARCH', d, 1)
+
+ for pkg in packages:
+ pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1)
+
+ # We could look for != PACKAGE_ARCH here but how to choose
+ # if multiple differences are present?
+ # Look through IPKG_ARCHS for the priority order?
+ if pkgarch and pkgarch == macharch:
+ multiarch = macharch
- bb.data.setVar('MULTIMACH_ARCH', multiarch, d)
+ bb.data.setVar('MULTIMACH_ARCH', multiarch, d)
+
+
+python __anonymous () {
+ multi_machine_after_parse(d)
}
update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
}
+def updatealternativesafterparse(d):
+ import bb
+ if bb.data.getVar('ALTERNATIVE_NAME', d) == None:
+ raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d)
+ if bb.data.getVar('ALTERNATIVE_PATH', d) == None:
+ raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d)
+
python __anonymous() {
- if bb.data.getVar('ALTERNATIVE_NAME', d) == None:
- raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d)
- if bb.data.getVar('ALTERNATIVE_PATH', d) == None:
- raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d)
+ updatealternativesafterparse(d)
}
python populate_packages_prepend () {
update-rc.d $D ${INITSCRIPT_NAME} remove
}
+
+def update_rc_after_parse(d):
+ import bb
+ if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None:
+ if bb.data.getVar('INITSCRIPT_NAME', d) == None:
+ raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d)
+ if bb.data.getVar('INITSCRIPT_PARAMS', d) == None:
+ raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d)
+
python __anonymous() {
- if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None:
- if bb.data.getVar('INITSCRIPT_NAME', d) == None:
- raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d)
- if bb.data.getVar('INITSCRIPT_PARAMS', d) == None:
- raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d)
+ update_rc_after_parse(d)
}
python populate_packages_prepend () {
}
python () {
- # Don't build apache unless we are building nativly
- target = bb.data.getVar("TARGET_ARCH", d, 1)
- build = bb.data.getVar("BUILD_ARCH", d, 1)
- if target != build:
- raise bb.parse.SkipPackage("Apache will only build nativly (TARGET_ARCH == BUILD_ARCH)")
+ # Don't build apache unless we are building nativly
+ target = bb.data.getVar("TARGET_ARCH", d, 1)
+ build = bb.data.getVar("BUILD_ARCH", d, 1)
+ if target != build:
+ raise bb.parse.SkipPackage("Apache will only build nativly (TARGET_ARCH == BUILD_ARCH)")
}
--- /dev/null
+
+python () {
+ if bb.data.getVar("USE_NLS", d, 1) == "no":
+ raise bb.parse.SkipPackage("${PN} requires native language support.")
+}
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools pkgconfig gettext
-python () {
- if bb.data.getVar("USE_NLS", d, 1) == "no":
- raise bb.parse.SkipPackage("${PN} requires native language support.")
-}
+require glib-2.0.inc
acpaths = ""
do_configure_prepend () {
inherit autotools
python __anonymous () {
- import re
- host = bb.data.getVar('HOST_SYS', d, 1)
- if not re.match('i.86.*-linux', host):
- raise bb.parse.SkipPackage("incompatible with host %s" % host)
+ import re
+ host = bb.data.getVar('HOST_SYS', d, 1)
+ if not re.match('i.86.*-linux', host):
+ raise bb.parse.SkipPackage("incompatible with host %s" % host)
}
do_install_append_vmware() {
inherit image_ipk
python () {
- # Don't build slugos images unless the configuration is set up
- # for an image build!
- if bb.data.getVar("SLUGOS_IMAGENAME", d, 1) == '' or bb.data.getVar("SLUGOS_IMAGESEX", d, 1) == '':
- raise bb.parse.SkipPackage("absent or broken SlugOS configuration")
+ # Don't build slugos images unless the configuration is set up
+ # for an image build!
+ if bb.data.getVar("SLUGOS_IMAGENAME", d, 1) == '' or bb.data.getVar("SLUGOS_IMAGESEX", d, 1) == '':
+ raise bb.parse.SkipPackage("absent or broken SlugOS configuration")
}
#--------------------------------------------------------------------------------
pref = 10
mmac = 0
for patch in pv[1:]:
- name.append(patch)
- pname = '-'.join(name)
- if patch[0:2] == "rc" or patch[0:3] == "pre":
- patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/v%s/testing/patch-%s.bz2;patch=1;pname=%s" % (major, pname, pname))
- kernel[-1] = str(int(kernel[-1]) - 1)
- if patch[0:2] == "rc" and pref == 10:
- pref = 6
- filepath[0:0] = [ filedir % name[0] ]
- filepath[0:0] = [ filedir % (name[0] + "-rc") ]
- else:
- pref = 2
- elif patch[0:2] == "bk" or patch[0:3] == "git":
- patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/v%s/snapshots/patch-%s.bz2;patch=1;pname=%s" % (major, pname, pname))
- pref = 2
- elif patch[0:2] == "ac":
- patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/people/alan/linux-%s/%s/patch-%s" % (major, base, pname))
- mmac = 2
- filepath[0:0] = [ filedir % (name[0] + "-ac") ]
- elif patch[0:2] == "mm":
- patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/%s/%s/%s/%s.bz2;patch=1;pname=%s" % (major, base, pname, pname, pname))
- mmac = 2
- filepath[0:0] = [ filedir % (name[0] + "-mm") ]
- else:
- raise bb.build.FuncFailed("ixp4xx-kernel: patch %s not recognized in %s" % (patch, '-'.join(pv)))
- filepath[0:0] = [ filedir % pname ]
- base = pname
+ name.append(patch)
+ pname = '-'.join(name)
+ if patch[0:2] == "rc" or patch[0:3] == "pre":
+ patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/v%s/testing/patch-%s.bz2;patch=1;pname=%s" % (major, pname, pname))
+ kernel[-1] = str(int(kernel[-1]) - 1)
+ if patch[0:2] == "rc" and pref == 10:
+ pref = 6
+ filepath[0:0] = [ filedir % name[0] ]
+ filepath[0:0] = [ filedir % (name[0] + "-rc") ]
+ else:
+ pref = 2
+ elif patch[0:2] == "bk" or patch[0:3] == "git":
+ patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/v%s/snapshots/patch-%s.bz2;patch=1;pname=%s" % (major, pname, pname))
+ pref = 2
+ elif patch[0:2] == "ac":
+ patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/people/alan/linux-%s/%s/patch-%s" % (major, base, pname))
+ mmac = 2
+ filepath[0:0] = [ filedir % (name[0] + "-ac") ]
+ elif patch[0:2] == "mm":
+ patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/%s/%s/%s/%s.bz2;patch=1;pname=%s" % (major, base, pname, pname, pname))
+ mmac = 2
+ filepath[0:0] = [ filedir % (name[0] + "-mm") ]
+ else:
+ raise bb.build.FuncFailed("ixp4xx-kernel: patch %s not recognized in %s" % (patch, '-'.join(pv)))
+ filepath[0:0] = [ filedir % pname ]
+ base = pname
base = '.'.join(kernel)
patch_uri[0] = "ftp://ftp.kernel.org/pub/linux/kernel/v%s/linux-%s.tar.bz2" % (major, base)
filepath[-1:-1] = [ filedir % base ]
if base != minor:
- filepath[-1:-1] = [ filedir % minor ]
+ filepath[-1:-1] = [ filedir % minor ]
filepath[-1:-1] = [ filedir % major ]
bb.data.setVar("IXP4XX_SRCMAJ", major, d)
addtask deploy before do_build after do_compile
python () {
- # check for IXP4XX_SUFFIX - if not set then we don't know what to build,
- # also sanity check the SLUGOS_IMAGESEX
- sex = bb.data.getVar("SLUGOS_IMAGESEX", d, 1)
- if sex != 'little-endian' and sex != 'big-endian':
- raise bb.parse.SkipPackage("slugos kernels require SLUGOS_IMAGESEX")
- suffix = bb.data.getVar("IXP4XX_SUFFIX", d, 1)
- if suffix == '':
- raise bb.parse.SkipPackage("slugos kernels require IXP4XX_SUFFIX")
+ # check for IXP4XX_SUFFIX - if not set then we don't know what to build,
+ # also sanity check the SLUGOS_IMAGESEX
+ sex = bb.data.getVar("SLUGOS_IMAGESEX", d, 1)
+ if sex != 'little-endian' and sex != 'big-endian':
+ raise bb.parse.SkipPackage("slugos kernels require SLUGOS_IMAGESEX")
+ suffix = bb.data.getVar("IXP4XX_SUFFIX", d, 1)
+ if suffix == '':
+ raise bb.parse.SkipPackage("slugos kernels require IXP4XX_SUFFIX")
}
inherit kernel
python __anonymous () {
- import re
- host = bb.data.getVar('HOST_SYS', d, 1)
- if not re.match('arm.*-linux', host):
- raise bb.parse.SkipPackage("incompatible with host %s" % host)
+ import re
+ host = bb.data.getVar('HOST_SYS', d, 1)
+ if not re.match('arm.*-linux', host):
+ raise bb.parse.SkipPackage("incompatible with host %s" % host)
}
KERNEL_IMAGETYPE = "uImage"
CFLAGS += " -I${KERNEL_SOURCE}/include"
python () {
-# NOTE: any target machines with kernels supporting spinlock metering should
-# check the MACHINE variable here to prevent the SkipPackage.
- raise bb.parse.SkipPackage("The target machine's kernel does not appear able to use spinlock metering.")
+ # NOTE: any target machines with kernels supporting spinlock metering should
+ # check the MACHINE variable here to prevent the SkipPackage.
+ raise bb.parse.SkipPackage("The target machine's kernel does not appear able to use spinlock metering.")
}
do_compile () {
# so force the package to be skipped here (this will cause a
# 'nothing provides' error)
python () {
- os = bb.data.getVar("TARGET_OS", d, 1)
- if os == "linux-uclibc":
- raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
+ os = bb.data.getVar("TARGET_OS", d, 1)
+ if os == "linux-uclibc":
+ raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
}
# that those which use YP don't get built on uClibC, this looks
# like a big patch...
python () {
- os = bb.data.getVar("TARGET_OS", d, 1)
- if os == "linux-uclibc":
- raise bb.parse.SkipPackage("Some PAM modules require rpcsvc/yp.h, uClibC does not provide this")
+ os = bb.data.getVar("TARGET_OS", d, 1)
+ if os == "linux-uclibc":
+ raise bb.parse.SkipPackage("Some PAM modules require rpcsvc/yp.h, uClibC does not provide this")
}