add libtalloc and its dependency waf-samba.bbclass

This also adds libtalloc-dev to the SDK, which is a first step to
upgrading libosmocore to a 'post external talloc' version.
diff --git a/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch b/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
new file mode 100644
index 0000000..a3ee9cc
--- /dev/null
+++ b/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
@@ -0,0 +1,20 @@
+--- a/lib/replace/wscript	2015-11-13 16:04:04.000000000 +0100
++++ b/lib/replace/wscript	2015-11-13 16:23:20.000000000 +0100
+@@ -636,8 +636,6 @@
+     if not bld.CONFIG_SET('HAVE_INET_ATON'):     REPLACE_SOURCE += ' inet_aton.c'
+     if not bld.CONFIG_SET('HAVE_INET_NTOP'):     REPLACE_SOURCE += ' inet_ntop.c'
+     if not bld.CONFIG_SET('HAVE_INET_PTON'):     REPLACE_SOURCE += ' inet_pton.c'
+-    if not bld.CONFIG_SET('HAVE_GETXATTR') or bld.CONFIG_SET('XATTR_ADDITIONAL_OPTIONS'):
+-                                                 REPLACE_SOURCE += ' xattr.c'
+ 
+     bld.SAMBA_LIBRARY('replace',
+                       source=REPLACE_SOURCE,
+@@ -648,7 +646,7 @@
+                       # at the moment:
+                       # hide_symbols=bld.BUILTIN_LIBRARY('replace'),
+                       private_library=True,
+-                      deps='crypt dl nsl socket rt attr' + extra_libs)
++                      deps='crypt dl nsl socket rt ' + extra_libs)
+ 
+     bld.SAMBA_SUBSYSTEM('replace-test',
+                       source='''test/testsuite.c test/strptime.c
diff --git a/recipes-support/libtalloc/libtalloc_2.1.3.bb b/recipes-support/libtalloc/libtalloc_2.1.3.bb
new file mode 100644
index 0000000..8209264
--- /dev/null
+++ b/recipes-support/libtalloc/libtalloc_2.1.3.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://talloc.samba.org"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+
+DEPENDS += "libbsd"
+
+SRC_URI = "http://samba.org/ftp/talloc/talloc-${PV}.tar.gz"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
+                    file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"
+
+SRC_URI[md5sum] = "3e285de2228ae67ff0a0f5cec658f627"
+SRC_URI[sha256sum] = "7aa5f75b22d4ef9c737b25515f2a2837ddc13014ff4ac6e58dd9e311f41f2cb0"
+
+inherit waf-samba
+
+PACKAGECONFIG[attr] = ",,attr"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
+
+S = "${WORKDIR}/talloc-${PV}"
+
+EXTRA_OECONF += "--disable-rpath \
+                 --disable-rpath-install \
+                 --bundled-libraries=NONE \
+                 --builtin-libraries=replace \
+                 --disable-silent-rules \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                "
+DISABLE_STATIC = ""
+
+PACKAGES += "pytalloc pytalloc-dbg pytalloc-dev"
+
+FILES_pytalloc = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
+                  ${libdir}/libpytalloc-util.so.2 \
+                  ${libdir}/libpytalloc-util.so.2.1.1 \
+                 "
+FILES_pytalloc-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
+                      ${libdir}/.debug/libpytalloc-util.so.2.1.1"
+FILES_pytalloc-dev = "${libdir}/libpytalloc-util.so"
+RDEPENDS_pytalloc = "python"