binconfig: mangle ${base_libdir}

Some recipes are installing libraries into ${base_libdir} (typically /lib) and
also use a foo-config binary to identify compile paths, for example
libusb-compat.  Without mangling ${base_libdir} the ${base_libdir} path is
passed to the compiler, where it looks like a host path and results in
compile-host-path QA errors.

(From OE-Core master rev: ccd9abdccb84d713427541b6ee29a0e217360e74)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cpan-base: Add vardepvalue to get_perl_version function

* without this bitbake -S perf shows following error:
  ERROR: Bitbake's cached basehash does not match the one we just generated
    (/OE/oe-core/meta/recipes-kernel/perf/perf.bb.do_package)!
  if you run it twice, once without perl in sysroot and once with perl
  already built

(From OE-Core master rev: f31f6a70ec24e8c9515d69c5092e15effc5e7d4d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pulseaudio: only package consolekit module when x11 is enabled

As requested by Martin Jansa <martin.jansa@gmail.com>.

(From OE-Core master rev: 3e148f863d55728bbfa2d94b602b03dc56b70d4c)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc: Include patch scheduled for GCC 4.8.3 to fix epilogue on ARM

GCC 4.8.0, 4.8.1 and 4.8.2 can generate broken epilogues for the
ABI used by the kernel. Apply the patch that is included for GCC
4.8.3 from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854.

The issue was found on Yocto/Dora and the patch should be backported
to this branch. A kernel built with Dora's GCC 4.8.1 misbehaved on:

 while true;
 do
    (for i in `seq 1 100`;
        do
            echo "Log message... $RANDOM";
        done) | logger;
 done

busybox's syslogd would from time to read a huge negative value and
then exit, strace would get stuck waiting on a syscall. After this
patch it appears to work better.

(From OE-Core master rev: 3004eb3b7ee5fd8dfe9c4e5749b4e125d0bd4b59)

Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: journald fix ignored disk space restrictions

The upstream bug report can be seen at:
[Systemd #68161] -- https://bugs.freedesktop.org/show_bug.cgi?id=68161

This backports patches come from 207 and need to address this in the 206 version for dora branch.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: add getter of additional metadata

Two variables are searched for value of additional package metadata:

  * PACKAGE_ADD_METADATA_<PKGTYPE>
  * PACKAGE_ADD_METADATA

First found variable with defined value wins.

<PKGTYPE> is a parameter of getter and expected to be a distinct name
of specific package type. For example: 'DEB' or 'RPM'.

Variable can contain multiple [one-line] metadata fields, separated by
literal sequence '\n'. Separator can be redefined through variable flag
'separator'. Getter returns found value with separator replaced with
newline character.

As side-effect, searched variables acquired flags 'type' (equals to
'list') and 'separator'.

Signed-off-by: Leonid Borisenko <ive.found@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package_{ipk, deb, rpm}.bbclass: support additional user-defined metadata

Additional metadata from user-defined variable is written into
control/spec file of binary package.

Three variables are searched for adiitional package metadata:

  * PACKAGE_ADD_METADATA_<PKGTYPE>_<PN>
  * PACKAGE_ADD_METADATA_<PKGTYPE>
  * PACKAGE_ADD_METADATA

First found variable with defined value wins.

<PN> is a package name. <PKGTYPE> is a distinct name of specific
package type:

  * IPK for .ipk packages
  * DEB for .deb packages
  * RPM for .rpm packages

Variable can contain multiple [one-line] metadata fields separated by
literal sequence '\n'. Separator can be redefined through variable flag
'separator'. In package control/spec file separator is replaced by
newline character.

Signed-off-by: Leonid Borisenko <ive.found@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: move reading shlibs providers to separate function

* prepare for reading shlibs providers only from dependency tree of
  current recipe

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: show warning when package is trying to provide already provided shlib

* move read_shlib_providers before registering package as provider
  and don't change provider if it already exists, show warning instead

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: add SHLIBSSEARCHDIRS to define where to search for shlib providers

* when package contains some files matching "^.*\.so", but in directory
  not default linker search paths (e.g. /opt/package/bundled-lib/libfoo.so)
  don't register it as libfoo provider, because it's possible that there
  is different package providing libfoo.so in ${libdir} and that would
  be better shlib provider for other packages to depend on
* recipes providing libs intentionally in some other directory can
  define own SHLIBSSEARCHDIRS value

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: Don't search for prividers of PRIVATE_LIBS

* split PRIVATE_LIBS and don't use find(), so that libfoo cannot be
  found in PRIVATE_LIBS = "libfoobar"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: Show which files require given dependency in debug output

* when log.do_package shows some unexpected dependency, people usually
  need to grep package directory to find which binary was creating that
  dependency, show it directly in the debug output

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
gtk+: Add PACKAGECONFIG for directfb

* building without x11 doesn't work, because it sets default
  gdkbackend to x11 and then requires cairo-xlib to be available

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>