scripts: consolidate code to find bitbake path

Several of these scripts were using duplicated code (and slightly
different methods) to find the path to bitbake and add its lib
subdirectory to the Python import path. Add some common code to do this
and change the scripts to use it.

Fixes [YOCTO #5076].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
list-packageconfig-flags: filter out doc and defaultval varflags

These are generic flags and shouldn't be listed in the output of this
script.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
list-packageconfig-flags: improve option parsing

* Use optparse instead of getopt (less code & automatic help)
* Change help text / output to use "recipe" instead of "package"
* Print something to indicate the script is still gathering information

Note that the long options have been renamed as appropriate.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
oe-pkgdata-util: fix help text

This was copy/pasted from another script and not corrected.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
binutils: Apply the proper fix for PR 16428

It is fixed by

commit 4199e3b8669d0a36448687850374fdc2ad7240b6
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jan 15 21:50:55 2014 +1030

    non-PIC references to __ehdr_start in pie and shared

    Rather than hacking every backend to not discard dynamic relocations
    against an undefined hidden __ehdr_start, make it appear to be defined
    early.  We want __ehdr_start hidden before size_dynamic_sections so
    that it isn't put in .dynsym, but we do need the dynamic relocations
    for a PIE or shared library with a non-PIC reference.  Defining it
    early is wrong if we don't actually define the symbol later to its
    proper value.  (In some cases we want to leave the symbol undefined,
    for example, when the ELF header isn't loaded, and we don't have this
    infomation available in before_allocation.)

So replace the existing patches with this one.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
binutils: Add fix for recent patch on older gcc

The recent bintuils patch update breaks on older gccs such as CentOS 6.
Backport a patch to address this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cmake.bbclass: restore OECMAKE_SOURCEPATH

Some packages put their CMakeLists.txt file in a subdirectory, so assuming that
it is in ${S} won't work.

Restore OECMAKE_SOURCEPATH (defaulting to ${S}) so that the location of
CMakeLists.txt can be set if required.

Based on a patch by Miroslav Keš <miroslav.kes@gmail.com>

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
u-boot: Optionally deploy an environment or script file

Some boards are configured to read a script or environment file as part
of the u-boot boot sequence.  This file, typically called 'uEnv.txt' or
'boot.scr', would be deployed alongside the u-boot binary.  If a recipe
uses this u-boot.inc, such a file can be deployed by setting the optional
UBOOT_ENV parameter and including the file in the SRC_URI.  For example:

    SRC_URI_append_overo = "file://uEnv.txt"
    UBOOT_ENV_overo = "uEnv"

Signed-off-by: Ash Charles <ashcharles@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sqlite3: Update to 3.8.5.0

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libusb1: Update to 1.0.19

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
liburcu: Update to 0.8.4

Removed patch fixed upstream

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gnupg: Update to 2.0.23

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
curl: Update to 7.37

Remove patches that are fixed upstream

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
xcb-util-renderutil: Update to version 0.3.9

Updated LIC_FILES_CHKSUM to focus only on header section
no license changes

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
man-pages: Update to 3.69

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
mobile-broadband-provider-info: Update SRCREV

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ca-certificates: Update to 20140325

Changes to debian/copyright:
Update to "Copyright: Mozilla Contributors" for mozilla/{certdata.txt,nssckbi.h}

Backported on additional patch from ca-certificates tree

[YOCTO #6454]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
curl: Convert CURLGNUTL to PACKAGECONFIG

This will allow for easier configuration of curl for SSL vs gnutls

[YOCTO #6329]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/package_rpm.bbclass: Fix SDK Suffix reference

The meta-mingw layer attempts to change the SDK Suffix, but the rpm
packaging had a hard coded reference to _nativesdk.

I did a quick scan for other hard coded entries and did not fine any
more.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
populate_sdk: Fix TOOLCHAIN_TARGET_TASK_ATTEMPTONLY implementation

The variable was only partially implemented, and the part that was there
was named incorrectly to, missing the 'TASK' piece.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>