summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/angstrom.bbclass19
-rw-r--r--classes/autotools.bbclass79
-rw-r--r--classes/autotools_stage.bbclass1
-rw-r--r--classes/base.bbclass463
-rw-r--r--classes/binconfig.bbclass43
-rw-r--r--classes/canadian-cross.bbclass43
-rw-r--r--classes/canadian-native.bbclass35
-rw-r--r--classes/canadian-sdk.bbclass15
-rw-r--r--classes/canadian.bbclass5
-rw-r--r--classes/chicken.bbclass11
-rw-r--r--classes/clean.bbclass53
-rw-r--r--classes/cmake.bbclass24
-rw-r--r--classes/corecdp-mirrors.bbclass4
-rw-r--r--classes/cpan-base.bbclass6
-rw-r--r--classes/cpan.bbclass2
-rw-r--r--classes/cpan_build.bbclass3
-rw-r--r--classes/cross-canadian.bbclass46
-rw-r--r--classes/cross.bbclass26
-rw-r--r--classes/crosssdk.bbclass15
-rw-r--r--classes/debian.bbclass4
-rw-r--r--classes/devshell.bbclass3
-rw-r--r--classes/dietlibc.bbclass12
-rw-r--r--classes/distutils-common-base.bbclass5
-rw-r--r--classes/distutils.bbclass8
-rw-r--r--classes/e.bbclass4
-rw-r--r--classes/efl.bbclass21
-rw-r--r--classes/gconf.bbclass11
-rw-r--r--classes/gettext.bbclass2
-rw-r--r--classes/gitver.bbclass64
-rw-r--r--classes/glibc-package.bbclass305
-rw-r--r--classes/glx-use-tls.bbclass7
-rw-r--r--classes/gnome.bbclass8
-rw-r--r--classes/gtk-icon-cache.bbclass17
-rw-r--r--classes/icecc.bbclass23
-rw-r--r--classes/image.bbclass60
-rw-r--r--classes/insane.bbclass72
-rw-r--r--classes/java.bbclass4
-rw-r--r--classes/kernel-arch.bbclass2
-rw-r--r--classes/kernel.bbclass120
-rw-r--r--classes/lib_package.bbclass7
-rw-r--r--classes/linux-kernel-base.bbclass6
-rw-r--r--classes/lockdown.bbclass41
-rw-r--r--classes/manifest.bbclass2
-rw-r--r--classes/mime.bbclass4
-rw-r--r--classes/module-base.bbclass4
-rw-r--r--classes/module_strip.bbclass36
-rw-r--r--classes/nas100d-image.bbclass5
-rw-r--r--classes/native.bbclass99
-rw-r--r--classes/nativesdk.bbclass78
-rw-r--r--classes/nylon-image.bbclass3
-rw-r--r--classes/nylon-mirrors.bbclass8
-rw-r--r--classes/oestats-client.bbclass35
-rw-r--r--classes/openmoko-base.bbclass1
-rw-r--r--classes/openmoko2.bbclass2
-rw-r--r--classes/package.bbclass323
-rw-r--r--classes/package_dbg.bbclass125
-rw-r--r--classes/package_deb.bbclass17
-rw-r--r--classes/package_ipk.bbclass38
-rw-r--r--classes/package_rpm.bbclass19
-rw-r--r--classes/package_tar.bbclass13
-rw-r--r--classes/packaged-staging.bbclass66
-rw-r--r--classes/packagedata.bbclass73
-rw-r--r--classes/packagehistory.bbclass97
-rw-r--r--classes/patch.bbclass41
-rw-r--r--classes/pkgconfig.bbclass12
-rw-r--r--classes/qemu.bbclass15
-rw-r--r--classes/qmake2.bbclass4
-rw-r--r--classes/qmake_base.bbclass5
-rw-r--r--classes/qt4e.bbclass7
-rw-r--r--classes/qt4x11.bbclass2
-rw-r--r--classes/recipe_sanity.bbclass179
-rw-r--r--classes/rm_work.bbclass5
-rw-r--r--classes/rootfs_deb.bbclass12
-rw-r--r--classes/rootfs_ipk.bbclass11
-rw-r--r--classes/sanity.bbclass36
-rw-r--r--classes/scons.bbclass10
-rw-r--r--classes/sdk.bbclass5
-rw-r--r--classes/seppuku.bbclass6
-rw-r--r--classes/siteinfo.bbclass38
-rw-r--r--classes/sourcepkg.bbclass4
-rw-r--r--classes/src_distribute.bbclass43
-rw-r--r--classes/src_distribute_local.bbclass58
-rw-r--r--classes/srctree.bbclass115
-rw-r--r--classes/task-metadata-track.bbclass96
-rw-r--r--classes/testlab.bbclass2
-rw-r--r--classes/tinderclient.bbclass27
-rw-r--r--classes/update-alternatives.bbclass1
-rw-r--r--classes/update-rc.d.bbclass17
-rw-r--r--classes/vala.bbclass13
-rw-r--r--classes/xfce.bbclass4
-rw-r--r--classes/xfce46.bbclass28
-rw-r--r--classes/xlibs.bbclass4
92 files changed, 2605 insertions, 942 deletions
diff --git a/classes/angstrom.bbclass b/classes/angstrom.bbclass
new file mode 100644
index 0000000000..4a810a638a
--- /dev/null
+++ b/classes/angstrom.bbclass
@@ -0,0 +1,19 @@
+# anonymous support class for angstrom
+#
+# Features:
+#
+# * blacklist handling, set ANGSTROM_BLACKLIST_pn-blah = "message"
+#
+
+python () {
+ import bb
+
+ blacklist = bb.data.getVar("ANGSTROM_BLACKLIST", d, 1)
+ pkgnm = bb.data.getVar("PN", d, 1)
+
+ if blacklist:
+ bb.note("Angstrom DOES NOT support %s because %s" % (pkgnm, blacklist))
+ raise bb.parse.SkipPackage("Angstrom DOES NOT support %s because %s" % (pkgnm, blacklist))
+
+}
+
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index 20f371a987..1ea4b6f1d0 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -1,11 +1,7 @@
-inherit base
-
# use autotools_stage_all for native packages
AUTOTOOLS_NATIVE_STAGE_INSTALL = "1"
def autotools_dep_prepend(d):
- import bb;
-
if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1):
return ''
@@ -20,18 +16,22 @@ def autotools_dep_prepend(d):
deps += 'libtool-native '
if not bb.data.inherits_class('native', d) \
and not bb.data.inherits_class('cross', d) \
+ and not bb.data.inherits_class('sdk', d) \
and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
deps += 'libtool-cross '
return deps + 'gnu-config-native '
EXTRA_OEMAKE = ""
+
DEPENDS_prepend = "${@autotools_dep_prepend(d)}"
+DEPENDS_virtclass-native_prepend = "${@autotools_dep_prepend(d)}"
+DEPENDS_virtclass-nativesdk_prepend = "${@autotools_dep_prepend(d)}"
+
acpaths = "default"
EXTRA_AUTORECONF = "--exclude=autopoint"
def autotools_set_crosscompiling(d):
- import bb
if not bb.data.inherits_class('native', d):
return " cross_compiling=yes"
return ""
@@ -114,7 +114,7 @@ autotools_do_configure() {
else
CONFIGURE_AC=configure.ac
fi
- if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
+ if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
: do nothing -- we still have an old unmodified configure.ac
else
@@ -122,12 +122,12 @@ autotools_do_configure() {
echo "no" | glib-gettextize --force --copy
fi
fi
- if grep "^[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
+ mkdir -p m4
+ if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
oenote Executing intltoolize --copy --force --automake
intltoolize --copy --force --automake
fi
oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
- mkdir -p m4
autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
cd $olddir
fi
@@ -144,8 +144,10 @@ autotools_do_install() {
oe_runmake 'DESTDIR=${D}' install
}
-do_install_append() {
- for i in `find ${D} -name "*.la"` ; do \
+PACKAGE_PREPROCESS_FUNCS += "autotools_prepackage_lamangler"
+
+autotools_prepackage_lamangler () {
+ for i in `find ${PKGD} -name "*.la"` ; do \
sed -i -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${libdir}/\1,g' $i
sed -i -e s:${CROSS_DIR}/${HOST_SYS}::g $i
sed -i -e s:${CROSS_DIR}::g $i
@@ -172,14 +174,11 @@ autotools_stage_includes() {
}
autotools_stage_dir() {
- from="$1"
- to="$2"
- # This will remove empty directories so we can ignore them
- rmdir "$from" 2> /dev/null || true
- if [ -d "$from" ]; then
- mkdir -p "$to"
- cp -fpPR "$from"/* "$to"
- fi
+ sysroot_stage_dir $1 ${STAGE_TEMP_PREFIX}$2
+}
+
+autotools_stage_libdir() {
+ sysroot_stage_libdir $1 ${STAGE_TEMP_PREFIX}$2
}
autotools_stage_all() {
@@ -190,51 +189,9 @@ autotools_stage_all() {
rm -rf ${STAGE_TEMP}
mkdir -p ${STAGE_TEMP}
oe_runmake DESTDIR="${STAGE_TEMP}" install
- autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR}
- if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
- autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${layout_bindir}
- autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${layout_sbindir}
- autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${layout_base_bindir}
- autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${layout_base_sbindir}
- autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${layout_libexecdir}
- if [ "${prefix}/lib" != "${libdir}" ]; then
- # python puts its files in here, make sure they are staged as well
- autotools_stage_dir ${STAGE_TEMP}/${prefix}/lib ${STAGING_DIR_HOST}${layout_prefix}/lib
- fi
- fi
- if [ -d ${STAGE_TEMP}/${libdir} ]
- then
- olddir=`pwd`
- cd ${STAGE_TEMP}/${libdir}
- las=$(find . -name \*.la -type f)
- cd $olddir
- echo "Found la files: $las"
- for i in $las
- do
- sed -e 's/^installed=yes$/installed=no/' \
- -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*.la\),${STAGING_LIBDIR}/\1,g' \
- -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR},g' \
- -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \
- -i ${STAGE_TEMP}/${libdir}/$i
- done
- autotools_stage_dir ${STAGE_TEMP}/${libdir} ${STAGING_LIBDIR}
- fi
- # Ok, this is nasty. pkgconfig.bbclass is usually used to install .pc files,
- # however some packages rely on the presence of .pc files to enable/disable
- # their configurataions in which case we better should not install everything
- # unconditionally, but rather depend on the actual results of make install.
- # The good news though: a) there are not many packages doing this and
- # b) packaged staging will fix that anyways. :M:
- if [ "${AUTOTOOLS_STAGE_PKGCONFIG}" = "1" ]
- then
- if [ -e ${STAGE_TEMP}/${libdir}/pkgconfig/ ] ; then
- echo "cp -f ${STAGE_TEMP}/${libdir}/pkgconfig/*.pc ${STAGING_LIBDIR}/pkgconfig/"
- cp -f ${STAGE_TEMP}/${libdir}/pkgconfig/*.pc ${STAGING_LIBDIR}/pkgconfig/
- fi
- fi
rm -rf ${STAGE_TEMP}/${mandir} || true
rm -rf ${STAGE_TEMP}/${infodir} || true
- autotools_stage_dir ${STAGE_TEMP}/${datadir} ${STAGING_DATADIR}
+ sysroot_stage_dirs ${STAGE_TEMP} ${STAGE_TEMP_PREFIX}
rm -rf ${STAGE_TEMP}
}
diff --git a/classes/autotools_stage.bbclass b/classes/autotools_stage.bbclass
index 3007eef969..ff0f4cd880 100644
--- a/classes/autotools_stage.bbclass
+++ b/classes/autotools_stage.bbclass
@@ -3,4 +3,3 @@ inherit autotools
do_stage () {
autotools_stage_all
}
-
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 9ec705bc1e..e6cfeccc46 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -39,18 +39,68 @@ def base_path_relative(src, dest):
return sep.join(relpath)
+def base_path_out(path, d):
+ """ Prepare a path for display to the user. """
+ rel = base_path_relative(d.getVar("TOPDIR", 1), path)
+ if len(rel) > len(path):
+ return path
+ else:
+ return rel
+
# for MD5/SHA handling
-def base_chk_load_parser(config_path):
- import ConfigParser, os, bb
+def base_chk_load_parser(config_paths):
+ import ConfigParser
parser = ConfigParser.ConfigParser()
- if not len(parser.read(config_path)) == 1:
- bb.note("Can not open the '%s' ini file" % config_path)
- raise Exception("Can not open the '%s'" % config_path)
+ if len(parser.read(config_paths)) < 1:
+ raise ValueError("no ini files could be found")
return parser
+def base_chk_file_vars(parser, localpath, params, data):
+ try:
+ name = params["name"]
+ except KeyError:
+ return False
+ flagName = "%s.md5sum" % name
+ want_md5sum = bb.data.getVarFlag("SRC_URI", flagName, data)
+ flagName = "%s.sha256sum" % name
+ want_sha256sum = bb.data.getVarFlag("SRC_URI", flagName, data)
+
+ if (want_sha256sum == None and want_md5sum == None):
+ # no checksums to check, nothing to do
+ return False
+
+ if not os.path.exists(localpath):
+ localpath = base_path_out(localpath, data)
+ bb.note("The localpath does not exist '%s'" % localpath)
+ raise Exception("The path does not exist '%s'" % localpath)
+
+ if want_md5sum:
+ try:
+ md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), localpath))
+ md5data = (md5pipe.readline().split() or [ "" ])[0]
+ md5pipe.close()
+ except OSError, e:
+ raise Exception("Executing md5sum failed")
+ if want_md5sum != md5data:
+ bb.note("The MD5Sums did not match. Wanted: '%s' and Got: '%s'" % (want_md5sum, md5data))
+ raise Exception("MD5 Sums do not match. Wanted: '%s' Got: '%s'" % (want_md5sum, md5data))
+
+ if want_sha256sum:
+ try:
+ shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath))
+ sha256data = (shapipe.readline().split() or [ "" ])[0]
+ shapipe.close()
+ except OSError, e:
+ raise Exception("Executing shasum failed")
+ if want_sha256sum != sha256data:
+ bb.note("The SHA256Sums did not match. Wanted: '%s' and Got: '%s'" % (want_sha256sum, sha256data))
+ raise Exception("SHA256 Sums do not match. Wanted: '%s' Got: '%s'" % (want_sha256sum, sha256data))
+
+ return True
+
+
def base_chk_file(parser, pn, pv, src_uri, localpath, data):
- import os, bb
no_checksum = False
# Try PN-PV-SRC_URI first and then try PN-SRC_URI
# we rely on the get method to create errors
@@ -70,13 +120,14 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
# md5 and sha256 should be valid now
if not os.path.exists(localpath):
+ localpath = base_path_out(localpath, data)
bb.note("The localpath does not exist '%s'" % localpath)
raise Exception("The path does not exist '%s'" % localpath)
# call md5(sum) and shasum
try:
- md5pipe = os.popen('md5sum ' + localpath)
+ md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), localpath))
md5data = (md5pipe.readline().split() or [ "" ])[0]
md5pipe.close()
except OSError:
@@ -120,15 +171,16 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
def base_dep_prepend(d):
- import bb
#
# Ideally this will check a flag so we will operate properly in
# the case where host == build == target, for now we don't work in
# that case though.
#
- deps = "shasum-native "
- if bb.data.getVar('PN', d, True) == "shasum-native":
+ deps = "shasum-native coreutils-native"
+ if bb.data.getVar('PN', d, True) == "shasum-native" or bb.data.getVar('PN', d, True) == "stagemanager-native":
deps = ""
+ if bb.data.getVar('PN', d, True) == "coreutils-native":
+ deps = "shasum-native"
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# we need that built is the responsibility of the patch function / class, not
@@ -140,7 +192,6 @@ def base_dep_prepend(d):
return deps
def base_read_file(filename):
- import bb
try:
f = file( filename, "r" )
except IOError, reason:
@@ -149,22 +200,25 @@ def base_read_file(filename):
return f.read().strip()
return None
+def base_ifelse(condition, iftrue = True, iffalse = False):
+ if condition:
+ return iftrue
+ else:
+ return iffalse
+
def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
- import bb
if bb.data.getVar(variable,d,1) == checkvalue:
return truevalue
else:
return falsevalue
def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- import bb
if float(bb.data.getVar(variable,d,1)) <= float(checkvalue):
return truevalue
else:
return falsevalue
def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- import bb
result = bb.vercmp(bb.data.getVar(variable,d,True), checkvalue)
if result <= 0:
return truevalue
@@ -172,7 +226,6 @@ def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
return falsevalue
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
- import bb
matches = 0
if type(checkvalues).__name__ == "str":
checkvalues = [checkvalues]
@@ -184,33 +237,24 @@ def base_contains(variable, checkvalues, truevalue, falsevalue, d):
return falsevalue
def base_both_contain(variable1, variable2, checkvalue, d):
- import bb
if bb.data.getVar(variable1,d,1).find(checkvalue) != -1 and bb.data.getVar(variable2,d,1).find(checkvalue) != -1:
return checkvalue
else:
return ""
DEPENDS_prepend="${@base_dep_prepend(d)} "
+DEPENDS_virtclass-native_prepend="${@base_dep_prepend(d)} "
+DEPENDS_virtclass-nativesdk_prepend="${@base_dep_prepend(d)} "
-# Returns PN with various suffixes removed
-# or PN if no matching suffix was found.
-def base_package_name(d):
- import bb;
-
- pn = bb.