toolchain-scripts.bbclass: Allow sourcing of subscript for environment

Sometimes we require extra environment settings to be available on the
environment for proper SDK work. This were done, in past, using
'_append' tasks however with the split of the environment in a
canadian package this has been broken.

The easier and more flexible solution is to use environment subscripts
which are sources by the main script. These are now looked at:

 $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh

and sourced.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-toolchain-qt: Fix environment population

The generation of the environment has change since the change to use a
meta-environment canadian package in the OE-Core, the SDK environment
setting has been broken. This uses the new subscript environment to
fix it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libassuan: fix for rebuild

Fixed when rebuild:
rm: cannot remove `/path/to/2.1.2-r0/libassuan-2.1.2/m4/*.m4': No such file or directory

The files may not exist when rebuild.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
latencytop: Creates x11 PACKAGECONFIG.

* Creates x11 packageconfig and update DEPENDS and EXTRA_OEMAKE_X
  for better handling.

Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
xserver-xorg: report DRI3 and Present modules as present

The DRI3 and Present modules are built-in but some drivers (such as
xf86-video-intel) want to query their presence.  Backport a patch from upstream
to stop this causing an error.

[ YOCTO #6583 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
curl: add PACKAGECONFIG option to use libssh2

The user can enable libssh2 via conf/local.conf or custom distro
configuration, this will pull in libssh2, which is not used by default.

For example, a curl_x.y.z.bbappend file containing the following line:
PACKAGECONFIG += "libssh2"

Signed-off-by: Fabrice Coulon <fabrice.coulon@axis.com>
Signed-off-by: Olof Johansson <olof.johansson@axis.com>
gnome-desktop-testing: Fix build on uclibc

[YOCTO #6577]

Change-Id: Ia29fb963a7df4e77504993172f85851e0b540c7e
Signed-off-by: Khem Raj <raj.khem@gmail.com>
oe-git-proxy: use SOCKS4a instead of SOCKS4

In some situations where a proxy is required the client can't even do DNS
lookups, so instead of using SOCKS4 use SOCKS4a which moves the name resolution
from the client to the proxy.

Signed-off-by: Ross Burton <ross.burton@intel.com>
xserver-xorg: update patch to match upstream
neard: update service file

Update the service file to more closely match the service file that has been
committed upstream.

In particular we don't want to restart neard on failure (this results in it
restarting repeatedly if no NFC hardware is found), redirecting stdout to
/dev/null means that any messages are lost instead of being sent to the journal,
and the DBus alias is required for bus activation to work correctly.

Signed-off-by: Ross Burton <ross.burton@intel.com>
python-pygobject: add libffi to DEPENDS

libffi is generally present as it's also a build dependency on glib-2.0, but
explicitly declare it for determinism.

Signed-off-by: Ross Burton <ross.burton@intel.com>
dosfstools: place files in /sbin, not in /usr/sbin

systemd expects fsck programs to be located in /sbin and fails for
dosfstools with

| Checking was requested for ..., but /sbin/fsck.vfat cannot be used: No such file or directory

Other fsck programs (e.g. ext4) are located in /sbin already so move
vfat programs into this directory too.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
boost: fix build when ${PARALLEL_MAKE} contains '-l'

The '-l' option which is valid for GNU make (--> limit by load) has a
different meaning in bjam (--> limit maximum execution time) and will
break very likely the build.

Keep only the the '-l' option when passing PARALLEL_MAKE options to
bjam.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
valgrind: Enforce 30 seconds limit for each test

Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
sstate.bbclass: the second bb.fatal not work

The code:
bb.fatal("foo1")
bb.fatal("foo2")

Would make the second one not work, use bb.error for first one to fix
the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
sstate.bbclass: split the too long line

The too long line would cause "git send-email" report errors:
patch contains a line longer than 998 characters

Though we can use "--no-validate" to force the send.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
rpcbind: make service socket activated

Instead of setting 'Restart=always' in the service file, we should
make the service socket activated, just like what Fedora does.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
nss-myhostname: skip it when systemd

Fixed error when systemd is in DISTRO_FEATURES:
ERROR: The recipe systemd is trying to install files into a sharedarea when those files already exist. Those files and their manifestlocation are:
   /path/to/sysroots/qemux86/usr/lib/libnss_myhostname.so.2
 Matched in manifest-qemux86-nss-myhostname.populate_sysroot
Please verify which recipe should provide theabove files.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
avahi-ui: fix for building systemd with multilib

Fixed:
MACHINE = "qemux86-64"
VIRTUAL-RUNTIME_init_manager = " systemd "
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += " sysvinit "

require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake avahi avahi-ui
ERROR: QA Issue: avahi-ui: Files/directories were installed but not shipped
  /lib
  /lib/systemd
  /lib/systemd/system
  /lib/systemd/system/avahi-daemon.socket
  /lib/systemd/system/avahi-dnsconfd.service
  /lib/systemd/system/avahi-daemon.service [installed-vs-shipped]
ERROR: The recipe avahi-ui is trying to install files into a sharedarea when those files already exist. Those files and their manifestlocation are:
   /path/to/sysroots/qemux86-64/lib/systemd/system/avahi-daemon.socket
 Matched in manifest-qemux86-64-avahi.populate_sysroot
 /path/to/sysroots/qemux86-64/lib/systemd/system/avahi-dnsconfd.service
 Matched in manifest-qemux86-64-avahi.populate_sysroot
 /path/to/sysroots/qemux86-64/lib/systemd/system/avahi-daemon.service
 Matched in manifest-qemux86-64-avahi.populate_sysroot
Please verify which recipe should provide theabove files.

And remove the duplicated line:
rm ${D}${base_libdir} -rf

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
git: fix do_install error

Fixed when MACHINE = qemux86-64 and libdir = /usr/lib64:
mv: cannot stat `/path/to/image/usr/lib64/perl-native/perl': No such file or directory

The perl-native files are always installed to /usr/lib on both 32/64
bits targets.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>