Yocto 2.4

Move OpenBMC to Yocto 2.4(rocko)

Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I12057b18610d6fb0e6903c60213690301e9b0c67
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/import-layers/meta-openembedded/meta-efl/COPYING.MIT b/import-layers/meta-openembedded/meta-efl/COPYING.MIT
deleted file mode 100644
index fb950dc..0000000
--- a/import-layers/meta-openembedded/meta-efl/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy 
-of this software and associated documentation files (the "Software"), to deal 
-in the Software without restriction, including without limitation the rights 
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-copies of the Software, and to permit persons to whom the Software is 
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in 
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-THE SOFTWARE.
diff --git a/import-layers/meta-openembedded/meta-efl/README b/import-layers/meta-openembedded/meta-efl/README
deleted file mode 100644
index 2c10582..0000000
--- a/import-layers/meta-openembedded/meta-efl/README
+++ /dev/null
@@ -1,18 +0,0 @@
-This layer depends on:
-
-URI: git://github.com/openembedded/oe-core.git
-branch: pyro 
-revision: HEAD
-
-URI: git://github.com/openembedded/meta-oe.git
-layers: meta-oe, meta-python
-branch: pyro 
-revision: HEAD
-
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-efl][pyro]' in the subject'
-
-When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-efl][pyro][PATCH'
-
-pyro branch maintainer(s):
-Armin Kuster <akuster808@gmail.com>
diff --git a/import-layers/meta-openembedded/meta-efl/classes/e-base.bbclass b/import-layers/meta-openembedded/meta-efl/classes/e-base.bbclass
deleted file mode 100644
index e0ae228..0000000
--- a/import-layers/meta-openembedded/meta-efl/classes/e-base.bbclass
+++ /dev/null
@@ -1,14 +0,0 @@
-HOMEPAGE = "http://www.enlightenment.org"
-SRCNAME ?= "${BPN}"
-SRCVER ?= "${PV}"
-
-EFL_SRCREV ?= "82070"
-
-ARM_INSTRUCTION_SET = "arm"
-
-S = "${WORKDIR}/${SRCNAME}-${SRCVER}"
-
-# each efl or e17 module is installing module.so in different directory, disable shlibs providers for them
-# evas-engine-gl-x11-1.7.7 evas-engine-software-16-1.7.7 evas-engine-software-16-x11-1.7.7 evas-engine-software-x11-1.7.7 evas-engine-wayland-shm-1.7.7 evas-cserve2-bmp-1.7.7 evas-cserve2-eet-1.7.7 evas-cserve2-ico-1.7.7 evas-cserve2-jpeg-1.7.7 evas-cserve2-pmaps-1.7.7 evas-cserve2-png-1.7.7 evas-cserve2-psd-1.7.7 evas-cserve2-tga-1.7.7 evas-cserve2-tiff-1.7.7 evas-cserve2-wbmp-1.7.7 evas-cserve2-xpm-1.7.7 evas-loader-bmp-1.7.7 evas-loader-generic-1.7.7 evas-loader-gif-1.7.7 evas-loader-ico-1.7.7 evas-loader-jpeg-1.7.7 evas-loader-pmaps-1.7.7 evas-loader-png-1.7.7 evas-loader-psd-1.7.7 evas-loader-tga-1.7.7 evas-loader-tiff-1.7.7 evas-loader-wbmp-1.7.7 evas-loader-xpm-1.7.7 evas-saver-jpeg-1.7.7 evas-saver-png-1.7.7 evas-saver-tiff-1.7.7 evas-engine-fb-1.7.7
-# emotion-1.7.7 elementary-1.7.7 elementary-tests-1.7.7 elementary-accessibility-1.7.7 e-wm-0.17.3 elfe-0.0.1+svnr82070 shr-e-gadgets-0.0.0+gitr1+27b6c17d73 cpu-0.0.1+svnr82070 places-0.1.0+svnr82070 forecasts-0.2.0+svnr82070 uptime-0.0.2+svnr82070 screenshot-0.3.0+svnr82070 exalt-client-0.0.1+svnr82070 diskio-0.0.1+svnr82070 rain-0.0.3+svnr82070 news-0.1.0+svnr82070 flame-0.0.3+svnr82070
-PRIVATE_LIBS = "module.so"
diff --git a/import-layers/meta-openembedded/meta-efl/classes/e.bbclass b/import-layers/meta-openembedded/meta-efl/classes/e.bbclass
deleted file mode 100644
index 4ee80bf..0000000
--- a/import-layers/meta-openembedded/meta-efl/classes/e.bbclass
+++ /dev/null
@@ -1,22 +0,0 @@
-SECTION = "e/apps"
-
-inherit e-base autotools pkgconfig binconfig
-
-do_prepsources () {
-    make clean distclean || true
-}
-addtask prepsources after do_patch before do_configure
-
-do_configure_append() {
-    find ${B} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g
-}
-
-export CURL_CONFIG = "${STAGING_BINDIR_CROSS}/curl-config"
-export FREETYPE_CONFIG = "${STAGING_BINDIR_CROSS}/freetype-config"
-
-PACKAGES =+ "${PN}-themes"
-PACKAGES += "${PN}-lib"
-
-FILES_${PN}-lib = "${libdir}/lib*.so.*"
-FILES_${PN}-themes = "${datadir}/${PN}/themes ${datadir}/${PN}/data ${datadir}/${PN}/fonts ${datadir}/${PN}/pointers ${datadir}/${PN}/images ${datadir}/${PN}/users ${datadir}/${PN}/images ${datadir}/${PN}/styles"
-FILES_${PN}-dev += "${includedir} ${libdir}/lib*.so"
diff --git a/import-layers/meta-openembedded/meta-efl/classes/efl.bbclass b/import-layers/meta-openembedded/meta-efl/classes/efl.bbclass
deleted file mode 100644
index eb40e4b..0000000
--- a/import-layers/meta-openembedded/meta-efl/classes/efl.bbclass
+++ /dev/null
@@ -1,66 +0,0 @@
-SECTION = "e/libs"
-LICENSE = "MIT & BSD"
-DEPENDS += "pkgconfig-native"
-
-# revision 0d93ec84b30bc1bee2caaee72d667f87bc468a70 made SRCDATE and hence PV go backwards, so we need to up PE to unbreak builds and feeds :(
-PE = "2"
-
-inherit e-base autotools
-
-# evas-native looks at this var, so keep it
-
-do_configure_prepend() {
-    autopoint || touch config.rpath
-}
-
-do_install_prepend () {
-    for i in `find ${B}/ -name "*.pc" -type f` ; do \
-        sed -i -e 's:-L${STAGING_LIBDIR}:-L\$\{libdir\}:g' -e 's:-I${STAGING_LIBDIR}:-I\$\{libdir\}:g' -e 's:-I${STAGING_INCDIR}:-I\$\{includedir\}:g' $i
-    done
-}
-
-PACKAGES =+ "${PN}-themes"
-PACKAGES += "${PN}-tests"
-PACKAGES += "${PN}-eolian"
-
-FILES_${PN} = "${libdir}/*.so.* \
-               ${libdir}/edje/modules/${PN}/*/module.so \
-               ${libdir}/${PN}/plugins/*.so \
-               ${datadir}/dbus-1/services/* \
-"
-
-
-FILES_${PN}-themes = "${datadir}/${PN}/themes \
-                      ${datadir}/${PN}/data \
-                      ${libdir}/${PN}/plugins/data/*.edj \
-                      ${datadir}/${PN}/fonts \
-                      ${datadir}/${PN}/pointers \
-                      ${datadir}/${PN}/images \
-                      ${datadir}/${PN}/users \
-                      ${datadir}/${PN}/images \
-                      ${datadir}/${PN}/styles"
-
-FILES_${PN}-dev   += "${bindir}/${PN}-config \
-                      ${libdir}/pkgconfig/* \
-                      ${libdir}/lib*.la \
-                      ${libdir}/*.so \
-                      ${libdir}/${PN}/*.la \
-                      ${libdir}/${PN}/*/*.la \
-                      ${datadir}/${PN}/edje_externals \
-                      ${libdir}/edje/modules/${PN}/*/module.la \
-"
-
-FILES_${PN}-eolian = " \
-    ${datadir}/eolian/include \
-"
-
-FILES_${PN}-staticdev += "${libdir}/${BPN}/*/*.a"
-
-FILES_${PN}-dbg +=   "${libdir}/${PN}/.debug \
-                      ${libdir}/${PN}/*/.debug \
-                      ${libdir}/edje/modules/${PN}/*/.debug/module.so \
-"
-
-FILES_${PN}-tests  = "${bindir}/${PN} \
-                      ${bindir}/*_* \
-                      ${datadir}/${PN}"
diff --git a/import-layers/meta-openembedded/meta-efl/conf/distro/include/efl-from-svn-recipes.inc b/import-layers/meta-openembedded/meta-efl/conf/distro/include/efl-from-svn-recipes.inc
deleted file mode 100644
index 23a8eae..0000000
--- a/import-layers/meta-openembedded/meta-efl/conf/distro/include/efl-from-svn-recipes.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-EFL_PREFERRED_VERSION ?= "1.7.4+svn%"
-EFL_PREFERRED_PYTHON_VERSION ?= "1.7.0+svn%"
-
-PREFERRED_VERSION_e-wm ?= "0.17.0+svnr%"
-
-PREFERRED_VERSION_ecore ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_ecore-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_edbus ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_edbus-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_edje ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_edje-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_edje-nativesdk ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_eeze ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_eeze-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_efreet ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_efreet-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_eina ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_eina-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_embryo ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_embryo-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_evas ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_evas-generic-loaders ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_evas-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_expedite ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_expedite-native ?= "${EFL_PREFERRED_VERSION}"
-
-PREFERRED_VERSION_eet ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_eet-native ?= "${EFL_PREFERRED_VERSION}"
-
-PREFERRED_VERSION_eio ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_eio-native ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_emotion ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_ethumb ?= "${EFL_PREFERRED_VERSION}"
-PREFERRED_VERSION_elementary ?= "${EFL_PREFERRED_VERSION}"
-
-PREFERRED_VERSION_python-elementary ?= "${EFL_PREFERRED_PYTHON_VERSION}"
-PREFERRED_VERSION_python-ecore ?= "${EFL_PREFERRED_PYTHON_VERSION}"
-PREFERRED_VERSION_python-edbus ?= "${EFL_PREFERRED_PYTHON_VERSION}"
-PREFERRED_VERSION_python-edje ?= "${EFL_PREFERRED_PYTHON_VERSION}"
-PREFERRED_VERSION_python-emotion ?= "${EFL_PREFERRED_PYTHON_VERSION}"
-PREFERRED_VERSION_python-evas ?= "${EFL_PREFERRED_PYTHON_VERSION}"
-
-PREFERRED_VERSION_terminology ?= "0.2.0+svn%"
diff --git a/import-layers/meta-openembedded/meta-efl/conf/layer.conf b/import-layers/meta-openembedded/meta-efl/conf/layer.conf
deleted file mode 100644
index ea90ce2..0000000
--- a/import-layers/meta-openembedded/meta-efl/conf/layer.conf
+++ /dev/null
@@ -1,35 +0,0 @@
-# We have a conf and classes directory, append to BBPATH 
-BBPATH .= ":${LAYERDIR}"
-
-# We have a recipes directory, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "efl-layer"
-BBFILE_PATTERN_efl-layer := "^${LAYERDIR}/"
-BBFILE_PRIORITY_efl-layer = "7"
-
-# This should only be incremented on significant changes that will
-# cause compatibility issues with other layers
-LAYERVERSION_efl-layer = "1"
-
-LAYERDEPENDS_efl-layer = "core openembedded-layer"
-
-E_MIRROR = "http://download.enlightenment.org/releases"
-E_RELEASES = "http://download.enlightenment.org/rel"
-E_SVN = "svn://svn.enlightenment.org/svn/e"
-
-# RDEPENDS on update-alternatives provider opkg-utils
-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "\
-  exquisite-theme-illume->opkg-utils \
-"
-
-# RDEPENDS on e-wm
-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "\
-  e-wm-theme-illume-efenniht->e-wm \
-  e-wm-theme-illume-neo->e-wm \
-  e-wm-theme-b-and-w->e-wm \
-"
-
-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
-  packagegroup-efl-sdk->packagegroup-core-sdk \
-"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-core/meta/meta-toolchain-efl.bb b/import-layers/meta-openembedded/meta-efl/recipes-core/meta/meta-toolchain-efl.bb
deleted file mode 100644
index b7b7fca..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-core/meta/meta-toolchain-efl.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-TOOLCHAIN_TARGET_EFLTASK ?= "packagegroup-efl-standalone-sdk-target packagegroup-efl-standalone-sdk-target-dbg"
-TOOLCHAIN_TARGET_TASK = "${TOOLCHAIN_TARGET_EFLTASK}"
-TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-efl-${DISTRO_VERSION}"
-require recipes-core/meta/meta-toolchain.bb
-
-TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-edbus.inc b/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-edbus.inc
deleted file mode 100644
index cc60083..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-edbus.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-DESCRIPTION = "${PN} bindings"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-AUTHOR = "Gustavo Sverzut Barbieri <barbieri@gmail.com>"
-# NOTE: Due to a bug in distutils, even if we don't use pyrex but cython,
-# we need to build pyrex otherwise cython doesn't get called to build
-# the extension modules.
-DEPENDS = "python-cython-native python-pyrex-native python-numeric eina edbus python-dbus"
-RDEPENDS_${PN} += "python-lang python-dbus"
-
-inherit e-base autotools pkgconfig distutils-base
-
-SRCNAME = "python-e_dbus"
-SRCVER = "${PV}"
-
-SRC_URI = "\
-    ${E_MIRROR}/BINDINGS/python/${SRCNAME}-${SRCVER}.tar.bz2 \
-"
-S = "${WORKDIR}/${SRCNAME}-${SRCVER}"
-
-
-do_configure_prepend() {
-    # prefix CYTHON_.*_INCLUDEDIR with path to STAGING_DIR_HOST also use $PKG_CONFIG instead of pkg-config directly
-    sed -i "s#=\`\$PKG_CONFIG --variable=includedir \"python-evas#=${STAGING_DIR_HOST}\`\$PKG_CONFIG --variable=includedir \"python-evas#g" ${S}/configure.ac
-}
-
-do_install_append() {
-    if [ -e examples ]; then
-        for i in `find examples -name "*.edc"`; do
-            cd ${S}/`dirname $i`
-            echo "Generating .edj file for $i..."
-            edje_cc `basename $i`
-            echo "Removing sources in this directory..."
-            rm -f *.edc *.png *.ttf *.jpeg
-        done
-        cd ${S}
-        install -d ${D}${datadir}/${PN}/
-        cp -R --no-dereference --preserve=mode,links -v examples ${D}${datadir}/${PN}/
-        find ${D}${datadir}/${PN}/examples -name ".svn" | xargs rm -rf
-    fi
-}
-
-FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/*.egg/*/*/.debug"
-
-PACKAGES += "${PN}-examples"
-FILES_${PN}-examples = "${datadir}/${PN}/examples"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-edbus_1.7.0.bb b/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-edbus_1.7.0.bb
deleted file mode 100644
index bfacf89..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-edbus_1.7.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-PR = "r1"
-
-SRC_URI[md5sum] = "40b479444bb06147429a276127981890"
-SRC_URI[sha256sum] = "78e5ca334ee25185748660b4e612f984f4d3bced018f062278701429868f117b"
-
-PNBLACKLIST[python-edbus] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130600/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl.inc b/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl.inc
deleted file mode 100644
index 6837dab..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl.inc
+++ /dev/null
@@ -1,71 +0,0 @@
-DESCRIPTION = "${PN} bindings"
-
-LICENSE = "LGPL-3.0"
-LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-# there is also GPLv3.0 in COPYING;md5=d32239bcb673463ab874e80d47fae504 but no file seems to use that
-
-AUTHOR = "Gustavo Sverzut Barbieri <barbieri@gmail.com>"
-# NOTE: Due to a bug in distutils, even if we don't use pyrex but cython,
-# we need to build pyrex otherwise cython doesn't get called to build
-# the extension modules.
-DEPENDS = "python-cython-native python-pyrex-native python-numeric python-dbus lua efl elementary"
-RDEPENDS_${PN} += "python-lang"
-
-PROVIDES = "python-ecore python-eldbus python-edje python-elementary python-emotion python-evas"
-
-inherit e-base distutils pkgconfig
-
-SRCVER = "${PV}"
-
-SRC_URI = "\
-    ${E_RELEASES}/bindings/python/${SRCNAME}-${SRCVER}.tar.gz \
-"
-S = "${WORKDIR}/${SRCNAME}-${SRCVER}"
-
-do_install_append() {
-    # drop all .pyo, pyc files
-    find ${D}${libdir}/${PYTHON_DIR}/site-packages -name \*.pyo -o -name \*.pyc | xargs rm -f
-}
-
-PACKAGES += "python-ecore python-eldbus python-edje python-elementary python-emotion python-evas python-ethumb ${PN}-examples"
-
-FILES_${PN} = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/python_efl*egg-info \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/eo.so \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/utils \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/__init__.py \
-"
-FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/*.egg/*/*/.debug"
-FILES_${PN}-dev += "${libdir}/${PYTHON_DIR}/site-packages/*/*.la"
-
-FILES_${PN}-examples = "${datadir}/${PN}/examples"
-
-FILES_python-ecore = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/ecore/ \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/ecore*.so \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/ecore \
-"
-FILES_python-eldbus = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/e_dbus/ \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/dbus_mainloop.so \
-"
-FILES_python-edje = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/edje/ \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/edje*.so \
-"
-FILES_python-elementary = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/elementary/ \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/elementary/ \
-"
-FILES_python-emotion = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/emotion/ \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/emotion.so \
-"
-FILES_python-evas = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/evas/ \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/evas.so \
-"
-FILES_python-ethumb = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/ethumb/ \
-    ${libdir}/${PYTHON_DIR}/site-packages/efl/ethumb*so \
-"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl_1.15.0.bb b/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl_1.15.0.bb
deleted file mode 100644
index e9a79b2..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl_1.15.0.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI[md5sum] = "f7c5d557336ea9df69bcca09c420711a"
-SRC_URI[sha256sum] = "11e607b465cb66dafe05c66e02d61e09335b370fe9fd2a74d88282b3ee597bcc"
-
-PNBLACKLIST[python-efl] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl_git.bb
deleted file mode 100644
index 292b9eb..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-devtools/python/python-efl_git.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require ${BPN}.inc
-
-SRCREV = "71ed20ebf662a7b72e60913df94ce6933236bf09"
-PV = "1.12.0+git${SRCPV}"
-DEFAULT_PREFERENCE = "-1"
-
-SRC_URI = "git://git.enlightenment.org/bindings/python/${BPN}.git;branch=python-efl-1.12"
-
-S = "${WORKDIR}/git"
-
-PNBLACKLIST[python-efl] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/cpu/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/cpu/configure.patch
deleted file mode 100644
index 87c85de..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/cpu/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: cpu/configure.ac
-===================================================================
---- cpu.orig/configure.ac	2014-07-17 20:39:48.000000000 +0000
-+++ cpu/configure.ac	2014-07-17 21:39:55.320555868 +0000
-@@ -10,7 +10,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.6)
-+AM_INIT_AUTOMAKE([foreign])
- AM_CONFIG_HEADER(config.h)
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
- 
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/cpu_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/cpu_svn.bb
deleted file mode 100644
index 3ffb988..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/cpu_svn.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35 \
-                    file://COPYING-PLAIN;md5=c910b645eda0005ccec46f75203dc96e"
-
-PV = "0.0.1+svnr${SRCREV}"
-PR = "${INC_PR}.0"
-
-require e-module.inc
-
-SRC_URI += "file://configure.patch"
-
-PNBLACKLIST[cpu] ?= "Depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/diskio_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/diskio_svn.bb
deleted file mode 100644
index 4f778d6..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/diskio_svn.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35 \
-                    file://COPYING-PLAIN;md5=68be76d8126face2fbbecdf1bcbe2b10"
-
-PV = "0.0.1+svnr${SRCPV}"
-PR = "${INC_PR}.0"
-
-PNBLACKLIST[diskio] ?= "broken: switch to https://git.enlightenment.org/enlightenment/modules/diskio.git/ and fix 0.0.1+svnr82070-r0.0/E-MODULES-EXTRA/diskio/e-module-diskio.edc:58. invalid state name: 'off'. "default" state must always be first. - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-require e-module.inc
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-module.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-module.inc
deleted file mode 100644
index 770f794..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-module.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-DESCRIPTION = "E17 ${PN} module"
-SECTION = "x11/multimedia"
-DEPENDS = "e-wm"
-
-SRCREV = "${EFL_SRCREV}"
-INC_PR = "r0"
-
-SRCNAME = "E-MODULES-EXTRA/${BPN}"
-
-inherit e gettext
-SRC_URI = "${E_SVN}/trunk;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-EXTRA_OECONF = "--with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc"
-
-FILES_${PN} += "${libdir}/enlightenment/modules/${PN}"
-FILES_${PN}-dbg += "${libdir}/enlightenment/modules/${PN}/*/.debug"
-FILES_${PN}-staticdev += "${libdir}/enlightenment/modules/${PN}/*/*.a"
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-tasks/0001-dbus-stuff-Convert-to-eldbus.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-tasks/0001-dbus-stuff-Convert-to-eldbus.patch
deleted file mode 100644
index f92a772..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-tasks/0001-dbus-stuff-Convert-to-eldbus.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From 37223289b3d85ea8876e7ba7c9ff97ec428073ba Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 22 Feb 2014 14:36:38 +0100
-Subject: [PATCH] dbus-stuff: Convert to eldbus
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure.ac     |  2 +-
- src/Makefile.am  |  2 +-
- src/dbus-stuff.c | 95 ++++++++++++++++++++++++++++++++------------------------
- src/dbus-stuff.h | 13 ++------
- src/main.c       |  2 +-
- 5 files changed, 61 insertions(+), 53 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b3e4d12..4ace32a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -15,7 +15,7 @@ AC_HEADER_STDC
- 
- AM_PROG_LIBTOOL
- 
--PKG_CHECK_MODULES(TASKS, [elementary eina dbus-1 edbus sqlite3])
-+PKG_CHECK_MODULES(TASKS, [elementary eina dbus-1 eldbus sqlite3])
- 
- AC_OUTPUT([
- Makefile
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 2143dc9..31d5253 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
- 	$(TASKS_CFLAGS)
- 
- AM_CFLAGS =\
--         $(EDBUS_CFLAGS) \
-+         $(ELDBUS_CFLAGS) \
- 	 -Wall\
- 	 -g
- 
-diff --git a/src/dbus-stuff.c b/src/dbus-stuff.c
-index 50809bc..9f02ef3 100644
---- a/src/dbus-stuff.c
-+++ b/src/dbus-stuff.c
-@@ -1,8 +1,7 @@
- /***************************************************************************
-  *            dbus-stuff.c
-  *
-- *  Copyright  2009  cchandel
-- *  <cchandel@yahoo.com>
-+ *  Copyright  2009  cchandel <cchandel@yahoo.com>
-  ****************************************************************************/
- 
- /*
-@@ -21,51 +20,67 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
-  */
- #include "dbus-stuff.h"
--#include <string.h>
--#include <E_DBus.h>
--#include <Elementary.h>
-+#include "Eldbus.h"
- 
--void occupy_cpu(void)
-+void on_usage_cb(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
-+{
-+        const char *errname, *errmsg;
-+        if (eldbus_message_error_get(msg, &errname, &errmsg))
-+	        fprintf(stderr, "Error: %s %s\n", errname, errmsg);
-+}
-+
-+int ousaged_resource(const char *resource, int used)
- {	
--	e_dbus_init();
--	conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
--	
--	DBusMessage *msg;
--	msg = dbus_message_new_method_call(
--		"org.freesmartphone.ousaged",
--		"/org/freesmartphone/Usage",
--		"org.freesmartphone.Usage",
--		"RequestResource"
--	);
--	
--	const char *resource = "CPU";
--	dbus_message_append_args (msg, DBUS_TYPE_STRING, &resource, DBUS_TYPE_INVALID);
-+	eldbus_init();
-+	const char *REQUEST = "RequestResource";
-+	const char *RELEASE = "ReleaseResource";
-+	const int   PREQUEST = 1;
- 
--	e_dbus_message_send(conn, msg, dbus_reply_cb, -1, NULL);
--	dbus_message_unref(msg);
--}
-+        Eldbus_Connection *conn;
-+        Eldbus_Object *obj;
-+        Eldbus_Proxy *usage;
-+        Eldbus_Pending *pending;
-+	conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SYSTEM);
-+        if (!conn)
-+        {
-+                fprintf(stderr, "Error: could not get system bus\n");
-+                return EXIT_FAILURE;
-+        }
- 
--void release_cpu(void)
--{
--	DBusMessage *msg;
--	msg = dbus_message_new_method_call(
--		"org.freesmartphone.ousaged",
--		"/org/freesmartphone/Usage",
--		"org.freesmartphone.Usage",
--		"ReleaseResource"
--	);
--	
--	const char *resource = "CPU";
--	dbus_message_append_args (msg, DBUS_TYPE_STRING, &resource, DBUS_TYPE_INVALID);
-+        obj = eldbus_object_get(conn, "org.freesmartphone.ousaged", "/org/freesmartphone/Usage");
-+        if (!obj)
-+        {
-+                fprintf(stderr, "Error: could not get object\n");
-+                return EXIT_FAILURE;
-+        }
- 
--	e_dbus_message_send(conn, msg, dbus_reply_cb, -1, NULL);
--	dbus_message_unref(msg);
-+        usage = eldbus_proxy_get(obj, "org.freesmartphone.Usage");
-+        if (!usage)
-+        {
-+                fprintf(stderr, "Error: could not get proxy\n");
-+                return EXIT_FAILURE;
-+        }
-+
-+        pending = eldbus_proxy_call(usage, used == PREQUEST ? REQUEST : RELEASE, on_usage_cb, NULL, -1, "ss", resource);
-+        if (!pending)
-+        {
-+                fprintf(stderr, "Error: could not call\n");
-+                return EXIT_FAILURE;
-+        }
-+        eldbus_proxy_unref(usage);
-+        eldbus_object_unref(obj);
-+        eldbus_connection_unref(conn);
-+
-+        eldbus_shutdown();
-+	return EXIT_SUCCESS;
- }
- 
--void dbus_reply_cb(void *data, DBusMessage *replymsg, DBusError *error)
-+int request_cpu(void)
- {
--	if (dbus_error_is_set(error)) {
--		printf("Error: %s - %s\n", error->name, error->message);
--	}
-+        return ousaged_resource("CPU", 1);
- }
- 
-+int release_cpu(void)
-+{
-+        return ousaged_resource("CPU" , 0);
-+}
-diff --git a/src/dbus-stuff.h b/src/dbus-stuff.h
-index 83d4778..a3c72cb 100644
---- a/src/dbus-stuff.h
-+++ b/src/dbus-stuff.h
-@@ -2,8 +2,7 @@
-  *            dbus.h
-  *
-  *  Fri Mar  6 12:32:57 2009
-- *  Copyright  2009  nidhin
-- *  <nidhin@nids-laptop.home>
-+ *  Copyright  2009  nidhin <nidhin@nids-laptop.home>
-  ****************************************************************************/
- 
- /*
-@@ -22,11 +21,5 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
-  */
- 
--#include <E_DBus.h>
--#include <Elementary.h>
--
--void occupy_cpu(void);
--void release_cpu(void);
--void dbus_reply_cb(void *data, DBusMessage *replymsg, DBusError *error);
--
--E_DBus_Connection *conn;
-+int request_cpu(void);
-+int release_cpu(void);
-diff --git a/src/main.c b/src/main.c
-index 92d21de..4e4bbe2 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -76,7 +76,7 @@ elm_main(int argc, char **argv)
- 	//restore state
- 	restore_state();
- 
--	occupy_cpu();
-+	request_cpu();
- 
- 	elm_run();
- 	//clean up stuff
--- 
-1.8.5.3
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-tasks_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-tasks_git.bb
deleted file mode 100644
index 7eab6d0..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-tasks_git.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "e-tasks is a todo program for Openmoko phones"
-HOMEPAGE = "http://code.google.com/p/e-tasks/"
-AUTHOR = "cchandel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a"
-SECTION = "e/apps"
-DEPENDS = "elementary eina eldbus sqlite3"
-
-inherit autotools
-
-SRCREV = "890f5ee37d1a5fd1ceb2495950d15151d4cf756b"
-PV = "0.0.2+gitr${SRCPV}"
-
-SRC_URI = "git://github.com/shr-project/e-tasks.git"
-SRC_URI += "file://0001-dbus-stuff-Convert-to-eldbus.patch"
-
-S = "${WORKDIR}/git"
-
-do_install_append() {
-    install -d "${D}/${datadir}/pixmaps"
-    install -m 0644 "${S}/resources/e-tasks.png" "${D}/${datadir}/pixmaps"
-    install -d "${D}/${datadir}/applications"
-    install -m 0644 "${S}/resources/e-tasks.desktop" "${D}/${datadir}/applications"
-    install -d  "${D}/${datadir}/e-tasks"
-    for ico in "${S}/resources/"*.png; do
-        if [ "$(basename $ico)" != "e-tasks.png" ]; then
-            install -m 0644 $ico "${D}/${datadir}/e-tasks"
-        fi
-    done
-}
-
-FILES_${PN} += "/usr/share/e-tasks/* /usr/share/applications/* /usr/share/pixmaps/*"
-
-PNBLACKLIST[e-tasks] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-b-and-w_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-b-and-w_svn.bb
deleted file mode 100644
index 9e6e9f24e..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-b-and-w_svn.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-DESCRIPTION = "b-and-w theme was default E17 theme before alpha3 and some people still prefers it."
-SECTION = "e/utils"
-DEPENDS = "edje-native"
-RDEPENDS_${PN} = "e-wm"
-LICENSE = "MIT & BSD"
-# upstream was asked to include license infor in THEME dir
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-
-inherit allarch
-
-SRCREV = "${EFL_SRCREV}"
-PV = "0.0+svnr${SRCPV}"
-
-inherit e-base
-
-SRCNAME = "b_and_w"
-SRC_URI = "${E_SVN}/trunk/THEMES;module=${SRCNAME};protocol=http"
-S = "${WORKDIR}/${SRCNAME}/e"
-
-do_compile() {
-    # unfortunately hardcoded edje_cc in Makefile
-    sed -i "s#\tedje_cc#\t${STAGING_BINDIR_NATIVE}/edje_cc#g" Makefile
-    make
-}
-
-do_install() {
-    install -d ${D}${datadir}/enlightenment/data/themes/
-    install -m 0644 ${S}/b_and_w.edj ${D}${datadir}/enlightenment/data/themes/
-}
-
-FILES_${PN} = "${datadir}/enlightenment/data/themes/"
-
-PNBLACKLIST[e-wm-theme-b-and-w] ?= "Runtime depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[e-wm-theme-b-and-w] ?= "Runtime depends on blacklisted e-wm-theme-b-and-w - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[e-wm-theme-b-and-w] ?= "Runtime depends on blacklisted e-wm-theme-b-and-w-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-illume-efenniht/LICENSE b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-illume-efenniht/LICENSE
deleted file mode 100644
index 61bb2f6..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-illume-efenniht/LICENSE
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright notice for Enlightenment:
-
-Copyright (C) 2000-2010 Carsten Haitzler and various contributors (see AUTHORS)
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright 
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-illume-efenniht_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-illume-efenniht_svn.bb
deleted file mode 100644
index 5212134..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm-theme-illume-efenniht_svn.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-DESCRIPTION = "efenniht illume theme - Efenniht was devised to be clean \
-and neutral. Its name (which means equinox) comes from the chromatic duality \
-that was decided at the very beginning, with a dark theme (black and orange) \
-and a bright one (white and blue) to be developed so that more people feel \
-comfortable using it. Efenniht uses few animations, discrete contrasts between \
-shades of gray and fine lines (colored) that outline the selected elements."
-SECTION = "e/utils"
-HOMEPAGE = "http://trac.enlightenment.org/e/wiki/Themes#Efenniht"
-DEPENDS = "edje-native"
-RDEPENDS_${PN} = "e-wm"
-RSUGGESTS_${PN} = "elementary-theme-efenniht"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=f523ab5986cc79b52a90d2ac3d5454a2"
-
-SRCREV = "${EFL_SRCREV}"
-PV = "0.0+svnr${SRCPV}"
-
-inherit e-base allarch
-
-SRCNAME = "efenniht"
-SRC_URI = "${E_SVN}/trunk/THEMES;module=${SRCNAME};protocol=http \
-           file://LICENSE \
-"
-S = "${WORKDIR}/${SRCNAME}"
-
-do_compile() {
-    ${STAGING_BINDIR_NATIVE}/edje_cc -id ${S}/images ${S}/efenniht.edc -o ${S}/efenniht.edj
-}
-
-do_install() {
-    install -d ${D}${datadir}/enlightenment/data/themes/
-    install -m 0644 ${S}/efenniht.edj ${D}${datadir}/enlightenment/data/themes/
-}
-
-FILES_${PN} = "${datadir}/enlightenment/data/themes/"
-
-PNBLACKLIST[e-wm-theme-illume-efenniht] ?= "Runtime depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[e-wm-theme-illume-efenniht] ?= "Runtime depends on blacklisted e-wm-theme-illume-efenniht - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm.inc
deleted file mode 100644
index a6e964b..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm.inc
+++ /dev/null
@@ -1,200 +0,0 @@
-DESCRIPTION = "The Enlightenment Window Manager Version 17"
-DEPENDS = "eet evas eina ecore edje efreet edbus eeze eio elementary libxcb xcb-util-keysyms"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=76de290eb3fdda12121830191c152a7d"
-SRCNAME = "e"
-
-inherit e update-alternatives gettext pkgconfig
-S = "${WORKDIR}/${SRCNAME}"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}"
-PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
-PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
-
-EXTRA_OECONF = "\
-    --with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc \
-    --with-eet-eet=${STAGING_BINDIR_NATIVE}/eet \
-    --x-includes=${STAGING_INCDIR}/X11 \
-    --x-libraries=${STAGING_LIBDIR} \
-    --enable-simple-x11 \
-"
-
-do_configure_prepend() {
-    autopoint || true
-    sed '/^ *EFL_PKG_CHECK_VAR/ s/systemduserunitdir/systemdsystemunitdir/g' -i ${S}/configure.ac
-}
-
-do_install_append() {
-    # customising - should rather make this simple upstream
-    install -m 755 ${WORKDIR}/enlightenment_start.oe ${D}/${bindir}
-
-    # security reasons, e-wm checks that in runtime
-    # xinit[418]: ERROR: CONFIGURATION FILE HAS BAD PERMISSIONS
-    chmod 600 ${D}/${sysconfdir}/enlightenment/sysactions.conf
-
-    install -d ${D}/${sysconfdir}/xdg/menus
-    install -m 644 ${WORKDIR}/applications.menu ${D}/${sysconfdir}/xdg/menus/
-    for I in `find ${D}/${libdir}/enlightenment -name "*.a" -print`; do rm -f $I; done
-    for I in `find ${D}/${libdir}/enlightenment -name "*.la" -print`; do rm -f $I; done
-
-    # work around for issue caused in r78978, more infor in:
-    # http://sourceforge.net/mailarchive/forum.php?thread_name=20121118194904.GA3438%40jama.jama.net&forum_name=enlightenment-devel
-    mv ${D}/${libdir}/enlightenment/modules/policies ${D}/${libdir}/enlightenment/modules/illume2/ \
-      || echo "illume2 policies are in correct place now"
-    mv ${D}/${libdir}/enlightenment/modules/keyboards ${D}/${libdir}/enlightenment/modules/illume2/ \
-      || echo "illume2 keyboards are in correct place now"
-}
-
-RDEPENDS_${PN} += "\
-    shared-mime-info \
-    mime-support \
-    setxkbmap \
-    edje-utils \
-    ${PN}-utils \
-    dbus-x11 \
-"
-
-# Uclibc build don't have 'glibc-utils'
-RDEPENDS_${PN}_append_libc-glibc = " glibc-utils "
-
-# The systray module used to be external, but is part of e-wm now
-RREPLACES_${PN} = "systray"
-
-RREPLACES_${PN}-config-mobile = "${PN}-config-illume2"
-RCONFLICTS_${PN}-config-mobile = "${PN}-config-illume2"
-RPROVIDES_${PN}-config-mobile = "${PN}-config-illume2"
-
-PACKAGES =+ "\
-    ${PN}-config-default \
-    ${PN}-config-mobile \
-    ${PN}-config-minimalist \
-    ${PN}-config-netbook \
-    ${PN}-config-scaleable \
-    ${PN}-config-standard \
-    ${PN}-config-tiling \
-    ${PN}-theme-default \
-    ${PN}-background-dark-gradient \
-    ${PN}-background-light-gradient \
-    ${PN}-backgrounds \
-    ${PN}-images \
-    ${PN}-icons \
-    ${PN}-other \
-    ${PN}-input-methods \
-    ${PN}-sysactions \
-    ${PN}-utils \
-    ${PN}-menu \
-    efm-desktop-icon \
-    illume-keyboard-default-alpha \
-    illume-keyboard-default-numeric \
-    illume-keyboard-default-terminal \
-"
-
-ESYSACTIONS ?= "${PN}-sysactions"
-
-RRECOMMENDS_${PN} = "\
-    ${PN}-config-default \
-    ${PN}-images \
-    ${PN}-icons \
-    ${PN}-other \
-    ${PN}-input-methods \
-    ${ESYSACTIONS} \
-    efreet \
-    evas-generic-loader-svg \
-"
-
-FILES_${PN} = "\
-    ${bindir}/* \
-    ${libdir}/enlightenment/utils/* \
-    ${libdir}/enlightenment/modules/*/*.* \
-    ${libdir}/enlightenment/modules/*/*/* \
-    ${libdir}/enlightenment/modules/*/*/.order \
-    ${libdir}/enlightenment/modules/keyboards/ignore_built_in_keyboards \
-    ${libdir}/enlightenment/*plugins/*/*/* \
-    ${libdir}/enlightenment/preload/e_precache.so \
-    ${datadir}/enlightenment/data/icons \
-    ${datadir}/enlightenment/data/favorites \
-    ${datadir}/enlightenment/data/input_methods \
-    ${datadir}/enlightenment/data/config/profile.cfg \
-    ${datadir}/enlightenment/AUTHORS \
-    ${datadir}/enlightenment/COPYING \
-    ${datadir}/xsessions/enlightenment.desktop \
-    ${sysconfdir}/xdg \
-    ${systemd_unitdir} \
-"
-
-FILES_${PN}-config-default = "${datadir}/enlightenment/data/config/default"
-FILES_${PN}-config-mobile = "${datadir}/enlightenment/data/config/mobile"
-FILES_${PN}-config-minimalist = "${datadir}/enlightenment/data/config/minimalist"
-FILES_${PN}-config-netbook = "${datadir}/enlightenment/data/config/netbook"
-FILES_${PN}-config-scaleable = "${datadir}/enlightenment/data/config/scaleable"
-FILES_${PN}-config-standard = "${datadir}/enlightenment/data/config/standard"
-FILES_${PN}-config-tiling = "${datadir}/enlightenment/data/config/tiling"
-FILES_${PN}-theme-default = "${datadir}/enlightenment/data/themes/default.edj"
-FILES_${PN}-theme-default = "${datadir}/enlightenment/data/themes/default.edj"
-FILES_${PN}-background-dark-gradient = "${datadir}/enlightenment/data/backgrounds/Dark_Gradient.edj"
-FILES_${PN}-background-light-gradient = "${datadir}/enlightenment/data/backgrounds/Light_Gradient.edj"
-FILES_${PN}-backgrounds = "${datadir}/enlightenment/data/backgrounds/*.edj"
-FILES_${PN}-images = "${datadir}/enlightenment/data/images ${datadir}/enlightenment/data/flags"
-FILES_${PN}-icons = "${datadir}/enlightenment/data/icons"
-FILES_${PN}-other = "${datadir}/enlightenment/data/other"
-FILES_${PN}-input-methods = "${datadir}/enlightenment/data/input_methods"
-FILES_${PN}-sysactions = "${sysconfdir}/enlightenment/sysactions.conf"
-FILES_${PN}-utils = "${libdir}/enlightenment/utils/*"
-FILES_${PN}-menu = "${sysconfdir}/xdg/menus/applications.menu"
-
-FILES_efm-desktop-icon = "\
-    ${datadir}/applications/efm.desktop \
-    ${datadir}/applications/enlightenment_filemanager.desktop \
-    ${datadir}/icons/e-module-fileman.png \
-"
-
-KEYBOARDS_DIR="${libdir}/enlightenment/modules/illume-keyboard/keyboards"
-FILES_illume-keyboard-default-alpha = "\
-    ${KEYBOARDS_DIR}/Default.kbd \
-    ${KEYBOARDS_DIR}/alpha.png \
-"
-FILES_illume-keyboard-default-numeric = "\
-    ${KEYBOARDS_DIR}/Numbers.kbd \
-    ${KEYBOARDS_DIR}/numeric.png \
-"
-FILES_illume-keyboard-default-terminal = "\
-    ${KEYBOARDS_DIR}/Terminal.kbd \
-    ${KEYBOARDS_DIR}/qwerty.png \
-"
-
-RRECOMMENDS_${PN}-config-default = "${PN}-theme-default"
-RRECOMMENDS_${PN}-config-mobile = "\
-    illume-keyboard-default-alpha \
-    illume-keyboard-default-numeric \
-    illume-keyboard-default-terminal \
-"
-
-RRECOMMENDS_${PN}-config-minimalist = "\
-    ${PN}-background-light-gradient \
-    ${PN}-theme-default \
-"
-RRECOMMENDS_${PN}-config-netbook = "\
-    ${PN}-background-dark-gradient \
-    ${PN}-theme-default \
-"
-RRECOMMENDS_${PN}-config-scaleable = "${PN}-theme-default"
-RRECOMMENDS_${PN}-config-standard = "${PN}-theme-default"
-
-FILES_${PN}-dbg += "\
-    ${libdir}/enlightenment/modules/*/*/.debug/ \
-    ${libdir}/enlightenment/modules/policies/.debug/ \
-    ${libdir}/enlightenment/preload/.debug/ \
-    ${libdir}/enlightenment/utils/.debug/ \
-    ${libdir}/enlightenment/*plugins/*/*/.debug \
-"
-
-FILES_${PN}-doc += "\
-    ${datadir}/enlightenment/doc \
-"
-
-CONFFILES_${PN}-menu = "${sysconfdir}/xdg/menus/applications.menu"
-CONFFILES_${PN}-sysactions = "/etc/enlightenment/sysactions.conf"
-
-ALTERNATIVE_${PN} = "x-window-manager"
-ALTERNATIVE_TARGET[x-window-manager] = "${bindir}/enlightenment_start.oe"
-ALTERNATIVE_PRIORITY[x-window-manager] = "16"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/0001-Fix-incorrect-message-type.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/0001-Fix-incorrect-message-type.patch
deleted file mode 100644
index e718ef3..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/0001-Fix-incorrect-message-type.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0aef43c9cd1656413cf2eb3dc7c19b355ee7ed52 Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Sun, 1 Jun 2014 14:45:49 +0200
-Subject: [PATCH] Fix incorrect message type
-
-Upstream-Status: Pending
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- src/bin/e_desk.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c
-index b156e19..77d7520 100644
---- a/src/bin/e_desk.c
-+++ b/src/bin/e_desk.c
-@@ -221,7 +221,7 @@ e_desk_show(E_Desk *desk)
-    E_Event_Desk_Show *ev;
-    E_Event_Desk_Before_Show *eev;
-    E_Event_Desk_After_Show *eeev;
--   Edje_Message_Float_Set *msg;
-+   Edje_Message_Int_Set *msg;
-    Eina_List *l;
-    E_Shelf *es;
-    int was_zone = 0, x, y, dx = 0, dy = 0;
--- 
-1.8.3.2
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/0001-configure.ac-add-foreign.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/0001-configure.ac-add-foreign.patch
deleted file mode 100644
index c7a574c..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/0001-configure.ac-add-foreign.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 19e59b6e8148388e7a17f10d4390176a50e2917f Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Mon, 25 Aug 2014 16:06:03 +0200
-Subject: [PATCH] configure.ac: add foreign
-
-* fixes:
-  | configure.ac:312: error: required file './ABOUT-NLS' not found
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 51ad0ba..cd77739 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -34,7 +34,7 @@ AH_BOTTOM([
- #endif /* EFL_CONFIG_H__ */
- ])
- 
--AM_INIT_AUTOMAKE([1.11 dist-bzip2 dist-xz -Wno-portability])
-+AM_INIT_AUTOMAKE([1.11 dist-bzip2 dist-xz -Wno-portability foreign])
- AM_SILENT_RULES([yes])
- 
- AC_USE_SYSTEM_EXTENSIONS
--- 
-2.3.0
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/applications.menu b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/applications.menu
deleted file mode 100644
index ed9b906..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/applications.menu
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://standards.freedesktop.org/menu-spec/menu-1.0.dtd">
-<Menu>
-  <Name>Applications</Name>
-  <!--   <Directory>Applications.directory</Directory> -->
-
-  <!-- Read standard .directory and .desktop file locations -->
-  <DefaultAppDirs>/usr/share/applications</DefaultAppDirs>
-  <DefaultDirectoryDirs/>
-
-  <Menu>
-    <Name>Office</Name>
-    <Directory>Office.directory</Directory>
-    <Include>
-      <And>
-        <Category>Office</Category>
-      </And>
-    </Include>
-  </Menu>
-  
-  <Menu>
-    <Name>Multimedia</Name>
-    <Directory>Multimedia.directory</Directory>
-    <Include>
-      <And>
-        <Category>AudioVideo</Category>
-      </And>
-    </Include>
-  </Menu>
-
-  <Menu>
-    <Name>Graphics</Name>
-    <Directory>Graphics.directory</Directory>
-    <Include>
-      <And>
-        <Category>Graphics</Category>
-      </And>
-    </Include>
-  </Menu>
-
-  <Menu>
-    <Name>Games</Name>
-    <Directory>Games.directory</Directory>
-    <Include>
-      <And>
-        <Or>
-         <Category>Game</Category>
-         <Category>Games</Category>
-        </Or>
-      </And>
-    </Include>
-  </Menu>
-
-  <Menu>
-    <Name>Internet</Name>
-    <Directory>Internet.directory</Directory>
-    <Include>
-      <And>
-        <Or>
-         <Category>Internet</Category>
-         <Category>Network</Category>
-        </Or>
-      </And>
-    </Include>
-  </Menu>
-
-  <Menu>
-    <Name>Settings</Name>
-    <Directory>Settings.directory</Directory>
-    <Include>
-      <And>
-        <Or>
-          <Category>SystemSettings</Category>
-          <Category>Settings</Category>
-        </Or>
-        <Not>
-          <Category>System</Category>
-        </Not>
-      </And>
-    </Include>
-  </Menu>
-
-  <Menu>
-    <Name>Accessories</Name>
-    <Directory>Accessories.directory</Directory>
-    <Include>
-      <And>
-        <Or>
-          <Category>Applications</Category>
-          <Category>Utility</Category>
-        </Or>
-        <Not>
-          <Category>System</Category>
-          <Category>Office</Category>
-          <Category>Internet</Category>
-          <Category>AudioVideo</Category>
-          <Category>Graphics</Category>
-          <Category>Games</Category>
-        </Not>
-      </And>
-    </Include>
-  </Menu>
-  
-</Menu>
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/enlightenment_start.oe b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/enlightenment_start.oe
deleted file mode 100644
index ff86172..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm/enlightenment_start.oe
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-E_PROFILE=""
-if [ -r /etc/enlightenment/default_profile ]; then
-  . /etc/enlightenment/default_profile
-fi
-
-renice -2 -p $$
-exec enlightenment_start $E_PROFILE
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_0.18.8.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_0.18.8.bb
deleted file mode 100644
index ac18b59..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_0.18.8.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require ${BPN}.inc
-
-SRCNAME = "enlightenment"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-SRC_URI = "\
-    ${E_RELEASES}/apps/${SRCNAME}/${SRCNAME}-${SRCVER}.tar.gz \
-    file://enlightenment_start.oe \
-    file://applications.menu \
-    file://0001-Fix-incorrect-message-type.patch \
-"
-
-SRC_URI[md5sum] = "79c9f524e1d0510061c62c4b038a8ece"
-SRC_URI[sha256sum] = "14c9bde4334d2f8b0776c6113d02b923ab159eea1cbf7013489e4f3bf37a51bb"
-
-PNBLACKLIST[e-wm] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_0.19.10.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_0.19.10.bb
deleted file mode 100644
index aa6a7b8..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_0.19.10.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require ${BPN}.inc
-
-SRCNAME = "enlightenment"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-# couple of modules needed for illume2 (mobile) profile were removed in
-# http://git.enlightenment.org/core/enlightenment.git/commit/src/modules/Makefile.mk?id=1be76d599ca27f820b58b8186c5f73d9844c67ca
-# and replacements aren't included yet, if you want to use e-wm on device with small screen, better stay with 0.18 release
-DEFAULT_PREFERENCE = "-1"
-
-SRC_URI = "\
-    ${E_RELEASES}/apps/${SRCNAME}/${SRCNAME}-${SRCVER}.tar.gz \
-    file://enlightenment_start.oe \
-    file://applications.menu \
-"
-
-SRC_URI[md5sum] = "9063617760329445ada8635270a4e627"
-SRC_URI[sha256sum] = "484d305bcf403303b18c46a3a498445b93689cd325010ae8d0601551926469d8"
-
-PNBLACKLIST[e-wm] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_git.bb
deleted file mode 100644
index 0f25fd5..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/e-wm_git.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require ${BPN}.inc
-
-PV = "0.19.4+git${SRCPV}"
-DEFAULT_PREFERENCE = "-2"
-
-SRC_URI = " \
-    git://git.enlightenment.org/core/enlightenment.git;branch=enlightenment-0.19 \
-    file://0001-configure.ac-add-foreign.patch \
-    file://enlightenment_start.oe \
-    file://applications.menu \
-"
-S = "${WORKDIR}/git"
-
-SRCREV = "4545d4a70031e0b2565b8d83d5f756bff1a584d0"
-
-PNBLACKLIST[e-wm] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/edje-viewer_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/edje-viewer_svn.bb
deleted file mode 100644
index 6d3efda..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/edje-viewer_svn.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Edje_Viewer is just that"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35 \
-                    file://COPYING-PLAIN;md5=e01359041001e8bf24c09acca556e792"
-
-DEPENDS = "elementary"
-PV = "0.0.0+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-inherit e
-
-SRCNAME = "edje_viewer"
-SRC_URI = "${E_SVN}/trunk;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-FILES_${PN} += "${datadir}"
-
-PNBLACKLIST[edje-viewer] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elbow_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elbow_git.bb
deleted file mode 100644
index d2a8539..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elbow_git.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "EFL based browser"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6a6a8e020838b23406c81b19c1d46df6"
-DEPENDS = "evas ecore edje eina elementary webkit-efl sqlite3"
-
-PV = "0.0.1+gitr${SRCPV}"
-SRCREV = "b41fd0bc9514ff61bb2a50d957efe4155fa3e6a8"
-
-# webkit-efl isn't available for < armv7a
-COMPATIBLE_MACHINE = "(-)"
-COMPATIBLE_MACHINE_x86 = "(.*)"
-COMPATIBLE_MACHINE_x86-64 = "(.*)"
-COMPATIBLE_MACHINE_armv7a = "(.*)"
-
-inherit e gettext cmake
-
-EXTRA_OECMAKE = "-DDATA_INSTALL_DIR=${datadir}"
-
-SRC_URI = " \
-    git://github.com/bunhere/elbow.git;protocol=https \
-"
-S = "${WORKDIR}/git"
-
-FILES_${PN} += "${datadir}/themes"
-
-PNBLACKLIST[elbow] ?= "Depends on blacklisted webkit-efl - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elfe_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elfe_git.bb
deleted file mode 100644
index e9f7f9e..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elfe_git.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35"
-PV = "0.0.1+gitr${SRCPV}"
-PE = "1"
-
-require e-module.inc
-
-SRC_URI = " \
-    git://git.enlightenment.org/enlightenment/modules/${BPN}.git \
-"
-S = "${WORKDIR}/git"
-
-SRCREV = "1ec0e7713c3ca901014811ff78277d9e2aaac981"
-
-DEPENDS += "elementary"
-
-PNBLACKLIST[elfe] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elmdentica/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elmdentica/configure.patch
deleted file mode 100644
index 79a981b..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elmdentica/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: elmdentica/configure.ac
-===================================================================
---- elmdentica.orig/configure.ac	2014-07-17 21:46:14.712566207 +0000
-+++ elmdentica/configure.ac	2014-07-17 21:51:34.960574935 +0000
-@@ -3,7 +3,7 @@
- AM_CONFIG_HEADER(config.h)
- AC_CONFIG_MACRO_DIR([m4])
- 
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([foreign])
- 
- AC_PROG_CC
- AC_GNU_SOURCE
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elmdentica_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elmdentica_svn.bb
deleted file mode 100644
index b171217..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/elmdentica_svn.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "A indenti.ca client for E"
-DEPENDS = "glib-2.0 gconf curl elementary sqlite3-native azy"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SECTION = "e/apps"
-HOMEPAGE = "http://elmdentica.googlecode.com"
-AUTHOR = "seabra"
-
-inherit e gettext
-SRC_URI = "${E_SVN}/trunk;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-EXTRA_OECONF = "--with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc"
-
-PV = "0.9.9+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-RDEPENDS_${PN} = "${PN}-themes"
-
-SRC_URI += "file://configure.patch"
-
-PNBLACKLIST[elmdentica] ?= "OLD and depends on broken azy - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/emprint_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/emprint_svn.bb
deleted file mode 100644
index 115dc7c..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/emprint_svn.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-DESCRIPTION = "Emprint is a utility for taking screenshots of the entire screen, a specific window, or a specific region."
-LICENSE = "MIT & BSD"
-DEPENDS = "imlib2 virtual/libx11 ecore evas edje eina"
-PV = "0.0.1+svnr${SRCPV}"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35"
-SRCREV = "${EFL_SRCREV}"
-
-inherit e
-SRC_URI = "${E_SVN}/trunk;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-FILES_${PN}-dbg += "${libdir}/${PN}/modules/.debug"
-
-PNBLACKLIST[emprint] ?= "if you want to use these modules with E18, then you need to update it to git recipe fetching newer sources from http://git.enlightenment.org/apps/emprint.git/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy/0001-always-use-position-as-percent-and-define-a-1-second.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy/0001-always-use-position-as-percent-and-define-a-1-second.patch
deleted file mode 100644
index 0962450..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy/0001-always-use-position-as-percent-and-define-a-1-second.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 751505501e0db31cf766ec0ae95a6968b4d1eb93 Mon Sep 17 00:00:00 2001
-From: Alban Browaeys <prahal@yahoo.com>
-Date: Wed, 5 Sep 2012 02:58:26 +0000
-Subject: [PATCH] always use position as percent and define a 1 seconds
- tolerance.
-
-Fix "reverb" effect: ie loop between setting the slider to match
-the position and handling slider to position (seek).
----
- data/themes/default.edc |  8 +++-----
- src/bin/win.c           | 28 ++++++++++++++++++++++------
- 2 files changed, 25 insertions(+), 11 deletions(-)
-
-diff --git a/data/themes/default.edc b/data/themes/default.edc
-index ebf8ba4..7a906b1 100644
---- a/data/themes/default.edc
-+++ b/data/themes/default.edc
-@@ -186,7 +186,6 @@ collections {
-    group {
-       name: "nowplaying";
-       script {
--         public cur_length;
-          public mute;
- 
-          public get_time_str(Float:time, time_str[6])
-@@ -201,16 +200,15 @@ collections {
-                new Float:position = getfarg(2);
-                new Float:length = getfarg(3);
-                if (length > 0)
--                  external_param_set_float(PART:"progress.slider", "value", position / length * 100);
-+                  external_param_set_float(PART:"progress.slider", "value", position * 100);
-                else
-                   external_param_set_float(PART:"progress.slider", "value", 0);
- 
-                new time_str[6];
--               get_time_str(position, time_str);
-+               get_time_str(position * length, time_str);
-                set_text(PART:"ejy.text.current_time", time_str);
-                get_time_str(length, time_str);
-                set_text(PART:"ejy.text.total_time", time_str);
--               set_float(cur_length, length);
-             } else if (type == MSG_INT && id == MSG_SHUFFLE) {
-                external_param_set_bool(PART:"buttons.shuffle", "state", getarg(2));
-             } else if (type == MSG_INT && id == MSG_LOOP) {
-@@ -689,7 +687,7 @@ collections {
-             source: "progress.slider";
-             signal: "changed";
-             script {
--               send_message(MSG_FLOAT, MSG_POSITION, (external_param_get_float(PART:"progress.slider", "value") * get_float(cur_length) / 100));
-+               send_message(MSG_FLOAT, MSG_POSITION, (external_param_get_float(PART:"progress.slider", "value") / 100));
-             }
-          }
-          program {
-diff --git a/src/bin/win.c b/src/bin/win.c
-index 2f65953..428e268 100644
---- a/src/bin/win.c
-+++ b/src/bin/win.c
-@@ -194,8 +194,8 @@ _win_play_eval(Win *w)
- {
-    Edje_Message_Float_Set *mf;
- 
--   w->play.position = emotion_object_position_get(w->emotion);
-    w->play.length = emotion_object_play_length_get(w->emotion);
-+   w->play.position = emotion_object_position_get(w->emotion) / w->play.length;
- 
-    if ((w->song) && (w->song->length != (int)w->play.length))
-       db_song_length_set(w->db, w->song, w->play.length);
-@@ -542,8 +542,14 @@ _win_edje_msg(void *data, Evas_Object *o __UNUSED__, Edje_Message_Type type, int
-          else
-            {
-               Edje_Message_Float *m = msg;
-+
-+              if ((((m->val - w->play.position) * w->play.length) < 1.0)
-+                  && (((w->play.position - m->val) * w->play.length) < 1.0))
-+                  return;
-+
-               w->play.position = m->val;
--              emotion_object_position_set(w->emotion, w->play.position);
-+              emotion_object_position_set(w->emotion, w->play.position
-+                                                            * w->play.length);
-               ecore_event_add(ENJOY_EVENT_POSITION_CHANGE, NULL, NULL, NULL);
-            }
-         break;
-@@ -617,16 +623,21 @@ enjoy_control_seek(uint64_t position)
- {
-    Win *w = &_win;
-    double seek_to;
-+   double new_pos = w->play.length / ((double)position / 1e6);
- 
-    if (!w->db) return;
--   seek_to = w->play.position + w->play.length / ((double)position / 1e6);
-+
-+   if ((((new_pos - w->play.position) * w->play.length) < 1.0)
-+       && (((w->play.position - new_pos) * w->play.length) < 1.0)) return;
-+
-+   seek_to = w->play.position + new_pos;
-    if (seek_to <= 0.0)
-      seek_to = 0.0;
-    else if (seek_to >= 1.0)
-      seek_to = 1.0;
- 
-    w->play.position = seek_to;
--   emotion_object_position_set(w->emotion, w->play.position);
-+   emotion_object_position_set(w->emotion, w->play.position * w->play.length);
-    ecore_event_add(ENJOY_EVENT_POSITION_CHANGE, NULL, NULL, NULL);
- }
- 
-@@ -692,15 +703,20 @@ EAPI void
- enjoy_position_set(int32_t position)
- {
-    Win *w = &_win;
-+   double new_pos = w->play.length / ((double)position / 1e6);
- 
-    if (!w->db) return;
--   w->play.position = w->play.length / ((double)position / 1e6);
-+
-+   if ((((new_pos - w->play.position) * w->play.length) < 1.0)
-+       && (((w->play.position - new_pos) * w->play.length) < 1.0)) return;
-+
-+   w->play.position = new_pos;
-    if (w->play.position < 0.0)
-      w->play.position = 0.0;
-    else if (w->play.position > 1.0)
-      w->play.position = 1.0;
- 
--   emotion_object_position_set(w->emotion, w->play.position);
-+   emotion_object_position_set(w->emotion, w->play.position * w->play.length);
-    ecore_event_add(ENJOY_EVENT_POSITION_CHANGE, NULL, NULL, NULL);
- }
- 
--- 
-1.8.5.2
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy/configure.patch
deleted file mode 100644
index 6e0ed74..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac	2014-07-17 21:48:51.284570474 +0000
-+++ git/configure.ac	2014-07-17 21:53:39.104578318 +0000
-@@ -26,7 +26,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.6 dist-bzip2)
-+AM_INIT_AUTOMAKE([dist-bzip2 foreign])
- AC_CONFIG_HEADERS(config.h)
- _XTERM_COLORS
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy_git.bb
deleted file mode 100644
index 716d73e..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/enjoy_git.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "Enjoy music player"
-LICENSE = "LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6a6a8e020838b23406c81b19c1d46df6"
-DEPENDS = "evas ecore edje elementary emotion lightmediascanner eldbus gst-plugins-good"
-
-SRCREV = "aa8fec69e885eec048a849c2b34059ec58404e02"
-PV = "0.1.0+gitr${SRCPV}"
-
-#1st needed for all formats
-#2nd needed for mp3 playback
-#3d needed for ogg playback
-#4th needed for flac playback
-#5th needed binary to create db
-RDEPENDS_${PN} += "\
-       gst-plugins-base-typefindfunctions gst-plugins-base-playbin gst-plugins-base-volume gst-plugins-base-decodebin2 gst-plugins-good-autodetect \
-       gst-plugins-base-ogg gst-plugins-base-ivorbisdec \
-       gst-plugins-good-flac \
-       lightmediascanner-test \
-"
-
-inherit e gettext
-SRC_URI = " \
-    git://git.enlightenment.org/apps/enjoy.git \
-    file://0001-always-use-position-as-percent-and-define-a-1-second.patch \
-    file://configure.patch \
-"
-S = "${WORKDIR}/git"
-
-FILES_${PN} += "${datadir}/icons/"
-
-EXTRA_OECONF = "\
-    --with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc \
-"
-
-PACKAGECONFIG[mad] = ",,gst-plugins-ugly,gst-plugins-ugly-mad"
-PACKAGECONFIG[id3demux] = ",,,gst-plugins-good-id3demux"
-
-do_configure_prepend() {
-    autopoint || touch config.rpath
-}
-
-pkg_postinst_${PN} () {
-    echo "enjoy:    SCAN and LIBRARY MANAGER are not implemeted yet!"
-    echo "enjoy:    Meanwhile please run:"
-    echo "enjoy:    test-lms -m mono -p id3 -i 5000 -s /path/to/your/music/dir /home/root/.config/enjoy/media.db"
-    echo "enjoy:"
-    echo "enjoy:    Use test-lms -P to see available formats that can be scanned"
-}
-
-PNBLACKLIST[enjoy] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/ephoto/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/ephoto/configure.patch
deleted file mode 100644
index 59466f8..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/ephoto/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: ephoto/configure.ac
-===================================================================
---- ephoto.orig/configure.ac	2014-07-17 21:48:51.028570467 +0000
-+++ ephoto/configure.ac	2014-07-17 21:52:56.120577146 +0000
-@@ -27,7 +27,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.6 dist-bzip2)
-+AM_INIT_AUTOMAKE([dist-bzip2 foreign])
- AM_CONFIG_HEADER(src/bin/config.h)
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
- 
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/ephoto_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/ephoto_svn.bb
deleted file mode 100644
index f86ffe1..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/ephoto_svn.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-LICENSE = "MIT & GPL-3.0"
-PV = "0.1.0+svnr${SRCREV}"
-PR = "${INC_PR}.0"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=fdffcddb366d0cc78e0e46c4ea70c8d9 \
-                    file://COPYING.icons;md5=8f0e2cd40e05189ec81232da84bd6e1a"
-
-require e-module.inc
-
-inherit gettext
-
-DEPENDS += "elementary ethumb ecore eio"
-
-SRCNAME = "${PN}"
-
-# autotools-brokensep
-B = "${S}"
-
-SRC_URI += "file://configure.patch"
-
-PNBLACKLIST[ephoto] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt-client/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt-client/configure.patch
deleted file mode 100644
index d4ff801..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt-client/configure.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: exalt-client/configure.ac
-===================================================================
---- exalt-client.orig/configure.ac	2014-07-17 21:46:14.712566207 +0000
-+++ exalt-client/configure.ac	2014-07-17 21:47:56.880568991 +0000
-@@ -10,7 +10,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.8)
-+AM_INIT_AUTOMAKE([foreign])
- AM_CONFIG_HEADER(config.h)
- 
- AC_PROG_CC
-@@ -29,7 +29,6 @@
- 
- m4_ifdef([AM_GNU_GETTEXT], [
- AM_GNU_GETTEXT([external])
--po_makefile_in=po/Makefile.in
- AM_CONDITIONAL([HAVE_PO], [true])
- ],[
- AM_CONDITIONAL([HAVE_PO], [false])
-@@ -101,6 +100,5 @@
- src/Makefile
- module.desktop
- e_modules-exalt-client.spec
--$po_makefile_in
- ], [
- ])
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt-client_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt-client_svn.bb
deleted file mode 100644
index cb78a2e..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt-client_svn.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-LICENSE = "LGPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-
-PV = "0.0.1+svnr${SRCPV}"
-
-require e-module.inc
-
-DEPENDS += "elementary exalt edje-native"
-
-CFLAGS += " -I${STAGING_INCDIR}/exalt -I${STAGING_INCDIR}/exalt_dbus"
-
-do_configure_prepend() {
-    sed -i -e /po/d ${S}/configure.ac
-    sed -i -e s:\ po::g ${S}/Makefile.am
-}
-
-FILES_${PN} += "${libdir}/enlightenment/modules/*/*.desktop \
-                ${libdir}/enlightenment/modules/*/*.edj \
-                ${libdir}/enlightenment/modules/*/*/*.so"
-
-FILES_${PN}-staticdev += "${libdir}/enlightenment/modules/*/*/*.a"
-FILES_${PN}-dev += "${libdir}/enlightenment/modules/*/*/*.la"
-FILES_${PN}-dbg += "${libdir}/enlightenment/modules/*/*/.debug"
-
-SRC_URI += "file://configure.patch"
-PNBLACKLIST[exalt-client] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt_svn.bb
deleted file mode 100644
index 9e63f1b..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exalt_svn.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Exalt is a network manager for the windows manager Enlightenment DR17"
-HOMEPAGE = "http://watchwolf.fr/wiki/doku.php?id=exalt"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-
-DEPENDS = "elementary vpnc wpa-supplicant ecore eet edbus"
-RDEPENDS_${PN} = "vpnc wpa-supplicant"
-
-PV = "0.9+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-inherit e
-SRC_URI = "${E_SVN}/trunk;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-EXTRA_OECONF = " \
---with-wpa_supplicant=${sbindir}/wpa_supplicant \
---with-vpnc=${sbindir}/vpnc \
---with-vpnc-disconnect=${sbindir}/vpnc-disconnect \
-"
-
-do_install_append() {
-    # install dbus config file
-    install -d ${D}${sysconfdir}/dbus-1/system.d/
-    install -m 0644 ${S}/data/daemon/dbus/exalt.conf ${D}${sysconfdir}/dbus-1/system.d/exalt.conf
-
-    # install dbus service file
-    install -d ${D}${datadir}/dbus-1/system-services/
-    install -m 0644 ${B}/org.e.Exalt.service ${D}${datadir}/dbus-1/system-services/
-}
-
-FILES_${PN} += "${datadir}/dbus-1"
-
-
-PNBLACKLIST[exalt] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite-theme-illume.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite-theme-illume.bb
deleted file mode 100644
index c9063bc..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite-theme-illume.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-DDESCRIPTION = "A theme for exquisite"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=f523ab5986cc79b52a90d2ac3d5454a2"
-SECTION = "x11"
-DEPENDS = "edje-native"
-PV = "1.0+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-inherit e-base update-alternatives allarch
-
-ALTERNATIVE_NAME = "exquisite-config"
-ALTERNATIVE_LINK = "${sysconfdir}/exquisite/config"
-ALTERNATIVE_PATH = "${sysconfdir}/exquisite/config-illume"
-ALTERNATIVE_PRIORITY = "10"
-
-SRCNAME = "b_and_w"
-
-SRC_URI = "${E_SVN}/trunk/THEMES;module=${SRCNAME};protocol=http \
-           file://LICENSE \
-"
-S = "${WORKDIR}/${SRCNAME}"
-
-do_compile() {
-    ${STAGING_BINDIR_NATIVE}/edje_cc exquisite.edc illume.edj
-}
-
-do_install() {
-    install -d ${D}${sysconfdir}/exquisite
-    install -d ${D}${datadir}/exquisite/data/themes
-    install -m 0644 ${S}/illume.edj ${D}${datadir}/exquisite/data/themes/
-    echo 'THEME="-t illume"' > ${D}${sysconfdir}/exquisite/config-illume
-}
-
-CONFFILES_${PN} = "${sysconfdir}/exquisite/config-illume"
-FILES_${PN} = "${sysconfdir}/exquisite ${datadir}/exquisite/data/themes"
-
-PNBLACKLIST[exquisite-theme-illume] ?= "Depends on blacklisted edje-native - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[exquisite-theme-illume] ?= "Runtime depends on blacklisted exquisite-theme-illume - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[exquisite-theme-illume] ?= "Runtime depends on blacklisted exquisite-theme-illume-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite-theme-illume/LICENSE b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite-theme-illume/LICENSE
deleted file mode 100644
index 61bb2f6..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite-theme-illume/LICENSE
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright notice for Enlightenment:
-
-Copyright (C) 2000-2010 Carsten Haitzler and various contributors (see AUTHORS)
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright 
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite/exquisite-init b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite/exquisite-init
deleted file mode 100644
index 2de6774..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite/exquisite-init
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-for x in $(cat /proc/cmdline); do
-  case $x in
-    splash=false)
-      echo "Splash Disabled"
-      exit 0;
-      ;;
-  esac
-done
-
-. /etc/init.d/functions
-
-### Default config here - gets overriden later
-THEME="-t default"
-FPS="-fps 30"
-### Override config - if there is a config file - load it.
-if test -f /etc/exquisite/config; then
-  . /etc/exquisite/config
-fi
-
-args=''
-case `machine_id` in
-  "hp_ipaq_h3100"|"hp_ipaq_h3800")
-     args='-rot 90' ;;
-  "hp_ipaq_3600"|"hp_ipaq_3700"|"hp_ipaq_h3900"|"htc_universal"|*collie|*poodle|*akita|*spitz|*borzoi)
-     args='-rot 270' ;;
-esac
-args=$args" $FPS $THEME"
-
-export EXDIR=/mnt/.splash
-export EXQUISITE_IPC=$EXDIR/exquisite
-mount tmpfs -t tmpfs $EXDIR -o,size=40k
-exquisite -fb -fs $args &
-
-exquisite-write -wait 120
-exquisite-write "PULSATE"
-setterm -blank 0
-setterm -powersave off
-setterm -powerdown 0
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite/splashfuncs b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite/splashfuncs
deleted file mode 100644
index ada2a96..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite/splashfuncs
+++ /dev/null
@@ -1,29 +0,0 @@
-status() {
-  if type splash-write >/dev/null 2>&1; then
-    (TMPDIR="/mnt/.splash" EXQUISITE_IPC="$TMPDIR/exquisite" splash-write "$1" || true) &
-  fi
-}
-
-status_position() {
-  status "PROGRESS $1"
-}
-
-status_title() {
-  status "TITLE $1"
-}
-
-status_text() {
-  if test -n "$1"; then
-    status "MSG $1"
-  else
-    status "CLEAR"
-  fi
-}
-
-status_pulse() {
-  status "PULSATE"
-}
-
-status_tick() {
-  status "TICK"
-}
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite_svn.bb
deleted file mode 100644
index 826cd44..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/exquisite_svn.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "A psplash replacement for display"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=14defa372a91118e755133bc8e6aff83"
-DEPENDS = "eet evas ecore embryo edje"
-PV = "0.0.1+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-RRECOMMENDS_${PN} = "exquisite-themes"
-RCONFLICTS_${PN} = "psplash virtual-psplash"
-
-SRCNAME = "exquisite"
-
-inherit e
-SRC_URI = "${E_SVN}/trunk;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-EXTRA_OECONF = "--with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc"
-
-SRC_URI += "file://exquisite-init"
-SRC_URI += "file://splashfuncs"
-
-inherit update-rc.d
-
-do_install_prepend() {
-    install -d ${D}/mnt/.splash/
-    install -d ${D}${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/exquisite-init ${D}${sysconfdir}/init.d/exquisite
-    install -d ${D}${sysconfdir}/default
-    install -m 0755 ${WORKDIR}/splashfuncs ${D}${sysconfdir}/default/splashfuncs
-    install -d ${D}${bindir}
-    ln -s exquisite-write ${D}${bindir}/splash-write
-}
-
-
-do_install_append() {
-    rm -rf ${D}${datadir}/exquisite/data/fonts/*
-}
-
-INITSCRIPT_NAME = "exquisite"
-INITSCRIPT_PARAMS = "start 01 S . stop 20 0 1 6 ."
-
-FILES_${PN} += "/mnt/.splash/"
-
-PNBLACKLIST[exquisite] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130619/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/flame/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/flame/configure.patch
deleted file mode 100644
index 87c85de..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/flame/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: cpu/configure.ac
-===================================================================
---- cpu.orig/configure.ac	2014-07-17 20:39:48.000000000 +0000
-+++ cpu/configure.ac	2014-07-17 21:39:55.320555868 +0000
-@@ -10,7 +10,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.6)
-+AM_INIT_AUTOMAKE([foreign])
- AM_CONFIG_HEADER(config.h)
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
- 
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/flame_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/flame_svn.bb
deleted file mode 100644
index 6583d27..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/flame_svn.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35 \
-                    file://COPYING-PLAIN;md5=c910b645eda0005ccec46f75203dc96e"
-
-PV = "0.0.3+svnr${SRCPV}"
-PR = "${INC_PR}.0"
-
-require e-module.inc
-
-do_configure_prepend() {
-    sed -i -e /po/d ${S}/configure.ac
-    sed -i -e s:\ po::g ${S}/Makefile.am
-}
-
-SRC_URI += "file://configure.patch"
-
-PNBLACKLIST[flame] ?= "Depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/forecasts/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/forecasts/configure.patch
deleted file mode 100644
index 87c85de..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/forecasts/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: cpu/configure.ac
-===================================================================
---- cpu.orig/configure.ac	2014-07-17 20:39:48.000000000 +0000
-+++ cpu/configure.ac	2014-07-17 21:39:55.320555868 +0000
-@@ -10,7 +10,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.6)
-+AM_INIT_AUTOMAKE([foreign])
- AM_CONFIG_HEADER(config.h)
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
- 
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/forecasts_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/forecasts_svn.bb
deleted file mode 100644
index 495f314..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/forecasts_svn.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35 \
-                    file://COPYING-PLAIN;md5=51328cfb73bfec3eed7cfd3dbed73988"
-
-PV = "0.2.0+svnr${SRCREV}"
-PR = "${INC_PR}.0"
-
-require e-module.inc
-
-SRC_URI += "file://configure.patch"
-
-PNBLACKLIST[forecasts] ?= "Depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr/0001-Makefile-update-KEYBOARDS_DIR-for-new-illume2.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr/0001-Makefile-update-KEYBOARDS_DIR-for-new-illume2.patch
deleted file mode 100644
index b18a69b..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr/0001-Makefile-update-KEYBOARDS_DIR-for-new-illume2.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 9316e3973c44b981e73b953b2861060c6902de47 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Mon, 23 Aug 2010 12:54:05 +0200
-Subject: [PATCH] Makefile: update KEYBOARDS_DIR for new illume2
-
----
- Makefile |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 46e9420..3d8757c 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,5 +1,5 @@
- 
--INSTBASE = /usr/lib/enlightenment/modules/illume/keyboards
-+INSTBASE = /usr/lib/enlightenment/modules/illume-keyboard/keyboards
- 
- FILES-arabic = Arabic.kbd Arabic.png
- FILES-persian = Persian.kbd Persian.png
--- 
-1.7.2
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr/LICENSE b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr/LICENSE
deleted file mode 100644
index 61bb2f6..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr/LICENSE
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright notice for Enlightenment:
-
-Copyright (C) 2000-2010 Carsten Haitzler and various contributors (see AUTHORS)
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright 
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr_git.bb
deleted file mode 100644
index 6925c87..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/illume-keyboards-shr_git.bb
+++ /dev/null
@@ -1,100 +0,0 @@
-SECTION = "x11/data"
-
-SRC_URI = "git://git.shr-project.org/repo/illume-keyboards.git;protocol=http;branch=master \
-           file://0001-Makefile-update-KEYBOARDS_DIR-for-new-illume2.patch \
-           file://LICENSE"
-S = "${WORKDIR}/git"
-
-SRCREV = "4064489f359a1addf572089b582f317dff5f50e1"
-PV = "0.0+gitr${SRCPV}"
-PE = "1"
-PR = "r5"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=f523ab5986cc79b52a90d2ac3d5454a2"
-
-CLEANBROKEN = "1"
-
-PACKAGES = "\
-illume-keyboard-alpha \
-illume-keyboard-arabic \
-illume-keyboard-browse \
-illume-keyboard-danish \
-illume-keyboard-default-alt \
-illume-keyboard-dutch \
-illume-keyboard-dvorak \
-illume-keyboard-finnish \
-illume-keyboard-french \
-illume-keyboard-german \
-illume-keyboard-hebrew \
-illume-keyboard-numeric-alt \
-illume-keyboard-russian \
-illume-keyboard-russian-terminal \
-illume-keyboard-persian \
-"
-
-inherit allarch
-KEYBOARDS_DIR="${libdir}/enlightenment/modules/illume-keyboard/keyboards"
-
-AUTHOR_illume-keyboard-alpha = "Jesus McCloud"
-DESCRIPTION_illume-keyboard-alpha = "Illume keyboard with phone-like layout"
-FILES_illume-keyboard-alpha = "${KEYBOARDS_DIR}/Alpha.kbd"
-
-AUTHOR_illume-keyboard-arabic = "Mohammad Fahmi / Tom Hacohen"
-DESCRIPTION_illume-keyboard-arabic = "Illume keyboard with arabic layout"
-FILES_illume-keyboard-arabic = "${KEYBOARDS_DIR}/Arabic.kbd ${KEYBOARDS_DIR}/Arabic.png"
-
-AUTHOR_illume-keyboard-browse = "Pander"
-DESCRIPTION_illume-keyboard-browse = "Illume keyboard with a layout optimized for browsing"
-FILES_illume-keyboard-browse = "${KEYBOARDS_DIR}/Browse.kbd ${KEYBOARDS_DIR}/end-browse.png ${KEYBOARDS_DIR}/pagedown-browse.png ${KEYBOARDS_DIR}/browse.png ${KEYBOARDS_DIR}/home-browse.png ${KEYBOARDS_DIR}/pageup-browse.png ${KEYBOARDS_DIR}/space-browse.png"
-
-AUTHOR_illume-keyboard-danish = "Esben Damgaard"
-DESCRIPTION_illume-keyboard-danish = "Illume keyboard with danish layout"
-FILES_illume-keyboard-danish = "${KEYBOARDS_DIR}/Danish.kbd ${KEYBOARDS_DIR}/danish.png"
-
-AUTHOR_illume-keyboard-default-alt = "Pander"
-DESCRIPTION_illume-keyboard-default-alt = "Illume keyboard with an alternative default layout"
-FILES_illume-keyboard-default-alt = "${KEYBOARDS_DIR}/Default-alt.kbd"
-
-AUTHOR_illume-keyboard-dutch = "Pander"
-DESCRIPTION_illume-keyboard-dutch = "Illume keyboard with dutch layout"
-FILES_illume-keyboard-dutch = "${KEYBOARDS_DIR}/capslock-negative.png ${KEYBOARDS_DIR}/end.png ${KEYBOARDS_DIR}/pagedown.png ${KEYBOARDS_DIR}/qwerty-dutch-nl.png ${KEYBOARDS_DIR}/Terminal-dutch-nl.kbd ${KEYBOARDS_DIR}/capslock.png ${KEYBOARDS_DIR}/home.png ${KEYBOARDS_DIR}/pageup.png ${KEYBOARDS_DIR}/space.png"
-
-AUTHOR_illume-keyboard-dvorak = "Gabor Adam TOTH"
-DESCRIPTION_illume-keyboard-dvorak = "Illume keyboard with dvorak layout"
-FILES_illume-keyboard-dvorak = "${KEYBOARDS_DIR}/Dvorak.kbd ${KEYBOARDS_DIR}/dvorak.png"
-
-AUTHOR_illume-keyboard-finnish = "Olof Sjöbergh / Jussi Timperi"
-DESCRIPTION_illume-keyboard-finnish = "Illume keyboard with finnish layout"
-FILES_illume-keyboard-finnish = "${KEYBOARDS_DIR}/Finnish.kbd ${KEYBOARDS_DIR}/Finnish.png"
-
-DESCRIPTION_illume-keyboard-french = "Illume keyboard with french layout"
-FILES_illume-keyboard-french = "${KEYBOARDS_DIR}/Azerty.kbd ${KEYBOARDS_DIR}/Azerty.png"
-
-AUTHOR_illume-keyboard-german = "Florian Hackenberger"
-DESCRIPTION_illume-keyboard-german = "Illume keyboard with german layout"
-FILES_illume-keyboard-german = "${KEYBOARDS_DIR}/German.kbd ${KEYBOARDS_DIR}/German.png"
-
-AUTHOR_illume-keyboard-hebrew = "Tom Hacohen"
-DESCRIPTION_illume-keyboard-hebrew = "Illume keyboard with hebrew layout"
-FILES_illume-keyboard-hebrew = "${KEYBOARDS_DIR}/Hebrew.kbd ${KEYBOARDS_DIR}/Alpha-hebrew-il.png"
-
-AUTHOR_illume-keyboard-numeric-alt = "Pander"
-DESCRIPTION_illume-keyboard-numeric-alt = "Illume keyboard with an alternative numeric layout"
-FILES_illume-keyboard-numeric-alt = "${KEYBOARDS_DIR}/Numbers-alt.kbd ${KEYBOARDS_DIR}/numeric-alt.png"
-
-AUTHOR_illume-keyboard-russian = "lucky"
-DESCRIPTION_illume-keyboard-russian = "Illume keyboard with russian layout"
-FILES_illume-keyboard-russian = "${KEYBOARDS_DIR}/X8_Russian.kbd ${KEYBOARDS_DIR}/X8-russian-ru.png"
-
-AUTHOR_illume-keyboard-russian-terminal = "lucky"
-DESCRIPTION_illume-keyboard-russian-terminal = "Illume keyboard with russian layout for the Terminal"
-FILES_illume-keyboard-russian-terminal = "${KEYBOARDS_DIR}/Terminal_Russian.kbd ${KEYBOARDS_DIR}/Terminal-russian-ru.png"
-
-AUTHOR_illume-keyboard-persian = "slave"
-DESCRIPTION_illume-keyboard-persian = "Illume keyboard with persian layout"
-FILES_illume-keyboard-persian = "${KEYBOARDS_DIR}/Persian.kbd ${KEYBOARDS_DIR}/Persian.png"
-
-do_install() {
-    make DESTDIR=${D} install
-}
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/news_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/news_svn.bb
deleted file mode 100644
index 4349e04..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/news_svn.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-PV = "0.1.0+svnr${SRCPV}"
-PR = "${INC_PR}.0"
-
-require e-module.inc
-
-do_configure_prepend() {
-    sed -i -e /po/d configure.ac
-    sed -i -e s:\ po::g Makefile.am
-}
-
-PNBLACKLIST[news] ?= "if you want to use these modules with E18, then you need to update it to git recipe fetching newer sources from http://git.enlightenment.org/enlightenment/modules/news.git/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/places/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/places/configure.patch
deleted file mode 100644
index f8f4834..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/places/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: places/configure.ac
-===================================================================
---- places.orig/configure.ac	2014-07-17 21:51:01.276574017 +0000
-+++ places/configure.ac	2014-07-17 21:52:07.096575810 +0000
-@@ -10,7 +10,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.8)
-+AM_INIT_AUTOMAKE([foreign])
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
- AM_CONFIG_HEADER(config.h)
- 
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/places_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/places_svn.bb
deleted file mode 100644
index b184f84..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/places_svn.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35"
-
-PV = "0.1.0+svnr${SRCPV}"
-PR = "${INC_PR}.0"
-
-require e-module.inc
-
-do_configure_prepend() {
-    autopoint || touch config.rpath
-}
-
-# Calls /usr/bin/eject for media
-RRECOMMENDS_${PN} += "eject"
-
-SRC_URI += "file://configure.patch"
-
-PNBLACKLIST[places] ?= "Depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rage_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rage_svn.bb
deleted file mode 100644
index 0a90fe3..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rage_svn.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "Rage is a media center application based on EFL"
-AUTHOR = "Carsten 'The Rasterman' Haitzler"
-HOMEPAGE = "http://www.rasterman.com"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35"
-DEPENDS = "emotion evas ecore edje"
-SECTION = "x11/multimedia"
-PV = "0.3.0.042+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-inherit e
-SRC_URI = "${E_SVN}/trunk;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-PNBLACKLIST[rage] ?= "if you want to use these modules with E18, then you need to update it to git recipe fetching newer sources from  http://git.enlightenment.org/apps/rage.git/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rain/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rain/configure.patch
deleted file mode 100644
index 87c85de..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rain/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: cpu/configure.ac
-===================================================================
---- cpu.orig/configure.ac	2014-07-17 20:39:48.000000000 +0000
-+++ cpu/configure.ac	2014-07-17 21:39:55.320555868 +0000
-@@ -10,7 +10,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.6)
-+AM_INIT_AUTOMAKE([foreign])
- AM_CONFIG_HEADER(config.h)
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
- 
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rain_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rain_svn.bb
deleted file mode 100644
index 14aa2ed..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/rain_svn.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-LICENSE = "MIT"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35 \
-                    file://COPYING-PLAIN;md5=c910b645eda0005ccec46f75203dc96e"
-
-PV = "0.0.3+svnr${SRCPV}"
-PR = "${INC_PR}.0"
-
-require e-module.inc
-
-do_configure_prepend() {
-    sed -i -e /po/d ${S}/configure.ac
-    sed -i -e s:\ po::g ${S}/Makefile.am
-}
-
-SRC_URI += "file://configure.patch"
-
-PNBLACKLIST[rain] ?= "Depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/screenshot/screenshot-fix-mkinstalldirs.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/screenshot/screenshot-fix-mkinstalldirs.patch
deleted file mode 100644
index 14f1141..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/screenshot/screenshot-fix-mkinstalldirs.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-Subject: fix screenshot po/ building
-Upstream-Status: Pending
-
-Somehow configure doesn't substitute @MKINSTALLDIRS@ by default anymore,
-however this substitution is required for po/Makefile
-
-Fix that by calling AM_MKINSTALLDIRS from configure.ac
-
-Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-
-Index: E-MODULES-EXTRA/screenshot/configure.ac
-===================================================================
---- E-MODULES-EXTRA.orig/screenshot/configure.ac	2011-08-17 15:49:22.000000000 +0400
-+++ E-MODULES-EXTRA/screenshot/configure.ac	2011-08-17 15:49:34.000000000 +0400
-@@ -24,6 +24,7 @@
- define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
- AC_PROG_LIBTOOL
- 
-+AM_MKINSTALLDIRS
- m4_ifdef([AM_GNU_GETTEXT_VERSION], [
- AM_GNU_GETTEXT_VERSION([0.14])
- ])
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/screenshot_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/screenshot_svn.bb
deleted file mode 100644
index 233f777..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/screenshot_svn.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-LICENSE = "MIT"
-PV = "0.3.0+svnr${SRCREV}"
-PR = "${INC_PR}.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35"
-SRC_URI += "file://screenshot-fix-mkinstalldirs.patch"
-
-require e-module.inc
-
-DEPENDS += "emprint"
-RDEPENDS_${PN} += "emprint"
-
-do_configure_prepend() {
-    sed -i -e 's:AC_MSG_ERROR(emprint not found):echo foo:g' ${S}/configure.ac
-}
-
-PNBLACKLIST[screenshot] ?= "depends on blacklisted emprint - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/terminology.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/terminology.inc
deleted file mode 100644
index 24f789f..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/terminology.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "Enlightenment Terminal Emulator"
-LICENSE = "MIT & BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4efac6b05b3256ba7da66301ac1ee6c6"
-DEPENDS = "evas ecore edje elementary eina eet emotion"
-
-inherit e gettext
-
-# Because latest release we have is 0.1.0 which sorts lower then 0.1.0+svnr${SRCPV} already in feeds
-PE = "2"
-
-EXTRA_OECONF = "\
-    --with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc \
-"
-
-FILES_${PN} += "\
-    ${datadir}/icons/terminology.png \
-"
-
-# doesn't start without own theme
-# ERR<770>:terminology utils.c:26 theme_apply() Could not load any theme for group=terminology/background: No Error
-# CRI<770>:terminology main.c:448 elm_main() Couldn't find terminology theme! Forgot 'make install'?
-RDEPENDS_${PN} += "${PN}-themes"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/terminology_0.9.1.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/terminology_0.9.1.bb
deleted file mode 100644
index 77dd223..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/terminology_0.9.1.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "\
-    ${E_RELEASES}/apps/${SRCNAME}/${SRCNAME}-${SRCVER}.tar.gz \
-"
-
-SRC_URI[md5sum] = "c7ce2e8ebc5f311d3d3f59ecfdf18f61"
-SRC_URI[sha256sum] = "7fb864a14202490e9181c5f254a7e772019216a3aa75c3952d0f12cd32113896"
-
-PNBLACKLIST[terminology] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/uptime/configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/uptime/configure.patch
deleted file mode 100644
index 87c85de..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/uptime/configure.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: cpu/configure.ac
-===================================================================
---- cpu.orig/configure.ac	2014-07-17 20:39:48.000000000 +0000
-+++ cpu/configure.ac	2014-07-17 21:39:55.320555868 +0000
-@@ -10,7 +10,7 @@
- AC_CANONICAL_HOST
- AC_ISC_POSIX
- 
--AM_INIT_AUTOMAKE(1.6)
-+AM_INIT_AUTOMAKE([foreign])
- AM_CONFIG_HEADER(config.h)
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
- 
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/uptime_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/uptime_svn.bb
deleted file mode 100644
index 60d48a2..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/e17/uptime_svn.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35 \
-                    file://COPYING-PLAIN;md5=c910b645eda0005ccec46f75203dc96e"
-
-PV = "0.0.2+svnr${SRCREV}"
-PR = "${INC_PR}.0"
-
-require e-module.inc
-
-SRC_URI += "file://configure.patch"
-
-PNBLACKLIST[uptime] ?= "Depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/azy_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/azy_svn.bb
deleted file mode 100644
index d3bc200..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/azy_svn.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-DESCRIPTION = "Azy is a library meant for implementing rpc clients and servers in a simple manner."
-DEPENDS = "pkgconfig zlib openssl eina gnutls ecore libxml2 re2c-native mysql5 azy-native glib-2.0"
-DEPENDS_class-native = "pkgconfig-native zlib-native openssl-native eina-native gnutls-native ecore-native libxml2-native re2c-native mysql5-native glib-2.0-native"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-PV = "1.0.0+svnr${SRCPV}"
-PR = "r2"
-
-SRCREV = "${EFL_SRCREV}"
-
-# to provide native lemon binary
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF += " --disable-mysql-tests"
-
-do_configure_prepend_class-target() {
-    sed -i "s#\./lemon#${STAGING_BINDIR_NATIVE}/azy_lemon#g" ${S}/src/bin/Makefile.am
-    sed -i "s#\$(top_builddir)/src/bin/azy_parser -H -p -o#${STAGING_BINDIR_NATIVE}/azy_parser -H -p -o#g" ${S}/src/tests/Makefile.am
-    sed -i "s#\$(top_builddir)/src/bin/azy_parser -eHn -m#${STAGING_BINDIR_NATIVE}/azy_parser -eHn -m#g" ${S}/src/tests/identi.ca/Makefile.am
-}
-
-do_install_append_class-native() {
-    install -d ${D}/${bindir}
-    install -m 0755 ${B}/src/bin/lemon ${D}/${bindir}/azy_lemon
-}
-
-inherit efl
-
-SRC_URI = "${E_SVN}/trunk/PROTO;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-# azy/2_1.0.0+svnr82070-r2/azy/src/lib/extras/pugixml.cpp:33:
-# sysroots/qemuarm/usr/include/c++/5.2.0/bits/basic_string.h:4780:5: error: reference to 'basic_string' is ambiguous
-#     basic_string<_CharT, _Traits, _Alloc>
-#     ^
-PNBLACKLIST[azy] ?= "OLD and doesn't build with gcc-5 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/e-wm-illume-dict-pl_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/e-wm-illume-dict-pl_git.bb
deleted file mode 100644
index 657adcd..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/e-wm-illume-dict-pl_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Polish dictionary for Illume keyboard"
-SECTION = "x11/data"
-SRCREV = "38fdd9bb0d8296e984bb6443466801eea6f62f00"
-PV = "1.0+gitr${SRCPV}"
-PE = "1"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f523ab5986cc79b52a90d2ac3d5454a2"
-
-SRC_URI = "git://git.shr-project.org/repo/shr-themes.git;protocol=http;branch=master"
-
-S = "${WORKDIR}/git/e-wm/${PN}"
-
-FILES_${PN} = "${libdir}/enlightenment/modules/illume/dicts/Polish.dic"
-
-do_install() {
-    install -d ${D}${libdir}/enlightenment/modules/illume/dicts
-    install -m 0644 ${S}/Polish.dic        ${D}${libdir}/enlightenment/modules/illume/dicts/Polish.dic
-}
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/ecore/fix-ecore-fb-initialization.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/ecore/fix-ecore-fb-initialization.patch
deleted file mode 100644
index 55773a3..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/ecore/fix-ecore-fb-initialization.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 657571197c9d369e12ae31b6777a1929fe3680ef Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 29 Oct 2011 00:16:55 +0200
-Subject: [PATCH] ecore-fb: fix ts init
-
-Upstream-Status: Pending
-
-The whole ecore-fb init logic is somewhat flawed; with this patch we
-get at least a working touchscreen w/ tslib again.
-
-Signed-off-by: Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- ecore/src/lib/ecore_fb/ecore_fb.c |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/src/lib/ecore_fb/ecore_fb.c b/src/lib/ecore_fb/ecore_fb.c
-index 5b2b84b..a1904b3 100644
---- a/src/lib/ecore_fb/ecore_fb.c
-+++ b/src/lib/ecore_fb/ecore_fb.c
-@@ -46,6 +46,9 @@ ecore_fb_init(const char *name __UNUSED__)
-    if (!ecore_fb_vt_init())
-       return --_ecore_fb_init_count;
- 
-+   if (!ecore_fb_ts_init())
-+      return --_ecore_fb_init_count;
-+
-    if (!oldhand)
-      {
-         oldhand = signal(SIGINT, nosigint);
-@@ -77,6 +80,7 @@ ecore_fb_shutdown(void)
-         oldhand = NULL;
-      }
-    
-+   ecore_fb_ts_shutdown();
-    ecore_fb_vt_shutdown();
- 
-    return _ecore_fb_init_count;
--- 
-1.7.8.6
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edb_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edb_svn.bb
deleted file mode 100644
index 7c6abda..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edb_svn.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Edb is the Enlightenment database library"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8a7c08df3bc3280208b959be7215c25 \
-                    file://COPYING-PLAIN;md5=f59cacc08235a546b0c34a5422133035"
-
-DEPENDS = "zlib"
-PV = "1.0.5.050+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-inherit efl
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[ncurses] = "--enable-ncurses,--disable-ncurses,ncurses"
-
-SRC_URI = "${E_SVN}/OLD;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edbus.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edbus.inc
deleted file mode 100644
index 03d0ee5..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edbus.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-DESCRIPTION = "DBus and HAL convenience wrappers for EFL"
-DEPENDS = "dbus ecore eina"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=550b8cea13dacc4bf00508a8cce1074c"
-
-inherit efl
-
-# -dev and -dbg packages wants ${PN} which is empty here
-ALLOW_EMPTY_${PN} = "1"
-
-BBCLASSEXTEND = "native"
-INC_PR = "r0"
-
-SRCNAME = "e_dbus"
-
-# it needs to be disabled, because creates circular dependency on elementary
-EXTRA_OECONF += "--disable-edbus-performance-test"
-
-PACKAGES =+ "${PN}-enotify ${PN}-edbus ${PN}-enm ${PN}-ehal ${PN}-econnman ${PN}-eofono ${PN}-eukit ${PN}-ebluez"
-FILES_${PN}-enotify = "${libdir}/libenotify.so.* ${bindir}/e-notify-send"
-FILES_${PN}-edbus = "${libdir}/libedbus.so.*"
-FILES_${PN}-enm = "${libdir}/libenm.so.*"
-FILES_${PN}-ehal = "${libdir}/libehal.so.*"
-FILES_${PN}-econnman = "${libdir}/libeconnman.so.* ${libdir}/libeconnman0_7x.so.*"
-FILES_${PN}-eofono = "${libdir}/libeofono.so.*"
-FILES_${PN}-eukit = "${libdir}/libeukit.so.*"
-FILES_${PN}-ebluez = "${libdir}/libebluez.so.*"
-FILES_${PN} += "${datadir}/e_dbus/logo.png"
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edbus_1.7.9.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edbus_1.7.9.bb
deleted file mode 100644
index a8033ac..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edbus_1.7.9.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "\
-    ${E_MIRROR}/${SRCNAME}-${SRCVER}.tar.gz \
-"
-
-SRC_URI[md5sum] = "8f72da14e5664aad8c45eeeca0e3ff5f"
-SRC_URI[sha256sum] = "c328c4cf1424629cb67c83689ccc1f95967abcb4c03dffd437e93b799ff151c1"
-
-PNBLACKLIST[edbus] ?= "Depends on blacklisted ecore - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[edbus] ?= "Depends on blacklisted eina - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[edbus] ?= "Runtime depends on blacklisted edbus - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[edbus] ?= "Runtime depends on blacklisted edbus-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edje-fpu.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edje-fpu.inc
deleted file mode 100644
index 32a6daf..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/edje-fpu.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-
-def get_edje_fpu_setting(bb, d):
-    if d.getVar('TARGET_FPU') in [ 'soft' ]:
-        return "--enable-fixed-point"
-    return ""
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl.inc
deleted file mode 100644
index 4cd21bf..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl.inc
+++ /dev/null
@@ -1,290 +0,0 @@
-SUMMARY = "EFL"
-LICENSE = "MIT & BSD & LGPL-2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ca7873210523dcfd32694b94286dca60"
-
-DEPENDS_class-native = "freetype-native libxext-native libpng-native jpeg-native tiff-native libfribidi-native glib-2.0-native dbus-native openssl-native"
-DEPENDS = "virtual/libiconv tslib curl glib-2.0 gnutls pkgconfig zlib jpeg openssl libsndfile1 dbus libexif librsvg freetype libpng tiff libxext virtual/libx11 libxdamage libxrender fontconfig libfribidi giflib udev libxcursor libxcomposite libxinerama libxrandr libxtst libxscrnsaver efl-native util-linux libunwind"
-
-inherit efl gettext pkgconfig
-
-BBCLASSEXTEND = "native"
-
-PROVIDES += "ecore edje eet eeze efreet eina eio embryo emotion ethumb evas eldbus"
-
-# we don't have bullet for physics
-# You have chosen to disable physics support. This disables lots of
-# core functionality and is effectively never tested. You are going
-# to find features that suddenly don't work and as a result cause
-# a series of breakages. This is simply not tested so you are on
-# your own in terms of ensuring everything works if you do this
-EXTRA_OECONF = " \
-    --disable-physics \
-    --enable-i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-aba \
-"
-EXTRA_OECONF_append_class-target = " \
-    --with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc \
-    --with-eolian-gen=${STAGING_BINDIR_NATIVE}/eolian_gen \
-    --with-eolian-cxx=${STAGING_BINDIR_NATIVE}/eolian_cxx \
-    --with-elua=${STAGING_BINDIR_NATIVE}/elua \
-"
-EXTRA_OECONF_append_class-native = " \
-    --disable-fontconfig \
-    --disable-audio \
-    --disable-physics \
-    --disable-multisense \
-    --disable-cserve \
-    --disable-libeeze \
-    --with-x11=none \
-    --disable-image-loader-bmp \
-    --disable-image-loader-eet \
-    --disable-image-loader-generic \
-    --disable-image-loader-gif \
-    --disable-image-loader-ico \
-    --disable-image-loader-jp2k \
-    --disable-image-loader-pmaps \
-    --disable-image-loader-psd \
-    --disable-image-loader-tga \
-    --disable-image-loader-wbmp \
-    --disable-image-loader-webp \
-    --disable-image-loader-xpm \
-    --disable-image-loader-tgv \
-    --disable-image-loader-dds \
-"
-
-PACKAGECONFIG ?= "egl opengl-es gstreamer1 pulseaudio luajit ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}"
-PACKAGECONFIG_class-native = "luajit"
-
-PACKAGECONFIG[wayland] = "--enable-wayland --enable-wayland-ivi-shell,--disable-wayland --disable-wayland-ivi-shell,wayland"
-PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
-# sort of tri-state
-PACKAGECONFIG[opengl-full] = "--with-opengl=full,,virtual/libgl"
-PACKAGECONFIG[opengl-es] = "--with-opengl=es,,virtual/libgles2"
-PACKAGECONFIG[opengl-none] = "--with-opengl=none,,"
-# be aware when enabling this for efl-native, we don't provide gcc-native so you need to make
-# sure that all your builders have g++ which supports -std=gnu++11
-PACKAGECONFIG[c++11] = "--enable-cxx-bindings,--disable-cxx-bindings"
-PACKAGECONFIG[gstreamer] = "--enable-gstreamer,--disable-gstreamer,gstreamer"
-PACKAGECONFIG[gstreamer1] = "--enable-gstreamer1,--disable-gstreamer1,gstreamer1.0 gstreamer1.0-plugins-base"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
-PACKAGECONFIG[luajit] = "--disable-lua-old,--enable-lua-old,luajit"
-PACKAGECONFIG[lua-old] = "--enable-lua-old,--disable-lua-old,lua"
-PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
-# currently we don't provide doxygen-native
-PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,doxygen-native"
-
-do_install_append() {
-    # don't ship precompiled lua files
-    rm -f ${datadir}/elua/*/*.luac
-}
-
-PACKAGES =+ "edje-utils embryo-utils embryo-tests efreet-trash efreet-mime libeet libefreet ecore-audio ecore-input-evas ecore-input ecore-imf-evas ecore-imf ecore-file ecore-con ecore-ipc ecore-x ecore-evas libemotion eo ecore edje eet eeze efreet eina eio embryo emotion ethumb evas eldbus elua"
-
-# upgrade path from 1.7
-DEBIAN_NOAUTONAME_ecore-audio = "1"
-DEBIAN_NOAUTONAME_ecore-input-evas = "1"
-DEBIAN_NOAUTONAME_ecore-input = "1"
-DEBIAN_NOAUTONAME_ecore-imf-evas = "1"
-DEBIAN_NOAUTONAME_ecore-imf = "1"
-DEBIAN_NOAUTONAME_ecore-file = "1"
-DEBIAN_NOAUTONAME_ecore-con = "1"
-DEBIAN_NOAUTONAME_ecore-ipc = "1"
-DEBIAN_NOAUTONAME_ecore-x = "1"
-DEBIAN_NOAUTONAME_ecore-evas = "1"
-DEBIAN_NOAUTONAME_embryo = "1"
-
-ALLOW_EMPTY_ecore = "1"
-RDEPENDS_ecore = "ecore-audio ecore-input-evas ecore-input ecore-imf-evas ecore-imf ecore-file ecore-con ecore-ipc ecore-x ecore-evas"
-
-python populate_packages_prepend () {
-    for plugin_type in "engines loaders savers".split():
-        bb.note( "splitting packages for evas %s..." % plugin_type )
-        basedir = d.expand( '${libdir}/evas/modules/%s' % plugin_type)
-
-        do_split_packages(d, basedir, '^(.*)',
-        output_pattern = 'evas-' + plugin_type[:-1] + "-%s",
-        description = 'Evas module %s',
-        allow_dirs=True, recursive=False, extra_depends="" )
-
-        plugin_type = "cserve2"
-        bb.note( "splitting packages for evas %s..." % plugin_type )
-        basedir = d.expand( '${libdir}/evas/%s/loaders' % plugin_type)
-
-        do_split_packages(d, basedir, '^(.*)',
-        output_pattern = 'evas-' + plugin_type + "-%s",
-        description = 'Evas csever2 loader module %s',
-        allow_dirs=True, recursive=False, extra_depends="" )
-}
-
-PACKAGES += "evas-loader-png evas-engine-software-generic evas-engine-fb"
-PACKAGES_DYNAMIC += "^evas-engine-.* ^evas-loader-.* ^evas-saver-.* ^evas-cserve2-.*"
-
-# PACKAGES_DYNAMIC + do_split_packages isn't used for all libe libs,
-# because PACKAGES_DYNAMIC would be catching too many patterns
-# (or need to list all possible prefixes) and not all original packages
-# were splitted like that, so it would need RCONFLICTS/RPROVIDES/RREPLACES
-# combos at least in few places for upgrade path.
-
-FILES_efreet-trash = " \
-    ${libdir}/libefreet_trash${SOLIBS} \
-"
-FILES_efreet-mime = " \
-    ${libdir}/libefreet_mime${SOLIBS} \
-"
-FILES_libeet = " \
-    ${libdir}/libeet${SOLIBS} \
-"
-FILES_libefreet = " \
-    ${libdir}/libefreet${SOLIBS} \
-"
-FILES_ecore-audio = "\
-    ${libdir}/libecore_audio${SOLIBS} \
-"
-FILES_ecore-input-evas = "\
-    ${libdir}/libecore_input_evas${SOLIBS} \
-"
-FILES_ecore-input = "\
-    ${libdir}/libecore_input${SOLIBS} \
-"
-FILES_ecore-imf-evas = "\
-    ${libdir}/libecore_imf_evas${SOLIBS} \
-    ${libdir}/ecore-imf/modules/*/*/module.so \
-"
-FILES_ecore-imf = "\
-    ${libdir}/libecore_imf${SOLIBS} \
-"
-
-FILES_ecore-file = "\
-    ${libdir}/libecore_file${SOLIBS} \
-"
-FILES_ecore-con = "\
-    ${libdir}/libecore_con${SOLIBS} \
-"
-FILES_ecore-ipc = "\
-    ${libdir}/libecore_ipc${SOLIBS} \
-"
-FILES_ecore-x = "\
-    ${libdir}/libecore_x${SOLIBS} \
-    ${libdir}/ecore_x/bin/v-*/ecore_x_vsync \
-"
-FILES_ecore-evas = "\
-    ${libdir}/libecore_evas${SOLIBS} \
-    ${libdir}/ecore-evas/engines/*/*/module.so \
-"
-FILES_eio = "\
-    ${libdir}/libeio${SOLIBS} \
-"
-FILES_eina = "\
-    ${libdir}/libeina${SOLIBS} \
-    ${bindir}/eina-bench-cmp \
-"
-FILES_edje-utils = "\
-    ${bindir}/edje_* \
-    ${datadir}/edje/include/edje.inc \
-"
-FILES_eldbus = "\
-    ${libdir}/libeldbus${SOLIBS} \
-"
-FILES_eo = "\
-    ${libdir}/libeo${SOLIBS} \
-"
-FILES_libemotion = "\
-    ${libdir}/libemotion${SOLIBS} \
-"
-FILES_efreet = " \
-    ${datadir}/dbus-1/services/*Efreet* \
-    ${libdir}/efreet/*/efreet*create \
-    ${bindir}/efreetd \
-    ${datadir}/efreet \
-"
-FILES_eet = " \
-    ${bindir}/eet \
-    ${bindir}/eetpack \
-    ${bindir}/vieet \
-    ${bindir}/diffeet \
-    ${libdir}/libeet${SOLIBS} \
-"
-FILES_emotion = " \
-    ${datadir}/emotion \
-    ${libdir}/emotion/modules/gstreamer1/*/module.so \
-"
-FILES_embryo-tests = " \
-    ${datadir}/embryo/ \
-"
-FILES_embryo-utils = " \
-    ${binddir}/embryo_* \
-"
-FILES_embryo = " \
-    ${libdir}/libembryo${SOLIBS} \
-"
-FILES_ethumb = " \
-    ${datadir}/dbus-1/services/*Ethumb* \
-    ${libdir}/libethumb${SOLIBS} \
-    ${libdir}/libethumb_client${SOLIBS} \
-    ${bindir}/ethumbd \
-    ${bindir}/ethumbd_client \
-    ${bindir}/ethumb \
-    ${libdir}/ethumb/*/*/*/module.so \
-    ${libdir}/ethumb/*/*/*/*.edj \
-    ${libdir}/ethumb_client/utils/*/ethumbd_slave \
-    ${datadir}/ethumb* \
-"
-FILES_ecore = " \
-    ${libdir}/libecore${SOLIBS} \
-    ${libdir}/ecore*/*/*/*/module.so \
-    ${datadir}/ecore* \
-"
-FILES_evas = " \
-    ${libdir}/libevas${SOLIBS} \
-    ${libdir}/evas*/*/*/*/*/module.so \
-    ${libdir}/evas*/*/*/*/*/*.edj \
-    ${libdir}/evas/cserve2/bin/*/evas_cserve2* \
-    ${datadir}/evas* \
-    ${bindir}/evas_cserve2_* \
-"
-
-FILES_eeze = " \
-    ${libdir}/libeeze${SOLIBS} \
-    ${libdir}/eeze*/*/*/*/*/module.so \
-    ${datadir}/eeze \
-    ${bindir}/eeze_* \
-"
-FILES_edje = " \
-    ${libdir}/libedje${SOLIBS} \
-    ${libdir}/edje*/*/*/*/module.so \
-    ${libdir}/edje/utils/*/epp \
-    ${datadir}/edje \
-    ${datadir}/mime \
-"
-FILES_elua = " \
-    ${bindir}/elua \
-    ${datadir}/elua \
-"
-FILES_${PN}-dbg += " \
-    ${libdir}/efreet/*/.debug \
-    ${libdir}/ecore*/*/*/*/.debug \
-    ${libdir}/ecore*/*/*/.debug \
-    ${libdir}/evas*/*/*/*/*/.debug \
-    ${libdir}/evas/cserve2/bin/*/.debug \
-    ${libdir}/eeze*/*/*/*/*/.debug \
-    ${libdir}/edje*/*/*/*/.debug \
-    ${libdir}/edje/utils/*/.debug \
-    ${libdir}/ethumb/*/*/*/.debug \
-    ${libdir}/ethumb_client/utils/*/.debug \
-    ${libdir}/emotion/modules/gstreamer1/*/.debug \
-"
-FILES_${PN}-dev += " \
-    ${libdir}/cmake \
-    ${libdir}/ecore*/*/*/*/module.la \
-    ${libdir}/evas*/*/*/*/*/module.la \
-    ${libdir}/ethumb*/*/*/*/module.la \
-    ${libdir}/eeze*/*/*/*/*/module.la \
-    ${libdir}/edje*/*/*/*/module.la \
-    ${libdir}/emotion/modules/gstreamer1/*/module.la \
-    ${datadir}/gdb/auto-load \
-    ${datadir}/eo/gdb \
-    ${bindir}/eldbus-codegen \
-"
-
-PNBLACKLIST[efl] ?= "Depends on broken efl-native - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-PNBLACKLIST[efl-native] ?= "Broken: fails to build with http://errors.yoctoproject.org/Errors/Details/138240/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl/0001-configure.ac-Don-t-check-for-Xprint-extension.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl/0001-configure.ac-Don-t-check-for-Xprint-extension.patch
deleted file mode 100644
index fa85f81..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl/0001-configure.ac-Don-t-check-for-Xprint-extension.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 27aedcdcdafbf079dc022bab72ec309cf7db3172 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Fri, 10 Jan 2014 17:07:13 +0100
-Subject: [PATCH 1/3] configure.ac: Don't check for Xprint extension
-
-* it's long gone
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure.ac | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index c108b1b..f019bfc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3474,7 +3474,6 @@ if test "x${want_x11_xlib}" = "xyes" ; then
-    ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension])
-    ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion])
-    ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens])
--   ECORE_CHECK_X_EXTENSION([Xprint], [Print.h], [Xp], [XpQueryScreens])
-    ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent])
-    ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat])
-    ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent])
--- 
-2.3.0
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl/0001-evas_3d-Add-Eet.h-includes.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl/0001-evas_3d-Add-Eet.h-includes.patch
deleted file mode 100644
index d0f26c7..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl/0001-evas_3d-Add-Eet.h-includes.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 2e50fd2dfc68b77e7acddc79550f22987778a897 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Tue, 2 Dec 2014 12:21:10 +0100
-Subject: [PATCH] evas_3d: Add Eet.h includes
-
-* with some very restrictive options like we use in efl-native, the build is complaining
-  about missing symbols from Eet.h, add include where needed
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/lib/evas/canvas/evas_canvas3d_eet.c                  | 1 +
- src/modules/evas/model_loaders/eet/evas_model_load_eet.c | 1 +
- src/modules/evas/model_savers/eet/evas_model_save_eet.c  | 1 +
- 3 files changed, 3 insertions(+)
-
-diff --git a/src/lib/evas/canvas/evas_canvas3d_eet.c b/src/lib/evas/canvas/evas_canvas3d_eet.c
-index 281f69d..a604076 100644
---- a/src/lib/evas/canvas/evas_canvas3d_eet.c
-+++ b/src/lib/evas/canvas/evas_canvas3d_eet.c
-@@ -1,3 +1,4 @@
-+#include <Eet.h>
- #include <stdio.h>
- #include "evas_common_private.h"
- #include "evas_private.h"
-diff --git a/src/modules/evas/model_loaders/eet/evas_model_load_eet.c b/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
-index 803846d..7ebaf8e 100644
---- a/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
-+++ b/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
-@@ -3,6 +3,7 @@
- #endif
- 
- #include <Eo.h>
-+#include <Eet.h>
- #include <stdio.h>
- #include "evas_common_private.h"
- #include "evas_private.h"
-diff --git a/src/modules/evas/model_savers/eet/evas_model_save_eet.c b/src/modules/evas/model_savers/eet/evas_model_save_eet.c
-index 71e094a..4d56977 100644
---- a/src/modules/evas/model_savers/eet/evas_model_save_eet.c
-+++ b/src/modules/evas/model_savers/eet/evas_model_save_eet.c
-@@ -2,6 +2,7 @@
-    #include "config.h"
- #endif
- 
-+#include <Eet.h>
- #include <stdio.h>
- #include "evas_common_private.h"
- #include "evas_private.h"
--- 
-2.5.0
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl_1.15.1.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl_1.15.1.bb
deleted file mode 100644
index 9f18531..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/efl_1.15.1.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "\
-    ${E_RELEASES}/libs/${SRCNAME}/${SRCNAME}-${SRCVER}.tar.gz \
-    file://0001-configure.ac-Don-t-check-for-Xprint-extension.patch \
-    file://0001-evas_3d-Add-Eet.h-includes.patch \
-"
-
-SRC_URI[md5sum] = "dc91bcab73275f678e1748a2dea8d88a"
-SRC_URI[sha256sum] = "2a6d0ab28020b4741be20b32ad0ffeb8f97f766c5c32175bacc2f2d0dc52f98c"
-
-# Temporary disable until error like the one following are fixed
-# efl-native/2_1.8.4-r0/efl-1.8.4/src/lib/eet/.libs/libeet.so: file not recognized: File truncated
-# collect2: error: ld returned 1 exit status
-# x86_64-linux-libtool: install: error: relink `modules/evas/savers/tiff/module.la' with the above command before installing it
-# Makefile:11031: recipe for target 'install-savertiffpkgLTLIBRARIES' failed
-PARALLEL_MAKE_class-native = ""
-
-#EFL_RUN_IN_TREE=1 ../src/bin/eolian/eolian_gen --eo --legacy -I/OE/build/shr-core/tmp-eglibc/work/x86_64-linux/efl-native/2_1.10.0-r0/efl-1.10.0/src/lib/eo -I/OE/build/shr-core/tmp-eglibc/work/x86_64-linux/efl-native/2_1.10.0-r0/efl-1.10.0/src/lib/evas/canvas -I/OE/build/shr-core/tmp-eglibc/work/x86_64-linux/efl-native/2_1.10.0-r0/efl-1.10.0/src/lib/edje -I/OE/build/shr-core/tmp-eglibc/work/x86_64-linux/efl-native/2_1.10.0-r0/efl-1.10.0/src/lib/ecore_audio --gc -o lib/evas/canvas/evas_line.eo.c /OE/build/shr-core/tmp-eglibc/work/x86_64-linux/efl-native/2_1.10.0-r0/efl-1.10.0/src/lib/evas/canvas/evas_line.eo
-#ERR<32439>:eolian_gen /OE/build/shr-core/tmp-eglibc/work/x86_64-linux/efl-native/2_1.10.0-r0/efl-1.10.0/src/bin/eolian/main.c:103 _generate_c_file() Couldnt open file lib/evas/canvas/evas_line.eo.c for writing
-#Makefile:30738: recipe for target 'lib/evas/canvas/evas_line.eo.c' failed
-#make[2]: *** [lib/evas/canvas/evas_line.eo.c] Error 1
-#Makefile:2163: recipe for target 'all-recursive' failed
-# autotools-brokensep
-B = "${S}"
-
-#ld: error: modules/evas/image_loaders/png/bin_evas_evas_cserve2_slave-evas_image_load_png.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
-#ld: error: modules/evas/image_loaders/png/bin_evas_evas_cserve2_slave-evas_image_load_png.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
-CFLAGS += "-fPIC"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary-theme-efenniht/LICENSE b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary-theme-efenniht/LICENSE
deleted file mode 100644
index 61bb2f6..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary-theme-efenniht/LICENSE
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright notice for Enlightenment:
-
-Copyright (C) 2000-2010 Carsten Haitzler and various contributors (see AUTHORS)
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright 
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary-theme-efenniht_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary-theme-efenniht_svn.bb
deleted file mode 100644
index 783d123..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary-theme-efenniht_svn.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-DESCRIPTION = "efenniht elementary theme - Efenniht was devised to be clean \
-and neutral. Its name (which means equinox) comes from the chromatic duality \
-that was decided at the very beginning, with a dark theme (black and orange) \
-and a bright one (white and blue) to be developed so that more people feel \
-comfortable using it. Efenniht uses few animations, discrete contrasts between \
-shades of gray and fine lines (colored) that outline the selected elements."
-SECTION = "e/utils"
-HOMEPAGE = "http://trac.enlightenment.org/e/wiki/Themes#Efenniht"
-DEPENDS = "edje-native"
-RSUGGESTS_${PN} = "e-wm-theme-illume-efenniht"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=f523ab5986cc79b52a90d2ac3d5454a2"
-
-SRCREV_THM_REV ?= "${EFL_SRCREV}"
-SRCREV_ELM_REV ?= "${EFL_SRCREV}"
-
-SRCREV_FORMAT = "THM_REV"
-PV = "0.0+svnr${SRCPV}"
-PR = "r1"
-
-inherit e-base allarch
-
-SRCNAME = "efenniht"
-SRC_URI = "${E_SVN}/trunk/THEMES;module=${SRCNAME};protocol=http;name=THM_REV"
-SRC_URI += "${E_SVN}/trunk/elementary/data;module=themes;protocol=http;name=ELM_REV"
-SRC_URI += "file://LICENSE"
-S = "${WORKDIR}/${SRCNAME}"
-
-do_compile() {
-    ${STAGING_BINDIR_NATIVE}/edje_cc -id ${S}/images -id ${WORKDIR}/themes/images ${S}/elm-efenniht.edc -o ${S}/elm-efenniht.edj
-}
-
-do_install() {
-    install -d ${D}${datadir}/elementary/themes/
-    install -m 0644 ${S}/elm-efenniht.edj ${D}${datadir}/elementary/themes/
-}
-
-FILES_${PN} = "${datadir}/elementary/themes/"
-
-PNBLACKLIST[elementary-theme-efenniht] ?= "Depends on blacklisted edje-native - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[elementary-theme-efenniht] ?= "Runtime depends on blacklisted elementary-theme-efenniht - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[elementary-theme-efenniht] ?= "Runtime depends on blacklisted elementary-theme-efenniht-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary.inc
deleted file mode 100644
index cec67aa..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary.inc
+++ /dev/null
@@ -1,89 +0,0 @@
-DESCRIPTION = "EFL based widget set for mobile devices"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a173054a93896e933df53e3382d472c2"
-DEPENDS = "eet-native edje-native elementary-native efreet evas ecore edje eet eldbus ethumb eio"
-DEPENDS_class-native = "efl-native"
-
-inherit efl gettext
-
-EXTRA_OECONF_append_class-target = "\
-    --with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc \
-    --with-eet-eet=${STAGING_BINDIR_NATIVE}/eet \
-    --with-elementary-codegen=${STAGING_BINDIR_NATIVE}/elementary_codegen \
-    --with-elm-prefs-cc=${STAGING_BINDIR_NATIVE}/elm_prefs_cc \
-    --with-eolian-gen=${STAGING_BINDIR_NATIVE}/eolian_gen \
-    --with-eolian-cxx=${STAGING_BINDIR_NATIVE}/eolian_cxx \
-"
-
-BBCLASSEXTEND = "native"
-
-PACKAGECONFIG[eweather] = "--enable-eweather,--disable-eweather,libeweather"
-PACKAGECONFIG[ewebkit] = "--with-elementary-web-backend=ewebkit,--with-elementary-web-backend=none,webkit-efl"
-# be aware when enabling this for efl-native, we don't provide gcc-native so you need to make
-# sure that all your builders have g++ which supports -std=gnu++11
-PACKAGECONFIG[c++11] = "--enable-cxx-bindings,--disable-cxx-bindings"
-
-do_configure_prepend() {
-    # prefix returned eolian paths with STAGING_DIR_HOST
-    sed -i 's%^\(DEPS_EOLIAN_FLAGS=`.*\)`$%\1 | sed "s#-I\\${prefix}#-I\\${STAGING_DIR_HOST}\\${prefix}#g"`%g' ${S}/configure.ac
-}
-
-do_compile_append_class-target() {
-    sed -i -e s:${STAGING_DIR_TARGET}::g \
-           -e s:/${TARGET_SYS}::g \
-              elementary.pc
-}
-
-PACKAGES += "${PN}-configs ${PN}-accessibility"
-
-RDEPENDS_${PN}_class-native = ""
-
-RDEPENDS_${PN} = "\
-    ${PN}-themes \
-    ${PN}-configs \
-"
-RSUGGESTS_${PN} = "${PN}-tests ${PN}-accessibility"
-
-FILES_${PN} += "\
-    ${libdir}/edje/modules/elm \
-    ${libdir}/elementary/modules/datetime_input_ctxpopup/*/module.so \
-    ${libdir}/elementary/modules/prefs/*/module.so \
-    ${libdir}/elementary/modules/prefs/*/*.edj \
-"
-
-FILES_${PN}-dev += "\
-    ${bindir}/elm_prefs_cc \
-    ${libdir}/elementary/modules/*/*/module.la \
-    ${libdir}/cmake \
-"
-
-FILES_${PN}-themes = "\
-    ${datadir}/elementary/themes \
-"
-
-FILES_${PN}-configs = "\
-    ${datadir}/elementary/config \
-"
-
-FILES_${PN}-dbg += "\
-    ${libdir}/elementary/modules/*/*/.debug \
-    ${libdir}/edje/modules/elm/*/.debug \
-"
-
-FILES_${PN}-tests = "\
-    ${bindir}/elementary* \
-    ${datadir}/elementary/images \
-    ${datadir}/elementary/objects \
-    ${datadir}/elementary/examples \
-    ${datadir}/applications/* \
-    ${datadir}/icons/* \
-    ${libdir}/elementary/modules/test_entry/* \
-    ${libdir}/elementary/modules/test_map/* \
-"
-
-FILES_${PN}-accessibility = "\
-    ${libdir}/elementary/modules/access_output/* \
-"
-
-# Some upgrade path tweaking, as in evas
-AUTO_LIBNAME_PKGS = ""
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary/0001-Makefile-Use-elementary_codegen-defined-in-configure.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary/0001-Makefile-Use-elementary_codegen-defined-in-configure.patch
deleted file mode 100644
index 9524c70..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary/0001-Makefile-Use-elementary_codegen-defined-in-configure.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 75d104d105aa03dd9d446fa7d84fa95e0f566cf9 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 11 Jan 2014 12:55:59 +0100
-Subject: [PATCH] Makefile: Use elementary_codegen defined in configure
-
-* using binaries from top_buildir doesn't work when cross-compiling elementary
-  where we need to pass native binaries in configure params
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/examples/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
-index fc35c75..1e10b0b 100644
---- a/src/examples/Makefile.am
-+++ b/src/examples/Makefile.am
-@@ -29,7 +29,7 @@ LDADD = \
- @ELEMENTARY_X_LIBS@ \
- $(top_builddir)/src/lib/libelementary.la
- 
--ELEMENTARY_CODEGEN = $(top_builddir)/src/bin/@ELEMENTARY_CODEGEN_PRG@
-+ELEMENTARY_CODEGEN = @elementary_codegen@
- ELEMENTARY_CODEGEN_FLAGS = --prefix=codegen_example
- 
- SRCS = \
--- 
-1.9.0
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary_1.15.1.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary_1.15.1.bb
deleted file mode 100644
index 40dd8ad..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/elementary_1.15.1.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "\
-    ${E_RELEASES}/libs/${SRCNAME}/${SRCNAME}-${SRCVER}.tar.gz \
-"
-
-# only for target, because configure doesn't default to sane default when
-# these paths aren't passed in -native build
-SRC_URI_append_class-target = " file://0001-Makefile-Use-elementary_codegen-defined-in-configure.patch"
-
-SRC_URI[md5sum] = "bde4d85fa10ee8a7c0aeb74e69d7cd06"
-SRC_URI[sha256sum] = "ae5540c2103fcdc69fd7469277ce25a8a00a0f701fc2c20771dc0108401e53a0"
-
-# autotools-brokensep - configure updates Elementary.h correctly in ${B}, but then build is using Elementary.h from ${S}
-# which includes #define ELM_EMAP (instead of #undef ELM_EMAP) and building fails
-B = "${S}"
-
-PNBLACKLIST[elementary] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130584/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/emotion-generic-players.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/emotion-generic-players.inc
deleted file mode 100644
index 4ab89ae..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/emotion-generic-players.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-DESCRIPTION = "Emotion generic players"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a0f11eedf8706bf6d4d6639fb67eb8ae"
-
-DEPENDS = "emotion"
-
-inherit efl
-
-SRCNAME = "emotion_generic_players"
-
-# creates empty packages until you get vlc-2 and enable it here
-PACKAGECONFIG ?= ""
-# needs eina and ecore from efl and vlc-2 (currently we have 1.11)
-PACKAGECONFIG[vlc] = "--with-vlc,--without-vlc,vlc efl"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/emotion-generic-players_1.15.0.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/emotion-generic-players_1.15.0.bb
deleted file mode 100644
index ffdd269..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/emotion-generic-players_1.15.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "\
-    ${E_RELEASES}/libs/${SRCNAME}/${SRCNAME}-${SRCVER}.tar.gz \
-"
-
-SRC_URI[md5sum] = "68627c1aabf5b7fe084299adcc0b73c1"
-SRC_URI[sha256sum] = "10bad633480a691585b0ba470c573b14da0a010008d9d59d0792cea8c621d423"
-
-PNBLACKLIST[emotion-generic-players] ?= "Depends on blacklisted emotion - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[emotion-generic-players] ?= "Runtime depends on blacklisted emotion-generic-players - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[emotion-generic-players] ?= "Runtime depends on blacklisted emotion-generic-players-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/engrave_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/engrave_svn.bb
deleted file mode 100644
index f950938..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/engrave_svn.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "Engrave is an Edje Editing Library"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=edf2d968b9eb026bfa82cccbd0e6f9f5"
-# also requires yacc and lex on host
-DEPENDS = "evas ecore flex"
-PV = "0.0.0+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-inherit efl autotools-brokensep
-SRC_URI = "${E_SVN}/OLD;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-# engrave.l:5:35: fatal error: libengrave_la-engrave.h: No such file or directory
-# http://errors.yoctoproject.org/Errors/Details/56597/
-PNBLACKLIST[engrave] ?= "BROKEN: fails to build with latest oe-core - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance/0001-pam-use-common-auth-instead-of-system-auth.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance/0001-pam-use-common-auth-instead-of-system-auth.patch
deleted file mode 100644
index a82d1ed..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance/0001-pam-use-common-auth-instead-of-system-auth.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 14396c52a2556b1ab778a310a318ec19c2829735 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Thu, 24 Nov 2011 13:25:33 +0100
-Subject: [PATCH] pam: use common-auth instead of system-auth
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- PROTO/entrance/data/entrance |    8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/data/entrance b/data/entrance
-index 872c83d..2b98c3a 100644
---- a/data/entrance
-+++ b/data/entrance
-@@ -1,4 +1,4 @@
--auth	include		system-auth
--account	include		system-auth
--password	include		system-auth
--session	include		system-auth
-+auth	include		common-auth
-+account	include		common-account
-+password	include		common-password
-+session	include		common-session
--- 
-1.7.8.6
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance/entrance.service b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance/entrance.service
deleted file mode 100644
index 4828686..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance/entrance.service
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Login manager for Enlightenment
-
-[Service]
-ExecStart=/usr/sbin/entrance
-
-[Install]
-Alias=display-manager.service
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance_svn.bb
deleted file mode 100644
index b1e580d..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/entrance_svn.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Login manager for Enlightenment"
-DEPENDS = "efreet eina eet ecore elementary"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-SECTION = "e/apps"
-
-inherit e gettext systemd
-SRC_URI = "${E_SVN}/trunk/PROTO;module=${SRCNAME};protocol=http;scmdata=keep \
-    file://0001-pam-use-common-auth-instead-of-system-auth.patch \
-    file://entrance.service \
-"
-S = "${WORKDIR}/${SRCNAME}"
-
-PNBLACKLIST[entrance] ?= "broken: switch to https://git.enlightenment.org/misc/entrance.git and fix 0.0.4+svnr82070-r7/entrance/data/themes/old/default.edc:678. invalid state name: 'defaault'. "default" state must always be first. - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[consolekit] = "--enable-consolekit,--disable-consolekit,consolekit"
-
-EXTRA_OECONF = "--with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-pam', d)}"
-
-PR = "r7"
-PV = "0.0.4+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-RDEPENDS_${PN} += "${PN}-themes sessreg xauth"
-CONFFILES_${PN} += "${sysconfdir}/entrance.conf"
-
-RCONFLICTS_${PN} += "xserver-nodm-init"
-RREPLACES_${PN} += "xserver-nodm-init"
-
-RCONFLICTS_${PN} += "xserver-nodm-init-systemd"
-RREPLACES_${PN} += "xserver-nodm-init-systemd"
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-
-SYSTEMD_SERVICE_${PN} = "entrance.service"
-
-do_install_append() {
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/entrance.service ${D}${systemd_unitdir}/system
-}
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf/0001-remove-antialias-functions-poppler-has-dropped-them-.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf/0001-remove-antialias-functions-poppler-has-dropped-them-.patch
deleted file mode 100644
index 728ffa6..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf/0001-remove-antialias-functions-poppler-has-dropped-them-.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From 6691ac5fcbac0e766d4410ae649a13957ae85289 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Thu, 22 Oct 2015 16:27:52 +0200
-Subject: [PATCH 1/2] remove antialias functions - poppler has dropped them in
- the API
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The functions removed were not used.
-
-Upstream-Status: pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- src/lib/epdf_main.h                   | 45 -----------------------------------
- src/lib/mupdf/epdf_mupdf_main.c       | 18 --------------
- src/lib/poppler/epdf_poppler_main.cpp | 21 ----------------
- 3 files changed, 84 deletions(-)
-
-diff --git a/src/lib/epdf_main.h b/src/lib/epdf_main.h
-index 54a57ca..0a79bad 100644
---- a/src/lib/epdf_main.h
-+++ b/src/lib/epdf_main.h
-@@ -29,49 +29,4 @@ EAPI int epdf_shutdown();
-  */
- EAPI const char *epdf_backend_version_get (void);
- 
--/**
-- * @brief Return the state of fonts antialiasing in Poppler
-- *
-- * @return EINA_TRUE if fonts antialiasing enabled, EINA_FALSE otherwise.
-- *
-- * Return EINA_TRUE if the state of fonts antialiasing is enabled in
-- * Poppler, EINA_FALSE otherwise.
-- *
-- * @ingroup Epdf_Main
-- */
--EAPI Eina_Bool epdf_fonts_antialias_get (void);
--
--/**
-- * @brief Sets fonts antialiasing mode in Poppler
-- *
-- * @param on EINA_TRUE to enable fonts antialiasing, EINA_FALSE to disable
-- *
-- * Set @p on to EINA_TRUE to enable fonts antialiasing in Poppler,
-- * EINA_FALSE to disable it.
-- */
--EAPI void epdf_fonts_antialias_set (Eina_Bool on);
--
--/**
-- * @brief Return the state of lines antialiasing in Poppler
-- *
-- * @return EINA_TRUE if lines antialiasing enabled, EINA_FALSE otherwise.
-- *
-- * Return EINA_TRUE if the state of lines antialiasing is enabled in
-- * Poppler, EINA_FALSE otherwise.
-- *
-- * @ingroup Epdf_Main
-- */
--EAPI Eina_Bool epdf_lines_antialias_get (void);
--
--/**
-- * @brief Sets lines antialiasing mode in Poppler
-- *
-- * @param on EINA_TRUE to enable lines antialiasing, EINA_FALSE to disable
-- *
-- * Set @p on to EINA_TRUE to enable lines antialiasing in Poppler,
-- * EINA_FALSE to disable it.
-- */
--EAPI void epdf_lines_antialias_set (Eina_Bool on);
--
--
- #endif /* __EPDF_MAIN_H__ */
-diff --git a/src/lib/mupdf/epdf_mupdf_main.c b/src/lib/mupdf/epdf_mupdf_main.c
-index 17bb830..27c6de2 100644
---- a/src/lib/mupdf/epdf_mupdf_main.c
-+++ b/src/lib/mupdf/epdf_mupdf_main.c
-@@ -37,21 +37,3 @@ epdf_backend_version_get (void)
- {
-    return "0.5";
- }
--
--Eina_Bool epdf_fonts_antialias_get(void)
--{
--   return EINA_TRUE;
--}
--
--void epdf_fonts_antialias_set(Eina_Bool on)
--{
--}
--
--Eina_Bool epdf_lines_antialias_get(void)
--{
--   return EINA_TRUE;
--}
--
--void epdf_lines_antialias_set(Eina_Bool on)
--{
--}
-diff --git a/src/lib/poppler/epdf_poppler_main.cpp b/src/lib/poppler/epdf_poppler_main.cpp
-index 9841987..9efdbe8 100644
---- a/src/lib/poppler/epdf_poppler_main.cpp
-+++ b/src/lib/poppler/epdf_poppler_main.cpp
-@@ -46,24 +46,3 @@ epdf_backend_version_get (void)
- {
-   return POPPLER_VERSION;
- }
--
--Eina_Bool epdf_fonts_antialias_get (void)
--{
--  return globalParams->getAntialias();
--}
--
--void epdf_fonts_antialias_set (Eina_Bool on)
--{
--  /* Nice API */
--  globalParams->setAntialias((char*)(on ? "yes" : "no"));
--}
--
--Eina_Bool epdf_lines_antialias_get (void)
--{
--    return globalParams->getVectorAntialias();
--}
--
--void epdf_lines_antialias_set (Eina_Bool on)
--{
--    globalParams->setVectorAntialias((char*)(on ? "yes" : "no"));
--}
--- 
-2.1.0
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf/0002-epdf_poppler_postscript.cpp-fix-build-for-poppler-AP.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf/0002-epdf_poppler_postscript.cpp-fix-build-for-poppler-AP.patch
deleted file mode 100644
index c9adaa7..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf/0002-epdf_poppler_postscript.cpp-fix-build-for-poppler-AP.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From a84c16fdc606f22b993f870b1cea56dd060a35e6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Thu, 22 Oct 2015 16:55:30 +0200
-Subject: [PATCH 2/2] epdf_poppler_postscript.cpp: fix build for poppler API
- change
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Poppler API was changed in [1]. The patch not only shows the change but also
-inspires how to fix.
-
-[1] http://cgit.freedesktop.org/poppler/poppler/commit/?id=9caf7525409d699c16896653528486451123b485
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- src/lib/poppler/epdf_poppler_postscript.cpp | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/poppler/epdf_poppler_postscript.cpp b/src/lib/poppler/epdf_poppler_postscript.cpp
-index 0c2836b..656193b 100644
---- a/src/lib/poppler/epdf_poppler_postscript.cpp
-+++ b/src/lib/poppler/epdf_poppler_postscript.cpp
-@@ -82,11 +82,14 @@ epdf_postscript_print (const Epdf_Postscript *postscript)
- 
-   // FIXME: fix postscript title
- #ifdef HAVE_POPPLER_0_20
-+  std::vector<int> pages;
-+  for (int i = postscript->first_page; i <= postscript->last_page; ++i) {
-+    pages.push_back(i);
-+  }
-   PSOutputDev ps_dev(postscript->filename,
-                      postscript->pdfdoc,
-                      (char *)"PS title",
--                     postscript->first_page,
--                     postscript->last_page,
-+                     pages,
-                      psModePS,
-                      (int)postscript->width,
-                      (int)postscript->height,
--- 
-2.1.0
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf_svn.bb
deleted file mode 100644
index d664bad..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/epdf_svn.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Epdf is the glue between EFL and libpoppler"
-
-DEPENDS = "poppler evas ecore"
-PV = "0.1.0+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-inherit efl
-
-LICENSE = "GPLv2 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
-                    file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6 \
-"
-
-SRC_URI = " \
-    ${E_SVN}/trunk/PROTO;module=${SRCNAME};protocol=http;scmdata=keep \
-    file://0001-remove-antialias-functions-poppler-has-dropped-them-.patch \
-    file://0002-epdf_poppler_postscript.cpp-fix-build-for-poppler-AP.patch \
-"
-S = "${WORKDIR}/${SRCNAME}"
-
-EXTRA_OECONF = "\
-    --enable-poppler \
-    --disable-mupdf \
-"
-
-# Some upgrade path tweaking, as in evas
-AUTO_LIBNAME_PKGS = ""
-
-PNBLACKLIST[epdf] ?= "Depends on blacklisted ecore - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[epdf] ?= "Depends on blacklisted evas - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[epdf] ?= "Runtime depends on blacklisted epdf-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[epdf] ?= "Runtime depends on blacklisted epdf - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/evas-generic-loaders.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/evas-generic-loaders.inc
deleted file mode 100644
index d277c11..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/evas-generic-loaders.inc
+++ /dev/null
@@ -1,73 +0,0 @@
-DESCRIPTION = "Evas generic loaders"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a87563ed30add2b0e3460272d3138a00"
-DEPENDS = "eina librsvg cairo"
-
-inherit efl
-
-SRCNAME = "evas_generic_loaders"
-
-EXTRA_OECONF = " \
-    --enable-svg \
-    --disable-gstreamer \
-    --disable-libraw \
-    --disable-spectre \
-"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[poppler] = "--enable-poppler,--disable-poppler,poppler"
-
-PACKAGESPLITFUNCS_prepend = "split_evas_loader_packages "
-
-python split_evas_loader_packages () {
-    bb.note( "splitting packages for evas generic loaders" )
-    basedir = d.expand( '${libdir}/evas/utils')
-
-    do_split_packages(d, basedir, 'evas_image_loader\.(.*)$',
-    output_pattern = "evas-generic-loader-%s",
-    description = 'Evas generic loaders - module %s',
-    allow_dirs=True, recursive=False, extra_depends="" )
-
-    do_split_packages(d, basedir, 'evas_generic_pdf_loader\.(.*)$',
-    output_pattern = "evas-generic-pdf-loader-%s",
-    description = 'Evas generic pdf loaders - module %s',
-    allow_dirs=True, recursive=False, extra_depends="" )
-}
-
-# add symlinks for different format (it doesn't make much sense to package them in separate packages)
-FILES_evas-generic-loader-xcf += " \
-    ${libdir}/evas/utils/evas_image_loader.xcf.gz \
-"
-FILES_evas-generic-loader-svg += " \
-    ${libdir}/evas/utils/evas_image_loader.svg.gz \
-    ${libdir}/evas/utils/evas_image_loader.svgz \
-"
-FILES_evas-generic-loader-pdf += " \
-    ${libdir}/evas/utils/evas_image_loader.doc \
-    ${libdir}/evas/utils/evas_image_loader.docx \
-    ${libdir}/evas/utils/evas_image_loader.odp \
-    ${libdir}/evas/utils/evas_image_loader.ods \
-    ${libdir}/evas/utils/evas_image_loader.odt \
-    ${libdir}/evas/utils/evas_image_loader.ppt \
-    ${libdir}/evas/utils/evas_image_loader.pptx \
-    ${libdir}/evas/utils/evas_image_loader.rtf \
-    ${libdir}/evas/utils/evas_image_loader.xls \
-    ${libdir}/evas/utils/evas_image_loader.xlsx \
-"
-FILES_evas-generic-pdf-loader-libreoffice += " \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.doc \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.docx \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.odp \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.ods \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.odt \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.ppt \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.pptx \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.rtf \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.xls \
-    ${libdir}/evas/utils/evas_generic_pdf_loader.xlsx \
-"
-
-FILES_${PN}-dbg += "${libdir}/evas/utils/.debug"
-
-PACKAGES += "evas-generic-loader-svg"
-PACKAGES_DYNAMIC += "^evas-generic-loader-.* ^evas-generic-pdf-loader-.*"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/evas-generic-loaders_1.15.0.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/evas-generic-loaders_1.15.0.bb
deleted file mode 100644
index ecdbcee..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/evas-generic-loaders_1.15.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "\
-    ${E_RELEASES}/libs/${SRCNAME}/${SRCNAME}-${SRCVER}.tar.gz \
-"
-
-SRC_URI[md5sum] = "3ca8443b8cbf177845595c5e02fbc49c"
-SRC_URI[sha256sum] = "caa22c9ba1ae9629c16a3fe809ea927f60b8f0d80cdb7f145159b997b9ae2bcd"
-
-PNBLACKLIST[evas-generic-loaders] ?= "Depends on blacklisted eina - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[evas-generic-loaders] ?= "Runtime depends on blacklisted evas-generic-loaders - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[evas-generic-loaders] ?= "Runtime depends on blacklisted evas-generic-loaders-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite.inc
deleted file mode 100644
index 60e8597..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-DESCRIPTION = "Expedite is a comprehensive benchmarking suite for Evas"
-DEPENDS = "eet evas libsdl"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d70bc65d46237e4ef386beebe7d0fe5b"
-
-INC_PR = "r0"
-
-inherit e
-
-EXTRA_OECONF = "\
-    --x-includes=${STAGING_INCDIR}/X11 \
-    --x-libraries=${STAGING_LIBDIR} \
-    --enable-simple-x11 \
-\
-    --enable-software-x11 \
-    --enable-xrender-x11 \
-    --enable-software-16-x11 \
-    --enable-opengl-x11 \
-    --enable-fb \
-    --disable-software-ddraw \
-    --disable-direct3d \
-"
-
-FILES_${PN} += "${datadir}"
-RDEPENDS_${PN} = "expedite-themes evas-engine-fb evas-engine-software-generic evas-engine-software-x11 evas-engine-gl-x11 evas-loader-png"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite_1.7.9.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite_1.7.9.bb
deleted file mode 100644
index 832cd00..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite_1.7.9.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "\
-    ${E_MIRROR}/${SRCNAME}-${SRCVER}.tar.gz \
-"
-
-SRC_URI[md5sum] = "954fe8e40fec6a561190ff0fb75b6bdd"
-SRC_URI[sha256sum] = "a05be096c911e0d66d4bdc497ebb935a04ad23696de9084aed9959b5172a593e"
-
-PNBLACKLIST[expedite] ?= "Depends on blacklisted eet - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Depends on blacklisted evas - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-loader-png - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted expedite - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted expedite-themes - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-engine-gl-x11 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-engine-software-generic - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted expedite-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-engine-software-x11 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-engine-fb - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite_git.bb
deleted file mode 100644
index 65c2d4a..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/expedite_git.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-require ${BPN}.inc
-
-SRCREV = "a5e6af917af52877b378090811cf836c16d0bfbb"
-PV = "1.7.99+gitr${SRCPV}"
-
-DEFAULT_PREFERENCE = "-1"
-
-SRC_URI = "\
-    git://git.enlightenment.org/tools/${BPN}.git \
-"
-S = "${WORKDIR}/${SRCNAME}"
-
-PNBLACKLIST[expedite] ?= "Depends on blacklisted eet - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Depends on blacklisted evas - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-loader-png - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted expedite - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-engine-software-generic - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-engine-fb - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-engine-software-x11 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted evas-engine-gl-x11 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted expedite-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[expedite] ?= "Runtime depends on blacklisted expedite-themes - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/imlib2_git.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/imlib2_git.bb
deleted file mode 100644
index 355b334..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/imlib2_git.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "A graphic library for file loading, saving, rendering, and manipulation"
-LICENSE = "MIT & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35"
-
-DEPENDS = "freetype libpng jpeg virtual/libx11 libxext"
-PROVIDES = "virtual/imlib2"
-PV = "1.4.6+gitr${SRCPV}"
-SRCREV = "560a58e61778d84953944f744a025af6ce986334"
-
-inherit efl binconfig
-SRC_URI = "git://git.enlightenment.org/legacy/${BPN}.git"
-S = "${WORKDIR}/git"
-
-# autotools-brokensep
-B = "${S}"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gif] = "--with-gif,--without-gif,giflib"
-PACKAGECONFIG[tiff] = "--with-tiff,--without-tiff,tiff"
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-PACKAGECONFIG[id3] = "--with-id3,--without-id3,libid3tag"
-
-EXTRA_OECONF = "--with-x \
-                --x-includes=${STAGING_INCDIR} \
-                --x-libraries=${STAGING_LIBDIR} "
-
-# TODO: Use more fine granular version
-#OE_LT_RPATH_ALLOW=":${libdir}/imlib2/loaders:${libdir}/imlib2/filters:"
-OE_LT_RPATH_ALLOW = "any"
-OE_LT_RPATH_ALLOW[export]="1"
-
-PACKAGES =+ "imlib2-loaders-dbg imlib2-filters-dbg imlib2-loaders imlib2-filters"
-FILES_${PN} = "${libdir}/lib*.so.* ${libdir}/imlib2/*/*.so"
-FILES_${PN}-dbg = "${libdir}/.debug/ ${bindir}/.debug/ ${prefix}/src/debug/"
-FILES_${PN}-dev += "${bindir}/imlib2-config ${libdir}/*.so ${includedir}"
-FILES_${PN}-bin = "${bindir}"
-FILES_imlib2-loaders = "${libdir}/imlib2/loaders/*.so"
-FILES_imlib2-filters = "${libdir}/imlib2/filters/*.so"
-FILES_imlib2-loaders-dbg += "${libdir}/imlib2/loaders/.debug"
-FILES_imlib2-filters-dbg += "${libdir}/imlib2/filters/.debug"
-
-# png.so jpeg.so id3.so are also provided by lightmediascanner
-PRIVATE_LIBS_imlib2-loaders = "pnm.so lbm.so argb.so tiff.so zlib.so bmp.so tga.so gif.so xpm.so bz2.so"
-
-PRIVATE_LIBS_imlib2-filters = "bumpmap.so colormod.so testfilter.so"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeflvala/disable.eina.test.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeflvala/disable.eina.test.patch
deleted file mode 100644
index 84be133..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeflvala/disable.eina.test.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-It causes testeina.c build to fail linking to internal eina_.*_{init,shutdown} symbols
-as reported in:
-http://lists.alioth.debian.org/pipermail/pkg-fso-maint/2010-May/003056.html
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-diff -uNr vala/tests/testeina.vala ../../../arm920tt-oe-linux-gnueabi/libeflvala/1_2011.01.13.1+svnr82070-r2/vala/tests/testeina.vala
---- vala/tests/testeina.vala	2014-01-13 16:16:53.984999035 +0100
-+++ ../../../arm920tt-oe-linux-gnueabi/libeflvala/1_2011.01.13.1+svnr82070-r2/vala/tests/testeina.vala	2010-02-26 09:02:06.000000000 +0100
-@@ -153,22 +153,22 @@
- 
- void test_eina_benchmark()
- {
--    assert( Eina.Module.init() );
--    assert( Eina.List.init() );
--    assert( Eina.Array.init() );
--    assert( Eina.Benchmark.init() );
--    assert( Eina.Mempool.init() );
-+//  assert( Eina.Module.init() );
-+//  assert( Eina.List.init() );
-+//  assert( Eina.Array.init() );
-+//  assert( Eina.Benchmark.init() );
-+//  assert( Eina.Mempool.init() );
-     var b = new Eina.Benchmark( "test", "test");
-     assert( b.register( "bogus", spec_one, 0, 100, 5 ) );
-     unowned Eina.Array<string> result = b.run();
-     assert( result.count_get() == 2 );
-     result = null;
-     b = null;
--    assert( Eina.Mempool.shutdown() );
--    assert( Eina.Benchmark.shutdown() );
--    assert( Eina.Array.shutdown() );
--    assert( Eina.List.shutdown() );
--    assert( Eina.Module.shutdown() );
-+//  assert( Eina.Mempool.shutdown() );
-+//  assert( Eina.Benchmark.shutdown() );
-+//  assert( Eina.Array.shutdown() );
-+//  assert( Eina.List.shutdown() );
-+//  assert( Eina.Module.shutdown() );
- }
- 
- //===========================================================================
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeflvala_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeflvala_svn.bb
deleted file mode 100644
index eaf4893..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeflvala_svn.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Vala meets the Enlightenment Foundation Libraries"
-AUTHOR = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-SECTION = "devel"
-DEPENDS = "vala-native glib-2.0 dbus dbus-glib eina eet evas ecore edje elementary tiff"
-PV = "2011.01.13.1+svnr${SRCPV}"
-PE = "1"
-PR = "r2"
-SRCREV = "${EFL_SRCREV}"
-SRCNAME = "vala"
-
-inherit e-base autotools-brokensep pkgconfig vala
-
-SRC_URI = "${E_SVN}/trunk/BINDINGS;module=${SRCNAME};protocol=http \
-    file://disable.eina.test.patch \
-"
-S = "${WORKDIR}/${SRCNAME}"
-
-PACKAGES =+ "${PN}-examples"
-FILES_${PN}-examples = "${datadir}/libeflvala ${bindir}/*"
-
-PNBLACKLIST[libeflvala] ?= "Depends on blacklisted elementary - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeweather_svn.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeweather_svn.bb
deleted file mode 100644
index 53988b0..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/efl/libeweather_svn.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "EFL-based weather widget library"
-LICENSE = "LGPL-2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24 \
-                    file://COPYING-PLAIN;md5=c910b645eda0005ccec46f75203dc96e"
-
-DEPENDS = "ecore edje"
-PV = "0.0.0+svnr${SRCPV}"
-SRCREV = "${EFL_SRCREV}"
-
-inherit efl
-SRC_URI = "${E_SVN}/trunk/PROTO;module=${SRCNAME};protocol=http;scmdata=keep"
-S = "${WORKDIR}/${SRCNAME}"
-
-EXTRA_OECONF = "--with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc"
-
-RSUGGESTS_${PN} = "elementary-tests"
-
-do_compile_append() {
-    sed -i -e s:${STAGING_DIR_TARGET}::g \
-           -e s:/${TARGET_SYS}::g \
-              eweather.pc
-}
-
-PACKAGES += "${PN}-plugins"
-
-FILES_${PN}-themes = "\
-    ${datadir} \
-"
-
-FILES_${PN}-plugins = "\
-    ${libdir}/eweather/plugins/*.so \
-"
-
-FILES_${PN}-dbg += "\
-    ${libdir}/eweather/plugins/.debug \
-"
-
-FILES_${PN}-dev += "\
-    ${libdir}/eweather/plugins/*.a \
-    ${libdir}/eweather/plugins/*.la \
-"
-
-RRECOMMENDS_${PN} = "\
-    ${PN}-themes \
-    ${PN}-plugins \
-"
-
-PNBLACKLIST[libeweather] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130649/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-sdk.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-sdk.bb
deleted file mode 100644
index ee4e2c4..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-sdk.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Efl Software Development Kit"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-ALLOW_EMPTY_${PN} = "1"
-
-PR = "r1"
-
-require packagegroup-efl-sdk.inc
-
-PACKAGES = "${PN}"
-
-RDEPENDS_${PN} = "\
-    packagegroup-core-sdk \
-    ${SDK-EFL} \
-    ${SDK-EXTRAS}"
-
-PNBLACKLIST[packagegroup-efl-sdk] ?= "Runtime depends on blacklisted elementary-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-sdk.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-sdk.inc
deleted file mode 100644
index f2b0456..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-sdk.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-SDK-EFL = " \
-     efl-dev \
-     elementary-dev \
-     edbus-dev \
-     luajit-dev \
-"
-
-SDK-EXTRAS ?= ""
-SDK-EXTRAS_qemux86 ?= " valgrind lttng-ust-dev"
-SDK-EXTRAS_qemux86-64 ?= " lttng-ust-dev"
-SDK-EXTRAS_qemuppc ?= " lttng-ust-dev"
-SDK-EXTRAS_qemuarm ?= " lttng-ust-dev"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-standalone-sdk-target.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-standalone-sdk-target.bb
deleted file mode 100644
index 2d9dde6..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-efl-standalone-sdk-target.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Efl Software Development Kit"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-ALLOW_EMPTY_${PN} = "1"
-
-PR = "r1"
-
-require packagegroup-efl-sdk.inc
-
-PACKAGES = "${PN} ${PN}-dbg"
-
-RDEPENDS_${PN} = "\
-    packagegroup-core-standalone-sdk-target \
-    ${SDK-EFL} \
-    ${SDK-EXTRAS}"
-
-PNBLACKLIST[packagegroup-efl-standalone-sdk-target] ?= "Runtime depends on blacklisted elementary-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-x11-illume.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-x11-illume.bb
deleted file mode 100644
index 95ebcab..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/packagegroups/packagegroup-x11-illume.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-DESCRIPTION = "The Illume Windowing Environment -- install this task to get the Enlightenment Window Manager + the Illume environment."
-SECTION = "x11/wm"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${TOPDIR}/meta-openembedded/meta-efl/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-PV = "1.0"
-PR = "r5"
-
-inherit packagegroup allarch
-
-# Default theme and config
-ETHEME ?= "e-wm-theme-default"
-ECONFIG ?= "e-wm-config-mobile"
-
-RRECOMMENDS_${PN} = "\
-    ${ETHEME} \
-"
-
-RDEPENDS_${PN} = "\
-    packagegroup-core-x11-xserver \
-    packagegroup-core-x11-utils \
-    \
-    e-wm \
-    ${ECONFIG} \
-"
-
-PNBLACKLIST[packagegroup-x11-illume] ?= "Runtime depends on blacklisted e-wm - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[packagegroup-x11-illume] ?= "Runtime depends on blacklisted e-wm-config-mobile - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[packagegroup-x11-illume] ?= "Runtime depends on blacklisted e-wm-theme-default - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl.inc b/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl.inc
deleted file mode 100644
index f49f2ee..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl.inc
+++ /dev/null
@@ -1,69 +0,0 @@
-DESCRIPTION = "Webkit browser engine, EFL edition"
-LICENSE = "GPLv2+ & LGPL-2.1"
-LIC_FILES_CHKSUM = " \
-    file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \
-    file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \
-    file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \
-    file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \
-"
-
-# you need harfbuzz with icu enabled, you can add this to your config:
-# PACKAGECONFIG_append_pn-harfbuzz = " icu"
-DEPENDS = "icu libxslt sqlite3 gperf-native bison-native flex-native jpeg \
-           libpng libxt fontconfig cairo freetype glib-2.0 libsoup-2.4 \
-           libxml2 pango eina ecore evas edje eldbus harfbuzz enchant \
-           ruby-native elementary"
-
-PE = "1"
-
-SRCVER ?= "${PV}"
-SRC_URI = "\
-    ${E_RELEASES}/libs/webkit-efl/ewebkit-${SRCVER}.tar.xz \
-"
-S = "${WORKDIR}/ewebkit"
-
-inherit cmake lib_package pkgconfig perlnative pythonnative
-
-ARM_INSTRUCTION_SET = "arm"
-
-EXTRA_OECMAKE = " \
-    -DPORT=Efl \
-    -DSHARED_CORE=On \
-    -DENABLE_DRAG_SUPPORT=On \
-    -DENABLE_WEB_AUDIO=Off \
-    -DENABLE_VIDEO=Off \
-    -DENABLE_VIDEO_TRACK=Off \
-    -DENABLE_ACCESSIBILITY=Off \
-    -DENABLE_BATTERY_STATUS=Off \
-"
-# generated ASM code isn't compatible with armv[45]
-# it was removed from macro assembler in upstream commit 121885
-# https://bugs.webkit.org/show_bug.cgi?id=90198
-EXTRA_OECMAKE_append_armv4 = " -DENABLE_LLINT=Off -DENABLE_JIT=Off -DENABLE_DFG_JIT=Off -DENABLE_FTL_JIT=Off"
-EXTRA_OECMAKE_append_armv5 = " -DENABLE_LLINT=Off -DENABLE_JIT=Off -DENABLE_DFG_JIT=Off -DENABLE_FTL_JIT=Off"
-
-# hack it in OptionsEfl.cmake because that overrules -DENABLE_LLINT=Off
-do_configure_prepend_armv4() {
-    sed -i 's/WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LLINT ON)/WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LLINT OFF)/g' ${S}/Source/cmake/OptionsEfl.cmake
-}
-do_configure_prepend_armv5() {
-    sed -i 's/WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LLINT ON)/WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LLINT OFF)/g' ${S}/Source/cmake/OptionsEfl.cmake
-}
-
-# and disabled LLINT currently isn't supported, so restrict to armv7a and x86*
-COMPATIBLE_MACHINE = "(-)"
-COMPATIBLE_MACHINE_x86 = "(.*)"
-COMPATIBLE_MACHINE_x86-64 = "(.*)"
-COMPATIBLE_MACHINE_armv7a = "(.*)"
-
-LEAD_SONAME = "libewebkit.so"
-PACKAGES =+ "${PN}launcher-dbg ${PN}launcher ${PN}-inspector"
-
-FILES_${PN} += "${datadir}/ewebkit2-1/themes/default.edj"
-FILES_${PN}-dev += "${libdir}/cmake"
-FILES_${PN}launcher = "${bindir}/EWebLauncher"
-FILES_${PN}launcher-dbg = "${bindir}/.debug/EWebLauncher"
-FILES_${PN}-inspector += "${datadir}/ewebkit2-1/inspector"
-
-# http://errors.yoctoproject.org/Errors/Details/40659/
-PNBLACKLIST[webkit-efl] ?= "Old and unmaintaned fork with many security issues - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0001-OptionsCommon.cmake-don-t-mix-CXX_FLAGS-into-C_FLAGS.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0001-OptionsCommon.cmake-don-t-mix-CXX_FLAGS-into-C_FLAGS.patch
deleted file mode 100644
index 19b7bb8..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0001-OptionsCommon.cmake-don-t-mix-CXX_FLAGS-into-C_FLAGS.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e6caaf6e80b9c80dc2b860b471a8f05e825f6dfa Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Thu, 14 Aug 2014 01:00:21 +0200
-Subject: [PATCH 1/3] OptionsCommon.cmake: don't mix CXX_FLAGS into C_FLAGS
-
-* it was added in https://bugs.webkit.org/show_bug.cgi?id=130261
-* causes build failures in udis86 which explicitly asks for gcc but then
-  gets g++ flags from CMAKE_CXX_FLAGS.
-
-cc1: error: command line option '-fvisibility-inlines-hidden' is valid
-for C++/ObjC++ but not for C [-Werror]
-cc1: error: command line option '-fpermissive' is valid for C++/ObjC++
-but not for C [-Werror]
-cc1: all warnings being treated as errors
-Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:11182:
-recipe for target
-'Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/disassembler/udis86/udis86.c.o'
-failed
-make[2]: ***
-[Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/disassembler/udis86/udis86.c.o]
-Error 1
-make[2]: *** Waiting for unfinished jobs....
-make[2]: Leaving directory
-'/OE/build/oe-core/tmp-eglibc/work/core2-64-oe-linux/webkit-efl/1_1.10.0+1.11.0-beta1-r0/build'
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- Source/cmake/OptionsCommon.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Source/cmake/OptionsCommon.cmake b/Source/cmake/OptionsCommon.cmake
-index e304a99..045c614 100644
---- a/Source/cmake/OptionsCommon.cmake
-+++ b/Source/cmake/OptionsCommon.cmake
-@@ -25,7 +25,7 @@ endif ()
- set_property(GLOBAL PROPERTY USE_FOLDERS ON)
- 
- if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
--    set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing")
-+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -fno-strict-aliasing")
-     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-exceptions -fno-strict-aliasing -fno-rtti")
- endif ()
- 
--- 
-2.1.3
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0002-WebKitHelpers.cmake-Add-Wno-error-deprecated-declara.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0002-WebKitHelpers.cmake-Add-Wno-error-deprecated-declara.patch
deleted file mode 100644
index 627a9e8..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0002-WebKitHelpers.cmake-Add-Wno-error-deprecated-declara.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From de93951f89e851b6689718022eebb4b8b1d14c06 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Mon, 13 Jan 2014 17:21:25 +0100
-Subject: [PATCH 2/3] WebKitHelpers.cmake: Add
- -Wno-error=deprecated-declarations -Wno-error=cast-align
- -Wno-error=type-limits
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- Source/cmake/WebKitHelpers.cmake | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/Source/cmake/WebKitHelpers.cmake b/Source/cmake/WebKitHelpers.cmake
-index 227b9ee..ae52ef6 100644
---- a/Source/cmake/WebKitHelpers.cmake
-+++ b/Source/cmake/WebKitHelpers.cmake
-@@ -40,6 +40,25 @@ macro(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
-             # FIXME: When we use -fno-tree-dce to support the jsCStack branch merge, build error occurs due to the uninitialization. Temporarily we set
-             # uninitialized as build warning in order to support the jsCStack merge. https://bugs.webkit.org/show_bug.cgi?id=127777.
-             set(OLD_COMPILE_FLAGS "-Werror -Wno-error=unused-parameter -Wno-error=uninitialized -Wno-error=literal-suffix ${OLD_COMPILE_FLAGS}")
-+            # libsoup-2.4/libsoup/soup-proxy-uri-resolver.h:13:84: error: 'GType soup_proxy_uri_resolver_get_type()' is deprecated (declared at /OE/build/oe-core/tmp-eglibc/sysroots/qemux86-64/usr/include/libsoup-2.4/libsoup/soup-proxy-uri-resolver.h:48) [-Werror=deprecated-declarations]
-+            set(OLD_COMPILE_FLAGS "-Wno-error=deprecated-declarations ${OLD_COMPILE_FLAGS}")
-+            # webkit-efl/1_1.10.0+1.11.0-beta1-r0/ewebkit/Source/WTF/wtf/text/StringImpl.h:742:87: error: cast from 'uint8_t* {aka unsigned char*}' to 'WTF::StringImpl**' increases required alignment of target type [-Werror=cast-align]
-+            set(OLD_COMPILE_FLAGS "-Wno-error=cast-align ${OLD_COMPILE_FLAGS}")
-+            # webkit-efl/1_1.10.0+1.11.0-beta1-r0/ewebkit/Source/WebKit2/Shared/linux/WebMemorySamplerLinux.cpp:70:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
-+            set(OLD_COMPILE_FLAGS "-Wno-error=type-limits ${OLD_COMPILE_FLAGS}")
-+            # webkit-efl/1_1.11.0-r0/ewebkit/Source/WebKit2/UIProcess/API/efl/EwkView.cpp:832:5: error: missing initializer for member '_Evas_GL_Config::gles_version' [-Werror=missing-field-initializers]
-+            # this one is new with efl-1.12
-+            set(OLD_COMPILE_FLAGS "-Wno-error=missing-field-initializers ${OLD_COMPILE_FLAGS}")
-+            # webkit-efl/1_1.11.0-r0/ewebkit/Source/WTF/wtf/dtoa/bignum.cc:105:10: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow]
-+            # this one is new with gcc-5.2
-+            set(OLD_COMPILE_FLAGS "-Wno-error=strict-overflow ${OLD_COMPILE_FLAGS}")
-+            # webkit-efl/1_1.11.0-r0/ewebkit/Source/WTF/wtf/SaturatedArithmetic.h:46:26: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
-+            # this one is new with gcc-5.2
-+            set(OLD_COMPILE_FLAGS "-Wno-error=parentheses ${OLD_COMPILE_FLAGS}")
-+            # webkit-efl/1_1.11.0-r0/ewebkit/Source/WebCore/loader/cache/CachedScript.cpp:103:108: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
-+            # this one is new with gcc-5.2
-+            set(OLD_COMPILE_FLAGS "-Wno-error=logical-not-parentheses ${OLD_COMPILE_FLAGS}")
-+
-         endif ()
- 
-         set_target_properties(${_target} PROPERTIES
--- 
-2.1.3
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0003-FEBlendNEON.h-fix-missing-semicolon.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0003-FEBlendNEON.h-fix-missing-semicolon.patch
deleted file mode 100644
index e718ee1..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0003-FEBlendNEON.h-fix-missing-semicolon.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a076d76b8e8862bd641cd991190e82cfd478cc66 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Wed, 20 Aug 2014 00:52:03 +0200
-Subject: [PATCH 3/3] FEBlendNEON.h: fix missing semicolon
-
-* Otherwise fails with:
-In file included from ewebkit/Source/WebCore/platform/graphics/filters/FEBlend.cpp:29:0:
-ewebkit/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h: In member function 'virtual void WebCore::FEBlend::platformApplySoftware()':
-ewebkit/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h:130:5: error: expected primary-expression before '}' token
-     }
-     ^
-ewebkit/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h:130:5: error: return-statement with a value, in function returning 'void' [-fpermissive]
-ewebkit/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h:130:5: error: expected ';' before '}' token
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h b/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h
-index 1c50765..f4b6f46 100644
---- a/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h
-+++ b/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h
-@@ -126,7 +126,7 @@ void FEBlend::platformApplySoftware()
- 
-     if (pixelArrayLength >= 8) {
-         platformApplyNEON(srcPixelArrayA->data(), srcPixelArrayB->data(), dstPixelArray->data(), pixelArrayLength);
--        return
-+        return;
-     }
-     // If there is just one pixel we expand it to two.
-     ASSERT(pixelArrayLength > 0);
--- 
-2.1.3
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0004-Fix-the-build-with-EFL-1.12-https-bugs.webkit.org-sh.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0004-Fix-the-build-with-EFL-1.12-https-bugs.webkit.org-sh.patch
deleted file mode 100644
index bfa3052..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0004-Fix-the-build-with-EFL-1.12-https-bugs.webkit.org-sh.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From baebc004111289ef658c78a42f8332f3dceef41e Mon Sep 17 00:00:00 2001
-From: "ryuan.choi@navercorp.com" <ryuan.choi@navercorp.com>
-Date: Thu, 13 Nov 2014 07:07:16 +0000
-Subject: [PATCH 4/4] Fix the build with EFL 1.12
- https://bugs.webkit.org/show_bug.cgi?id=138245
-
-Reviewed by Gyuyoung Kim.
-
-Source/WebKit2:
-
-* UIProcess/API/efl/EwkView.cpp:
-First, modified to use Evas_GL raw pointer instead of UniquePtrEfl because
-Evas_GL.h can't be included in UniquePtrEfl.h
-It should be moved into EvasGLContext because WebKit/EFL use only one Evas_GL.
-Second, provided the version of GLES in Evas_GL_Config not to break build with
-EFL 1.12
-(EwkView::EwkView):
-(EwkView::~EwkView):
-(EwkView::displayTimerFired):
-(EwkView::createGLSurface):
-* UIProcess/API/efl/EwkView.h:
-
-Source/WTF:
-
-* wtf/efl/UniquePtrEfl.h:
-Removed Evas_GL.h from UniquePtrEfl.h, which is commonly included, because
-it should not be included with official GL headers.
-
-git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
----
- Source/WTF/wtf/efl/UniquePtrEfl.h            |  2 --
- Source/WebKit2/UIProcess/API/efl/EwkView.cpp | 24 ++++++++++++++++--------
- Source/WebKit2/UIProcess/API/efl/EwkView.h   |  3 ++-
- 3 files changed, 18 insertions(+), 11 deletions(-)
-
-diff --git a/Source/WTF/wtf/efl/UniquePtrEfl.h b/Source/WTF/wtf/efl/UniquePtrEfl.h
-index ba0110a..038d3fb 100644
---- a/Source/WTF/wtf/efl/UniquePtrEfl.h
-+++ b/Source/WTF/wtf/efl/UniquePtrEfl.h
-@@ -33,7 +33,6 @@
- #include <Ecore_IMF.h>
- #include <Eina.h>
- #include <Evas.h>
--#include <Evas_GL.h>
- 
- namespace WTF {
- 
-@@ -51,7 +50,6 @@ using EflUniquePtr = std::unique_ptr<T, EflPtrDeleter<T>>;
-     macro(Eina_Hash, eina_hash_free) \
-     macro(Eina_Module, eina_module_free) \
-     macro(Evas_Object, evas_object_del) \
--    macro(Evas_GL, evas_gl_free)
- 
- #define WTF_DEFINE_EFLPTR_DELETER(typeName, deleterFunc) \
-     template<> struct EflPtrDeleter<typeName> \
-diff --git a/Source/WebKit2/UIProcess/API/efl/EwkView.cpp b/Source/WebKit2/UIProcess/API/efl/EwkView.cpp
-index 50d34ed..6ff3394 100755
---- a/Source/WebKit2/UIProcess/API/efl/EwkView.cpp
-+++ b/Source/WebKit2/UIProcess/API/efl/EwkView.cpp
-@@ -299,9 +299,11 @@ EwkView::EwkView(WKViewRef view, Evas_Object* evasObject)
- 
-     // FIXME: Remove when possible.
-     static_cast<WebViewEfl*>(webView())->setEwkView(this);
--    m_evasGL = EflUniquePtr<Evas_GL>(evas_gl_new(evas_object_evas_get(m_evasObject)));
-+
-+    // FIXME: Consider it to move into EvasGLContext.
-+    m_evasGL = evas_gl_new(evas_object_evas_get(m_evasObject));
-     if (m_evasGL)
--        m_evasGLContext = EvasGLContext::create(m_evasGL.get());
-+        m_evasGLContext = EvasGLContext::create(m_evasGL);
- 
-     if (!m_evasGLContext) {
-         WARN("Failed to create Evas_GL, falling back to software mode.");
-@@ -333,6 +335,9 @@ EwkView::~EwkView()
- {
-     ASSERT(wkPageToEvasObjectMap().get(wkPage()) == m_evasObject);
-     wkPageToEvasObjectMap().remove(wkPage());
-+
-+    if (m_evasGL)
-+        evas_gl_free(m_evasGL);
- }
- 
- EwkView* EwkView::create(WKViewRef webView, Evas* canvas, Evas_Smart* smart)
-@@ -587,7 +592,7 @@ void EwkView::displayTimerFired(Timer<EwkView>*)
-         return;
-     }
- 
--    evas_gl_make_current(m_evasGL.get(), m_evasGLSurface->surface(), m_evasGLContext->context());
-+    evas_gl_make_current(m_evasGL, m_evasGLSurface->surface(), m_evasGLContext->context());
- 
-     WKViewPaintToCurrentGLContext(wkView());
- 
-@@ -828,21 +833,24 @@ bool EwkView::createGLSurface()
-         EVAS_GL_DEPTH_BIT_8,
-         EVAS_GL_STENCIL_NONE,
-         EVAS_GL_OPTIONS_NONE,
--        EVAS_GL_MULTISAMPLE_NONE
-+        EVAS_GL_MULTISAMPLE_NONE,
-+#if defined(EVAS_GL_API_VERSION) && EVAS_GL_API_VERSION >= 2
-+        EVAS_GL_GLES_2_X
-+#endif
-     };
- 
-     // Recreate to current size: Replaces if non-null, and frees existing surface after (OwnPtr).
--    m_evasGLSurface = EvasGLSurface::create(m_evasGL.get(), &evasGLConfig, deviceSize());
-+    m_evasGLSurface = EvasGLSurface::create(m_evasGL, &evasGLConfig, deviceSize());
-     if (!m_evasGLSurface)
-         return false;
- 
-     Evas_Native_Surface nativeSurface;
--    evas_gl_native_surface_get(m_evasGL.get(), m_evasGLSurface->surface(), &nativeSurface);
-+    evas_gl_native_surface_get(m_evasGL, m_evasGLSurface->surface(), &nativeSurface);
-     evas_object_image_native_surface_set(smartData()->image, &nativeSurface);
- 
--    evas_gl_make_current(m_evasGL.get(), m_evasGLSurface->surface(), m_evasGLContext->context());
-+    evas_gl_make_current(m_evasGL, m_evasGLSurface->surface(), m_evasGLContext->context());
- 
--    Evas_GL_API* gl = evas_gl_api_get(m_evasGL.get());
-+    Evas_GL_API* gl = evas_gl_api_get(m_evasGL);
- 
-     WKPoint boundsEnd = WKViewUserViewportToScene(wkView(), WKPointMake(deviceSize().width(), deviceSize().height()));
-     gl->glViewport(0, 0, boundsEnd.x, boundsEnd.y);
-diff --git a/Source/WebKit2/UIProcess/API/efl/EwkView.h b/Source/WebKit2/UIProcess/API/efl/EwkView.h
-index 1c482cf..68dab87 100644
---- a/Source/WebKit2/UIProcess/API/efl/EwkView.h
-+++ b/Source/WebKit2/UIProcess/API/efl/EwkView.h
-@@ -39,6 +39,7 @@
- #endif
- 
- typedef struct _cairo_surface cairo_surface_t;
-+typedef struct _Evas_GL Evas_GL;
- 
- namespace WebKit {
- class ContextMenuClientEfl;
-@@ -241,7 +242,7 @@ private:
-     Evas_Object* m_evasObject;
-     RefPtr<EwkContext> m_context;
-     RefPtr<EwkPageGroup> m_pageGroup;
--    EflUniquePtr<Evas_GL> m_evasGL;
-+    Evas_GL* m_evasGL;
-     std::unique_ptr<WebCore::EvasGLContext> m_evasGLContext;
-     std::unique_ptr<WebCore::EvasGLSurface> m_evasGLSurface;
-     bool m_pendingSurfaceResize;
--- 
-2.1.3
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0005-Fix-the-build-with-cmake-3.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0005-Fix-the-build-with-cmake-3.patch
deleted file mode 100644
index 7e8e295..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0005-Fix-the-build-with-cmake-3.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From a00a7097b85567ae6eb7a00b3ce7ef021841203c Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Thu, 24 Sep 2015 18:03:52 +0200
-Subject: [PATCH 5/5] Fix the build with cmake 3
-
-* the same issue as in GTK port:
-  https://bugs.webkit.org/show_bug.cgi?id=141796
-  http://trac.webkit.org/changeset/180502
-
-* otherwise linking fails with couple undefined symbols
-| CMakeFiles/WebKit2.dir/PluginProcess/unix/PluginProcessMainUnix.cpp.o: In function `WebKit::webkitXError(_XDisplay*, XErrorEvent*)':
-| ewebkit/Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp:63: undefined reference to `XGetErrorText'
-| CMakeFiles/WebKit2.dir/PluginProcess/unix/PluginProcessMainUnix.cpp.o: In function `WebKit::PluginProcessMain::parseCommandLine(int, char**)':
-| ewebkit/Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp:102: undefined reference to `XSetErrorHandler'
-| ewebkit/Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp:102: undefined reference to `XSetErrorHandler'
-| CMakeFiles/WebKit2.dir/WebProcess/efl/WebProcessMainEfl.cpp.o: In function `WebKit::WebProcessMain::platformInitialize()':
-| ewebkit/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:67: undefined reference to `XSetExtensionErrorHandler'
-| ewebkit/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:67: undefined reference to `XSetExtensionErrorHandler'
-| CMakeFiles/WebKit2.dir/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.o: In function `WebKit::NetscapePlugin::platformPostInitializeWindowed(bool, unsigned long)':
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:170: undefined reference to `XFlush'
-| CMakeFiles/WebKit2.dir/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.o: In function `WebKit::NetscapePlugin::platformPostInitializeWindowless()':
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:195: undefined reference to `XGetVisualInfo'
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:199: undefined reference to `XFree'
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:202: undefined reference to `XCreateColormap'
-| CMakeFiles/WebKit2.dir/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.o: In function `WebKit::NetscapePlugin::platformDestroy()':
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:251: undefined reference to `XFreeColormap'
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:255: undefined reference to `XFreePixmap'
-| CMakeFiles/WebKit2.dir/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.o: In function `WebKit::NetscapePlugin::platformGeometryDidChange()':
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:293: undefined reference to `XCreatePixmap'
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:286: undefined reference to `XFreePixmap'
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:295: undefined reference to `XSync'
-| CMakeFiles/WebKit2.dir/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.o: In function `WebKit::NetscapePlugin::platformPaint(WebCore::GraphicsContext*, WebCore::IntRect const&, bool)':
-| ewebkit/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:343: undefined reference to `XSync'
-| collect2: error: ld returned 1 exit status
-| Source/WebKit2/CMakeFiles/WebKit2.dir/build.make:16145: recipe for target 'lib/libewebkit2.so.1.11.0' failed
-| make[2]: *** [lib/libewebkit2.so.1.11.0] Error 1
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- Source/WebCore/PlatformEfl.cmake         | 1 +
- Source/WebKit2/PlatformEfl.cmake         | 3 +++
- Source/cmake/OptionsEfl.cmake            | 1 +
- Tools/WebKitTestRunner/PlatformEfl.cmake | 1 +
- 4 files changed, 6 insertions(+)
-
-diff --git a/Source/WebCore/PlatformEfl.cmake b/Source/WebCore/PlatformEfl.cmake
-index 41ffc15..63b7861 100644
---- a/Source/WebCore/PlatformEfl.cmake
-+++ b/Source/WebCore/PlatformEfl.cmake
-@@ -404,6 +404,7 @@ if (WTF_USE_3D_GRAPHICS)
-         )
-     endif ()
- 
-+    find_package(X11 REQUIRED)
-     list(APPEND WebCore_LIBRARIES
-         ${X11_X11_LIB}
-     )
-diff --git a/Source/WebKit2/PlatformEfl.cmake b/Source/WebKit2/PlatformEfl.cmake
-index 8c66d1b..d96f0bd 100644
---- a/Source/WebKit2/PlatformEfl.cmake
-+++ b/Source/WebKit2/PlatformEfl.cmake
-@@ -331,12 +331,15 @@ if (ENABLE_SECCOMP_FILTERS)
- endif ()
- 
- if (ENABLE_ECORE_X)
-+    find_package(X11 REQUIRED)
-     list(APPEND WebProcess_LIBRARIES
-         ${ECORE_X_LIBRARIES}
-         ${X11_Xext_LIB}
-     )
-     list(APPEND WebKit2_LIBRARIES
-         ${ECORE_X_LIBRARIES}
-+        ${X11_X11_LIB}
-+        ${X11_Xext_LIB}
-     )
- endif ()
- 
-diff --git a/Source/cmake/OptionsEfl.cmake b/Source/cmake/OptionsEfl.cmake
-index 8585f19..1aa9002 100644
---- a/Source/cmake/OptionsEfl.cmake
-+++ b/Source/cmake/OptionsEfl.cmake
-@@ -181,6 +181,7 @@ endif ()
- 
- if (WTF_OS_UNIX)
-     set(ENABLE_X11_TARGET ON)
-+    find_package(X11 REQUIRED)
-     add_definitions(-DXP_UNIX)
- endif (WTF_OS_UNIX)
- 
-diff --git a/Tools/WebKitTestRunner/PlatformEfl.cmake b/Tools/WebKitTestRunner/PlatformEfl.cmake
-index 1873279..a905f2a 100644
---- a/Tools/WebKitTestRunner/PlatformEfl.cmake
-+++ b/Tools/WebKitTestRunner/PlatformEfl.cmake
-@@ -53,6 +53,7 @@ list(APPEND WebKitTestRunnerInjectedBundle_LIBRARIES
- )
- 
- if (ENABLE_ECORE_X)
-+    find_package(X11 REQUIRED)
-     list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
-         ${ECORE_X_INCLUDE_DIRS}
-     )
--- 
-2.6.0
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0006-OptionsEfl.cmake-Fix-build-with-newer-CMake-3.4.patch b/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0006-OptionsEfl.cmake-Fix-build-with-newer-CMake-3.4.patch
deleted file mode 100644
index 0562634..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl/0006-OptionsEfl.cmake-Fix-build-with-newer-CMake-3.4.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 993882f81fe991b8baf1099392703337cc13fac0 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Wed, 27 Jan 2016 18:40:23 +0100
-Subject: [PATCH] OptionsEfl.cmake: Fix build with newer CMake 3.4
-
-* otherwise it fails with:
-  | CMake Error at Source/cmake/OptionsEfl.cmake:251 (CHECK_INCLUDE_FILES):
-  |   Unknown CMake command "CHECK_INCLUDE_FILES".
-* https://bugs.webkit.org/show_bug.cgi?id=150117
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- Source/cmake/OptionsEfl.cmake | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Source/cmake/OptionsEfl.cmake b/Source/cmake/OptionsEfl.cmake
-index 1aa9002..05216d0 100644
---- a/Source/cmake/OptionsEfl.cmake
-+++ b/Source/cmake/OptionsEfl.cmake
-@@ -253,6 +253,7 @@ if (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE)
-         set(WTF_USE_EGL 1)
-         add_definitions(-DWTF_USE_EGL=1)
-     else ()
-+        include(CheckIncludeFiles)
-         CHECK_INCLUDE_FILES("GL/glx.h" OPENGLX_FOUND)
-         add_definitions(-DWTF_USE_GLX=1)
-     endif ()
--- 
-2.7.0
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl_1.11.0.bb b/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl_1.11.0.bb
deleted file mode 100644
index 96ad830..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-efl/webkit/webkit-efl_1.11.0.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += "\
-    file://0001-OptionsCommon.cmake-don-t-mix-CXX_FLAGS-into-C_FLAGS.patch \
-    file://0002-WebKitHelpers.cmake-Add-Wno-error-deprecated-declara.patch \
-    file://0003-FEBlendNEON.h-fix-missing-semicolon.patch \
-    file://0004-Fix-the-build-with-EFL-1.12-https-bugs.webkit.org-sh.patch \
-    file://0005-Fix-the-build-with-cmake-3.patch \
-    file://0006-OptionsEfl.cmake-Fix-build-with-newer-CMake-3.4.patch \
-"
-SRC_URI[md5sum] = "90fa970ebf8646319d292c2bb5bff5db"
-SRC_URI[sha256sum] = "d8d21e27f4a21cd77c41914548c184ddb98693ba23851aa66c8e51c0be4b90b7"
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/files/0001-Define-comparison_fn_t-for-non-glibc-systems.patch b/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/files/0001-Define-comparison_fn_t-for-non-glibc-systems.patch
deleted file mode 100644
index 15d4b3f..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/files/0001-Define-comparison_fn_t-for-non-glibc-systems.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 5bc5b8c5dad3edec6736fd7e7ce61250c4ce3725 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 12 Jul 2017 17:13:19 -0700
-Subject: [PATCH] Define comparison_fn_t for non-glibc systems
-
-lightmediascanner.c:324:12: error: 'comparison_fn_t' undeclared (first use in this function)
-           (comparison_fn_t)_plugin_sort);
-            ^~~~~~~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/lib/lightmediascanner.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/lib/lightmediascanner.c b/src/lib/lightmediascanner.c
-index 344b247..b866883 100644
---- a/src/lib/lightmediascanner.c
-+++ b/src/lib/lightmediascanner.c
-@@ -37,6 +37,11 @@
- #define DEFAULT_SLAVE_TIMEOUT 1000
- #define DEFAULT_COMMIT_INTERVAL 100
- 
-+#if !defined(__GLIBC__)
-+typedef int (*__compar_fn_t) (const void*, const void*);
-+typedef __compar_fn_t comparison_fn_t;
-+#endif
-+
- #ifdef HAVE_MAGIC_H
- static magic_t _magic_handle;
- 
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/files/id3-plugin-support-out-of-tree-build.patch b/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/files/id3-plugin-support-out-of-tree-build.patch
deleted file mode 100644
index 9528bec..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/files/id3-plugin-support-out-of-tree-build.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/plugins/Makefile.am	2015-10-25 16:12:29.331415823 +0000
-+++ b/src/plugins/Makefile.am	2015-10-25 16:14:37.593415808 +0000
-@@ -93,7 +93,7 @@
- id3_id3_la_SOURCES = id3/id3.c id3/id3v1_genres.c
- id3_id3_la_LIBADD = $(PLUGINS_LIBADD)
- 
--id3/id3v1_genres.c: $(srcdir)/id3/id3v1_genres.def $(srcdir)/id3/id3v1_genres_gen.awk
-+$(srcdir)/id3/id3v1_genres.c: $(srcdir)/id3/id3v1_genres.def $(srcdir)/id3/id3v1_genres_gen.awk
- 	$(AWK) -f $(srcdir)/id3/id3v1_genres_gen.awk $(srcdir)/id3/id3v1_genres.def > $@
- 
- EXTRA_DIST += id3/id3v1_genres.def id3/id3v1_genres_gen.awk
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/lightmediascanner_0.5.1.bb b/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/lightmediascanner_0.5.1.bb
deleted file mode 100644
index f215876..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-multimedia/lightmediascanner/lightmediascanner_0.5.1.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Lightweight media scanner"
-DESCRIPTION = "Lightweight media scanner meant to be used in not-so-powerful devices, like embedded systems or old machines."
-SECTION = "libs/multimedia"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-                    file://src/lib/lightmediascanner.c;endline=21;md5=6d8889bccb4c6c27e8b786342a3eb267"
-
-DEPENDS = "file gawk glib-2.0 sqlite3"
-
-PV = "0.5.1+git${SRCPV}"
-SRCREV = "adfddb3486276a5ed2f5008c9e43a811e1271cc9"
-SRC_URI = "git://github.com/profusion/lightmediascanner.git \
-           file://id3-plugin-support-out-of-tree-build.patch \
-           file://0001-Define-comparison_fn_t-for-non-glibc-systems.patch \
-          "
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--enable-static --disable-mp4"
-
-PACKAGECONFIG ??= "ogg flac wave id3 m3u pls asf rm jpeg png"
-PACKAGECONFIG[generic] = "--enable-generic,--disable-generic,libav"
-PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg libvorbis libtheora"
-PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac"
-PACKAGECONFIG[wave] = "--enable-wave,--disable-wave"
-PACKAGECONFIG[id3] = "--enable-id3,--disable-id3"
-PACKAGECONFIG[m3u] = "--enable-m3u,--disable-m3u"
-PACKAGECONFIG[pls] = "--enable-pls,--disable-pls"
-PACKAGECONFIG[asf] = "--enable-asf,--disable-asf"
-PACKAGECONFIG[rm] = "--enable-rm,--disable-rm"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg"
-PACKAGECONFIG[png] = "--enable-png,--disable-png"
-
-do_install_append() {
-       # Install "test" binary for corresponding package
-       install -d ${D}/${bindir}
-       install -m 755 ${B}/src/bin/.libs/test ${D}/${bindir}/test-lms
-       # Remove .la files for loadable modules
-       rm -f ${D}/${libdir}/${PN}/plugins/*.la
-}
-
-FILES_${PN} += "${datadir}/dbus-1"
-FILES_${PN}-dbg += "${libdir}/${PN}/plugins/.debug"
-
-PACKAGES_prepend = "${PN}-test "
-FILES_${PN}-test_prepend = "${bindir}/test-lms "
-
-PACKAGES += "${PN}-meta"
-ALLOW_EMPTY_${PN}-meta = "1"
-
-PACKAGES_DYNAMIC = "${PN}-plugin-*"
-
-python populate_packages_prepend () {
-    lms_libdir = d.expand('${libdir}/${PN}')
-    pkgs = []
-
-    pkgs += do_split_packages(d, oe.path.join(lms_libdir, "plugins"), '^(.*)\.so$', d.expand('${PN}-plugin-%s'), 'LightMediaScanner plugin for %s', prepend=True, extra_depends=d.expand('${PN}'))
-    metapkg = d.getVar('PN') + '-meta'
-    d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs))
-}
diff --git a/import-layers/meta-openembedded/meta-efl/recipes-navigation/mcnavi/mcnavi_0.3.4.bb b/import-layers/meta-openembedded/meta-efl/recipes-navigation/mcnavi/mcnavi_0.3.4.bb
deleted file mode 100644
index 040e006..0000000
--- a/import-layers/meta-openembedded/meta-efl/recipes-navigation/mcnavi/mcnavi_0.3.4.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Free GPS navigation for car and outdoor with OpenStreetMap maps"
-HOMEPAGE = "http://www.gps-routes.info/index.php?name=Content&pa=showpage&pid=1"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a"
-DEPENDS = "ecore evas imlib2 gpsd edje edje-native mysql5 intltool-native"
-
-SRC_URI = "http://www.gps-routes.info/debian/pool/main/m/mcnavi/mcnavi_${PV}.tar.gz"
-SRC_URI[md5sum] = "6860cde5c02a9f93c829da4b10e5a226"
-SRC_URI[sha256sum] = "ee7f65155e91386175875fc4f72f4bc94e4e9cdb8258112632da94520ef2c349"
-
-S = "${WORKDIR}/${PN}"
-
-inherit autotools
-
-PNBLACKLIST[mcnavi] ?= "BROKEN: latest version 0.3.4 is 3 years old and now broken with more strict ejde_cc from efl-1.13 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-# | edje_cc: Error. parse error 0.3.4-r0/mcnavi/data/themes/Default/main.edc:126. invalid state name: 'none'. "default" state must always be first.
-# | edje_cc: Error. parse error 0.3.4-r0/mcnavi/data/themes/Default/itinerary.edc:84. invalid state name: 'none'. "default" state must always be first.
-# | edje_cc: Error. parse error 0.3.4-r0/mcnavi/data/themes/Default/text.edc:1129. invalid state name: 'none'. "default" state must always be first.
-# | edje_cc: Error. parse error 0.3.4-r0/mcnavi/data/themes/Default/fileopen.edc:78. invalid state name: 'off'. "default" state must always be first.
diff --git a/import-layers/meta-openembedded/meta-filesystems/README b/import-layers/meta-openembedded/meta-filesystems/README
index 48fe15f..0f7cc9b 100644
--- a/import-layers/meta-openembedded/meta-filesystems/README
+++ b/import-layers/meta-openembedded/meta-filesystems/README
@@ -10,22 +10,22 @@
 This layer depends on:
 
   URI: git://git.openembedded.org/bitbake
-  branch: 1.28
+  branch: 1.36
 
   URI: git://git.openembedded.org/openembedded-core
   layers: meta
-  branch: pyro
+  branch: rocko
 
   URI: git://git.openembedded.org/meta-openembedded
   layers: meta-oe
-  branch: pyro
+  branch: rocko
 
 Patches
 =======
 
 Please submit any patches against the filesystems layer to the
 OpenEmbedded development mailing list (openembedded-devel@lists.openembedded.org)
-with '[meta-filesystems][pyro]' in the subject.
+with '[meta-filesystems][rocko]' in the subject.
 
 Maintainers List:
   physfs      Andreas Müller <schnitzeltony@googlemail.com>
@@ -66,9 +66,9 @@
 
    git send-email -1 -M \
         --to openembedded-devel@lists.openembedded.org \
-        --subject-prefix=meta-filesystems][pyro][PATCH
+        --subject-prefix=meta-filesystems][rocko][PATCH
 
-pyro Branch Maintainer:
+rocko Branch Maintainer:
 Armin Kuster <akuster808@gmail.com>
 
 Table of Contents
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch
deleted file mode 100644
index f05f09f..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 7a524d49b3d4459280f18942df2980603400ec52 Mon Sep 17 00:00:00 2001
-From: Bian Naimeng <biannm@cn.fujitsu.com>
-Date: Fri, 19 Jun 2015 11:54:44 +0900
-Subject: [PATCH] Using PKG_CHECK_MODULES to found headers and libraries of
- smbclient
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
----
- configure.in    | 5 +++++
- src/Makefile.am | 3 +++
- 2 files changed, 8 insertions(+)
-
-diff --git a/configure.in b/configure.in
-index ce21aef..ecd7119 100644
---- a/configure.in
-+++ b/configure.in
-@@ -125,6 +125,11 @@ AC_CHECK_LIB(smbclient, smbc_setOptionUserData,
-     )]
- )
- 
-+dnl *****************************************************************
-+dnl *** Check libsmbclient by pkgconfig to get cflags and ldflags ***
-+dnl *****************************************************************
-+PKG_CHECK_MODULES(SMBCLIENT, smbclient)
-+
- dnl ******************
- dnl *** Final step ***
- dnl ******************
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 41519d8..9fc97e9 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -16,3 +16,6 @@ smbnetfs_SOURCES = \
- 	event.c			event.h			\
- 	reconfigure.c		reconfigure.h		\
- 	main.c
-+
-+smbnetfs_CFLAGS=${SMBCLIENT_CFLAGS}
-+smbnetfs_LDFLAGS=${SMBCLIENT_LDFLAGS}
--- 
-1.8.4.2
-
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/configure.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/configure.patch
deleted file mode 100644
index c80fed1..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/configure.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-Index: git/configure.in
-===================================================================
---- git.orig/configure.in	2014-06-18 16:06:16.040721349 +0000
-+++ git/configure.in	2014-07-18 07:49:17.085552256 +0000
-@@ -1,5 +1,5 @@
- AC_INIT([SMBNetFS],[0.5.3а])
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([foreign])
- AC_CONFIG_HEADERS([src/config.h])
- AC_PROG_CC
- 
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb
deleted file mode 100644
index 6995ad3..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "FUSE module for mounting an entire SMB/NMB network in a single directory"
-DESCRIPTION = "SMBNetFS is a Linux/FreeBSD filesystem that allow you to use \
-               samba/microsoft network in the same manner as the network \
-               neighborhood in Microsoft Windows. Please donate me to help \
-               in SMBNetFS development."
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-HOMEPAGE ="http://sourceforge.net/projects/smbnetfs"
-
-DEPENDS = "fuse samba"
-
-inherit autotools gitpkgv pkgconfig
-
-PKGV = "${GITPKGVTAG}"
-
-SRCREV = "ace1c519d45fe488b9b7e6cc77a2bcadb6c83464"
-
-SRC_URI = "git://smbnetfs.git.sourceforge.net/gitroot/smbnetfs/smbnetfs;branch=master \
-           file://configure.patch \
-           file://Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring=yes,--with-gnome-keyring=no,libgnome-keyring"
-
-S = "${WORKDIR}/git"
-
-PNBLACKLIST[smbnetfs] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/132827/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/files/0001-support-cross-compiling.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/files/0001-support-cross-compiling.patch
new file mode 100644
index 0000000..bf363ca
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/files/0001-support-cross-compiling.patch
@@ -0,0 +1,32 @@
+From 449cec34c123b86b792627553c6ec7471d2ee7ed Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 30 Jun 2017 14:46:51 +0800
+Subject: [PATCH] support cross compiling
+
+Do not override OE CMAKE variables
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,9 +10,9 @@ IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ 
+ # Select flags.
+-SET(CMAKE_C_FLAGS "-pipe -W -Wall -DFORTIFY_SOURCE=2")
++SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -W -Wall -DFORTIFY_SOURCE=2")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+-SET(CMAKE_C_FLAGS_RELEASE "-O2")
++SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2")
+ SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG")
+ 
+ if (UNIX AND APPLE)
+-- 
+2.8.1
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/files/0001-unionfs-Define-IOCPARM_LEN-if-undefined.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/files/0001-unionfs-Define-IOCPARM_LEN-if-undefined.patch
new file mode 100644
index 0000000..8f991cd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/files/0001-unionfs-Define-IOCPARM_LEN-if-undefined.patch
@@ -0,0 +1,62 @@
+From 10411fa8658621822ae394160daffaced4a4cd7f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 23:07:29 -0700
+Subject: [PATCH] unionfs: Define IOCPARM_LEN if undefined
+
+musl does not have sysctl.h which defines this
+for glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/unionfs.c |  8 --------
+ src/unionfs.h | 15 +++++++++++++++
+ 2 files changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/src/unionfs.c b/src/unionfs.c
+index a34d34e..51684a7 100644
+--- a/src/unionfs.c
++++ b/src/unionfs.c
+@@ -21,14 +21,6 @@
+ #include "opts.h"
+ #include "usyslog.h"
+ 
+-#ifndef _IOC_SIZE
+-#ifdef IOCPARM_LEN
+-#define _IOC_SIZE(x) IOCPARM_LEN(x)
+-#else
+-#error "No mechanism for determining ioctl length found."
+-#endif
+-#endif
+-
+ static struct fuse_opt unionfs_opts[] = {
+ 	FUSE_OPT_KEY("chroot=%s,", KEY_CHROOT),
+ 	FUSE_OPT_KEY("cow", KEY_COW),
+diff --git a/src/unionfs.h b/src/unionfs.h
+index 8f5e0bf..b02de5a 100644
+--- a/src/unionfs.h
++++ b/src/unionfs.h
+@@ -17,6 +17,21 @@
+ #define FUSE_META_FILE ".fuse_hidden"
+ #define FUSE_META_LENGTH 12
+ 
++#ifndef IOCPARM_MASK
++#define IOCPARM_MASK      0x1FFF
++#endif
++#ifndef IOCPARM_LEN
++#define IOCPARM_LEN(a)    (((a) >> 16) & IOCPARM_MASK)
++#endif
++
++#ifndef _IOC_SIZE
++#ifdef IOCPARM_LEN
++#define _IOC_SIZE(x) IOCPARM_LEN(x)
++#else
++#error "No mechanism for determining ioctl length found."
++#endif
++#endif
++
+ // file access protection mask
+ #define S_PROT_MASK (S_ISUID| S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
+ 
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_0.26.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_0.26.bb
deleted file mode 100644
index 2520429..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_0.26.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "A FUSE based implemention of unionfs"
-HOMEPAGE = "http://podgorny.cz/moin/UnionFsFuse"
-SECTION = "console/network"
-LICENSE = "BSD-3-Clause"
-DEPENDS = "fuse"
-LIC_FILES_CHKSUM = "file://src/unionfs.c;beginline=3;endline=8;md5=30fa8de70fd8abab00b483a1b7943a32"
-
-SRC_URI = "http://podgorny.cz/unionfs-fuse/releases/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "689c636484756f6f7a728ef354cbeac2"
-SRC_URI[sha256sum] = "8d5c9dcb51ecb9a9b03890e16d17e37d602b0c1f23ed6a9ddec2b0f719c9f662"
-
-do_install() {
-    oe_runmake install DESTDIR=${D} PREFIX=${exec_prefix}
-}
-
-RDEPENDS_${PN} += "bash"
-
-PNBLACKLIST[unionfs-fuse] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130648/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_2.0.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_2.0.bb
new file mode 100644
index 0000000..6bedf16
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_2.0.bb
@@ -0,0 +1,19 @@
+SUMMARY = "A FUSE based implemention of unionfs"
+HOMEPAGE = "https://github.com/rpodgorny/unionfs-fuse"
+SECTION = "console/network"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://src/unionfs.c;beginline=3;endline=8;md5=30fa8de70fd8abab00b483a1b7943a32 \
+                    file://LICENSE;md5=7e5a37fce17307066eec6b23546da3b3 \
+"
+
+SRC_URI = "git://github.com/rpodgorny/${BPN}.git;branch=master \
+           file://0001-support-cross-compiling.patch \
+           file://0001-unionfs-Define-IOCPARM_LEN-if-undefined.patch \
+           "
+SRCREV = "c8d23a9a75f1a62988593671839e8a168a79f3e5"
+
+DEPENDS = "fuse"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.4.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.4.bb
deleted file mode 100644
index 336281c..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.4.bb
+++ /dev/null
@@ -1,64 +0,0 @@
-SUMMARY = "Implementation of a fully functional filesystem in a userspace program"
-DESCRIPTION = "FUSE (Filesystem in Userspace) is a simple interface for userspace \
-               programs to export a virtual filesystem to the Linux kernel. FUSE \
-               also aims to provide a secure method for non privileged users to \
-               create and mount their own filesystem implementations. \
-              "
-HOMEPAGE = "http://fuse.sf.net"
-SECTION = "libs"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/fuse/fuse-${PV}.tar.gz \
-           file://gold-unversioned-symbol.patch \
-           file://aarch64.patch \
-           file://0001-fuse-fix-the-return-value-of-help-option.patch \
-           file://fuse.conf \
-"
-SRC_URI[md5sum] = "ecb712b5ffc6dffd54f4a405c9b372d8"
-SRC_URI[sha256sum] = "6be9c0bff6af8c677414935f31699ea5a7f8f5f791cfa5205be02ea186b97ce1"
-
-inherit autotools pkgconfig update-rc.d systemd
-
-INITSCRIPT_NAME = "fuse"
-INITSCRIPT_PARAMS = "start 3 S . stop 20 0 6 ."
-
-SYSTEMD_SERVICE_${PN} = ""
-
-DEPENDS = "gettext-native"
-
-PACKAGES =+ "fuse-utils-dbg fuse-utils libulockmgr libulockmgr-dev libulockmgr-dbg"
-
-RRECOMMENDS_${PN}_class-target = "kernel-module-fuse libulockmgr fuse-utils"
-
-FILES_${PN} += "${libdir}/libfuse.so.*"
-FILES_${PN}-dev += "${libdir}/libfuse*.la"
-
-FILES_libulockmgr = "${libdir}/libulockmgr.so.*"
-FILES_libulockmgr-dev += "${libdir}/libulock*.la"
-FILES_libulockmgr-dbg += "${libdir}/.debug/libulock*"
-
-# Forbid auto-renaming to libfuse-utils
-FILES_fuse-utils = "${bindir} ${base_sbindir}"
-FILES_fuse-utils-dbg = "${bindir}/.debug ${base_sbindir}/.debug"
-DEBIAN_NOAUTONAME_fuse-utils = "1"
-DEBIAN_NOAUTONAME_fuse-utils-dbg = "1"
-
-do_install_append() {
-    rm -rf ${D}${base_prefix}/dev
-
-    # systemd class remove the sysv_initddir only if systemd_system_unitdir
-    # contains anything, but it's not needed if sysvinit is not in DISTRO_FEATURES
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
-        rm -rf ${D}${sysconfdir}/init.d/
-    fi
-
-    # Install systemd related configuration file
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -d ${D}${sysconfdir}/modules-load.d
-        install -m 0644 ${WORKDIR}/fuse.conf ${D}${sysconfdir}/modules-load.d
-    fi
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.7.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.7.bb
new file mode 100644
index 0000000..202d4c3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.7.bb
@@ -0,0 +1,69 @@
+SUMMARY = "Implementation of a fully functional filesystem in a userspace program"
+DESCRIPTION = "FUSE (Filesystem in Userspace) is a simple interface for userspace \
+               programs to export a virtual filesystem to the Linux kernel. FUSE \
+               also aims to provide a secure method for non privileged users to \
+               create and mount their own filesystem implementations. \
+              "
+HOMEPAGE = "https://github.com/libfuse/libfuse"
+SECTION = "libs"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "https://github.com/libfuse/libfuse/releases/download/${BP}/${BP}.tar.gz \
+           file://gold-unversioned-symbol.patch \
+           file://aarch64.patch \
+           file://0001-fuse-fix-the-return-value-of-help-option.patch \
+           file://fuse.conf \
+"
+SRC_URI[md5sum] = "9bd4ce8184745fd3d000ca2692adacdb"
+SRC_URI[sha256sum] = "832432d1ad4f833c20e13b57cf40ce5277a9d33e483205fc63c78111b3358874"
+
+inherit autotools pkgconfig update-rc.d systemd
+
+INITSCRIPT_NAME = "fuse"
+INITSCRIPT_PARAMS = "start 3 S . stop 20 0 6 ."
+
+SYSTEMD_SERVICE_${PN} = ""
+
+DEPENDS = "gettext-native"
+
+PACKAGES =+ "fuse-utils-dbg fuse-utils libulockmgr libulockmgr-dev libulockmgr-dbg"
+
+RRECOMMENDS_${PN}_class-target = "kernel-module-fuse libulockmgr fuse-utils"
+
+FILES_${PN} += "${libdir}/libfuse.so.*"
+FILES_${PN}-dev += "${libdir}/libfuse*.la"
+
+FILES_libulockmgr = "${libdir}/libulockmgr.so.*"
+FILES_libulockmgr-dev += "${libdir}/libulock*.la"
+FILES_libulockmgr-dbg += "${libdir}/.debug/libulock*"
+
+# Forbid auto-renaming to libfuse-utils
+FILES_fuse-utils = "${bindir} ${base_sbindir}"
+FILES_fuse-utils-dbg = "${bindir}/.debug ${base_sbindir}/.debug"
+DEBIAN_NOAUTONAME_fuse-utils = "1"
+DEBIAN_NOAUTONAME_fuse-utils-dbg = "1"
+
+do_configure_prepend() {
+    # Make this explicit so overriding base_sbindir propagates properly.
+    export MOUNT_FUSE_PATH="${base_sbindir}"
+}
+
+do_install_append() {
+    rm -rf ${D}${base_prefix}/dev
+
+    # systemd class remove the sysv_initddir only if systemd_system_unitdir
+    # contains anything, but it's not needed if sysvinit is not in DISTRO_FEATURES
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
+        rm -rf ${D}${sysconfdir}/init.d/
+    fi
+
+    # Install systemd related configuration file
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/modules-load.d
+        install -m 0644 ${WORKDIR}/fuse.conf ${D}${sysconfdir}/modules-load.d
+    fi
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Define-STRIP-weakly.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Define-STRIP-weakly.patch
new file mode 100644
index 0000000..9efea80
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Define-STRIP-weakly.patch
@@ -0,0 +1,39 @@
+From bb8801fb21ac8d73e3b1a11a8555aaf822182a51 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 5 Sep 2017 10:36:52 -0700
+Subject: [PATCH] libau: Define STRIP weakly
+
+STRIP can be set on environment to use cross version of strip utility
+hardcoding to strip is not working in cross environment
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ libau/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libau/Makefile b/libau/Makefile
+index 81520ac..c25eef2 100644
+--- a/libau/Makefile
++++ b/libau/Makefile
+@@ -25,6 +25,7 @@ LibSoHdr = libau.h rdu.h
+ LibSoExport = $(addsuffix .exp, $(basename ${LibSoObj}))
+ LibSoExportErr = $(addsuffix .err, ${LibSoExport})
+ LibSoVerScript = verscript
++STRIP ?= strip
+ 
+ all: ${LibSo}
+ 
+@@ -77,7 +78,7 @@ ${LibSo}.${LibSoMajor}.${LibSoMinor}: ${LibSoObj}
+ 	${CC} --shared -Wl,-soname,${LibSo}.${LibSoMajor} \
+ 		-Wl,--version-script,${LibSoVerScript} \
+ 		${LDFLAGS} -o $@ $^ ${LDLIBS}
+-	strip -R EXP $@
++	${STRIP} -R EXP $@
+ #	readelf --syms --use-dynamic libau.so
+ 
+ install_ulib: File = ${LibSo}.${LibSoMajor}.${LibSoMinor}
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs_type.h b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs_type.h
deleted file mode 100644
index c948033..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs_type.h
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * Copyright (C) 2005-2015 Junjiro R. Okajima
- *
- * This program, aufs is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __AUFS_TYPE_H__
-#define __AUFS_TYPE_H__
-
-#define AUFS_NAME	"aufs"
-
-#ifdef __KERNEL__
-/*
- * define it before including all other headers.
- * sched.h may use pr_* macros before defining "current", so define the
- * no-current version first, and re-define later.
- */
-#define pr_fmt(fmt)	AUFS_NAME " %s:%d: " fmt, __func__, __LINE__
-#include <linux/sched.h>
-#undef pr_fmt
-#define pr_fmt(fmt) \
-		AUFS_NAME " %s:%d:%.*s[%d]: " fmt, __func__, __LINE__, \
-		(int)sizeof(current->comm), current->comm, current->pid
-#else
-#include <stdint.h>
-#include <sys/types.h>
-#endif /* __KERNEL__ */
-
-#include <linux/limits.h>
-
-#define AUFS_VERSION	"3.18-20150406"
-
-/* todo? move this to linux-2.6.19/include/magic.h */
-#define AUFS_SUPER_MAGIC	('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
-
-/* ---------------------------------------------------------------------- */
-
-#ifdef CONFIG_AUFS_BRANCH_MAX_127
-typedef int8_t aufs_bindex_t;
-#define AUFS_BRANCH_MAX 127
-#else
-typedef int16_t aufs_bindex_t;
-#ifdef CONFIG_AUFS_BRANCH_MAX_511
-#define AUFS_BRANCH_MAX 511
-#elif defined(CONFIG_AUFS_BRANCH_MAX_1023)
-#define AUFS_BRANCH_MAX 1023
-#elif defined(CONFIG_AUFS_BRANCH_MAX_32767)
-#define AUFS_BRANCH_MAX 32767
-#endif
-#endif
-
-#ifdef __KERNEL__
-#ifndef AUFS_BRANCH_MAX
-#error unknown CONFIG_AUFS_BRANCH_MAX value
-#endif
-#endif /* __KERNEL__ */
-
-/* ---------------------------------------------------------------------- */
-
-#define AUFS_FSTYPE		AUFS_NAME
-
-#define AUFS_ROOT_INO		2
-#define AUFS_FIRST_INO		11
-
-#define AUFS_WH_PFX		".wh."
-#define AUFS_WH_PFX_LEN		((int)sizeof(AUFS_WH_PFX) - 1)
-#define AUFS_WH_TMP_LEN		4
-/* a limit for rmdir/rename a dir and copyup */
-#define AUFS_MAX_NAMELEN	(NAME_MAX \
-				- AUFS_WH_PFX_LEN * 2	/* doubly whiteouted */\
-				- 1			/* dot */\
-				- AUFS_WH_TMP_LEN)	/* hex */
-#define AUFS_XINO_FNAME		"." AUFS_NAME ".xino"
-#define AUFS_XINO_DEFPATH	"/tmp/" AUFS_XINO_FNAME
-#define AUFS_XINO_DEF_SEC	30 /* seconds */
-#define AUFS_XINO_DEF_TRUNC	45 /* percentage */
-#define AUFS_DIRWH_DEF		3
-#define AUFS_RDCACHE_DEF	10 /* seconds */
-#define AUFS_RDCACHE_MAX	3600 /* seconds */
-#define AUFS_RDBLK_DEF		512 /* bytes */
-#define AUFS_RDHASH_DEF		32
-#define AUFS_WKQ_NAME		AUFS_NAME "d"
-#define AUFS_MFS_DEF_SEC	30 /* seconds */
-#define AUFS_MFS_MAX_SEC	3600 /* seconds */
-#define AUFS_FHSM_CACHE_DEF_SEC	30 /* seconds */
-#define AUFS_PLINK_WARN		50 /* number of plinks in a single bucket */
-
-/* pseudo-link maintenace under /proc */
-#define AUFS_PLINK_MAINT_NAME	"plink_maint"
-#define AUFS_PLINK_MAINT_DIR	"fs/" AUFS_NAME
-#define AUFS_PLINK_MAINT_PATH	AUFS_PLINK_MAINT_DIR "/" AUFS_PLINK_MAINT_NAME
-
-#define AUFS_DIROPQ_NAME	AUFS_WH_PFX ".opq" /* whiteouted doubly */
-#define AUFS_WH_DIROPQ		AUFS_WH_PFX AUFS_DIROPQ_NAME
-
-#define AUFS_BASE_NAME		AUFS_WH_PFX AUFS_NAME
-#define AUFS_PLINKDIR_NAME	AUFS_WH_PFX "plnk"
-#define AUFS_ORPHDIR_NAME	AUFS_WH_PFX "orph"
-
-/* doubly whiteouted */
-#define AUFS_WH_BASE		AUFS_WH_PFX AUFS_BASE_NAME
-#define AUFS_WH_PLINKDIR	AUFS_WH_PFX AUFS_PLINKDIR_NAME
-#define AUFS_WH_ORPHDIR		AUFS_WH_PFX AUFS_ORPHDIR_NAME
-
-/* branch permissions and attributes */
-#define AUFS_BRPERM_RW		"rw"
-#define AUFS_BRPERM_RO		"ro"
-#define AUFS_BRPERM_RR		"rr"
-#define AUFS_BRATTR_COO_REG	"coo_reg"
-#define AUFS_BRATTR_COO_ALL	"coo_all"
-#define AUFS_BRATTR_FHSM	"fhsm"
-#define AUFS_BRATTR_UNPIN	"unpin"
-#define AUFS_BRATTR_ICEX	"icex"
-#define AUFS_BRATTR_ICEX_SEC	"icexsec"
-#define AUFS_BRATTR_ICEX_SYS	"icexsys"
-#define AUFS_BRATTR_ICEX_TR	"icextr"
-#define AUFS_BRATTR_ICEX_USR	"icexusr"
-#define AUFS_BRATTR_ICEX_OTH	"icexoth"
-#define AUFS_BRRATTR_WH		"wh"
-#define AUFS_BRWATTR_NLWH	"nolwh"
-#define AUFS_BRWATTR_MOO	"moo"
-
-#define AuBrPerm_RW		1		/* writable, hardlinkable wh */
-#define AuBrPerm_RO		(1 << 1)	/* readonly */
-#define AuBrPerm_RR		(1 << 2)	/* natively readonly */
-#define AuBrPerm_Mask		(AuBrPerm_RW | AuBrPerm_RO | AuBrPerm_RR)
-
-#define AuBrAttr_COO_REG	(1 << 3)	/* copy-up on open */
-#define AuBrAttr_COO_ALL	(1 << 4)
-#define AuBrAttr_COO_Mask	(AuBrAttr_COO_REG | AuBrAttr_COO_ALL)
-
-#define AuBrAttr_FHSM		(1 << 5)	/* file-based hsm */
-#define AuBrAttr_UNPIN		(1 << 6)	/* rename-able top dir of
-						   branch. meaningless since
-						   linux-3.18-rc1 */
-
-/* ignore error in copying XATTR */
-#define AuBrAttr_ICEX_SEC	(1 << 7)
-#define AuBrAttr_ICEX_SYS	(1 << 8)
-#define AuBrAttr_ICEX_TR	(1 << 9)
-#define AuBrAttr_ICEX_USR	(1 << 10)
-#define AuBrAttr_ICEX_OTH	(1 << 11)
-#define AuBrAttr_ICEX		(AuBrAttr_ICEX_SEC	\
-				 | AuBrAttr_ICEX_SYS	\
-				 | AuBrAttr_ICEX_TR	\
-				 | AuBrAttr_ICEX_USR	\
-				 | AuBrAttr_ICEX_OTH)
-
-#define AuBrRAttr_WH		(1 << 12)	/* whiteout-able */
-#define AuBrRAttr_Mask		AuBrRAttr_WH
-
-#define AuBrWAttr_NoLinkWH	(1 << 13)	/* un-hardlinkable whiteouts */
-#define AuBrWAttr_MOO		(1 << 14)	/* move-up on open */
-#define AuBrWAttr_Mask		(AuBrWAttr_NoLinkWH | AuBrWAttr_MOO)
-
-#define AuBrAttr_CMOO_Mask	(AuBrAttr_COO_Mask | AuBrWAttr_MOO)
-
-/* #warning test userspace */
-#ifdef __KERNEL__
-#ifndef CONFIG_AUFS_FHSM
-#undef AuBrAttr_FHSM
-#define AuBrAttr_FHSM		0
-#endif
-#ifndef CONFIG_AUFS_XATTR
-#undef	AuBrAttr_ICEX
-#define AuBrAttr_ICEX		0
-#undef	AuBrAttr_ICEX_SEC
-#define AuBrAttr_ICEX_SEC	0
-#undef	AuBrAttr_ICEX_SYS
-#define AuBrAttr_ICEX_SYS	0
-#undef	AuBrAttr_ICEX_TR
-#define AuBrAttr_ICEX_TR	0
-#undef	AuBrAttr_ICEX_USR
-#define AuBrAttr_ICEX_USR	0
-#undef	AuBrAttr_ICEX_OTH
-#define AuBrAttr_ICEX_OTH	0
-#endif
-#endif
-
-/* the longest combination */
-/* AUFS_BRATTR_ICEX and AUFS_BRATTR_ICEX_TR don't affect here */
-#define AuBrPermStrSz	sizeof(AUFS_BRPERM_RW			\
-			       "+" AUFS_BRATTR_COO_REG		\
-			       "+" AUFS_BRATTR_FHSM		\
-			       "+" AUFS_BRATTR_UNPIN		\
-			       "+" AUFS_BRATTR_ICEX_SEC		\
-			       "+" AUFS_BRATTR_ICEX_SYS		\
-			       "+" AUFS_BRATTR_ICEX_USR		\
-			       "+" AUFS_BRATTR_ICEX_OTH		\
-			       "+" AUFS_BRWATTR_NLWH)
-
-typedef struct {
-	char a[AuBrPermStrSz];
-} au_br_perm_str_t;
-
-static inline int au_br_writable(int brperm)
-{
-	return brperm & AuBrPerm_RW;
-}
-
-static inline int au_br_whable(int brperm)
-{
-	return brperm & (AuBrPerm_RW | AuBrRAttr_WH);
-}
-
-static inline int au_br_wh_linkable(int brperm)
-{
-	return !(brperm & AuBrWAttr_NoLinkWH);
-}
-
-static inline int au_br_cmoo(int brperm)
-{
-	return brperm & AuBrAttr_CMOO_Mask;
-}
-
-static inline int au_br_fhsm(int brperm)
-{
-	return brperm & AuBrAttr_FHSM;
-}
-
-/* ---------------------------------------------------------------------- */
-
-/* ioctl */
-enum {
-	/* readdir in userspace */
-	AuCtl_RDU,
-	AuCtl_RDU_INO,
-
-	AuCtl_WBR_FD,	/* pathconf wrapper */
-	AuCtl_IBUSY,	/* busy inode */
-	AuCtl_MVDOWN,	/* move-down */
-	AuCtl_BR,	/* info about branches */
-	AuCtl_FHSM_FD	/* connection for fhsm */
-};
-
-/* borrowed from linux/include/linux/kernel.h */
-#ifndef ALIGN
-#define ALIGN(x, a)		__ALIGN_MASK(x, (typeof(x))(a)-1)
-#define __ALIGN_MASK(x, mask)	(((x)+(mask))&~(mask))
-#endif
-
-/* borrowed from linux/include/linux/compiler-gcc3.h */
-#ifndef __aligned
-#define __aligned(x)			__attribute__((aligned(x)))
-#endif
-
-#ifdef __KERNEL__
-#ifndef __packed
-#define __packed			__attribute__((packed))
-#endif
-#endif
-
-struct au_rdu_cookie {
-	uint64_t	h_pos;
-	int16_t		bindex;
-	uint8_t		flags;
-	uint8_t		pad;
-	uint32_t	generation;
-} __aligned(8);
-
-struct au_rdu_ent {
-	uint64_t	ino;
-	int16_t		bindex;
-	uint8_t		type;
-	uint8_t		nlen;
-	uint8_t		wh;
-	char		name[0];
-} __aligned(8);
-
-static inline int au_rdu_len(int nlen)
-{
-	/* include the terminating NULL */
-	return ALIGN(sizeof(struct au_rdu_ent) + nlen + 1,
-		     sizeof(uint64_t));
-}
-
-union au_rdu_ent_ul {
-	struct au_rdu_ent	*e;
-	uint64_t			ul;
-};
-
-enum {
-	AufsCtlRduV_SZ,
-	AufsCtlRduV_End
-};
-
-struct aufs_rdu {
-	/* input */
-	union {
-		uint64_t	sz;	/* AuCtl_RDU */
-		uint64_t	nent;	/* AuCtl_RDU_INO */
-	};
-	union au_rdu_ent_ul	ent;
-	uint16_t		verify[AufsCtlRduV_End];
-
-	/* input/output */
-	uint32_t		blk;
-
-	/* output */
-	union au_rdu_ent_ul	tail;
-	/* number of entries which were added in a single call */
-	uint64_t		rent;
-	uint8_t			full;
-	uint8_t			shwh;
-
-	struct au_rdu_cookie	cookie;
-} __aligned(8);
-
-/* ---------------------------------------------------------------------- */
-
-struct aufs_wbr_fd {
-	uint32_t	oflags;
-	int16_t		brid;
-} __aligned(8);
-
-/* ---------------------------------------------------------------------- */
-
-struct aufs_ibusy {
-	uint64_t	ino, h_ino;
-	int16_t		bindex;
-} __aligned(8);
-
-/* ---------------------------------------------------------------------- */
-
-/* error code for move-down */
-/* the actual message strings are implemented in aufs-util.git */
-enum {
-	EAU_MVDOWN_OPAQUE = 1,
-	EAU_MVDOWN_WHITEOUT,
-	EAU_MVDOWN_UPPER,
-	EAU_MVDOWN_BOTTOM,
-	EAU_MVDOWN_NOUPPER,
-	EAU_MVDOWN_NOLOWERBR,
-	EAU_Last
-};
-
-/* flags for move-down */
-#define AUFS_MVDOWN_DMSG	1
-#define AUFS_MVDOWN_OWLOWER	(1 << 1)	/* overwrite lower */
-#define AUFS_MVDOWN_KUPPER	(1 << 2)	/* keep upper */
-#define AUFS_MVDOWN_ROLOWER	(1 << 3)	/* do even if lower is RO */
-#define AUFS_MVDOWN_ROLOWER_R	(1 << 4)	/* did on lower RO */
-#define AUFS_MVDOWN_ROUPPER	(1 << 5)	/* do even if upper is RO */
-#define AUFS_MVDOWN_ROUPPER_R	(1 << 6)	/* did on upper RO */
-#define AUFS_MVDOWN_BRID_UPPER	(1 << 7)	/* upper brid */
-#define AUFS_MVDOWN_BRID_LOWER	(1 << 8)	/* lower brid */
-#define AUFS_MVDOWN_FHSM_LOWER	(1 << 9)	/* find fhsm attr for lower */
-#define AUFS_MVDOWN_STFS	(1 << 10)	/* req. stfs */
-#define AUFS_MVDOWN_STFS_FAILED	(1 << 11)	/* output: stfs is unusable */
-#define AUFS_MVDOWN_BOTTOM	(1 << 12)	/* output: no more lowers */
-
-/* index for move-down */
-enum {
-	AUFS_MVDOWN_UPPER,
-	AUFS_MVDOWN_LOWER,
-	AUFS_MVDOWN_NARRAY
-};
-
-/*
- * additional info of move-down
- * number of free blocks and inodes.
- * subset of struct kstatfs, but smaller and always 64bit.
- */
-struct aufs_stfs {
-	uint64_t	f_blocks;
-	uint64_t	f_bavail;
-	uint64_t	f_files;
-	uint64_t	f_ffree;
-};
-
-struct aufs_stbr {
-	int16_t			brid;	/* optional input */
-	int16_t			bindex;	/* output */
-	struct aufs_stfs	stfs;	/* output when AUFS_MVDOWN_STFS set */
-} __aligned(8);
-
-struct aufs_mvdown {
-	uint32_t		flags;			/* input/output */
-	struct aufs_stbr	stbr[AUFS_MVDOWN_NARRAY]; /* input/output */
-	int8_t			au_errno;		/* output */
-} __aligned(8);
-
-/* ---------------------------------------------------------------------- */
-
-union aufs_brinfo {
-	/* PATH_MAX may differ between kernel-space and user-space */
-	char	_spacer[4096];
-	struct {
-		int16_t	id;
-		int	perm;
-		char	path[0];
-	};
-} __aligned(8);
-
-/* ---------------------------------------------------------------------- */
-
-#define AuCtlType		'A'
-#define AUFS_CTL_RDU		_IOWR(AuCtlType, AuCtl_RDU, struct aufs_rdu)
-#define AUFS_CTL_RDU_INO	_IOWR(AuCtlType, AuCtl_RDU_INO, struct aufs_rdu)
-#define AUFS_CTL_WBR_FD		_IOW(AuCtlType, AuCtl_WBR_FD, \
-				     struct aufs_wbr_fd)
-#define AUFS_CTL_IBUSY		_IOWR(AuCtlType, AuCtl_IBUSY, struct aufs_ibusy)
-#define AUFS_CTL_MVDOWN		_IOWR(AuCtlType, AuCtl_MVDOWN, \
-				      struct aufs_mvdown)
-#define AUFS_CTL_BRINFO		_IOW(AuCtlType, AuCtl_BR, union aufs_brinfo)
-#define AUFS_CTL_FHSM_FD	_IOW(AuCtlType, AuCtl_FHSM_FD, int)
-
-#endif /* __AUFS_TYPE_H__ */
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb
index 50d8b90..2e855e3 100644
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb
@@ -4,22 +4,24 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
 
-DEPENDS = "aufs-util-native"
+DEPENDS = "coreutils-native aufs-util-native"
 DEPENDS_class-native = ""
 
-SRCREV = "b59a2167a135ceea37581ee33997de278cf8a30a"
-SRC_URI = "git://git.code.sf.net/p/aufs/aufs-util;protocol=git;branch=aufs3.14 \
+SRCREV = "89afb1806c3d2eed8db2666ae254b77518ae3ceb"
+SRC_URI = "git://git.code.sf.net/p/aufs/aufs-util;protocol=git;branch=aufs4.4 \
+           https://raw.githubusercontent.com/sfjro/aufs4-linux/aufs4.4/include/uapi/linux/aufs_type.h;name=aufs_type \
            file://aufs-util-don-t-strip-executables.patch \
            file://aufs-util-add-tool-concept-to-Makefile-for-cross-com.patch \
-           file://aufs_type.h \
+           file://0001-libau-Define-STRIP-weakly.patch \
 "
+SRC_URI[aufs_type.md5sum] = "f7b4a255dcb55fe7b0967f5f59b44f19"
+SRC_URI[aufs_type.sha256sum] = "85bc8e4c1a94a7d526c382e4b047b4256cab8c4a65fc0396291707ad9a327a18"
 
-PV = "3.14+git${SRCPV}"
+PV = "4.4+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
 export HOSTCC = "${BUILD_CC}"
-
 do_configure_prepend() {
    # Replace sbin,bin paths with bitbake environment
    sed -i -e 's;install_sbin: Tgt = ${DESTDIR}/sbin;install_sbin: Tgt = ${DESTDIR}/${base_sbindir};' \
@@ -30,11 +32,12 @@
 do_configure_append () {
     install -d ${S}/include/linux/
     cp ${WORKDIR}/aufs_type.h ${S}/include/linux/
+    sed -i -e 's;__user;;' ${S}/include/linux/aufs_type.h
 }
 
 do_configure_append_class-target () {
     for i in ver c2sh c2tmac; do
-        cp ${STAGING_BINDIR_NATIVE}/aufs-util-${PV}/$i ./
+        cp ${STAGING_BINDIR_NATIVE}/aufs-util-${PV}/$i ${B}
     done
 }
 
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/dmapi_2.2.12.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/dmapi_2.2.12.bb
deleted file mode 100644
index 632f79d..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/dmapi_2.2.12.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Library functions to get attribute bits"
-DESCRIPTION = "The Data Management API (DMAPI/XDSM) allows implementation \
-               of hierarchical storage management software with no kernel \
-               modifications as well as high-performance dump programs \
-               without requiring "raw" access to the disk and knowledge \
-               of filesystem structures.This interface is implemented by \
-               the libdm library."
-
-HOMEPAGE = "http://oss.sgi.com/projects/xfs"
-SECTION = "base"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://doc/COPYING;md5=1678edfe8de9be9564d23761ae2fa794"
-DEPENDS = "xfsprogs"
-
-SRC_URI = "ftp://oss.sgi.com/projects/xfs/cmd_tars/dmapi-${PV}.tar.gz \
-           file://remove-install-as-user.patch \
-           file://dmapi_aarch64_configure_support.patch \
-          "
-SRC_URI[md5sum] = "cd825d4e141c16011367e0a0dd98c9c5"
-SRC_URI[sha256sum] = "b18e34f47374f6adf7c164993c26df36986a009b86aa004ef9444102653aea69"
-
-inherit autotools-brokensep
-
-PARALLEL_MAKE = ""
-EXTRA_OEMAKE += "LIBTOOL="${HOST_SYS}-libtool --tag=CC" V=1"
-
-do_install () {
-    export DIST_ROOT=${D}
-    install -d ${D}${libdir}
-    oe_runmake install install-dev PKG_DEVLIB_DIR=${libdir}
-}
-
-PNBLACKLIST[dmapi] ?= "Depends on broken xfsprogs - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/files/dmapi_aarch64_configure_support.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/files/dmapi_aarch64_configure_support.patch
deleted file mode 100644
index 98753b7..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/files/dmapi_aarch64_configure_support.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Add config support to cross compile dmapi for 
-aarch64 architecture
-
-Upstream-Status: Pending
-
-Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
-
---- dmapi-2.2.12_org/config.sub	2012-12-12 23:03:05.000000000 +0530
-+++ dmapi-2.2.12/config.sub	2014-03-24 16:49:56.771993523 +0530
-@@ -246,6 +246,7 @@ case $basic_machine in
- 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- 	| am33_2.0 \
- 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-+	| aarch64 | aarch64be \
- 	| bfin \
- 	| c4x | clipper \
- 	| d10v | d30v | dlx | dsp16xx \
-@@ -326,6 +327,7 @@ case $basic_machine in
- 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-+	| aarch64-* | aarch64be-* \
- 	| avr-* | avr32-* \
- 	| bfin-* | bs2000-* \
- 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
---- dmapi-2.2.12_org/config.guess	2012-12-12 23:03:05.000000000 +0530
-+++ dmapi-2.2.12/config.guess	2014-03-24 16:49:56.771993523 +0530
-@@ -864,6 +864,9 @@ EOF
- 	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- 	fi
- 	exit ;;
-+    aarch64*:Linux:*:*)
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+	exit;;
-     avr32*:Linux:*:*)
- 	echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	exit ;;
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/files/remove-install-as-user.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/files/remove-install-as-user.patch
deleted file mode 100644
index e761db3..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/dmapi/files/remove-install-as-user.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-remove install as user
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- include/buildmacros |  2 +-
- include/install-sh  | 95 ++++++++---------------------------------------------
- 2 files changed, 14 insertions(+), 83 deletions(-)
-
-diff --git a/include/buildmacros b/include/buildmacros
-index 7a01880..0840d55 100644
---- a/include/buildmacros
-+++ b/include/buildmacros
-@@ -30,7 +30,7 @@ OBJECTS = $(ASFILES:.s=.o) \
- 	  $(LFILES:.l=.o) \
- 	  $(YFILES:%.y=%.tab.o)
- 
--INSTALL	= $(TOPDIR)/install-sh -o $(PKG_USER) -g $(PKG_GROUP)
-+INSTALL	= $(TOPDIR)/install-sh
- 
- IMAGES_DIR = $(TOPDIR)/all-images
- DIST_DIR = $(TOPDIR)/dist
-diff --git a/include/install-sh b/include/install-sh
-index c952a71..b9d66f7 100755
---- a/include/install-sh
-+++ b/include/install-sh
-@@ -24,11 +24,11 @@
- #       set           set      |    yes        yes
- #
- _usage() {
--    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
--    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
--    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
-+    echo "Usage: $prog [-m mode] -d directory"
-+    echo "or     $prog [-m mode] file directory/file"
-+    echo "or     $prog [-m mode] file [file ...] directory"
-     echo "or     $prog -S file target  (creates \"target\" symlink)"
--    echo "or     $prog -T lt_arg [-o owner] [-g group] [-m mode] libtool.lai directory"
-+    echo "or     $prog -T lt_arg [-m mode] libtool.lai directory"
-     echo ""
-     echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
-     echo "behaviour of this command - see comments in the script."
-@@ -38,32 +38,6 @@ _usage() {
-     exit 1
- }
- 
--_chown ()
--{
--    _st=255
--    if [ $# -eq 3 ] ; then
--	chown $1:$2 $3
--	_st=$?
--	if [ $_st -ne 0 ] ; then
--	    if [ $REAL_UID != '0' ] ; then
--		if [ ! -f $DIST_ROOT/.chown.quiet ] ; then
--		    echo '==============================================='
--		    echo Ownership of files under ${DIST_ROOT:-/}
--		    echo cannot be changed
--		    echo '==============================================='
--		    if [ -n "$DIST_ROOT" ] ; then
--			touch $DIST_ROOT/.chown.quiet
--		    fi
--		fi
--	       _st=0
--	    fi     
--	fi
--    fi
--
--    return $_st
--}
--
--
- _manifest ()
- { 
-     echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
-@@ -77,9 +51,6 @@ Sflag=false
- Tflag=false
- DIRMODE=755
- FILEMODE=644
--OWNER=`id -u`
--GROUP=`id -g`
--REAL_UID=$OWNER
- 
- # default is to install and don't append manifest
- INSTALL=true
-@@ -94,24 +65,16 @@ MANIFEST=:
- 
- if $INSTALL
- then
--    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
-+    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod;
- else
--    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
-+    CP=true; LN=true; MKDIR=true; CHMOD=true;
- fi
- 
--[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
--
--while getopts "Dcm:d:S:o:g:T:" c $*
-+while getopts "Dcm:d:S:T:" c $*
- do
-    case $c in
-    c)
- 	;;
--   g)
--	GROUP=$OPTARG
--	;;
--   o)
--	OWNER=$OPTARG
--	;;
-    m)
- 	DIRMODE=`expr $OPTARG`
- 	FILEMODE=$DIRMODE
-@@ -146,18 +109,7 @@ then
-     # first usage
-     #
-     $MKDIR -p $dir 
--    status=$?
--    if [ $status -eq 0 ]
--    then
--	$CHMOD $DIRMODE $dir
--	status=$?
--    fi
--    if [ $status -eq 0 ]
--    then
--	$CHOWN $OWNER $GROUP $dir
--	status=$?
--    fi
--    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
-+    $MANIFEST d $DIRMODE ${dir#$DIST_ROOT}
- elif $Sflag
- then
-     #
-@@ -203,7 +155,7 @@ then
- 			install_name=$target/$solib
- 			$CP $solib $install_name
- 			status=$?
--			$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$solib ${install_name#$DIST_ROOT}
-+			$MANIFEST f $FILEMODE $HERE/$solib ${install_name#$DIST_ROOT}
- 			break
- 		fi
- 	done
-@@ -254,7 +206,7 @@ then
- 	install_name=$target/$old_library
- 	$CP $old_library $install_name
- 	status=$?
--	$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$old_library ${install_name#$DIST_ROOT}
-+	$MANIFEST f $FILEMODE $HERE/$old_library ${install_name#$DIST_ROOT}
- 	;;
-     *)
- 	echo "$prog: -T $lt_install invalid"
-@@ -267,7 +219,6 @@ then
- 	if [ $status -eq 0 ]
- 	then
- 		$CHMOD $FILEMODE $install_name
--		$CHOWN $OWNER $GROUP $install_name
- 	fi
- 	;;
-     esac
-@@ -292,23 +243,10 @@ else
- 	then 
- 	    if [ -f $dir/$f ]
- 	    then
--		$CHMOD $FILEMODE $dir/$f
--		status=$?
--		if [ $status -eq 0 ]
--		then
--		    $CHOWN $OWNER $GROUP $dir/$f
--		    status=$?
--		fi
--		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-+		$MANIFEST f $FILEMODE $HERE/$f ${dir#$DIST_ROOT}/$f
- 	    else
- 		$CHMOD $FILEMODE $dir
--		status=$?
--		if [ $status -eq 0 ]
--		then
--		    $CHOWN $OWNER $GROUP $dir
--		    status=$?
--		fi
--		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
-+		$MANIFEST f $FILEMODE $HERE/$dir ${dir#$DIST_ROOT}
- 	    fi
- 	fi
-     else
-@@ -334,14 +272,7 @@ else
- 	    status=$?
- 	    if [ $status -eq 0 ]
- 	    then
--		$CHMOD $FILEMODE $dir/$f
--		status=$?
--		if [ $status -eq 0 ]
--		then
--		    $CHOWN $OWNER $GROUP $dir/$f
--		    status=$?
--		fi
--		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-+		$MANIFEST f $FILEMODE $HERE/$f ${dir#$DIST_ROOT}/$f
- 	    fi
- 	    [ $status -ne 0 ] && break
- 	done
--- 
-1.8.1.2
-
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch
new file mode 100644
index 0000000..355e93a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch
@@ -0,0 +1,12 @@
+Fix compilation with GCC6
+
+--- a/src/device-info.c	2013-12-09 14:59:27.000000000 +0100
++++ b/src/device-info.c	2017-03-13 07:06:25.506666680 +0100
+@@ -3,6 +3,7 @@
+  * contains code excerpts from udisks v1.0.4
+ ************************************************************************** */
+ 
++#include <sys/stat.h>
+ #include "device-info.h"
+ 
+ static char *
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/files/0002-etc-Makefile.am-Use-systemd_unitdir-instead-of-libdi.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/files/0002-etc-Makefile.am-Use-systemd_unitdir-instead-of-libdi.patch
new file mode 100644
index 0000000..f014a0f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/files/0002-etc-Makefile.am-Use-systemd_unitdir-instead-of-libdi.patch
@@ -0,0 +1,32 @@
+From 80b087193698632e525b90d45b4a49e61e343e1c Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzk@kernel.org>
+Date: Thu, 13 Jul 2017 21:30:35 +0200
+Subject: [PATCH] etc: Makefile.am: Use systemd_unitdir instead of libdir
+
+Proper directory for installing systemd services is systemd_unitdir, not
+libdir.
+
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+---
+ etc/Makefile.am | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/etc/Makefile.am b/etc/Makefile.am
+index 9b6e7522c20f..6d663241a72f 100644
+--- a/etc/Makefile.am
++++ b/etc/Makefile.am
+@@ -16,8 +16,8 @@ if ADD_SYSTEMD
+ 	test -f $(DESTDIR)/$(sysconfdir)/conf.d/devmon || $(INSTALL_DATA) \
+ 				$(srcdir)/systemd/devmon \
+ 				$(DESTDIR)/$(sysconfdir)/conf.d/devmon
+-	test -d $(DESTDIR)/$(libdir)/systemd/system || \
+-				mkdir -p -- $(DESTDIR)/$(libdir)/systemd/system
++	test -d $(DESTDIR)/$(systemd_unitdir)/system || \
++				mkdir -p -- $(DESTDIR)/$(systemd_unitdir)/system
+ 	$(INSTALL_DATA) $(srcdir)/systemd/devmon@.service \
+-				$(DESTDIR)/$(libdir)/systemd/system/devmon@.service
++				$(DESTDIR)/$(systemd_unitdir)/system/devmon@.service
+ endif
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
new file mode 100644
index 0000000..60f84f8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
@@ -0,0 +1,28 @@
+SUMMARY = "A command line Linux program which mounts and unmounts removable devices"
+HOMEPAGE = "http://ignorantguru.github.io/udevil/"
+
+DEPENDS = "glib-2.0 \
+    glib-2.0-native \
+    intltool-native \
+    udev \
+"
+RDEPENDS_${PN} = "udev bash"
+
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools systemd
+
+SRC_URI = "https://github.com/IgnorantGuru/udevil/raw/pkg/${PV}/udevil-${PV}.tar.xz \
+    file://0001-udevil-0.4.3-fix-compile-with-gcc6.patch \
+    file://0002-etc-Makefile.am-Use-systemd_unitdir-instead-of-libdi.patch \
+"
+
+SRC_URI[md5sum] = "dc1c489b603a0500a04dc7e1805ac1d9"
+SRC_URI[sha256sum] = "ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739"
+
+PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"
+PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
+
+SYSTEMD_SERVICE_${PN} = "devmon@.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0001-Include-fcntl.h-for-O_EXCL.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0001-Include-fcntl.h-for-O_EXCL.patch
new file mode 100644
index 0000000..660468d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0001-Include-fcntl.h-for-O_EXCL.patch
@@ -0,0 +1,28 @@
+From 8cf48da5f645dd7bbb1ccbeab5bb0964f40f17f7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 23:18:47 -0700
+Subject: [PATCH 1/5] Include fcntl.h for O_EXCL
+
+Fix
+error: 'O_CREAT' undeclared (first use in this function)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ invutil/invidx.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/invutil/invidx.c b/invutil/invidx.c
+index 67efdf7..325a9a1 100644
+--- a/invutil/invidx.c
++++ b/invutil/invidx.c
+@@ -27,6 +27,7 @@
+ #include <sys/stat.h>
+ #include <string.h>
+ #include <uuid/uuid.h>
++#include <fcntl.h>
+ 
+ #include "types.h"
+ #include "mlog.h"
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0001-xfsdump-Use-c99-defined-int64_t-instead-of-__int64_t.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0001-xfsdump-Use-c99-defined-int64_t-instead-of-__int64_t.patch
new file mode 100644
index 0000000..1fe1bde
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0001-xfsdump-Use-c99-defined-int64_t-instead-of-__int64_t.patch
@@ -0,0 +1,28 @@
+From f1e822d546e08cc195eaeb38ca172bd0c3800aa9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Sep 2017 07:48:48 -0700
+Subject: [PATCH] xfsdump: Use c99 defined int64_t instead of __int64_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ common/hsmapi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/hsmapi.c b/common/hsmapi.c
+index 6054773..0709dbe 100644
+--- a/common/hsmapi.c
++++ b/common/hsmapi.c
+@@ -585,7 +585,7 @@ HsmModifyExtentMap(
+ 	struct getbmapx	*bmap)
+ {
+ 	dmf_f_ctxt_t	*dmf_f_ctxtp = (dmf_f_ctxt_t *)contextp;
+-	__int64_t	length;
++	int64_t		length;
+ 
+ 	if (bmap[0].bmv_entries <= 0) {
+ 		return 1;	/* caller must already be at EOF */
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0002-Replace-__uint32_t-with-uint32_t.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0002-Replace-__uint32_t-with-uint32_t.patch
new file mode 100644
index 0000000..ed3e0a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0002-Replace-__uint32_t-with-uint32_t.patch
@@ -0,0 +1,122 @@
+From f76d2142905f0e5bd830d5d576c235af1171c6ac Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 23:23:31 -0700
+Subject: [PATCH 2/5] Replace __uint32_t with uint32_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ common/content_inode.h | 4 ++--
+ doc/xfsdump.html       | 8 ++++----
+ inventory/inv_oref.h   | 2 +-
+ inventory/inv_priv.h   | 4 ++--
+ inventory/inventory.h  | 2 +-
+ 5 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/common/content_inode.h b/common/content_inode.h
+index a69a9a0..6936e05 100644
+--- a/common/content_inode.h
++++ b/common/content_inode.h
+@@ -191,10 +191,10 @@ typedef struct bstat bstat_t;
+  * and using two 16bit values to hold new 32bit projid was choosen
+  * to retain compatibility with "old" filesystems).
+  */
+-static inline __uint32_t
++static inline uint32_t
+ bstat_projid(struct bstat *bs)
+ {
+-        return (__uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
++        return (uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
+ }
+ 
+ 
+diff --git a/doc/xfsdump.html b/doc/xfsdump.html
+index 9c6722e..f85128f 100644
+--- a/doc/xfsdump.html
++++ b/doc/xfsdump.html
+@@ -1935,7 +1935,7 @@ The files are constructed like so:
+ <pre>
+ typedef struct invt_counter {
+     INVT_COUNTER_FIELDS
+-        __uint32_t    ic_vernum;/* on disk version number for posterity */\
++        uint32_t    ic_vernum;/* on disk version number for posterity */\
+         u_int         ic_curnum;/* number of sessions/invindices recorded \
+                                    so far */                              \
+         u_int         ic_maxnum;/* maximum number of sessions/inv_indices \
+@@ -1975,7 +1975,7 @@ typedef struct invt_fstab {
+ <pre>
+ typedef struct invt_counter {
+     INVT_COUNTER_FIELDS
+-        __uint32_t    ic_vernum;/* on disk version number for posterity */\
++        uint32_t    ic_vernum;/* on disk version number for posterity */\
+         u_int         ic_curnum;/* number of sessions/invindices recorded \
+                                    so far */                              \
+         u_int         ic_maxnum;/* maximum number of sessions/inv_indices \
+@@ -2012,7 +2012,7 @@ typedef struct invt_entry {
+ <pre>
+ typedef struct invt_sescounter {
+     INVT_COUNTER_FIELDS
+-        __uint32_t    ic_vernum;/* on disk version number for posterity */\
++        uint32_t    ic_vernum;/* on disk version number for posterity */\
+         u_int         ic_curnum;/* number of sessions/invindices recorded \
+                                    so far */                              \
+         u_int         ic_maxnum;/* maximum number of sessions/inv_indices \
+@@ -2034,7 +2034,7 @@ typedef struct invt_seshdr {
+     off64_t    sh_streams_off; /* offset to start of the set of
+                                   stream hdrs */
+     time_t     sh_time;        /* time of the dump */
+-    __uint32_t sh_flag;        /* for misc flags */
++    uint32_t sh_flag;        /* for misc flags */
+     u_char     sh_level;       /* dump level */
+     u_char     sh_pruned;      /* pruned by invutil flag */
+     char       sh_padding[22];
+diff --git a/inventory/inv_oref.h b/inventory/inv_oref.h
+index e16684d..38303a4 100644
+--- a/inventory/inv_oref.h
++++ b/inventory/inv_oref.h
+@@ -46,7 +46,7 @@
+ 
+ 
+ 
+-typedef __uint32_t	invt_objtype_t;
++typedef uint32_t	invt_objtype_t;
+ 
+ #define INVT_LOCKED		0x0001
+ 
+diff --git a/inventory/inv_priv.h b/inventory/inv_priv.h
+index 1690271..364ffbc 100644
+--- a/inventory/inv_priv.h
++++ b/inventory/inv_priv.h
+@@ -120,7 +120,7 @@ typedef struct invt_seshdr {
+ 	off64_t		sh_streams_off; /* offset to start of the set of 
+ 					   stream hdrs */
+ 	time32_t	sh_time;        /* time of the dump */
+-	__uint32_t	sh_flag;        /* for misc flags */
++	uint32_t	sh_flag;        /* for misc flags */
+ 	u_char		sh_level;       /* dump level */
+ 	u_char		sh_pruned;      /* pruned by invutil flag */
+ 	char		sh_padding[22];
+@@ -184,7 +184,7 @@ typedef struct invt_entry {
+ 
+ /* Cheap Inheritance, and an attempt to avoid a nested type */
+ #define INVT_COUNTER_FIELDS  \
+-        __uint32_t    ic_vernum;/* on disk version number for posterity */\
++        uint32_t    ic_vernum;/* on disk version number for posterity */\
+ 	uint	      ic_curnum;/* number of sessions/invindices recorded \
+ 				   so far */				  \
+ 	uint	      ic_maxnum;/* maximum number of sessions/inv_indices \
+diff --git a/inventory/inventory.h b/inventory/inventory.h
+index 134b9ba..c1d7403 100644
+--- a/inventory/inventory.h
++++ b/inventory/inventory.h
+@@ -43,7 +43,7 @@
+ /* length of labels, mntpts, etc */
+ #define INV_STRLEN              GLOBAL_HDR_STRING_SZ
+ 
+-typedef __uint32_t		inv_version_t;
++typedef uint32_t		inv_version_t;
+ 
+ /* This is the general inventory version. 
+  */
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0003-replace-use-of-SIGCLD-with-SIGCHLD.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0003-replace-use-of-SIGCLD-with-SIGCHLD.patch
new file mode 100644
index 0000000..31303d8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0003-replace-use-of-SIGCLD-with-SIGCHLD.patch
@@ -0,0 +1,40 @@
+From fcc0cf15a309947103a0695b8a1f4865b820eb5c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 23:26:03 -0700
+Subject: [PATCH 3/5] replace use of SIGCLD with SIGCHLD
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ common/main.c    | 2 +-
+ doc/xfsdump.html | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/common/main.c b/common/main.c
+index 3848499..faa66ee 100644
+--- a/common/main.c
++++ b/common/main.c
+@@ -2225,7 +2225,7 @@ static sig_printmap_t sig_printmap[ ] = {
+ 	{SIGTERM,	"SIGTERM"},
+ 	{SIGUSR1,	"SIGUSR1"},
+ 	{SIGUSR2,	"SIGUSR2"},
+-	{SIGCLD,	"SIGCLD"},
++	{SIGCHLD,	"SIGCHLD"},
+ 	{SIGPWR,	"SIGPWR"},
+ 	{SIGURG,	"SIGURG"},
+ 	{SIGPOLL,	"SIGPOLL"},
+diff --git a/doc/xfsdump.html b/doc/xfsdump.html
+index f85128f..d96f037 100644
+--- a/doc/xfsdump.html
++++ b/doc/xfsdump.html
+@@ -334,7 +334,7 @@ the ring buffer. It ignores signals and does not terminate until it
+ receives a RING_OP_DIE message. It then exits 0.
+ <p>
+ The main process sleeps waiting for any of its children to die
+-(ie. waiting for a SIGCLD). All children that it cares about (stream
++(ie. waiting for a SIGCHLD). All children that it cares about (stream
+ managers and ring buffer slaves) are registered through the child
+ manager abstraction. When a child dies wait status and other info is
+ stored with its entry in the child manager. main() ignores the deaths
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0004-include-limit.h-for-PATH_MAX.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0004-include-limit.h-for-PATH_MAX.patch
new file mode 100644
index 0000000..62ea15b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0004-include-limit.h-for-PATH_MAX.patch
@@ -0,0 +1,29 @@
+From 98c7d96f0f2c6eddf60aa4a1a08d7d4467645930 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 23:28:10 -0700
+Subject: [PATCH 4/5] include limit.h for PATH_MAX
+
+fixed
+var.c:42:12: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'RAND_MAX'?
+  char path[PATH_MAX];`
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dump/var.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/dump/var.c b/dump/var.c
+index 645caab..8156d37 100644
+--- a/dump/var.c
++++ b/dump/var.c
+@@ -16,6 +16,7 @@
+  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+  */
+ 
++#include <limits.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0005-include-sys-types.h-for-u_int32_t-in-attr-attributes.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0005-include-sys-types.h-for-u_int32_t-in-attr-attributes.patch
new file mode 100644
index 0000000..fb6e467
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/files/0005-include-sys-types.h-for-u_int32_t-in-attr-attributes.patch
@@ -0,0 +1,27 @@
+From d95f494de1aa8123c74170ffebaed8ea89649da2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 23:33:44 -0700
+Subject: [PATCH 5/5] include sys/types.h for u_int32_t in attr/attributes.h
+
+error: unknown type name 'u_int32_t'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ restore/content.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/restore/content.c b/restore/content.c
+index 7c4a81f..1d5de1b 100644
+--- a/restore/content.c
++++ b/restore/content.c
+@@ -24,6 +24,7 @@
+ #include <sys/param.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <attr/attributes.h>
+ #include <xfs/handle.h>
+ #include <time.h>
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb
deleted file mode 100644
index d5ad0b0..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "XFS Filesystem Dump Utility"
-DESCRIPTION = "The xfsdump package contains xfsdump, xfsrestore and a \
-               number of other utilities for administering XFS filesystems.\
-               xfsdump examines files in a filesystem, determines which \
-               need to be backed up, and copies those files to a \
-               specified disk, tape or other storage medium."
-HOMEPAGE = "http://oss.sgi.com/projects/xfs"
-SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://doc/COPYING;md5=15c832894d10ddd00dfcf57bee490ecc"
-DEPENDS = "xfsprogs attr"
-
-SRC_URI = "ftp://oss.sgi.com/projects/xfs/cmd_tars/${BPN}-${PV}.tar.gz \
-    file://remove-install-as-user.patch \
-"
-SRC_URI[md5sum] = "a8b1761be5feb363131e7b506639ad4c"
-SRC_URI[sha256sum] = "570eafd0721515bdd79cb0e295b701d49cdf81e71a0a0ff0df6d4c5cc1960943"
-
-inherit autotools-brokensep
-
-PARALLEL_MAKE = ""
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gettext] = "--enable-gettext=yes,--enable-gettext=no,gettext"
-
-EXTRA_OEMAKE += "'LIBTOOL=${HOST_SYS}-libtool' V=1"
-
-do_configure () {
-    export DEBUG="-DNDEBUG"
-    oe_runconf
-}
-
-do_install () {
-    export DIST_ROOT=${D}
-    oe_runmake install
-    oe_runmake install-dev
-}
-
-PNBLACKLIST[xfsdump] ?= "Depends on broken xfsprogs - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.7.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.7.bb
new file mode 100644
index 0000000..0ac991b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.7.bb
@@ -0,0 +1,44 @@
+SUMMARY = "XFS Filesystem Dump Utility"
+DESCRIPTION = "The xfsdump package contains xfsdump, xfsrestore and a \
+               number of other utilities for administering XFS filesystems.\
+               xfsdump examines files in a filesystem, determines which \
+               need to be backed up, and copies those files to a \
+               specified disk, tape or other storage medium."
+HOMEPAGE = "http://oss.sgi.com/projects/xfs"
+SECTION = "base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=15c832894d10ddd00dfcf57bee490ecc"
+DEPENDS = "xfsprogs attr"
+
+SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsdump/${BP}.tar.xz \
+           file://remove-install-as-user.patch \
+           file://0001-Include-fcntl.h-for-O_EXCL.patch \
+           file://0002-Replace-__uint32_t-with-uint32_t.patch \
+           file://0003-replace-use-of-SIGCLD-with-SIGCHLD.patch \
+           file://0004-include-limit.h-for-PATH_MAX.patch \
+           file://0005-include-sys-types.h-for-u_int32_t-in-attr-attributes.patch \
+           file://0001-xfsdump-Use-c99-defined-int64_t-instead-of-__int64_t.patch \
+           "
+SRC_URI[md5sum] = "c6e91f2ac8b76c796db2d236f5ca5947"
+SRC_URI[sha256sum] = "99e6d4df257ebc6d29ca9e970ca20672c2ea03481ad949bc68f98de3e4d56dce"
+
+inherit autotools-brokensep
+
+PARALLEL_MAKE = ""
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gettext] = "--enable-gettext=yes,--enable-gettext=no,gettext"
+
+CFLAGS += "-D_FILE_OFFSET_BITS=64"
+
+EXTRA_OEMAKE += "'LIBTOOL=${HOST_SYS}-libtool' V=1"
+
+do_configure () {
+    export DEBUG="-DNDEBUG"
+    oe_runconf
+}
+
+do_install () {
+    export DIST_ROOT=${D}
+    oe_runmake install
+    oe_runmake install-dev
+}
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfs-remove-double-underscore-integer-types.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfs-remove-double-underscore-integer-types.patch
new file mode 100644
index 0000000..a47c487
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfs-remove-double-underscore-integer-types.patch
@@ -0,0 +1,2082 @@
+From 4a492e72515509ee702286a42afe7d8f89d37636 Mon Sep 17 00:00:00 2001
+From: "Darrick J. Wong" <darrick.wong@oracle.com>
+Date: Mon, 31 Jul 2017 15:08:10 -0500
+Subject: [PATCH] xfs: remove double-underscore integer types
+
+Source kernel commit: c8ce540db5f67d254aafb14b5d76422c62a906df
+
+This is a purely mechanical patch that removes the private
+__{u,}int{8,16,32,64}_t typedefs in favor of using the system
+{u,}int{8,16,32,64}_t typedefs.  This is the sed script used to perform
+the transformation and fix the resulting whitespace and indentation
+errors:
+
+s/typedef\t__uint8_t/typedef __uint8_t\t/g
+s/typedef\t__uint/typedef __uint/g
+s/typedef\t__int\([0-9]*\)_t/typedef int\1_t\t/g
+s/__uint8_t\t/__uint8_t\t\t/g
+s/__uint/uint/g
+s/__int\([0-9]*\)_t\t/__int\1_t\t\t/g
+s/__int/int/g
+/^typedef.*int[0-9]*_t;$/d
+
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
+---
+ libxfs/libxfs_priv.h        |   1 +
+ libxfs/xfs_alloc_btree.c    |  20 ++--
+ libxfs/xfs_attr_remote.c    |   8 +-
+ libxfs/xfs_attr_sf.h        |  10 +-
+ libxfs/xfs_bit.h            |  24 ++---
+ libxfs/xfs_bmap_btree.c     |   8 +-
+ libxfs/xfs_btree.c          |  22 ++--
+ libxfs/xfs_btree.h          |  18 ++--
+ libxfs/xfs_cksum.h          |  16 +--
+ libxfs/xfs_da_btree.c       |   2 +-
+ libxfs/xfs_da_btree.h       |   8 +-
+ libxfs/xfs_da_format.c      |  28 ++---
+ libxfs/xfs_da_format.h      |  64 +++++------
+ libxfs/xfs_dir2.h           |   8 +-
+ libxfs/xfs_dir2_leaf.c      |  12 +--
+ libxfs/xfs_dir2_priv.h      |   2 +-
+ libxfs/xfs_dir2_sf.c        |   4 +-
+ libxfs/xfs_format.h         | 112 +++++++++----------
+ libxfs/xfs_fs.h             |  12 +--
+ libxfs/xfs_ialloc.c         |   6 +-
+ libxfs/xfs_ialloc_btree.c   |   4 +-
+ libxfs/xfs_inode_buf.c      |   2 +-
+ libxfs/xfs_inode_buf.h      |  28 ++---
+ libxfs/xfs_log_format.h     | 256 ++++++++++++++++++++++----------------------
+ libxfs/xfs_quota_defs.h     |   4 +-
+ libxfs/xfs_refcount_btree.c |   8 +-
+ libxfs/xfs_rmap.c           |   8 +-
+ libxfs/xfs_rmap.h           |   8 +-
+ libxfs/xfs_rmap_btree.c     |  30 +++---
+ libxfs/xfs_rtbitmap.c       |   2 +-
+ libxfs/xfs_sb.c             |   4 +-
+ libxfs/xfs_types.h          |  46 ++++----
+ 32 files changed, 393 insertions(+), 392 deletions(-)
+
+diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
+index 0b4c4890..b3cc7e53 100644
+--- a/libxfs/libxfs_priv.h
++++ b/libxfs/libxfs_priv.h
+@@ -504,5 +504,6 @@ bool xfs_log_check_lsn(struct xfs_mount *, xfs_lsn_t);
+ #define XFS_STATS_INC_OFF(mp, off)
+ #define XFS_STATS_ADD_OFF(mp, off, val)
+ 
++typedef unsigned char u8;
+ 
+ #endif	/* __LIBXFS_INTERNAL_XFS_H__ */
+diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c
+index e11d89a3..8e77e6e3 100644
+--- a/libxfs/xfs_alloc_btree.c
++++ b/libxfs/xfs_alloc_btree.c
+@@ -251,7 +251,7 @@ xfs_allocbt_init_ptr_from_cur(
+ 	ptr->s = agf->agf_roots[cur->bc_btnum];
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_bnobt_key_diff(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*key)
+@@ -259,42 +259,42 @@ xfs_bnobt_key_diff(
+ 	xfs_alloc_rec_incore_t	*rec = &cur->bc_rec.a;
+ 	xfs_alloc_key_t		*kp = &key->alloc;
+ 
+-	return (__int64_t)be32_to_cpu(kp->ar_startblock) - rec->ar_startblock;
++	return (int64_t)be32_to_cpu(kp->ar_startblock) - rec->ar_startblock;
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_cntbt_key_diff(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*key)
+ {
+ 	xfs_alloc_rec_incore_t	*rec = &cur->bc_rec.a;
+ 	xfs_alloc_key_t		*kp = &key->alloc;
+-	__int64_t		diff;
++	int64_t			diff;
+ 
+-	diff = (__int64_t)be32_to_cpu(kp->ar_blockcount) - rec->ar_blockcount;
++	diff = (int64_t)be32_to_cpu(kp->ar_blockcount) - rec->ar_blockcount;
+ 	if (diff)
+ 		return diff;
+ 
+-	return (__int64_t)be32_to_cpu(kp->ar_startblock) - rec->ar_startblock;
++	return (int64_t)be32_to_cpu(kp->ar_startblock) - rec->ar_startblock;
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_bnobt_diff_two_keys(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*k1,
+ 	union xfs_btree_key	*k2)
+ {
+-	return (__int64_t)be32_to_cpu(k1->alloc.ar_startblock) -
++	return (int64_t)be32_to_cpu(k1->alloc.ar_startblock) -
+ 			  be32_to_cpu(k2->alloc.ar_startblock);
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_cntbt_diff_two_keys(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*k1,
+ 	union xfs_btree_key	*k2)
+ {
+-	__int64_t		diff;
++	int64_t			diff;
+ 
+ 	diff =  be32_to_cpu(k1->alloc.ar_blockcount) -
+ 		be32_to_cpu(k2->alloc.ar_blockcount);
+diff --git a/libxfs/xfs_attr_remote.c b/libxfs/xfs_attr_remote.c
+index abe17052..1f25e363 100644
+--- a/libxfs/xfs_attr_remote.c
++++ b/libxfs/xfs_attr_remote.c
+@@ -248,7 +248,7 @@ xfs_attr_rmtval_copyout(
+ 	xfs_ino_t	ino,
+ 	int		*offset,
+ 	int		*valuelen,
+-	__uint8_t	**dst)
++	uint8_t		**dst)
+ {
+ 	char		*src = bp->b_addr;
+ 	xfs_daddr_t	bno = bp->b_bn;
+@@ -296,7 +296,7 @@ xfs_attr_rmtval_copyin(
+ 	xfs_ino_t	ino,
+ 	int		*offset,
+ 	int		*valuelen,
+-	__uint8_t	**src)
++	uint8_t		**src)
+ {
+ 	char		*dst = bp->b_addr;
+ 	xfs_daddr_t	bno = bp->b_bn;
+@@ -350,7 +350,7 @@ xfs_attr_rmtval_get(
+ 	struct xfs_mount	*mp = args->dp->i_mount;
+ 	struct xfs_buf		*bp;
+ 	xfs_dablk_t		lblkno = args->rmtblkno;
+-	__uint8_t		*dst = args->value;
++	uint8_t			*dst = args->value;
+ 	int			valuelen;
+ 	int			nmap;
+ 	int			error;
+@@ -416,7 +416,7 @@ xfs_attr_rmtval_set(
+ 	struct xfs_bmbt_irec	map;
+ 	xfs_dablk_t		lblkno;
+ 	xfs_fileoff_t		lfileoff = 0;
+-	__uint8_t		*src = args->value;
++	uint8_t			*src = args->value;
+ 	int			blkcnt;
+ 	int			valuelen;
+ 	int			nmap;
+diff --git a/libxfs/xfs_attr_sf.h b/libxfs/xfs_attr_sf.h
+index 90928bbe..afd684ae 100644
+--- a/libxfs/xfs_attr_sf.h
++++ b/libxfs/xfs_attr_sf.h
+@@ -31,10 +31,10 @@ typedef struct xfs_attr_sf_entry xfs_attr_sf_entry_t;
+  * We generate this then sort it, attr_list() must return things in hash-order.
+  */
+ typedef struct xfs_attr_sf_sort {
+-	__uint8_t	entno;		/* entry number in original list */
+-	__uint8_t	namelen;	/* length of name value (no null) */
+-	__uint8_t	valuelen;	/* length of value */
+-	__uint8_t	flags;		/* flags bits (see xfs_attr_leaf.h) */
++	uint8_t		entno;		/* entry number in original list */
++	uint8_t		namelen;	/* length of name value (no null) */
++	uint8_t		valuelen;	/* length of value */
++	uint8_t		flags;		/* flags bits (see xfs_attr_leaf.h) */
+ 	xfs_dahash_t	hash;		/* this entry's hash value */
+ 	unsigned char	*name;		/* name value, pointer into buffer */
+ } xfs_attr_sf_sort_t;
+@@ -42,7 +42,7 @@ typedef struct xfs_attr_sf_sort {
+ #define XFS_ATTR_SF_ENTSIZE_BYNAME(nlen,vlen)	/* space name/value uses */ \
+ 	(((int)sizeof(xfs_attr_sf_entry_t)-1 + (nlen)+(vlen)))
+ #define XFS_ATTR_SF_ENTSIZE_MAX			/* max space for name&value */ \
+-	((1 << (NBBY*(int)sizeof(__uint8_t))) - 1)
++	((1 << (NBBY*(int)sizeof(uint8_t))) - 1)
+ #define XFS_ATTR_SF_ENTSIZE(sfep)		/* space an entry uses */ \
+ 	((int)sizeof(xfs_attr_sf_entry_t)-1 + (sfep)->namelen+(sfep)->valuelen)
+ #define XFS_ATTR_SF_NEXTENTRY(sfep)		/* next entry in struct */ \
+diff --git a/libxfs/xfs_bit.h b/libxfs/xfs_bit.h
+index e1649c0d..61c6b202 100644
+--- a/libxfs/xfs_bit.h
++++ b/libxfs/xfs_bit.h
+@@ -25,47 +25,47 @@
+ /*
+  * masks with n high/low bits set, 64-bit values
+  */
+-static inline __uint64_t xfs_mask64hi(int n)
++static inline uint64_t xfs_mask64hi(int n)
+ {
+-	return (__uint64_t)-1 << (64 - (n));
++	return (uint64_t)-1 << (64 - (n));
+ }
+-static inline __uint32_t xfs_mask32lo(int n)
++static inline uint32_t xfs_mask32lo(int n)
+ {
+-	return ((__uint32_t)1 << (n)) - 1;
++	return ((uint32_t)1 << (n)) - 1;
+ }
+-static inline __uint64_t xfs_mask64lo(int n)
++static inline uint64_t xfs_mask64lo(int n)
+ {
+-	return ((__uint64_t)1 << (n)) - 1;
++	return ((uint64_t)1 << (n)) - 1;
+ }
+ 
+ /* Get high bit set out of 32-bit argument, -1 if none set */
+-static inline int xfs_highbit32(__uint32_t v)
++static inline int xfs_highbit32(uint32_t v)
+ {
+ 	return fls(v) - 1;
+ }
+ 
+ /* Get high bit set out of 64-bit argument, -1 if none set */
+-static inline int xfs_highbit64(__uint64_t v)
++static inline int xfs_highbit64(uint64_t v)
+ {
+ 	return fls64(v) - 1;
+ }
+ 
+ /* Get low bit set out of 32-bit argument, -1 if none set */
+-static inline int xfs_lowbit32(__uint32_t v)
++static inline int xfs_lowbit32(uint32_t v)
+ {
+ 	return ffs(v) - 1;
+ }
+ 
+ /* Get low bit set out of 64-bit argument, -1 if none set */
+-static inline int xfs_lowbit64(__uint64_t v)
++static inline int xfs_lowbit64(uint64_t v)
+ {
+-	__uint32_t	w = (__uint32_t)v;
++	uint32_t	w = (uint32_t)v;
+ 	int		n = 0;
+ 
+ 	if (w) {	/* lower bits */
+ 		n = ffs(w);
+ 	} else {	/* upper bits */
+-		w = (__uint32_t)(v >> 32);
++		w = (uint32_t)(v >> 32);
+ 		if (w) {
+ 			n = ffs(w);
+ 			if (n)
+diff --git a/libxfs/xfs_bmap_btree.c b/libxfs/xfs_bmap_btree.c
+index c48cbec1..9ee40d8b 100644
+--- a/libxfs/xfs_bmap_btree.c
++++ b/libxfs/xfs_bmap_btree.c
+@@ -91,8 +91,8 @@ xfs_bmdr_to_bmbt(
+  */
+ STATIC void
+ __xfs_bmbt_get_all(
+-		__uint64_t l0,
+-		__uint64_t l1,
++		uint64_t l0,
++		uint64_t l1,
+ 		xfs_bmbt_irec_t *s)
+ {
+ 	int	ext_flag;
+@@ -585,12 +585,12 @@ xfs_bmbt_init_ptr_from_cur(
+ 	ptr->l = 0;
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_bmbt_key_diff(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*key)
+ {
+-	return (__int64_t)be64_to_cpu(key->bmbt.br_startoff) -
++	return (int64_t)be64_to_cpu(key->bmbt.br_startoff) -
+ 				      cur->bc_rec.b.br_startoff;
+ }
+ 
+diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c
+index 3d293520..56b50a5b 100644
+--- a/libxfs/xfs_btree.c
++++ b/libxfs/xfs_btree.c
+@@ -39,7 +39,7 @@ kmem_zone_t	*xfs_btree_cur_zone;
+ /*
+  * Btree magic numbers.
+  */
+-static const __uint32_t xfs_magics[2][XFS_BTNUM_MAX] = {
++static const uint32_t xfs_magics[2][XFS_BTNUM_MAX] = {
+ 	{ XFS_ABTB_MAGIC, XFS_ABTC_MAGIC, 0, XFS_BMAP_MAGIC, XFS_IBT_MAGIC,
+ 	  XFS_FIBT_MAGIC, 0 },
+ 	{ XFS_ABTB_CRC_MAGIC, XFS_ABTC_CRC_MAGIC, XFS_RMAP_CRC_MAGIC,
+@@ -47,12 +47,12 @@ static const __uint32_t xfs_magics[2][XFS_BTNUM_MAX] = {
+ 	  XFS_REFC_CRC_MAGIC }
+ };
+ 
+-__uint32_t
++uint32_t
+ xfs_btree_magic(
+ 	int			crc,
+ 	xfs_btnum_t		btnum)
+ {
+-	__uint32_t		magic = xfs_magics[crc][btnum];
++	uint32_t		magic = xfs_magics[crc][btnum];
+ 
+ 	/* Ensure we asked for crc for crc-only magics. */
+ 	ASSERT(magic != 0);
+@@ -774,14 +774,14 @@ xfs_btree_lastrec(
+  */
+ void
+ xfs_btree_offsets(
+-	__int64_t	fields,		/* bitmask of fields */
++	int64_t		fields,		/* bitmask of fields */
+ 	const short	*offsets,	/* table of field offsets */
+ 	int		nbits,		/* number of bits to inspect */
+ 	int		*first,		/* output: first byte offset */
+ 	int		*last)		/* output: last byte offset */
+ {
+ 	int		i;		/* current bit number */
+-	__int64_t	imask;		/* mask for current bit number */
++	int64_t		imask;		/* mask for current bit number */
+ 
+ 	ASSERT(fields != 0);
+ 	/*
+@@ -1842,7 +1842,7 @@ xfs_btree_lookup(
+ 	int			*stat)	/* success/failure */
+ {
+ 	struct xfs_btree_block	*block;	/* current btree block */
+-	__int64_t		diff;	/* difference for the current key */
++	int64_t			diff;	/* difference for the current key */
+ 	int			error;	/* error return value */
+ 	int			keyno;	/* current key number */
+ 	int			level;	/* level in the btree */
+@@ -4435,7 +4435,7 @@ xfs_btree_visit_blocks(
+  * recovery completion writes the changes to disk.
+  */
+ struct xfs_btree_block_change_owner_info {
+-	__uint64_t		new_owner;
++	uint64_t		new_owner;
+ 	struct list_head	*buffer_list;
+ };
+ 
+@@ -4481,7 +4481,7 @@ xfs_btree_block_change_owner(
+ int
+ xfs_btree_change_owner(
+ 	struct xfs_btree_cur	*cur,
+-	__uint64_t		new_owner,
++	uint64_t		new_owner,
+ 	struct list_head	*buffer_list)
+ {
+ 	struct xfs_btree_block_change_owner_info	bbcoi;
+@@ -4585,7 +4585,7 @@ xfs_btree_simple_query_range(
+ {
+ 	union xfs_btree_rec		*recp;
+ 	union xfs_btree_key		rec_key;
+-	__int64_t			diff;
++	int64_t				diff;
+ 	int				stat;
+ 	bool				firstrec = true;
+ 	int				error;
+@@ -4682,8 +4682,8 @@ xfs_btree_overlapped_query_range(
+ 	union xfs_btree_key		*hkp;
+ 	union xfs_btree_rec		*recp;
+ 	struct xfs_btree_block		*block;
+-	__int64_t			ldiff;
+-	__int64_t			hdiff;
++	int64_t				ldiff;
++	int64_t				hdiff;
+ 	int				level;
+ 	struct xfs_buf			*bp;
+ 	int				i;
+diff --git a/libxfs/xfs_btree.h b/libxfs/xfs_btree.h
+index 05cf35b5..3c1fed23 100644
+--- a/libxfs/xfs_btree.h
++++ b/libxfs/xfs_btree.h
+@@ -76,7 +76,7 @@ union xfs_btree_rec {
+ #define	XFS_BTNUM_RMAP	((xfs_btnum_t)XFS_BTNUM_RMAPi)
+ #define	XFS_BTNUM_REFC	((xfs_btnum_t)XFS_BTNUM_REFCi)
+ 
+-__uint32_t xfs_btree_magic(int crc, xfs_btnum_t btnum);
++uint32_t xfs_btree_magic(int crc, xfs_btnum_t btnum);
+ 
+ /*
+  * For logging record fields.
+@@ -150,14 +150,14 @@ struct xfs_btree_ops {
+ 					  union xfs_btree_rec *rec);
+ 
+ 	/* difference between key value and cursor value */
+-	__int64_t (*key_diff)(struct xfs_btree_cur *cur,
++	int64_t (*key_diff)(struct xfs_btree_cur *cur,
+ 			      union xfs_btree_key *key);
+ 
+ 	/*
+ 	 * Difference between key2 and key1 -- positive if key1 > key2,
+ 	 * negative if key1 < key2, and zero if equal.
+ 	 */
+-	__int64_t (*diff_two_keys)(struct xfs_btree_cur *cur,
++	int64_t (*diff_two_keys)(struct xfs_btree_cur *cur,
+ 				   union xfs_btree_key *key1,
+ 				   union xfs_btree_key *key2);
+ 
+@@ -213,11 +213,11 @@ typedef struct xfs_btree_cur
+ 	union xfs_btree_irec	bc_rec;	/* current insert/search record value */
+ 	struct xfs_buf	*bc_bufs[XFS_BTREE_MAXLEVELS];	/* buf ptr per level */
+ 	int		bc_ptrs[XFS_BTREE_MAXLEVELS];	/* key/record # */
+-	__uint8_t	bc_ra[XFS_BTREE_MAXLEVELS];	/* readahead bits */
++	uint8_t		bc_ra[XFS_BTREE_MAXLEVELS];	/* readahead bits */
+ #define	XFS_BTCUR_LEFTRA	1	/* left sibling has been read-ahead */
+ #define	XFS_BTCUR_RIGHTRA	2	/* right sibling has been read-ahead */
+-	__uint8_t	bc_nlevels;	/* number of levels in the tree */
+-	__uint8_t	bc_blocklog;	/* log2(blocksize) of btree blocks */
++	uint8_t		bc_nlevels;	/* number of levels in the tree */
++	uint8_t		bc_blocklog;	/* log2(blocksize) of btree blocks */
+ 	xfs_btnum_t	bc_btnum;	/* identifies which btree type */
+ 	int		bc_statoff;	/* offset of btre stats array */
+ 	union {
+@@ -330,7 +330,7 @@ xfs_btree_islastblock(
+  */
+ void
+ xfs_btree_offsets(
+-	__int64_t		fields,	/* bitmask of fields */
++	int64_t			fields,	/* bitmask of fields */
+ 	const short		*offsets,/* table of field offsets */
+ 	int			nbits,	/* number of bits to inspect */
+ 	int			*first,	/* output: first byte offset */
+@@ -408,7 +408,7 @@ int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *);
+ int xfs_btree_insert(struct xfs_btree_cur *, int *);
+ int xfs_btree_delete(struct xfs_btree_cur *, int *);
+ int xfs_btree_get_rec(struct xfs_btree_cur *, union xfs_btree_rec **, int *);
+-int xfs_btree_change_owner(struct xfs_btree_cur *cur, __uint64_t new_owner,
++int xfs_btree_change_owner(struct xfs_btree_cur *cur, uint64_t new_owner,
+ 			   struct list_head *buffer_list);
+ 
+ /*
+@@ -434,7 +434,7 @@ static inline int xfs_btree_get_numrecs(struct xfs_btree_block *block)
+ }
+ 
+ static inline void xfs_btree_set_numrecs(struct xfs_btree_block *block,
+-		__uint16_t numrecs)
++		uint16_t numrecs)
+ {
+ 	block->bb_numrecs = cpu_to_be16(numrecs);
+ }
+diff --git a/libxfs/xfs_cksum.h b/libxfs/xfs_cksum.h
+index a416c7cb..8211f48b 100644
+--- a/libxfs/xfs_cksum.h
++++ b/libxfs/xfs_cksum.h
+@@ -1,7 +1,7 @@
+ #ifndef _XFS_CKSUM_H
+ #define _XFS_CKSUM_H 1
+ 
+-#define XFS_CRC_SEED	(~(__uint32_t)0)
++#define XFS_CRC_SEED	(~(uint32_t)0)
+ 
+ /*
+  * Calculate the intermediate checksum for a buffer that has the CRC field
+@@ -9,11 +9,11 @@
+  * cksum_offset parameter. We do not modify the buffer during verification,
+  * hence we have to split the CRC calculation across the cksum_offset.
+  */
+-static inline __uint32_t
++static inline uint32_t
+ xfs_start_cksum_safe(char *buffer, size_t length, unsigned long cksum_offset)
+ {
+-	__uint32_t zero = 0;
+-	__uint32_t crc;
++	uint32_t zero = 0;
++	uint32_t crc;
+ 
+ 	/* Calculate CRC up to the checksum. */
+ 	crc = crc32c(XFS_CRC_SEED, buffer, cksum_offset);
+@@ -30,7 +30,7 @@ xfs_start_cksum_safe(char *buffer, size_t length, unsigned long cksum_offset)
+  * Fast CRC method where the buffer is modified. Callers must have exclusive
+  * access to the buffer while the calculation takes place.
+  */
+-static inline __uint32_t
++static inline uint32_t
+ xfs_start_cksum_update(char *buffer, size_t length, unsigned long cksum_offset)
+ {
+ 	/* zero the CRC field */
+@@ -48,7 +48,7 @@ xfs_start_cksum_update(char *buffer, size_t length, unsigned long cksum_offset)
+  * so that it is consistent on disk.
+  */
+ static inline __le32
+-xfs_end_cksum(__uint32_t crc)
++xfs_end_cksum(uint32_t crc)
+ {
+ 	return ~cpu_to_le32(crc);
+ }
+@@ -62,7 +62,7 @@ xfs_end_cksum(__uint32_t crc)
+ static inline void
+ xfs_update_cksum(char *buffer, size_t length, unsigned long cksum_offset)
+ {
+-	__uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset);
++	uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset);
+ 
+ 	*(__le32 *)(buffer + cksum_offset) = xfs_end_cksum(crc);
+ }
+@@ -73,7 +73,7 @@ xfs_update_cksum(char *buffer, size_t length, unsigned long cksum_offset)
+ static inline int
+ xfs_verify_cksum(char *buffer, size_t length, unsigned long cksum_offset)
+ {
+-	__uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset);
++	uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset);
+ 
+ 	return *(__le32 *)(buffer + cksum_offset) == xfs_end_cksum(crc);
+ }
+diff --git a/libxfs/xfs_da_btree.c b/libxfs/xfs_da_btree.c
+index bc12f58f..08447be8 100644
+--- a/libxfs/xfs_da_btree.c
++++ b/libxfs/xfs_da_btree.c
+@@ -1947,7 +1947,7 @@ xfs_da3_path_shift(
+  * This is implemented with some source-level loop unrolling.
+  */
+ xfs_dahash_t
+-xfs_da_hashname(const __uint8_t *name, int namelen)
++xfs_da_hashname(const uint8_t *name, int namelen)
+ {
+ 	xfs_dahash_t hash;
+ 
+diff --git a/libxfs/xfs_da_btree.h b/libxfs/xfs_da_btree.h
+index 4e29cb6a..ae6de174 100644
+--- a/libxfs/xfs_da_btree.h
++++ b/libxfs/xfs_da_btree.h
+@@ -60,10 +60,10 @@ enum xfs_dacmp {
+  */
+ typedef struct xfs_da_args {
+ 	struct xfs_da_geometry *geo;	/* da block geometry */
+-	const __uint8_t	*name;		/* string (maybe not NULL terminated) */
++	const uint8_t		*name;		/* string (maybe not NULL terminated) */
+ 	int		namelen;	/* length of string (maybe no NULL) */
+-	__uint8_t	filetype;	/* filetype of inode for directories */
+-	__uint8_t	*value;		/* set of bytes (maybe contain NULLs) */
++	uint8_t		filetype;	/* filetype of inode for directories */
++	uint8_t		*value;		/* set of bytes (maybe contain NULLs) */
+ 	int		valuelen;	/* length of value */
+ 	int		flags;		/* argument flags (eg: ATTR_NOCREATE) */
+ 	xfs_dahash_t	hashval;	/* hash value of name */
+@@ -207,7 +207,7 @@ int	xfs_da_reada_buf(struct xfs_inode *dp, xfs_dablk_t bno,
+ int	xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno,
+ 					  struct xfs_buf *dead_buf);
+ 
+-uint xfs_da_hashname(const __uint8_t *name_string, int name_length);
++uint xfs_da_hashname(const uint8_t *name_string, int name_length);
+ enum xfs_dacmp xfs_da_compname(struct xfs_da_args *args,
+ 				const unsigned char *name, int len);
+ 
+diff --git a/libxfs/xfs_da_format.c b/libxfs/xfs_da_format.c
+index 2b732b3c..f30004f6 100644
+--- a/libxfs/xfs_da_format.c
++++ b/libxfs/xfs_da_format.c
+@@ -49,7 +49,7 @@ xfs_dir3_sf_entsize(
+ 	struct xfs_dir2_sf_hdr	*hdr,
+ 	int			len)
+ {
+-	return xfs_dir2_sf_entsize(hdr, len) + sizeof(__uint8_t);
++	return xfs_dir2_sf_entsize(hdr, len) + sizeof(uint8_t);
+ }
+ 
+ static struct xfs_dir2_sf_entry *
+@@ -77,7 +77,7 @@ xfs_dir3_sf_nextentry(
+  * not necessary. For non-filetype enable directories, the type is always
+  * unknown and we never store the value.
+  */
+-static __uint8_t
++static uint8_t
+ xfs_dir2_sfe_get_ftype(
+ 	struct xfs_dir2_sf_entry *sfep)
+ {
+@@ -87,16 +87,16 @@ xfs_dir2_sfe_get_ftype(
+ static void
+ xfs_dir2_sfe_put_ftype(
+ 	struct xfs_dir2_sf_entry *sfep,
+-	__uint8_t		ftype)
++	uint8_t			ftype)
+ {
+ 	ASSERT(ftype < XFS_DIR3_FT_MAX);
+ }
+ 
+-static __uint8_t
++static uint8_t
+ xfs_dir3_sfe_get_ftype(
+ 	struct xfs_dir2_sf_entry *sfep)
+ {
+-	__uint8_t	ftype;
++	uint8_t		ftype;
+ 
+ 	ftype = sfep->name[sfep->namelen];
+ 	if (ftype >= XFS_DIR3_FT_MAX)
+@@ -107,7 +107,7 @@ xfs_dir3_sfe_get_ftype(
+ static void
+ xfs_dir3_sfe_put_ftype(
+ 	struct xfs_dir2_sf_entry *sfep,
+-	__uint8_t		ftype)
++	uint8_t			ftype)
+ {
+ 	ASSERT(ftype < XFS_DIR3_FT_MAX);
+ 
+@@ -124,7 +124,7 @@ xfs_dir3_sfe_put_ftype(
+ static xfs_ino_t
+ xfs_dir2_sf_get_ino(
+ 	struct xfs_dir2_sf_hdr	*hdr,
+-	__uint8_t		*from)
++	uint8_t			*from)
+ {
+ 	if (hdr->i8count)
+ 		return get_unaligned_be64(from) & 0x00ffffffffffffffULL;
+@@ -135,7 +135,7 @@ xfs_dir2_sf_get_ino(
+ static void
+ xfs_dir2_sf_put_ino(
+ 	struct xfs_dir2_sf_hdr	*hdr,
+-	__uint8_t		*to,
++	uint8_t			*to,
+ 	xfs_ino_t		ino)
+ {
+ 	ASSERT((ino & 0xff00000000000000ULL) == 0);
+@@ -225,7 +225,7 @@ xfs_dir3_sfe_put_ino(
+ 
+ #define XFS_DIR3_DATA_ENTSIZE(n)					\
+ 	round_up((offsetof(struct xfs_dir2_data_entry, name[0]) + (n) +	\
+-		 sizeof(xfs_dir2_data_off_t) + sizeof(__uint8_t)),	\
++		 sizeof(xfs_dir2_data_off_t) + sizeof(uint8_t)),	\
+ 		XFS_DIR2_DATA_ALIGN)
+ 
+ static int
+@@ -242,7 +242,7 @@ xfs_dir3_data_entsize(
+ 	return XFS_DIR3_DATA_ENTSIZE(n);
+ }
+ 
+-static __uint8_t
++static uint8_t
+ xfs_dir2_data_get_ftype(
+ 	struct xfs_dir2_data_entry *dep)
+ {
+@@ -252,16 +252,16 @@ xfs_dir2_data_get_ftype(
+ static void
+ xfs_dir2_data_put_ftype(
+ 	struct xfs_dir2_data_entry *dep,
+-	__uint8_t		ftype)
++	uint8_t			ftype)
+ {
+ 	ASSERT(ftype < XFS_DIR3_FT_MAX);
+ }
+ 
+-static __uint8_t
++static uint8_t
+ xfs_dir3_data_get_ftype(
+ 	struct xfs_dir2_data_entry *dep)
+ {
+-	__uint8_t	ftype = dep->name[dep->namelen];
++	uint8_t		ftype = dep->name[dep->namelen];
+ 
+ 	if (ftype >= XFS_DIR3_FT_MAX)
+ 		return XFS_DIR3_FT_UNKNOWN;
+@@ -271,7 +271,7 @@ xfs_dir3_data_get_ftype(
+ static void
+ xfs_dir3_data_put_ftype(
+ 	struct xfs_dir2_data_entry *dep,
+-	__uint8_t		type)
++	uint8_t			type)
+ {
+ 	ASSERT(type < XFS_DIR3_FT_MAX);
+ 	ASSERT(dep->namelen != 0);
+diff --git a/libxfs/xfs_da_format.h b/libxfs/xfs_da_format.h
+index 9a492a9e..3771edcb 100644
+--- a/libxfs/xfs_da_format.h
++++ b/libxfs/xfs_da_format.h
+@@ -111,11 +111,11 @@ struct xfs_da3_intnode {
+  * appropriate.
+  */
+ struct xfs_da3_icnode_hdr {
+-	__uint32_t	forw;
+-	__uint32_t	back;
+-	__uint16_t	magic;
+-	__uint16_t	count;
+-	__uint16_t	level;
++	uint32_t	forw;
++	uint32_t	back;
++	uint16_t	magic;
++	uint16_t	count;
++	uint16_t	level;
+ };
+ 
+ /*
+@@ -187,14 +187,14 @@ struct xfs_da3_icnode_hdr {
+ /*
+  * Byte offset in data block and shortform entry.
+  */
+-typedef	__uint16_t	xfs_dir2_data_off_t;
++typedef uint16_t	xfs_dir2_data_off_t;
+ #define	NULLDATAOFF	0xffffU
+ typedef uint		xfs_dir2_data_aoff_t;	/* argument form */
+ 
+ /*
+  * Offset in data space of a data entry.
+  */
+-typedef	__uint32_t	xfs_dir2_dataptr_t;
++typedef uint32_t	xfs_dir2_dataptr_t;
+ #define	XFS_DIR2_MAX_DATAPTR	((xfs_dir2_dataptr_t)0xffffffff)
+ #define	XFS_DIR2_NULL_DATAPTR	((xfs_dir2_dataptr_t)0)
+ 
+@@ -206,7 +206,7 @@ typedef	xfs_off_t	xfs_dir2_off_t;
+ /*
+  * Directory block number (logical dirblk in file)
+  */
+-typedef	__uint32_t	xfs_dir2_db_t;
++typedef uint32_t	xfs_dir2_db_t;
+ 
+ #define XFS_INO32_SIZE	4
+ #define XFS_INO64_SIZE	8
+@@ -226,9 +226,9 @@ typedef	__uint32_t	xfs_dir2_db_t;
+  * over them.
+  */
+ typedef struct xfs_dir2_sf_hdr {
+-	__uint8_t		count;		/* count of entries */
+-	__uint8_t		i8count;	/* count of 8-byte inode #s */
+-	__uint8_t		parent[8];	/* parent dir inode number */
++	uint8_t			count;		/* count of entries */
++	uint8_t			i8count;	/* count of 8-byte inode #s */
++	uint8_t			parent[8];	/* parent dir inode number */
+ } __packed xfs_dir2_sf_hdr_t;
+ 
+ typedef struct xfs_dir2_sf_entry {
+@@ -447,11 +447,11 @@ struct xfs_dir3_leaf_hdr {
+ };
+ 
+ struct xfs_dir3_icleaf_hdr {
+-	__uint32_t		forw;
+-	__uint32_t		back;
+-	__uint16_t		magic;
+-	__uint16_t		count;
+-	__uint16_t		stale;
++	uint32_t		forw;
++	uint32_t		back;
++	uint16_t		magic;
++	uint16_t		count;
++	uint16_t		stale;
+ };
+ 
+ /*
+@@ -538,10 +538,10 @@ struct xfs_dir3_free {
+  * xfs_dir3_free_hdr_from_disk/xfs_dir3_free_hdr_to_disk.
+  */
+ struct xfs_dir3_icfree_hdr {
+-	__uint32_t	magic;
+-	__uint32_t	firstdb;
+-	__uint32_t	nvalid;
+-	__uint32_t	nused;
++	uint32_t	magic;
++	uint32_t	firstdb;
++	uint32_t	nvalid;
++	uint32_t	nused;
+ 
+ };
+ 
+@@ -632,10 +632,10 @@ typedef struct xfs_attr_shortform {
+ 		__u8	padding;
+ 	} hdr;
+ 	struct xfs_attr_sf_entry {
+-		__uint8_t namelen;	/* actual length of name (no NULL) */
+-		__uint8_t valuelen;	/* actual length of value (no NULL) */
+-		__uint8_t flags;	/* flags bits (see xfs_attr_leaf.h) */
+-		__uint8_t nameval[1];	/* name & value bytes concatenated */
++		uint8_t namelen;	/* actual length of name (no NULL) */
++		uint8_t valuelen;	/* actual length of value (no NULL) */
++		uint8_t flags;	/* flags bits (see xfs_attr_leaf.h) */
++		uint8_t nameval[1];	/* name & value bytes concatenated */
+ 	} list[1];			/* variable sized array */
+ } xfs_attr_shortform_t;
+ 
+@@ -725,22 +725,22 @@ struct xfs_attr3_leafblock {
+  * incore, neutral version of the attribute leaf header
+  */
+ struct xfs_attr3_icleaf_hdr {
+-	__uint32_t	forw;
+-	__uint32_t	back;
+-	__uint16_t	magic;
+-	__uint16_t	count;
+-	__uint16_t	usedbytes;
++	uint32_t	forw;
++	uint32_t	back;
++	uint16_t	magic;
++	uint16_t	count;
++	uint16_t	usedbytes;
+ 	/*
+ 	 * firstused is 32-bit here instead of 16-bit like the on-disk variant
+ 	 * to support maximum fsb size of 64k without overflow issues throughout
+ 	 * the attr code. Instead, the overflow condition is handled on
+ 	 * conversion to/from disk.
+ 	 */
+-	__uint32_t	firstused;
++	uint32_t	firstused;
+ 	__u8		holes;
+ 	struct {
+-		__uint16_t	base;
+-		__uint16_t	size;
++		uint16_t	base;
++		uint16_t	size;
+ 	} freemap[XFS_ATTR_LEAF_MAPSIZE];
+ };
+ 
+diff --git a/libxfs/xfs_dir2.h b/libxfs/xfs_dir2.h
+index d6e6d9d1..21c8f8bf 100644
+--- a/libxfs/xfs_dir2.h
++++ b/libxfs/xfs_dir2.h
+@@ -47,9 +47,9 @@ struct xfs_dir_ops {
+ 	struct xfs_dir2_sf_entry *
+ 		(*sf_nextentry)(struct xfs_dir2_sf_hdr *hdr,
+ 				struct xfs_dir2_sf_entry *sfep);
+-	__uint8_t (*sf_get_ftype)(struct xfs_dir2_sf_entry *sfep);
++	uint8_t (*sf_get_ftype)(struct xfs_dir2_sf_entry *sfep);
+ 	void	(*sf_put_ftype)(struct xfs_dir2_sf_entry *sfep,
+-				__uint8_t ftype);
++				uint8_t ftype);
+ 	xfs_ino_t (*sf_get_ino)(struct xfs_dir2_sf_hdr *hdr,
+ 				struct xfs_dir2_sf_entry *sfep);
+ 	void	(*sf_put_ino)(struct xfs_dir2_sf_hdr *hdr,
+@@ -60,9 +60,9 @@ struct xfs_dir_ops {
+ 				     xfs_ino_t ino);
+ 
+ 	int	(*data_entsize)(int len);
+-	__uint8_t (*data_get_ftype)(struct xfs_dir2_data_entry *dep);
++	uint8_t (*data_get_ftype)(struct xfs_dir2_data_entry *dep);
+ 	void	(*data_put_ftype)(struct xfs_dir2_data_entry *dep,
+-				__uint8_t ftype);
++				uint8_t ftype);
+ 	__be16 * (*data_entry_tag_p)(struct xfs_dir2_data_entry *dep);
+ 	struct xfs_dir2_data_free *
+ 		(*data_bestfree_p)(struct xfs_dir2_data_hdr *hdr);
+diff --git a/libxfs/xfs_dir2_leaf.c b/libxfs/xfs_dir2_leaf.c
+index f80d91fc..40a35b84 100644
+--- a/libxfs/xfs_dir2_leaf.c
++++ b/libxfs/xfs_dir2_leaf.c
+@@ -142,7 +142,7 @@ xfs_dir3_leaf_check_int(
+ static bool
+ xfs_dir3_leaf_verify(
+ 	struct xfs_buf		*bp,
+-	__uint16_t		magic)
++	uint16_t		magic)
+ {
+ 	struct xfs_mount	*mp = bp->b_target->bt_mount;
+ 	struct xfs_dir2_leaf	*leaf = bp->b_addr;
+@@ -151,7 +151,7 @@ xfs_dir3_leaf_verify(
+ 
+ 	if (xfs_sb_version_hascrc(&mp->m_sb)) {
+ 		struct xfs_dir3_leaf_hdr *leaf3 = bp->b_addr;
+-		__uint16_t		magic3;
++		uint16_t		magic3;
+ 
+ 		magic3 = (magic == XFS_DIR2_LEAF1_MAGIC) ? XFS_DIR3_LEAF1_MAGIC
+ 							 : XFS_DIR3_LEAFN_MAGIC;
+@@ -175,7 +175,7 @@ xfs_dir3_leaf_verify(
+ static void
+ __read_verify(
+ 	struct xfs_buf  *bp,
+-	__uint16_t	magic)
++	uint16_t	magic)
+ {
+ 	struct xfs_mount	*mp = bp->b_target->bt_mount;
+ 
+@@ -192,7 +192,7 @@ __read_verify(
+ static void
+ __write_verify(
+ 	struct xfs_buf  *bp,
+-	__uint16_t	magic)
++	uint16_t	magic)
+ {
+ 	struct xfs_mount	*mp = bp->b_target->bt_mount;
+ 	struct xfs_buf_log_item	*bip = bp->b_fspriv;
+@@ -296,7 +296,7 @@ xfs_dir3_leaf_init(
+ 	struct xfs_trans	*tp,
+ 	struct xfs_buf		*bp,
+ 	xfs_ino_t		owner,
+-	__uint16_t		type)
++	uint16_t		type)
+ {
+ 	struct xfs_dir2_leaf	*leaf = bp->b_addr;
+ 
+@@ -340,7 +340,7 @@ xfs_dir3_leaf_get_buf(
+ 	xfs_da_args_t		*args,
+ 	xfs_dir2_db_t		bno,
+ 	struct xfs_buf		**bpp,
+-	__uint16_t		magic)
++	uint16_t		magic)
+ {
+ 	struct xfs_inode	*dp = args->dp;
+ 	struct xfs_trans	*tp = args->trans;
+diff --git a/libxfs/xfs_dir2_priv.h b/libxfs/xfs_dir2_priv.h
+index 39f8604f..011df4da 100644
+--- a/libxfs/xfs_dir2_priv.h
++++ b/libxfs/xfs_dir2_priv.h
+@@ -69,7 +69,7 @@ extern void xfs_dir3_leaf_compact_x1(struct xfs_dir3_icleaf_hdr *leafhdr,
+ 		struct xfs_dir2_leaf_entry *ents, int *indexp,
+ 		int *lowstalep, int *highstalep, int *lowlogp, int *highlogp);
+ extern int xfs_dir3_leaf_get_buf(struct xfs_da_args *args, xfs_dir2_db_t bno,
+-		struct xfs_buf **bpp, __uint16_t magic);
++		struct xfs_buf **bpp, uint16_t magic);
+ extern void xfs_dir3_leaf_log_ents(struct xfs_da_args *args,
+ 		struct xfs_buf *bp, int first, int last);
+ extern void xfs_dir3_leaf_log_header(struct xfs_da_args *args,
+diff --git a/libxfs/xfs_dir2_sf.c b/libxfs/xfs_dir2_sf.c
+index 195f816d..0c453988 100644
+--- a/libxfs/xfs_dir2_sf.c
++++ b/libxfs/xfs_dir2_sf.c
+@@ -125,7 +125,7 @@ xfs_dir2_block_sfsize(
+ 		 * Calculate the new size, see if we should give up yet.
+ 		 */
+ 		size = xfs_dir2_sf_hdr_size(i8count) +	/* header */
+-		       count * 3 * sizeof(__u8) +	/* namelen + offset */
++		       count * 3 * sizeof(u8) +		/* namelen + offset */
+ 		       namelen +			/* name */
+ 		       (i8count ?			/* inumber */
+ 				count * XFS_INO64_SIZE :
+@@ -645,7 +645,7 @@ xfs_dir2_sf_verify(
+ 	int				offset;
+ 	int				size;
+ 	int				error;
+-	__uint8_t			filetype;
++	uint8_t				filetype;
+ 
+ 	ASSERT(ip->i_d.di_format == XFS_DINODE_FMT_LOCAL);
+ 	/*
+diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h
+index 4c3ed1fd..a53f035f 100644
+--- a/libxfs/xfs_format.h
++++ b/libxfs/xfs_format.h
+@@ -103,8 +103,8 @@ struct xfs_ifork;
+  * Must be padded to 64 bit alignment.
+  */
+ typedef struct xfs_sb {
+-	__uint32_t	sb_magicnum;	/* magic number == XFS_SB_MAGIC */
+-	__uint32_t	sb_blocksize;	/* logical block size, bytes */
++	uint32_t	sb_magicnum;	/* magic number == XFS_SB_MAGIC */
++	uint32_t	sb_blocksize;	/* logical block size, bytes */
+ 	xfs_rfsblock_t	sb_dblocks;	/* number of data blocks */
+ 	xfs_rfsblock_t	sb_rblocks;	/* number of realtime blocks */
+ 	xfs_rtblock_t	sb_rextents;	/* number of realtime extents */
+@@ -118,45 +118,45 @@ typedef struct xfs_sb {
+ 	xfs_agnumber_t	sb_agcount;	/* number of allocation groups */
+ 	xfs_extlen_t	sb_rbmblocks;	/* number of rt bitmap blocks */
+ 	xfs_extlen_t	sb_logblocks;	/* number of log blocks */
+-	__uint16_t	sb_versionnum;	/* header version == XFS_SB_VERSION */
+-	__uint16_t	sb_sectsize;	/* volume sector size, bytes */
+-	__uint16_t	sb_inodesize;	/* inode size, bytes */
+-	__uint16_t	sb_inopblock;	/* inodes per block */
++	uint16_t	sb_versionnum;	/* header version == XFS_SB_VERSION */
++	uint16_t	sb_sectsize;	/* volume sector size, bytes */
++	uint16_t	sb_inodesize;	/* inode size, bytes */
++	uint16_t	sb_inopblock;	/* inodes per block */
+ 	char		sb_fname[12];	/* file system name */
+-	__uint8_t	sb_blocklog;	/* log2 of sb_blocksize */
+-	__uint8_t	sb_sectlog;	/* log2 of sb_sectsize */
+-	__uint8_t	sb_inodelog;	/* log2 of sb_inodesize */
+-	__uint8_t	sb_inopblog;	/* log2 of sb_inopblock */
+-	__uint8_t	sb_agblklog;	/* log2 of sb_agblocks (rounded up) */
+-	__uint8_t	sb_rextslog;	/* log2 of sb_rextents */
+-	__uint8_t	sb_inprogress;	/* mkfs is in progress, don't mount */
+-	__uint8_t	sb_imax_pct;	/* max % of fs for inode space */
++	uint8_t		sb_blocklog;	/* log2 of sb_blocksize */
++	uint8_t		sb_sectlog;	/* log2 of sb_sectsize */
++	uint8_t		sb_inodelog;	/* log2 of sb_inodesize */
++	uint8_t		sb_inopblog;	/* log2 of sb_inopblock */
++	uint8_t		sb_agblklog;	/* log2 of sb_agblocks (rounded up) */
++	uint8_t		sb_rextslog;	/* log2 of sb_rextents */
++	uint8_t		sb_inprogress;	/* mkfs is in progress, don't mount */
++	uint8_t		sb_imax_pct;	/* max % of fs for inode space */
+ 					/* statistics */
+ 	/*
+ 	 * These fields must remain contiguous.  If you really
+ 	 * want to change their layout, make sure you fix the
+ 	 * code in xfs_trans_apply_sb_deltas().
+ 	 */
+-	__uint64_t	sb_icount;	/* allocated inodes */
+-	__uint64_t	sb_ifree;	/* free inodes */
+-	__uint64_t	sb_fdblocks;	/* free data blocks */
+-	__uint64_t	sb_frextents;	/* free realtime extents */
++	uint64_t	sb_icount;	/* allocated inodes */
++	uint64_t	sb_ifree;	/* free inodes */
++	uint64_t	sb_fdblocks;	/* free data blocks */
++	uint64_t	sb_frextents;	/* free realtime extents */
+ 	/*
+ 	 * End contiguous fields.
+ 	 */
+ 	xfs_ino_t	sb_uquotino;	/* user quota inode */
+ 	xfs_ino_t	sb_gquotino;	/* group quota inode */
+-	__uint16_t	sb_qflags;	/* quota flags */
+-	__uint8_t	sb_flags;	/* misc. flags */
+-	__uint8_t	sb_shared_vn;	/* shared version number */
++	uint16_t	sb_qflags;	/* quota flags */
++	uint8_t		sb_flags;	/* misc. flags */
++	uint8_t		sb_shared_vn;	/* shared version number */
+ 	xfs_extlen_t	sb_inoalignmt;	/* inode chunk alignment, fsblocks */
+-	__uint32_t	sb_unit;	/* stripe or raid unit */
+-	__uint32_t	sb_width;	/* stripe or raid width */
+-	__uint8_t	sb_dirblklog;	/* log2 of dir block size (fsbs) */
+-	__uint8_t	sb_logsectlog;	/* log2 of the log sector size */
+-	__uint16_t	sb_logsectsize;	/* sector size for the log, bytes */
+-	__uint32_t	sb_logsunit;	/* stripe unit size for the log */
+-	__uint32_t	sb_features2;	/* additional feature bits */
++	uint32_t	sb_unit;	/* stripe or raid unit */
++	uint32_t	sb_width;	/* stripe or raid width */
++	uint8_t		sb_dirblklog;	/* log2 of dir block size (fsbs) */
++	uint8_t		sb_logsectlog;	/* log2 of the log sector size */
++	uint16_t	sb_logsectsize;	/* sector size for the log, bytes */
++	uint32_t	sb_logsunit;	/* stripe unit size for the log */
++	uint32_t	sb_features2;	/* additional feature bits */
+ 
+ 	/*
+ 	 * bad features2 field as a result of failing to pad the sb structure to
+@@ -167,17 +167,17 @@ typedef struct xfs_sb {
+ 	 * the value in sb_features2 when formatting the incore superblock to
+ 	 * the disk buffer.
+ 	 */
+-	__uint32_t	sb_bad_features2;
++	uint32_t	sb_bad_features2;
+ 
+ 	/* version 5 superblock fields start here */
+ 
+ 	/* feature masks */
+-	__uint32_t	sb_features_compat;
+-	__uint32_t	sb_features_ro_compat;
+-	__uint32_t	sb_features_incompat;
+-	__uint32_t	sb_features_log_incompat;
++	uint32_t	sb_features_compat;
++	uint32_t	sb_features_ro_compat;
++	uint32_t	sb_features_incompat;
++	uint32_t	sb_features_log_incompat;
+ 
+-	__uint32_t	sb_crc;		/* superblock crc */
++	uint32_t	sb_crc;		/* superblock crc */
+ 	xfs_extlen_t	sb_spino_align;	/* sparse inode chunk alignment */
+ 
+ 	xfs_ino_t	sb_pquotino;	/* project quota inode */
+@@ -449,7 +449,7 @@ static inline void xfs_sb_version_addprojid32bit(struct xfs_sb *sbp)
+ static inline bool
+ xfs_sb_has_compat_feature(
+ 	struct xfs_sb	*sbp,
+-	__uint32_t	feature)
++	uint32_t	feature)
+ {
+ 	return (sbp->sb_features_compat & feature) != 0;
+ }
+@@ -465,7 +465,7 @@ xfs_sb_has_compat_feature(
+ static inline bool
+ xfs_sb_has_ro_compat_feature(
+ 	struct xfs_sb	*sbp,
+-	__uint32_t	feature)
++	uint32_t	feature)
+ {
+ 	return (sbp->sb_features_ro_compat & feature) != 0;
+ }
+@@ -482,7 +482,7 @@ xfs_sb_has_ro_compat_feature(
+ static inline bool
+ xfs_sb_has_incompat_feature(
+ 	struct xfs_sb	*sbp,
+-	__uint32_t	feature)
++	uint32_t	feature)
+ {
+ 	return (sbp->sb_features_incompat & feature) != 0;
+ }
+@@ -492,7 +492,7 @@ xfs_sb_has_incompat_feature(
+ static inline bool
+ xfs_sb_has_incompat_log_feature(
+ 	struct xfs_sb	*sbp,
+-	__uint32_t	feature)
++	uint32_t	feature)
+ {
+ 	return (sbp->sb_features_log_incompat & feature) != 0;
+ }
+@@ -594,8 +594,8 @@ xfs_is_quota_inode(struct xfs_sb *sbp, xfs_ino_t ino)
+  */
+ #define XFS_FSB_TO_B(mp,fsbno)	((xfs_fsize_t)(fsbno) << (mp)->m_sb.sb_blocklog)
+ #define XFS_B_TO_FSB(mp,b)	\
+-	((((__uint64_t)(b)) + (mp)->m_blockmask) >> (mp)->m_sb.sb_blocklog)
+-#define XFS_B_TO_FSBT(mp,b)	(((__uint64_t)(b)) >> (mp)->m_sb.sb_blocklog)
++	((((uint64_t)(b)) + (mp)->m_blockmask) >> (mp)->m_sb.sb_blocklog)
++#define XFS_B_TO_FSBT(mp,b)	(((uint64_t)(b)) >> (mp)->m_sb.sb_blocklog)
+ #define XFS_B_FSB_OFFSET(mp,b)	((b) & (mp)->m_blockmask)
+ 
+ /*
+@@ -1072,7 +1072,7 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev)
+  * next agno_log bits - ag number
+  * high agno_log-agblklog-inopblog bits - 0
+  */
+-#define	XFS_INO_MASK(k)			(__uint32_t)((1ULL << (k)) - 1)
++#define	XFS_INO_MASK(k)			(uint32_t)((1ULL << (k)) - 1)
+ #define	XFS_INO_OFFSET_BITS(mp)		(mp)->m_sb.sb_inopblog
+ #define	XFS_INO_AGBNO_BITS(mp)		(mp)->m_sb.sb_agblklog
+ #define	XFS_INO_AGINO_BITS(mp)		(mp)->m_agino_log
+@@ -1269,16 +1269,16 @@ typedef __be32 xfs_alloc_ptr_t;
+ #define	XFS_FIBT_MAGIC		0x46494254	/* 'FIBT' */
+ #define	XFS_FIBT_CRC_MAGIC	0x46494233	/* 'FIB3' */
+ 
+-typedef	__uint64_t	xfs_inofree_t;
++typedef uint64_t	xfs_inofree_t;
+ #define	XFS_INODES_PER_CHUNK		(NBBY * sizeof(xfs_inofree_t))
+ #define	XFS_INODES_PER_CHUNK_LOG	(XFS_NBBYLOG + 3)
+ #define	XFS_INOBT_ALL_FREE		((xfs_inofree_t)-1)
+ #define	XFS_INOBT_MASK(i)		((xfs_inofree_t)1 << (i))
+ 
+ #define XFS_INOBT_HOLEMASK_FULL		0	/* holemask for full chunk */
+-#define XFS_INOBT_HOLEMASK_BITS		(NBBY * sizeof(__uint16_t))
++#define XFS_INOBT_HOLEMASK_BITS		(NBBY * sizeof(uint16_t))
+ #define XFS_INODES_PER_HOLEMASK_BIT	\
+-	(XFS_INODES_PER_CHUNK / (NBBY * sizeof(__uint16_t)))
++	(XFS_INODES_PER_CHUNK / (NBBY * sizeof(uint16_t)))
+ 
+ static inline xfs_inofree_t xfs_inobt_maskn(int i, int n)
+ {
+@@ -1312,9 +1312,9 @@ typedef struct xfs_inobt_rec {
+ 
+ typedef struct xfs_inobt_rec_incore {
+ 	xfs_agino_t	ir_startino;	/* starting inode number */
+-	__uint16_t	ir_holemask;	/* hole mask for sparse chunks */
+-	__uint8_t	ir_count;	/* total inode count */
+-	__uint8_t	ir_freecount;	/* count of free inodes (set bits) */
++	uint16_t	ir_holemask;	/* hole mask for sparse chunks */
++	uint8_t		ir_count;	/* total inode count */
++	uint8_t		ir_freecount;	/* count of free inodes (set bits) */
+ 	xfs_inofree_t	ir_free;	/* free inode mask */
+ } xfs_inobt_rec_incore_t;
+ 
+@@ -1397,15 +1397,15 @@ struct xfs_rmap_rec {
+  *  rm_offset:54-60 aren't used and should be zero
+  *  rm_offset:0-53 is the block offset within the inode
+  */
+-#define XFS_RMAP_OFF_ATTR_FORK	((__uint64_t)1ULL << 63)
+-#define XFS_RMAP_OFF_BMBT_BLOCK	((__uint64_t)1ULL << 62)
+-#define XFS_RMAP_OFF_UNWRITTEN	((__uint64_t)1ULL << 61)
++#define XFS_RMAP_OFF_ATTR_FORK	((uint64_t)1ULL << 63)
++#define XFS_RMAP_OFF_BMBT_BLOCK	((uint64_t)1ULL << 62)
++#define XFS_RMAP_OFF_UNWRITTEN	((uint64_t)1ULL << 61)
+ 
+-#define XFS_RMAP_LEN_MAX	((__uint32_t)~0U)
++#define XFS_RMAP_LEN_MAX	((uint32_t)~0U)
+ #define XFS_RMAP_OFF_FLAGS	(XFS_RMAP_OFF_ATTR_FORK | \
+ 				 XFS_RMAP_OFF_BMBT_BLOCK | \
+ 				 XFS_RMAP_OFF_UNWRITTEN)
+-#define XFS_RMAP_OFF_MASK	((__uint64_t)0x3FFFFFFFFFFFFFULL)
++#define XFS_RMAP_OFF_MASK	((uint64_t)0x3FFFFFFFFFFFFFULL)
+ 
+ #define XFS_RMAP_OFF(off)		((off) & XFS_RMAP_OFF_MASK)
+ 
+@@ -1431,8 +1431,8 @@ struct xfs_rmap_rec {
+ struct xfs_rmap_irec {
+ 	xfs_agblock_t	rm_startblock;	/* extent start block */
+ 	xfs_extlen_t	rm_blockcount;	/* extent length */
+-	__uint64_t	rm_owner;	/* extent owner */
+-	__uint64_t	rm_offset;	/* offset within the owner */
++	uint64_t	rm_owner;	/* extent owner */
++	uint64_t	rm_offset;	/* offset within the owner */
+ 	unsigned int	rm_flags;	/* state flags */
+ };
+ 
+@@ -1544,11 +1544,11 @@ typedef struct xfs_bmbt_rec {
+ 	__be64			l0, l1;
+ } xfs_bmbt_rec_t;
+ 
+-typedef __uint64_t	xfs_bmbt_rec_base_t;	/* use this for casts */
++typedef uint64_t	xfs_bmbt_rec_base_t;	/* use this for casts */
+ typedef xfs_bmbt_rec_t xfs_bmdr_rec_t;
+ 
+ typedef struct xfs_bmbt_rec_host {
+-	__uint64_t		l0, l1;
++	uint64_t		l0, l1;
+ } xfs_bmbt_rec_host_t;
+ 
+ /*
+diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h
+index 99f7f881..8a0c0eec 100644
+--- a/libxfs/xfs_fs.h
++++ b/libxfs/xfs_fs.h
+@@ -323,10 +323,10 @@ typedef struct xfs_bstat {
+  * and using two 16bit values to hold new 32bit projid was choosen
+  * to retain compatibility with "old" filesystems).
+  */
+-static inline __uint32_t
++static inline uint32_t
+ bstat_get_projid(struct xfs_bstat *bs)
+ {
+-	return (__uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
++	return (uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
+ }
+ 
+ /*
+@@ -472,10 +472,10 @@ typedef struct xfs_handle {
+  */
+ typedef struct xfs_swapext
+ {
+-	__int64_t	sx_version;	/* version */
++	int64_t		sx_version;	/* version */
+ #define XFS_SX_VERSION		0
+-	__int64_t	sx_fdtarget;	/* fd of target file */
+-	__int64_t	sx_fdtmp;	/* fd of tmp file */
++	int64_t		sx_fdtarget;	/* fd of target file */
++	int64_t		sx_fdtmp;	/* fd of tmp file */
+ 	xfs_off_t	sx_offset;	/* offset into file */
+ 	xfs_off_t	sx_length;	/* leng from offset */
+ 	char		sx_pad[16];	/* pad space, unused */
+@@ -562,7 +562,7 @@ typedef struct xfs_swapext
+ #define XFS_IOC_ATTRLIST_BY_HANDLE   _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq)
+ #define XFS_IOC_ATTRMULTI_BY_HANDLE  _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq)
+ #define XFS_IOC_FSGEOMETRY	     _IOR ('X', 124, struct xfs_fsop_geom)
+-#define XFS_IOC_GOINGDOWN	     _IOR ('X', 125, __uint32_t)
++#define XFS_IOC_GOINGDOWN	     _IOR ('X', 125, uint32_t)
+ /*	XFS_IOC_GETFSUUID ---------- deprecated 140	 */
+ 
+ /* reflink ioctls; these MUST match the btrfs ioctl definitions */
+diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
+index 55cc4507..8d245184 100644
+--- a/libxfs/xfs_ialloc.c
++++ b/libxfs/xfs_ialloc.c
+@@ -134,9 +134,9 @@ xfs_inobt_get_rec(
+ STATIC int
+ xfs_inobt_insert_rec(
+ 	struct xfs_btree_cur	*cur,
+-	__uint16_t		holemask,
+-	__uint8_t		count,
+-	__int32_t		freecount,
++	uint16_t		holemask,
++	uint8_t			count,
++	int32_t			freecount,
+ 	xfs_inofree_t		free,
+ 	int			*stat)
+ {
+diff --git a/libxfs/xfs_ialloc_btree.c b/libxfs/xfs_ialloc_btree.c
+index 7b4be766..5b281054 100644
+--- a/libxfs/xfs_ialloc_btree.c
++++ b/libxfs/xfs_ialloc_btree.c
+@@ -218,12 +218,12 @@ xfs_finobt_init_ptr_from_cur(
+ 	ptr->s = agi->agi_free_root;
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_inobt_key_diff(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*key)
+ {
+-	return (__int64_t)be32_to_cpu(key->inobt.ir_startino) -
++	return (int64_t)be32_to_cpu(key->inobt.ir_startino) -
+ 			  cur->bc_rec.i.ir_startino;
+ }
+ 
+diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c
+index 2972701d..fcc6fb8e 100644
+--- a/libxfs/xfs_inode_buf.c
++++ b/libxfs/xfs_inode_buf.c
+@@ -442,7 +442,7 @@ xfs_dinode_calc_crc(
+ 	struct xfs_mount	*mp,
+ 	struct xfs_dinode	*dip)
+ {
+-	__uint32_t		crc;
++	uint32_t		crc;
+ 
+ 	if (dip->di_version < 3)
+ 		return;
+diff --git a/libxfs/xfs_inode_buf.h b/libxfs/xfs_inode_buf.h
+index 6848a0af..0827d7de 100644
+--- a/libxfs/xfs_inode_buf.h
++++ b/libxfs/xfs_inode_buf.h
+@@ -28,26 +28,26 @@ struct xfs_dinode;
+  * format specific structures at the appropriate time.
+  */
+ struct xfs_icdinode {
+-	__int8_t	di_version;	/* inode version */
+-	__int8_t	di_format;	/* format of di_c data */
+-	__uint16_t	di_flushiter;	/* incremented on flush */
+-	__uint32_t	di_uid;		/* owner's user id */
+-	__uint32_t	di_gid;		/* owner's group id */
+-	__uint16_t	di_projid_lo;	/* lower part of owner's project id */
+-	__uint16_t	di_projid_hi;	/* higher part of owner's project id */
++	int8_t		di_version;	/* inode version */
++	int8_t		di_format;	/* format of di_c data */
++	uint16_t	di_flushiter;	/* incremented on flush */
++	uint32_t	di_uid;		/* owner's user id */
++	uint32_t	di_gid;		/* owner's group id */
++	uint16_t	di_projid_lo;	/* lower part of owner's project id */
++	uint16_t	di_projid_hi;	/* higher part of owner's project id */
+ 	xfs_fsize_t	di_size;	/* number of bytes in file */
+ 	xfs_rfsblock_t	di_nblocks;	/* # of direct & btree blocks used */
+ 	xfs_extlen_t	di_extsize;	/* basic/minimum extent size for file */
+ 	xfs_extnum_t	di_nextents;	/* number of extents in data fork */
+ 	xfs_aextnum_t	di_anextents;	/* number of extents in attribute fork*/
+-	__uint8_t	di_forkoff;	/* attr fork offs, <<3 for 64b align */
+-	__int8_t	di_aformat;	/* format of attr fork's data */
+-	__uint32_t	di_dmevmask;	/* DMIG event mask */
+-	__uint16_t	di_dmstate;	/* DMIG state info */
+-	__uint16_t	di_flags;	/* random flags, XFS_DIFLAG_... */
++	uint8_t		di_forkoff;	/* attr fork offs, <<3 for 64b align */
++	int8_t		di_aformat;	/* format of attr fork's data */
++	uint32_t	di_dmevmask;	/* DMIG event mask */
++	uint16_t	di_dmstate;	/* DMIG state info */
++	uint16_t	di_flags;	/* random flags, XFS_DIFLAG_... */
+ 
+-	__uint64_t	di_flags2;	/* more random flags */
+-	__uint32_t	di_cowextsize;	/* basic cow extent size for file */
++	uint64_t	di_flags2;	/* more random flags */
++	uint32_t	di_cowextsize;	/* basic cow extent size for file */
+ 
+ 	xfs_ictimestamp_t di_crtime;	/* time created */
+ };
+diff --git a/libxfs/xfs_log_format.h b/libxfs/xfs_log_format.h
+index 7ae571f8..8372e9bc 100644
+--- a/libxfs/xfs_log_format.h
++++ b/libxfs/xfs_log_format.h
+@@ -31,7 +31,7 @@ struct xfs_trans_res;
+  * through all the log items definitions and everything they encode into the
+  * log.
+  */
+-typedef __uint32_t xlog_tid_t;
++typedef uint32_t xlog_tid_t;
+ 
+ #define XLOG_MIN_ICLOGS		2
+ #define XLOG_MAX_ICLOGS		8
+@@ -211,7 +211,7 @@ typedef struct xfs_log_iovec {
+ typedef struct xfs_trans_header {
+ 	uint		th_magic;		/* magic number */
+ 	uint		th_type;		/* transaction type */
+-	__int32_t	th_tid;			/* transaction id (unused) */
++	int32_t		th_tid;			/* transaction id (unused) */
+ 	uint		th_num_items;		/* num items logged by trans */
+ } xfs_trans_header_t;
+ 
+@@ -265,52 +265,52 @@ typedef struct xfs_trans_header {
+  * must be added on to the end.
+  */
+ typedef struct xfs_inode_log_format {
+-	__uint16_t		ilf_type;	/* inode log item type */
+-	__uint16_t		ilf_size;	/* size of this item */
+-	__uint32_t		ilf_fields;	/* flags for fields logged */
+-	__uint16_t		ilf_asize;	/* size of attr d/ext/root */
+-	__uint16_t		ilf_dsize;	/* size of data/ext/root */
+-	__uint64_t		ilf_ino;	/* inode number */
++	uint16_t		ilf_type;	/* inode log item type */
++	uint16_t		ilf_size;	/* size of this item */
++	uint32_t		ilf_fields;	/* flags for fields logged */
++	uint16_t		ilf_asize;	/* size of attr d/ext/root */
++	uint16_t		ilf_dsize;	/* size of data/ext/root */
++	uint64_t		ilf_ino;	/* inode number */
+ 	union {
+-		__uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
++		uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
+ 		uuid_t		ilfu_uuid;	/* mount point value */
+ 	} ilf_u;
+-	__int64_t		ilf_blkno;	/* blkno of inode buffer */
+-	__int32_t		ilf_len;	/* len of inode buffer */
+-	__int32_t		ilf_boffset;	/* off of inode in buffer */
++	int64_t			ilf_blkno;	/* blkno of inode buffer */
++	int32_t			ilf_len;	/* len of inode buffer */
++	int32_t			ilf_boffset;	/* off of inode in buffer */
+ } xfs_inode_log_format_t;
+ 
+ typedef struct xfs_inode_log_format_32 {
+-	__uint16_t		ilf_type;	/* inode log item type */
+-	__uint16_t		ilf_size;	/* size of this item */
+-	__uint32_t		ilf_fields;	/* flags for fields logged */
+-	__uint16_t		ilf_asize;	/* size of attr d/ext/root */
+-	__uint16_t		ilf_dsize;	/* size of data/ext/root */
+-	__uint64_t		ilf_ino;	/* inode number */
++	uint16_t		ilf_type;	/* inode log item type */
++	uint16_t		ilf_size;	/* size of this item */
++	uint32_t		ilf_fields;	/* flags for fields logged */
++	uint16_t		ilf_asize;	/* size of attr d/ext/root */
++	uint16_t		ilf_dsize;	/* size of data/ext/root */
++	uint64_t		ilf_ino;	/* inode number */
+ 	union {
+-		__uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
++		uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
+ 		uuid_t		ilfu_uuid;	/* mount point value */
+ 	} ilf_u;
+-	__int64_t		ilf_blkno;	/* blkno of inode buffer */
+-	__int32_t		ilf_len;	/* len of inode buffer */
+-	__int32_t		ilf_boffset;	/* off of inode in buffer */
++	int64_t			ilf_blkno;	/* blkno of inode buffer */
++	int32_t			ilf_len;	/* len of inode buffer */
++	int32_t			ilf_boffset;	/* off of inode in buffer */
+ } __attribute__((packed)) xfs_inode_log_format_32_t;
+ 
+ typedef struct xfs_inode_log_format_64 {
+-	__uint16_t		ilf_type;	/* inode log item type */
+-	__uint16_t		ilf_size;	/* size of this item */
+-	__uint32_t		ilf_fields;	/* flags for fields logged */
+-	__uint16_t		ilf_asize;	/* size of attr d/ext/root */
+-	__uint16_t		ilf_dsize;	/* size of data/ext/root */
+-	__uint32_t		ilf_pad;	/* pad for 64 bit boundary */
+-	__uint64_t		ilf_ino;	/* inode number */
++	uint16_t		ilf_type;	/* inode log item type */
++	uint16_t		ilf_size;	/* size of this item */
++	uint32_t		ilf_fields;	/* flags for fields logged */
++	uint16_t		ilf_asize;	/* size of attr d/ext/root */
++	uint16_t		ilf_dsize;	/* size of data/ext/root */
++	uint32_t		ilf_pad;	/* pad for 64 bit boundary */
++	uint64_t		ilf_ino;	/* inode number */
+ 	union {
+-		__uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
++		uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
+ 		uuid_t		ilfu_uuid;	/* mount point value */
+ 	} ilf_u;
+-	__int64_t		ilf_blkno;	/* blkno of inode buffer */
+-	__int32_t		ilf_len;	/* len of inode buffer */
+-	__int32_t		ilf_boffset;	/* off of inode in buffer */
++	int64_t			ilf_blkno;	/* blkno of inode buffer */
++	int32_t			ilf_len;	/* len of inode buffer */
++	int32_t			ilf_boffset;	/* off of inode in buffer */
+ } xfs_inode_log_format_64_t;
+ 
+ 
+@@ -379,8 +379,8 @@ static inline int xfs_ilog_fdata(int w)
+  * information.
+  */
+ typedef struct xfs_ictimestamp {
+-	__int32_t	t_sec;		/* timestamp seconds */
+-	__int32_t	t_nsec;		/* timestamp nanoseconds */
++	int32_t		t_sec;		/* timestamp seconds */
++	int32_t		t_nsec;		/* timestamp nanoseconds */
+ } xfs_ictimestamp_t;
+ 
+ /*
+@@ -388,18 +388,18 @@ typedef struct xfs_ictimestamp {
+  * kept identical to struct xfs_dinode except for the endianness annotations.
+  */
+ struct xfs_log_dinode {
+-	__uint16_t	di_magic;	/* inode magic # = XFS_DINODE_MAGIC */
+-	__uint16_t	di_mode;	/* mode and type of file */
+-	__int8_t	di_version;	/* inode version */
+-	__int8_t	di_format;	/* format of di_c data */
+-	__uint8_t	di_pad3[2];	/* unused in v2/3 inodes */
+-	__uint32_t	di_uid;		/* owner's user id */
+-	__uint32_t	di_gid;		/* owner's group id */
+-	__uint32_t	di_nlink;	/* number of links to file */
+-	__uint16_t	di_projid_lo;	/* lower part of owner's project id */
+-	__uint16_t	di_projid_hi;	/* higher part of owner's project id */
+-	__uint8_t	di_pad[6];	/* unused, zeroed space */
+-	__uint16_t	di_flushiter;	/* incremented on flush */
++	uint16_t	di_magic;	/* inode magic # = XFS_DINODE_MAGIC */
++	uint16_t	di_mode;	/* mode and type of file */
++	int8_t		di_version;	/* inode version */
++	int8_t		di_format;	/* format of di_c data */
++	uint8_t		di_pad3[2];	/* unused in v2/3 inodes */
++	uint32_t	di_uid;		/* owner's user id */
++	uint32_t	di_gid;		/* owner's group id */
++	uint32_t	di_nlink;	/* number of links to file */
++	uint16_t	di_projid_lo;	/* lower part of owner's project id */
++	uint16_t	di_projid_hi;	/* higher part of owner's project id */
++	uint8_t		di_pad[6];	/* unused, zeroed space */
++	uint16_t	di_flushiter;	/* incremented on flush */
+ 	xfs_ictimestamp_t di_atime;	/* time last accessed */
+ 	xfs_ictimestamp_t di_mtime;	/* time last modified */
+ 	xfs_ictimestamp_t di_ctime;	/* time created/inode modified */
+@@ -408,23 +408,23 @@ struct xfs_log_dinode {
+ 	xfs_extlen_t	di_extsize;	/* basic/minimum extent size for file */
+ 	xfs_extnum_t	di_nextents;	/* number of extents in data fork */
+ 	xfs_aextnum_t	di_anextents;	/* number of extents in attribute fork*/
+-	__uint8_t	di_forkoff;	/* attr fork offs, <<3 for 64b align */
+-	__int8_t	di_aformat;	/* format of attr fork's data */
+-	__uint32_t	di_dmevmask;	/* DMIG event mask */
+-	__uint16_t	di_dmstate;	/* DMIG state info */
+-	__uint16_t	di_flags;	/* random flags, XFS_DIFLAG_... */
+-	__uint32_t	di_gen;		/* generation number */
++	uint8_t		di_forkoff;	/* attr fork offs, <<3 for 64b align */
++	int8_t		di_aformat;	/* format of attr fork's data */
++	uint32_t	di_dmevmask;	/* DMIG event mask */
++	uint16_t	di_dmstate;	/* DMIG state info */
++	uint16_t	di_flags;	/* random flags, XFS_DIFLAG_... */
++	uint32_t	di_gen;		/* generation number */
+ 
+ 	/* di_next_unlinked is the only non-core field in the old dinode */
+ 	xfs_agino_t	di_next_unlinked;/* agi unlinked list ptr */
+ 
+ 	/* start of the extended dinode, writable fields */
+-	__uint32_t	di_crc;		/* CRC of the inode */
+-	__uint64_t	di_changecount;	/* number of attribute changes */
++	uint32_t	di_crc;		/* CRC of the inode */
++	uint64_t	di_changecount;	/* number of attribute changes */
+ 	xfs_lsn_t	di_lsn;		/* flush sequence */
+-	__uint64_t	di_flags2;	/* more random flags */
+-	__uint32_t	di_cowextsize;	/* basic cow extent size for file */
+-	__uint8_t	di_pad2[12];	/* more padding for future expansion */
++	uint64_t	di_flags2;	/* more random flags */
++	uint32_t	di_cowextsize;	/* basic cow extent size for file */
++	uint8_t		di_pad2[12];	/* more padding for future expansion */
+ 
+ 	/* fields only written to during inode creation */
+ 	xfs_ictimestamp_t di_crtime;	/* time created */
+@@ -483,7 +483,7 @@ typedef struct xfs_buf_log_format {
+ 	unsigned short	blf_size;	/* size of this item */
+ 	unsigned short	blf_flags;	/* misc state */
+ 	unsigned short	blf_len;	/* number of blocks in this buf */
+-	__int64_t	blf_blkno;	/* starting blkno of this buf */
++	int64_t		blf_blkno;	/* starting blkno of this buf */
+ 	unsigned int	blf_map_size;	/* used size of data bitmap in words */
+ 	unsigned int	blf_data_map[XFS_BLF_DATAMAP_SIZE]; /* dirty bitmap */
+ } xfs_buf_log_format_t;
+@@ -533,7 +533,7 @@ xfs_blft_to_flags(struct xfs_buf_log_format *blf, enum xfs_blft type)
+ 	blf->blf_flags |= ((type << XFS_BLFT_SHIFT) & XFS_BLFT_MASK);
+ }
+ 
+-static inline __uint16_t
++static inline uint16_t
+ xfs_blft_from_flags(struct xfs_buf_log_format *blf)
+ {
+ 	return (blf->blf_flags & XFS_BLFT_MASK) >> XFS_BLFT_SHIFT;
+@@ -554,14 +554,14 @@ typedef struct xfs_extent {
+  * conversion routine.
+  */
+ typedef struct xfs_extent_32 {
+-	__uint64_t	ext_start;
+-	__uint32_t	ext_len;
++	uint64_t	ext_start;
++	uint32_t	ext_len;
+ } __attribute__((packed)) xfs_extent_32_t;
+ 
+ typedef struct xfs_extent_64 {
+-	__uint64_t	ext_start;
+-	__uint32_t	ext_len;
+-	__uint32_t	ext_pad;
++	uint64_t	ext_start;
++	uint32_t	ext_len;
++	uint32_t	ext_pad;
+ } xfs_extent_64_t;
+ 
+ /*
+@@ -570,26 +570,26 @@ typedef struct xfs_extent_64 {
+  * size is given by efi_nextents.
+  */
+ typedef struct xfs_efi_log_format {
+-	__uint16_t		efi_type;	/* efi log item type */
+-	__uint16_t		efi_size;	/* size of this item */
+-	__uint32_t		efi_nextents;	/* # extents to free */
+-	__uint64_t		efi_id;		/* efi identifier */
++	uint16_t		efi_type;	/* efi log item type */
++	uint16_t		efi_size;	/* size of this item */
++	uint32_t		efi_nextents;	/* # extents to free */
++	uint64_t		efi_id;		/* efi identifier */
+ 	xfs_extent_t		efi_extents[1];	/* array of extents to free */
+ } xfs_efi_log_format_t;
+ 
+ typedef struct xfs_efi_log_format_32 {
+-	__uint16_t		efi_type;	/* efi log item type */
+-	__uint16_t		efi_size;	/* size of this item */
+-	__uint32_t		efi_nextents;	/* # extents to free */
+-	__uint64_t		efi_id;		/* efi identifier */
++	uint16_t		efi_type;	/* efi log item type */
++	uint16_t		efi_size;	/* size of this item */
++	uint32_t		efi_nextents;	/* # extents to free */
++	uint64_t		efi_id;		/* efi identifier */
+ 	xfs_extent_32_t		efi_extents[1];	/* array of extents to free */
+ } __attribute__((packed)) xfs_efi_log_format_32_t;
+ 
+ typedef struct xfs_efi_log_format_64 {
+-	__uint16_t		efi_type;	/* efi log item type */
+-	__uint16_t		efi_size;	/* size of this item */
+-	__uint32_t		efi_nextents;	/* # extents to free */
+-	__uint64_t		efi_id;		/* efi identifier */
++	uint16_t		efi_type;	/* efi log item type */
++	uint16_t		efi_size;	/* size of this item */
++	uint32_t		efi_nextents;	/* # extents to free */
++	uint64_t		efi_id;		/* efi identifier */
+ 	xfs_extent_64_t		efi_extents[1];	/* array of extents to free */
+ } xfs_efi_log_format_64_t;
+ 
+@@ -599,26 +599,26 @@ typedef struct xfs_efi_log_format_64 {
+  * size is given by efd_nextents;
+  */
+ typedef struct xfs_efd_log_format {
+-	__uint16_t		efd_type;	/* efd log item type */
+-	__uint16_t		efd_size;	/* size of this item */
+-	__uint32_t		efd_nextents;	/* # of extents freed */
+-	__uint64_t		efd_efi_id;	/* id of corresponding efi */
++	uint16_t		efd_type;	/* efd log item type */
++	uint16_t		efd_size;	/* size of this item */
++	uint32_t		efd_nextents;	/* # of extents freed */
++	uint64_t		efd_efi_id;	/* id of corresponding efi */
+ 	xfs_extent_t		efd_extents[1];	/* array of extents freed */
+ } xfs_efd_log_format_t;
+ 
+ typedef struct xfs_efd_log_format_32 {
+-	__uint16_t		efd_type;	/* efd log item type */
+-	__uint16_t		efd_size;	/* size of this item */
+-	__uint32_t		efd_nextents;	/* # of extents freed */
+-	__uint64_t		efd_efi_id;	/* id of corresponding efi */
++	uint16_t		efd_type;	/* efd log item type */
++	uint16_t		efd_size;	/* size of this item */
++	uint32_t		efd_nextents;	/* # of extents freed */
++	uint64_t		efd_efi_id;	/* id of corresponding efi */
+ 	xfs_extent_32_t		efd_extents[1];	/* array of extents freed */
+ } __attribute__((packed)) xfs_efd_log_format_32_t;
+ 
+ typedef struct xfs_efd_log_format_64 {
+-	__uint16_t		efd_type;	/* efd log item type */
+-	__uint16_t		efd_size;	/* size of this item */
+-	__uint32_t		efd_nextents;	/* # of extents freed */
+-	__uint64_t		efd_efi_id;	/* id of corresponding efi */
++	uint16_t		efd_type;	/* efd log item type */
++	uint16_t		efd_size;	/* size of this item */
++	uint32_t		efd_nextents;	/* # of extents freed */
++	uint64_t		efd_efi_id;	/* id of corresponding efi */
+ 	xfs_extent_64_t		efd_extents[1];	/* array of extents freed */
+ } xfs_efd_log_format_64_t;
+ 
+@@ -626,11 +626,11 @@ typedef struct xfs_efd_log_format_64 {
+  * RUI/RUD (reverse mapping) log format definitions
+  */
+ struct xfs_map_extent {
+-	__uint64_t		me_owner;
+-	__uint64_t		me_startblock;
+-	__uint64_t		me_startoff;
+-	__uint32_t		me_len;
+-	__uint32_t		me_flags;
++	uint64_t		me_owner;
++	uint64_t		me_startblock;
++	uint64_t		me_startoff;
++	uint32_t		me_len;
++	uint32_t		me_flags;
+ };
+ 
+ /* rmap me_flags: upper bits are flags, lower byte is type code */
+@@ -659,10 +659,10 @@ struct xfs_map_extent {
+  * size is given by rui_nextents.
+  */
+ struct xfs_rui_log_format {
+-	__uint16_t		rui_type;	/* rui log item type */
+-	__uint16_t		rui_size;	/* size of this item */
+-	__uint32_t		rui_nextents;	/* # extents to free */
+-	__uint64_t		rui_id;		/* rui identifier */
++	uint16_t		rui_type;	/* rui log item type */
++	uint16_t		rui_size;	/* size of this item */
++	uint32_t		rui_nextents;	/* # extents to free */
++	uint64_t		rui_id;		/* rui identifier */
+ 	struct xfs_map_extent	rui_extents[];	/* array of extents to rmap */
+ };
+ 
+@@ -680,19 +680,19 @@ xfs_rui_log_format_sizeof(
+  * size is given by rud_nextents;
+  */
+ struct xfs_rud_log_format {
+-	__uint16_t		rud_type;	/* rud log item type */
+-	__uint16_t		rud_size;	/* size of this item */
+-	__uint32_t		__pad;
+-	__uint64_t		rud_rui_id;	/* id of corresponding rui */
++	uint16_t		rud_type;	/* rud log item type */
++	uint16_t		rud_size;	/* size of this item */
++	uint32_t		__pad;
++	uint64_t		rud_rui_id;	/* id of corresponding rui */
+ };
+ 
+ /*
+  * CUI/CUD (refcount update) log format definitions
+  */
+ struct xfs_phys_extent {
+-	__uint64_t		pe_startblock;
+-	__uint32_t		pe_len;
+-	__uint32_t		pe_flags;
++	uint64_t		pe_startblock;
++	uint32_t		pe_len;
++	uint32_t		pe_flags;
+ };
+ 
+ /* refcount pe_flags: upper bits are flags, lower byte is type code */
+@@ -707,10 +707,10 @@ struct xfs_phys_extent {
+  * size is given by cui_nextents.
+  */
+ struct xfs_cui_log_format {
+-	__uint16_t		cui_type;	/* cui log item type */
+-	__uint16_t		cui_size;	/* size of this item */
+-	__uint32_t		cui_nextents;	/* # extents to free */
+-	__uint64_t		cui_id;		/* cui identifier */
++	uint16_t		cui_type;	/* cui log item type */
++	uint16_t		cui_size;	/* size of this item */
++	uint32_t		cui_nextents;	/* # extents to free */
++	uint64_t		cui_id;		/* cui identifier */
+ 	struct xfs_phys_extent	cui_extents[];	/* array of extents */
+ };
+ 
+@@ -728,10 +728,10 @@ xfs_cui_log_format_sizeof(
+  * size is given by cud_nextents;
+  */
+ struct xfs_cud_log_format {
+-	__uint16_t		cud_type;	/* cud log item type */
+-	__uint16_t		cud_size;	/* size of this item */
+-	__uint32_t		__pad;
+-	__uint64_t		cud_cui_id;	/* id of corresponding cui */
++	uint16_t		cud_type;	/* cud log item type */
++	uint16_t		cud_size;	/* size of this item */
++	uint32_t		__pad;
++	uint64_t		cud_cui_id;	/* id of corresponding cui */
+ };
+ 
+ /*
+@@ -755,10 +755,10 @@ struct xfs_cud_log_format {
+  * size is given by bui_nextents.
+  */
+ struct xfs_bui_log_format {
+-	__uint16_t		bui_type;	/* bui log item type */
+-	__uint16_t		bui_size;	/* size of this item */
+-	__uint32_t		bui_nextents;	/* # extents to free */
+-	__uint64_t		bui_id;		/* bui identifier */
++	uint16_t		bui_type;	/* bui log item type */
++	uint16_t		bui_size;	/* size of this item */
++	uint32_t		bui_nextents;	/* # extents to free */
++	uint64_t		bui_id;		/* bui identifier */
+ 	struct xfs_map_extent	bui_extents[];	/* array of extents to bmap */
+ };
+ 
+@@ -776,10 +776,10 @@ xfs_bui_log_format_sizeof(
+  * size is given by bud_nextents;
+  */
+ struct xfs_bud_log_format {
+-	__uint16_t		bud_type;	/* bud log item type */
+-	__uint16_t		bud_size;	/* size of this item */
+-	__uint32_t		__pad;
+-	__uint64_t		bud_bui_id;	/* id of corresponding bui */
++	uint16_t		bud_type;	/* bud log item type */
++	uint16_t		bud_size;	/* size of this item */
++	uint32_t		__pad;
++	uint64_t		bud_bui_id;	/* id of corresponding bui */
+ };
+ 
+ /*
+@@ -789,12 +789,12 @@ struct xfs_bud_log_format {
+  * 32 bits : log_recovery code assumes that.
+  */
+ typedef struct xfs_dq_logformat {
+-	__uint16_t		qlf_type;      /* dquot log item type */
+-	__uint16_t		qlf_size;      /* size of this item */
++	uint16_t		qlf_type;      /* dquot log item type */
++	uint16_t		qlf_size;      /* size of this item */
+ 	xfs_dqid_t		qlf_id;	       /* usr/grp/proj id : 32 bits */
+-	__int64_t		qlf_blkno;     /* blkno of dquot buffer */
+-	__int32_t		qlf_len;       /* len of dquot buffer */
+-	__uint32_t		qlf_boffset;   /* off of dquot in buffer */
++	int64_t			qlf_blkno;     /* blkno of dquot buffer */
++	int32_t			qlf_len;       /* len of dquot buffer */
++	uint32_t		qlf_boffset;   /* off of dquot in buffer */
+ } xfs_dq_logformat_t;
+ 
+ /*
+@@ -853,8 +853,8 @@ typedef struct xfs_qoff_logformat {
+  * decoding can be done correctly.
+  */
+ struct xfs_icreate_log {
+-	__uint16_t	icl_type;	/* type of log format structure */
+-	__uint16_t	icl_size;	/* size of log format structure */
++	uint16_t	icl_type;	/* type of log format structure */
++	uint16_t	icl_size;	/* size of log format structure */
+ 	__be32		icl_ag;		/* ag being allocated in */
+ 	__be32		icl_agbno;	/* start block of inode range */
+ 	__be32		icl_count;	/* number of inodes to initialise */
+diff --git a/libxfs/xfs_quota_defs.h b/libxfs/xfs_quota_defs.h
+index 8eed5127..d69c7722 100644
+--- a/libxfs/xfs_quota_defs.h
++++ b/libxfs/xfs_quota_defs.h
+@@ -27,8 +27,8 @@
+  * they may need 64-bit accounting. Hence, 64-bit quota-counters,
+  * and quota-limits. This is a waste in the common case, but hey ...
+  */
+-typedef __uint64_t	xfs_qcnt_t;
+-typedef __uint16_t	xfs_qwarncnt_t;
++typedef uint64_t	xfs_qcnt_t;
++typedef uint16_t	xfs_qwarncnt_t;
+ 
+ /*
+  * flags for q_flags field in the dquot.
+diff --git a/libxfs/xfs_refcount_btree.c b/libxfs/xfs_refcount_btree.c
+index 2814f94f..bd1a8f2d 100644
+--- a/libxfs/xfs_refcount_btree.c
++++ b/libxfs/xfs_refcount_btree.c
+@@ -201,7 +201,7 @@ xfs_refcountbt_init_ptr_from_cur(
+ 	ptr->s = agf->agf_refcount_root;
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_refcountbt_key_diff(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*key)
+@@ -209,16 +209,16 @@ xfs_refcountbt_key_diff(
+ 	struct xfs_refcount_irec	*rec = &cur->bc_rec.rc;
+ 	struct xfs_refcount_key		*kp = &key->refc;
+ 
+-	return (__int64_t)be32_to_cpu(kp->rc_startblock) - rec->rc_startblock;
++	return (int64_t)be32_to_cpu(kp->rc_startblock) - rec->rc_startblock;
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_refcountbt_diff_two_keys(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*k1,
+ 	union xfs_btree_key	*k2)
+ {
+-	return (__int64_t)be32_to_cpu(k1->refc.rc_startblock) -
++	return (int64_t)be32_to_cpu(k1->refc.rc_startblock) -
+ 			  be32_to_cpu(k2->refc.rc_startblock);
+ }
+ 
+diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c
+index f78771d1..0d6b5d41 100644
+--- a/libxfs/xfs_rmap.c
++++ b/libxfs/xfs_rmap.c
+@@ -2059,7 +2059,7 @@ int
+ xfs_rmap_finish_one(
+ 	struct xfs_trans		*tp,
+ 	enum xfs_rmap_intent_type	type,
+-	__uint64_t			owner,
++	uint64_t			owner,
+ 	int				whichfork,
+ 	xfs_fileoff_t			startoff,
+ 	xfs_fsblock_t			startblock,
+@@ -2180,7 +2180,7 @@ __xfs_rmap_add(
+ 	struct xfs_mount		*mp,
+ 	struct xfs_defer_ops		*dfops,
+ 	enum xfs_rmap_intent_type	type,
+-	__uint64_t			owner,
++	uint64_t			owner,
+ 	int				whichfork,
+ 	struct xfs_bmbt_irec		*bmap)
+ {
+@@ -2264,7 +2264,7 @@ xfs_rmap_alloc_extent(
+ 	xfs_agnumber_t		agno,
+ 	xfs_agblock_t		bno,
+ 	xfs_extlen_t		len,
+-	__uint64_t		owner)
++	uint64_t		owner)
+ {
+ 	struct xfs_bmbt_irec	bmap;
+ 
+@@ -2288,7 +2288,7 @@ xfs_rmap_free_extent(
+ 	xfs_agnumber_t		agno,
+ 	xfs_agblock_t		bno,
+ 	xfs_extlen_t		len,
+-	__uint64_t		owner)
++	uint64_t		owner)
+ {
+ 	struct xfs_bmbt_irec	bmap;
+ 
+diff --git a/libxfs/xfs_rmap.h b/libxfs/xfs_rmap.h
+index 98f908fe..265116d0 100644
+--- a/libxfs/xfs_rmap.h
++++ b/libxfs/xfs_rmap.h
+@@ -179,7 +179,7 @@ enum xfs_rmap_intent_type {
+ struct xfs_rmap_intent {
+ 	struct list_head			ri_list;
+ 	enum xfs_rmap_intent_type		ri_type;
+-	__uint64_t				ri_owner;
++	uint64_t				ri_owner;
+ 	int					ri_whichfork;
+ 	struct xfs_bmbt_irec			ri_bmap;
+ };
+@@ -196,15 +196,15 @@ int xfs_rmap_convert_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
+ 		struct xfs_bmbt_irec *imap);
+ int xfs_rmap_alloc_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
+ 		xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
+-		__uint64_t owner);
++		uint64_t owner);
+ int xfs_rmap_free_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
+ 		xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
+-		__uint64_t owner);
++		uint64_t owner);
+ 
+ void xfs_rmap_finish_one_cleanup(struct xfs_trans *tp,
+ 		struct xfs_btree_cur *rcur, int error);
+ int xfs_rmap_finish_one(struct xfs_trans *tp, enum xfs_rmap_intent_type type,
+-		__uint64_t owner, int whichfork, xfs_fileoff_t startoff,
++		uint64_t owner, int whichfork, xfs_fileoff_t startoff,
+ 		xfs_fsblock_t startblock, xfs_filblks_t blockcount,
+ 		xfs_exntst_t state, struct xfs_btree_cur **pcur);
+ 
+diff --git a/libxfs/xfs_rmap_btree.c b/libxfs/xfs_rmap_btree.c
+index a186c872..45ac436f 100644
+--- a/libxfs/xfs_rmap_btree.c
++++ b/libxfs/xfs_rmap_btree.c
+@@ -197,7 +197,7 @@ xfs_rmapbt_init_high_key_from_rec(
+ 	union xfs_btree_key	*key,
+ 	union xfs_btree_rec	*rec)
+ {
+-	__uint64_t		off;
++	uint64_t		off;
+ 	int			adj;
+ 
+ 	adj = be32_to_cpu(rec->rmap.rm_blockcount) - 1;
+@@ -239,7 +239,7 @@ xfs_rmapbt_init_ptr_from_cur(
+ 	ptr->s = agf->agf_roots[cur->bc_btnum];
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_rmapbt_key_diff(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*key)
+@@ -247,9 +247,9 @@ xfs_rmapbt_key_diff(
+ 	struct xfs_rmap_irec	*rec = &cur->bc_rec.r;
+ 	struct xfs_rmap_key	*kp = &key->rmap;
+ 	__u64			x, y;
+-	__int64_t		d;
++	int64_t			d;
+ 
+-	d = (__int64_t)be32_to_cpu(kp->rm_startblock) - rec->rm_startblock;
++	d = (int64_t)be32_to_cpu(kp->rm_startblock) - rec->rm_startblock;
+ 	if (d)
+ 		return d;
+ 
+@@ -269,7 +269,7 @@ xfs_rmapbt_key_diff(
+ 	return 0;
+ }
+ 
+-STATIC __int64_t
++STATIC int64_t
+ xfs_rmapbt_diff_two_keys(
+ 	struct xfs_btree_cur	*cur,
+ 	union xfs_btree_key	*k1,
+@@ -277,10 +277,10 @@ xfs_rmapbt_diff_two_keys(
+ {
+ 	struct xfs_rmap_key	*kp1 = &k1->rmap;
+ 	struct xfs_rmap_key	*kp2 = &k2->rmap;
+-	__int64_t		d;
++	int64_t			d;
+ 	__u64			x, y;
+ 
+-	d = (__int64_t)be32_to_cpu(kp1->rm_startblock) -
++	d = (int64_t)be32_to_cpu(kp1->rm_startblock) -
+ 		       be32_to_cpu(kp2->rm_startblock);
+ 	if (d)
+ 		return d;
+@@ -382,10 +382,10 @@ xfs_rmapbt_keys_inorder(
+ 	union xfs_btree_key	*k1,
+ 	union xfs_btree_key	*k2)
+ {
+-	__uint32_t		x;
+-	__uint32_t		y;
+-	__uint64_t		a;
+-	__uint64_t		b;
++	uint32_t		x;
++	uint32_t		y;
++	uint64_t		a;
++	uint64_t		b;
+ 
+ 	x = be32_to_cpu(k1->rmap.rm_startblock);
+ 	y = be32_to_cpu(k2->rmap.rm_startblock);
+@@ -412,10 +412,10 @@ xfs_rmapbt_recs_inorder(
+ 	union xfs_btree_rec	*r1,
+ 	union xfs_btree_rec	*r2)
+ {
+-	__uint32_t		x;
+-	__uint32_t		y;
+-	__uint64_t		a;
+-	__uint64_t		b;
++	uint32_t		x;
++	uint32_t		y;
++	uint64_t		a;
++	uint64_t		b;
+ 
+ 	x = be32_to_cpu(r1->rmap.rm_startblock);
+ 	y = be32_to_cpu(r2->rmap.rm_startblock);
+diff --git a/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c
+index dbd2f881..8f8a99d6 100644
+--- a/libxfs/xfs_rtbitmap.c
++++ b/libxfs/xfs_rtbitmap.c
+@@ -1006,7 +1006,7 @@ xfs_rtfree_extent(
+ 	    mp->m_sb.sb_rextents) {
+ 		if (!(mp->m_rbmip->i_d.di_flags & XFS_DIFLAG_NEWRTBM))
+ 			mp->m_rbmip->i_d.di_flags |= XFS_DIFLAG_NEWRTBM;
+-		*(__uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;
++		*(uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;
+ 		xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);
+ 	}
+ 	return 0;
+diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c
+index 93a18190..51f69704 100644
+--- a/libxfs/xfs_sb.c
++++ b/libxfs/xfs_sb.c
+@@ -430,7 +430,7 @@ xfs_sb_quota_to_disk(
+ 	struct xfs_dsb	*to,
+ 	struct xfs_sb	*from)
+ {
+-	__uint16_t	qflags = from->sb_qflags;
++	uint16_t	qflags = from->sb_qflags;
+ 
+ 	to->sb_uquotino = cpu_to_be64(from->sb_uquotino);
+ 	if (xfs_sb_version_has_pquotino(from)) {
+@@ -738,7 +738,7 @@ xfs_sb_mount_common(
+ 	mp->m_refc_mnr[1] = mp->m_refc_mxr[1] / 2;
+ 
+ 	mp->m_bsize = XFS_FSB_TO_BB(mp, 1);
+-	mp->m_ialloc_inos = (int)MAX((__uint16_t)XFS_INODES_PER_CHUNK,
++	mp->m_ialloc_inos = (int)MAX((uint16_t)XFS_INODES_PER_CHUNK,
+ 					sbp->sb_inopblock);
+ 	mp->m_ialloc_blks = mp->m_ialloc_inos >> sbp->sb_inopblog;
+ 
+diff --git a/libxfs/xfs_types.h b/libxfs/xfs_types.h
+index 717909f2..0220159b 100644
+--- a/libxfs/xfs_types.h
++++ b/libxfs/xfs_types.h
+@@ -18,34 +18,34 @@
+ #ifndef __XFS_TYPES_H__
+ #define	__XFS_TYPES_H__
+ 
+-typedef __uint32_t	prid_t;		/* project ID */
++typedef uint32_t	prid_t;		/* project ID */
+ 
+-typedef __uint32_t	xfs_agblock_t;	/* blockno in alloc. group */
+-typedef	__uint32_t	xfs_agino_t;	/* inode # within allocation grp */
+-typedef	__uint32_t	xfs_extlen_t;	/* extent length in blocks */
+-typedef	__uint32_t	xfs_agnumber_t;	/* allocation group number */
+-typedef __int32_t	xfs_extnum_t;	/* # of extents in a file */
+-typedef __int16_t	xfs_aextnum_t;	/* # extents in an attribute fork */
+-typedef	__int64_t	xfs_fsize_t;	/* bytes in a file */
+-typedef __uint64_t	xfs_ufsize_t;	/* unsigned bytes in a file */
++typedef uint32_t	xfs_agblock_t;	/* blockno in alloc. group */
++typedef uint32_t	xfs_agino_t;	/* inode # within allocation grp */
++typedef uint32_t	xfs_extlen_t;	/* extent length in blocks */
++typedef uint32_t	xfs_agnumber_t;	/* allocation group number */
++typedef int32_t		xfs_extnum_t;	/* # of extents in a file */
++typedef int16_t		xfs_aextnum_t;	/* # extents in an attribute fork */
++typedef int64_t		xfs_fsize_t;	/* bytes in a file */
++typedef uint64_t	xfs_ufsize_t;	/* unsigned bytes in a file */
+ 
+-typedef	__int32_t	xfs_suminfo_t;	/* type of bitmap summary info */
+-typedef	__int32_t	xfs_rtword_t;	/* word type for bitmap manipulations */
++typedef int32_t		xfs_suminfo_t;	/* type of bitmap summary info */
++typedef int32_t		xfs_rtword_t;	/* word type for bitmap manipulations */
+ 
+-typedef	__int64_t	xfs_lsn_t;	/* log sequence number */
+-typedef	__int32_t	xfs_tid_t;	/* transaction identifier */
++typedef int64_t		xfs_lsn_t;	/* log sequence number */
++typedef int32_t		xfs_tid_t;	/* transaction identifier */
+ 
+-typedef	__uint32_t	xfs_dablk_t;	/* dir/attr block number (in file) */
+-typedef	__uint32_t	xfs_dahash_t;	/* dir/attr hash value */
++typedef uint32_t	xfs_dablk_t;	/* dir/attr block number (in file) */
++typedef uint32_t	xfs_dahash_t;	/* dir/attr hash value */
+ 
+-typedef	__uint64_t	xfs_fsblock_t;	/* blockno in filesystem (agno|agbno) */
+-typedef __uint64_t	xfs_rfsblock_t;	/* blockno in filesystem (raw) */
+-typedef __uint64_t	xfs_rtblock_t;	/* extent (block) in realtime area */
+-typedef __uint64_t	xfs_fileoff_t;	/* block number in a file */
+-typedef __uint64_t	xfs_filblks_t;	/* number of blocks in a file */
++typedef uint64_t	xfs_fsblock_t;	/* blockno in filesystem (agno|agbno) */
++typedef uint64_t	xfs_rfsblock_t;	/* blockno in filesystem (raw) */
++typedef uint64_t	xfs_rtblock_t;	/* extent (block) in realtime area */
++typedef uint64_t	xfs_fileoff_t;	/* block number in a file */
++typedef uint64_t	xfs_filblks_t;	/* number of blocks in a file */
+ 
+-typedef	__int64_t	xfs_srtblock_t;	/* signed version of xfs_rtblock_t */
+-typedef __int64_t	xfs_sfiloff_t;	/* signed block number in a file */
++typedef int64_t		xfs_srtblock_t;	/* signed version of xfs_rtblock_t */
++typedef int64_t		xfs_sfiloff_t;	/* signed block number in a file */
+ 
+ /*
+  * Null values for the types.
+@@ -125,7 +125,7 @@ struct xfs_name {
+  * uid_t and gid_t are hard-coded to 32 bits in the inode.
+  * Hence, an 'id' in a dquot is 32 bits..
+  */
+-typedef __uint32_t	xfs_dqid_t;
++typedef uint32_t	xfs_dqid_t;
+ 
+ /*
+  * Constants for bit manipulations.
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfsprogs-remove-double-underscore-integer-types.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfsprogs-remove-double-underscore-integer-types.patch
new file mode 100644
index 0000000..5e08f0d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfsprogs-remove-double-underscore-integer-types.patch
@@ -0,0 +1,3800 @@
+From 14f8b6810bd240cc58131483790a099fcf56c073 Mon Sep 17 00:00:00 2001
+From: "Darrick J. Wong" <darrick.wong@oracle.com>
+Date: Fri, 4 Aug 2017 16:33:51 -0500
+Subject: [PATCH] xfsprogs: remove double-underscore integer types
+
+This is a purely mechanical patch that removes the private
+__{u,}int{8,16,32,64}_t typedefs in favor of using the system
+{u,}int{8,16,32,64}_t typedefs.  This is the sed script used to perform
+the transformation and fix the resulting whitespace and indentation
+errors:
+
+s/typedef\t__uint8_t/typedef __uint8_t\t/g
+s/typedef\t__uint/typedef __uint/g
+s/typedef\t__int\([0-9]*\)_t/typedef int\1_t\t/g
+s/__uint8_t\t/__uint8_t\t\t/g
+s/__uint/uint/g
+s/__int\([0-9]*\)_t\t/__int\1_t\t\t/g
+s/__int/int/g
+/^typedef.*int[0-9]*_t;$/d
+
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
+[sandeen: fix whitespace incidentals]
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
+---
+ copy/xfs_copy.c           | 14 ++++-----
+ copy/xfs_copy.h           |  2 +-
+ db/attr.c                 |  8 ++---
+ db/attrshort.c            |  4 +--
+ db/bit.c                  |  4 +--
+ db/bit.h                  |  2 +-
+ db/block.c                |  8 ++---
+ db/check.c                | 18 +++++------
+ db/convert.c              | 28 ++++++++---------
+ db/faddr.c                | 14 ++++-----
+ db/field.c                | 44 +++++++++++++--------------
+ db/fprint.c               |  8 ++---
+ db/frag.c                 |  8 ++---
+ db/inode.c                | 34 ++++++++++-----------
+ db/io.c                   |  2 +-
+ db/io.h                   |  6 ++--
+ db/metadump.c             | 12 ++++----
+ db/sb.c                   |  6 ++--
+ fsr/xfs_fsr.c             |  2 +-
+ include/darwin.h          | 18 +++++------
+ include/freebsd.h         |  6 ++--
+ include/gnukfreebsd.h     |  6 ++--
+ include/libxcmd.h         |  6 ++--
+ include/linux.h           |  8 ++---
+ include/xfs_arch.h        | 22 +++++++-------
+ include/xfs_inode.h       |  4 +--
+ include/xfs_log_recover.h |  2 +-
+ include/xfs_metadump.h    |  4 +--
+ include/xfs_mount.h       | 22 +++++++-------
+ libhandle/handle.c        |  2 +-
+ libhandle/jdm.c           |  2 +-
+ libxcmd/topology.c        | 14 ++++-----
+ libxfs/darwin.c           |  2 +-
+ libxfs/freebsd.c          |  2 +-
+ libxfs/init.c             |  2 +-
+ libxfs/irix.c             |  2 +-
+ libxfs/libxfs_priv.h      |  4 +--
+ libxfs/linux.c            |  2 +-
+ libxfs/logitem.c          |  2 +-
+ libxfs/radix-tree.c       |  8 ++---
+ libxfs/rdwr.c             |  6 ++--
+ libxfs/util.c             |  8 ++---
+ logprint/log_misc.c       |  6 ++--
+ mdrestore/xfs_mdrestore.c |  2 +-
+ mkfs/proto.c              |  2 +-
+ mkfs/xfs_mkfs.c           | 76 +++++++++++++++++++++++------------------------
+ quota/edit.c              | 64 +++++++++++++++++++--------------------
+ quota/free.c              | 44 +++++++++++++--------------
+ quota/quot.c              | 24 +++++++--------
+ quota/quota.c             |  4 +--
+ quota/quota.h             | 12 ++++----
+ quota/report.c            |  4 +--
+ quota/state.c             |  2 +-
+ quota/util.c              | 66 ++++++++++++++++++++--------------------
+ repair/README             |  2 +-
+ repair/agheader.h         | 14 ++++-----
+ repair/attr_repair.h      | 26 ++++++++--------
+ repair/avl64.c            | 38 ++++++++++++------------
+ repair/avl64.h            | 18 +++++------
+ repair/dinode.c           | 38 ++++++++++++------------
+ repair/dinode.h           |  4 +--
+ repair/dir2.c             |  2 +-
+ repair/globals.h          | 18 +++++------
+ repair/incore.c           | 10 +++----
+ repair/incore.h           | 46 ++++++++++++++--------------
+ repair/incore_ext.c       |  6 ++--
+ repair/incore_ino.c       | 72 ++++++++++++++++++++++----------------------
+ repair/phase2.c           |  2 +-
+ repair/phase3.c           |  6 ++--
+ repair/phase4.c           |  4 +--
+ repair/phase5.c           | 28 ++++++++---------
+ repair/phase6.c           | 16 +++++-----
+ repair/phase7.c           |  6 ++--
+ repair/progress.c         | 30 +++++++++----------
+ repair/progress.h         |  4 +--
+ repair/rmap.c             | 18 +++++------
+ repair/rmap.h             |  2 +-
+ repair/sb.c               | 24 +++++++--------
+ repair/scan.c             | 50 +++++++++++++++----------------
+ repair/scan.h             | 12 ++++----
+ 80 files changed, 590 insertions(+), 590 deletions(-)
+
+diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
+index a7da824f..33e05dfd 100644
+--- a/copy/xfs_copy.c
++++ b/copy/xfs_copy.c
+@@ -43,7 +43,7 @@ unsigned int	source_sectorsize;	/* source disk sectorsize */
+ 
+ xfs_agblock_t	first_agbno;
+ 
+-__uint64_t	barcount[11];
++uint64_t	barcount[11];
+ 
+ unsigned int	num_targets;
+ target_control	*target;
+@@ -313,7 +313,7 @@ usage(void)
+ }
+ 
+ void
+-init_bar(__uint64_t source_blocks)
++init_bar(uint64_t source_blocks)
+ {
+ 	int	i;
+ 
+@@ -322,7 +322,7 @@ init_bar(__uint64_t source_blocks)
+ }
+ 
+ int
+-bump_bar(int tenths, __uint64_t numblocks)
++bump_bar(int tenths, uint64_t numblocks)
+ {
+ 	static char *bar[11] = {
+ 		" 0% ",
+@@ -534,8 +534,8 @@ main(int argc, char **argv)
+ 	xfs_off_t	pos;
+ 	size_t		length;
+ 	int		c;
+-	__uint64_t	size, sizeb;
+-	__uint64_t	numblocks = 0;
++	uint64_t	size, sizeb;
++	uint64_t	numblocks = 0;
+ 	int		wblocks = 0;
+ 	int		num_threads = 0;
+ 	struct dioattr	d;
+@@ -951,8 +951,8 @@ main(int argc, char **argv)
+ 	num_ags = mp->m_sb.sb_agcount;
+ 
+ 	init_bar(mp->m_sb.sb_blocksize / BBSIZE
+-			* ((__uint64_t)mp->m_sb.sb_dblocks
+-			    - (__uint64_t)mp->m_sb.sb_fdblocks + 10 * num_ags));
++			* ((uint64_t)mp->m_sb.sb_dblocks
++			    - (uint64_t)mp->m_sb.sb_fdblocks + 10 * num_ags));
+ 
+ 	kids = num_targets;
+ 
+diff --git a/copy/xfs_copy.h b/copy/xfs_copy.h
+index 27370688..53c6e42c 100644
+--- a/copy/xfs_copy.h
++++ b/copy/xfs_copy.h
+@@ -76,7 +76,7 @@ typedef struct {
+ 
+ typedef int thread_id;
+ typedef int tm_index;			/* index into thread mask array */
+-typedef __uint32_t thread_mask;		/* a thread mask */
++typedef uint32_t thread_mask;		/* a thread mask */
+ 
+ typedef struct {
+ 	char		*name;
+diff --git a/db/attr.c b/db/attr.c
+index 31536a8b..23ffcd5f 100644
+--- a/db/attr.c
++++ b/db/attr.c
+@@ -77,16 +77,16 @@ const field_t	attr_leaf_entry_flds[] = {
+ 	{ "nameidx", FLDT_UINT16D, OI(LEOFF(nameidx)), C1, 0, TYP_NONE },
+ 	{ "flags", FLDT_UINT8X, OI(LEOFF(flags)), C1, FLD_SKIPALL, TYP_NONE },
+ 	{ "incomplete", FLDT_UINT1,
+-	  OI(LEOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_INCOMPLETE_BIT - 1), C1,
++	  OI(LEOFF(flags) + bitsz(uint8_t) - XFS_ATTR_INCOMPLETE_BIT - 1), C1,
+ 	  0, TYP_NONE },
+ 	{ "root", FLDT_UINT1,
+-	  OI(LEOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_ROOT_BIT - 1), C1, 0,
++	  OI(LEOFF(flags) + bitsz(uint8_t) - XFS_ATTR_ROOT_BIT - 1), C1, 0,
+ 	  TYP_NONE },
+ 	{ "secure", FLDT_UINT1,
+-	  OI(LEOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_SECURE_BIT - 1), C1, 0,
++	  OI(LEOFF(flags) + bitsz(uint8_t) - XFS_ATTR_SECURE_BIT - 1), C1, 0,
+ 	  TYP_NONE },
+ 	{ "local", FLDT_UINT1,
+-	  OI(LEOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_LOCAL_BIT - 1), C1, 0,
++	  OI(LEOFF(flags) + bitsz(uint8_t) - XFS_ATTR_LOCAL_BIT - 1), C1, 0,
+ 	  TYP_NONE },
+ 	{ "pad2", FLDT_UINT8X, OI(LEOFF(pad2)), C1, FLD_SKIPALL, TYP_NONE },
+ 	{ NULL }
+diff --git a/db/attrshort.c b/db/attrshort.c
+index d82559cc..2ef358f5 100644
+--- a/db/attrshort.c
++++ b/db/attrshort.c
+@@ -51,10 +51,10 @@ const field_t	attr_sf_entry_flds[] = {
+ 	{ "valuelen", FLDT_UINT8D, OI(EOFF(valuelen)), C1, 0, TYP_NONE },
+ 	{ "flags", FLDT_UINT8X, OI(EOFF(flags)), C1, FLD_SKIPALL, TYP_NONE },
+ 	{ "root", FLDT_UINT1,
+-	  OI(EOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_ROOT_BIT - 1), C1, 0,
++	  OI(EOFF(flags) + bitsz(uint8_t) - XFS_ATTR_ROOT_BIT - 1), C1, 0,
+ 	  TYP_NONE },
+ 	{ "secure", FLDT_UINT1,
+-	  OI(EOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_SECURE_BIT - 1), C1, 0,
++	  OI(EOFF(flags) + bitsz(uint8_t) - XFS_ATTR_SECURE_BIT - 1), C1, 0,
+ 	  TYP_NONE },
+ 	{ "name", FLDT_CHARNS, OI(EOFF(nameval)), attr_sf_entry_name_count,
+ 	  FLD_COUNT, TYP_NONE },
+diff --git a/db/bit.c b/db/bit.c
+index 24872bf7..f5ebf681 100644
+--- a/db/bit.c
++++ b/db/bit.c
+@@ -60,7 +60,7 @@ setbit(
+ 	}
+ }
+ 
+-__int64_t
++int64_t
+ getbitval(
+ 	void		*obj,
+ 	int		bitoff,
+@@ -70,7 +70,7 @@ getbitval(
+ 	int		bit;
+ 	int		i;
+ 	char		*p;
+-	__int64_t	rval;
++	int64_t		rval;
+ 	int		signext;
+ 	int		z1, z2, z3, z4;
+ 
+diff --git a/db/bit.h b/db/bit.h
+index 80ba24c4..9fd71f4b 100644
+--- a/db/bit.h
++++ b/db/bit.h
+@@ -25,5 +25,5 @@
+ #define	BVUNSIGNED	0
+ #define	BVSIGNED	1
+ 
+-extern __int64_t	getbitval(void *obj, int bitoff, int nbits, int flags);
++extern int64_t		getbitval(void *obj, int bitoff, int nbits, int flags);
+ extern void             setbitval(void *obuf, int bitoff, int nbits, void *ibuf);
+diff --git a/db/block.c b/db/block.c
+index 4a357ced..5ecd687a 100644
+--- a/db/block.c
++++ b/db/block.c
+@@ -98,7 +98,7 @@ ablock_f(
+ 	}
+ 	dfsbno = bm.startblock + (bno - bm.startoff);
+ 	ASSERT(typtab[TYP_ATTR].typnm == TYP_ATTR);
+-	set_cur(&typtab[TYP_ATTR], (__int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
++	set_cur(&typtab[TYP_ATTR], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
+ 		blkbb, DB_RING_ADD, NULL);
+ 	return 0;
+ }
+@@ -128,14 +128,14 @@ daddr_f(
+ 	int		argc,
+ 	char		**argv)
+ {
+-	__int64_t	d;
++	int64_t		d;
+ 	char		*p;
+ 
+ 	if (argc == 1) {
+ 		dbprintf(_("current daddr is %lld\n"), iocur_top->off >> BBSHIFT);
+ 		return 0;
+ 	}
+-	d = (__int64_t)strtoull(argv[1], &p, 0);
++	d = (int64_t)strtoull(argv[1], &p, 0);
+ 	if (*p != '\0' ||
+ 	    d >= mp->m_sb.sb_dblocks << (mp->m_sb.sb_blocklog - BBSHIFT)) {
+ 		dbprintf(_("bad daddr %s\n"), argv[1]);
+@@ -197,7 +197,7 @@ dblock_f(
+ 	ASSERT(typtab[type].typnm == type);
+ 	if (nex > 1)
+ 		make_bbmap(&bbmap, nex, bmp);
+-	set_cur(&typtab[type], (__int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
++	set_cur(&typtab[type], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
+ 		nb * blkbb, DB_RING_ADD, nex > 1 ? &bbmap : NULL);
+ 	free(bmp);
+ 	return 0;
+diff --git a/db/check.c b/db/check.c
+index 8e618a23..81ba63a6 100644
+--- a/db/check.c
++++ b/db/check.c
+@@ -114,8 +114,8 @@ typedef struct dirhash {
+ 
+ static xfs_extlen_t	agffreeblks;
+ static xfs_extlen_t	agflongest;
+-static __uint64_t	agf_aggr_freeblks;	/* aggregate count over all */
+-static __uint32_t	agfbtreeblks;
++static uint64_t	agf_aggr_freeblks;	/* aggregate count over all */
++static uint32_t	agfbtreeblks;
+ static int		lazycount;
+ static xfs_agino_t	agicount;
+ static xfs_agino_t	agifreecount;
+@@ -124,10 +124,10 @@ static int		blist_size;
+ static char		**dbmap;	/* really dbm_t:8 */
+ static dirhash_t	**dirhash;
+ static int		error;
+-static __uint64_t	fdblocks;
+-static __uint64_t	frextents;
+-static __uint64_t	icount;
+-static __uint64_t	ifree;
++static uint64_t	fdblocks;
++static uint64_t	frextents;
++static uint64_t	icount;
++static uint64_t	ifree;
+ static inodata_t	***inodata;
+ static int		inodata_hash_size;
+ static inodata_t	***inomap;
+@@ -1187,7 +1187,7 @@ blocktrash_f(
+ 		goto out;
+ 	}
+ 	for (i = 0; i < count; i++) {
+-		randb = (xfs_rfsblock_t)((((__int64_t)random() << 32) |
++		randb = (xfs_rfsblock_t)((((int64_t)random() << 32) |
+ 					 random()) % blocks);
+ 		for (bi = 0, agno = 0, done = 0;
+ 		     !done && agno < mp->m_sb.sb_agcount;
+@@ -3032,7 +3032,7 @@ process_leaf_node_dir_v2(
+ 		}
+ 		if (v)
+ 			dbprintf(_("dir inode %lld block %u=%llu\n"), id->ino,
+-				(__uint32_t)dbno,
++				(uint32_t)dbno,
+ 				(xfs_fsblock_t)bmp->startblock);
+ 		push_cur();
+ 		if (nex > 1)
+@@ -3045,7 +3045,7 @@ process_leaf_node_dir_v2(
+ 			if (!sflag || v)
+ 				dbprintf(_("can't read block %u for directory "
+ 					 "inode %lld\n"),
+-					(__uint32_t)dbno, id->ino);
++					(uint32_t)dbno, id->ino);
+ 			error++;
+ 			pop_cur();
+ 			dbno += mp->m_dir_geo->fsbcount - 1;
+diff --git a/db/convert.c b/db/convert.c
+index a337abea..fa4f9623 100644
+--- a/db/convert.c
++++ b/db/convert.c
+@@ -24,13 +24,13 @@
+ 
+ #define	M(A)	(1 << CT_ ## A)
+ #define	agblock_to_bytes(x)	\
+-	((__uint64_t)(x) << mp->m_sb.sb_blocklog)
++	((uint64_t)(x) << mp->m_sb.sb_blocklog)
+ #define	agino_to_bytes(x)	\
+-	((__uint64_t)(x) << mp->m_sb.sb_inodelog)
++	((uint64_t)(x) << mp->m_sb.sb_inodelog)
+ #define	agnumber_to_bytes(x)	\
+-	agblock_to_bytes((__uint64_t)(x) * mp->m_sb.sb_agblocks)
++	agblock_to_bytes((uint64_t)(x) * mp->m_sb.sb_agblocks)
+ #define	daddr_to_bytes(x)	\
+-	((__uint64_t)(x) << BBSHIFT)
++	((uint64_t)(x) << BBSHIFT)
+ #define	fsblock_to_bytes(x)	\
+ 	(agnumber_to_bytes(XFS_FSB_TO_AGNO(mp, (x))) + \
+ 	 agblock_to_bytes(XFS_FSB_TO_AGBNO(mp, (x))))
+@@ -38,7 +38,7 @@
+ 	(agnumber_to_bytes(XFS_INO_TO_AGNO(mp, (x))) + \
+ 	 agino_to_bytes(XFS_INO_TO_AGINO(mp, (x))))
+ #define	inoidx_to_bytes(x)	\
+-	((__uint64_t)(x) << mp->m_sb.sb_inodelog)
++	((uint64_t)(x) << mp->m_sb.sb_inodelog)
+ 
+ typedef enum {
+ 	CT_NONE = -1,
+@@ -68,7 +68,7 @@ typedef union {
+ 	xfs_agnumber_t	agnumber;
+ 	int		bboff;
+ 	int		blkoff;
+-	__uint64_t	byte;
++	uint64_t	byte;
+ 	xfs_daddr_t	daddr;
+ 	xfs_fsblock_t	fsblock;
+ 	xfs_ino_t	ino;
+@@ -76,7 +76,7 @@ typedef union {
+ 	int		inooff;
+ } cval_t;
+ 
+-static __uint64_t		bytevalue(ctype_t ctype, cval_t *val);
++static uint64_t		bytevalue(ctype_t ctype, cval_t *val);
+ static int		convert_f(int argc, char **argv);
+ static int		getvalue(char *s, ctype_t ctype, cval_t *val);
+ static ctype_t		lookupcty(char *ctyname);
+@@ -118,7 +118,7 @@ static const cmdinfo_t	convert_cmd =
+ 	{ "convert", NULL, convert_f, 3, 9, 0, "type num [type num]... type",
+ 	  "convert from one address form to another", NULL };
+ 
+-static __uint64_t
++static uint64_t
+ bytevalue(ctype_t ctype, cval_t *val)
+ {
+ 	switch (ctype) {
+@@ -129,9 +129,9 @@ bytevalue(ctype_t ctype, cval_t *val)
+ 	case CT_AGNUMBER:
+ 		return agnumber_to_bytes(val->agnumber);
+ 	case CT_BBOFF:
+-		return (__uint64_t)val->bboff;
++		return (uint64_t)val->bboff;
+ 	case CT_BLKOFF:
+-		return (__uint64_t)val->blkoff;
++		return (uint64_t)val->blkoff;
+ 	case CT_BYTE:
+ 		return val->byte;
+ 	case CT_DADDR:
+@@ -143,7 +143,7 @@ bytevalue(ctype_t ctype, cval_t *val)
+ 	case CT_INOIDX:
+ 		return inoidx_to_bytes(val->inoidx);
+ 	case CT_INOOFF:
+-		return (__uint64_t)val->inooff;
++		return (uint64_t)val->inooff;
+ 	case CT_NONE:
+ 	case NCTS:
+ 		break;
+@@ -160,7 +160,7 @@ convert_f(int argc, char **argv)
+ 	cval_t		cvals[NCTS] = {};
+ 	int		i;
+ 	int		mask;
+-	__uint64_t	v;
++	uint64_t	v;
+ 	ctype_t		wtype;
+ 
+ 	/* move past the "convert" command */
+@@ -262,7 +262,7 @@ static int
+ getvalue(char *s, ctype_t ctype, cval_t *val)
+ {
+ 	char		*p;
+-	__uint64_t	v;
++	uint64_t	v;
+ 
+ 	v = strtoull(s, &p, 0);
+ 	if (*p != '\0') {
+@@ -286,7 +286,7 @@ getvalue(char *s, ctype_t ctype, cval_t *val)
+ 		val->blkoff = (int)v;
+ 		break;
+ 	case CT_BYTE:
+-		val->byte = (__uint64_t)v;
++		val->byte = (uint64_t)v;
+ 		break;
+ 	case CT_DADDR:
+ 		val->daddr = (xfs_daddr_t)v;
+diff --git a/db/faddr.c b/db/faddr.c
+index 877200bf..56207648 100644
+--- a/db/faddr.c
++++ b/db/faddr.c
+@@ -79,11 +79,11 @@ fa_attrblock(
+ 	typnm_t		next)
+ {
+ 	bmap_ext_t	bm;
+-	__uint32_t	bno;
++	uint32_t	bno;
+ 	xfs_fsblock_t	dfsbno;
+ 	int		nex;
+ 
+-	bno = (__uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
++	bno = (uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
+ 	if (bno == 0) {
+ 		dbprintf(_("null attribute block number, cannot set new addr\n"));
+ 		return;
+@@ -96,7 +96,7 @@ fa_attrblock(
+ 	}
+ 	dfsbno = bm.startblock + (bno - bm.startoff);
+ 	ASSERT(typtab[next].typnm == next);
+-	set_cur(&typtab[next], (__int64_t)XFS_FSB_TO_DADDR(mp, dfsbno), blkbb,
++	set_cur(&typtab[next], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno), blkbb,
+ 		DB_RING_ADD, NULL);
+ }
+ 
+@@ -276,11 +276,11 @@ fa_dirblock(
+ {
+ 	bbmap_t		bbmap;
+ 	bmap_ext_t	*bmp;
+-	__uint32_t	bno;
++	uint32_t	bno;
+ 	xfs_fsblock_t	dfsbno;
+ 	int		nex;
+ 
+-	bno = (__uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
++	bno = (uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
+ 	if (bno == 0) {
+ 		dbprintf(_("null directory block number, cannot set new addr\n"));
+ 		return;
+@@ -297,7 +297,7 @@ fa_dirblock(
+ 	ASSERT(typtab[next].typnm == next);
+ 	if (nex > 1)
+ 		make_bbmap(&bbmap, nex, bmp);
+-	set_cur(&typtab[next], (__int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
++	set_cur(&typtab[next], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
+ 		XFS_FSB_TO_BB(mp, mp->m_dir_geo->fsbcount), DB_RING_ADD,
+ 		nex > 1 ? &bbmap : NULL);
+ 	free(bmp);
+@@ -317,7 +317,7 @@ fa_drfsbno(
+ 		return;
+ 	}
+ 	ASSERT(typtab[next].typnm == next);
+-	set_cur(&typtab[next], (__int64_t)XFS_FSB_TO_BB(mp, bno), blkbb,
++	set_cur(&typtab[next], (int64_t)XFS_FSB_TO_BB(mp, bno), blkbb,
+ 		DB_RING_ADD, NULL);
+ }
+ 
+diff --git a/db/field.c b/db/field.c
+index 865b0b71..f1e5f35e 100644
+--- a/db/field.c
++++ b/db/field.c
+@@ -83,7 +83,7 @@ const ftattr_t	ftattrtab[] = {
+ 	  attr_sf_entry_size, FTARG_SIZE, NULL, attr_sf_entry_flds },
+ 	{ FLDT_ATTR_SF_HDR, "attr_sf_hdr", NULL, (char *)attr_sf_hdr_flds,
+ 	  SI(bitsz(struct xfs_attr_sf_hdr)), 0, NULL, attr_sf_hdr_flds },
+-	{ FLDT_ATTRBLOCK, "attrblock", fp_num, "%u", SI(bitsz(__uint32_t)), 0,
++	{ FLDT_ATTRBLOCK, "attrblock", fp_num, "%u", SI(bitsz(uint32_t)), 0,
+ 	  fa_attrblock, NULL },
+ 	{ FLDT_ATTRSHORT, "attrshort", NULL, (char *)attr_shortform_flds,
+ 	  attrshort_size, FTARG_SIZE, NULL, attr_shortform_flds },
+@@ -199,7 +199,7 @@ const ftattr_t	ftattrtab[] = {
+ 	  SI(bitsz(struct xfs_refcount_rec)), 0, NULL, refcbt_rec_flds },
+ 
+ /* CRC field */
+-	{ FLDT_CRC, "crc", fp_crc, "%#x (%s)", SI(bitsz(__uint32_t)),
++	{ FLDT_CRC, "crc", fp_crc, "%#x (%s)", SI(bitsz(uint32_t)),
+ 	  0, NULL, NULL },
+ 
+ 	{ FLDT_DEV, "dev", fp_num, "%#x", SI(bitsz(xfs_dev_t)), 0, NULL, NULL },
+@@ -214,7 +214,7 @@ const ftattr_t	ftattrtab[] = {
+ 	{ FLDT_DINODE_CORE, "dinode_core", NULL, (char *)inode_core_flds,
+ 	  SI(bitsz(xfs_dinode_t)), 0, NULL, inode_core_flds },
+ 	{ FLDT_DINODE_FMT, "dinode_fmt", fp_dinode_fmt, NULL,
+-	  SI(bitsz(__int8_t)), 0, NULL, NULL },
++	  SI(bitsz(int8_t)), 0, NULL, NULL },
+ 	{ FLDT_DINODE_U, "dinode_u", NULL, (char *)inode_u_flds, inode_u_size,
+ 	  FTARG_SIZE|FTARG_OKEMPTY, NULL, inode_u_flds },
+ 	{ FLDT_DINODE_V3, "dinode_v3", NULL, (char *)inode_v3_flds,
+@@ -295,7 +295,7 @@ const ftattr_t	ftattrtab[] = {
+ 	{ FLDT_DA3_NODE_HDR, "dir_node_hdr", NULL, (char *)da3_node_hdr_flds,
+ 	  SI(bitsz(struct xfs_da3_node_hdr)), 0, NULL, da3_node_hdr_flds },
+ 
+-	{ FLDT_DIRBLOCK, "dirblock", fp_num, "%u", SI(bitsz(__uint32_t)), 0,
++	{ FLDT_DIRBLOCK, "dirblock", fp_num, "%u", SI(bitsz(uint32_t)), 0,
+ 	  fa_dirblock, NULL },
+ 	{ FLDT_DISK_DQUOT, "disk_dquot", NULL, (char *)disk_dquot_flds,
+ 	  SI(bitsz(xfs_disk_dquot_t)), 0, NULL, disk_dquot_flds },
+@@ -335,15 +335,15 @@ const ftattr_t	ftattrtab[] = {
+ 	  FTARG_SIZE, NULL, inode_crc_flds },
+ 	{ FLDT_INOFREE, "inofree", fp_num, "%#llx", SI(bitsz(xfs_inofree_t)), 0,
+ 	  NULL, NULL },
+-	{ FLDT_INT16D, "int16d", fp_num, "%d", SI(bitsz(__int16_t)),
++	{ FLDT_INT16D, "int16d", fp_num, "%d", SI(bitsz(int16_t)),
+ 	  FTARG_SIGNED, NULL, NULL },
+-	{ FLDT_INT32D, "int32d", fp_num, "%d", SI(bitsz(__int32_t)),
++	{ FLDT_INT32D, "int32d", fp_num, "%d", SI(bitsz(int32_t)),
+ 	  FTARG_SIGNED, NULL, NULL },
+-	{ FLDT_INT64D, "int64d", fp_num, "%lld", SI(bitsz(__int64_t)),
++	{ FLDT_INT64D, "int64d", fp_num, "%lld", SI(bitsz(int64_t)),
+ 	  FTARG_SIGNED, NULL, NULL },
+-	{ FLDT_INT8D, "int8d", fp_num, "%d", SI(bitsz(__int8_t)), FTARG_SIGNED,
++	{ FLDT_INT8D, "int8d", fp_num, "%d", SI(bitsz(int8_t)), FTARG_SIGNED,
+ 	  NULL, NULL },
+-	{ FLDT_NSEC, "nsec", fp_num, "%09d", SI(bitsz(__int32_t)), FTARG_SIGNED,
++	{ FLDT_NSEC, "nsec", fp_num, "%09d", SI(bitsz(int32_t)), FTARG_SIGNED,
+ 	  NULL, NULL },
+ 	{ FLDT_QCNT, "qcnt", fp_num, "%llu", SI(bitsz(xfs_qcnt_t)), 0, NULL,
+ 	  NULL },
+@@ -356,34 +356,34 @@ const ftattr_t	ftattrtab[] = {
+ 	{ FLDT_SYMLINK_CRC, "symlink", NULL, (char *)symlink_crc_flds,
+ 	  symlink_size, FTARG_SIZE, NULL, symlink_crc_flds },
+ 
+-	{ FLDT_TIME, "time", fp_time, NULL, SI(bitsz(__int32_t)), FTARG_SIGNED,
++	{ FLDT_TIME, "time", fp_time, NULL, SI(bitsz(int32_t)), FTARG_SIGNED,
+ 	  NULL, NULL },
+ 	{ FLDT_TIMESTAMP, "timestamp", NULL, (char *)timestamp_flds,
+ 	  SI(bitsz(xfs_timestamp_t)), 0, NULL, timestamp_flds },
+ 	{ FLDT_UINT1, "uint1", fp_num, "%u", SI(1), 0, NULL, NULL },
+-	{ FLDT_UINT16D, "uint16d", fp_num, "%u", SI(bitsz(__uint16_t)), 0, NULL,
++	{ FLDT_UINT16D, "uint16d", fp_num, "%u", SI(bitsz(uint16_t)), 0, NULL,
+ 	  NULL },
+-	{ FLDT_UINT16O, "uint16o", fp_num, "%#o", SI(bitsz(__uint16_t)), 0,
++	{ FLDT_UINT16O, "uint16o", fp_num, "%#o", SI(bitsz(uint16_t)), 0,
+ 	  NULL, NULL },
+-	{ FLDT_UINT16X, "uint16x", fp_num, "%#x", SI(bitsz(__uint16_t)), 0,
++	{ FLDT_UINT16X, "uint16x", fp_num, "%#x", SI(bitsz(uint16_t)), 0,
+ 	  NULL, NULL },
+-	{ FLDT_UINT32D, "uint32d", fp_num, "%u", SI(bitsz(__uint32_t)), 0, NULL,
++	{ FLDT_UINT32D, "uint32d", fp_num, "%u", SI(bitsz(uint32_t)), 0, NULL,
+ 	  NULL },
+-	{ FLDT_UINT32O, "uint32o", fp_num, "%#o", SI(bitsz(__uint32_t)), 0,
++	{ FLDT_UINT32O, "uint32o", fp_num, "%#o", SI(bitsz(uint32_t)), 0,
+ 	  NULL, NULL },
+-	{ FLDT_UINT32X, "uint32x", fp_num, "%#x", SI(bitsz(__uint32_t)), 0,
++	{ FLDT_UINT32X, "uint32x", fp_num, "%#x", SI(bitsz(uint32_t)), 0,
+ 	  NULL, NULL },
+-	{ FLDT_UINT64D, "uint64d", fp_num, "%llu", SI(bitsz(__uint64_t)), 0,
++	{ FLDT_UINT64D, "uint64d", fp_num, "%llu", SI(bitsz(uint64_t)), 0,
+ 	  NULL, NULL },
+-	{ FLDT_UINT64O, "uint64o", fp_num, "%#llo", SI(bitsz(__uint64_t)), 0,
++	{ FLDT_UINT64O, "uint64o", fp_num, "%#llo", SI(bitsz(uint64_t)), 0,
+ 	  NULL, NULL },
+-	{ FLDT_UINT64X, "uint64x", fp_num, "%#llx", SI(bitsz(__uint64_t)), 0,
++	{ FLDT_UINT64X, "uint64x", fp_num, "%#llx", SI(bitsz(uint64_t)), 0,
+ 	  NULL, NULL },
+-	{ FLDT_UINT8D, "uint8d", fp_num, "%u", SI(bitsz(__uint8_t)), 0, NULL,
++	{ FLDT_UINT8D, "uint8d", fp_num, "%u", SI(bitsz(uint8_t)), 0, NULL,
+ 	  NULL },
+-	{ FLDT_UINT8O, "uint8o", fp_num, "%#o", SI(bitsz(__uint8_t)), 0, NULL,
++	{ FLDT_UINT8O, "uint8o", fp_num, "%#o", SI(bitsz(uint8_t)), 0, NULL,
+ 	  NULL },
+-	{ FLDT_UINT8X, "uint8x", fp_num, "%#x", SI(bitsz(__uint8_t)), 0, NULL,
++	{ FLDT_UINT8X, "uint8x", fp_num, "%#x", SI(bitsz(uint8_t)), 0, NULL,
+ 	  NULL },
+ 	{ FLDT_UUID, "uuid", fp_uuid, NULL, SI(bitsz(uuid_t)), 0, NULL, NULL },
+ 	{ FLDT_ZZZ, NULL }
+diff --git a/db/fprint.c b/db/fprint.c
+index fd7e7f45..261a31ef 100644
+--- a/db/fprint.c
++++ b/db/fprint.c
+@@ -80,7 +80,7 @@ fp_num(
+ 	int		bitpos;
+ 	int		i;
+ 	int		isnull;
+-	__int64_t	val;
++	int64_t		val;
+ 
+ 	for (i = 0, bitpos = bit;
+ 	     i < count && !seenint();
+@@ -100,7 +100,7 @@ fp_num(
+ 		else if (size > 32)
+ 			dbprintf(fmtstr, val);
+ 		else
+-			dbprintf(fmtstr, (__int32_t)val);
++			dbprintf(fmtstr, (int32_t)val);
+ 		if (i < count - 1)
+ 			dbprintf(" ");
+ 	}
+@@ -203,7 +203,7 @@ fp_crc(
+ {
+ 	int		bitpos;
+ 	int		i;
+-	__int64_t	val;
++	int64_t		val;
+ 	char		*ok;
+ 
+ 	switch (iocur_crc_valid()) {
+@@ -230,7 +230,7 @@ fp_crc(
+ 		if (size > 32)
+ 			dbprintf(fmtstr, val, ok);
+ 		else
+-			dbprintf(fmtstr, (__int32_t)val, ok);
++			dbprintf(fmtstr, (int32_t)val, ok);
+ 		if (i < count - 1)
+ 			dbprintf(" ");
+ 	}
+diff --git a/db/frag.c b/db/frag.c
+index 8005e45d..d224f0c2 100644
+--- a/db/frag.c
++++ b/db/frag.c
+@@ -42,8 +42,8 @@ typedef	struct extmap {
+ 
+ static int		aflag;
+ static int		dflag;
+-static __uint64_t	extcount_actual;
+-static __uint64_t	extcount_ideal;
++static uint64_t	extcount_actual;
++static uint64_t	extcount_ideal;
+ static int		fflag;
+ static int		lflag;
+ static int		qflag;
+@@ -310,8 +310,8 @@ process_inode(
+ 	xfs_agino_t		agino,
+ 	xfs_dinode_t		*dip)
+ {
+-	__uint64_t		actual;
+-	__uint64_t		ideal;
++	uint64_t		actual;
++	uint64_t		ideal;
+ 	xfs_ino_t		ino;
+ 	int			skipa;
+ 	int			skipd;
+diff --git a/db/inode.c b/db/inode.c
+index 8b7a41e4..6cc47d6a 100644
+--- a/db/inode.c
++++ b/db/inode.c
+@@ -119,49 +119,49 @@ const field_t	inode_core_flds[] = {
+ 	{ "dmstate", FLDT_UINT16D, OI(COFF(dmstate)), C1, 0, TYP_NONE },
+ 	{ "flags", FLDT_UINT16X, OI(COFF(flags)), C1, FLD_SKIPALL, TYP_NONE },
+ 	{ "newrtbm", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NEWRTBM_BIT - 1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NEWRTBM_BIT - 1), C1,
+ 	  0, TYP_NONE },
+ 	{ "prealloc", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_PREALLOC_BIT - 1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_PREALLOC_BIT - 1), C1,
+ 	  0, TYP_NONE },
+ 	{ "realtime", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_REALTIME_BIT - 1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_REALTIME_BIT - 1), C1,
+ 	  0, TYP_NONE },
+ 	{ "immutable", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_IMMUTABLE_BIT-1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_IMMUTABLE_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "append", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_APPEND_BIT - 1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_APPEND_BIT - 1), C1,
+ 	  0, TYP_NONE },
+ 	{ "sync", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_SYNC_BIT - 1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_SYNC_BIT - 1), C1,
+ 	  0, TYP_NONE },
+ 	{ "noatime", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NOATIME_BIT - 1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NOATIME_BIT - 1), C1,
+ 	  0, TYP_NONE },
+ 	{ "nodump", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NODUMP_BIT - 1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NODUMP_BIT - 1), C1,
+ 	  0, TYP_NONE },
+ 	{ "rtinherit", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_RTINHERIT_BIT-1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_RTINHERIT_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "projinherit", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_PROJINHERIT_BIT-1),C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_PROJINHERIT_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "nosymlinks", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NOSYMLINKS_BIT-1), C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NOSYMLINKS_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "extsz", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_EXTSIZE_BIT-1),C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_EXTSIZE_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "extszinherit", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_EXTSZINHERIT_BIT-1),C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_EXTSZINHERIT_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "nodefrag", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NODEFRAG_BIT-1),C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NODEFRAG_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "filestream", FLDT_UINT1,
+-	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_FILESTREAM_BIT-1),C1,
++	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_FILESTREAM_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "gen", FLDT_UINT32D, OI(COFF(gen)), C1, 0, TYP_NONE },
+ 	{ NULL }
+@@ -177,10 +177,10 @@ const field_t	inode_v3_flds[] = {
+ 	{ "inumber", FLDT_INO, OI(COFF(ino)), C1, 0, TYP_NONE },
+ 	{ "uuid", FLDT_UUID, OI(COFF(uuid)), C1, 0, TYP_NONE },
+ 	{ "reflink", FLDT_UINT1,
+-	  OI(COFF(flags2) + bitsz(__uint64_t) - XFS_DIFLAG2_REFLINK_BIT-1), C1,
++	  OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_REFLINK_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ "cowextsz", FLDT_UINT1,
+-	  OI(COFF(flags2) + bitsz(__uint64_t) - XFS_DIFLAG2_COWEXTSIZE_BIT-1), C1,
++	  OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_COWEXTSIZE_BIT-1), C1,
+ 	  0, TYP_NONE },
+ 	{ NULL }
+ };
+diff --git a/db/io.c b/db/io.c
+index 1f27f6b3..fd9b9f4b 100644
+--- a/db/io.c
++++ b/db/io.c
+@@ -545,7 +545,7 @@ set_cur(
+ 	struct xfs_buf	*bp;
+ 	xfs_ino_t	dirino;
+ 	xfs_ino_t	ino;
+-	__uint16_t	mode;
++	uint16_t	mode;
+ 	const struct xfs_buf_ops *ops = type ? type->bops : NULL;
+ 
+ 	if (iocur_sp < 0) {
+diff --git a/db/io.h b/db/io.h
+index 99730048..df0fdd75 100644
+--- a/db/io.h
++++ b/db/io.h
+@@ -25,7 +25,7 @@ typedef struct bbmap {
+ } bbmap_t;
+ 
+ typedef struct iocur {
+-	__int64_t		bb;	/* BB number in filesystem of buf */
++	int64_t			bb;	/* BB number in filesystem of buf */
+ 	int			blen;	/* length of "buf", bb's */
+ 	int			boff;	/* data - buf */
+ 	void			*buf;	/* base address of buffer */
+@@ -33,7 +33,7 @@ typedef struct iocur {
+ 	xfs_ino_t		dirino;	/* current directory inode number */
+ 	xfs_ino_t		ino;	/* current inode number */
+ 	int			len;	/* length of "data", bytes */
+-	__uint16_t		mode;	/* current inode's mode */
++	uint16_t		mode;	/* current inode's mode */
+ 	xfs_off_t		off;	/* fs offset of "data" in bytes */
+ 	const struct typ	*typ;	/* type of "data" */
+ 	bbmap_t			*bbmap;	/* map daddr if fragmented */
+@@ -57,7 +57,7 @@ extern void	off_cur(int off, int len);
+ extern void	pop_cur(void);
+ extern void	print_iocur(char *tag, iocur_t *ioc);
+ extern void	push_cur(void);
+-extern int	read_buf(__int64_t daddr, int count, void *bufp);
++extern int	read_buf(int64_t daddr, int count, void *bufp);
+ extern void     write_cur(void);
+ extern void	set_cur(const struct typ *type, xfs_daddr_t blknum,
+ 			int len, int ring_add, bbmap_t *bbmap);
+diff --git a/db/metadump.c b/db/metadump.c
+index 31bb5959..67bdf14e 100644
+--- a/db/metadump.c
++++ b/db/metadump.c
+@@ -175,7 +175,7 @@ write_index(void)
+ static int
+ write_buf_segment(
+ 	char		*data,
+-	__int64_t	off,
++	int64_t		off,
+ 	int		len)
+ {
+ 	int		i;
+@@ -1256,7 +1256,7 @@ process_sf_dir(
+ {
+ 	struct xfs_dir2_sf_hdr	*sfp;
+ 	xfs_dir2_sf_entry_t	*sfep;
+-	__uint64_t		ino_dir_size;
++	uint64_t		ino_dir_size;
+ 	int			i;
+ 
+ 	sfp = (struct xfs_dir2_sf_hdr *)XFS_DFORK_DPTR(dip);
+@@ -1322,7 +1322,7 @@ process_sf_dir(
+ static void
+ obfuscate_path_components(
+ 	char			*buf,
+-	__uint64_t		len)
++	uint64_t		len)
+ {
+ 	unsigned char		*comp = (unsigned char *)buf;
+ 	unsigned char		*end = comp + len;
+@@ -1359,7 +1359,7 @@ static void
+ process_sf_symlink(
+ 	xfs_dinode_t		*dip)
+ {
+-	__uint64_t		len;
++	uint64_t		len;
+ 	char			*buf;
+ 
+ 	len = be64_to_cpu(dip->di_size);
+@@ -1631,7 +1631,7 @@ process_attr_block(
+ 	xfs_attr_leaf_entry_t 		*entry;
+ 	xfs_attr_leaf_name_local_t 	*local;
+ 	xfs_attr_leaf_name_remote_t 	*remote;
+-	__uint32_t			bs = mp->m_sb.sb_blocksize;
++	uint32_t			bs = mp->m_sb.sb_blocksize;
+ 	char				*first_name;
+ 
+ 
+@@ -2270,7 +2270,7 @@ done:
+ 	return success;
+ }
+ 
+-static __uint32_t	inodes_copied = 0;
++static uint32_t	inodes_copied;
+ 
+ static int
+ copy_inode_chunk(
+diff --git a/db/sb.c b/db/sb.c
+index 8e7722cd..f19248d7 100644
+--- a/db/sb.c
++++ b/db/sb.c
+@@ -606,7 +606,7 @@ version_help(void)
+ }
+ 
+ static int
+-do_version(xfs_agnumber_t agno, __uint16_t version, __uint32_t features)
++do_version(xfs_agnumber_t agno, uint16_t version, uint32_t features)
+ {
+ 	xfs_sb_t	tsb;
+ 
+@@ -710,8 +710,8 @@ version_f(
+ 	int		argc,
+ 	char		**argv)
+ {
+-	__uint16_t	version = 0;
+-	__uint32_t	features = 0;
++	uint16_t	version = 0;
++	uint32_t	features = 0;
+ 	xfs_agnumber_t	ag;
+ 
+ 	if (argc == 2) {	/* WRITE VERSION */
+diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
+index 517b75f0..d4846a32 100644
+--- a/fsr/xfs_fsr.c
++++ b/fsr/xfs_fsr.c
+@@ -54,7 +54,7 @@ struct getbmap  *outmap = NULL;
+ int             outmap_size = 0;
+ int		RealUid;
+ int		tmp_agi;
+-static __int64_t	minimumfree = 2048;
++static int64_t		minimumfree = 2048;
+ 
+ #define MNTTYPE_XFS             "xfs"
+ 
+diff --git a/include/darwin.h b/include/darwin.h
+index 7bbd5764..51031c42 100644
+--- a/include/darwin.h
++++ b/include/darwin.h
+@@ -125,15 +125,15 @@ typedef signed int		__s32;
+ typedef unsigned long long int	__u64;
+ typedef signed long long int	__s64;
+ 
+-#define __int8_t	int8_t
+-#define __int16_t	int16_t
+-#define __int32_t	int32_t
+-#define __int32_t	int32_t
+-#define __int64_t	int64_t
+-#define __uint8_t	u_int8_t
+-#define __uint16_t	u_int16_t
+-#define __uint32_t	u_int32_t
+-#define __uint64_t	u_int64_t
++#define int8_t		int8_t
++#define int16_t		int16_t
++#define int32_t		int32_t
++#define int32_t		int32_t
++#define int64_t		int64_t
++#define uint8_t		u_int8_t
++#define uint16_t	u_int16_t
++#define uint32_t	u_int32_t
++#define uint64_t	u_int64_t
+ 
+ typedef off_t		xfs_off_t;
+ typedef u_int64_t	xfs_ino_t;
+diff --git a/include/freebsd.h b/include/freebsd.h
+index fb318b89..f52ed0a9 100644
+--- a/include/freebsd.h
++++ b/include/freebsd.h
+@@ -50,9 +50,9 @@ typedef unsigned long long int	__u64;
+ typedef signed long long int	__s64;
+ 
+ typedef off_t		xfs_off_t;
+-typedef __uint64_t	xfs_ino_t;
+-typedef __uint32_t	xfs_dev_t;
+-typedef __int64_t	xfs_daddr_t;
++typedef uint64_t	xfs_ino_t;
++typedef uint32_t	xfs_dev_t;
++typedef int64_t		xfs_daddr_t;
+ typedef __u32		xfs_nlink_t;
+ 
+ #define	O_LARGEFILE	0
+diff --git a/include/gnukfreebsd.h b/include/gnukfreebsd.h
+index 6916e65a..1db3f4f0 100644
+--- a/include/gnukfreebsd.h
++++ b/include/gnukfreebsd.h
+@@ -46,9 +46,9 @@ typedef unsigned long long int	__u64;
+ typedef signed long long int	__s64;
+ 
+ typedef off_t		xfs_off_t;
+-typedef __uint64_t	xfs_ino_t;
+-typedef __uint32_t	xfs_dev_t;
+-typedef __int64_t	xfs_daddr_t;
++typedef uint64_t	xfs_ino_t;
++typedef uint32_t	xfs_dev_t;
++typedef int64_t		xfs_daddr_t;
+ typedef __u32		xfs_nlink_t;
+ 
+ #define HAVE_FID	1
+diff --git a/include/libxcmd.h b/include/libxcmd.h
+index e8d2ffc8..6806380c 100644
+--- a/include/libxcmd.h
++++ b/include/libxcmd.h
+@@ -42,10 +42,10 @@ get_topology(
+ extern void
+ calc_default_ag_geometry(
+ 	int		blocklog,
+-	__uint64_t	dblocks,
++	uint64_t	dblocks,
+ 	int		multidisk,
+-	__uint64_t	*agsize,
+-	__uint64_t	*agcount);
++	uint64_t	*agsize,
++	uint64_t	*agcount);
+ 
+ extern int
+ check_overwrite(
+diff --git a/include/linux.h b/include/linux.h
+index 9611a37f..6ce344c5 100644
+--- a/include/linux.h
++++ b/include/linux.h
+@@ -132,7 +132,7 @@ static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src)
+ static __inline__ int
+ platform_discard_blocks(int fd, uint64_t start, uint64_t len)
+ {
+-	__uint64_t range[2] = { start, len };
++	uint64_t range[2] = { start, len };
+ 
+ 	if (ioctl(fd, BLKDISCARD, &range) < 0)
+ 		return errno;
+@@ -144,9 +144,9 @@ platform_discard_blocks(int fd, uint64_t start, uint64_t len)
+ #define EFSBADCRC	EBADMSG	/* Bad CRC detected */
+ 
+ typedef off_t		xfs_off_t;
+-typedef __uint64_t	xfs_ino_t;
+-typedef __uint32_t	xfs_dev_t;
+-typedef __int64_t	xfs_daddr_t;
++typedef uint64_t	xfs_ino_t;
++typedef uint32_t	xfs_dev_t;
++typedef int64_t		xfs_daddr_t;
+ typedef __u32		xfs_nlink_t;
+ 
+ /**
+diff --git a/include/xfs_arch.h b/include/xfs_arch.h
+index 12cd43e6..186cadba 100644
+--- a/include/xfs_arch.h
++++ b/include/xfs_arch.h
+@@ -244,39 +244,39 @@ static inline void be64_add_cpu(__be64 *a, __s64 b)
+ 	*a = cpu_to_be64(be64_to_cpu(*a) + b);
+ }
+ 
+-static inline __uint16_t get_unaligned_be16(void *p)
++static inline uint16_t get_unaligned_be16(void *p)
+ {
+-	__uint8_t *__p = p;
++	uint8_t *__p = p;
+ 	return __p[0] << 8 | __p[1];
+ }
+ 
+-static inline __uint32_t get_unaligned_be32(void *p)
++static inline uint32_t get_unaligned_be32(void *p)
+ {
+-	__uint8_t *__p = p;
++	uint8_t *__p = p;
+         return __p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3];
+ }
+ 
+-static inline __uint64_t get_unaligned_be64(void *p)
++static inline uint64_t get_unaligned_be64(void *p)
+ {
+-	return (__uint64_t)get_unaligned_be32(p) << 32 |
++	return (uint64_t)get_unaligned_be32(p) << 32 |
+ 			   get_unaligned_be32(p + 4);
+ }
+ 
+-static inline void put_unaligned_be16(__uint16_t val, void *p)
++static inline void put_unaligned_be16(uint16_t val, void *p)
+ {
+-	__uint8_t *__p = p;
++	uint8_t *__p = p;
+ 	*__p++ = val >> 8;
+ 	*__p++ = val;
+ }
+ 
+-static inline void put_unaligned_be32(__uint32_t val, void *p)
++static inline void put_unaligned_be32(uint32_t val, void *p)
+ {
+-	__uint8_t *__p = p;
++	uint8_t *__p = p;
+ 	put_unaligned_be16(val >> 16, __p);
+ 	put_unaligned_be16(val, __p + 2);
+ }
+ 
+-static inline void put_unaligned_be64(__uint64_t val, void *p)
++static inline void put_unaligned_be64(uint64_t val, void *p)
+ {
+ 	put_unaligned_be32(val >> 32, p);
+ 	put_unaligned_be32(val, p + 4);
+diff --git a/include/xfs_inode.h b/include/xfs_inode.h
+index fb6b5429..8766024e 100644
+--- a/include/xfs_inode.h
++++ b/include/xfs_inode.h
+@@ -123,8 +123,8 @@ xfs_get_projid(struct xfs_icdinode *id)
+ static inline void
+ xfs_set_projid(struct xfs_icdinode *id, prid_t projid)
+ {
+-	id->di_projid_hi = (__uint16_t) (projid >> 16);
+-	id->di_projid_lo = (__uint16_t) (projid & 0xffff);
++	id->di_projid_hi = (uint16_t) (projid >> 16);
++	id->di_projid_lo = (uint16_t) (projid & 0xffff);
+ }
+ 
+ static inline bool xfs_is_reflink_inode(struct xfs_inode *ip)
+diff --git a/include/xfs_log_recover.h b/include/xfs_log_recover.h
+index 7582676b..0d098628 100644
+--- a/include/xfs_log_recover.h
++++ b/include/xfs_log_recover.h
+@@ -26,7 +26,7 @@
+ #define XLOG_RHASH_SIZE	16
+ #define XLOG_RHASH_SHIFT 2
+ #define XLOG_RHASH(tid)	\
+-	((((__uint32_t)tid)>>XLOG_RHASH_SHIFT) & (XLOG_RHASH_SIZE-1))
++	((((uint32_t)tid)>>XLOG_RHASH_SHIFT) & (XLOG_RHASH_SIZE-1))
+ 
+ #define XLOG_MAX_REGIONS_IN_ITEM   (XFS_MAX_BLOCKSIZE / XFS_BLF_CHUNK / 2 + 1)
+ 
+diff --git a/include/xfs_metadump.h b/include/xfs_metadump.h
+index 7f3039eb..13afb8dd 100644
+--- a/include/xfs_metadump.h
++++ b/include/xfs_metadump.h
+@@ -24,8 +24,8 @@
+ typedef struct xfs_metablock {
+ 	__be32		mb_magic;
+ 	__be16		mb_count;
+-	__uint8_t	mb_blocklog;
+-	__uint8_t	mb_info;
++	uint8_t		mb_blocklog;
++	uint8_t		mb_info;
+ 	/* followed by an array of xfs_daddr_t */
+ } xfs_metablock_t;
+ 
+diff --git a/include/xfs_mount.h b/include/xfs_mount.h
+index 5ff24ebf..5b323bb1 100644
+--- a/include/xfs_mount.h
++++ b/include/xfs_mount.h
+@@ -48,12 +48,12 @@ typedef struct xfs_mount {
+ #define m_dev		m_ddev_targp
+ #define m_logdev	m_logdev_targp
+ #define m_rtdev		m_rtdev_targp
+-	__uint8_t		m_dircook_elog;	/* log d-cookie entry bits */
+-	__uint8_t		m_blkbit_log;	/* blocklog + NBBY */
+-	__uint8_t		m_blkbb_log;	/* blocklog - BBSHIFT */
+-	__uint8_t		m_sectbb_log;	/* sectorlog - BBSHIFT */
+-	__uint8_t		m_agno_log;	/* log #ag's */
+-	__uint8_t		m_agino_log;	/* #bits for agino in inum */
++	uint8_t			m_dircook_elog;	/* log d-cookie entry bits */
++	uint8_t			m_blkbit_log;	/* blocklog + NBBY */
++	uint8_t			m_blkbb_log;	/* blocklog - BBSHIFT */
++	uint8_t			m_sectbb_log;	/* sectorlog - BBSHIFT */
++	uint8_t			m_agno_log;	/* log #ag's */
++	uint8_t			m_agino_log;	/* #bits for agino in inum */
+ 	uint			m_inode_cluster_size;/* min inode buf size */
+ 	uint			m_blockmask;	/* sb_blocksize-1 */
+ 	uint			m_blockwsize;	/* sb_blocksize in words */
+@@ -88,7 +88,7 @@ typedef struct xfs_mount {
+ 	int			m_litino;	/* size of inode union area */
+ 	int			m_inoalign_mask;/* mask sb_inoalignmt if used */
+ 	struct xfs_trans_resv	m_resv;		/* precomputed res values */
+-	__uint64_t		m_maxicount;	/* maximum inode count */
++	uint64_t		m_maxicount;	/* maximum inode count */
+ 	int			m_dalign;	/* stripe unit */
+ 	int			m_swidth;	/* stripe width */
+ 	int			m_sinoalign;	/* stripe unit inode alignmnt */
+@@ -144,12 +144,12 @@ typedef struct xfs_perag {
+ 	char		pagi_init;	/* this agi's entry is initialized */
+ 	char		pagf_metadata;	/* the agf is preferred to be metadata */
+ 	char		pagi_inodeok;	/* The agi is ok for inodes */
+-	__uint8_t	pagf_levels[XFS_BTNUM_AGF];
++	uint8_t		pagf_levels[XFS_BTNUM_AGF];
+ 					/* # of levels in bno & cnt btree */
+-	__uint32_t	pagf_flcount;	/* count of blocks in freelist */
++	uint32_t	pagf_flcount;	/* count of blocks in freelist */
+ 	xfs_extlen_t	pagf_freeblks;	/* total free blocks */
+ 	xfs_extlen_t	pagf_longest;	/* longest free space */
+-	__uint32_t	pagf_btreeblks;	/* # of blocks held in AGF btrees */
++	uint32_t	pagf_btreeblks;	/* # of blocks held in AGF btrees */
+ 	xfs_agino_t	pagi_freecount;	/* number of free inodes */
+ 	xfs_agino_t	pagi_count;	/* number of allocated inodes */
+ 
+@@ -169,7 +169,7 @@ typedef struct xfs_perag {
+ 	struct xfs_ag_resv	pag_agfl_resv;
+ 
+ 	/* reference count */
+-	__uint8_t	pagf_refcount_level;
++	uint8_t		pagf_refcount_level;
+ } xfs_perag_t;
+ 
+ static inline struct xfs_ag_resv *
+diff --git a/libhandle/handle.c b/libhandle/handle.c
+index 236ed22a..00127b3c 100644
+--- a/libhandle/handle.c
++++ b/libhandle/handle.c
+@@ -232,7 +232,7 @@ obj_to_handle(
+ {
+ 	char		hbuf [MAXHANSIZ];
+ 	int		ret;
+-	__uint32_t	handlen;
++	uint32_t	handlen;
+ 	xfs_fsop_handlereq_t hreq;
+ 
+ 	if (opcode == XFS_IOC_FD_TO_HANDLE) {
+diff --git a/libhandle/jdm.c b/libhandle/jdm.c
+index e52f5d83..821061b4 100644
+--- a/libhandle/jdm.c
++++ b/libhandle/jdm.c
+@@ -36,7 +36,7 @@ typedef struct filehandle {
+ 	fshandle_t fh_fshandle;		/* handle of fs containing this inode */
+ 	int16_t fh_sz_following;	/* bytes in handle after this member */
+ 	char fh_pad[FILEHANDLE_SZ_PAD];	/* padding, must be zeroed */
+-	__uint32_t fh_gen;		/* generation count */
++	uint32_t fh_gen;		/* generation count */
+ 	xfs_ino_t fh_ino;		/* 64 bit ino */
+ } filehandle_t;
+ 
+diff --git a/libxcmd/topology.c b/libxcmd/topology.c
+index 8b0276a7..f66dd1bc 100644
+--- a/libxcmd/topology.c
++++ b/libxcmd/topology.c
+@@ -23,19 +23,19 @@
+ #endif /* ENABLE_BLKID */
+ #include "xfs_multidisk.h"
+ 
+-#define TERABYTES(count, blog)	((__uint64_t)(count) << (40 - (blog)))
+-#define GIGABYTES(count, blog)	((__uint64_t)(count) << (30 - (blog)))
+-#define MEGABYTES(count, blog)	((__uint64_t)(count) << (20 - (blog)))
++#define TERABYTES(count, blog)	((uint64_t)(count) << (40 - (blog)))
++#define GIGABYTES(count, blog)	((uint64_t)(count) << (30 - (blog)))
++#define MEGABYTES(count, blog)	((uint64_t)(count) << (20 - (blog)))
+ 
+ void
+ calc_default_ag_geometry(
+ 	int		blocklog,
+-	__uint64_t	dblocks,
++	uint64_t	dblocks,
+ 	int		multidisk,
+-	__uint64_t	*agsize,
+-	__uint64_t	*agcount)
++	uint64_t	*agsize,
++	uint64_t	*agcount)
+ {
+-	__uint64_t	blocks = 0;
++	uint64_t	blocks = 0;
+ 	int		shift = 0;
+ 
+ 	/*
+diff --git a/libxfs/darwin.c b/libxfs/darwin.c
+index 74507e81..16d2c35c 100644
+--- a/libxfs/darwin.c
++++ b/libxfs/darwin.c
+@@ -68,7 +68,7 @@ platform_flush_device(int fd, dev_t device)
+ void
+ platform_findsizes(char *path, int fd, long long *sz, int *bsz)
+ {
+-	__uint64_t	size;
++	uint64_t	size;
+ 	struct stat	st;
+ 
+ 	if (fstat(fd, &st) < 0) {
+diff --git a/libxfs/freebsd.c b/libxfs/freebsd.c
+index 4667d1f5..d7bca142 100644
+--- a/libxfs/freebsd.c
++++ b/libxfs/freebsd.c
+@@ -109,7 +109,7 @@ void
+ platform_findsizes(char *path, int fd, long long *sz, int *bsz)
+ {
+ 	struct stat	st;
+-	__int64_t	size;
++	int64_t		size;
+ 	u_int		ssize;
+ 
+ 	if (fstat(fd, &st) < 0) {
+diff --git a/libxfs/init.c b/libxfs/init.c
+index fc14c5e4..0f41a853 100644
+--- a/libxfs/init.c
++++ b/libxfs/init.c
+@@ -546,7 +546,7 @@ libxfs_initialize_perag(
+ 		 * the max inode percentage.
+ 		 */
+ 		if (mp->m_maxicount) {
+-			__uint64_t	icount;
++			uint64_t	icount;
+ 
+ 			icount = sbp->sb_dblocks * sbp->sb_imax_pct;
+ 			do_div(icount, 100);
+diff --git a/libxfs/irix.c b/libxfs/irix.c
+index 32fcb3e5..0f14aec7 100644
+--- a/libxfs/irix.c
++++ b/libxfs/irix.c
+@@ -22,7 +22,7 @@
+ 
+ int platform_has_uuid = 0;
+ extern char *progname;
+-extern __int64_t findsize(char *);
++extern int64_t findsize(char *);
+ 
+ int
+ platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
+diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
+index b4f766db..d525b667 100644
+--- a/libxfs/libxfs_priv.h
++++ b/libxfs/libxfs_priv.h
+@@ -296,8 +296,8 @@ roundup_pow_of_two(uint v)
+ 	return 0;
+ }
+ 
+-static inline __uint64_t
+-roundup_64(__uint64_t x, __uint32_t y)
++static inline uint64_t
++roundup_64(uint64_t x, uint32_t y)
+ {
+ 	x += y - 1;
+ 	do_div(x, y);
+diff --git a/libxfs/linux.c b/libxfs/linux.c
+index 69f04ad9..0bace3eb 100644
+--- a/libxfs/linux.c
++++ b/libxfs/linux.c
+@@ -163,7 +163,7 @@ void
+ platform_findsizes(char *path, int fd, long long *sz, int *bsz)
+ {
+ 	struct stat	st;
+-	__uint64_t	size;
++	uint64_t	size;
+ 	int		error;
+ 
+ 	if (fstat(fd, &st) < 0) {
+diff --git a/libxfs/logitem.c b/libxfs/logitem.c
+index 7e93f609..466b4421 100644
+--- a/libxfs/logitem.c
++++ b/libxfs/logitem.c
+@@ -121,7 +121,7 @@ xfs_buf_item_init(
+ 	bip->bli_item.li_mountp = mp;
+ 	bip->bli_buf = bp;
+ 	bip->bli_format.blf_type = XFS_LI_BUF;
+-	bip->bli_format.blf_blkno = (__int64_t)XFS_BUF_ADDR(bp);
++	bip->bli_format.blf_blkno = (int64_t)XFS_BUF_ADDR(bp);
+ 	bip->bli_format.blf_len = (unsigned short)BTOBB(XFS_BUF_COUNT(bp));
+ 	XFS_BUF_SET_FSPRIVATE(bp, bip);
+ }
+diff --git a/libxfs/radix-tree.c b/libxfs/radix-tree.c
+index eef9c36d..3f0257fe 100644
+--- a/libxfs/radix-tree.c
++++ b/libxfs/radix-tree.c
+@@ -66,21 +66,21 @@ static unsigned long height_to_maxindex[RADIX_TREE_MAX_PATH];
+ static inline void tag_set(struct radix_tree_node *node, unsigned int tag,
+ 		int offset)
+ {
+-	*((__uint32_t *)node->tags[tag] + (offset >> 5)) |= (1 << (offset & 31));
++	*((uint32_t *)node->tags[tag] + (offset >> 5)) |= (1 << (offset & 31));
+ }
+ 
+ static inline void tag_clear(struct radix_tree_node *node, unsigned int tag,
+ 		int offset)
+ {
+-	__uint32_t 	*p = (__uint32_t*)node->tags[tag] + (offset >> 5);
+-	__uint32_t 	m = 1 << (offset & 31);
++	uint32_t 	*p = (uint32_t*)node->tags[tag] + (offset >> 5);
++	uint32_t 	m = 1 << (offset & 31);
+ 	*p &= ~m;
+ }
+ 
+ static inline int tag_get(struct radix_tree_node *node, unsigned int tag,
+ 		int offset)
+ {
+-	return 1 & (((const __uint32_t *)node->tags[tag])[offset >> 5] >> (offset & 31));
++	return 1 & (((const uint32_t *)node->tags[tag])[offset >> 5] >> (offset & 31));
+ }
+ 
+ /*
+diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
+index 21c42f14..474e5ebc 100644
+--- a/libxfs/rdwr.c
++++ b/libxfs/rdwr.c
+@@ -118,9 +118,9 @@ static void unmount_record(void *p)
+ 	xlog_op_header_t	*op = (xlog_op_header_t *)p;
+ 	/* the data section must be 32 bit size aligned */
+ 	struct {
+-	    __uint16_t magic;
+-	    __uint16_t pad1;
+-	    __uint32_t pad2; /* may as well make it 64 bits */
++	    uint16_t magic;
++	    uint16_t pad1;
++	    uint32_t pad2; /* may as well make it 64 bits */
+ 	} magic = { XLOG_UNMOUNT_TYPE, 0, 0 };
+ 
+ 	memset(p, 0, BBSIZE);
+diff --git a/libxfs/util.c b/libxfs/util.c
+index dcfca397..7938e317 100644
+--- a/libxfs/util.c
++++ b/libxfs/util.c
+@@ -170,8 +170,8 @@ libxfs_trans_ichgtime(
+ 	if (flags & XFS_ICHGTIME_CHG)
+ 		VFS_I(ip)->i_ctime = tv;
+ 	if (flags & XFS_ICHGTIME_CREATE) {
+-		ip->i_d.di_crtime.t_sec = (__int32_t)tv.tv_sec;
+-		ip->i_d.di_crtime.t_nsec = (__int32_t)tv.tv_nsec;
++		ip->i_d.di_crtime.t_sec = (int32_t)tv.tv_sec;
++		ip->i_d.di_crtime.t_nsec = (int32_t)tv.tv_nsec;
+ 	}
+ }
+ 
+@@ -261,8 +261,8 @@ libxfs_ialloc(
+ 		ASSERT(uuid_equal(&ip->i_d.di_uuid, &mp->m_sb.sb_meta_uuid));
+ 		VFS_I(ip)->i_version = 1;
+ 		ip->i_d.di_flags2 = 0;
+-		ip->i_d.di_crtime.t_sec = (__int32_t)VFS_I(ip)->i_mtime.tv_sec;
+-		ip->i_d.di_crtime.t_nsec = (__int32_t)VFS_I(ip)->i_mtime.tv_nsec;
++		ip->i_d.di_crtime.t_sec = (int32_t)VFS_I(ip)->i_mtime.tv_sec;
++		ip->i_d.di_crtime.t_nsec = (int32_t)VFS_I(ip)->i_mtime.tv_nsec;
+ 	}
+ 
+ 	flags = XFS_ILOG_CORE;
+diff --git a/logprint/log_misc.c b/logprint/log_misc.c
+index 0dfcfd19..2fd01ceb 100644
+--- a/logprint/log_misc.c
++++ b/logprint/log_misc.c
+@@ -166,12 +166,12 @@ xlog_print_trans_header(char **ptr, int len)
+ {
+     xfs_trans_header_t  *h;
+     char		*cptr = *ptr;
+-    __uint32_t          magic;
++    uint32_t          magic;
+     char                *magic_c = (char *)&magic;
+ 
+     *ptr += len;
+ 
+-    magic=*(__uint32_t*)cptr; /* XXX be32_to_cpu soon */
++    magic = *(uint32_t *)cptr; /* XXX be32_to_cpu soon */
+ 
+     if (len >= 4) {
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+@@ -201,7 +201,7 @@ xlog_print_trans_buffer(char **ptr, int len, int *i, int num_ops)
+     int			 num, skip;
+     int			 super_block = 0;
+     int			 bucket, col, buckets;
+-    __int64_t		 blkno;
++    int64_t			 blkno;
+     xfs_buf_log_format_t lbuf;
+     int			 size, blen, map_size, struct_size;
+     __be64		 x, y;
+diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
+index 9d1b4e80..c49c13aa 100644
+--- a/mdrestore/xfs_mdrestore.c
++++ b/mdrestore/xfs_mdrestore.c
+@@ -66,7 +66,7 @@ perform_restore(
+ 	int			mb_count;
+ 	xfs_metablock_t		tmb;
+ 	xfs_sb_t		sb;
+-	__int64_t		bytes_read;
++	int64_t			bytes_read;
+ 
+ 	/*
+ 	 * read in first blocks (superblock 0), set "inprogress" flag for it,
+diff --git a/mkfs/proto.c b/mkfs/proto.c
+index 89cd2379..cf8cc391 100644
+--- a/mkfs/proto.c
++++ b/mkfs/proto.c
+@@ -667,7 +667,7 @@ rtinit(
+ 	mp->m_sb.sb_rbmino = rbmip->i_ino;
+ 	rbmip->i_d.di_size = mp->m_sb.sb_rbmblocks * mp->m_sb.sb_blocksize;
+ 	rbmip->i_d.di_flags = XFS_DIFLAG_NEWRTBM;
+-	*(__uint64_t *)&VFS_I(rbmip)->i_atime = 0;
++	*(uint64_t *)&VFS_I(rbmip)->i_atime = 0;
+ 	libxfs_trans_log_inode(tp, rbmip, XFS_ILOG_CORE);
+ 	libxfs_log_sb(tp);
+ 	mp->m_rbmip = rbmip;
+diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
+index b5c3a57e..7bb6408f 100644
+--- a/mkfs/xfs_mkfs.c
++++ b/mkfs/xfs_mkfs.c
+@@ -705,9 +705,9 @@ struct opt_params mopts = {
+ 	},
+ };
+ 
+-#define TERABYTES(count, blog)	((__uint64_t)(count) << (40 - (blog)))
+-#define GIGABYTES(count, blog)	((__uint64_t)(count) << (30 - (blog)))
+-#define MEGABYTES(count, blog)	((__uint64_t)(count) << (20 - (blog)))
++#define TERABYTES(count, blog)	((uint64_t)(count) << (40 - (blog)))
++#define GIGABYTES(count, blog)	((uint64_t)(count) << (30 - (blog)))
++#define MEGABYTES(count, blog)	((uint64_t)(count) << (20 - (blog)))
+ 
+ /*
+  * Use this macro before we have superblock and mount structure
+@@ -878,7 +878,7 @@ fixup_log_stripe_unit(
+ 	xfs_rfsblock_t	*logblocks,
+ 	int		blocklog)
+ {
+-	__uint64_t	tmp_logblocks;
++	uint64_t	tmp_logblocks;
+ 
+ 	/*
+ 	 * Make sure that the log size is a multiple of the stripe unit
+@@ -910,7 +910,7 @@ fixup_internal_log_stripe(
+ 	xfs_mount_t	*mp,
+ 	int		lsflag,
+ 	xfs_fsblock_t	logstart,
+-	__uint64_t	agsize,
++	uint64_t	agsize,
+ 	int		sunit,
+ 	xfs_rfsblock_t	*logblocks,
+ 	int		blocklog,
+@@ -934,7 +934,7 @@ fixup_internal_log_stripe(
+ }
+ 
+ void
+-validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
++validate_log_size(uint64_t logblocks, int blocklog, int min_logblocks)
+ {
+ 	if (logblocks < min_logblocks) {
+ 		fprintf(stderr,
+@@ -959,7 +959,7 @@ validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
+ static int
+ calc_default_imaxpct(
+ 	int		blocklog,
+-	__uint64_t	dblocks)
++	uint64_t	dblocks)
+ {
+ 	/*
+ 	 * This returns the % of the disk space that is used for
+@@ -981,9 +981,9 @@ calc_default_imaxpct(
+ static void
+ validate_ag_geometry(
+ 	int		blocklog,
+-	__uint64_t	dblocks,
+-	__uint64_t	agsize,
+-	__uint64_t	agcount)
++	uint64_t	dblocks,
++	uint64_t	agsize,
++	uint64_t	agcount)
+ {
+ 	if (agsize < XFS_AG_MIN_BLOCKS(blocklog)) {
+ 		fprintf(stderr,
+@@ -1059,7 +1059,7 @@ zero_old_xfs_structures(
+ {
+ 	void 			*buf;
+ 	xfs_sb_t 		sb;
+-	__uint32_t		bsize;
++	uint32_t		bsize;
+ 	int			i;
+ 	xfs_off_t		off;
+ 
+@@ -1112,8 +1112,8 @@ zero_old_xfs_structures(
+ 			i != sb.sb_blocklog)
+ 		goto done;
+ 
+-	if (sb.sb_dblocks > ((__uint64_t)sb.sb_agcount * sb.sb_agblocks) ||
+-			sb.sb_dblocks < ((__uint64_t)(sb.sb_agcount - 1) *
++	if (sb.sb_dblocks > ((uint64_t)sb.sb_agcount * sb.sb_agblocks) ||
++			sb.sb_dblocks < ((uint64_t)(sb.sb_agcount - 1) *
+ 					 sb.sb_agblocks + XFS_MIN_AG_BLOCKS))
+ 		goto done;
+ 
+@@ -1133,7 +1133,7 @@ done:
+ }
+ 
+ static void
+-discard_blocks(dev_t dev, __uint64_t nsectors)
++discard_blocks(dev_t dev, uint64_t nsectors)
+ {
+ 	int fd;
+ 
+@@ -1395,11 +1395,11 @@ main(
+ 	int			argc,
+ 	char			**argv)
+ {
+-	__uint64_t		agcount;
++	uint64_t		agcount;
+ 	xfs_agf_t		*agf;
+ 	xfs_agi_t		*agi;
+ 	xfs_agnumber_t		agno;
+-	__uint64_t		agsize;
++	uint64_t		agsize;
+ 	xfs_alloc_rec_t		*arec;
+ 	struct xfs_btree_block	*block;
+ 	int			blflag;
+@@ -1475,10 +1475,10 @@ main(
+ 	char			*rtsize;
+ 	xfs_sb_t		*sbp;
+ 	int			sectorlog;
+-	__uint64_t		sector_mask;
++	uint64_t		sector_mask;
+ 	int			slflag;
+ 	int			ssflag;
+-	__uint64_t		tmp_agsize;
++	uint64_t		tmp_agsize;
+ 	uuid_t			uuid;
+ 	int			worst_freelist;
+ 	libxfs_init_t		xi;
+@@ -2167,7 +2167,7 @@ _("rmapbt not supported with realtime devices\n"));
+ 
+ 
+ 	if (dsize) {
+-		__uint64_t dbytes;
++		uint64_t dbytes;
+ 
+ 		dbytes = getnum(dsize, &dopts, D_SIZE);
+ 		if (dbytes % XFS_MIN_BLOCKSIZE) {
+@@ -2199,7 +2199,7 @@ _("rmapbt not supported with realtime devices\n"));
+ 	}
+ 
+ 	if (logsize) {
+-		__uint64_t logbytes;
++		uint64_t logbytes;
+ 
+ 		logbytes = getnum(logsize, &lopts, L_SIZE);
+ 		if (logbytes % XFS_MIN_BLOCKSIZE) {
+@@ -2216,7 +2216,7 @@ _("rmapbt not supported with realtime devices\n"));
+ 				(long long)(logblocks << blocklog));
+ 	}
+ 	if (rtsize) {
+-		__uint64_t rtbytes;
++		uint64_t rtbytes;
+ 
+ 		rtbytes = getnum(rtsize, &ropts, R_SIZE);
+ 		if (rtbytes % XFS_MIN_BLOCKSIZE) {
+@@ -2236,7 +2236,7 @@ _("rmapbt not supported with realtime devices\n"));
+ 	 * If specified, check rt extent size against its constraints.
+ 	 */
+ 	if (rtextsize) {
+-		__uint64_t rtextbytes;
++		uint64_t rtextbytes;
+ 
+ 		rtextbytes = getnum(rtextsize, &ropts, R_EXTSIZE);
+ 		if (rtextbytes % blocksize) {
+@@ -2252,8 +2252,8 @@ _("rmapbt not supported with realtime devices\n"));
+ 		 * and the underlying volume is striped, then set rtextblocks
+ 		 * to the stripe width.
+ 		 */
+-		__uint64_t	rswidth;
+-		__uint64_t	rtextbytes;
++		uint64_t	rswidth;
++		uint64_t	rtextbytes;
+ 
+ 		if (!norsflag && !xi.risfile && !(!rtsize && xi.disfile))
+ 			rswidth = ft.rtswidth;
+@@ -2335,10 +2335,10 @@ _("rmapbt not supported with realtime devices\n"));
+ 	 * multiple of the sector size, or 1024, whichever is larger.
+ 	 */
+ 
+-	sector_mask = (__uint64_t)-1 << (MAX(sectorlog, 10) - BBSHIFT);
++	sector_mask = (uint64_t)-1 << (MAX(sectorlog, 10) - BBSHIFT);
+ 	xi.dsize &= sector_mask;
+ 	xi.rtsize &= sector_mask;
+-	xi.logBBsize &= (__uint64_t)-1 << (MAX(lsectorlog, 10) - BBSHIFT);
++	xi.logBBsize &= (uint64_t)-1 << (MAX(lsectorlog, 10) - BBSHIFT);
+ 
+ 
+ 	/* don't do discards on print-only runs or on files */
+@@ -2696,9 +2696,9 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
+ 	mp = &mbuf;
+ 	sbp = &mp->m_sb;
+ 	memset(mp, 0, sizeof(xfs_mount_t));
+-	sbp->sb_blocklog = (__uint8_t)blocklog;
+-	sbp->sb_sectlog = (__uint8_t)sectorlog;
+-	sbp->sb_agblklog = (__uint8_t)libxfs_log2_roundup((unsigned int)agsize);
++	sbp->sb_blocklog = (uint8_t)blocklog;
++	sbp->sb_sectlog = (uint8_t)sectorlog;
++	sbp->sb_agblklog = (uint8_t)libxfs_log2_roundup((unsigned int)agsize);
+ 	sbp->sb_agblocks = (xfs_agblock_t)agsize;
+ 	mp->m_blkbb_log = sbp->sb_blocklog - BBSHIFT;
+ 	mp->m_sectbb_log = sbp->sb_sectlog - BBSHIFT;
+@@ -2805,14 +2805,14 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
+ 	sbp->sb_agcount = (xfs_agnumber_t)agcount;
+ 	sbp->sb_rbmblocks = nbmblocks;
+ 	sbp->sb_logblocks = (xfs_extlen_t)logblocks;
+-	sbp->sb_sectsize = (__uint16_t)sectorsize;
+-	sbp->sb_inodesize = (__uint16_t)isize;
+-	sbp->sb_inopblock = (__uint16_t)(blocksize / isize);
+-	sbp->sb_sectlog = (__uint8_t)sectorlog;
+-	sbp->sb_inodelog = (__uint8_t)inodelog;
+-	sbp->sb_inopblog = (__uint8_t)(blocklog - inodelog);
++	sbp->sb_sectsize = (uint16_t)sectorsize;
++	sbp->sb_inodesize = (uint16_t)isize;
++	sbp->sb_inopblock = (uint16_t)(blocksize / isize);
++	sbp->sb_sectlog = (uint8_t)sectorlog;
++	sbp->sb_inodelog = (uint8_t)inodelog;
++	sbp->sb_inopblog = (uint8_t)(blocklog - inodelog);
+ 	sbp->sb_rextslog =
+-		(__uint8_t)(rtextents ?
++		(uint8_t)(rtextents ?
+ 			libxfs_highbit32((unsigned int)rtextents) : 0);
+ 	sbp->sb_inprogress = 1;	/* mkfs is in progress */
+ 	sbp->sb_imax_pct = imaxpct;
+@@ -2840,8 +2840,8 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
+ 	} else
+ 		sbp->sb_inoalignmt = 0;
+ 	if (lsectorsize != BBSIZE || sectorsize != BBSIZE) {
+-		sbp->sb_logsectlog = (__uint8_t)lsectorlog;
+-		sbp->sb_logsectsize = (__uint16_t)lsectorsize;
++		sbp->sb_logsectlog = (uint8_t)lsectorlog;
++		sbp->sb_logsectsize = (uint16_t)lsectorsize;
+ 	} else {
+ 		sbp->sb_logsectlog = 0;
+ 		sbp->sb_logsectsize = 0;
+diff --git a/quota/edit.c b/quota/edit.c
+index 36b327a5..8418e858 100644
+--- a/quota/edit.c
++++ b/quota/edit.c
+@@ -115,16 +115,16 @@ warn_help(void)
+ 
+ static void
+ set_limits(
+-	__uint32_t	id,
++	uint32_t	id,
+ 	uint		type,
+ 	uint		mask,
+ 	char		*dev,
+-	__uint64_t	*bsoft,
+-	__uint64_t	*bhard,
+-	__uint64_t	*isoft,
+-	__uint64_t	*ihard,
+-	__uint64_t	*rtbsoft,
+-	__uint64_t	*rtbhard)
++	uint64_t	*bsoft,
++	uint64_t	*bhard,
++	uint64_t	*isoft,
++	uint64_t	*ihard,
++	uint64_t	*rtbsoft,
++	uint64_t	*rtbhard)
+ {
+ 	fs_disk_quota_t	d;
+ 
+@@ -152,12 +152,12 @@ set_user_limits(
+ 	char		*name,
+ 	uint		type,
+ 	uint		mask,
+-	__uint64_t	*bsoft,
+-	__uint64_t	*bhard,
+-	__uint64_t	*isoft,
+-	__uint64_t	*ihard,
+-	__uint64_t	*rtbsoft,
+-	__uint64_t	*rtbhard)
++	uint64_t	*bsoft,
++	uint64_t	*bhard,
++	uint64_t	*isoft,
++	uint64_t	*ihard,
++	uint64_t	*rtbsoft,
++	uint64_t	*rtbhard)
+ {
+ 	uid_t		uid = uid_from_string(name);
+ 
+@@ -175,12 +175,12 @@ set_group_limits(
+ 	char		*name,
+ 	uint		type,
+ 	uint		mask,
+-	__uint64_t	*bsoft,
+-	__uint64_t	*bhard,
+-	__uint64_t	*isoft,
+-	__uint64_t	*ihard,
+-	__uint64_t	*rtbsoft,
+-	__uint64_t	*rtbhard)
++	uint64_t	*bsoft,
++	uint64_t	*bhard,
++	uint64_t	*isoft,
++	uint64_t	*ihard,
++	uint64_t	*rtbsoft,
++	uint64_t	*rtbhard)
+ {
+ 	gid_t		gid = gid_from_string(name);
+ 
+@@ -198,12 +198,12 @@ set_project_limits(
+ 	char		*name,
+ 	uint		type,
+ 	uint		mask,
+-	__uint64_t	*bsoft,
+-	__uint64_t	*bhard,
+-	__uint64_t	*isoft,
+-	__uint64_t	*ihard,
+-	__uint64_t	*rtbsoft,
+-	__uint64_t	*rtbhard)
++	uint64_t	*bsoft,
++	uint64_t	*bhard,
++	uint64_t	*isoft,
++	uint64_t	*ihard,
++	uint64_t	*rtbsoft,
++	uint64_t	*rtbhard)
+ {
+ 	prid_t		prid = prid_from_string(name);
+ 
+@@ -224,7 +224,7 @@ extractb(
+ 	int		length,
+ 	uint		blocksize,
+ 	uint		sectorsize,
+-	__uint64_t	*value)
++	uint64_t	*value)
+ {
+ 	long long	v;
+ 	char		*s = string;
+@@ -238,7 +238,7 @@ extractb(
+ 				progname, s);
+ 			return 0;
+ 		}
+-		*value = (__uint64_t)v >> 9;	/* syscalls use basic blocks */
++		*value = (uint64_t)v >> 9;	/* syscalls use basic blocks */
+ 		if (v > 0 && *value == 0)
+ 			fprintf(stderr, _("%s: Warning: `%s' in quota blocks is 0 (unlimited).\n"), progname, s);
+ 		return 1;
+@@ -252,7 +252,7 @@ extracti(
+ 	char		*string,
+ 	const char	*prefix,
+ 	int		length,
+-	__uint64_t	*value)
++	uint64_t	*value)
+ {
+ 	char		*sp, *s = string;
+ 
+@@ -270,7 +270,7 @@ limit_f(
+ 	char		**argv)
+ {
+ 	char		*name;
+-	__uint64_t	bsoft, bhard, isoft, ihard, rtbsoft, rtbhard;
++	uint64_t	bsoft, bhard, isoft, ihard, rtbsoft, rtbhard;
+ 	int		c, type = 0, mask = 0, flags = 0;
+ 	uint		bsize, ssize, endoptions;
+ 
+@@ -384,8 +384,8 @@ restore_file(
+ 	char		*dev = NULL;
+ 	uint		mask;
+ 	int		cnt;
+-	__uint32_t	id;
+-	__uint64_t	bsoft, bhard, isoft, ihard, rtbsoft, rtbhard;
++	uint32_t	id;
++	uint64_t	bsoft, bhard, isoft, ihard, rtbsoft, rtbhard;
+ 
+ 	while (fgets(buffer, sizeof(buffer), fp) != NULL) {
+ 		if (strncmp("fs = ", buffer, 5) == 0) {
+@@ -546,7 +546,7 @@ timer_f(
+ 
+ static void
+ set_warnings(
+-	__uint32_t	id,
++	uint32_t	id,
+ 	uint		type,
+ 	uint		mask,
+ 	char		*dev,
+diff --git a/quota/free.c b/quota/free.c
+index cee15ee9..1f8378d2 100644
+--- a/quota/free.c
++++ b/quota/free.c
+@@ -49,20 +49,20 @@ free_help(void)
+ static int
+ mount_free_space_data(
+ 	struct fs_path		*mount,
+-	__uint64_t		*bcount,
+-	__uint64_t		*bused,
+-	__uint64_t		*bfree,
+-	__uint64_t		*icount,
+-	__uint64_t		*iused,
+-	__uint64_t		*ifree,
+-	__uint64_t		*rcount,
+-	__uint64_t		*rused,
+-	__uint64_t		*rfree)
++	uint64_t		*bcount,
++	uint64_t		*bused,
++	uint64_t		*bfree,
++	uint64_t		*icount,
++	uint64_t		*iused,
++	uint64_t		*ifree,
++	uint64_t		*rcount,
++	uint64_t		*rused,
++	uint64_t		*rfree)
+ {
+ 	struct xfs_fsop_counts	fscounts;
+ 	struct xfs_fsop_geom	fsgeo;
+ 	struct statfs		st;
+-	__uint64_t		logsize, count, free;
++	uint64_t		logsize, count, free;
+ 	int			fd;
+ 
+ 	if ((fd = open(mount->fs_dir, O_RDONLY)) < 0) {
+@@ -132,15 +132,15 @@ mount_free_space_data(
+ static int
+ projects_free_space_data(
+ 	struct fs_path		*path,
+-	__uint64_t		*bcount,
+-	__uint64_t		*bused,
+-	__uint64_t		*bfree,
+-	__uint64_t		*icount,
+-	__uint64_t		*iused,
+-	__uint64_t		*ifree,
+-	__uint64_t		*rcount,
+-	__uint64_t		*rused,
+-	__uint64_t		*rfree)
++	uint64_t		*bcount,
++	uint64_t		*bused,
++	uint64_t		*bfree,
++	uint64_t		*icount,
++	uint64_t		*iused,
++	uint64_t		*ifree,
++	uint64_t		*rcount,
++	uint64_t		*rused,
++	uint64_t		*rfree)
+ {
+ 	fs_quota_stat_t		qfs;
+ 	fs_disk_quota_t		d;
+@@ -226,9 +226,9 @@ free_space(
+ 	fs_path_t	*path,
+ 	uint		flags)
+ {
+-	__uint64_t	bcount, bused, bfree;
+-	__uint64_t	icount, iused, ifree;
+-	__uint64_t	rcount, rused, rfree;
++	uint64_t	bcount, bused, bfree;
++	uint64_t	icount, iused, ifree;
++	uint64_t	rcount, rused, rfree;
+ 	char		a[8], s[8], u[8], p[8];
+ 	int		count;
+ 
+diff --git a/quota/quot.c b/quota/quot.c
+index ccc154f5..6378fbb7 100644
+--- a/quota/quot.c
++++ b/quota/quot.c
+@@ -26,17 +26,17 @@
+ 
+ typedef struct du {
+ 	struct du	*next;
+-	__uint64_t	blocks;
+-	__uint64_t	blocks30;
+-	__uint64_t	blocks60;
+-	__uint64_t	blocks90;
+-	__uint64_t	nfiles;
+-	__uint32_t	id;
++	uint64_t	blocks;
++	uint64_t	blocks30;
++	uint64_t	blocks60;
++	uint64_t	blocks90;
++	uint64_t	nfiles;
++	uint32_t	id;
+ } du_t;
+ 
+ #define	TSIZE		500
+-static __uint64_t	sizes[TSIZE];
+-static __uint64_t	overflow;
++static uint64_t	sizes[TSIZE];
++static uint64_t	overflow;
+ 
+ #define	NDU		60000
+ #define	DUHASH		8209
+@@ -84,8 +84,8 @@ quot_bulkstat_add(
+ {
+ 	du_t		*dp;
+ 	du_t		**hp;
+-	__uint64_t	size;
+-	__uint32_t	i, id;
++	uint64_t	size;
++	uint32_t	i, id;
+ 
+ 	if ((p->bs_mode & S_IFMT) == 0)
+ 		return;
+@@ -203,7 +203,7 @@ qcompare(
+ 	return 0;
+ }
+ 
+-typedef char *(*idtoname_t)(__uint32_t);
++typedef char *(*idtoname_t)(uint32_t);
+ 
+ static void
+ quot_report_mount_any_type(
+@@ -291,7 +291,7 @@ quot_histogram_mount(
+ 	fs_path_t	*mount,
+ 	uint		flags)
+ {
+-	__uint64_t	t = 0;
++	uint64_t	t = 0;
+ 	int		i;
+ 
+ 	fprintf(fp, _("%s (%s):\n"), mount->fs_name, mount->fs_dir);
+diff --git a/quota/quota.c b/quota/quota.c
+index d09e239b..479b970e 100644
+--- a/quota/quota.c
++++ b/quota/quota.c
+@@ -52,7 +52,7 @@ quota_help(void)
+ static int
+ quota_mount(
+ 	FILE		*fp,
+-	__uint32_t	id,
++	uint32_t	id,
+ 	char		*name,
+ 	uint		form,
+ 	uint		type,
+@@ -181,7 +181,7 @@ quota_mount(
+ static void
+ quota(
+ 	FILE		*fp,
+-	__uint32_t	id,
++	uint32_t	id,
+ 	char		*name,
+ 	uint		form,
+ 	uint		type,
+diff --git a/quota/quota.h b/quota/quota.h
+index 4bde3513..9ed28bee 100644
+--- a/quota/quota.h
++++ b/quota/quota.h
+@@ -53,9 +53,9 @@ enum {
+ extern char *type_to_string(uint __type);
+ extern char *form_to_string(uint __form);
+ extern char *time_to_string(time_t __time, uint __flags);
+-extern char *bbs_to_string(__uint64_t __v, char *__c, uint __size);
+-extern char *num_to_string(__uint64_t __v, char *__c, uint __size);
+-extern char *pct_to_string(__uint64_t __v, __uint64_t __t, char *__c, uint __s);
++extern char *bbs_to_string(uint64_t __v, char *__c, uint __size);
++extern char *num_to_string(uint64_t __v, char *__c, uint __size);
++extern char *pct_to_string(uint64_t __v, uint64_t __t, char *__c, uint __s);
+ 
+ extern FILE *fopen_write_secure(char *__filename);
+ 
+@@ -81,7 +81,7 @@ enum {
+  * Identifier (uid/gid/prid) cache routines
+  */
+ #define NMAX 32
+-extern char *uid_to_name(__uint32_t __uid);
+-extern char *gid_to_name(__uint32_t __gid);
+-extern char *prid_to_name(__uint32_t __prid);
++extern char *uid_to_name(uint32_t __uid);
++extern char *gid_to_name(uint32_t __gid);
++extern char *prid_to_name(uint32_t __prid);
+ extern bool isdigits_only(const char *);
+diff --git a/quota/report.c b/quota/report.c
+index d0509c25..b2ea3bbe 100644
+--- a/quota/report.c
++++ b/quota/report.c
+@@ -333,9 +333,9 @@ report_header(
+ static int
+ report_mount(
+ 	FILE		*fp,
+-	__uint32_t	id,
++	uint32_t	id,
+ 	char		*name,
+-	__uint32_t	*oid,
++	uint32_t	*oid,
+ 	uint		form,
+ 	uint		type,
+ 	fs_path_t	*mount,
+diff --git a/quota/state.c b/quota/state.c
+index 09dfa705..b08bf50b 100644
+--- a/quota/state.c
++++ b/quota/state.c
+@@ -135,7 +135,7 @@ static void
+ state_timelimit(
+ 	FILE		*fp,
+ 	uint		form,
+-	__uint32_t	timelimit)
++	uint32_t	timelimit)
+ {
+ 	fprintf(fp, _("%s grace time: %s\n"),
+ 		form_to_string(form),
+diff --git a/quota/util.c b/quota/util.c
+index cafd45f5..37840a86 100644
+--- a/quota/util.c
++++ b/quota/util.c
+@@ -94,8 +94,8 @@ round_snprintf(
+ 	size_t		size,
+ 	const char	*fmt_round,
+ 	const char	*fmt_not_round,
+-	__uint64_t	value,
+-	__uint64_t	divisor)
++	uint64_t	value,
++	uint64_t	divisor)
+ {
+ 	double		v = (double)value / divisor;
+ 
+@@ -107,23 +107,23 @@ round_snprintf(
+ }
+ 
+ /* Basic blocks (512) bytes are returned from quotactl */
+-#define BBS_TO_EXABYTES(bbs)	((__uint64_t)(bbs)>>51)
+-#define BBS_TO_PETABYTES(bbs)	((__uint64_t)(bbs)>>41)
+-#define BBS_TO_TERABYTES(bbs)	((__uint64_t)(bbs)>>31)
+-#define BBS_TO_GIGABYTES(bbs)	((__uint64_t)(bbs)>>21)
+-#define BBS_TO_MEGABYTES(bbs)	((__uint64_t)(bbs)>>11)
+-#define BBS_TO_KILOBYTES(bbs)	((__uint64_t)(bbs)>>1)
+-
+-#define BBEXABYTE		((__uint64_t)1<<51)
+-#define BBPETABYTE		((__uint64_t)1<<41)
+-#define BBTERABYTE		((__uint64_t)1<<31)
+-#define BBGIGABYTE		((__uint64_t)1<<21)
+-#define BBMEGABYTE		((__uint64_t)1<<11)
+-#define BBKILOBYTE		((__uint64_t)1<< 1)
++#define BBS_TO_EXABYTES(bbs)	((uint64_t)(bbs)>>51)
++#define BBS_TO_PETABYTES(bbs)	((uint64_t)(bbs)>>41)
++#define BBS_TO_TERABYTES(bbs)	((uint64_t)(bbs)>>31)
++#define BBS_TO_GIGABYTES(bbs)	((uint64_t)(bbs)>>21)
++#define BBS_TO_MEGABYTES(bbs)	((uint64_t)(bbs)>>11)
++#define BBS_TO_KILOBYTES(bbs)	((uint64_t)(bbs)>>1)
++
++#define BBEXABYTE		((uint64_t)1<<51)
++#define BBPETABYTE		((uint64_t)1<<41)
++#define BBTERABYTE		((uint64_t)1<<31)
++#define BBGIGABYTE		((uint64_t)1<<21)
++#define BBMEGABYTE		((uint64_t)1<<11)
++#define BBKILOBYTE		((uint64_t)1<< 1)
+ 
+ char *
+ bbs_to_string(
+-	__uint64_t	v,
++	uint64_t	v,
+ 	char		*sp,
+ 	uint		size)
+ {
+@@ -146,17 +146,17 @@ bbs_to_string(
+ 	return sp;
+ }
+ 
+-#define THOUSAND		((__uint64_t)1000)
+-#define MILLION			((__uint64_t)1000*1000)
+-#define BILLION			((__uint64_t)1000*1000*1000)
+-#define TRILLION		((__uint64_t)1000*1000*1000*1000)
+-#define GAZILLION		((__uint64_t)1000*1000*1000*1000*1000)
+-#define RIDICULOUS		((__uint64_t)1000*1000*1000*1000*1000*1000)
+-#define STOPALREADY		((__uint64_t)1000*1000*1000*1000*1000*1000*1000)
++#define THOUSAND		((uint64_t)1000)
++#define MILLION			((uint64_t)1000*1000)
++#define BILLION			((uint64_t)1000*1000*1000)
++#define TRILLION		((uint64_t)1000*1000*1000*1000)
++#define GAZILLION		((uint64_t)1000*1000*1000*1000*1000)
++#define RIDICULOUS		((uint64_t)1000*1000*1000*1000*1000*1000)
++#define STOPALREADY		((uint64_t)1000*1000*1000*1000*1000*1000*1000)
+ 
+ char *
+ num_to_string(
+-	__uint64_t	v,
++	uint64_t	v,
+ 	char		*sp,
+ 	uint		size)
+ {
+@@ -183,8 +183,8 @@ num_to_string(
+ 
+ char *
+ pct_to_string(
+-	__uint64_t	portion,
+-	__uint64_t	whole,
++	uint64_t	portion,
++	uint64_t	whole,
+ 	char		*buf,
+ 	uint		size)
+ {
+@@ -237,7 +237,7 @@ type_to_string(
+ #define IDMASK		(NID-1)
+ 
+ typedef struct {
+-	__uint32_t	id;
++	uint32_t	id;
+ 	char		name[NMAX+1];
+ } idcache_t;
+ 
+@@ -250,7 +250,7 @@ static int		pentriesleft = NID;
+ 
+ static idcache_t *
+ getnextpwent(
+-	__uint32_t	id,
++	uint32_t	id,
+ 	int		byid)
+ {
+ 	struct passwd	*pw;
+@@ -266,7 +266,7 @@ getnextpwent(
+ 
+ static idcache_t *
+ getnextgrent(
+-	__uint32_t	id,
++	uint32_t	id,
+ 	int		byid)
+ {
+ 	struct group	*gr;
+@@ -281,7 +281,7 @@ getnextgrent(
+ 
+ static idcache_t *
+ getnextprent(
+-	__uint32_t	id,
++	uint32_t	id,
+ 	int		byid)
+ {
+ 	fs_project_t	*pr;
+@@ -296,7 +296,7 @@ getnextprent(
+ 
+ char *
+ uid_to_name(
+-	__uint32_t	id)
++	uint32_t	id)
+ {
+ 	idcache_t	*ncp, *idp;
+ 
+@@ -333,7 +333,7 @@ uid_to_name(
+ 
+ char *
+ gid_to_name(
+-	__uint32_t	id)
++	uint32_t	id)
+ {
+ 	idcache_t	*ncp, *idp;
+ 
+@@ -370,7 +370,7 @@ gid_to_name(
+ 
+ char *
+ prid_to_name(
+-	__uint32_t	id)
++	uint32_t	id)
+ {
+ 	idcache_t	*ncp, *idp;
+ 
+diff --git a/repair/README b/repair/README
+index 7f168e69..4692463d 100644
+--- a/repair/README
++++ b/repair/README
+@@ -189,7 +189,7 @@ D - 0) look at usage of XFS_MAKE_IPTR().  It does the right
+ 
+ 
+ D - 0) look at references to XFS_INODES_PER_CHUNK.  change the
+-	ones that really mean sizeof(__uint64_t)*NBBY to
++	ones that really mean sizeof(uint64_t)*NBBY to
+ 	something else (like that only defined as a constant
+ 	INOS_PER_IREC. this isn't as important since
+ 	XFS_INODES_PER_CHUNK will never chang
+diff --git a/repair/agheader.h b/repair/agheader.h
+index 6b2974ca..2f7246d2 100644
+--- a/repair/agheader.h
++++ b/repair/agheader.h
+@@ -20,7 +20,7 @@ typedef struct fs_geometry  {
+ 	/*
+ 	 * these types should match the superblock types
+ 	 */
+-	__uint32_t	sb_blocksize;	/* blocksize (bytes) */
++	uint32_t	sb_blocksize;	/* blocksize (bytes) */
+ 	xfs_rfsblock_t	sb_dblocks;	/* # data blocks */
+ 	xfs_rfsblock_t	sb_rblocks;	/* # realtime blocks */
+ 	xfs_rtblock_t	sb_rextents;	/* # realtime extents */
+@@ -30,9 +30,9 @@ typedef struct fs_geometry  {
+ 	xfs_agnumber_t	sb_agcount;	/* # of ags */
+ 	xfs_extlen_t	sb_rbmblocks;	/* # of rt bitmap blocks */
+ 	xfs_extlen_t	sb_logblocks;	/* # of log blocks */
+-	__uint16_t	sb_sectsize;	/* volume sector size (bytes) */
+-	__uint16_t	sb_inodesize;	/* inode size (bytes) */
+-	__uint8_t	sb_imax_pct;	/* max % of fs for inode space */
++	uint16_t	sb_sectsize;	/* volume sector size (bytes) */
++	uint16_t	sb_inodesize;	/* inode size (bytes) */
++	uint8_t		sb_imax_pct;	/* max % of fs for inode space */
+ 
+ 	/*
+ 	 * these don't have to match the superblock types but are placed
+@@ -49,10 +49,10 @@ typedef struct fs_geometry  {
+ 	/*
+ 	 * fields after this point have to be checked manually in compare_sb()
+ 	 */
+-	__uint8_t	sb_shared_vn;	/* shared version number */
++	uint8_t		sb_shared_vn;	/* shared version number */
+ 	xfs_extlen_t	sb_inoalignmt;	/* inode chunk alignment, fsblocks */
+-	__uint32_t	sb_unit;	/* stripe or raid unit */
+-	__uint32_t	sb_width;	/* stripe or width unit */
++	uint32_t	sb_unit;	/* stripe or raid unit */
++	uint32_t	sb_width;	/* stripe or width unit */
+ 
+ 	/*
+ 	 * these don't have to match, they track superblock properties
+diff --git a/repair/attr_repair.h b/repair/attr_repair.h
+index 7010e4ff..294fad44 100644
+--- a/repair/attr_repair.h
++++ b/repair/attr_repair.h
+@@ -32,10 +32,10 @@
+ #define ACL_WRITE	02
+ #define ACL_EXECUTE	01
+ 
+-typedef __uint16_t	xfs_acl_perm_t;
+-typedef __int32_t	xfs_acl_type_t;
+-typedef __int32_t	xfs_acl_tag_t;
+-typedef __int32_t	xfs_acl_id_t;
++typedef uint16_t	xfs_acl_perm_t;
++typedef int32_t		xfs_acl_type_t;
++typedef int32_t		xfs_acl_tag_t;
++typedef int32_t		xfs_acl_id_t;
+ 
+ /*
+  * "icacl" = in-core ACL. There is no equivalent in the XFS kernel code,
+@@ -50,7 +50,7 @@ struct xfs_icacl_entry {
+ };
+ 
+ struct xfs_icacl {
+-	__int32_t		acl_cnt;
++	int32_t			acl_cnt;
+ 	struct xfs_icacl_entry	acl_entry[0];
+ };
+ 
+@@ -59,14 +59,14 @@ struct xfs_icacl {
+  */
+ #define XFS_MAC_MAX_SETS	250
+ typedef struct xfs_mac_label {
+-	__uint8_t       ml_msen_type;	/* MSEN label type */
+-	__uint8_t       ml_mint_type;	/* MINT label type */
+-	__uint8_t       ml_level;	/* Hierarchical level */
+-	__uint8_t       ml_grade;	/* Hierarchical grade */
+-	__uint16_t      ml_catcount;	/* Category count */
+-	__uint16_t      ml_divcount;	/* Division count */
++	uint8_t       ml_msen_type;	/* MSEN label type */
++	uint8_t       ml_mint_type;	/* MINT label type */
++	uint8_t       ml_level;	/* Hierarchical level */
++	uint8_t       ml_grade;	/* Hierarchical grade */
++	uint16_t      ml_catcount;	/* Category count */
++	uint16_t      ml_divcount;	/* Division count */
+ 					/* Category set, then Division set */
+-	__uint16_t      ml_list[XFS_MAC_MAX_SETS];
++	uint16_t      ml_list[XFS_MAC_MAX_SETS];
+ } xfs_mac_label_t;
+ 
+ /* MSEN label type names. Choose an upper case ASCII character.  */
+@@ -93,7 +93,7 @@ typedef struct xfs_mac_label {
+ /*
+  * Capabilities (IRIX)
+  */
+-typedef __uint64_t xfs_cap_value_t;
++typedef uint64_t xfs_cap_value_t;
+ 
+ typedef struct xfs_cap_set {
+ 	xfs_cap_value_t	cap_effective;  /* use in capability checks */
+diff --git a/repair/avl64.c b/repair/avl64.c
+index 51cd624c..8f4a1211 100644
+--- a/repair/avl64.c
++++ b/repair/avl64.c
+@@ -70,8 +70,8 @@ avl64_checktree(
+ 	avl64node_t *root)
+ {
+ 	avl64node_t *nlast, *nnext, *np;
+-	__uint64_t offset = 0;
+-	__uint64_t end;
++	uint64_t offset = 0;
++	uint64_t end;
+ 
+ 	nlast = nnext = root;
+ 
+@@ -583,8 +583,8 @@ attach:
+ avl64node_t *
+ avl64_findanyrange(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t start,
+-	__uint64_t end,
++	uint64_t start,
++	uint64_t end,
+ 	int	checklen)
+ {
+ 	avl64node_t *np = tree->avl_root;
+@@ -655,7 +655,7 @@ avl64_findanyrange(
+ avl64node_t *
+ avl64_findrange(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t value)
++	uint64_t value)
+ {
+ 	avl64node_t *np = tree->avl_root;
+ 
+@@ -682,10 +682,10 @@ avl64_findrange(
+ avl64node_t *
+ avl64_find(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t value)
++	uint64_t value)
+ {
+ 	avl64node_t *np = tree->avl_root;
+-	__uint64_t nvalue;
++	uint64_t nvalue;
+ 
+ 	while (np) {
+ 		nvalue = AVL_START(tree, np);
+@@ -909,8 +909,8 @@ static
+ avl64node_t *
+ avl64_insert_find_growth(
+ 		avl64tree_desc_t *tree,
+-		__uint64_t start,	/* range start at start, */
+-		__uint64_t end,	/* exclusive */
++		uint64_t start,	/* range start at start, */
++		uint64_t end,	/* exclusive */
+ 		int   *growthp)	/* OUT */
+ {
+ 	avl64node_t *root = tree->avl_root;
+@@ -963,7 +963,7 @@ avl64_insert_grow(
+ 	int growth)
+ {
+ 	avl64node_t *nnext;
+-	__uint64_t start = AVL_START(tree, newnode);
++	uint64_t start = AVL_START(tree, newnode);
+ 
+ 	if (growth == AVL_BACK) {
+ 
+@@ -1005,8 +1005,8 @@ avl64_insert(
+ 	avl64node_t *newnode)
+ {
+ 	avl64node_t *np;
+-	__uint64_t start = AVL_START(tree, newnode);
+-	__uint64_t end = AVL_END(tree, newnode);
++	uint64_t start = AVL_START(tree, newnode);
++	uint64_t end = AVL_END(tree, newnode);
+ 	int growth;
+ 
+ 	ASSERT(newnode);
+@@ -1159,16 +1159,16 @@ avl64ops_t avl_debug_ops = {
+ 	avl_debug_end,
+ }
+ 
+-static __uint64_t
++static uint64_t
+ avl64_debug_start(avl64node_t *node)
+ {
+-	return (__uint64_t)(struct avl_debug_node *)node->avl_start;
++	return (uint64_t)(struct avl_debug_node *)node->avl_start;
+ }
+ 
+-static __uint64_t
++static uint64_t
+ avl64_debug_end(avl64node_t *node)
+ {
+-	return (__uint64_t)
++	return (uint64_t)
+ 		((struct avl_debug_node *)node->avl_start +
+ 		 (struct avl_debug_node *)node->avl_size);
+ }
+@@ -1304,7 +1304,7 @@ main()
+ avl64node_t *
+ avl64_findadjacent(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t value,
++	uint64_t value,
+ 	int		dir)
+ {
+ 	avl64node_t *np = tree->avl_root;
+@@ -1378,8 +1378,8 @@ avl64_findadjacent(
+ void
+ avl64_findranges(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t start,
+-	__uint64_t end,
++	uint64_t start,
++	uint64_t end,
+ 	avl64node_t	        **startp,
+ 	avl64node_t		**endp)
+ {
+diff --git a/repair/avl64.h b/repair/avl64.h
+index fd193218..cd079a00 100644
+--- a/repair/avl64.h
++++ b/repair/avl64.h
+@@ -32,8 +32,8 @@ typedef struct	avl64node {
+  * avl-tree operations
+  */
+ typedef struct avl64ops {
+-	__uint64_t	(*avl_start)(avl64node_t *);
+-	__uint64_t	(*avl_end)(avl64node_t *);
++	uint64_t	(*avl_start)(avl64node_t *);
++	uint64_t	(*avl_end)(avl64node_t *);
+ } avl64ops_t;
+ 
+ /*
+@@ -89,32 +89,32 @@ avl64_init_tree(
+ avl64node_t *
+ avl64_findrange(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t value);
++	uint64_t value);
+ 
+ avl64node_t *
+ avl64_find(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t value);
++	uint64_t value);
+ 
+ avl64node_t *
+ avl64_findanyrange(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t	start,
+-	__uint64_t	end,
++	uint64_t	start,
++	uint64_t	end,
+ 	int     checklen);
+ 
+ 
+ avl64node_t *
+ avl64_findadjacent(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t	value,
++	uint64_t	value,
+ 	int		dir);
+ 
+ void
+ avl64_findranges(
+ 	avl64tree_desc_t *tree,
+-	__uint64_t	start,
+-	__uint64_t	end,
++	uint64_t	start,
++	uint64_t	end,
+ 	avl64node_t	        **startp,
+ 	avl64node_t		**endp);
+ 
+diff --git a/repair/dinode.c b/repair/dinode.c
+index d664f87a..da872178 100644
+--- a/repair/dinode.c
++++ b/repair/dinode.c
+@@ -746,7 +746,7 @@ _("%s fork in ino %" PRIu64 " claims dup extent, "
+ 			case XR_E_FREE1:
+ 				do_warn(
+ _("%s fork in ino %" PRIu64 " claims free block %" PRIu64 "\n"),
+-					forkname, ino, (__uint64_t) b);
++					forkname, ino, (uint64_t) b);
+ 				/* fall through ... */
+ 			case XR_E_INUSE1:	/* seen by rmap */
+ 			case XR_E_UNKNOWN:
+@@ -923,7 +923,7 @@ process_btinode(
+ 	int			type,
+ 	int			*dirty,
+ 	xfs_rfsblock_t		*tot,
+-	__uint64_t		*nex,
++	uint64_t		*nex,
+ 	blkmap_t		**blkmapp,
+ 	int			whichfork,
+ 	int			check_dups)
+@@ -939,7 +939,7 @@ process_btinode(
+ 	int			level;
+ 	int			numrecs;
+ 	bmap_cursor_t		cursor;
+-	__uint64_t		magic;
++	uint64_t		magic;
+ 
+ 	dib = (xfs_bmdr_block_t *)XFS_DFORK_PTR(dip, whichfork);
+ 	lino = XFS_AGINO_TO_INO(mp, agno, ino);
+@@ -1098,7 +1098,7 @@ process_exinode(
+ 	int			type,
+ 	int			*dirty,
+ 	xfs_rfsblock_t		*tot,
+-	__uint64_t		*nex,
++	uint64_t		*nex,
+ 	blkmap_t		**blkmapp,
+ 	int			whichfork,
+ 	int			check_dups)
+@@ -1200,14 +1200,14 @@ process_symlink_extlist(xfs_mount_t *mp, xfs_ino_t lino, xfs_dinode_t *dino)
+ 		do_warn(
+ _("mismatch between format (%d) and size (%" PRId64 ") in symlink ino %" PRIu64 "\n"),
+ 			dino->di_format,
+-			(__int64_t)be64_to_cpu(dino->di_size), lino);
++			(int64_t)be64_to_cpu(dino->di_size), lino);
+ 		return 1;
+ 	}
+ 	if (dino->di_format == XFS_DINODE_FMT_LOCAL) {
+ 		do_warn(
+ _("mismatch between format (%d) and size (%" PRId64 ") in symlink inode %" PRIu64 "\n"),
+ 			dino->di_format,
+-			(__int64_t)be64_to_cpu(dino->di_size), lino);
++			(int64_t)be64_to_cpu(dino->di_size), lino);
+ 		return 1;
+ 	}
+ 
+@@ -1454,22 +1454,22 @@ _("inode %" PRIu64 " has bad inode type (IFMNT)\n"), lino);
+ 		case XR_INO_CHRDEV:
+ 			do_warn(
+ _("size of character device inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
+-				(__int64_t)be64_to_cpu(dino->di_size));
++				(int64_t)be64_to_cpu(dino->di_size));
+ 			break;
+ 		case XR_INO_BLKDEV:
+ 			do_warn(
+ _("size of block device inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
+-				(__int64_t)be64_to_cpu(dino->di_size));
++				(int64_t)be64_to_cpu(dino->di_size));
+ 			break;
+ 		case XR_INO_SOCK:
+ 			do_warn(
+ _("size of socket inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
+-				(__int64_t)be64_to_cpu(dino->di_size));
++				(int64_t)be64_to_cpu(dino->di_size));
+ 			break;
+ 		case XR_INO_FIFO:
+ 			do_warn(
+ _("size of fifo inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
+-				(__int64_t)be64_to_cpu(dino->di_size));
++				(int64_t)be64_to_cpu(dino->di_size));
+ 			break;
+ 		default:
+ 			do_warn(_("Internal error - process_misc_ino_types, "
+@@ -1743,12 +1743,12 @@ _("found inode %" PRIu64 " claiming to be a real-time file\n"), lino);
+ 		break;
+ 
+ 	case XR_INO_RTBITMAP:
+-		if (size != (__int64_t)mp->m_sb.sb_rbmblocks *
++		if (size != (int64_t)mp->m_sb.sb_rbmblocks *
+ 					mp->m_sb.sb_blocksize) {
+ 			do_warn(
+ _("realtime bitmap inode %" PRIu64 " has bad size %" PRId64 " (should be %" PRIu64 ")\n"),
+ 				lino, size,
+-				(__int64_t) mp->m_sb.sb_rbmblocks *
++				(int64_t) mp->m_sb.sb_rbmblocks *
+ 					mp->m_sb.sb_blocksize);
+ 			return 1;
+ 		}
+@@ -1817,8 +1817,8 @@ static int
+ process_inode_blocks_and_extents(
+ 	xfs_dinode_t	*dino,
+ 	xfs_rfsblock_t	nblocks,
+-	__uint64_t	nextents,
+-	__uint64_t	anextents,
++	uint64_t	nextents,
++	uint64_t	anextents,
+ 	xfs_ino_t	lino,
+ 	int		*dirty)
+ {
+@@ -1908,7 +1908,7 @@ process_inode_data_fork(
+ 	int		type,
+ 	int		*dirty,
+ 	xfs_rfsblock_t	*totblocks,
+-	__uint64_t	*nextents,
++	uint64_t	*nextents,
+ 	blkmap_t	**dblkmap,
+ 	int		check_dups)
+ {
+@@ -2017,7 +2017,7 @@ process_inode_attr_fork(
+ 	int		type,
+ 	int		*dirty,
+ 	xfs_rfsblock_t	*atotblocks,
+-	__uint64_t	*anextents,
++	uint64_t	*anextents,
+ 	int		check_dups,
+ 	int		extra_attr_check,
+ 	int		*retval)
+@@ -2228,8 +2228,8 @@ process_dinode_int(xfs_mount_t *mp,
+ 	int			di_mode;
+ 	int			type;
+ 	int			retval = 0;
+-	__uint64_t		nextents;
+-	__uint64_t		anextents;
++	uint64_t		nextents;
++	uint64_t		anextents;
+ 	xfs_ino_t		lino;
+ 	const int		is_free = 0;
+ 	const int		is_used = 1;
+@@ -2346,7 +2346,7 @@ _("inode identifier %llu mismatch on inode %" PRIu64 "\n"),
+ 		if (!uncertain)
+ 			do_warn(
+ _("bad (negative) size %" PRId64 " on inode %" PRIu64 "\n"),
+-				(__int64_t)be64_to_cpu(dino->di_size),
++				(int64_t)be64_to_cpu(dino->di_size),
+ 				lino);
+ 		if (verify_mode)
+ 			return 1;
+diff --git a/repair/dinode.h b/repair/dinode.h
+index 61d07363..39d6a72f 100644
+--- a/repair/dinode.h
++++ b/repair/dinode.h
+@@ -46,8 +46,8 @@ process_bmbt_reclist(xfs_mount_t	*mp,
+ 		xfs_ino_t		ino,
+ 		xfs_rfsblock_t		*tot,
+ 		struct blkmap		**blkmapp,
+-		__uint64_t		*first_key,
+-		__uint64_t		*last_key,
++		uint64_t		*first_key,
++		uint64_t		*last_key,
+ 		int			whichfork);
+ 
+ int
+diff --git a/repair/dir2.c b/repair/dir2.c
+index e6415e49..73dff902 100644
+--- a/repair/dir2.c
++++ b/repair/dir2.c
+@@ -160,7 +160,7 @@ process_sf_dir2(
+ 	int			bad_sfnamelen;
+ 	int			i;
+ 	int			i8;
+-	__int64_t		ino_dir_size;
++	int64_t			ino_dir_size;
+ 	int			ino_off;
+ 	ino_tree_node_t		*irec_p;
+ 	int			junkit;
+diff --git a/repair/globals.h b/repair/globals.h
+index 4085ccc4..c7bbe6f1 100644
+--- a/repair/globals.h
++++ b/repair/globals.h
+@@ -141,7 +141,7 @@ EXTERN int		inodes_per_cluster;
+ EXTERN unsigned int	glob_agcount;
+ EXTERN int		chunks_pblock;	/* # of 64-ino chunks per allocation */
+ EXTERN int		max_symlink_blocks;
+-EXTERN __int64_t	fs_max_file_offset;
++EXTERN int64_t		fs_max_file_offset;
+ 
+ /* realtime info */
+ 
+@@ -161,24 +161,24 @@ EXTERN int		full_ino_ex_data;/*
+ 
+ /* superblock counters */
+ 
+-EXTERN __uint64_t	sb_icount;	/* allocated (made) inodes */
+-EXTERN __uint64_t	sb_ifree;	/* free inodes */
+-EXTERN __uint64_t	sb_fdblocks;	/* free data blocks */
+-EXTERN __uint64_t	sb_frextents;	/* free realtime extents */
++EXTERN uint64_t	sb_icount;	/* allocated (made) inodes */
++EXTERN uint64_t	sb_ifree;	/* free inodes */
++EXTERN uint64_t	sb_fdblocks;	/* free data blocks */
++EXTERN uint64_t	sb_frextents;	/* free realtime extents */
+ 
+ /* superblock geometry info */
+ 
+ EXTERN xfs_extlen_t	sb_inoalignmt;
+-EXTERN __uint32_t	sb_unit;
+-EXTERN __uint32_t	sb_width;
++EXTERN uint32_t	sb_unit;
++EXTERN uint32_t	sb_width;
+ 
+ struct aglock {
+ 	pthread_mutex_t	lock __attribute__((__aligned__(64)));
+ };
+ EXTERN struct aglock	*ag_locks;
+ 
+-EXTERN int 		report_interval;
+-EXTERN __uint64_t 	*prog_rpt_done;
++EXTERN int		report_interval;
++EXTERN uint64_t		*prog_rpt_done;
+ 
+ EXTERN int		ag_stride;
+ EXTERN int		thread_count;
+diff --git a/repair/incore.c b/repair/incore.c
+index cb573165..a9191ae2 100644
+--- a/repair/incore.c
++++ b/repair/incore.c
+@@ -179,7 +179,7 @@ get_bmap_ext(
+ static uint64_t		*rt_bmap;
+ static size_t		rt_bmap_size;
+ 
+-/* block records fit into __uint64_t's units */
++/* block records fit into uint64_t's units */
+ #define XR_BB_UNIT	64			/* number of bits/unit */
+ #define XR_BB		4			/* bits per block record */
+ #define XR_BB_NUM	(XR_BB_UNIT/XR_BB)	/* number of records per unit */
+@@ -203,8 +203,8 @@ set_rtbmap(
+ {
+ 	*(rt_bmap + bno / XR_BB_NUM) =
+ 	 ((*(rt_bmap + bno / XR_BB_NUM) &
+-	  (~((__uint64_t) XR_BB_MASK << ((bno % XR_BB_NUM) * XR_BB)))) |
+-	 (((__uint64_t) state) << ((bno % XR_BB_NUM) * XR_BB)));
++	  (~((uint64_t) XR_BB_MASK << ((bno % XR_BB_NUM) * XR_BB)))) |
++	 (((uint64_t) state) << ((bno % XR_BB_NUM) * XR_BB)));
+ }
+ 
+ static void
+@@ -222,9 +222,9 @@ init_rt_bmap(
+ 		return;
+ 
+ 	rt_bmap_size = roundup(mp->m_sb.sb_rextents / (NBBY / XR_BB),
+-			       sizeof(__uint64_t));
++			       sizeof(uint64_t));
+ 
+-	rt_bmap = memalign(sizeof(__uint64_t), rt_bmap_size);
++	rt_bmap = memalign(sizeof(uint64_t), rt_bmap_size);
+ 	if (!rt_bmap) {
+ 		do_error(
+ 	_("couldn't allocate realtime block map, size = %" PRIu64 "\n"),
+diff --git a/repair/incore.h b/repair/incore.h
+index c23a3a3c..fd66084f 100644
+--- a/repair/incore.h
++++ b/repair/incore.h
+@@ -257,7 +257,7 @@ typedef xfs_ino_t parent_entry_t;
+ struct nlink_ops;
+ 
+ typedef struct parent_list  {
+-	__uint64_t		pmask;
++	uint64_t		pmask;
+ 	parent_entry_t		*pentries;
+ #ifdef DEBUG
+ 	short			cnt;
+@@ -265,14 +265,14 @@ typedef struct parent_list  {
+ } parent_list_t;
+ 
+ union ino_nlink {
+-	__uint8_t	*un8;
+-	__uint16_t	*un16;
+-	__uint32_t	*un32;
++	uint8_t		*un8;
++	uint16_t	*un16;
++	uint32_t	*un32;
+ };
+ 
+ typedef struct ino_ex_data  {
+-	__uint64_t		ino_reached;	/* bit == 1 if reached */
+-	__uint64_t		ino_processed;	/* reference checked bit mask */
++	uint64_t		ino_reached;	/* bit == 1 if reached */
++	uint64_t		ino_processed;	/* reference checked bit mask */
+ 	parent_list_t		*parents;
+ 	union ino_nlink		counted_nlinks;/* counted nlinks in P6 */
+ } ino_ex_data_t;
+@@ -281,22 +281,22 @@ typedef struct ino_tree_node  {
+ 	avlnode_t		avl_node;
+ 	xfs_agino_t		ino_startnum;	/* starting inode # */
+ 	xfs_inofree_t		ir_free;	/* inode free bit mask */
+-	__uint64_t		ir_sparse;	/* sparse inode bitmask */
+-	__uint64_t		ino_confirmed;	/* confirmed bitmask */
+-	__uint64_t		ino_isa_dir;	/* bit == 1 if a directory */
+-	__uint64_t		ino_was_rl;	/* bit == 1 if reflink flag set */
+-	__uint64_t		ino_is_rl;	/* bit == 1 if reflink flag should be set */
+-	__uint8_t		nlink_size;
++	uint64_t		ir_sparse;	/* sparse inode bitmask */
++	uint64_t		ino_confirmed;	/* confirmed bitmask */
++	uint64_t		ino_isa_dir;	/* bit == 1 if a directory */
++	uint64_t		ino_was_rl;	/* bit == 1 if reflink flag set */
++	uint64_t		ino_is_rl;	/* bit == 1 if reflink flag should be set */
++	uint8_t			nlink_size;
+ 	union ino_nlink		disk_nlinks;	/* on-disk nlinks, set in P3 */
+ 	union  {
+ 		ino_ex_data_t	*ex_data;	/* phases 6,7 */
+ 		parent_list_t	*plist;		/* phases 2-5 */
+ 	} ino_un;
+-	__uint8_t		*ftypes;	/* phases 3,6 */
++	uint8_t			*ftypes;	/* phases 3,6 */
+ } ino_tree_node_t;
+ 
+-#define INOS_PER_IREC	(sizeof(__uint64_t) * NBBY)
+-#define	IREC_MASK(i)	((__uint64_t)1 << (i))
++#define INOS_PER_IREC	(sizeof(uint64_t) * NBBY)
++#define	IREC_MASK(i)	((uint64_t)1 << (i))
+ 
+ void		add_ino_ex_data(xfs_mount_t *mp);
+ 
+@@ -543,10 +543,10 @@ static inline int inode_is_rl(struct ino_tree_node *irec, int offset)
+  */
+ void add_inode_ref(struct ino_tree_node *irec, int offset);
+ void drop_inode_ref(struct ino_tree_node *irec, int offset);
+-__uint32_t num_inode_references(struct ino_tree_node *irec, int offset);
++uint32_t num_inode_references(struct ino_tree_node *irec, int offset);
+ 
+-void set_inode_disk_nlinks(struct ino_tree_node *irec, int offset, __uint32_t nlinks);
+-__uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int offset);
++void set_inode_disk_nlinks(struct ino_tree_node *irec, int offset, uint32_t nlinks);
++uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int offset);
+ 
+ static inline int is_inode_reached(struct ino_tree_node *irec, int offset)
+ {
+@@ -567,13 +567,13 @@ static inline void add_inode_reached(struct ino_tree_node *irec, int offset)
+ static inline void
+ set_inode_ftype(struct ino_tree_node *irec,
+ 	int		ino_offset,
+-	__uint8_t	ftype)
++	uint8_t		ftype)
+ {
+ 	if (irec->ftypes)
+ 		irec->ftypes[ino_offset] = ftype;
+ }
+ 
+-static inline __uint8_t
++static inline uint8_t
+ get_inode_ftype(
+ 	struct ino_tree_node *irec,
+ 	int		ino_offset)
+@@ -606,11 +606,11 @@ typedef struct bm_level_state  {
+ 	xfs_fsblock_t		fsbno;
+ 	xfs_fsblock_t		left_fsbno;
+ 	xfs_fsblock_t		right_fsbno;
+-	__uint64_t		first_key;
+-	__uint64_t		last_key;
++	uint64_t		first_key;
++	uint64_t		last_key;
+ /*
+ 	int			level;
+-	__uint64_t		prev_last_key;
++	uint64_t		prev_last_key;
+ 	xfs_buf_t		*bp;
+ 	xfs_bmbt_block_t	*block;
+ */
+diff --git a/repair/incore_ext.c b/repair/incore_ext.c
+index 7e6786c5..0a8138a9 100644
+--- a/repair/incore_ext.c
++++ b/repair/incore_ext.c
+@@ -721,13 +721,13 @@ search_rt_dup_extent(xfs_mount_t *mp, xfs_rtblock_t bno)
+ 	return(ret);
+ }
+ 
+-static __uint64_t
++static uint64_t
+ avl64_rt_ext_start(avl64node_t *node)
+ {
+ 	return(((rt_extent_tree_node_t *) node)->rt_startblock);
+ }
+ 
+-static __uint64_t
++static uint64_t
+ avl64_ext_end(avl64node_t *node)
+ {
+ 	return(((rt_extent_tree_node_t *) node)->rt_startblock +
+@@ -834,7 +834,7 @@ count_extents(xfs_agnumber_t agno, avltree_desc_t *tree, int whichtree)
+ int
+ count_bno_extents_blocks(xfs_agnumber_t agno, uint *numblocks)
+ {
+-	__uint64_t nblocks;
++	uint64_t nblocks;
+ 	extent_tree_node_t *node;
+ 	int i = 0;
+ 
+diff --git a/repair/incore_ino.c b/repair/incore_ino.c
+index 2ec17657..3b6b44d4 100644
+--- a/repair/incore_ino.c
++++ b/repair/incore_ino.c
+@@ -38,7 +38,7 @@ static avltree_desc_t	**inode_uncertain_tree_ptrs;
+ /* memory optimised nlink counting for all inodes */
+ 
+ static void *
+-alloc_nlink_array(__uint8_t nlink_size)
++alloc_nlink_array(uint8_t nlink_size)
+ {
+ 	void *ptr;
+ 
+@@ -51,10 +51,10 @@ alloc_nlink_array(__uint8_t nlink_size)
+ static void
+ nlink_grow_8_to_16(ino_tree_node_t *irec)
+ {
+-	__uint16_t	*new_nlinks;
++	uint16_t	*new_nlinks;
+ 	int		i;
+ 
+-	irec->nlink_size = sizeof(__uint16_t);
++	irec->nlink_size = sizeof(uint16_t);
+ 
+ 	new_nlinks = alloc_nlink_array(irec->nlink_size);
+ 	for (i = 0; i < XFS_INODES_PER_CHUNK; i++)
+@@ -76,10 +76,10 @@ nlink_grow_8_to_16(ino_tree_node_t *irec)
+ static void
+ nlink_grow_16_to_32(ino_tree_node_t *irec)
+ {
+-	__uint32_t	*new_nlinks;
++	uint32_t	*new_nlinks;
+ 	int		i;
+ 
+-	irec->nlink_size = sizeof(__uint32_t);
++	irec->nlink_size = sizeof(uint32_t);
+ 
+ 	new_nlinks = alloc_nlink_array(irec->nlink_size);
+ 	for (i = 0; i < XFS_INODES_PER_CHUNK; i++)
+@@ -104,21 +104,21 @@ void add_inode_ref(struct ino_tree_node *irec, int ino_offset)
+ 	ASSERT(irec->ino_un.ex_data != NULL);
+ 
+ 	switch (irec->nlink_size) {
+-	case sizeof(__uint8_t):
++	case sizeof(uint8_t):
+ 		if (irec->ino_un.ex_data->counted_nlinks.un8[ino_offset] < 0xff) {
+ 			irec->ino_un.ex_data->counted_nlinks.un8[ino_offset]++;
+ 			break;
+ 		}
+ 		nlink_grow_8_to_16(irec);
+ 		/*FALLTHRU*/
+-	case sizeof(__uint16_t):
++	case sizeof(uint16_t):
+ 		if (irec->ino_un.ex_data->counted_nlinks.un16[ino_offset] < 0xffff) {
+ 			irec->ino_un.ex_data->counted_nlinks.un16[ino_offset]++;
+ 			break;
+ 		}
+ 		nlink_grow_16_to_32(irec);
+ 		/*FALLTHRU*/
+-	case sizeof(__uint32_t):
++	case sizeof(uint32_t):
+ 		irec->ino_un.ex_data->counted_nlinks.un32[ino_offset]++;
+ 		break;
+ 	default:
+@@ -128,20 +128,20 @@ void add_inode_ref(struct ino_tree_node *irec, int ino_offset)
+ 
+ void drop_inode_ref(struct ino_tree_node *irec, int ino_offset)
+ {
+-	__uint32_t	refs = 0;
++	uint32_t	refs = 0;
+ 
+ 	ASSERT(irec->ino_un.ex_data != NULL);
+ 
+ 	switch (irec->nlink_size) {
+-	case sizeof(__uint8_t):
++	case sizeof(uint8_t):
+ 		ASSERT(irec->ino_un.ex_data->counted_nlinks.un8[ino_offset] > 0);
+ 		refs = --irec->ino_un.ex_data->counted_nlinks.un8[ino_offset];
+ 		break;
+-	case sizeof(__uint16_t):
++	case sizeof(uint16_t):
+ 		ASSERT(irec->ino_un.ex_data->counted_nlinks.un16[ino_offset] > 0);
+ 		refs = --irec->ino_un.ex_data->counted_nlinks.un16[ino_offset];
+ 		break;
+-	case sizeof(__uint32_t):
++	case sizeof(uint32_t):
+ 		ASSERT(irec->ino_un.ex_data->counted_nlinks.un32[ino_offset] > 0);
+ 		refs = --irec->ino_un.ex_data->counted_nlinks.un32[ino_offset];
+ 		break;
+@@ -153,16 +153,16 @@ void drop_inode_ref(struct ino_tree_node *irec, int ino_offset)
+ 		irec->ino_un.ex_data->ino_reached &= ~IREC_MASK(ino_offset);
+ }
+ 
+-__uint32_t num_inode_references(struct ino_tree_node *irec, int ino_offset)
++uint32_t num_inode_references(struct ino_tree_node *irec, int ino_offset)
+ {
+ 	ASSERT(irec->ino_un.ex_data != NULL);
+ 
+ 	switch (irec->nlink_size) {
+-	case sizeof(__uint8_t):
++	case sizeof(uint8_t):
+ 		return irec->ino_un.ex_data->counted_nlinks.un8[ino_offset];
+-	case sizeof(__uint16_t):
++	case sizeof(uint16_t):
+ 		return irec->ino_un.ex_data->counted_nlinks.un16[ino_offset];
+-	case sizeof(__uint32_t):
++	case sizeof(uint32_t):
+ 		return irec->ino_un.ex_data->counted_nlinks.un32[ino_offset];
+ 	default:
+ 		ASSERT(0);
+@@ -171,24 +171,24 @@ __uint32_t num_inode_references(struct ino_tree_node *irec, int ino_offset)
+ }
+ 
+ void set_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset,
+-		__uint32_t nlinks)
++		uint32_t nlinks)
+ {
+ 	switch (irec->nlink_size) {
+-	case sizeof(__uint8_t):
++	case sizeof(uint8_t):
+ 		if (nlinks < 0xff) {
+ 			irec->disk_nlinks.un8[ino_offset] = nlinks;
+ 			break;
+ 		}
+ 		nlink_grow_8_to_16(irec);
+ 		/*FALLTHRU*/
+-	case sizeof(__uint16_t):
++	case sizeof(uint16_t):
+ 		if (nlinks < 0xffff) {
+ 			irec->disk_nlinks.un16[ino_offset] = nlinks;
+ 			break;
+ 		}
+ 		nlink_grow_16_to_32(irec);
+ 		/*FALLTHRU*/
+-	case sizeof(__uint32_t):
++	case sizeof(uint32_t):
+ 		irec->disk_nlinks.un32[ino_offset] = nlinks;
+ 		break;
+ 	default:
+@@ -196,14 +196,14 @@ void set_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset,
+ 	}
+ }
+ 
+-__uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset)
++uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset)
+ {
+ 	switch (irec->nlink_size) {
+-	case sizeof(__uint8_t):
++	case sizeof(uint8_t):
+ 		return irec->disk_nlinks.un8[ino_offset];
+-	case sizeof(__uint16_t):
++	case sizeof(uint16_t):
+ 		return irec->disk_nlinks.un16[ino_offset];
+-	case sizeof(__uint32_t):
++	case sizeof(uint32_t):
+ 		return irec->disk_nlinks.un32[ino_offset];
+ 	default:
+ 		ASSERT(0);
+@@ -211,11 +211,11 @@ __uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset)
+ 	return 0;
+ }
+ 
+-static __uint8_t *
++static uint8_t *
+ alloc_ftypes_array(
+ 	struct xfs_mount *mp)
+ {
+-	__uint8_t	*ptr;
++	uint8_t		*ptr;
+ 
+ 	if (!xfs_sb_version_hasftype(&mp->m_sb))
+ 		return NULL;
+@@ -262,23 +262,23 @@ alloc_ino_node(
+ 	irec->ir_free = (xfs_inofree_t) - 1;
+ 	irec->ir_sparse = 0;
+ 	irec->ino_un.ex_data = NULL;
+-	irec->nlink_size = sizeof(__uint8_t);
++	irec->nlink_size = sizeof(uint8_t);
+ 	irec->disk_nlinks.un8 = alloc_nlink_array(irec->nlink_size);
+ 	irec->ftypes = alloc_ftypes_array(mp);
+ 	return irec;
+ }
+ 
+ static void
+-free_nlink_array(union ino_nlink nlinks, __uint8_t nlink_size)
++free_nlink_array(union ino_nlink nlinks, uint8_t nlink_size)
+ {
+ 	switch (nlink_size) {
+-	case sizeof(__uint8_t):
++	case sizeof(uint8_t):
+ 		free(nlinks.un8);
+ 		break;
+-	case sizeof(__uint16_t):
++	case sizeof(uint16_t):
+ 		free(nlinks.un16);
+ 		break;
+-	case sizeof(__uint32_t):
++	case sizeof(uint32_t):
+ 		free(nlinks.un32);
+ 		break;
+ 	default:
+@@ -609,7 +609,7 @@ set_inode_parent(
+ 	int			i;
+ 	int			cnt;
+ 	int			target;
+-	__uint64_t		bitmask;
++	uint64_t		bitmask;
+ 	parent_entry_t		*tmp;
+ 
+ 	if (full_ino_ex_data)
+@@ -699,7 +699,7 @@ set_inode_parent(
+ xfs_ino_t
+ get_inode_parent(ino_tree_node_t *irec, int offset)
+ {
+-	__uint64_t	bitmask;
++	uint64_t	bitmask;
+ 	parent_list_t	*ptbl;
+ 	int		i;
+ 	int		target;
+@@ -740,15 +740,15 @@ alloc_ex_data(ino_tree_node_t *irec)
+ 	irec->ino_un.ex_data->parents = ptbl;
+ 
+ 	switch (irec->nlink_size) {
+-	case sizeof(__uint8_t):
++	case sizeof(uint8_t):
+ 		irec->ino_un.ex_data->counted_nlinks.un8 =
+ 			alloc_nlink_array(irec->nlink_size);
+ 		break;
+-	case sizeof(__uint16_t):
++	case sizeof(uint16_t):
+ 		irec->ino_un.ex_data->counted_nlinks.un16 =
+ 			alloc_nlink_array(irec->nlink_size);
+ 		break;
+-	case sizeof(__uint32_t):
++	case sizeof(uint32_t):
+ 		irec->ino_un.ex_data->counted_nlinks.un32 =
+ 			alloc_nlink_array(irec->nlink_size);
+ 		break;
+diff --git a/repair/phase2.c b/repair/phase2.c
+index c21778b8..0085732b 100644
+--- a/repair/phase2.c
++++ b/repair/phase2.c
+@@ -179,7 +179,7 @@ phase2(
+ 
+ 	bad_ino_btree = 0;
+ 
+-	set_progress_msg(PROG_FMT_SCAN_AG, (__uint64_t) glob_agcount);
++	set_progress_msg(PROG_FMT_SCAN_AG, (uint64_t) glob_agcount);
+ 
+ 	scan_ags(mp, scan_threads);
+ 
+diff --git a/repair/phase3.c b/repair/phase3.c
+index 0890a27d..17b1c28d 100644
+--- a/repair/phase3.c
++++ b/repair/phase3.c
+@@ -122,7 +122,7 @@ phase3(
+ 	else
+ 		do_log(_("        - scan (but don't clear) agi unlinked lists...\n"));
+ 
+-	set_progress_msg(PROG_FMT_AGI_UNLINKED, (__uint64_t) glob_agcount);
++	set_progress_msg(PROG_FMT_AGI_UNLINKED, (uint64_t) glob_agcount);
+ 
+ 	/* first clear the agi unlinked AGI list */
+ 	if (!no_modify) {
+@@ -142,7 +142,7 @@ phase3(
+ 	do_log(_(
+ 	    "        - process known inodes and perform inode discovery...\n"));
+ 
+-	set_progress_msg(PROG_FMT_PROCESS_INO, (__uint64_t) mp->m_sb.sb_icount);
++	set_progress_msg(PROG_FMT_PROCESS_INO, (uint64_t) mp->m_sb.sb_icount);
+ 
+ 	process_ags(mp);
+ 
+@@ -152,7 +152,7 @@ phase3(
+ 	 * process newly discovered inode chunks
+ 	 */
+ 	do_log(_("        - process newly discovered inodes...\n"));
+-	set_progress_msg(PROG_FMT_NEW_INODES, (__uint64_t) glob_agcount);
++	set_progress_msg(PROG_FMT_NEW_INODES, (uint64_t) glob_agcount);
+ 
+ 	counts = calloc(sizeof(*counts), mp->m_sb.sb_agcount);
+ 	if (!counts) {
+diff --git a/repair/phase4.c b/repair/phase4.c
+index e59464b1..cc17ec03 100644
+--- a/repair/phase4.c
++++ b/repair/phase4.c
+@@ -290,7 +290,7 @@ phase4(xfs_mount_t *mp)
+ 	do_log(_("Phase 4 - check for duplicate blocks...\n"));
+ 	do_log(_("        - setting up duplicate extent list...\n"));
+ 
+-	set_progress_msg(PROG_FMT_DUP_EXTENT, (__uint64_t) glob_agcount);
++	set_progress_msg(PROG_FMT_DUP_EXTENT, (uint64_t) glob_agcount);
+ 
+ 	irec = find_inode_rec(mp, XFS_INO_TO_AGNO(mp, mp->m_sb.sb_rootino),
+ 				XFS_INO_TO_AGINO(mp, mp->m_sb.sb_rootino));
+@@ -404,7 +404,7 @@ phase4(xfs_mount_t *mp)
+ 	reset_bmaps(mp);
+ 
+ 	do_log(_("        - check for inodes claiming duplicate blocks...\n"));
+-	set_progress_msg(PROG_FMT_DUP_BLOCKS, (__uint64_t) mp->m_sb.sb_icount);
++	set_progress_msg(PROG_FMT_DUP_BLOCKS, (uint64_t) mp->m_sb.sb_icount);
+ 
+ 	/*
+ 	 * ok, now process the inodes -- signal 2-pass check per inode.
+diff --git a/repair/phase5.c b/repair/phase5.c
+index 0b833f13..21dce67a 100644
+--- a/repair/phase5.c
++++ b/repair/phase5.c
+@@ -86,9 +86,9 @@ struct agi_stat {
+ 	xfs_agino_t		freecount;
+ };
+ 
+-static __uint64_t	*sb_icount_ag;		/* allocated inodes per ag */
+-static __uint64_t	*sb_ifree_ag;		/* free inodes per ag */
+-static __uint64_t	*sb_fdblocks_ag;	/* free data blocks per ag */
++static uint64_t	*sb_icount_ag;		/* allocated inodes per ag */
++static uint64_t	*sb_ifree_ag;		/* free inodes per ag */
++static uint64_t	*sb_fdblocks_ag;	/* free data blocks per ag */
+ 
+ static int
+ mk_incore_fstree(xfs_mount_t *mp, xfs_agnumber_t agno)
+@@ -886,10 +886,10 @@ build_freespace_tree(xfs_mount_t *mp, xfs_agnumber_t agno,
+  */
+ static void
+ init_ino_cursor(xfs_mount_t *mp, xfs_agnumber_t agno, bt_status_t *btree_curs,
+-		__uint64_t *num_inos, __uint64_t *num_free_inos, int finobt)
++		uint64_t *num_inos, uint64_t *num_free_inos, int finobt)
+ {
+-	__uint64_t		ninos;
+-	__uint64_t		nfinos;
++	uint64_t		ninos;
++	uint64_t		nfinos;
+ 	int			rec_nfinos;
+ 	int			rec_ninos;
+ 	ino_tree_node_t		*ino_rec;
+@@ -2193,10 +2193,10 @@ phase5_func(
+ 	xfs_agnumber_t	agno,
+ 	struct xfs_slab	*lost_fsb)
+ {
+-	__uint64_t	num_inos;
+-	__uint64_t	num_free_inos;
+-	__uint64_t	finobt_num_inos;
+-	__uint64_t	finobt_num_free_inos;
++	uint64_t	num_inos;
++	uint64_t	num_free_inos;
++	uint64_t	finobt_num_inos;
++	uint64_t	finobt_num_free_inos;
+ 	bt_status_t	bno_btree_curs;
+ 	bt_status_t	bcnt_btree_curs;
+ 	bt_status_t	ino_btree_curs;
+@@ -2471,7 +2471,7 @@ phase5(xfs_mount_t *mp)
+ 	int			error;
+ 
+ 	do_log(_("Phase 5 - rebuild AG headers and trees...\n"));
+-	set_progress_msg(PROG_FMT_REBUILD_AG, (__uint64_t )glob_agcount);
++	set_progress_msg(PROG_FMT_REBUILD_AG, (uint64_t)glob_agcount);
+ 
+ #ifdef XR_BLD_FREE_TRACE
+ 	fprintf(stderr, "inobt level 1, maxrec = %d, minrec = %d\n",
+@@ -2497,15 +2497,15 @@ phase5(xfs_mount_t *mp)
+ 	keep_fsinos(mp);
+ 
+ 	/* allocate per ag counters */
+-	sb_icount_ag = calloc(mp->m_sb.sb_agcount, sizeof(__uint64_t));
++	sb_icount_ag = calloc(mp->m_sb.sb_agcount, sizeof(uint64_t));
+ 	if (sb_icount_ag == NULL)
+ 		do_error(_("cannot alloc sb_icount_ag buffers\n"));
+ 
+-	sb_ifree_ag = calloc(mp->m_sb.sb_agcount, sizeof(__uint64_t));
++	sb_ifree_ag = calloc(mp->m_sb.sb_agcount, sizeof(uint64_t));
+ 	if (sb_ifree_ag == NULL)
+ 		do_error(_("cannot alloc sb_ifree_ag buffers\n"));
+ 
+-	sb_fdblocks_ag = calloc(mp->m_sb.sb_agcount, sizeof(__uint64_t));
++	sb_fdblocks_ag = calloc(mp->m_sb.sb_agcount, sizeof(uint64_t));
+ 	if (sb_fdblocks_ag == NULL)
+ 		do_error(_("cannot alloc sb_fdblocks_ag buffers\n"));
+ 
+diff --git a/repair/phase6.c b/repair/phase6.c
+index 08636dcf..373b1a5b 100644
+--- a/repair/phase6.c
++++ b/repair/phase6.c
+@@ -82,7 +82,7 @@ typedef struct dir_hash_ent {
+ 	struct dir_hash_ent	*nextbyhash;	/* next in name bucket */
+ 	struct dir_hash_ent	*nextbyorder;	/* next in order added */
+ 	xfs_dahash_t		hashval;	/* hash value of name */
+-	__uint32_t		address;	/* offset of data entry */
++	uint32_t		address;	/* offset of data entry */
+ 	xfs_ino_t 		inum;		/* inode num of entry */
+ 	short			junkit;		/* name starts with / */
+ 	short			seen;		/* have seen leaf entry */
+@@ -170,11 +170,11 @@ static int
+ dir_hash_add(
+ 	xfs_mount_t		*mp,
+ 	dir_hash_tab_t		*hashtab,
+-	__uint32_t		addr,
++	uint32_t		addr,
+ 	xfs_ino_t		inum,
+ 	int			namelen,
+ 	unsigned char		*name,
+-	__uint8_t		ftype)
++	uint8_t			ftype)
+ {
+ 	xfs_dahash_t		hash = 0;
+ 	int			byaddr;
+@@ -357,7 +357,7 @@ static void
+ dir_hash_update_ftype(
+ 	dir_hash_tab_t		*hashtab,
+ 	xfs_dir2_dataptr_t	addr,
+-	__uint8_t		ftype)
++	uint8_t			ftype)
+ {
+ 	int			i;
+ 	dir_hash_ent_t		*p;
+@@ -1791,8 +1791,8 @@ longform_dir2_entry_check_data(
+ 
+ 		/* validate ftype field if supported */
+ 		if (xfs_sb_version_hasftype(&mp->m_sb)) {
+-			__uint8_t dir_ftype;
+-			__uint8_t ino_ftype;
++			uint8_t dir_ftype;
++			uint8_t ino_ftype;
+ 
+ 			dir_ftype = M_DIROPS(mp)->data_get_ftype(dep);
+ 			ino_ftype = get_inode_ftype(irec, ino_offset);
+@@ -2703,8 +2703,8 @@ _("entry \"%s\" (ino %" PRIu64 ") in dir %" PRIu64 " is a duplicate name"),
+ 
+ 		/* validate ftype field if supported */
+ 		if (xfs_sb_version_hasftype(&mp->m_sb)) {
+-			__uint8_t dir_ftype;
+-			__uint8_t ino_ftype;
++			uint8_t dir_ftype;
++			uint8_t ino_ftype;
+ 
+ 			dir_ftype = M_DIROPS(mp)->sf_get_ftype(sfep);
+ 			ino_ftype = get_inode_ftype(irec, ino_offset);
+diff --git a/repair/phase7.c b/repair/phase7.c
+index 8bce117d..4ffb81a8 100644
+--- a/repair/phase7.c
++++ b/repair/phase7.c
+@@ -32,7 +32,7 @@ static void
+ update_inode_nlinks(
+ 	xfs_mount_t 		*mp,
+ 	xfs_ino_t		ino,
+-	__uint32_t		nlinks)
++	uint32_t		nlinks)
+ {
+ 	xfs_trans_t		*tp;
+ 	xfs_inode_t		*ip;
+@@ -104,7 +104,7 @@ do_link_updates(
+ {
+ 	ino_tree_node_t		*irec;
+ 	int			j;
+-	__uint32_t		nrefs;
++	uint32_t		nrefs;
+ 
+ 	for (irec = findfirst_inode_rec(agno); irec;
+ 	     irec = next_ino_rec(irec)) {
+@@ -143,7 +143,7 @@ phase7(
+ 	else
+ 		do_log(_("Phase 7 - verify link counts...\n"));
+ 
+-	set_progress_msg(PROGRESS_FMT_CORR_LINK, (__uint64_t) glob_agcount);
++	set_progress_msg(PROGRESS_FMT_CORR_LINK, (uint64_t) glob_agcount);
+ 
+ 	create_work_queue(&wq, mp, scan_threads);
+ 
+diff --git a/repair/progress.c b/repair/progress.c
+index 2a09b239..99d2658c 100644
+--- a/repair/progress.c
++++ b/repair/progress.c
+@@ -85,8 +85,8 @@ pthread_t	report_thread;
+ typedef struct msg_block_s {
+ 	pthread_mutex_t	mutex;
+ 	progress_rpt_t	*format;
+-	__uint64_t	*done;
+-	__uint64_t	*total;
++	uint64_t	*done;
++	uint64_t	*total;
+ 	int		count;
+ 	int		interval;
+ } msg_block_t;
+@@ -96,14 +96,14 @@ typedef struct phase_times_s {
+ 	time_t		start;
+ 	time_t		end;
+ 	time_t		duration;
+-	__uint64_t	item_counts[4];
++	uint64_t	item_counts[4];
+ } phase_times_t;
+ static phase_times_t phase_times[8];
+ 
+ static void *progress_rpt_thread(void *);
+ static int current_phase;
+ static int running;
+-static __uint64_t prog_rpt_total;
++static uint64_t prog_rpt_total;
+ 
+ void
+ init_progress_rpt (void)
+@@ -113,11 +113,11 @@ init_progress_rpt (void)
+ 	 *  allocate the done vector
+ 	 */
+ 
+-	if ((prog_rpt_done = (__uint64_t *)
+-		malloc(sizeof(__uint64_t)*glob_agcount)) == NULL ) {
++	if ((prog_rpt_done = (uint64_t *)
++		malloc(sizeof(uint64_t)*glob_agcount)) == NULL) {
+ 		do_error(_("cannot malloc pointer to done vector\n"));
+ 	}
+-	bzero(prog_rpt_done, sizeof(__uint64_t)*glob_agcount);
++	bzero(prog_rpt_done, sizeof(uint64_t)*glob_agcount);
+ 
+ 	/*
+ 	 *  Setup comm block, start the thread
+@@ -165,10 +165,10 @@ progress_rpt_thread (void *p)
+ 	timer_t timerid;
+ 	struct itimerspec timespec;
+ 	char *msgbuf;
+-	__uint64_t *donep;
+-	__uint64_t sum;
++	uint64_t *donep;
++	uint64_t sum;
+ 	msg_block_t *msgp = (msg_block_t *)p;
+-	__uint64_t percent;
++	uint64_t percent;
+ 
+ 	/* It's possible to get here very early w/ no progress msg set */
+ 	if (!msgp->format)
+@@ -286,7 +286,7 @@ progress_rpt_thread (void *p)
+ }
+ 
+ int
+-set_progress_msg (int report, __uint64_t total)
++set_progress_msg(int report, uint64_t total)
+ {
+ 
+ 	if (!ag_stride)
+@@ -300,7 +300,7 @@ set_progress_msg (int report, __uint64_t total)
+ 
+ 	/* reset all the accumulative totals */
+ 	if (prog_rpt_done)
+-		bzero(prog_rpt_done, sizeof(__uint64_t)*glob_agcount);
++		bzero(prog_rpt_done, sizeof(uint64_t)*glob_agcount);
+ 
+ 	if (pthread_mutex_unlock(&global_msgs.mutex))
+ 		do_error(_("set_progress_msg: cannot unlock progress mutex\n"));
+@@ -308,14 +308,14 @@ set_progress_msg (int report, __uint64_t total)
+ 	return (0);
+ }
+ 
+-__uint64_t
++uint64_t
+ print_final_rpt(void)
+ {
+ 	int i;
+ 	struct tm *tmp;
+ 	time_t now;
+-	__uint64_t *donep;
+-	__uint64_t sum;
++	uint64_t *donep;
++	uint64_t sum;
+ 	msg_block_t 	*msgp = &global_msgs;
+ 	char		msgbuf[DURATION_BUF_SIZE];
+ 
+diff --git a/repair/progress.h b/repair/progress.h
+index 33db8344..51526483 100644
+--- a/repair/progress.h
++++ b/repair/progress.h
+@@ -32,8 +32,8 @@
+ extern void init_progress_rpt(void);
+ extern void stop_progress_rpt(void);
+ extern void summary_report(void);
+-extern int  set_progress_msg(int report, __uint64_t total);
+-extern __uint64_t print_final_rpt(void);
++extern int  set_progress_msg(int report, uint64_t total);
++extern uint64_t print_final_rpt(void);
+ extern char *timestamp(int end, int phase, char *buf);
+ extern char *duration(int val, char *buf);
+ extern int do_parallel;
+diff --git a/repair/rmap.c b/repair/rmap.c
+index ab6e5839..01d6f0fc 100644
+--- a/repair/rmap.c
++++ b/repair/rmap.c
+@@ -343,7 +343,7 @@ err:
+ 
+ static int
+ find_first_zero_bit(
+-	__uint64_t	mask)
++	uint64_t	mask)
+ {
+ 	int		n;
+ 	int		b = 0;
+@@ -356,7 +356,7 @@ find_first_zero_bit(
+ 
+ static int
+ popcnt(
+-	__uint64_t	mask)
++	uint64_t	mask)
+ {
+ 	int		n;
+ 	int		b = 0;
+@@ -1064,14 +1064,14 @@ err:
+  * Compare the key fields of two rmap records -- positive if key1 > key2,
+  * negative if key1 < key2, and zero if equal.
+  */
+-__int64_t
++int64_t
+ rmap_diffkeys(
+ 	struct xfs_rmap_irec	*kp1,
+ 	struct xfs_rmap_irec	*kp2)
+ {
+ 	__u64			oa;
+ 	__u64			ob;
+-	__int64_t		d;
++	int64_t			d;
+ 	struct xfs_rmap_irec	tmp;
+ 
+ 	tmp = *kp1;
+@@ -1081,7 +1081,7 @@ rmap_diffkeys(
+ 	tmp.rm_flags &= ~XFS_RMAP_REC_FLAGS;
+ 	ob = libxfs_rmap_irec_offset_pack(&tmp);
+ 
+-	d = (__int64_t)kp1->rm_startblock - kp2->rm_startblock;
++	d = (int64_t)kp1->rm_startblock - kp2->rm_startblock;
+ 	if (d)
+ 		return d;
+ 
+@@ -1192,10 +1192,10 @@ fix_inode_reflink_flags(
+ {
+ 	struct ino_tree_node	*irec;
+ 	int			bit;
+-	__uint64_t		was;
+-	__uint64_t		is;
+-	__uint64_t		diff;
+-	__uint64_t		mask;
++	uint64_t		was;
++	uint64_t		is;
++	uint64_t		diff;
++	uint64_t		mask;
+ 	int			error = 0;
+ 	xfs_agino_t		agino;
+ 
+diff --git a/repair/rmap.h b/repair/rmap.h
+index 752ece82..1616ab7d 100644
+--- a/repair/rmap.h
++++ b/repair/rmap.h
+@@ -44,7 +44,7 @@ extern int rmap_init_cursor(xfs_agnumber_t, struct xfs_slab_cursor **);
+ extern void rmap_avoid_check(void);
+ extern int rmaps_verify_btree(struct xfs_mount *, xfs_agnumber_t);
+ 
+-extern __int64_t rmap_diffkeys(struct xfs_rmap_irec *kp1,
++extern int64_t rmap_diffkeys(struct xfs_rmap_irec *kp1,
+ 		struct xfs_rmap_irec *kp2);
+ extern void rmap_high_key_from_rec(struct xfs_rmap_irec *rec,
+ 		struct xfs_rmap_irec *key);
+diff --git a/repair/sb.c b/repair/sb.c
+index 77e51546..acc92839 100644
+--- a/repair/sb.c
++++ b/repair/sb.c
+@@ -40,7 +40,7 @@ copy_sb(xfs_sb_t *source, xfs_sb_t *dest)
+ 	xfs_ino_t	uquotino;
+ 	xfs_ino_t	gquotino;
+ 	xfs_ino_t	pquotino;
+-	__uint16_t	versionnum;
++	uint16_t	versionnum;
+ 
+ 	rootino = dest->sb_rootino;
+ 	rbmino = dest->sb_rbmino;
+@@ -106,8 +106,8 @@ verify_sb_blocksize(xfs_sb_t *sb)
+ static int
+ __find_secondary_sb(
+ 	xfs_sb_t	*rsb,
+-	__uint64_t	start,
+-	__uint64_t	skip)
++	uint64_t	start,
++	uint64_t	skip)
+ {
+ 	xfs_off_t	off;
+ 	xfs_sb_t	*sb;
+@@ -187,13 +187,13 @@ __find_secondary_sb(
+ 
+ static int
+ guess_default_geometry(
+-	__uint64_t		*agsize,
+-	__uint64_t		*agcount,
++	uint64_t		*agsize,
++	uint64_t		*agcount,
+ 	libxfs_init_t		*x)
+ {
+ 	struct fs_topology	ft;
+ 	int			blocklog;
+-	__uint64_t		dblocks;
++	uint64_t		dblocks;
+ 	int			multidisk;
+ 
+ 	memset(&ft, 0, sizeof(ft));
+@@ -216,9 +216,9 @@ int
+ find_secondary_sb(xfs_sb_t *rsb)
+ {
+ 	int		retval = 0;
+-	__uint64_t	agcount;
+-	__uint64_t	agsize;
+-	__uint64_t	skip;
++	uint64_t	agcount;
++	uint64_t	agsize;
++	uint64_t	skip;
+ 	int		blocklog;
+ 
+ 	/*
+@@ -229,7 +229,7 @@ find_secondary_sb(xfs_sb_t *rsb)
+ 	do_warn(_("\nattempting to find secondary superblock...\n"));
+ 
+ 	if (verify_sb_blocksize(rsb) == 0) {
+-		skip = (__uint64_t)rsb->sb_agblocks * rsb->sb_blocksize;
++		skip = (uint64_t)rsb->sb_agblocks * rsb->sb_blocksize;
+ 		if (skip >= XFS_AG_MIN_BYTES && skip <= XFS_AG_MAX_BYTES)
+ 			retval = __find_secondary_sb(rsb, skip, skip);
+ 	}
+@@ -343,7 +343,7 @@ sb_validate_ino_align(struct xfs_sb *sb)
+ int
+ verify_sb(char *sb_buf, xfs_sb_t *sb, int is_primary_sb)
+ {
+-	__uint32_t	bsize;
++	uint32_t	bsize;
+ 	int		i;
+ 	int		ret;
+ 
+@@ -399,7 +399,7 @@ verify_sb(char *sb_buf, xfs_sb_t *sb, int is_primary_sb)
+ 		sb->sb_dblocks < XFS_MIN_DBLOCKS(sb))
+ 		return(XR_BAD_FS_SIZE_DATA);
+ 
+-	if (sb->sb_agblklog != (__uint8_t)libxfs_log2_roundup(sb->sb_agblocks))
++	if (sb->sb_agblklog != (uint8_t)libxfs_log2_roundup(sb->sb_agblocks))
+ 		return(XR_BAD_FS_SIZE_DATA);
+ 
+ 	if (sb->sb_inodesize < XFS_DINODE_MIN_SIZE                     ||
+diff --git a/repair/scan.c b/repair/scan.c
+index b9ef4dc3..447611ac 100644
+--- a/repair/scan.c
++++ b/repair/scan.c
+@@ -42,13 +42,13 @@ struct aghdr_cnts {
+ 	xfs_agnumber_t	agno;
+ 	xfs_extlen_t	agffreeblks;
+ 	xfs_extlen_t	agflongest;
+-	__uint64_t	agfbtreeblks;
+-	__uint32_t	agicount;
+-	__uint32_t	agifreecount;
+-	__uint64_t	fdblocks;
+-	__uint64_t	usedblocks;
+-	__uint64_t	ifreecount;
+-	__uint32_t	fibtfreecount;
++	uint64_t	agfbtreeblks;
++	uint32_t	agicount;
++	uint32_t	agifreecount;
++	uint64_t	fdblocks;
++	uint64_t	usedblocks;
++	uint64_t	ifreecount;
++	uint32_t	fibtfreecount;
+ };
+ 
+ void
+@@ -70,10 +70,10 @@ scan_sbtree(
+ 				xfs_agnumber_t		agno,
+ 				int			suspect,
+ 				int			isroot,
+-				__uint32_t		magic,
++				uint32_t		magic,
+ 				void			*priv),
+ 	int		isroot,
+-	__uint32_t	magic,
++	uint32_t	magic,
+ 	void		*priv,
+ 	const struct xfs_buf_ops *ops)
+ {
+@@ -110,23 +110,23 @@ scan_lbtree(
+ 				xfs_fsblock_t		bno,
+ 				xfs_ino_t		ino,
+ 				xfs_rfsblock_t		*tot,
+-				__uint64_t		*nex,
++				uint64_t		*nex,
+ 				blkmap_t		**blkmapp,
+ 				bmap_cursor_t		*bm_cursor,
+ 				int			isroot,
+ 				int			check_dups,
+ 				int			*dirty,
+-				__uint64_t		magic),
++				uint64_t		magic),
+ 	int		type,
+ 	int		whichfork,
+ 	xfs_ino_t	ino,
+ 	xfs_rfsblock_t	*tot,
+-	__uint64_t	*nex,
++	uint64_t	*nex,
+ 	blkmap_t	**blkmapp,
+ 	bmap_cursor_t	*bm_cursor,
+ 	int		isroot,
+ 	int		check_dups,
+-	__uint64_t	magic,
++	uint64_t	magic,
+ 	const struct xfs_buf_ops *ops)
+ {
+ 	xfs_buf_t	*bp;
+@@ -179,13 +179,13 @@ scan_bmapbt(
+ 	xfs_fsblock_t		bno,
+ 	xfs_ino_t		ino,
+ 	xfs_rfsblock_t		*tot,
+-	__uint64_t		*nex,
++	uint64_t		*nex,
+ 	blkmap_t		**blkmapp,
+ 	bmap_cursor_t		*bm_cursor,
+ 	int			isroot,
+ 	int			check_dups,
+ 	int			*dirty,
+-	__uint64_t		magic)
++	uint64_t		magic)
+ {
+ 	int			i;
+ 	int			err;
+@@ -548,7 +548,7 @@ scan_allocbt(
+ 	xfs_agnumber_t		agno,
+ 	int			suspect,
+ 	int			isroot,
+-	__uint32_t		magic,
++	uint32_t		magic,
+ 	void			*priv)
+ {
+ 	struct aghdr_cnts	*agcnts = priv;
+@@ -930,7 +930,7 @@ scan_rmapbt(
+ 	xfs_agnumber_t		agno,
+ 	int			suspect,
+ 	int			isroot,
+-	__uint32_t		magic,
++	uint32_t		magic,
+ 	void			*priv)
+ {
+ 	const char		*name = "rmap";
+@@ -1233,7 +1233,7 @@ scan_refcbt(
+ 	xfs_agnumber_t		agno,
+ 	int			suspect,
+ 	int			isroot,
+-	__uint32_t		magic,
++	uint32_t		magic,
+ 	void			*priv)
+ {
+ 	const char		*name = "refcount";
+@@ -1939,7 +1939,7 @@ scan_inobt(
+ 	xfs_agnumber_t		agno,
+ 	int			suspect,
+ 	int			isroot,
+-	__uint32_t		magic,
++	uint32_t		magic,
+ 	void			*priv)
+ {
+ 	struct aghdr_cnts	*agcnts = priv;
+@@ -2176,7 +2176,7 @@ validate_agf(
+ 	struct aghdr_cnts	*agcnts)
+ {
+ 	xfs_agblock_t		bno;
+-	__uint32_t		magic;
++	uint32_t		magic;
+ 
+ 	bno = be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]);
+ 	if (bno != 0 && verify_agbno(mp, agno, bno)) {
+@@ -2274,7 +2274,7 @@ validate_agi(
+ {
+ 	xfs_agblock_t		bno;
+ 	int			i;
+-	__uint32_t		magic;
++	uint32_t		magic;
+ 
+ 	bno = be32_to_cpu(agi->agi_root);
+ 	if (bno != 0 && verify_agbno(mp, agno, bno)) {
+@@ -2499,10 +2499,10 @@ scan_ags(
+ 	int			scan_threads)
+ {
+ 	struct aghdr_cnts *agcnts;
+-	__uint64_t	fdblocks = 0;
+-	__uint64_t	icount = 0;
+-	__uint64_t	ifreecount = 0;
+-	__uint64_t	usedblocks = 0;
++	uint64_t	fdblocks = 0;
++	uint64_t	icount = 0;
++	uint64_t	ifreecount = 0;
++	uint64_t	usedblocks = 0;
+ 	xfs_agnumber_t	i;
+ 	work_queue_t	wq;
+ 
+diff --git a/repair/scan.h b/repair/scan.h
+index ea8c0bf2..9bbe1e69 100644
+--- a/repair/scan.h
++++ b/repair/scan.h
+@@ -30,23 +30,23 @@ int scan_lbtree(
+ 				xfs_fsblock_t		bno,
+ 				xfs_ino_t		ino,
+ 				xfs_rfsblock_t		*tot,
+-				__uint64_t		*nex,
++				uint64_t		*nex,
+ 				struct blkmap		**blkmapp,
+ 				bmap_cursor_t		*bm_cursor,
+ 				int			isroot,
+ 				int			check_dups,
+ 				int			*dirty,
+-				__uint64_t		magic),
++				uint64_t		magic),
+ 	int		type,
+ 	int		whichfork,
+ 	xfs_ino_t	ino,
+ 	xfs_rfsblock_t	*tot,
+-	__uint64_t	*nex,
++	uint64_t	*nex,
+ 	struct blkmap	**blkmapp,
+ 	bmap_cursor_t	*bm_cursor,
+ 	int		isroot,
+ 	int		check_dups,
+-	__uint64_t	magic,
++	uint64_t	magic,
+ 	const struct xfs_buf_ops *ops);
+ 
+ int scan_bmapbt(
+@@ -57,13 +57,13 @@ int scan_bmapbt(
+ 	xfs_fsblock_t		bno,
+ 	xfs_ino_t		ino,
+ 	xfs_rfsblock_t		*tot,
+-	__uint64_t		*nex,
++	uint64_t		*nex,
+ 	struct blkmap		**blkmapp,
+ 	bmap_cursor_t		*bm_cursor,
+ 	int			isroot,
+ 	int			check_dups,
+ 	int			*dirty,
+-	__uint64_t		magic);
++	uint64_t		magic);
+ 
+ void
+ scan_ags(
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/link_needed_libs.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/link_needed_libs.patch
deleted file mode 100644
index 1de634e..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/link_needed_libs.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-Index: xfsprogs-4.10.0/libxcmd/Makefile
-===================================================================
---- xfsprogs-4.10.0.orig/libxcmd/Makefile
-+++ xfsprogs-4.10.0/libxcmd/Makefile
-@@ -30,10 +30,21 @@ LCFLAGS += -DENABLE_EDITLINE
- LTLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
- endif
- 
-+ifeq ($(ENABLE_BLKID),yes)
-+LCFLAGS += -DENABLE_BLKID
-+LTLIBS += $(LIBBLKID)
-+endif
-+
-+LTLIBS += $(LIBXFS)
-+
- default: ltdepend $(LTLIBRARY)
- 
- include $(BUILDRULES)
- 
--install install-dev: default
-+install: default
-+	$(INSTALL_LTLIB)
-+
-+install-dev: default
-+	$(INSTALL_LTLIB_DEV)
- 
- -include .ltdep
-Index: xfsprogs-4.10.0/libxfs/Makefile
-===================================================================
---- xfsprogs-4.10.0.orig/libxfs/Makefile
-+++ xfsprogs-4.10.0/libxfs/Makefile
-@@ -137,6 +137,7 @@ include $(BUILDRULES)
- 
- install: default
- 	$(INSTALL) -m 755 -d $(PKG_INC_DIR)
-+	$(INSTALL_LTLIB)
- 
- install-headers: $(addsuffix -hdrs, $(PKGHFILES))
- 
-Index: xfsprogs-4.10.0/libxlog/Makefile
-===================================================================
---- xfsprogs-4.10.0.orig/libxlog/Makefile
-+++ xfsprogs-4.10.0/libxlog/Makefile
-@@ -19,6 +19,10 @@ default: ltdepend $(LTLIBRARY)
- 
- include $(BUILDRULES)
- 
--install install-dev: default
-+install: default
-+	$(INSTALL_LTLIB)
-+
-+install-dev: default
-+	$(INSTALL_LTLIB_DEV)
- 
- -include .ltdep
-Index: xfsprogs-4.10.0/io/Makefile
-===================================================================
---- xfsprogs-4.10.0.orig/io/Makefile
-+++ xfsprogs-4.10.0/io/Makefile
-@@ -13,7 +13,7 @@
- 	getrusage.c imap.c link.c mmap.c open.c parent.c pread.c prealloc.c \
- 	pwrite.c reflink.c seek.c shutdown.c sync.c truncate.c utimes.c
- 
--LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBPTHREAD)
-+LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBUUID) $(LIBPTHREAD)
- LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE)
- LLDFLAGS = -static-libtool-libs
- 
-Index: xfsprogs-4.10.0/quota/Makefile
-===================================================================
---- xfsprogs-4.10.0.orig/quota/Makefile
-+++ xfsprogs-4.10.0/quotq/Makefile
-@@ -14,7 +14,7 @@
- PCFILES = darwin.c freebsd.c irix.c linux.c
- LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g")
- 
--LLDLIBS = $(LIBXCMD)
-+LLDLIBS = $(LIBXCMD) $(LIBUUID)
- LTDEPENDENCIES = $(LIBXCMD)
- LLDFLAGS = -static
- 
-
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/remove_flags_from_build_flags.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/remove_flags_from_build_flags.patch
new file mode 100644
index 0000000..bba9a25
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/remove_flags_from_build_flags.patch
@@ -0,0 +1,13 @@
+Index: xfsprogs-4.12.0/include/builddefs.in
+===================================================================
+--- xfsprogs-4.12.0.orig/include/builddefs.in
++++ xfsprogs-4.12.0/include/builddefs.in
+@@ -164,7 +164,7 @@ ifeq ($(ENABLE_GETTEXT),yes)
+ GCFLAGS += -DENABLE_GETTEXT
+ endif
+ 
+-BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
++BUILD_CFLAGS += $(GCFLAGS)
+ # First, Global, Platform, Local CFLAGS
+ CFLAGS += $(FCFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
+ 
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch
new file mode 100644
index 0000000..efc57e4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch
@@ -0,0 +1,117 @@
+From 21253610f9ef87db8e2a75b863b7fcfbd0cdb421 Mon Sep 17 00:00:00 2001
+From: "Darrick J. Wong" <darrick.wong@oracle.com>
+Date: Tue, 25 Jul 2017 13:45:01 -0500
+Subject: [PATCH] In patch 4944defad4 ("xfs_db: redirect printfs when
+ metadumping to stdout"), we solved the problem of xfs_db printfs ending up in
+ the metadump stream by reassigning stdout for the duration of a stdout
+ metadump.  Unfortunately, musl doesn't allow stdout to be reassigned (in
+ their view "extern FILE *stdout" means "extern FILE * const stdout"), so we
+ abandon the old approach in favor of playing games with dup() to switch the
+ raw file descriptors.
+
+While we're at it, fix a regression where an unconverted outf test
+allows progress info to end up in the metadump stream.
+
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+---
+ db/metadump.c | 47 ++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 36 insertions(+), 11 deletions(-)
+
+diff --git a/db/metadump.c b/db/metadump.c
+index 96641e0..4e2f648 100644
+--- a/db/metadump.c
++++ b/db/metadump.c
+@@ -78,6 +78,7 @@ static int		obfuscate = 1;
+ static int		zero_stale_data = 1;
+ static int		show_warnings = 0;
+ static int		progress_since_warning = 0;
++static bool		stdout_metadump;
+ 
+ void
+ metadump_init(void)
+@@ -137,7 +138,7 @@ print_progress(const char *fmt, ...)
+ 	va_end(ap);
+ 	buf[sizeof(buf)-1] = '\0';
+ 
+-	f = (outf == stdout) ? stderr : stdout;
++	f = stdout_metadump ? stderr : stdout;
+ 	fprintf(f, "\r%-59s", buf);
+ 	fflush(f);
+ 	progress_since_warning = 1;
+@@ -2750,7 +2751,8 @@ metadump_f(
+ 	xfs_agnumber_t	agno;
+ 	int		c;
+ 	int		start_iocur_sp;
+-	bool		stdout_metadump = false;
++	int		outfd = -1;
++	int		ret;
+ 	char		*p;
+ 
+ 	exitcode = 1;
+@@ -2870,16 +2872,35 @@ metadump_f(
+ 		 * metadump operation so that dbprintf and other messages
+ 		 * are sent to the console instead of polluting the
+ 		 * metadump stream.
++		 *
++		 * We get to do this the hard way because musl doesn't
++		 * allow reassignment of stdout.
+ 		 */
+-		outf = stdout;
+-		stdout = stderr;
++		fflush(stdout);
++		outfd = dup(STDOUT_FILENO);
++		if (outfd < 0) {
++			perror("opening dump stream");
++			goto out;
++		}
++		ret = dup2(STDERR_FILENO, STDOUT_FILENO);
++		if (ret < 0) {
++			perror("redirecting stdout");
++			close(outfd);
++			goto out;
++		}
++		outf = fdopen(outfd, "a");
++		if (outf == NULL) {
++			fprintf(stderr, "cannot create dump stream\n");
++			dup2(outfd, 1);
++			close(outfd);
++			goto out;
++		}
+ 		stdout_metadump = true;
+ 	} else {
+ 		outf = fopen(argv[optind], "wb");
+ 		if (outf == NULL) {
+ 			print_warning("cannot create dump file");
+-			free(metablock);
+-			return 0;
++			goto out;
+ 		}
+ 	}
+ 
+@@ -2907,15 +2928,19 @@ metadump_f(
+ 	if (progress_since_warning)
+ 		fputc('\n', stdout_metadump ? stderr : stdout);
+ 
+-	if (stdout_metadump)
+-		stdout = outf;
+-	else
+-		fclose(outf);
++	if (stdout_metadump) {
++		fflush(outf);
++		fflush(stdout);
++		ret = dup2(outfd, STDOUT_FILENO);
++		if (ret < 0)
++			perror("un-redirecting stdout");
++	}
++	fclose(outf);
+ 
+ 	/* cleanup iocur stack */
+ 	while (iocur_sp > start_iocur_sp)
+ 		pop_cur();
+-
++out:
+ 	free(metablock);
+ 
+ 	return 0;
+-- 
+2.13.3
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.10.0.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.10.0.bb
deleted file mode 100644
index f7e10cd..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.10.0.bb
+++ /dev/null
@@ -1,57 +0,0 @@
-SUMMARY = "XFS Filesystem Utilities"
-HOMEPAGE = "http://oss.sgi.com/projects/xfs"
-SECTION = "base"
-LICENSE = "GPLv2 & LGPLv2.1"
-LICENSE_libhandle = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://doc/COPYING;md5=102f7fec3d53c7c8f0b7baf9bf9d76a8"
-DEPENDS = "util-linux util-linux-native"
-SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \
-           file://link_needed_libs.patch \
-"
-SRC_URI[md5sum] = "ddbb04493addf014db07a7e2b96b2804"
-SRC_URI[sha256sum] = "d8cb9ab2c686699d37914354ce3992b4aff3677093cbce06ad18bf798da8a8a7"
-
-inherit autotools-brokensep
-
-PACKAGES =+ "${PN}-fsck ${PN}-mkfs ${PN}-repair libhandle"
-
-DEPENDS += "util-linux"
-
-RDEPENDS_${PN} = "${PN}-fsck ${PN}-mkfs ${PN}-repair"
-
-FILES_${PN}-fsck = "${base_sbindir}/fsck.xfs"
-FILES_${PN}-mkfs = "${base_sbindir}/mkfs.xfs"
-FILES_${PN}-repair = "${base_sbindir}/xfs_repair"
-
-FILES_libhandle = "${base_libdir}/libhandle${SOLIBS}"
-
-EXTRA_OECONF = "--enable-gettext=no \
-                INSTALL_USER=root \
-                INSTALL_GROUP=root \
-                ac_cv_header_aio_h=yes \
-                ac_cv_lib_rt_lio_listio=yes \
-"
-
-EXTRA_AUTORECONF += "-I ${S}/m4 --exclude=autoheader"
-
-PACKAGECONFIG ??= "readline blkid"
-
-PACKAGECONFIG[readline] = "--enable-readline=yes,--enable-readline=no,readline"
-PACKAGECONFIG[blkid] = "--enable-blkid=yes,--enable-blkid=no,util-linux"
-
-export DEBUG="-DNDEBUG"
-
-EXTRA_OEMAKE = "DIST_ROOT='${D}'"
-
-do_configure_prepend () {
-    export BUILD_CC="${BUILD_CC} ${BUILD_CFLAGS}"
-    # Prevent Makefile from calling configure without arguments,
-    # when do_configure gets called for a second time.
-    rm -f ${B}/include/builddefs ${B}/include/platform_defs.h ${B}/configure
-    # Recreate configure script.
-    oe_runmake configure
-}
-
-do_install_append() {
-        oe_runmake 'DESTDIR=${D}' install install-dev
-}
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.12.0.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.12.0.bb
new file mode 100644
index 0000000..0788695
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.12.0.bb
@@ -0,0 +1,65 @@
+SUMMARY = "XFS Filesystem Utilities"
+HOMEPAGE = "http://oss.sgi.com/projects/xfs"
+SECTION = "base"
+LICENSE = "GPLv2 & LGPLv2.1"
+LICENSE_libhandle = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=102f7fec3d53c7c8f0b7baf9bf9d76a8"
+DEPENDS = "util-linux util-linux-native"
+SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \
+           file://0001-xfsprogs-remove-double-underscore-integer-types.patch \
+           file://0001-xfs-remove-double-underscore-integer-types.patch \
+           file://remove_flags_from_build_flags.patch \
+           file://xfsprogs-4.12.0-fix_musl.patch \
+           "
+SRC_URI[md5sum] = "e348b0e1d7bd1cd82d64b91ff37e727e"
+SRC_URI[sha256sum] = "b330ad8d737f4152ae511580102e2fc49212bb51dfb4b614084344abae46d0df"
+
+inherit autotools-brokensep
+
+PACKAGES =+ "${PN}-fsck ${PN}-mkfs ${PN}-repair libhandle"
+
+DEPENDS += "util-linux"
+
+RDEPENDS_${PN} = "${PN}-fsck ${PN}-mkfs ${PN}-repair"
+
+FILES_${PN}-fsck = "${base_sbindir}/fsck.xfs"
+FILES_${PN}-mkfs = "${base_sbindir}/mkfs.xfs"
+FILES_${PN}-repair = "${base_sbindir}/xfs_repair"
+
+FILES_libhandle = "${base_libdir}/libhandle${SOLIBS}"
+
+EXTRA_OECONF = "--enable-gettext=no \
+                INSTALL_USER=root \
+                INSTALL_GROUP=root \
+                ac_cv_header_aio_h=yes \
+                ac_cv_lib_rt_lio_listio=yes \
+"
+
+DISABLE_STATIC = ""
+EXTRA_AUTORECONF += "-I ${S}/m4 --exclude=autoheader"
+
+PACKAGECONFIG ??= "readline blkid"
+
+PACKAGECONFIG[readline] = "--enable-readline=yes,--enable-readline=no,readline"
+PACKAGECONFIG[blkid] = "--enable-blkid=yes,--enable-blkid=no,util-linux"
+
+export DEBUG="-DNDEBUG"
+export BUILD_VERBOSE="1"
+export tagname="CC"
+
+EXTRA_OEMAKE = "DIST_ROOT='${D}'"
+
+do_configure_prepend () {
+    export BUILD_CC="${BUILD_CC} ${BUILD_CFLAGS}"
+    # Prevent Makefile from calling configure without arguments,
+    # when do_configure gets called for a second time.
+    rm -f ${B}/include/builddefs ${B}/include/platform_defs.h ${B}/configure
+    # Recreate configure script.
+    oe_runmake configure
+}
+
+do_install_append() {
+        oe_runmake 'DESTDIR=${D}' install-dev
+        rm ${D}${libdir}/*.la
+        rmdir --ignore-fail-on-non-empty ${D}${libdir}
+}
diff --git a/import-layers/meta-openembedded/meta-gnome/README b/import-layers/meta-openembedded/meta-gnome/README
index 7eee0e1..25ef85d 100644
--- a/import-layers/meta-openembedded/meta-gnome/README
+++ b/import-layers/meta-openembedded/meta-gnome/README
@@ -1,17 +1,17 @@
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: pyro
+branch: rocko
 revision: HEAD
 
 URI: git://github.com/openembedded/meta-oe.git
-branch: pyro
+branch: rocko
 revision: HEAD
 
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-gnome][pyro]' in the subject'
+Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-gnome][rocko]' in the subject'
 
 When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-gnome][pyro][PATCH'
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-gnome][rocko][PATCH'
 
-pyro Branch Maintainer:
+rocko Branch Maintainer:
 Armin Kuster <akuster808@gmail.com>
diff --git a/import-layers/meta-openembedded/meta-gnome/conf/layer.conf b/import-layers/meta-openembedded/meta-gnome/conf/layer.conf
index fce5627..a138818 100644
--- a/import-layers/meta-openembedded/meta-gnome/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-gnome/conf/layer.conf
@@ -12,6 +12,6 @@
 # cause compatibility issues with other layers
 LAYERVERSION_gnome-layer = "1"
 
-LAYERDEPENDS_gnome-layer = "core openembedded-layer"
+LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer"
 
 AVAHI_GTK_pn-avahi-ui = "gtk gtk3"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/cheese/cheese_2.30.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-apps/cheese/cheese_2.30.1.bb
deleted file mode 100644
index 3f5a5b1..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/cheese/cheese_2.30.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Take photos and videos with your webcam, with fun graphical effects"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a17cb0a873d252440acfdf9b3d0e7fbf"
-
-DEPENDS = "gtk+ gstreamer gst-plugins-base libcanberra udev librsvg gnome-desktop evolution-data-server intltool-native"
-
-PR = "r2"
-
-inherit gnome
-
-SRC_URI[archive.md5sum] = "1599fded8a1797ea51fb010af4e6c45b"
-SRC_URI[archive.sha256sum] = "48f03470c6f527caa0e3b269d3afcff86ae0939a74f66ce030d4eed3bc3cbd9a"
-GNOME_COMPRESS_TYPE="bz2"
-
-FILES_${PN} += "${datadir}/dbus-1"
-RRECOMMENDS_${PN} = "gst-plugins-good-meta gst-plugins-base-meta"
-
-EXTRA_OECONF += "--disable-scrollkeeper"
-
-do_configure_prepend() {
-    sed -i -e "s: help : :g" ${S}/Makefile.am
-}
-
-PNBLACKLIST[cheese] ?= "Depends on blacklisted gstreamer - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[cheese] ?= "Depends on blacklisted gnome-desktop - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/browser_command.patch b/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/browser_command.patch
deleted file mode 100644
index 75e45e0..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/browser_command.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Imported from Debian 0.1.8-3
-
-Upstream-Status: Pending
-
-diff --git a/src/Config.cxx b/src/Config.cxx
-index 28f37ab..bc58819 100644
---- a/src/Config.cxx
-+++ b/src/Config.cxx
-@@ -22,7 +22,7 @@
- using namespace ePDFView;
- 
- // Constants
--static const gchar *DEFAULT_EXTERNAL_BROWSER_COMMAND_LINE = "firefox %s";
-+static const gchar *DEFAULT_EXTERNAL_BROWSER_COMMAND_LINE = "x-www-browser %s";
- static const gchar *DEFAULT_OPEN_FILE_FOLDER = NULL;
- static const gchar *DEFAULT_SAVE_FILE_FOLDER = NULL;
- static const gboolean DEFAULT_SHOW_STATUSBAR = TRUE;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/fix-format.patch b/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/fix-format.patch
deleted file mode 100644
index 8ad5b97..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/fix-format.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Imported from Debian 0.1.8-3
-
-Upstream-Status: Pending
-
-diff --git a/src/gtk/MainView.cxx b/src/gtk/MainView.cxx
-index b983bff..f87de28 100644
---- a/src/gtk/MainView.cxx
-+++ b/src/gtk/MainView.cxx
-@@ -634,8 +634,9 @@ MainView::showErrorMessage (const gchar *title, const gchar *body)
-             GTK_DIALOG_DESTROY_WITH_PARENT,
-             GTK_MESSAGE_ERROR,
-             GTK_BUTTONS_OK,
-+            "%s",
-             title);
--    gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(errorDialog),
-+    gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(errorDialog), "%s",
-                                               body);
-     gtk_dialog_run (GTK_DIALOG (errorDialog));
-     gtk_widget_destroy (errorDialog);
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/glib-single-include.patch b/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/glib-single-include.patch
deleted file mode 100644
index 84a4913..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/glib-single-include.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Imported from Debian 0.1.8-3
-
-Upstream-Status: Pending
-
-diff --git a/src/gtk/StockIcons.h b/src/gtk/StockIcons.h
-index c142a7a..58fcf2e 100644
---- a/src/gtk/StockIcons.h
-+++ b/src/gtk/StockIcons.h
-@@ -18,7 +18,7 @@
- #if !defined (__STOCK_ICONS_H__)
- #define __STOCK_ICONS_H__
- 
--#include <glib/gmacros.h>
-+#include <glib.h>
- 
- G_BEGIN_DECLS
- 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/swap-colors.patch b/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/swap-colors.patch
deleted file mode 100644
index 282bfb1..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview/swap-colors.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Imported from Debian 0.1.8-3
-
-Upstream-Status: Pending
-
-Index: trunk/src/PDFDocument.cxx
-===================================================================
---- trunk/src/PDFDocument.cxx	(revision 361)
-+++ trunk/src/PDFDocument.cxx	(revision 367)
-@@ -21,4 +21,5 @@
- #include <poppler.h>
- #include <unistd.h>
-+#include <algorithm>
- #include "epdfview.h"
- 
-@@ -33,4 +34,22 @@
- static PageMode convertPageMode (gint pageMode);
- static gchar *getAbsoluteFileName (const gchar *fileName);
-+
-+namespace
-+{
-+    void
-+    convert_bgra_to_rgba (guint8 *data, int width, int height)
-+    {
-+        using std::swap;
-+
-+        for (int y = 0; y < height; y++)
-+        {
-+            for (int x = 0; x < width; x++)
-+            {
-+                swap(data[0], data[2]);
-+                data += 4;
-+            }
-+        }
-+    }
-+}
- 
- ///
-@@ -651,4 +670,5 @@
-         cairo_destroy(context);
-         cairo_surface_destroy (surface);
-+        convert_bgra_to_rgba(renderedPage->getData (), width, height);
- #else // !HAVE_POPPLER_0_17_0
-         // Create the pixbuf from the data and render to it.
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview_0.1.8.bb b/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview_0.1.8.bb
deleted file mode 100644
index 5e11a95..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/epdfview/epdfview_0.1.8.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "A lightweight PDF viewer based on gtk and poppler"
-HOMEPAGE = "http://www.emma-soft.com/projects/epdfview/"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-SECTION = "x11/applications"
-DEPENDS = "gtk+ poppler"
-
-PR = "r3"
-
-EXTRA_OECONF += "--without-cups"
-
-inherit autotools gettext
-
-SRC_URI = "http://www.emma-soft.com/projects/${BPN}/chrome/site/releases/${BP}.tar.bz2 \
-           file://browser_command.patch \
-           file://fix-format.patch \
-           file://glib-single-include.patch \
-           file://swap-colors.patch \
-"
-SRC_URI[md5sum] = "e50285b01612169b2594fea375f53ae4"
-SRC_URI[sha256sum] = "948648ae7c9d7b3b408d738bd4f48d87375b1196cae1129d6b846a8de0f2f8f0"
-
-PNBLACKLIST[epdfview] ?= "BROKEN: images are not displayed anymore - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-# There will be no further development / upstream is gone [1]
-# [1] https://bugzilla.redhat.com/show_bug.cgi?id=906121
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/gnome-mplayer/gmtk_1.0.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-apps/gnome-mplayer/gmtk_1.0.5.bb
deleted file mode 100644
index f6d737c..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/gnome-mplayer/gmtk_1.0.5.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "GTK+ widget and function libraries for gnome-mplayer"
-HOMEPAGE = "http://code.google.com/p/gmtk"
-SECTION = "libs"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-DEPENDS = "gtk+ alsa-lib glib-2.0 virtual/libx11 intltool-native pulseaudio gtk+3"
-
-SRC_URI = "http://${BPN}.googlecode.com/files/${BP}.tar.gz"
-SRC_URI[md5sum] = "e06e9ca8d61d74910343bb3ef4348f7f"
-SRC_URI[sha256sum] = "a07130d62719e8c1244f8405dd97445798df5204fc0f3f2f2b669b125114b468"
-
-EXTRA_OECONF = "--disable-gconf --with-gio --with-alsa --enable-keystore"
-
-inherit gettext pkgconfig autotools gconf
-
-PNBLACKLIST[gmtk] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130661/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/gnome-mplayer/gnome-mplayer_1.0.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-apps/gnome-mplayer/gnome-mplayer_1.0.5.bb
deleted file mode 100644
index 629b830..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/gnome-mplayer/gnome-mplayer_1.0.5.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "A GTK+ interface to MPlayer"
-HOMEPAGE = "http://code.google.com/p/gnome-mplayer"
-SECTION = "multimedia"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-PNBLACKLIST[gnome-mplayer] ?= "rdepends on blacklisted mplayer - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-PR = "r2"
-
-DEPENDS = "gmtk gtk+ alsa-lib libnotify glib-2.0 dbus-glib virtual/libx11 libxscrnsaver"
-
-SRC_URI = "http://${BPN}.googlecode.com/files/${BP}.tar.gz"
-SRC_URI[md5sum] = "1d3ab24c5501b5528e357931ca4dc6da"
-SRC_URI[sha256sum] = "ac3c179345baecb4ca5237782aa33e83253a87bf8b42ce6eb3a9207a340f61b2"
-
-EXTRA_OECONF = "--with-gio --with-alsa --with-dbus --with-libnotify"
-
-FILES_${PN} += "${datadir}/gnome-control-center/default-apps/${PN}.xml"
-PACKAGES =+ "${PN}-nautilus-extension"
-FILES_${PN}-nautilus-extension += "${libdir}/nautilus/extensions-2.0/*.so \
-                                   ${libdir}/nautilus/extensions-3.0/*.so"
-FILES_${PN}-dev += "${libdir}/nautilus/extensions-2.0/*.la \
-                    ${libdir}/nautilus/extensions-3.0/*.la"
-FILES_${PN}-staticdev += "${libdir}/nautilus/extensions-2.0/*.a \
-                          ${libdir}/nautilus/extensions-3.0/*.a"
-FILES_${PN}-dbg += "${libdir}/nautilus/extensions-2.0/.debug \
-                    ${libdir}/nautilus/extensions-3.0/.debug"
-
-inherit gettext pkgconfig mime gtk-icon-cache autotools
-
-RDEPENDS_${PN} = "mplayer"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-apps/pinpoint/pinpoint_git.bb b/import-layers/meta-openembedded/meta-gnome/recipes-apps/pinpoint/pinpoint_git.bb
index 5e902a1..bf5178c 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-apps/pinpoint/pinpoint_git.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-apps/pinpoint/pinpoint_git.bb
@@ -9,7 +9,10 @@
 
 DEPENDS = "glib-2.0 gdk-pixbuf cogl-1.0 clutter-1.0 clutter-gst-3.0 librsvg"
 
-inherit autotools gettext pkgconfig
+inherit autotools gettext pkgconfig distro_features_check
+
+# cogl requires opengl
+REQUIRED_DISTRO_FEATURES = "opengl"
 
 SRC_URI = "git://git.gnome.org/pinpoint"
 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.4.4.bb b/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.4.4.bb
index 5ad1070..14b336a 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.4.4.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.4.4.bb
@@ -17,10 +17,12 @@
 PACKAGECONFIG[modemmanager] = "--with-wwan,--without-wwan,modemmanager"
 PACKAGECONFIG ??= ""
 
+GI_DATA_ENABLED_libc-musl = "False"
+
 do_configure_append() {
     # Sigh... --enable-compile-warnings=no doesn't actually turn off -Werror
     for i in $(find ${B} -name "Makefile") ; do
-        sed -i -e s:-Werror::g $i
+        sed -i -e s%-Werror[^[:space:]]*%%g $i
     done
 }
 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.27.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.27.0.bb
deleted file mode 100644
index c921065..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.27.0.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "A partition editor to graphically manage disk partitions "
-HOMEPAGE = "http://gparted.org/index.php"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-inherit autotools pkgconfig gtk-icon-cache
-
-SRC_URI = " \
-    ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
-    file://org.yoctoproject.pkexec.run-gparted.policy \
-    file://gparted_polkit \
-"
-SRC_URI[md5sum] = "726f539f774b442670028af656f270bd"
-SRC_URI[sha256sum] = "208cf60c061b86bee4f658d568a3b5d843dce3ab9847f66b452298268799e7bd"
-
-DEPENDS = "glib-2.0 glib-2.0-native gtkmm parted gnome-doc-utils intltool-native"
-
-do_install_append() {
-    # Add a script which checks if polkit is installed.
-    # If yes: a policy is requested from polkit / otherwise start as usual
-    install ${WORKDIR}/gparted_polkit ${D}${sbindir}
-    sed -i 's:%sbindir%:${sbindir}:g' ${D}${sbindir}/gparted_polkit
-    # relink menu entry to use our script
-    sed -i 's:${sbindir}/gparted:${sbindir}/gparted_polkit:g' ${D}${datadir}/applications/gparted.desktop
-
-    install -d ${D}${datadir}/polkit-1/actions
-    install ${WORKDIR}/org.yoctoproject.pkexec.run-gparted.policy ${D}${datadir}/polkit-1/actions/org.yoctoproject.pkexec.run-gparted.policy
-}
-
-EXTRA_OECONF = "--disable-scrollkeeper --disable-doc"
-
-FILES_${PN} += " \
-    ${datadir}/appdata \
-    ${datadir}/icons \
-    ${datadir}/polkit-1 \
-"
-
-RDEPENDS_${PN} = "dosfstools mtools e2fsprogs"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.28.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.28.1.bb
new file mode 100644
index 0000000..83ab6f2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.28.1.bb
@@ -0,0 +1,38 @@
+SUMMARY = "A partition editor to graphically manage disk partitions "
+HOMEPAGE = "http://gparted.org/index.php"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit autotools pkgconfig gtk-icon-cache
+
+SRC_URI = " \
+    ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
+    file://org.yoctoproject.pkexec.run-gparted.policy \
+    file://gparted_polkit \
+"
+SRC_URI[md5sum] = "ab72464a3ab2137664d9df8462befd3f"
+SRC_URI[sha256sum] = "76891f14394754f7d6ecceba2af0e585bf89f9d780c389a255dcd41a2f45d333"
+
+DEPENDS = "glib-2.0 glib-2.0-native gtkmm parted gnome-doc-utils intltool-native"
+
+do_install_append() {
+    # Add a script which checks if polkit is installed.
+    # If yes: a policy is requested from polkit / otherwise start as usual
+    install ${WORKDIR}/gparted_polkit ${D}${sbindir}
+    sed -i 's:%sbindir%:${sbindir}:g' ${D}${sbindir}/gparted_polkit
+    # relink menu entry to use our script
+    sed -i 's:${sbindir}/gparted:${sbindir}/gparted_polkit:g' ${D}${datadir}/applications/gparted.desktop
+
+    install -d ${D}${datadir}/polkit-1/actions
+    install ${WORKDIR}/org.yoctoproject.pkexec.run-gparted.policy ${D}${datadir}/polkit-1/actions/org.yoctoproject.pkexec.run-gparted.policy
+}
+
+EXTRA_OECONF = "--disable-scrollkeeper --disable-doc"
+
+FILES_${PN} += " \
+    ${datadir}/appdata \
+    ${datadir}/icons \
+    ${datadir}/polkit-1 \
+"
+
+RDEPENDS_${PN} = "dosfstools mtools e2fsprogs"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-extended/gtk-theme-torturer/gtk-theme-torturer_git.bb b/import-layers/meta-openembedded/meta-gnome/recipes-extended/gtk-theme-torturer/gtk-theme-torturer_git.bb
deleted file mode 100644
index c419d0f..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-extended/gtk-theme-torturer/gtk-theme-torturer_git.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "GTK+ Theme benchmark program"
-DEPENDS = "gtk+"
-HOMEPAGE = "http://wiki.laptop.org/go/GTK_for_OLPC"
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://appwindow.c;endline=13;md5=8c09920de460c7ea1f64ee56986aabd9"
-
-SRCREV = "99962ae39bb5aadb31929b25c58e1a053f9c9545"
-PV = "0.0.0+git${SRCPV}"
-
-SRC_URI = "git://dev.laptop.org/projects/soc-gtk/"
-S = "${WORKDIR}/git/gtk-theme-torturer"
-
-CFLAGS += "-Wl,-rpath-link,${STAGING_LIBDIR}"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-do_install() {
-    install -d ${D}${bindir}
-    install -m 0755 torturer ${D}${bindir}
-}
-
-# http://errors.yoctoproject.org/Errors/Details/35132/
-PNBLACKLIST[gtk-theme-torturer] ?= "BROKEN: gmacros.h:182:53: error: size of array '_GStaticAssertCompileTimeAssertion_2' is negative - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword/0002-Bug-13754-Fix-build-on-gcc-6-default-to-C-11.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword/0002-Bug-13754-Fix-build-on-gcc-6-default-to-C-11.patch
deleted file mode 100644
index 595ee8e..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword/0002-Bug-13754-Fix-build-on-gcc-6-default-to-C-11.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From a83e6f50dbd5efa16fb39efe32b9de370f103130 Mon Sep 17 00:00:00 2001
-From: Hubert Figuiere <hub@figuiere.net>
-Date: Sat, 23 Jan 2016 20:46:02 +0000
-Subject: [PATCH] Bug 13754 - Fix build on gcc-6 (default to C++11).
-
-This is debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811381
-
-git-svn-id: svn+ssh://svn.abisource.com/svnroot/abiword/trunk@35182 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-
-Upstream-Status: Backport
----
- plugins/collab/backends/service/xp/RealmProtocol.cpp | 4 ++--
- plugins/collab/backends/service/xp/soa_soup.cpp      | 2 +-
- plugins/latex/xp/ie_exp_LaTeX.cpp                    | 2 +-
- plugins/xslfo/xp/ie_exp_XSL-FO.cpp                   | 2 +-
- 4 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/plugins/collab/backends/service/xp/RealmProtocol.cpp b/plugins/collab/backends/service/xp/RealmProtocol.cpp
-index fb426eb..347a49c 100644
---- a/plugins/collab/backends/service/xp/RealmProtocol.cpp
-+++ b/plugins/collab/backends/service/xp/RealmProtocol.cpp
-@@ -6,8 +6,8 @@ namespace protocolv1 {
- 
- #define MAX_PACKET_DATA_SIZE 64*1024*1024
- 		
--#define RPV1_PACKET_NONEXISTENT -2
--#define RPV1_PACKET_VARIABLE -1
-+#define RPV1_PACKET_NONEXISTENT uint32_t(-2)
-+#define RPV1_PACKET_VARIABLE uint32_t(-1)
- 	
- static uint32_t body_size[6] = {
- 	RPV1_PACKET_NONEXISTENT, /* 0: reserved */
-diff --git a/plugins/collab/backends/service/xp/soa_soup.cpp b/plugins/collab/backends/service/xp/soa_soup.cpp
-index 4b81735..f4f5134 100644
---- a/plugins/collab/backends/service/xp/soa_soup.cpp
-+++ b/plugins/collab/backends/service/xp/soa_soup.cpp
-@@ -163,7 +163,7 @@ namespace soup_soa {
- 	
- 	static bool _invoke(const std::string& /*url*/, const soa::method_invocation& /*mi*/, SoaSoupSession& sess, std::string& result) {
- 		if (!sess.m_session || !sess.m_msg )
--			return soa::GenericPtr();
-+			return false;
- 
- 		guint status = soup_session_send_message (sess.m_session, sess.m_msg);
- 		if (!(SOUP_STATUS_IS_SUCCESSFUL (status) ||
-diff --git a/plugins/latex/xp/ie_exp_LaTeX.cpp b/plugins/latex/xp/ie_exp_LaTeX.cpp
-index 7aaf3a9..8bcc250 100644
---- a/plugins/latex/xp/ie_exp_LaTeX.cpp
-+++ b/plugins/latex/xp/ie_exp_LaTeX.cpp
-@@ -1330,7 +1330,7 @@ void s_LaTeX_Listener::_outputData(const UT_UCSChar * data, UT_uint32 length)
- 	m_pie->write(sBuf.c_str(),sBuf.size());
- }
- 
--#define SUB(a,who) case a: subst = "\\(\\"who"\\)"; return true;
-+#define SUB(a,who) case a: subst = "\\(\\" who"\\)"; return true;
- #define SUBd(a,who) case a: subst = who; return true;
- static bool _convertLettersToSymbols(char c, const char *& subst)
- {
-diff --git a/plugins/xslfo/xp/ie_exp_XSL-FO.cpp b/plugins/xslfo/xp/ie_exp_XSL-FO.cpp
-index cc5e4e6..957226e 100644
---- a/plugins/xslfo/xp/ie_exp_XSL-FO.cpp
-+++ b/plugins/xslfo/xp/ie_exp_XSL-FO.cpp
-@@ -1451,7 +1451,7 @@ void s_XSL_FO_Listener::_openSection(PT_AttrPropIndex api)
- 	{ \
- 		UT_UTF8String esc = szValue; \
- 		esc.escapeXML(); \
--		buf += " "x"=\""; \
-+		buf += " " x"=\""; \
- 		buf += esc.utf8_str(); \
- 		buf += "\""; \
- 	}
--- 
-2.5.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.1.bb
deleted file mode 100644
index 34fc97d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.1.bb
+++ /dev/null
@@ -1,142 +0,0 @@
-SUMMARY = "AbiWord is free word processing program similar to Microsoft(r) Word"
-HOMEPAGE = "http://www.abiword.org"
-SECTION = "x11/office"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ecd3ac329fca77e2d0e412bec38e1c20"
-DEPENDS  = " \
-    perl-native \
-    gtk+ \
-    gtkmathview \
-    wv \
-    libglade \
-    libfribidi \
-    jpeg \
-    libpng \
-    librsvg \
-    libwmf-native \
-    asio \
-    evolution-data-server \
-    libxslt \
-    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'office-layer', 'redland rasqal', '', d)} \
-"
-RDEPENDS_${PN}_append_libc-glibc = " \
-    glibc-gconv-ibm850 glibc-gconv-cp1252 \
-    glibc-gconv-iso8859-15 glibc-gconv-iso8859-1 \
-"
-RCONFLICTS_${PN} = "${PN}-embedded"
-
-SRC_URI = " \
-    http://www.abisource.com/downloads/${BPN}/${PV}/source/${BP}.tar.gz \
-    file://0001-plugins-aiksaurus-Makefile.am-remove-uncomplete-opti.patch \
-    file://0002-Bug-13754-Fix-build-on-gcc-6-default-to-C-11.patch \
-"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c5edcc3ccd864b19004d14e9c1c9a26a"
-
-SRC_URI[md5sum] = "f3f8052e7b4979a43b75775a381e6cb8"
-SRC_URI[sha256sum] = "e094f6fbf0afc5c5538b4894888e7c346f8ee8f49c9d24821dd696d0734865c6"
-
-#want 3.x from 3.x.y for the installation directory
-SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
-
-inherit autotools-brokensep pkgconfig
-
-PACKAGECONFIG ??= " \
-    collab-backend-xmpp collab-backend-tcp \
-    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'office-layer', 'libical', '', d)} \
-"
-PACKAGECONFIG[libical] = "--with-libical,--without-libical,libical raptor2"
-PACKAGECONFIG[spell] = "--enable-spell,--disable-spell,enchant"
-PACKAGECONFIG[collab-backend-xmpp] = "--enable-collab-backend-xmpp,--disable-collab-backend-xmpp,libgsf libxml2 loudmouth"
-PACKAGECONFIG[collab-backend-tcp] = "--enable-collab-backend-tcp,--disable-collab-backend-tcp,libgsf libxml2"
-PACKAGECONFIG[collab-backend-service] = "--enable-collab-backend-service,--disable-collab-backend-service,libgsf libxml2 libsoup-2.4 gnutls"
-PACKAGECONFIG[collab-backend-telepathy] = "--enable-collab-backend-telepathy,--disable-collab-backend-telepathy,libgsf libxml2 telepathy-glib telepathy-mission-control"
-PACKAGECONFIG[collab-backend-sugar] = "--enable-collab-backend-sugar,--disable-collab-backend-sugar,libgsf libxml2 dbus-glib"
-
-EXTRA_OECONF = " --disable-static  \
-                 --enable-plugins \
-                 --enable-clipart \
-                 --enable-templates \
-                 --without-gnomevfs \
-                 --with-gtk2 \
-                 --with-libwmf-config=${STAGING_DIR} \
-"
-
-LDFLAGS += "-lgmodule-2.0"
-
-do_compile() {
-    cd goffice-bits2
-    make goffice-paths.h
-    make libgoffice.la
-    cd ${B}
-    oe_runmake
-}
-
-PACKAGES += " ${PN}-clipart ${PN}-strings ${PN}-systemprofiles ${PN}-templates "
-
-FILES_${PN} += " \
-                ${libdir}/lib${PN}-*.so \
-                ${datadir}/mime-info \
-                ${datadir}/icons/* \
-                ${datadir}/${PN}-${SHRT_VER}/glade \
-                ${datadir}/${PN}-${SHRT_VER}/scripts \
-                ${datadir}/${PN}-${SHRT_VER}/system.profile-en \
-                ${datadir}/${PN}-${SHRT_VER}/system.profile-en_GB \
-                ${datadir}/${PN}-${SHRT_VER}/templates/normal.awt \
-                ${datadir}/${PN}-${SHRT_VER}/templates/normal.awt-en_GB \
-                ${datadir}/${PN}-${SHRT_VER}/templates/Employee-Directory.awt \
-                ${datadir}/${PN}-${SHRT_VER}/templates/Business-Report.awt \
-                ${datadir}/${PN}-${SHRT_VER}/templates/Fax-Coversheet.awt \
-                ${datadir}/${PN}-${SHRT_VER}/templates/Resume.awt \
-                ${datadir}/${PN}-${SHRT_VER}/templates/Two-Columns.awt \
-                ${datadir}/${PN}-${SHRT_VER}/templates/Memo.awt \
-                ${datadir}/${PN}-${SHRT_VER}/templates/Press-Release.awt \
-                ${datadir}/${PN}-${SHRT_VER}/certs \
-                ${datadir}/${PN}-${SHRT_VER}/ui \
-                ${datadir}/${PN}-${SHRT_VER}/xsl* \
-                ${datadir}/${PN}-${SHRT_VER}/mime-info \
-                ${datadir}/${PN}-${SHRT_VER}/Pr*.xml \
-"
-
-# don't steal /usr/lib/libabiword-3.0.so from ${PN}
-# in this case it's needed in ${PN}
-FILES_${PN}-dev = " \
-                  ${includedir} \
-                  ${libdir}/pkgconfig \
-                  ${libdir}/${PN}*.la \
-                  ${libdir}/lib${PN}*.la \
-                  ${libdir}/${PN}-${SHRT_VER}/plugins/*.la \
-"
-FILES_${PN}-dbg += "${libdir}/${PN}-${SHRT_VER}/plugins/.debug"
-FILES_${PN}-doc += "${datadir}/${PN}-*/readme*"
-
-FILES_${PN}-strings        += "${datadir}/${PN}-${SHRT_VER}/strings"
-FILES_${PN}-systemprofiles += "${datadir}/${PN}-${SHRT_VER}/system.profile*"
-FILES_${PN}-clipart        += "${datadir}/${PN}-${SHRT_VER}/clipart"
-FILES_${PN}-strings        += "${datadir}/${PN}-${SHRT_VER}/AbiWord/strings"
-FILES_${PN}-systemprofiles += "${datadir}/${PN}-${SHRT_VER}/AbiWord/system.profile*"
-FILES_${PN}-templates      += "${datadir}/${PN}-${SHRT_VER}/templates"
-
-PACKAGES_DYNAMIC += "^${PN}-meta.* ^${PN}-plugin-.*"
-
-python populate_packages_prepend () {
-    abiword_libdir    = d.expand('${libdir}/${PN}-${SHRT_VER}/plugins')
-    do_split_packages(d, abiword_libdir, '(.*)\.so$', 'abiword-plugin-%s', 'Abiword plugin for %s', extra_depends='')
-
-    metapkg = "abiword-meta"
-    d.setVar('ALLOW_EMPTY_' + metapkg, "1")
-    d.setVar('FILES_' + metapkg, "")
-    blacklist = [ 'abiword-plugins-dbg', 'abiword-plugins', 'abiword-plugins-doc', 'abiword-plugins-dev', 'abiword-plugins-locale' ]
-    metapkg_rdepends = []
-    packages = d.getVar('PACKAGES').split()
-    for pkg in packages[1:]:
-        if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale") and not pkg.count("abiword-doc"):
-            print("Modifying %s" % pkg)
-            metapkg_rdepends.append(pkg)
-    d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
-    d.setVar('DESCRIPTION_' + metapkg, 'abiword-plugin meta package')
-    packages.append(metapkg)
-    d.setVar('PACKAGES', ' '.join(packages))
-}
-
-FILES_${PN}-plugin-openxml += "${datadir}/${PN}-${SHRT_VER}/omml_xslt"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb
new file mode 100644
index 0000000..2a13e48
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb
@@ -0,0 +1,141 @@
+SUMMARY = "AbiWord is free word processing program similar to Microsoft(r) Word"
+HOMEPAGE = "http://www.abiword.org"
+SECTION = "x11/office"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ecd3ac329fca77e2d0e412bec38e1c20"
+DEPENDS  = " \
+    perl-native \
+    gtk+ \
+    gtkmathview \
+    wv \
+    libglade \
+    libfribidi \
+    jpeg \
+    libpng \
+    librsvg \
+    libwmf-native \
+    asio \
+    evolution-data-server \
+    libxslt \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'office-layer', 'redland rasqal', '', d)} \
+"
+RDEPENDS_${PN}_append_libc-glibc = " \
+    glibc-gconv-ibm850 glibc-gconv-cp1252 \
+    glibc-gconv-iso8859-15 glibc-gconv-iso8859-1 \
+"
+RCONFLICTS_${PN} = "${PN}-embedded"
+
+SRC_URI = " \
+    http://www.abisource.com/downloads/${BPN}/${PV}/source/${BP}.tar.gz \
+    file://0001-plugins-aiksaurus-Makefile.am-remove-uncomplete-opti.patch \
+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c5edcc3ccd864b19004d14e9c1c9a26a"
+
+SRC_URI[md5sum] = "cda6dd58c747c133b421cc7eb18f5796"
+SRC_URI[sha256sum] = "afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090cf3522"
+
+#want 3.x from 3.x.y for the installation directory
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
+
+inherit autotools-brokensep pkgconfig
+
+PACKAGECONFIG ??= " \
+    collab-backend-xmpp collab-backend-tcp \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'office-layer', 'libical', '', d)} \
+"
+PACKAGECONFIG[libical] = "--with-libical,--without-libical,libical raptor2"
+PACKAGECONFIG[spell] = "--enable-spell,--disable-spell,enchant"
+PACKAGECONFIG[collab-backend-xmpp] = "--enable-collab-backend-xmpp,--disable-collab-backend-xmpp,libgsf libxml2 loudmouth"
+PACKAGECONFIG[collab-backend-tcp] = "--enable-collab-backend-tcp,--disable-collab-backend-tcp,libgsf libxml2"
+PACKAGECONFIG[collab-backend-service] = "--enable-collab-backend-service,--disable-collab-backend-service,libgsf libxml2 libsoup-2.4 gnutls"
+PACKAGECONFIG[collab-backend-telepathy] = "--enable-collab-backend-telepathy,--disable-collab-backend-telepathy,libgsf libxml2 telepathy-glib telepathy-mission-control"
+PACKAGECONFIG[collab-backend-sugar] = "--enable-collab-backend-sugar,--disable-collab-backend-sugar,libgsf libxml2 dbus-glib"
+
+EXTRA_OECONF = " --disable-static  \
+                 --enable-plugins \
+                 --enable-clipart \
+                 --enable-templates \
+                 --without-gnomevfs \
+                 --with-gtk2 \
+                 --with-libwmf-config=${STAGING_DIR} \
+"
+
+LDFLAGS += "-lgmodule-2.0"
+
+do_compile() {
+    cd goffice-bits2
+    make goffice-paths.h
+    make libgoffice.la
+    cd ${B}
+    oe_runmake
+}
+
+PACKAGES += " ${PN}-clipart ${PN}-strings ${PN}-systemprofiles ${PN}-templates "
+
+FILES_${PN} += " \
+                ${libdir}/lib${PN}-*.so \
+                ${datadir}/mime-info \
+                ${datadir}/icons/* \
+                ${datadir}/${PN}-${SHRT_VER}/glade \
+                ${datadir}/${PN}-${SHRT_VER}/scripts \
+                ${datadir}/${PN}-${SHRT_VER}/system.profile-en \
+                ${datadir}/${PN}-${SHRT_VER}/system.profile-en_GB \
+                ${datadir}/${PN}-${SHRT_VER}/templates/normal.awt \
+                ${datadir}/${PN}-${SHRT_VER}/templates/normal.awt-en_GB \
+                ${datadir}/${PN}-${SHRT_VER}/templates/Employee-Directory.awt \
+                ${datadir}/${PN}-${SHRT_VER}/templates/Business-Report.awt \
+                ${datadir}/${PN}-${SHRT_VER}/templates/Fax-Coversheet.awt \
+                ${datadir}/${PN}-${SHRT_VER}/templates/Resume.awt \
+                ${datadir}/${PN}-${SHRT_VER}/templates/Two-Columns.awt \
+                ${datadir}/${PN}-${SHRT_VER}/templates/Memo.awt \
+                ${datadir}/${PN}-${SHRT_VER}/templates/Press-Release.awt \
+                ${datadir}/${PN}-${SHRT_VER}/certs \
+                ${datadir}/${PN}-${SHRT_VER}/ui \
+                ${datadir}/${PN}-${SHRT_VER}/xsl* \
+                ${datadir}/${PN}-${SHRT_VER}/mime-info \
+                ${datadir}/${PN}-${SHRT_VER}/Pr*.xml \
+"
+
+# don't steal /usr/lib/libabiword-3.0.so from ${PN}
+# in this case it's needed in ${PN}
+FILES_${PN}-dev = " \
+                  ${includedir} \
+                  ${libdir}/pkgconfig \
+                  ${libdir}/${PN}*.la \
+                  ${libdir}/lib${PN}*.la \
+                  ${libdir}/${PN}-${SHRT_VER}/plugins/*.la \
+"
+FILES_${PN}-dbg += "${libdir}/${PN}-${SHRT_VER}/plugins/.debug"
+FILES_${PN}-doc += "${datadir}/${PN}-*/readme*"
+
+FILES_${PN}-strings        += "${datadir}/${PN}-${SHRT_VER}/strings"
+FILES_${PN}-systemprofiles += "${datadir}/${PN}-${SHRT_VER}/system.profile*"
+FILES_${PN}-clipart        += "${datadir}/${PN}-${SHRT_VER}/clipart"
+FILES_${PN}-strings        += "${datadir}/${PN}-${SHRT_VER}/AbiWord/strings"
+FILES_${PN}-systemprofiles += "${datadir}/${PN}-${SHRT_VER}/AbiWord/system.profile*"
+FILES_${PN}-templates      += "${datadir}/${PN}-${SHRT_VER}/templates"
+
+PACKAGES_DYNAMIC += "^${PN}-meta.* ^${PN}-plugin-.*"
+
+python populate_packages_prepend () {
+    abiword_libdir    = d.expand('${libdir}/${PN}-${SHRT_VER}/plugins')
+    do_split_packages(d, abiword_libdir, '(.*)\.so$', 'abiword-plugin-%s', 'Abiword plugin for %s', extra_depends='')
+
+    metapkg = "abiword-meta"
+    d.setVar('ALLOW_EMPTY_' + metapkg, "1")
+    d.setVar('FILES_' + metapkg, "")
+    blacklist = [ 'abiword-plugins-dbg', 'abiword-plugins', 'abiword-plugins-doc', 'abiword-plugins-dev', 'abiword-plugins-locale' ]
+    metapkg_rdepends = []
+    packages = d.getVar('PACKAGES').split()
+    for pkg in packages[1:]:
+        if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale") and not pkg.count("abiword-doc"):
+            print("Modifying %s" % pkg)
+            metapkg_rdepends.append(pkg)
+    d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
+    d.setVar('DESCRIPTION_' + metapkg, 'abiword-plugin meta package')
+    packages.append(metapkg)
+    d.setVar('PACKAGES', ' '.join(packages))
+}
+
+FILES_${PN}-plugin-openxml += "${datadir}/${PN}-${SHRT_VER}/omml_xslt"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-imapx-Fix-signature-for-imapx_tokenise_struct.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-imapx-Fix-signature-for-imapx_tokenise_struct.patch
new file mode 100644
index 0000000..f82a76d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-imapx-Fix-signature-for-imapx_tokenise_struct.patch
@@ -0,0 +1,33 @@
+From 0e10e976025b21d12df099e82951f759024ad649 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 24 Aug 2017 22:04:56 -0700
+Subject: [PATCH] imapx: Fix signature for imapx_tokenise_struct()
+
+clang complains about different signature for this patch
+
+Fixes
+camel/providers/imapx/camel-imapx-tokens.txt:56:1: error: conflicting types for 'imapx_tokenise_struct'
+| imapx_tokenise_struct (register const char *str, register size_t len)
+| ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ camel/providers/imapx/camel-imapx-tokens.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/camel/providers/imapx/camel-imapx-tokens.txt b/camel/providers/imapx/camel-imapx-tokens.txt
+index d48501865..994c368c0 100644
+--- a/camel/providers/imapx/camel-imapx-tokens.txt
++++ b/camel/providers/imapx/camel-imapx-tokens.txt
+@@ -1,7 +1,7 @@
+ /* This contains all of the keywords we care about.  These
+    can be converted to an id very efficiently */
+ struct _imapx_keyword {const gchar *name; camel_imapx_id_t id; };
+-struct _imapx_keyword *imapx_tokenise_struct (register const char *str, register unsigned int len);
++struct _imapx_keyword *imapx_tokenise_struct (register const char *str, register size_t len);
+ %%
+ ALERT,          IMAPX_ALERT
+ APPENDUID,	IMAPX_APPENDUID
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_git.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_git.bb
index ff3365b..aadc4b5 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_git.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_git.bb
@@ -15,16 +15,16 @@
 # 3.4 series needs libgdata-0.10*, 3.8 series needs also libsecret instead of gnome-keyring
 PV = "3.2.3+git${SRCPV}"
 
-SRC_URI = " \
-    git://git.gnome.org/evolution-data-server;branch=gnome-3-2 \
-    file://0001-contact-Replace-the-Novell-sample-contact-with-somet.patch \
-    file://0002-Fix-for-automake-1.12.x.patch \
-    file://0003-Disable-Werror-for-automake.patch \
-    file://0004-configure-Fix-libical-pkg-config-trying-to-use-host-.patch \
-    file://0005-soup-adapt-to-new-libxml2-API-from-2.9.0.patch \
-    file://0006-configure.ac-do-not-overwrite-localedir.patch \
-    file://iconv-detect.h \
-"
+SRC_URI = "git://git.gnome.org/evolution-data-server;branch=gnome-3-2 \
+           file://0001-contact-Replace-the-Novell-sample-contact-with-somet.patch \
+           file://0002-Fix-for-automake-1.12.x.patch \
+           file://0003-Disable-Werror-for-automake.patch \
+           file://0004-configure-Fix-libical-pkg-config-trying-to-use-host-.patch \
+           file://0005-soup-adapt-to-new-libxml2-API-from-2.9.0.patch \
+           file://0006-configure.ac-do-not-overwrite-localedir.patch \
+           file://iconv-detect.h \
+           file://0001-imapx-Fix-signature-for-imapx_tokenise_struct.patch \
+           "
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb
index aae8e71..78a9495 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb
@@ -2,13 +2,11 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=96f2f8d5ee576a2163977938ea36fa7b"
 SECTION = "x11/office"
-DEPENDS = "gtk+3 libsecret gnome-desktop3 poppler gstreamer1.0-plugins-base orc adwaita-icon-theme intltool-native gnome-common-native"
+DEPENDS = "gtk+3 libsecret ${@bb.utils.contains('DISTRO_FEATURES','x11','gnome-desktop3','',d)} poppler gstreamer1.0-plugins-base orc adwaita-icon-theme intltool-native gnome-common-native"
 PR = "r5"
 
 inherit gnome pkgconfig gtk-icon-cache gsettings gobject-introspection distro_features_check systemd
 
-REQUIRED_DISTRO_FEATURES = "x11"
-
 SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
            file://0001-help-remove-YELP-macro.patch \
            file://0001-Add-format-attribute-to-_synctex_malloc.patch \
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gcalctool/gcalctool_5.32.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gcalctool/gcalctool_5.32.0.bb
deleted file mode 100644
index 6028f2d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gcalctool/gcalctool_5.32.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "gcalctool is a powerful calculator"
-SECTION = "x11"
-DEPENDS = "gtk+ gnome-doc-utils"
-
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
-SRC_URI = "http://download.gnome.org/sources/${BPN}/${SHRT_VER}/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "48db927c6e7ee1d5395f953a8c184c98"
-SRC_URI[sha256sum] = "346f645c0fdef900642f6e9a2c18e7ba9a7ca9bc62fe2b08eb418f065a425c89"
-
-inherit autotools pkgconfig gsettings
-
-do_configure_prepend() {
-    sed -i -e "s: help: :g" ${S}/Makefile.am
-}
-
-PNBLACKLIST[gcalctool] ?= "broken at least since April 2013 http://permalink.gmane.org/gmane.comp.handhelds.openembedded/57920 and nobody complained, it's also replaced by gnome calculator - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/0001-Remove-user-switch-applet.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/0001-Remove-user-switch-applet.patch
deleted file mode 100644
index 75aff5d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/0001-Remove-user-switch-applet.patch
+++ /dev/null
@@ -1,2281 +0,0 @@
-From 0a4fe802edbd2e8a016161f08283e4b467c6762e Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 21 Jun 2011 12:48:39 +0200
-Subject: [PATCH] Remove user switch applet
-
-This hasn't been updated to work with gnome-panel > 2.30.0, so just drop it
-
-Upstream-Status: unacceptable, backport
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- configure.ac                                       |    8 -
- gui/Makefile.am                                    |    2 -
- .../GNOME_FastUserSwitchApplet.server.in.in        |   38 -
- .../GNOME_FastUserSwitchApplet.xml                 |   20 -
- gui/user-switch-applet/Makefile.am                 |   67 -
- gui/user-switch-applet/applet.c                    | 1662 --------------------
- gui/user-switch-applet/gdm-entry-menu-item.c       |  304 ----
- gui/user-switch-applet/gdm-entry-menu-item.h       |   51 -
- po/POTFILES.in                                     |    4 -
- po/POTFILES.skip                                   |    1 -
- 10 files changed, 0 insertions(+), 2157 deletions(-)
- delete mode 100644 gui/user-switch-applet/GNOME_FastUserSwitchApplet.server.in.in
- delete mode 100644 gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml
- delete mode 100644 gui/user-switch-applet/Makefile.am
- delete mode 100644 gui/user-switch-applet/applet.c
- delete mode 100644 gui/user-switch-applet/gdm-entry-menu-item.c
- delete mode 100644 gui/user-switch-applet/gdm-entry-menu-item.h
-
-diff --git a/configure.ac b/configure.ac
-index 841efe0..a834110 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -149,13 +149,6 @@ PKG_CHECK_MODULES(SIMPLE_CHOOSER,
- AC_SUBST(SIMPLE_CHOOSER_CFLAGS)
- AC_SUBST(SIMPLE_CHOOSER_LIBS)
- 
--PKG_CHECK_MODULES(APPLET,
--        dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
--        gtk+-2.0 >= $GTK_REQUIRED_VERSION
--        libpanelapplet-2.0 >= $GNOME_PANEL_REQUIRED_VERSION)
--AC_SUBST(APPLET_CFLAGS)
--AC_SUBST(APPLET_LIBS)
--
- PLUGIN_LIBTOOL_FLAGS="-export_dynamic -module -avoid-version"
- AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
- 
-@@ -1340,7 +1333,6 @@ gui/Makefile
- gui/simple-greeter/Makefile
- gui/simple-greeter/libnotificationarea/Makefile
- gui/simple-chooser/Makefile
--gui/user-switch-applet/Makefile
- utils/Makefile
- data/gdm.conf
- data/Makefile
-diff --git a/gui/Makefile.am b/gui/Makefile.am
-index 326239f..bda3f7a 100644
---- a/gui/Makefile.am
-+++ b/gui/Makefile.am
-@@ -2,7 +2,6 @@ NULL =
- 
- SUBDIRS =			\
- 	simple-greeter		\
--	user-switch-applet	\
- 	$(NULL)
- 
- if XDMCP_SUPPORT
-@@ -12,5 +11,4 @@ endif
- DIST_SUBDIRS =			\
- 	simple-chooser		\
- 	simple-greeter		\
--	user-switch-applet	\
- 	$(NULL)
-diff --git a/gui/user-switch-applet/GNOME_FastUserSwitchApplet.server.in.in b/gui/user-switch-applet/GNOME_FastUserSwitchApplet.server.in.in
-deleted file mode 100644
-index a9b775f..0000000
---- a/gui/user-switch-applet/GNOME_FastUserSwitchApplet.server.in.in
-+++ /dev/null
-@@ -1,38 +0,0 @@
--<oaf_info>
--  <oaf_server iid="OAFIID:GNOME_FastUserSwitchApplet_Factory" type="exe"
--              location="@LIBEXECDIR@/gdm-user-switch-applet">
--
--    <oaf_attribute name="repo_ids" type="stringv">
--      <item value="IDL:Bonobo/GenericFactory:1.0"/>
--      <item value="IDL:Bonobo/Unknown:1.0"/>
--    </oaf_attribute>
--    <oaf_attribute name="name" type="string" _value="User Switcher Applet Factory"/>
--    <oaf_attribute name="description" type="string" _value="User Switcher Applet Factory"/>
--    <oaf_attribute name="bonobo:environment" type="stringv">
--       <item value="DBUS_SESSION_BUS_ADDRESS"/>
--     <oaf_attribute name="bugzilla:bugzilla" type="string" value="GNOME"/>
--     <oaf_attribute name="bugzilla:product" type="string" value="gdm"/>
--     <oaf_attribute name="bugzilla:component" type="string" value="general"/>
--     <oaf_attribute name="bugzilla:version" type="string" value="@VERSION@"/>
--     <oaf_attribute name="bugzilla:other_binaries" type="string" value="gdm-user-switch-applet"/>
--    </oaf_attribute>
--  </oaf_server>
--
--  <oaf_server iid="OAFIID:GNOME_FastUserSwitchApplet" type="factory"
--              location="OAFIID:GNOME_FastUserSwitchApplet_Factory">
--
--    <oaf_attribute name="repo_ids" type="stringv">
--      <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
--      <item value="IDL:Bonobo/Control:1.0"/>
--      <item value="IDL:Bonobo/Unknown:1.0"/>
--    </oaf_attribute>
--    <oaf_attribute name="name" type="string" _value="User Switcher"/>
--    <oaf_attribute name="description" type="string" _value="A menu to quickly switch between users"/>
--    <oaf_attribute name="panel:icon" type="string" value="stock_people"/>
--    <oaf_attribute name="bugzilla:bugzilla" type="string" value="GNOME"/>
--    <oaf_attribute name="bugzilla:product" type="string" value="gdm"/>
--    <oaf_attribute name="bugzilla:component" type="string" value="general"/>
--    <oaf_attribute name="bugzilla:version" type="string" value="@VERSION@"/>
--    <oaf_attribute name="bugzilla:other_binaries" type="string" value="gdm-user-switch-applet"/>
--  </oaf_server>
--</oaf_info>
-diff --git a/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml b/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml
-deleted file mode 100644
-index e1845c8..0000000
---- a/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml
-+++ /dev/null
-@@ -1,20 +0,0 @@
--<Root>
--  <popups>
--    <popup name="button3">
--      <menuitem
--       name="About Me Item"
--       verb="GdmAboutMe"
--       _label="Edit Personal _Information"/>
--      <menuitem
--       name="Users and Groups Admin Item"
--       verb="GdmUsersGroupsAdmin"
--       _label="_Edit Users and Groups"/>
--      <menuitem
--       name="About Item"
--       verb="GdmAbout"
--       _label="_About"
--       pixtype="stock"
--       pixname="gtk-about"/>
--    </popup>
--  </popups>
--</Root>
-diff --git a/gui/user-switch-applet/Makefile.am b/gui/user-switch-applet/Makefile.am
-deleted file mode 100644
-index 2d2cdc0..0000000
---- a/gui/user-switch-applet/Makefile.am
-+++ /dev/null
-@@ -1,67 +0,0 @@
--NULL =
--
--AM_CPPFLAGS = \
--	-I$(top_srcdir)/gui/simple-greeter		\
--	-I$(top_srcdir)/common				\
--	-DPREFIX=\""$(prefix)"\" 			\
--	-DLIBDIR=\""$(libdir)"\" 			\
--	-DDATADIR=\""$(datadir)"\"		 	\
--	-DSYSCONFDIR=\""$(sysconfdir)"\"		\
--	-DLIBLOCALEDIR=\""$(prefix)/lib/locale"\"	\
--	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"	\
--	-DGLADEDIR=\""$(pkgdatadir)"\" 			\
--	-DLIBEXECDIR=\""$(libexecdir)"\" 		\
--	-DSBINDIR=\""$(sbindir)"\"		 	\
--	-DGDMCONFDIR=\"$(gdmconfdir)\"			\
--	$(GTK_CFLAGS)					\
--	$(APPLET_CFLAGS)				\
--	$(NULL)
--
--libexec_PROGRAMS =			\
--	gdm-user-switch-applet		\
--	$(NULL)
--
--gdm_user_switch_applet_SOURCES =  	\
--	applet.c 			\
--	gdm-entry-menu-item.h		\
--	gdm-entry-menu-item.c		\
--	$(NULL)
--
--gdm_user_switch_applet_LDADD = 		\
--	$(top_builddir)/gui/simple-greeter/libgdmuser.la	\
--	$(top_builddir)/common/libgdmcommon.la		\
--	$(COMMON_LIBS)					\
--	$(APPLET_LIBS)					\
--	$(NULL)
--
--# Bonobo UI
--uidir =	$(datadir)/gnome-2.0/ui
--ui_DATA =					\
--	GNOME_FastUserSwitchApplet.xml		\
--	$(NULL)
--
--# Bonobo .server
--serverdir = $(libdir)/bonobo/servers
--server_in_files =				\
--	GNOME_FastUserSwitchApplet.server.in	\
--	$(NULL)
--server_DATA = $(server_in_files:.server.in=.server)
--
--$(server_in_files): $(server_in_files:.server.in=.server.in.in)
--	sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" -e "s|\@VERSION\@|$(VERSION)|" $< > $@
--
--@INTLTOOL_SERVER_RULE@
--
--EXTRA_DIST = 			\
--	$(ui_DATA)		\
--	GNOME_FastUserSwitchApplet.server.in.in	\
--	$(NULL)
--
--DISTCLEANFILES =                        \
--	$(server_in_files)		\
--	$(server_DATA)			\
--        $(NULL)
--
--MAINTAINERCLEANFILES =                  \
--        *~                              \
--        Makefile.in
-diff --git a/gui/user-switch-applet/applet.c b/gui/user-switch-applet/applet.c
-deleted file mode 100644
-index b4f944c..0000000
---- a/gui/user-switch-applet/applet.c
-+++ /dev/null
-@@ -1,1662 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>.
-- * Copyright (C) 2008      Red Hat, Inc.
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-- */
--
--#include "config.h"
--
--#include <string.h>
--#include <unistd.h>
--#include <stdlib.h>
--#include <sys/types.h>
--
--#include <glib/gi18n.h>
--#include <gdk/gdkkeysyms.h>
--#include <gtk/gtk.h>
--
--#include <gconf/gconf.h>
--#include <gconf/gconf-client.h>
--
--#include <dbus/dbus-glib.h>
--
--#include <bonobo/bonobo-main.h>
--#include <bonobo/bonobo-ui-util.h>
--
--#include <panel-applet.h>
--#include <panel-applet-gconf.h>
--
--#include "gdm-user-manager.h"
--#include "gdm-entry-menu-item.h"
--#include "gdm-settings-client.h"
--
--#define LOCKDOWN_DIR    "/desktop/gnome/lockdown"
--#define LOCKDOWN_USER_SWITCHING_KEY LOCKDOWN_DIR "/disable_user_switching"
--#define LOCKDOWN_LOCK_SCREEN_KEY    LOCKDOWN_DIR "/disable_lock_screen"
--#define LOCKDOWN_COMMAND_LINE_KEY   LOCKDOWN_DIR "/disable_command_line"
--
--typedef enum {
--        GSM_PRESENCE_STATUS_AVAILABLE = 0,
--        GSM_PRESENCE_STATUS_INVISIBLE,
--        GSM_PRESENCE_STATUS_BUSY,
--        GSM_PRESENCE_STATUS_IDLE,
--} GsmPresenceStatus;
--
--typedef struct _GdmAppletData
--{
--        PanelApplet    *applet;
--
--        GConfClient    *client;
--        GdmUserManager *manager;
--        GdmUser        *user;
--
--        GtkWidget      *menubar;
--        GtkWidget      *menuitem;
--        GtkWidget      *menu;
--#ifdef BUILD_PRESENSE_STUFF
--        GtkWidget      *user_item;
--#endif
--        GtkWidget      *control_panel_item;
--        GtkWidget      *account_item;
--        GtkWidget      *lock_screen_item;
--        GtkWidget      *login_screen_item;
--        GtkWidget      *quit_session_item;
--
--        guint           client_notify_lockdown_id;
--
--        guint           current_status;
--        guint           user_loaded_notify_id;
--        guint           user_changed_notify_id;
--        gint8           pixel_size;
--        gint            panel_size;
--        GtkIconSize     icon_size;
--#ifdef BUILD_PRESENSE_STUFF
--        DBusGProxy     *presence_proxy;
--#endif
--} GdmAppletData;
--
--typedef struct _SelectorResponseData
--{
--        GdmAppletData  *adata;
--        GtkRadioButton *radio;
--} SelectorResponseData;
--
--static void reset_icon   (GdmAppletData *adata);
--static void update_label (GdmAppletData *adata);
--
--static gboolean applet_factory (PanelApplet   *applet,
--                                const char    *iid,
--                                gpointer       data);
--
--PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_FastUserSwitchApplet_Factory",
--                             PANEL_TYPE_APPLET,
--                             "gdm-user-switch-applet", "0",
--                             (PanelAppletFactoryCallback)applet_factory,
--                             NULL)
--
--static void
--about_me_cb (BonoboUIComponent *ui_container,
--             gpointer           data,
--             const char        *cname)
--{
--        GError *err;
--
--        err = NULL;
--        if (! g_spawn_command_line_async ("gnome-about-me", &err)) {
--                g_critical ("Could not run `gnome-about-me': %s",
--                            err->message);
--                g_error_free (err);
--                bonobo_ui_component_set_prop (ui_container,
--                                              "/commands/GdmAboutMe",
--                                              "hidden", "1",
--                                              NULL);
--        }
--}
--
--/*
-- * gnome-panel/applets/wncklet/window-menu.c:window_filter_button_press()
-- *
-- * Copyright (C) 2005 James M. Cape.
-- * Copyright (C) 2003 Sun Microsystems, Inc.
-- * Copyright (C) 2001 Free Software Foundation, Inc.
-- * Copyright (C) 2000 Helix Code, Inc.
-- */
--static gboolean
--menubar_button_press_event_cb (GtkWidget      *menubar,
--                               GdkEventButton *event,
--                               GdmAppletData  *adata)
--{
--        if (event->button != 1) {
--                g_signal_stop_emission_by_name (menubar, "button-press-event");
--                /* Reset the login window item */
--        }
--
--        return FALSE;
--}
--
--static void
--about_cb (BonoboUIComponent *ui_container,
--          gpointer           data,
--          const char        *cname)
--{
--        static const char *authors[] = {
--                "James M. Cape <jcape@ignore-your.tv>",
--                "Thomas Thurman <thomas@thurman.org.uk>",
--                "William Jon McCann <jmccann@redhat.com>",
--                NULL
--        };
--        static char *license[] = {
--                N_("The User Switch Applet is free software; you can redistribute it and/or modify "
--                   "it under the terms of the GNU General Public License as published by "
--                   "the Free Software Foundation; either version 2 of the License, or "
--                   "(at your option) any later version."),
--                N_("This program is distributed in the hope that it will be useful, "
--                   "but WITHOUT ANY WARRANTY; without even the implied warranty of "
--                   "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the "
--                   "GNU General Public License for more details."),
--                N_("You should have received a copy of the GNU General Public License "
--                   "along with this program; if not, write to the Free Software "
--                   "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA "),
--                NULL
--        };
--        char *license_i18n;
--
--        license_i18n = g_strconcat (_(license[0]), "\n\n", _(license[1]), "\n\n", _(license[2]), NULL); 
--
--        gtk_show_about_dialog (NULL,
--                               "version", VERSION,
--                               "copyright", "Copyright \xc2\xa9 2004-2005 James M. Cape.\n"
--                               "Copyright \xc2\xa9 2006 Thomas Thurman.\n"
--                               "Copyright \xc2\xa9 2008 Red Hat, Inc.",
--                               "comments", _("A menu to quickly switch between users."),
--                               "authors", authors,
--                               "license", license_i18n,
--                               "wrap-license", TRUE,
--                               "translator-credits", _("translator-credits"),
--                               "logo-icon-name", "stock_people",
--                               NULL);
--
--        g_free (license_i18n);
--}
--
--
--static void
--admin_cb (BonoboUIComponent *ui_container,
--          gpointer           data,
--          const char        *cname)
--{
--#ifdef USERS_ADMIN
--        char   **args;
--        gboolean res;
--        GError  *err;
--
--        err = NULL;
--        if (!g_shell_parse_argv (USERS_ADMIN, NULL, &args, &err)) {
--                g_critical ("Could not parse users and groups management command line `%s': %s",
--                            USERS_ADMIN, err->message);
--                return;
--        }
--
--        res = g_spawn_async (g_get_home_dir (),
--                             args,
--                             NULL,
--                             (G_SPAWN_STDOUT_TO_DEV_NULL |
--                              G_SPAWN_STDERR_TO_DEV_NULL |
--                              G_SPAWN_SEARCH_PATH),
--                             NULL,
--                             NULL,
--                             NULL,
--                             &err);
--        if (! res) {
--                g_critical ("Could not run `%s' to manage users and groups: %s",
--                            USERS_ADMIN, err->message);
--                g_error_free (err);
--        }
--        g_strfreev (args);
--#endif /* USERS_ADMIN */
--}
--
--static void
--set_menuitem_icon (BonoboUIComponent *component,
--                   const char        *item_path,
--                   GtkIconTheme      *theme,
--                   const char        *icon_name,
--                   gint               icon_size)
--{
--        GdkPixbuf *pixbuf;
--        int        width;
--        int        height;
--
--        pixbuf = gtk_icon_theme_load_icon (theme, icon_name, icon_size, 0, NULL);
--        if (pixbuf == NULL) {
--                return;
--        }
--
--        width = gdk_pixbuf_get_width (pixbuf);
--        height = gdk_pixbuf_get_height (pixbuf);
--        if (width > icon_size + 4 || height > icon_size + 4) {
--                GdkPixbuf *tmp;
--                if (height > width) {
--                        width *= (gdouble) icon_size / (gdouble) height;
--                        height = icon_size;
--                } else {
--                        height *= (gdouble) icon_size / (gdouble) width;
--                        width = icon_size;
--                }
--                tmp = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
--                g_object_unref (pixbuf);
--                pixbuf = tmp;
--        }
--
--        bonobo_ui_util_set_pixbuf (component, item_path, pixbuf, NULL);
--        g_object_unref (pixbuf);
--}
--
--static void
--applet_style_set_cb (GtkWidget *widget,
--                     GtkStyle  *old_style,
--                     gpointer   data)
--{
--        BonoboUIComponent *component;
--        GdkScreen         *screen;
--        GtkIconTheme      *theme;
--        int                width;
--        int                height;
--        int                icon_size;
--
--        if (gtk_widget_has_screen (widget)) {
--                screen = gtk_widget_get_screen (widget);
--        } else {
--                screen = gdk_screen_get_default ();
--        }
--
--        if (gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
--                                               GTK_ICON_SIZE_MENU, &width, &height)) {
--                icon_size = MAX (width, height);
--        } else {
--                icon_size = 16;
--        }
--
--        theme = gtk_icon_theme_get_for_screen (screen);
--        component = panel_applet_get_popup_component (PANEL_APPLET (widget));
--
--        set_menuitem_icon (component,
--                           "/commands/GdmAboutMe",
--                           theme,
--                           "user-info",
--                           icon_size);
--        set_menuitem_icon (component,
--                           "/commands/GdmUsersGroupsAdmin",
--                           theme,
--                           "stock_people",
--                           icon_size);
--}
--
--static void
--applet_change_background_cb (PanelApplet               *applet,
--                             PanelAppletBackgroundType  type,
--                             GdkColor                  *color,
--                             GdkPixmap                 *pixmap,
--                             GdmAppletData             *adata)
--{
--        GtkRcStyle *rc_style;
--        GtkStyle   *style;
--
--        gtk_widget_set_style (adata->menubar, NULL);
--        rc_style = gtk_rc_style_new ();
--        gtk_widget_modify_style (GTK_WIDGET (adata->menubar), rc_style);
--        g_object_unref (rc_style);
--
--        switch (type) {
--        case PANEL_NO_BACKGROUND:
--                break;
--        case PANEL_COLOR_BACKGROUND:
--                gtk_widget_modify_bg (adata->menubar, GTK_STATE_NORMAL, color);
--                break;
--        case PANEL_PIXMAP_BACKGROUND:
--                style = gtk_style_copy (gtk_widget_get_style (adata->menubar));
--                if (style->bg_pixmap[GTK_STATE_NORMAL]) {
--                        g_object_unref (style->bg_pixmap[GTK_STATE_NORMAL]);
--                }
--
--                style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref (pixmap);
--                gtk_widget_set_style (adata->menubar, style);
--                g_object_unref (style);
--                break;
--        }
--}
--
--/*
-- * gnome-panel/applets/wncklet/window-menu.c:window_menu_key_press_event()
-- *
-- * Copyright (C) 2003 Sun Microsystems, Inc.
-- * Copyright (C) 2001 Free Software Foundation, Inc.
-- * Copyright (C) 2000 Helix Code, Inc.
-- */
--static gboolean
--applet_key_press_event_cb (GtkWidget     *widget,
--                           GdkEventKey   *event,
--                           GdmAppletData *adata)
--{
--        GtkMenuShell *menu_shell;
--
--        switch (event->keyval) {
--        case GDK_KP_Enter:
--        case GDK_ISO_Enter:
--        case GDK_3270_Enter:
--        case GDK_Return:
--        case GDK_space:
--        case GDK_KP_Space:
--                menu_shell = GTK_MENU_SHELL (adata->menubar);
--                /*
--                 * We need to call _gtk_menu_shell_activate() here as is done in
--                 * window_key_press_handler in gtkmenubar.c which pops up menu
--                 * when F10 is pressed.
--                 *
--                 * As that function is private its code is replicated here.
--                 */
--                if (!menu_shell->active) {
--                        gtk_grab_add (GTK_WIDGET (menu_shell));
--                        menu_shell->have_grab = TRUE;
--                        menu_shell->active = TRUE;
--                }
--
--                gtk_menu_shell_select_first (menu_shell, FALSE);
--                return TRUE;
--        default:
--                break;
--        }
--
--        return FALSE;
--}
--
--static void
--set_item_text_angle_and_alignment (GtkWidget *item,
--                                   double     text_angle,
--                                   float      xalign,
--                                   float      yalign)
--{
--        GtkWidget *label;
--
--        label = gtk_bin_get_child (GTK_BIN (item));
--
--        gtk_label_set_angle (GTK_LABEL (label), text_angle);
--
--        gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign);
--}
--
--/*
-- * gnome-panel/applets/wncklet/window-menu.c:window_menu_size_allocate()
-- *
-- * Copyright (C) 2003 Sun Microsystems, Inc.
-- * Copyright (C) 2001 Free Software Foundation, Inc.
-- * Copyright (C) 2000 Helix Code, Inc.
-- */
--static void
--applet_size_allocate_cb (GtkWidget     *widget,
--                         GtkAllocation *allocation,
--                         GdmAppletData *adata)
--{
--        GList            *children;
--        GtkWidget        *top_item;
--        PanelAppletOrient orient;
--        gint              pixel_size;
--        gdouble           text_angle;
--        GtkPackDirection  pack_direction;
--        float             text_xalign;
--        float             text_yalign;
--
--        pack_direction = GTK_PACK_DIRECTION_LTR;
--        text_angle = 0.0;
--        text_xalign = 0.0;
--        text_yalign = 0.5;
--
--        children = gtk_container_get_children (GTK_CONTAINER (adata->menubar));
--        top_item = GTK_WIDGET (children->data);
--        g_list_free (children);
--
--        orient = panel_applet_get_orient (PANEL_APPLET (widget));
--
--        switch (orient) {
--        case PANEL_APPLET_ORIENT_UP:
--        case PANEL_APPLET_ORIENT_DOWN:
--                gtk_widget_set_size_request (top_item, -1, allocation->height);
--                pixel_size = allocation->height - gtk_widget_get_style (top_item)->ythickness * 2;
--                break;
--        case PANEL_APPLET_ORIENT_LEFT:
--                gtk_widget_set_size_request (top_item, allocation->width, -1);
--                pixel_size = allocation->width - gtk_widget_get_style (top_item)->xthickness * 2;
--                pack_direction = GTK_PACK_DIRECTION_TTB;
--                text_angle = 270.0;
--                text_xalign = 0.5;
--                text_yalign = 0.0;
--                break;
--        case PANEL_APPLET_ORIENT_RIGHT:
--                gtk_widget_set_size_request (top_item, allocation->width, -1);
--                pixel_size = allocation->width - gtk_widget_get_style (top_item)->xthickness * 2;
--                pack_direction = GTK_PACK_DIRECTION_BTT;
--                text_angle = 90.0;
--                text_xalign = 0.5;
--                text_yalign = 0.0;
--                break;
--        default:
--                g_assert_not_reached ();
--                break;
--        }
--
--        gtk_menu_bar_set_pack_direction (GTK_MENU_BAR (adata->menubar),
--                                         pack_direction);
--        gtk_menu_bar_set_child_pack_direction (GTK_MENU_BAR (adata->menubar),
--                                               pack_direction);
--
--        set_item_text_angle_and_alignment (adata->menuitem,
--                                           text_angle,
--                                           text_xalign,
--                                           text_yalign);
--
--        if (adata->panel_size != pixel_size) {
--                adata->panel_size = pixel_size;
--                reset_icon (adata);
--        }
--}
--
--
--static void
--gdm_applet_data_free (GdmAppletData *adata)
--{
--        gconf_client_notify_remove (adata->client, adata->client_notify_lockdown_id);
--
--        if (adata->user_loaded_notify_id != 0) {
--                g_signal_handler_disconnect (adata->user, adata->user_loaded_notify_id);
--        }
--
--        if (adata->user_changed_notify_id != 0) {
--                g_signal_handler_disconnect (adata->user, adata->user_changed_notify_id);
--        }
--
--#ifdef BUILD_PRESENSE_STUFF
--        if (adata->presence_proxy != NULL) {
--                g_object_unref (adata->presence_proxy);
--        }
--#endif
--
--        if (adata->user != NULL) {
--                g_object_unref (adata->user);
--        }
--        g_object_unref (adata->client);
--        g_object_unref (adata->manager);
--
--        g_free (adata);
--}
--
--
--/*
-- * gnome-panel/applets/wncklet/window-menu.c:window_menu_on_expose()
-- *
-- * Copyright (C) 2003 Sun Microsystems, Inc.
-- * Copyright (C) 2001 Free Software Foundation, Inc.
-- * Copyright (C) 2000 Helix Code, Inc.
-- */
--static gboolean
--menubar_expose_event_cb (GtkWidget      *widget,
--                         GdkEventExpose *event,
--                         GdmAppletData  *adata)
--{
--        if (gtk_widget_has_focus (GTK_WIDGET (adata->applet)))
--                gtk_paint_focus (gtk_widget_get_style (widget),
--                                 gtk_widget_get_window (widget),
--                                 gtk_widget_get_state (widget),
--                                 NULL, widget, "menu-applet", 0, 0, -1, -1);
--
--        return FALSE;
--}
--
--static void
--menu_style_set_cb (GtkWidget     *menu,
--                   GtkStyle      *old_style,
--                   GdmAppletData *adata)
--{
--        GtkSettings *settings;
--        int          width;
--        int          height;
--
--        adata->icon_size = gtk_icon_size_from_name ("panel-menu");
--
--        if (adata->icon_size == GTK_ICON_SIZE_INVALID) {
--                adata->icon_size = gtk_icon_size_register ("panel-menu", 24, 24);
--        }
--
--        if (gtk_widget_has_screen (menu)) {
--                settings = gtk_settings_get_for_screen (gtk_widget_get_screen (menu));
--        } else {
--                settings = gtk_settings_get_default ();
--        }
--
--        if (!gtk_icon_size_lookup_for_settings (settings, adata->icon_size,
--                                                &width, &height)) {
--                adata->pixel_size = -1;
--        } else {
--                adata->pixel_size = MAX (width, height);
--        }
--}
--
--static void
--menuitem_style_set_cb (GtkWidget     *menuitem,
--                       GtkStyle      *old_style,
--                       GdmAppletData *adata)
--{
--        GtkWidget *image;
--
--        if (GDM_IS_ENTRY_MENU_ITEM (menuitem)) {
--        } else {
--                const char *icon_name;
--
--                if (menuitem == adata->login_screen_item) {
--                        icon_name = "system-users";
--                } else if (menuitem == adata->lock_screen_item) {
--                        icon_name = "system-lock-screen";
--                } else if (menuitem == adata->quit_session_item) {
--                        icon_name = "system-log-out";
--                } else if (menuitem == adata->account_item) {
--                        icon_name = "user-info";
--                } else if (menuitem == adata->control_panel_item) {
--                        icon_name = "preferences-desktop";
--                } else {
--                        icon_name = GTK_STOCK_MISSING_IMAGE;
--                }
--
--                image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (menuitem));
--                gtk_image_set_pixel_size (GTK_IMAGE (image), adata->pixel_size);
--                gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name,
--                                              adata->icon_size);
--        }
--}
--
--static void
--on_user_changed (GdmUser         *user,
--                 GdmAppletData   *adata)
--{
--        g_debug ("user changed");
--        update_label (adata);
--        reset_icon (adata);
--}
--
--/* Called every time the menu is displayed (and also for some reason
-- * immediately it's created, which does no harm). All we have to do
-- * here is kick off a request to GDM to let us know which users are
-- * logged in, so we can display check marks next to their names.
-- */
--static gboolean
--menu_expose_cb (GtkWidget *menu,
--                gpointer   data)
--{
--        char *program;
--        GdmAppletData *adata = data;
--
--        program = g_find_program_in_path ("gnome-control-center");
--        if (program != NULL) {
--                gtk_widget_show (adata->control_panel_item);
--        } else {
--                gtk_widget_hide (adata->control_panel_item);
--        }
--        g_free (program);
--        return FALSE;
--}
--
--static void
--maybe_lock_screen (GdmAppletData *adata)
--{
--        char      *args[3];
--        GError    *err;
--        GdkScreen *screen;
--        gboolean   use_gscreensaver = TRUE;
--        gboolean   res;
--
--        g_debug ("Attempting to lock screen");
--
--        args[0] = g_find_program_in_path ("gnome-screensaver-command");
--        if (args[0] == NULL) {
--                args[0] = g_find_program_in_path ("xscreensaver-command");
--                use_gscreensaver = FALSE;
--        }
--
--        if (args[0] == NULL) {
--                return;
--        }
--
--        if (use_gscreensaver) {
--                args[1] = "--lock";
--        } else {
--                args[1] = "-lock";
--        }
--        args[2] = NULL;
--
--        if (gtk_widget_has_screen (GTK_WIDGET (adata->applet))) {
--                screen = gtk_widget_get_screen (GTK_WIDGET (adata->applet));
--        } else {
--                screen = gdk_screen_get_default ();
--        }
--
--        err = NULL;
--        res = gdk_spawn_on_screen (screen,
--                                   g_get_home_dir (),
--                                   args,
--                                   NULL,
--                                   0,
--                                   NULL,
--                                   NULL,
--                                   NULL,
--                                   &err);
--        if (! res) {
--                g_warning (_("Can't lock screen: %s"), err->message);
--                g_error_free (err);
--        }
--
--        if (use_gscreensaver) {
--                args[1] = "--throttle";
--        } else {
--                args[1] = "-throttle";
--        }
--
--        err = NULL;
--        res = gdk_spawn_on_screen (screen,
--                                   g_get_home_dir (),
--                                   args,
--                                   NULL,
--                                   (G_SPAWN_STDERR_TO_DEV_NULL
--                                   | G_SPAWN_STDOUT_TO_DEV_NULL),
--                                   NULL,
--                                   NULL,
--                                   NULL,
--                                   &err);
--        if (! res) {
--                g_warning (_("Can't temporarily set screensaver to blank screen: %s"),
--                           err->message);
--                g_error_free (err);
--        }
--
--        g_free (args[0]);
--}
--
--static void
--do_switch (GdmAppletData *adata,
--           GdmUser       *user)
--{
--        guint num_sessions;
--
--        g_debug ("Do user switch");
--
--        if (user == NULL) {
--                gdm_user_manager_goto_login_session (adata->manager);
--                goto out;
--        }
--
--        num_sessions = gdm_user_get_num_sessions (user);
--        if (num_sessions > 0) {
--                gdm_user_manager_activate_user_session (adata->manager, user);
--        } else {
--                gdm_user_manager_goto_login_session (adata->manager);
--        }
-- out:
--        maybe_lock_screen (adata);
--}
--
--static void
--update_switch_user (GdmAppletData *adata)
--{
--        gboolean can_switch;
--        gboolean has_other_users;
--
--        can_switch = gdm_user_manager_can_switch (adata->manager);
--        g_object_get (adata->manager,
--                      "has-multiple-users", &has_other_users,
--                      NULL);
--
--        if (can_switch && has_other_users) {
--                gtk_widget_show (adata->login_screen_item);
--        } else {
--
--                gtk_widget_hide (adata->login_screen_item);
--        }
--}
--
--static void
--on_manager_is_loaded_changed (GdmUserManager *manager,
--                              GParamSpec     *pspec,
--                              GdmAppletData  *adata)
--{
--        update_switch_user (adata);
--}
--
--static void
--on_manager_has_multiple_users_changed (GdmUserManager       *manager,
--                                       GParamSpec           *pspec,
--                                       GdmAppletData        *adata)
--{
--        update_switch_user (adata);
--}
--
--#ifdef BUILD_PRESENSE_STUFF
--static void
--on_user_item_activate (GtkMenuItem   *item,
--                       GdmAppletData *adata)
--{
--        g_signal_stop_emission_by_name (item, "activate");
--}
--#endif
--
--static void
--on_control_panel_activate (GtkMenuItem   *item,
--                           GdmAppletData *adata)
--{
--        char      *args[2];
--        GError    *error;
--        GdkScreen *screen;
--        gboolean   res;
--
--        args[0] = g_find_program_in_path ("gnome-control-center");
--        if (args[0] == NULL) {
--                return;
--        }
--        args[1] = NULL;
--
--        if (gtk_widget_has_screen (GTK_WIDGET (adata->applet))) {
--                screen = gtk_widget_get_screen (GTK_WIDGET (adata->applet));
--        } else {
--                screen = gdk_screen_get_default ();
--        }
--
--        error = NULL;
--        res = gdk_spawn_on_screen (screen,
--                                   g_get_home_dir (),
--                                   args,
--                                   NULL,
--                                   0,
--                                   NULL,
--                                   NULL,
--                                   NULL,
--                                   &error);
--        if (! res) {
--                g_warning (_("Can't lock screen: %s"), error->message);
--                g_error_free (error);
--        }
--
--        g_free (args[0]);
--}
--
--static void
--on_account_activate (GtkMenuItem   *item,
--                     GdmAppletData *adata)
--{
--        char      *args[2];
--        GError    *error;
--        GdkScreen *screen;
--        gboolean   res;
--
--        args[0] = g_find_program_in_path ("accounts-dialog");
--        if (args[0] == NULL) {
--                args[0] = g_find_program_in_path ("gnome-about-me");
--                if (args[0] == NULL) {
--                        return;
--                }
--        }
--        args[1] = NULL;
--
--        if (gtk_widget_has_screen (GTK_WIDGET (adata->applet))) {
--                screen = gtk_widget_get_screen (GTK_WIDGET (adata->applet));
--        } else {
--                screen = gdk_screen_get_default ();
--        }
--
--        error = NULL;
--        res = gdk_spawn_on_screen (screen,
--                                   g_get_home_dir (),
--                                   args,
--                                   NULL,
--                                   0,
--                                   NULL,
--                                   NULL,
--                                   NULL,
--                                   &error);
--        if (! res) {
--                g_warning (_("Can't lock screen: %s"), error->message);
--                g_error_free (error);
--        }
--
--        g_free (args[0]);
--}
--
--static void
--on_lock_screen_activate (GtkMenuItem   *item,
--                         GdmAppletData *adata)
--{
--        maybe_lock_screen (adata);
--}
--
--static void
--on_login_screen_activate (GtkMenuItem   *item,
--                          GdmAppletData *adata)
--{
--        GdmUser *user;
--
--        user = NULL;
--
--        do_switch (adata, user);
--}
--
--static void
--on_quit_session_activate (GtkMenuItem   *item,
--                          GdmAppletData *adata)
--{
--        char      *args[3];
--        GError    *error;
--        GdkScreen *screen;
--        gboolean   res;
--
--        args[0] = g_find_program_in_path ("gnome-session-save");
--        if (args[0] == NULL) {
--                return;
--        }
--
--        args[1] = "--logout-dialog";
--        args[2] = NULL;
--
--        if (gtk_widget_has_screen (GTK_WIDGET (adata->applet))) {
--                screen = gtk_widget_get_screen (GTK_WIDGET (adata->applet));
--        } else {
--                screen = gdk_screen_get_default ();
--        }
--
--        error = NULL;
--        res = gdk_spawn_on_screen (screen,
--                                   g_get_home_dir (),
--                                   args,
--                                   NULL,
--                                   0,
--                                   NULL,
--                                   NULL,
--                                   NULL,
--                                   &error);
--        if (! res) {
--                g_warning (_("Can't log out: %s"), error->message);
--                g_error_free (error);
--        }
--
--        g_free (args[0]);
--}
--
--#ifdef BUILD_PRESENSE_STUFF
--static gboolean
--on_menu_key_press_event (GtkWidget     *widget,
--                         GdkEventKey   *event,
--                         GdmAppletData *adata)
--{
--        GtkWidget *entry;
--
--        entry = gdm_entry_menu_item_get_entry (GDM_ENTRY_MENU_ITEM (adata->user_item));
--
--        if (GTK_WIDGET_HAS_FOCUS (entry)) {
--                gtk_widget_event (entry, (GdkEvent *)event);
--                return TRUE;
--        } else {
--                return FALSE;
--        }
--}
--
--static void
--save_status (GdmAppletData *adata,
--             guint          status)
--{
--        if (adata->current_status != status) {
--                GError *error;
--
--                adata->current_status = status;
--
--                g_debug ("Saving status: %u", status);
--                error = NULL;
--                dbus_g_proxy_call (adata->presence_proxy,
--                                   "SetStatus",
--                                   &error,
--                                   G_TYPE_UINT, status,
--                                   G_TYPE_INVALID,
--                                   G_TYPE_INVALID);
--
--                if (error != NULL) {
--                        g_warning ("Couldn't save presence status: %s", error->message);
--                        g_error_free (error);
--                }
--        }
--}
--
--static void
--on_status_available_activate (GtkWidget     *widget,
--                              GdmAppletData *adata)
--{
--
--        if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget))) {
--                save_status (adata, GSM_PRESENCE_STATUS_AVAILABLE);
--        }
--}
--
--static void
--on_status_busy_activate (GtkWidget     *widget,
--                         GdmAppletData *adata)
--{
--         if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget))) {
--                 save_status (adata, GSM_PRESENCE_STATUS_BUSY);
--         }
--}
--
--static void
--on_status_invisible_activate (GtkWidget     *widget,
--                              GdmAppletData *adata)
--{
--         if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget))) {
--                 save_status (adata, GSM_PRESENCE_STATUS_INVISIBLE);
--         }
--}
--
--static struct {
--        char      *icon_name;
--        char      *display_name;
--        void      *menu_callback;
--        GtkWidget *widget;
--} statuses[] = {
--        { "user-online", N_("Available"), on_status_available_activate, NULL },
--        { "user-invisible", N_("Invisible"), on_status_invisible_activate, NULL },
--        { "user-busy", N_("Busy"), on_status_busy_activate, NULL },
--        { "user-away", N_("Away"), NULL, NULL },
--};
--#endif
--
--static void
--update_label (GdmAppletData *adata)
--{
--        GtkWidget *label;
--        char      *markup;
--
--        label = gtk_bin_get_child (GTK_BIN (adata->menuitem));
--
--#ifdef BUILD_PRESENSE_STUFF
--        markup = g_strdup_printf ("<b>%s</b> <small>(%s)</small>",
--                                  gdm_user_get_real_name (GDM_USER (adata->user)),
--                                  _(statuses[adata->current_status].display_name));
--#else
--        markup = g_strdup_printf ("<b>%s</b>",
--                                  gdm_user_get_real_name (GDM_USER (adata->user)));
--#endif
--        gtk_label_set_markup (GTK_LABEL (label), markup);
--        g_free (markup);
--}
--
--#ifdef BUILD_PRESENSE_STUFF
--static void
--save_status_text (GdmAppletData *adata)
--{
--        GtkWidget     *entry;
--        GtkTextBuffer *buffer;
--        char          *escaped_text;
--        char          *text;
--        GtkTextIter    start, end;
--
--        entry = gdm_entry_menu_item_get_entry (GDM_ENTRY_MENU_ITEM (adata->user_item));
--        buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (entry));
--        gtk_text_buffer_get_bounds (buffer, &start, &end);
--        text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
--        escaped_text = g_markup_escape_text (text, -1);
--
--        if (escaped_text != NULL) {
--                GError *error;
--
--                error = NULL;
--                dbus_g_proxy_call (adata->presence_proxy,
--                                   "SetStatusText",
--                                   &error,
--                                   G_TYPE_STRING, escaped_text,
--                                   G_TYPE_INVALID,
--                                   G_TYPE_INVALID);
--
--                if (error != NULL) {
--                        g_warning ("Couldn't set presence status text: %s", error->message);
--                        g_error_free (error);
--                }
--        }
--
--        g_free (text);
--        g_free (escaped_text);
--}
--
--static void
--on_user_item_deselect (GtkWidget     *item,
--                       GdmAppletData *adata)
--{
--        save_status_text (adata);
--}
--#endif
--
--static void
--create_sub_menu (GdmAppletData *adata)
--{
--        GtkWidget *item;
--#ifdef BUILD_PRESENSE_STUFF
--        int        i;
--        GSList    *radio_group;
--#endif
--
--        adata->menu = gtk_menu_new ();
--#ifdef BUILD_PRESENSE_STUFF
--        g_signal_connect (adata->menu,
--                          "key-press-event",
--                          G_CALLBACK (on_menu_key_press_event),
--                          adata);
--#endif
--        gtk_menu_item_set_submenu (GTK_MENU_ITEM (adata->menuitem), adata->menu);
--        g_signal_connect (adata->menu, "style-set",
--                          G_CALLBACK (menu_style_set_cb), adata);
--        g_signal_connect (adata->menu, "show",
--                          G_CALLBACK (menu_expose_cb), adata);
--
--#ifdef BUILD_PRESENSE_STUFF
--        adata->user_item = gdm_entry_menu_item_new ();
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
--                               adata->user_item);
--        gtk_widget_show (adata->user_item);
--        g_signal_connect (adata->user_item, "activate",
--                          G_CALLBACK (on_user_item_activate), adata);
--        g_signal_connect (adata->user_item,
--                          "deselect",
--                          G_CALLBACK (on_user_item_deselect),
--                          adata);
--
--        item = gtk_separator_menu_item_new ();
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu), item);
--        gtk_widget_show (item);
--
--        radio_group = NULL;
--        for (i = 0; i < G_N_ELEMENTS (statuses); i++) {
--                GtkWidget *hbox;
--                GtkWidget *label;
--                GtkWidget *image;
--                GtkWidget *item;
--
--                if (statuses[i].menu_callback == NULL) {
--                        continue;
--                }
--
--                item = gtk_radio_menu_item_new (radio_group);
--                radio_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
--                hbox = gtk_hbox_new (FALSE, 3);
--                label = gtk_label_new (_(statuses[i].display_name));
--                gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_LEFT);
--                gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
--                gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
--                gtk_widget_show (label);
--                image = gtk_image_new_from_icon_name (statuses[i].icon_name, GTK_ICON_SIZE_MENU);
--                gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, TRUE, 0);
--                gtk_widget_show (image);
--                gtk_widget_show (hbox);
--                gtk_container_add (GTK_CONTAINER (item), hbox);
--
--                gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
--                                       item);
--                g_signal_connect (item, "activate",
--                                  G_CALLBACK (statuses[i].menu_callback), adata);
--                gtk_widget_show (item);
--
--                statuses[i].widget = item;
--        }
--
--        item = gtk_separator_menu_item_new ();
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu), item);
--        gtk_widget_show (item);
--#endif
--
--        adata->account_item = gtk_image_menu_item_new_with_label (_("Account Information"));
--        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->account_item),
--                                       gtk_image_new ());
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
--                               adata->account_item);
--        g_signal_connect (adata->account_item, "style-set",
--                          G_CALLBACK (menuitem_style_set_cb), adata);
--        g_signal_connect (adata->account_item, "activate",
--                          G_CALLBACK (on_account_activate), adata);
--        gtk_widget_show (adata->account_item);
--
--
--        adata->control_panel_item = gtk_image_menu_item_new_with_label (_("System Preferences"));
--        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->control_panel_item),
--                                       gtk_image_new ());
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
--                               adata->control_panel_item);
--        g_signal_connect (adata->control_panel_item, "style-set",
--                          G_CALLBACK (menuitem_style_set_cb), adata);
--        g_signal_connect (adata->control_panel_item, "activate",
--                          G_CALLBACK (on_control_panel_activate), adata);
--
--        item = gtk_separator_menu_item_new ();
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu), item);
--        gtk_widget_show (item);
--
--        adata->lock_screen_item = gtk_image_menu_item_new_with_label (_("Lock Screen"));
--        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->lock_screen_item),
--                                       gtk_image_new ());
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
--                               adata->lock_screen_item);
--        g_signal_connect (adata->lock_screen_item, "style-set",
--                          G_CALLBACK (menuitem_style_set_cb), adata);
--        g_signal_connect (adata->lock_screen_item, "activate",
--                          G_CALLBACK (on_lock_screen_activate), adata);
--        /* Only show if not locked down */
--
--        adata->login_screen_item = gtk_image_menu_item_new_with_label (_("Switch User"));
--        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->login_screen_item),
--                                       gtk_image_new ());
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
--                               adata->login_screen_item);
--        g_signal_connect (adata->login_screen_item, "style-set",
--                          G_CALLBACK (menuitem_style_set_cb), adata);
--        g_signal_connect (adata->login_screen_item, "activate",
--                          G_CALLBACK (on_login_screen_activate), adata);
--        /* Only show switch user if there are other users */
--
--        adata->quit_session_item = gtk_image_menu_item_new_with_label (_("Quit…"));
--        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->quit_session_item),
--                                       gtk_image_new ());
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
--                               adata->quit_session_item);
--        g_signal_connect (adata->quit_session_item, "style-set",
--                          G_CALLBACK (menuitem_style_set_cb), adata);
--        g_signal_connect (adata->quit_session_item, "activate",
--                          G_CALLBACK (on_quit_session_activate), adata);
--        gtk_widget_show (adata->quit_session_item);
--        gtk_widget_show (adata->menu);
--}
--
--static void
--destroy_sub_menu (GdmAppletData *adata)
--{
--        gtk_menu_item_set_submenu (GTK_MENU_ITEM (adata->menuitem), NULL);
--}
--
--static void
--set_menu_visibility (GdmAppletData *adata,
--                     gboolean       visible)
--{
--
--        if (visible) {
--                create_sub_menu (adata);
--        } else {
--                destroy_sub_menu (adata);
--        }
--}
--
--static void
--client_notify_lockdown_func (GConfClient   *client,
--                             guint          cnxn_id,
--                             GConfEntry    *entry,
--                             GdmAppletData *adata)
--{
--        GConfValue *value;
--        const char *key;
--
--        value = gconf_entry_get_value (entry);
--        key = gconf_entry_get_key (entry);
--
--        if (value == NULL || key == NULL) {
--                return;
--        }
--
--        if (strcmp (key, LOCKDOWN_USER_SWITCHING_KEY) == 0) {
--                if (gconf_value_get_bool (value)) {
--                        set_menu_visibility (adata, FALSE);
--                } else {
--                        set_menu_visibility (adata, TRUE);
--                }
--        } else if (strcmp (key, LOCKDOWN_LOCK_SCREEN_KEY) == 0) {
--                if (gconf_value_get_bool (value)) {
--                        gtk_widget_hide (adata->lock_screen_item);
--                } else {
--                        gtk_widget_show (adata->lock_screen_item);
--                }
--        }
--}
--
--static void
--reset_icon (GdmAppletData *adata)
--{
--        GdkPixbuf *pixbuf;
--        GtkWidget *image;
--
--        if (adata->user == NULL || !gtk_widget_has_screen (GTK_WIDGET (adata->menuitem))) {
--                return;
--        }
--
--#ifdef BUILD_PRESENSE_STUFF
--        if (adata->user_item != NULL) {
--                image = gdm_entry_menu_item_get_image (GDM_ENTRY_MENU_ITEM (adata->user_item));
--                pixbuf = gdm_user_render_icon (adata->user, adata->panel_size * 3);
--                if (pixbuf == NULL) {
--                        return;
--                }
--
--                gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
--                g_object_unref (pixbuf);
--        }
--#else
--        pixbuf = gdm_user_render_icon (adata->user, adata->panel_size);
--
--        if (pixbuf == NULL) {
--                return;
--        }
--
--        image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (adata->menuitem));
--        gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
--        g_object_unref (pixbuf);
--#endif
--}
--
--static void
--setup_current_user_now (GdmAppletData *adata)
--{
--        g_assert (adata->user != NULL);
--
--        if (adata->user_loaded_notify_id != 0) {
--                g_signal_handler_disconnect (adata->user, adata->user_loaded_notify_id);
--        }
--        adata->user_loaded_notify_id = 0;
--
--        update_label (adata);
--        reset_icon (adata);
--        adata->user_changed_notify_id =
--            g_signal_connect (adata->user,
--                              "changed",
--                              G_CALLBACK (on_user_changed),
--                              adata);
--}
--
--static void
--on_current_user_loaded (GdmUser       *user,
--                        GParamSpec    *pspec,
--                        GdmAppletData *adata)
--{
--        if (!gdm_user_is_loaded (user)) {
--                return;
--        }
--
--        setup_current_user_now (adata);
--}
--
--static void
--setup_current_user (GdmAppletData *adata)
--{
--        adata->user = gdm_user_manager_get_user_by_uid (adata->manager, getuid ());
--
--        if (adata->user == NULL) {
--                g_warning ("Could not setup current user");
--                return;
--        }
--
--        g_object_ref (adata->user);
--
--        adata->menuitem = gtk_image_menu_item_new_with_label ("");
--#ifndef BUILD_PRESENSE_STUFF
--        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->menuitem),
--                                       gtk_image_new ());
--#endif
--        gtk_menu_shell_append (GTK_MENU_SHELL (adata->menubar), adata->menuitem);
--        gtk_widget_show (adata->menuitem);
--
--        if (gdm_user_is_loaded (adata->user)) {
--                setup_current_user_now (adata);
--                return;
--        }
--
--        adata->user_loaded_notify_id = g_signal_connect (adata->user,
--                                                         "notify::is-loaded",
--                                                         G_CALLBACK (on_current_user_loaded),
--                                                         adata);
--}
--
--#ifdef BUILD_PRESENSE_STUFF
--static void
--set_status (GdmAppletData *adata,
--            guint status)
--{
--        int i;
--
--        g_debug ("Setting current status: %u", status);
--        adata->current_status = status;
--        for (i = 0; i < G_N_ELEMENTS (statuses); i++) {
--                if (statuses[i].widget == NULL) {
--                        continue;
--                }
--                if (i == status) {
--                        gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (statuses[i].widget),
--                                                        TRUE);
--                }
--        }
--
--        update_label (adata);
--}
--
--static void
--on_presence_status_changed (DBusGProxy    *presence_proxy,
--                            guint          status,
--                            GdmAppletData *adata)
--{
--        g_debug ("Status changed: %u", status);
--
--        set_status (adata, status);
--}
--
--static void
--set_status_text (GdmAppletData *adata,
--                 const char    *status_text)
--{
--        GtkWidget     *entry;
--        GtkTextBuffer *buffer;
--
--        g_debug ("Status text changed: %s", status_text);
--
--        entry = gdm_entry_menu_item_get_entry (GDM_ENTRY_MENU_ITEM (adata->user_item));
--        buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (entry));
--        gtk_text_buffer_set_text (buffer, status_text, -1);
--}
--
--static void
--on_presence_status_text_changed (DBusGProxy    *presence_proxy,
--                                 const char    *status_text,
--                                 GdmAppletData *adata)
--{
--        set_status_text (adata, status_text);
--}
--#endif
--
--static gboolean
--fill_applet (PanelApplet *applet)
--{
--        static const BonoboUIVerb menu_verbs[] = {
--                BONOBO_UI_VERB ("GdmAboutMe", about_me_cb),
--                BONOBO_UI_VERB ("GdmUsersGroupsAdmin", admin_cb),
--                BONOBO_UI_VERB ("GdmAbout", about_cb),
--                BONOBO_UI_VERB_END
--        };
--        static gboolean    first_time = FALSE;
--        char              *tmp;
--        BonoboUIComponent *popup_component;
--        GdmAppletData     *adata;
--        GError            *error;
--        DBusGConnection   *bus;
--
--        if (!first_time) {
--                first_time = TRUE;
--
--                /* Do this here so it's only done once. */
--                gtk_rc_parse_string ("style \"gdm-user-switch-menubar-style\"\n"
--                                     "{\n"
--                                     "GtkMenuBar::shadow-type = none\n"
--                                     "GtkMenuBar::internal-padding = 0\n"
--                                     "}\n"
--                                     "style \"gdm-user-switch-applet-style\"\n"
--                                     "{\n"
--                                     "GtkWidget::focus-line-width = 0\n"
--                                     "GtkWidget::focus-padding = 0\n"
--                                     "}\n"
--                                     "widget \"*.gdm-user-switch-menubar\" style \"gdm-user-switch-menubar-style\"\n"
--                                     "widget \"*.gdm-user-switch-applet\" style \"gdm-user-switch-applet-style\"\n");
--                gtk_window_set_default_icon_name ("stock_people");
--                g_set_application_name (_("User Switch Applet"));
--
--                if (! gdm_settings_client_init (DATADIR "/gdm/gdm.schemas", "/")) {
--                        g_critical ("Unable to initialize settings client");
--                        exit (1);
--                }
--
--        }
--
--        adata = g_new0 (GdmAppletData, 1);
--        adata->applet = applet;
--        adata->panel_size = 24;
--
--        adata->client = gconf_client_get_default ();
--
--        gtk_widget_set_tooltip_text (GTK_WIDGET (applet), _("Change account settings and status"));
--        gtk_container_set_border_width (GTK_CONTAINER (applet), 0);
--        gtk_widget_set_name (GTK_WIDGET (applet), "gdm-user-switch-applet");
--        panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MINOR);
--        panel_applet_setup_menu_from_file (applet, NULL,
--                                           DATADIR "/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml",
--                                           NULL, menu_verbs, adata);
--
--        popup_component = panel_applet_get_popup_component (applet);
--
--        /* Hide the admin context menu items if locked down or no cmd-line */
--        if (gconf_client_get_bool (adata->client,
--                                   LOCKDOWN_COMMAND_LINE_KEY,
--                                   NULL) ||
--            panel_applet_get_locked_down (applet)) {
--                bonobo_ui_component_set_prop (popup_component,
--                                              "/popups/button3/GdmSeparator",
--                                              "hidden", "1", NULL);
--                bonobo_ui_component_set_prop (popup_component,
--                                              "/commands/GdmUsersGroupsAdmin",
--                                              "hidden", "1", NULL);
--        } else {
--#ifndef USERS_ADMIN
--#  ifdef GDM_SETUP
--                bonobo_ui_component_set_prop (popup_component,
--                                              "/popups/button3/GdmSeparator",
--                                              "hidden", "1",
--                                              NULL);
--#  endif /* !GDM_SETUP */
--                bonobo_ui_component_set_prop (popup_component,
--                                              "/commands/GdmUsersGroupsAdmin",
--                                              "hidden", "1",
--                                              NULL);
--#endif /* !USERS_ADMIN */
--        }
--
--        /* Hide the gdmphotosetup item if it can't be found in the path. */
--        tmp = g_find_program_in_path ("gnome-about-me");
--        if (!tmp) {
--                bonobo_ui_component_set_prop (popup_component,
--                                              "/commands/GdmAboutMe",
--                                              "hidden", "1",
--                                              NULL);
--        } else {
--                g_free (tmp);
--        }
--
--        g_signal_connect (adata->applet,
--                          "style-set",
--                          G_CALLBACK (applet_style_set_cb), adata);
--        g_signal_connect (applet,
--                          "change-background",
--                          G_CALLBACK (applet_change_background_cb), adata);
--        g_signal_connect (applet,
--                          "size-allocate",
--                          G_CALLBACK (applet_size_allocate_cb), adata);
--        g_signal_connect (applet,
--                          "key-press-event",
--                          G_CALLBACK (applet_key_press_event_cb), adata);
--        g_signal_connect_after (applet,
--                                "focus-in-event",
--                                G_CALLBACK (gtk_widget_queue_draw), NULL);
--        g_signal_connect_after (applet,
--                                "focus-out-event",
--                                G_CALLBACK (gtk_widget_queue_draw), NULL);
--        g_object_set_data_full (G_OBJECT (applet),
--                                "gdm-applet-data",
--                                adata,
--                                (GDestroyNotify) gdm_applet_data_free);
--
--        adata->menubar = gtk_menu_bar_new ();
--        gtk_widget_set_name (adata->menubar, "gdm-user-switch-menubar");
--        gtk_widget_set_can_focus (adata->menubar, TRUE);
--        g_signal_connect (adata->menubar, "button-press-event",
--                          G_CALLBACK (menubar_button_press_event_cb), adata);
--        g_signal_connect_after (adata->menubar, "expose-event",
--                                G_CALLBACK (menubar_expose_event_cb), adata);
--        gtk_container_add (GTK_CONTAINER (applet), adata->menubar);
--        gtk_widget_show (adata->menubar);
--
--        adata->manager = gdm_user_manager_ref_default ();
--        g_object_set (adata->manager, "include-all", TRUE, NULL);
--        g_signal_connect (adata->manager,
--                          "notify::is-loaded",
--                          G_CALLBACK (on_manager_is_loaded_changed),
--                          adata);
--        g_signal_connect (adata->manager,
--                          "notify::has-multiple-users",
--                          G_CALLBACK (on_manager_has_multiple_users_changed),
--                          adata);
--
--        gdm_user_manager_queue_load (adata->manager);
--        setup_current_user (adata);
--
--        gconf_client_add_dir (adata->client,
--                              LOCKDOWN_DIR,
--                              GCONF_CLIENT_PRELOAD_ONELEVEL,
--                              NULL);
--
--        adata->client_notify_lockdown_id = gconf_client_notify_add (adata->client,
--                                                                    LOCKDOWN_DIR,
--                                                                    (GConfClientNotifyFunc)client_notify_lockdown_func,
--                                                                    adata,
--                                                                    NULL,
--                                                                    NULL);
--
--        if (gconf_client_get_bool (adata->client, LOCKDOWN_USER_SWITCHING_KEY, NULL)) {
--                set_menu_visibility (adata, FALSE);
--        } else {
--                set_menu_visibility (adata, TRUE);
--        }
--        if (gconf_client_get_bool (adata->client, LOCKDOWN_LOCK_SCREEN_KEY, NULL)) {
--                        gtk_widget_hide (adata->lock_screen_item);
--        } else {
--                        gtk_widget_show (adata->lock_screen_item);
--        }
--
--        error = NULL;
--        bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
--        if (bus == NULL) {
--                g_warning ("Unable to get session bus: %s", error->message);
--                g_error_free (error);
--                goto done;
--        }
--
--#ifdef BUILD_PRESENSE_STUFF
--        adata->presence_proxy = dbus_g_proxy_new_for_name (bus,
--                                                          "org.gnome.SessionManager",
--                                                          "/org/gnome/SessionManager/Presence",
--                                                          "org.gnome.SessionManager.Presence");
--        if (adata->presence_proxy != NULL) {
--                DBusGProxy *proxy;
--
--                dbus_g_proxy_add_signal (adata->presence_proxy,
--                                         "StatusChanged",
--                                         G_TYPE_UINT,
--                                         G_TYPE_INVALID);
--                dbus_g_proxy_connect_signal (adata->presence_proxy,
--                                             "StatusChanged",
--                                             G_CALLBACK (on_presence_status_changed),
--                                             adata,
--                                             NULL);
--                dbus_g_proxy_add_signal (adata->presence_proxy,
--                                         "StatusTextChanged",
--                                         G_TYPE_STRING,
--                                         G_TYPE_INVALID);
--                dbus_g_proxy_connect_signal (adata->presence_proxy,
--                                             "StatusTextChanged",
--                                             G_CALLBACK (on_presence_status_text_changed),
--                                             adata,
--                                             NULL);
--
--
--                proxy = dbus_g_proxy_new_from_proxy (adata->presence_proxy,
--                                                     "org.freedesktop.DBus.Properties",
--                                                     "/org/gnome/SessionManager/Presence");
--                if (proxy != NULL) {
--                        guint       status;
--                        const char *status_text;
--                        GValue      value = { 0, };
--
--                        status = 0;
--                        status_text = NULL;
--
--                        error = NULL;
--                        dbus_g_proxy_call (proxy,
--                                           "Get",
--                                           &error,
--                                           G_TYPE_STRING, "org.gnome.SessionManager.Presence",
--                                           G_TYPE_STRING, "status",
--                                           G_TYPE_INVALID,
--                                           G_TYPE_VALUE, &value,
--                                           G_TYPE_INVALID);
--
--                        if (error != NULL) {
--                                g_warning ("Couldn't get presence status: %s", error->message);
--                                g_error_free (error);
--                        } else {
--                                status = g_value_get_uint (&value);
--                        }
--
--                        g_value_unset (&value);
--
--                        error = NULL;
--                        dbus_g_proxy_call (proxy,
--                                           "Get",
--                                           &error,
--                                           G_TYPE_STRING, "org.gnome.SessionManager.Presence",
--                                           G_TYPE_STRING, "status-text",
--                                           G_TYPE_INVALID,
--                                           G_TYPE_VALUE, &value,
--                                           G_TYPE_INVALID);
--
--                        if (error != NULL) {
--                                g_warning ("Couldn't get presence status text: %s", error->message);
--                                g_error_free (error);
--                        } else {
--                                status_text = g_value_get_string (&value);
--                        }
--
--                        set_status (adata, status);
--                        set_status_text (adata, status_text);
--                }
--        } else {
--                g_warning ("Failed to get session presence proxy");
--        }
--#endif
--
-- done:
--        gtk_widget_show (GTK_WIDGET (adata->applet));
--
--        return TRUE;
--}
--
--static gboolean
--applet_factory (PanelApplet   *applet,
--                const char    *iid,
--                gpointer       data)
--{
--        gboolean ret;
--        ret = FALSE;
--        if (strcmp (iid, "OAFIID:GNOME_FastUserSwitchApplet") == 0) {
--                ret = fill_applet (applet);
--        }
--        return ret;
--}
-diff --git a/gui/user-switch-applet/gdm-entry-menu-item.c b/gui/user-switch-applet/gdm-entry-menu-item.c
-deleted file mode 100644
-index d657e7a..0000000
---- a/gui/user-switch-applet/gdm-entry-menu-item.c
-+++ /dev/null
-@@ -1,304 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2008 Red Hat, Inc.
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-- */
--
--#include "config.h"
--
--#include <unistd.h>
--#include <sys/types.h>
--
--#include <string.h>
--
--#include <glib/gi18n.h>
--#include <gtk/gtk.h>
--
--#include "gdm-entry-menu-item.h"
--
--/* same as twitter */
--#define TEXT_BUFFER_MAX_CHARS 64
--
--enum
--{
--        PROP_0,
--};
--
--struct _GdmEntryMenuItem
--{
--        GtkMenuItem      parent;
--
--        GtkWidget       *hbox;
--        GtkWidget       *image;
--        GtkWidget       *entry;
--};
--
--struct _GdmEntryMenuItemClass
--{
--        GtkMenuItemClass parent_class;
--};
--
--G_DEFINE_TYPE (GdmEntryMenuItem, gdm_entry_menu_item, GTK_TYPE_MENU_ITEM)
--
--static void
--gdm_entry_menu_item_set_property (GObject      *object,
--                                  guint         param_id,
--                                  const GValue *value,
--                                  GParamSpec   *pspec)
--{
--        GdmEntryMenuItem *item;
--
--        item = GDM_ENTRY_MENU_ITEM (object);
--
--        switch (param_id) {
--        default:
--                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
--                break;
--        }
--}
--
--static void
--gdm_entry_menu_item_get_property (GObject    *object,
--                                  guint       param_id,
--                                  GValue     *value,
--                                  GParamSpec *pspec)
--{
--        GdmEntryMenuItem *item;
--
--        item = GDM_ENTRY_MENU_ITEM (object);
--
--        switch (param_id) {
--        default:
--                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
--                break;
--        }
--}
--
--static void
--gdm_entry_menu_item_dispose (GObject *object)
--{
--
--        (*G_OBJECT_CLASS (gdm_entry_menu_item_parent_class)->dispose) (object);
--}
--
--static gboolean
--gdm_entry_menu_item_button_release (GtkWidget      *widget,
--                                    GdkEventButton *event)
--{
--        return TRUE;
--}
--
--/* Cut and paste from gtkwindow.c */
--static void
--send_focus_change (GtkWidget *widget,
--                   gboolean   in)
--{
--        GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
--
--        g_object_ref (widget);
--
--        gtk_widget_set_can_focus (widget, in);
--
--        fevent->focus_change.type = GDK_FOCUS_CHANGE;
--        fevent->focus_change.window = g_object_ref (gtk_widget_get_window (widget));
--        fevent->focus_change.in = in;
--
--        gtk_widget_event (widget, fevent);
--
--        g_object_notify (G_OBJECT (widget), "has-focus");
--
--        g_object_unref (widget);
--        gdk_event_free (fevent);
--}
--
--static gboolean
--gdm_entry_menu_item_button_press (GtkWidget      *widget,
--                                  GdkEventButton *event)
--{
--        GtkWidget *entry;
--
--        entry = GDM_ENTRY_MENU_ITEM (widget)->entry;
--
--        if (gtk_widget_get_window (entry) != NULL) {
--                gdk_window_raise (gtk_widget_get_window (entry));
--        }
--
--        if (!gtk_widget_has_focus (entry)) {
--                gtk_widget_grab_focus (entry);
--        }
--
--        return FALSE;
--}
--
--static void
--gdm_entry_menu_item_realize (GtkWidget *widget)
--{
--        if (GTK_WIDGET_CLASS (gdm_entry_menu_item_parent_class)->realize) {
--                GTK_WIDGET_CLASS (gdm_entry_menu_item_parent_class)->realize (widget);
--        }
--}
--
--static void
--gdm_entry_menu_item_select (GtkItem *item)
--{
--        g_return_if_fail (GDM_IS_ENTRY_MENU_ITEM (item));
--        send_focus_change (GTK_WIDGET (GDM_ENTRY_MENU_ITEM (item)->entry), TRUE);
--}
--
--static void
--gdm_entry_menu_item_deselect (GtkItem *item)
--{
--        g_return_if_fail (GDM_IS_ENTRY_MENU_ITEM (item));
--
--        send_focus_change (GTK_WIDGET (GDM_ENTRY_MENU_ITEM (item)->entry), FALSE);
--}
--
--static void
--gdm_entry_menu_item_class_init (GdmEntryMenuItemClass *klass)
--{
--        GObjectClass     *gobject_class;
--        GtkWidgetClass   *widget_class;
--        GtkMenuItemClass *menu_item_class;
--        GtkItemClass     *item_class;
--
--        gobject_class = G_OBJECT_CLASS (klass);
--        widget_class = GTK_WIDGET_CLASS (klass);
--        menu_item_class = GTK_MENU_ITEM_CLASS (klass);
--        item_class = GTK_ITEM_CLASS (klass);
--
--        gobject_class->set_property = gdm_entry_menu_item_set_property;
--        gobject_class->get_property = gdm_entry_menu_item_get_property;
--        gobject_class->dispose = gdm_entry_menu_item_dispose;
--
--        widget_class->button_release_event = gdm_entry_menu_item_button_release;
--        widget_class->button_press_event = gdm_entry_menu_item_button_press;
--        widget_class->realize = gdm_entry_menu_item_realize;
--
--        item_class->select = gdm_entry_menu_item_select;
--        item_class->deselect = gdm_entry_menu_item_deselect;
--
--        menu_item_class->hide_on_activate = FALSE;
--}
--
--static void
--on_entry_show (GtkWidget        *widget,
--               GdmEntryMenuItem *item)
--{
--        if (gtk_widget_get_window (widget) != NULL) {
--                gdk_window_raise (gtk_widget_get_window (widget));
--        }
--        send_focus_change (widget, TRUE);
--}
--
--static void
--on_text_buffer_changed (GtkTextBuffer    *buffer,
--                        GdmEntryMenuItem *item)
--{
--        int len;
--
--        len = gtk_text_buffer_get_char_count (buffer);
--        if (len > TEXT_BUFFER_MAX_CHARS) {
--                gdk_window_beep (gtk_widget_get_window (GTK_WIDGET (item)));
--        }
--}
--
--static void
--on_entry_move_focus (GtkWidget        *widget,
--                     GtkDirectionType  direction,
--                     GdmEntryMenuItem *item)
--{
--        g_debug ("focus move");
--        send_focus_change (GTK_WIDGET (GDM_ENTRY_MENU_ITEM (item)->entry), FALSE);
--        g_signal_emit_by_name (item,
--                               "move-focus",
--                               GTK_DIR_TAB_FORWARD);
--}
--
--static void
--gdm_entry_menu_item_init (GdmEntryMenuItem *item)
--{
--        PangoFontDescription *fontdesc;
--        PangoFontMetrics     *metrics;
--        PangoContext         *context;
--        PangoLanguage        *lang;
--        int                   ascent;
--        GtkTextBuffer        *buffer;
--
--        item->hbox = gtk_hbox_new (FALSE, 6);
--        gtk_container_add (GTK_CONTAINER (item), item->hbox);
--
--        item->image = gtk_image_new ();
--        gtk_box_pack_start (GTK_BOX (item->hbox), item->image, FALSE, FALSE, 0);
--
--        item->entry = gtk_text_view_new ();
--        gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (item->entry), FALSE);
--        gtk_text_view_set_editable (GTK_TEXT_VIEW (item->entry), TRUE);
--        gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (item->entry),
--                                     GTK_WRAP_WORD);
--        g_signal_connect (item->entry,
--                          "show",
--                          G_CALLBACK (on_entry_show),
--                          item);
--        g_signal_connect (item->entry,
--                          "move-focus",
--                          G_CALLBACK (on_entry_move_focus),
--                          item);
--
--        buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (item->entry));
--        g_signal_connect (buffer,
--                          "changed",
--                          G_CALLBACK (on_text_buffer_changed),
--                          item);
--
--        /* get the font ascent for the current font and language */
--        context = gtk_widget_get_pango_context (item->entry);
--        fontdesc = pango_context_get_font_description (context);
--        lang = pango_context_get_language (context);
--        metrics = pango_context_get_metrics (context, fontdesc, lang);
--        ascent = pango_font_metrics_get_ascent (metrics) * 1.5 / PANGO_SCALE;
--        pango_font_metrics_unref (metrics);
--
--        /* size our progress bar to be five ascents long */
--        gtk_widget_set_size_request (item->entry, ascent * 5, -1);
--
--        gtk_box_pack_start (GTK_BOX (item->hbox), item->entry, TRUE, TRUE, 0);
--
--        gtk_widget_show (item->hbox);
--        gtk_widget_show (item->image);
--        gtk_widget_show (item->entry);
--}
--
--GtkWidget *
--gdm_entry_menu_item_new (void)
--{
--        return g_object_new (GDM_TYPE_ENTRY_MENU_ITEM, NULL);
--}
--
--GtkWidget *
--gdm_entry_menu_item_get_entry (GdmEntryMenuItem *item)
--{
--        g_return_val_if_fail (GDM_IS_ENTRY_MENU_ITEM (item), NULL);
--
--        return item->entry;
--}
--
--GtkWidget *
--gdm_entry_menu_item_get_image (GdmEntryMenuItem *item)
--{
--        g_return_val_if_fail (GDM_IS_ENTRY_MENU_ITEM (item), NULL);
--
--        return item->image;
--}
-diff --git a/gui/user-switch-applet/gdm-entry-menu-item.h b/gui/user-switch-applet/gdm-entry-menu-item.h
-deleted file mode 100644
-index 3031609..0000000
---- a/gui/user-switch-applet/gdm-entry-menu-item.h
-+++ /dev/null
-@@ -1,51 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>.
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-- */
--
--#ifndef __GDM_ENTRY_MENU_ITEM__
--#define __GDM_ENTRY_MENU_ITEM__
--
--#include <gtk/gtk.h>
--
--G_BEGIN_DECLS
--
--#define GDM_TYPE_ENTRY_MENU_ITEM \
--  (gdm_entry_menu_item_get_type ())
--#define GDM_ENTRY_MENU_ITEM(object) \
--  (G_TYPE_CHECK_INSTANCE_CAST ((object), GDM_TYPE_ENTRY_MENU_ITEM, GdmEntryMenuItem))
--#define GDM_ENTRY_MENU_ITEM_CLASS(klass) \
--  (G_TYPE_CHECK_CLASS_CAST ((klass), GDM_TYPE_ENTRY_MENU_ITEM, GdmEntryMenuItemClass))
--#define GDM_IS_ENTRY_MENU_ITEM(object) \
--  (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDM_TYPE_ENTRY_MENU_ITEM))
--#define GDM_IS_ENTRY_MENU_ITEM_CLASS(klass) \
--  (G_TYPE_CHECK_CLASS_TYPE ((klass), GDM_TYPE_ENTRY_MENU_ITEM))
--#define GDM_ENTRY_MENU_ITEM_GET_CLASS(object) \
--  (G_TYPE_INSTANCE_GET_CLASS ((object), GDM_TYPE_ENTRY_MENU_ITEM, GdmEntryMenuItemClass))
--
--typedef struct _GdmEntryMenuItem GdmEntryMenuItem;
--typedef struct _GdmEntryMenuItemClass GdmEntryMenuItemClass;
--
--GType      gdm_entry_menu_item_get_type      (void) G_GNUC_CONST;
--
--GtkWidget *gdm_entry_menu_item_new           (void);
--GtkWidget *gdm_entry_menu_item_get_entry     (GdmEntryMenuItem *item);
--GtkWidget *gdm_entry_menu_item_get_image     (GdmEntryMenuItem *item);
--
--G_END_DECLS
--
--#endif /* __GDM_ENTRY_MENU_ITEM__ */
-diff --git a/po/POTFILES.in b/po/POTFILES.in
-index 1fccb90..cc1a3fd 100644
---- a/po/POTFILES.in
-+++ b/po/POTFILES.in
-@@ -84,10 +84,6 @@ gui/simple-greeter/gdm-timer.c
- gui/simple-greeter/gdm-user.c
- gui/simple-greeter/gdm-user-chooser-widget.c
- gui/simple-greeter/greeter-main.c
--gui/user-switch-applet/applet.c
--gui/user-switch-applet/gdm-entry-menu-item.c
--gui/user-switch-applet/GNOME_FastUserSwitchApplet.server.in.in
--gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml
- utils/gdmflexiserver.c
- utils/gdm-screenshot.c
- 
-diff --git a/po/POTFILES.skip b/po/POTFILES.skip
-index 0269a0f..ee3d753 100644
---- a/po/POTFILES.skip
-+++ b/po/POTFILES.skip
-@@ -7,7 +7,6 @@
- # remove these unless you fix "make distcheck" a different way.
- #
- data/gdm.schemas.in
--gui/user-switch-applet/GNOME_FastUserSwitchApplet.server.in
- data/greeter-autostart/at-spi-registryd-wrapper.desktop.in
- data/greeter-autostart/gdm-simple-greeter.desktop.in
- data/greeter-autostart/gnome-power-manager.desktop.in
--- 
-1.6.6.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/0002-gdm-user-manager.c-avoid-displaying-system-users-in-.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/0002-gdm-user-manager.c-avoid-displaying-system-users-in-.patch
deleted file mode 100644
index ad21073..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/0002-gdm-user-manager.c-avoid-displaying-system-users-in-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 43e59f3deadb3914a1cc931ae18d4023874cdeca Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 26 Apr 2013 17:15:48 +0200
-Subject: [PATCH] gdm-user-manager.c: avoid displaying system users in
- greeter's list
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-yocto environment system users have UID below 1000
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- gui/simple-greeter/gdm-user-manager.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/gui/simple-greeter/gdm-user-manager.c b/gui/simple-greeter/gdm-user-manager.c
-index c631989..f18e478 100644
---- a/gui/simple-greeter/gdm-user-manager.c
-+++ b/gui/simple-greeter/gdm-user-manager.c
-@@ -63,7 +63,7 @@
- #ifdef __sun
- #define FALLBACK_MINIMAL_UID     100
- #else
--#define FALLBACK_MINIMAL_UID     500
-+#define FALLBACK_MINIMAL_UID     1000
- #endif
- 
- #ifndef _PATH_SHELLS
--- 
-1.7.4.4
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/sysrooted-pkg-config.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/sysrooted-pkg-config.patch
deleted file mode 100644
index 1f9fa2a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/sysrooted-pkg-config.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-In cross environment we have to prepend the sysroot to the path found by
-pkgconfig since the path returned from pkgconfig does not have sysroot prefixed
-it ends up using the files from host system. Now usually people have gnome installed
-so the build succeeds but if you dont have gnome installed on build host then
-it wont find the files on host system and packages using gnome-doc-utils wont
-compile.
-
-This should work ok with non sysrooted builds too since in those cases PKG_CONFIG_SYSROOT_DIR
-will be empty
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gdm-2.32.2/gnome-doc-utils.make
-===================================================================
---- gdm-2.32.2.orig/gnome-doc-utils.make	2011-05-31 08:06:59.000000000 -0700
-+++ gdm-2.32.2/gnome-doc-utils.make	2011-09-25 15:32:39.540992521 -0700
-@@ -133,12 +133,12 @@
- _xml2po ?= `which xml2po`
- _xml2po_mode = $(if $(DOC_ID),mallard,docbook)
- 
--_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
--_db2omf  ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
--_malrng  ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils`
--_chunks  ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
--_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
--_ids ?= $(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
-+_db2html ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2html gnome-doc-utils`
-+_db2omf  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
-+_malrng  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable malrng gnome-doc-utils`
-+_chunks  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
-+_credits ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
-+_ids ?= ${PKG_CONFIG_SYSROOT_DIR}$(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
- 
- if ENABLE_SK
- _ENABLE_SK = true
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb
deleted file mode 100644
index 64785ca..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb
+++ /dev/null
@@ -1,108 +0,0 @@
-SUMMARY = "Graphical login manager"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "xinput gnome-panel tcp-wrappers libcanberra libxklavier grep consolekit libpam gnome-doc-utils gtk+ xrdb"
-
-PR = "r18"
-
-inherit gnome update-rc.d systemd useradd
-
-SRC_URI += " \
-    file://cross-xdetection.diff \
-    file://0001-Remove-user-switch-applet.patch \
-    file://0002-gdm-user-manager.c-avoid-displaying-system-users-in-.patch \
-    file://sysrooted-pkg-config.patch \
-    file://%gconf-tree.xml \
-    file://gdm \
-    file://gdm.conf \
-    file://gdm-pam \
-    file://Default \
-    file://gdm.service.in \
-"
-
-SRC_URI[archive.md5sum] = "dbe5187a2e17881cc454e313e0ae8d1e"
-SRC_URI[archive.sha256sum] = "034d23af0ea18d86e5543e707212d9297ec7d83f221808968af266dbebc0e703"
-GNOME_COMPRESS_TYPE="bz2"
-
-EXTRA_OECONF = " \
-    --enable-authentication-scheme=shadow \
-    --enable-debug=yes \
-    --with-console-kit \
-    --disable-scrollkeeper \
-"
-
-do_configure_prepend() {
-    sed -i -e "s:\bdocs::g" ${S}/Makefile.am
-    rm -f ${S}/m4/gnome-doc-utils.m4
-}
-
-do_install_prepend() {
-    install -d ${D}/${localstatedir}/lib/gdm/.gconf.mandatory
-    install ${WORKDIR}/%gconf-tree.xml ${D}/${localstatedir}/lib/gdm/.gconf.mandatory/
-}
-
-do_install_append() {
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/gdm ${D}/${sysconfdir}/init.d/
-
-    install -d ${D}/${sysconfdir}/gdm
-    install -m 0644 ${WORKDIR}/gdm.conf ${D}/${sysconfdir}/gdm/
-
-    install -d ${D}/${sysconfdir}/pam.d
-    install -m 0755 ${WORKDIR}/gdm-pam       ${D}/${sysconfdir}/pam.d/gdm
-    rm -f ${D}/${sysconfdir}/pam.d/gdm-autologin
-
-    install -d ${D}/${sysconfdir}/gdm/Init
-    install -m 0755 ${WORKDIR}/Default ${D}/${sysconfdir}/gdm/Init
-
-    install -d ${D}${systemd_unitdir}/system
-    sed -e 's,%sbindir%,${sbindir},g' \
-        < ${WORKDIR}/gdm.service.in \
-        > ${D}${systemd_unitdir}/system/gdm.service
-
-    chown -R gdm:gdm ${D}${localstatedir}/lib/gdm
-    chmod 0750 ${D}${localstatedir}/lib/gdm
-
-    rm -rf "${D}${localstatedir}/run"
-    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
-
-    rm -f ${D}${datadir}/gdm/autostart/LoginWindow/at-spi-registryd-wrapper.desktop
-    rm -f ${D}${datadir}/gdm/autostart/LoginWindow/orca-screen-reader.desktop
-    rm -f ${D}${datadir}/gdm/autostart/LoginWindow/gnome-mag.desktop
-    rm -f ${D}${datadir}/gdm/autostart/LoginWindow/gok.desktop
-    rm -f ${D}${datadir}/gdm/autostart/LoginWindow/metacity.desktop
-}
-
-FILES_${PN} += "${datadir}/icon* \
-    ${datadir}/xsession* \
-"
-
-RDEPENDS_${PN} += "grep dbus-x11 shadow"
-# "libpam-base-files"
-CONFFILES_${PN} += "${sysconfdir}/gdm/gdm.conf ${sysconfdir}/init.d/gdm"
-RRECOMMENDS_${PN} += "openssh-misc desktop-file-utils glib-2.0-utils metacity gnome-session polkit-gnome consolekit"
-
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "gdm.service"
-
-INITSCRIPT_NAME = "gdm"
-INITSCRIPT_PARAMS = "start 99 5 . stop 20 0 1 2 3 6 ."
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --no-create-home --home ${localstatedir}/lib/gdm --user-group gdm"
-
-pkg_postinst_${PN} () {
-# Register up as default dm
-mkdir -p $D${sysconfdir}/X11/
-echo "${bindir}/gdm" > $D${sysconfdir}/X11/default-display-manager
-}
-
-pkg_postrm_${PN} () {
-    deluser gdm || true
-    delgroup gdm || true
-    sed -i /gdm/d ${sysconfdir}/X11/default-display-manager || true
-}
-
-PNBLACKLIST[gdm] ?= "Depends on broken gnome-panel - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-backgrounds/gnome-backgrounds_2.32.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-backgrounds/gnome-backgrounds_2.32.0.bb
deleted file mode 100644
index 235b02a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-backgrounds/gnome-backgrounds_2.32.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Gnome background images"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SECTION = "x11/gnome"
-
-# glib-2.0 for glib-gettext.m4 which provides AM_GLIB_GNU_GETTEXT
-# intltool-native for IT_PROG_INTLTOOL(0.35.0)
-DEPENDS = "glib-2.0 intltool-native"
-
-inherit gnomebase
-
-SRC_URI[archive.md5sum] = "3df26626483b02e51adefc6ab5945a8d"
-SRC_URI[archive.sha256sum] = "4d7b60b5ba768bf8834b5fa3a3471cd9a9e14b5884bc210dc2d3cdbf1faddcef"
-GNOME_COMPRESS_TYPE="bz2"
-
-FILES_${PN} += "${datadir}/gnome-background-properties"
-
-
-PNBLACKLIST[gnome-backgrounds] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130647/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_2.32.1.bb
deleted file mode 100644
index 201783e..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_2.32.1.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "GNOME control center"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "desktop-file-utils-native gnome-menus libunique dbus-glib gnome-desktop libxml2 metacity gconf gnome-settings-daemon librsvg pango libgnomekbd libxklavier libcanberra libgtop libxscrnsaver"
-
-PR = "r1"
-
-inherit gnome
-
-SRC_URI[archive.md5sum] = "b4e8ab5c7556ae07addbfcfb4fa2f761"
-SRC_URI[archive.sha256sum] = "7c568b57358e5c08f4d8dd76dbac7df2539135ad081872b60514b7a8ac797e66"
-GNOME_COMPRESS_TYPE="bz2"
-
-LDFLAGS += "-lgthread-2.0 -lxml2"
-
-do_configure_prepend() {
-    sed -i s:help::g ${S}/Makefile.am
-    rm -f ${S}/m4/gnome-doc-utils.m4
-}
-do_install_append() {
-    rm -rf ${D}${datadir}/mime
-}
-
-FILES_${PN} += "${datadir}/icon* \
-                ${datadir}/xsession* \
-                ${libdir}/window-manager-settings/*.so \
-                ${datadir}/gnome \
-                ${datadir}/desktop-directories \
-"
-FILES_${PN}-dbg += "${libdir}/window-manager-settings/.debug"
-FILES_${PN}-dev += "${libdir}/window-manager-settings/*.la"
-FILES_${PN}-staticdev += "${libdir}/window-manager-settings/*.a"
-
-PNBLACKLIST[gnome-control-center] ?= "Depends on broken gnome-menus - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_2.32.1.bb
deleted file mode 100644
index f1dafad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_2.32.1.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "GNOME library for reading .desktop files"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-PR = "r6"
-
-inherit gnome pkgconfig
-
-SRC_URI[archive.md5sum] = "5c80d628a240eb9d9ff78913b31f2f67"
-SRC_URI[archive.sha256sum] = "55cbecf67efe1fa1e57ac966520a7c46d799c8ba3c652a1219f60cafccb3739d"
-GNOME_COMPRESS_TYPE="bz2"
-
-DEPENDS += "gconf libxrandr virtual/libx11 gtk+ glib-2.0 gnome-doc-utils startup-notification intltool-native gnome-common-native"
-
-EXTRA_OECONF = "--disable-scrollkeeper --disable-desktop-docs --disable-gnome-about"
-
-do_configure_prepend () {
-    sed -i -e s:^#!@PYTHON@:#!${bindir}/python: ${S}/gnome-about/gnome-about.in
-    rm -f ${S}/m4/gnome-doc-utils.m4
-}
-
-PACKAGES =+ "libgnome-desktop"
-FILES_libgnome-desktop = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop/pnp.ids"
-FILES_${PN} += "${datadir}/gnome-about"
-
-PNBLACKLIST[gnome-desktop] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130595/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/0001-Add-support-for-DeviceAutomountHint.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/0001-Add-support-for-DeviceAutomountHint.patch
deleted file mode 100644
index 805e937..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/0001-Add-support-for-DeviceAutomountHint.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 7dde5bc75a1d96be9510ce1e98d28f9d33520919 Mon Sep 17 00:00:00 2001
-From: David Zeuthen <davidz@redhat.com>
-Date: Fri, 8 Jul 2011 11:03:52 -0400
-Subject: [PATCH] Add support for DeviceAutomountHint
-
-Based on the patch in https://bugzilla.gnome.org/show_bug.cgi?id=653184
-
-Upstream-Status: Applied [1]
-
-[1] https://mail.gnome.org/archives/commits-list/2011-July/msg03207.html
-
-Signed-off-by: David Zeuthen <davidz@redhat.com>
----
- src/gdu/gdu-device.c |   10 ++++++++++
- src/gdu/gdu-device.h |    1 +
- 2 files changed, 11 insertions(+), 0 deletions(-)
-
-diff --git a/src/gdu/gdu-device.c b/src/gdu/gdu-device.c
-index 6a5afad..4be39cf 100644
---- a/src/gdu/gdu-device.c
-+++ b/src/gdu/gdu-device.c
-@@ -82,6 +82,7 @@ typedef struct
-   gboolean device_presentation_nopolicy;
-   char *device_presentation_name;
-   char *device_presentation_icon_name;
-+  char *device_automount_hint;
-   guint64 device_size;
-   guint64 device_block_size;
- 
-@@ -279,6 +280,8 @@ collect_props (const char *key,
-     props->device_presentation_name = g_strdup (g_value_get_string (value));
-   else if (strcmp (key, "DevicePresentationIconName") == 0)
-     props->device_presentation_icon_name = g_strdup (g_value_get_string (value));
-+  else if (strcmp (key, "DeviceAutomountHint") == 0)
-+    props->device_automount_hint = g_strdup (g_value_get_string (value));
-   else if (strcmp (key, "DeviceSize") == 0)
-     props->device_size = g_value_get_uint64 (value);
-   else if (strcmp (key, "DeviceBlockSize") == 0)
-@@ -549,6 +552,7 @@ device_properties_free (DeviceProperties *props)
-   g_strfreev (props->device_mount_paths);
-   g_free (props->device_presentation_name);
-   g_free (props->device_presentation_icon_name);
-+  g_free (props->device_automount_hint);
-   g_free (props->job_id);
-   g_free (props->id_usage);
-   g_free (props->id_type);
-@@ -1294,6 +1298,12 @@ gdu_device_drive_get_media_compatibility (GduDevice *device)
- }
- 
- const char *
-+gdu_device_get_automount_hint (GduDevice *device)
-+{
-+        return device->priv->props->device_automount_hint;
-+}
-+
-+const char *
- gdu_device_drive_get_media (GduDevice *device)
- {
-         return device->priv->props->drive_media;
-diff --git a/src/gdu/gdu-device.h b/src/gdu/gdu-device.h
-index 4c1302b..8cfd7a9 100644
---- a/src/gdu/gdu-device.h
-+++ b/src/gdu/gdu-device.h
-@@ -143,6 +143,7 @@ const char *gdu_device_drive_get_wwn (GduDevice *device);
- const char *gdu_device_drive_get_connection_interface (GduDevice *device);
- guint64 gdu_device_drive_get_connection_speed (GduDevice *device);
- char **gdu_device_drive_get_media_compatibility (GduDevice *device);
-+const gchar *gdu_device_get_automount_hint(GduDevice *device);
- const char *gdu_device_drive_get_media (GduDevice *device);
- gboolean gdu_device_drive_get_is_media_ejectable (GduDevice *device);
- gboolean gdu_device_drive_get_requires_eject (GduDevice *device);
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/0002-Require-libnotify-0.6.1.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/0002-Require-libnotify-0.6.1.patch
deleted file mode 100644
index 0bc9707..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/0002-Require-libnotify-0.6.1.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From f8dea8dd411cba10a54ec083c3d5c9d641ec36c0 Mon Sep 17 00:00:00 2001
-From: William Jon McCann <jmccann@redhat.com>
-Date: Tue, 12 Oct 2010 00:12:49 -0400
-Subject: [PATCH] Require libnotify 0.6.1
-
-https://bugzilla.gnome.org/show_bug.cgi?id=631940
-
-Upstream-Status: Backport [1]
-
-[1] https://git.gnome.org/browse/gnome-disk-utility/commit/?id=f8dea8dd411cba10a54ec083c3d5c9d641ec36c0
-
-Signed-off-by: David Zeuthen <davidz@redhat.com>
----
- configure.ac                         | 2 +-
- src/notification/notification-main.c | 5 +----
- 2 files changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c61212e..3790fcf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -128,7 +128,7 @@ DBUS_GLIB_REQUIRED=0.74
- GNOME_KEYRING_REQUIRED=2.22
- GTK2_REQUIRED=2.20.0
- UNIQUE_REQUIRED=1.0
--LIBNOTIFY_REQUIRED=0.3.0
-+LIBNOTIFY_REQUIRED=0.6.1
- NAUTILUS_REQUIRED=2.24.0
- AVAHI_UI_REQUIRED=0.6.25
- 
-diff --git a/src/notification/notification-main.c b/src/notification/notification-main.c
-index 18e9672..b6a713f 100644
---- a/src/notification/notification-main.c
-+++ b/src/notification/notification-main.c
-@@ -535,10 +535,7 @@ update_status_icon (NotificationData *data)
-                     _("A hard disk may be failing"),
-                     /* Translators: This is used as the text of the notification*/
-                     _("One or more hard disks report health problems. Click the icon to get more information."),
--                    "gtk-dialog-warning",
--                    NULL);
--                notify_notification_attach_to_status_icon (data->ata_smart_notification,
--                                                           data->status_icon);
-+                    "gtk-dialog-warning");
-                 notify_notification_set_urgency (data->ata_smart_notification, NOTIFY_URGENCY_CRITICAL);
-                 notify_notification_set_timeout (data->ata_smart_notification, NOTIFY_EXPIRES_NEVER);
-                 show_notification (data);
--- 
-2.1.0
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/disable-scrollkeeper.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/disable-scrollkeeper.patch
deleted file mode 100644
index f36942d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/disable-scrollkeeper.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-Subject: Disable scrollkeeper-config not found message
-Upstream-Status: Not-Applicable
-
-If scrollkeeper-config isn't found, configure fails with an error.
-Fix that by commenting out the check.
-
-Signed-Off-By: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-
-
-Index: gnome-disk-utility-2.32.0/configure.ac
-===================================================================
---- gnome-disk-utility-2.32.0.orig/configure.ac	2010-09-15 19:07:25.000000000 +0400
-+++ gnome-disk-utility-2.32.0/configure.ac	2011-08-20 01:29:48.000000000 +0400
-@@ -188,9 +188,9 @@
- # *************
-
- AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
--if test x$SCROLLKEEPER_CONFIG = xno; then
--  AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package)
--fi
-+dnl if test x$SCROLLKEEPER_CONFIG = xno; then
-+dnl  AC_MSG_ERROR([Couldn't find scrollkeeper-config, please install the scrollkeeper package])
-+dnl fi
-
- # ********************
- # Internationalization
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/fix-dbus-interfaces.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/fix-dbus-interfaces.patch
deleted file mode 100644
index 6ba3979..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/fix-dbus-interfaces.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Index: gnome-disk-utility-2.32.0/src/gdu/Makefile.am
-===================================================================
---- gnome-disk-utility-2.32.0.orig/src/gdu/Makefile.am	2011-08-20 01:59:16.000000000 +0400
-+++ gnome-disk-utility-2.32.0/src/gdu/Makefile.am	2011-08-20 02:08:18.000000000 +0400
-@@ -14,20 +14,20 @@
- gdu-marshal.c: gdu-marshal.list
-	echo "#include \"gdu-marshal.h\"" > $@ && glib-genmarshal $< --prefix=gdu_marshal --body >> $@
-
--udisks-daemon-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.xml Makefile.am
--	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-daemon-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.xml
-+udisks-daemon-glue.h: $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.xml Makefile.am
-+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-daemon-glue.h $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.xml
-
--udisks-device-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Device.xml Makefile.am
--	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-device-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Device.xml
-+udisks-device-glue.h: $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Device.xml Makefile.am
-+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-device-glue.h $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Device.xml
-
--udisks-adapter-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Adapter.xml Makefile.am
--	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-adapter-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Adapter.xml
-+udisks-adapter-glue.h: $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Adapter.xml Makefile.am
-+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-adapter-glue.h $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Adapter.xml
-
--udisks-expander-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Expander.xml Makefile.am
--	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-expander-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Expander.xml
-+udisks-expander-glue.h: $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Expander.xml Makefile.am
-+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-expander-glue.h $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Expander.xml
-
--udisks-port-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Port.xml Makefile.am
--	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-port-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Port.xml
-+udisks-port-glue.h: $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Port.xml Makefile.am
-+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-port-glue.h $(PKG_CONFIG_SYSROOT_DIR)/usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Port.xml
-
- lib_LTLIBRARIES=libgdu.la
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/sysrooted-pkg-config.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/sysrooted-pkg-config.patch
deleted file mode 100644
index 48e63b1..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility/sysrooted-pkg-config.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-In cross environment we have to prepend the sysroot to the path found by
-pkgconfig since the path returned from pkgconfig does not have sysroot prefixed
-it ends up using the files from host system. Now usually people have gnome installed
-so the build succeeds but if you dont have gnome installed on build host then
-it wont find the files on host system and packages using gnome-doc-utils wont
-compile.
-
-This should work ok with non sysrooted builds too since in those cases PKG_CONFIG_SYSROOT_DIR
-will be empty
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gnome-disk-utility-2.32.0/gnome-doc-utils.make
-===================================================================
---- gnome-disk-utility-2.32.0.orig/gnome-doc-utils.make	2010-09-15 08:27:46.000000000 -0700
-+++ gnome-disk-utility-2.32.0/gnome-doc-utils.make	2011-09-25 16:04:30.693795591 -0700
-@@ -133,12 +133,12 @@
- _xml2po ?= `which xml2po`
- _xml2po_mode = $(if $(DOC_ID),mallard,docbook)
- 
--_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
--_db2omf  ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
--_malrng  ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils`
--_chunks  ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
--_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
--_ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl
-+_db2html ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2html gnome-doc-utils`
-+_db2omf  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
-+_malrng  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable malrng gnome-doc-utils`
-+_chunks  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
-+_credits ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
-+_ids ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl
- 
- if ENABLE_SK
- _ENABLE_SK = true
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_2.32.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_2.32.0.bb
deleted file mode 100644
index 55a589c..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_2.32.0.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "GNOME disk utility"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9115d11797a5e6b746b4e9b90194564"
-
-DEPENDS = "glib-2.0 gtk+ libnotify libunique udisks avahi-ui \
-    virtual/libx11 libatasmart gnome-doc-utils intltool-native \
-    gnome-common-native libgnome-keyring dbus-glib-native \
-"
-
-PR = "r4"
-
-inherit gnomebase gtk-icon-cache distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI[archive.md5sum] = "f0366c8baebca0404d190b2d78f3582d"
-SRC_URI[archive.sha256sum] = "03e461b6bda7f773f8018d25fa3213d3073d4dc83a76e6b39d962652f4de6a98"
-GNOME_COMPRESS_TYPE="bz2"
-
-SRC_URI += "\
-    file://disable-scrollkeeper.patch \
-    file://fix-dbus-interfaces.patch \
-    file://sysrooted-pkg-config.patch \
-    file://0001-Add-support-for-DeviceAutomountHint.patch \
-    file://0002-Require-libnotify-0.6.1.patch \
-"
-
-EXTRA_OECONF += "--disable-scrollkeeper"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[nautilus] = "--enable-nautilus,--disable-nautilus,nautilus"
-
-do_configure_prepend() {
-    sed -i -e "s: help : :g" ${S}/Makefile.am
-}
-
-PACKAGES =+ "${PN}-nautilus-extension ${PN}-libs"
-FILES_${PN}-nautilus-extension += "${libdir}/nautilus/extensions-2.0/*.so"
-FILES_${PN}-libs += "${libdir}/libgdu*.so.*"
-FILES_${PN}-dev += "${libdir}/nautilus/extensions-2.0/*.la"
-FILES_${PN}-staticdev += "${libdir}/nautilus/extensions-2.0/*.a"
-FILES_${PN}-dbg += "${libdir}/nautilus/extensions-2.0/.debug"
-
-PNBLACKLIST[gnome-disk-utility] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/132824/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/musl.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/musl.patch
new file mode 100644
index 0000000..050b87a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/musl.patch
@@ -0,0 +1,17 @@
+include sys/select.h for FD_* macros
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: gnome-keyring-2.32.1/pkcs11/rpc-layer/gkm-rpc-daemon-standalone.c
+===================================================================
+--- gnome-keyring-2.32.1.orig/pkcs11/rpc-layer/gkm-rpc-daemon-standalone.c
++++ gnome-keyring-2.32.1/pkcs11/rpc-layer/gkm-rpc-daemon-standalone.c
+@@ -32,6 +32,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/select.h>
+ 
+ #include <dlfcn.h>
+ #include <pthread.h>
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb
index 4ac75cb..fd6ca73 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb
@@ -15,11 +15,15 @@
 
 inherit autotools gnome gtk-doc pkgconfig gsettings
 
-SRC_URI += "file://egg-asn1x.patch"
+SRC_URI += "file://egg-asn1x.patch \
+            file://musl.patch \
+"
 
 DEPENDS = "gtk+ libgcrypt libtasn1 libtasn1-native gconf ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} intltool-native"
 RDEPENDS_${PN} = "libgnome-keyring glib-2.0-utils"
 
+LDFLAGS += "-lgmodule-2.0"
+
 EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam --with-pam-dir=${base_libdir}/security', '--disable-pam', d)}"
 
 SRC_URI[archive.md5sum] = "9a8aa74e03361676f29d6e73155786fc"
@@ -42,4 +46,11 @@
                     ${libdir}/${BPN}/devel/.debug/ \
                     ${base_libdir}/security/.debug/"
 
-PNBLACKLIST[gnome-keyring] ?= "This version conflicts with gcr from oe-core - the recipe will be removed on 2017-09-01 unless the issue is fixed"
+# Make compatible with gcr version 3 or newer by removing
+# org.gnome.crypto.pgp.*, which is the provider for this optional
+# functionality.
+
+do_install_append() {
+	rm ${D}${datadir}/GConf/gsettings/org.gnome.crypto.pgp.convert
+	rm ${D}${datadir}/glib-2.0/schemas/org.gnome.crypto.pgp.gschema.xml
+}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus_2.30.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus_2.30.5.bb
deleted file mode 100644
index d1c9e4d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus_2.30.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "GNOME menus"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-PR = "r1"
-
-DEPENDS = "python libxml2 gconf popt gtk+ intltool-native"
-
-inherit gnomebase pkgconfig python-dir pythonnative gobject-introspection
-
-SRC_URI[archive.md5sum] = "caa6772e63ed5870cf43dc3d354e0624"
-SRC_URI[archive.sha256sum] = "6dcc565006d6e8c2025ae83ab1f82edf6bd04d61c804c0dc9bf5ea50629c4caa"
-GNOME_COMPRESS_TYPE="bz2"
-
-do_configure_append () {
-
-    # this expands to native-pthon which we don't want.
-    sed -i 's:\@PYTHON\@:/usr/bin/env python:' ${S}/simple-editor/gmenu-simple-editor.in
-
-}
-PACKAGES += "${PN}-python ${PN}-python-staticdev"
-FILES_${PN} += "${datadir}/desktop-directories/"
-FILES_${PN}-python-staticdev = "${PYTHON_SITEPACKAGES_DIR}/gmenu.a ${PYTHON_SITEPACKAGES_DIR}/gmenu.la"
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/gmenu.so ${PYTHON_SITEPACKAGES_DIR}/GMenuSimpleEditor "
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/*/.debug \
-                    ${PYTHON_SITEPACKAGES_DIR}/.debug"
-
-# http://errors.yoctoproject.org/Errors/Details/81001/
-PNBLACKLIST[gnome-menus] ?= "BROKEN: fails to build because of python + conflicts with gnome-menu3 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/0001-Add-gnome-doc-utils.make.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/0001-Add-gnome-doc-utils.make.patch
deleted file mode 100644
index fdcccb9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/0001-Add-gnome-doc-utils.make.patch
+++ /dev/null
@@ -1,730 +0,0 @@
-From 7345730ac882ee5a493254e5cf9162c96c648ef2 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 17 May 2016 14:40:33 +0300
-Subject: [PATCH] Add gnome-doc-utils.make
-
-Since the sources are taken from git, the file is absent
-(and is installed by tools from gnome-doc-utils which
-are no longer provided).
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- gnome-doc-utils.make | 706 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 706 insertions(+)
- create mode 100644 gnome-doc-utils.make
-
-diff --git a/gnome-doc-utils.make b/gnome-doc-utils.make
-new file mode 100644
-index 0000000..b2e0fa1
---- /dev/null
-+++ b/gnome-doc-utils.make
-@@ -0,0 +1,706 @@
-+# gnome-doc-utils.make - make magic for building documentation
-+# Copyright (C) 2004-2005 Shaun McCance <shaunm@gnome.org>
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software Foundation,
-+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+#
-+# As a special exception to the GNU General Public License, if you
-+# distribute this file as part of a program that contains a
-+# configuration script generated by Autoconf, you may include it under
-+# the same distribution terms that you use for the rest of that program.
-+
-+################################################################################
-+## @@ Generating Header Files
-+
-+## @ DOC_H_FILE
-+## The name of the header file to generate
-+DOC_H_FILE ?=
-+
-+## @ DOC_H_DOCS
-+## The input DocBook files for generating the header file
-+DOC_H_DOCS ?=
-+
-+$(DOC_H_FILE): $(DOC_H_DOCS);
-+	@rm -f $@.tmp; touch $@.tmp;
-+	echo 'const gchar* documentation_credits[] = {' >> $@.tmp
-+	list='$(DOC_H_DOCS)'; for doc in $$list; do \
-+	  xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
-+	  if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
-+	  xsltproc -nonet --path "$$xmlpath" $(_credits) $$doc; \
-+	done | sort | uniq \
-+	  | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \
-+	  | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp
-+	echo '	NULL' >> $@.tmp
-+	echo '};' >> $@.tmp
-+	echo >> $@.tmp
-+	list='$(DOC_H_DOCS)'; for doc in $$list; do \
-+	  xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
-+	  if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
-+	  docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \
-+	    | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \
-+	  echo $$xmlpath; \
-+	  ids=`xsltproc -nonet --xinclude --path "$$xmlpath" $(_ids) $$doc`; \
-+	  for id in $$ids; do \
-+	    echo '#define HELP_'`echo $$docid`'_'`echo $$id \
-+	      | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \
-+	  done; \
-+	  echo >> $@.tmp; \
-+	done;
-+	cp $@.tmp $@ && rm -f $@.tmp
-+
-+dist-check-gdu:
-+if !HAVE_GNOME_DOC_UTILS
-+	@echo "*** GNOME Doc Utils must be installed in order to make dist"
-+	@false
-+endif
-+
-+.PHONY: dist-doc-header
-+dist-doc-header: $(DOC_H_FILE)
-+	@if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \
-+	echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \
-+	$(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)";
-+
-+doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header)
-+
-+.PHONY: clean-doc-header
-+_clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header)
-+clean-local: $(_clean_doc_header)
-+distclean-local: $(_clean_doc_header)
-+mostlyclean-local: $(_clean_doc_header)
-+maintainer-clean-local: $(_clean_doc_header)
-+clean-doc-header:
-+	rm -f $(DOC_H_FILE)
-+
-+all: $(DOC_H_FILE)
-+
-+
-+################################################################################
-+## @@ Generating Documentation Files
-+
-+## @ DOC_MODULE
-+## The name of the document being built
-+DOC_MODULE ?=
-+
-+## @ DOC_ID
-+## The unique identifier for a Mallard document
-+DOC_ID ?=
-+
-+## @ DOC_PAGES
-+## Page files in a Mallard document
-+DOC_PAGES ?=
-+
-+## @ DOC_ENTITIES
-+## Files included with a SYSTEM entity
-+DOC_ENTITIES ?=
-+
-+## @ DOC_INCLUDES
-+## Files included with XInclude
-+DOC_INCLUDES ?=
-+
-+## @ DOC_FIGURES
-+## Figures and other external data
-+DOC_FIGURES ?=
-+
-+## @ DOC_FORMATS
-+## The default formats to be built and installed
-+DOC_FORMATS ?= docbook
-+_DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS))
-+
-+## @ DOC_LINGUAS
-+## The languages this document is translated into
-+DOC_LINGUAS ?=
-+_DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),		\
-+	$(filter $(LINGUAS),$(DOC_LINGUAS)),					\
-+	$(DOC_LINGUAS))
-+
-+_DOC_ABS_SRCDIR = @abs_srcdir@
-+
-+
-+################################################################################
-+## Variables for Bootstrapping
-+
-+_xml2po ?= `which xml2po`
-+_xml2po_mode = $(if $(DOC_ID),mallard,docbook)
-+
-+_db2html ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2html gnome-doc-utils`
-+_db2omf  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
-+_chunks  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
-+_credits ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
-+_ids ?= ${PKG_CONFIG_SYSROOT_DIR}$(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
-+
-+if ENABLE_SK
-+_ENABLE_SK = true
-+_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir`
-+_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir`
-+_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml
-+endif
-+
-+
-+################################################################################
-+## Support for automake silent-rules
-+GDU_V_XML2PO=$(GDU__v_XML2PO_$(V))
-+GDU__v_XML2PO_=$(GDU__v_XML2PO_$(AM_DEFAULT_VERBOSITY))
-+GDU__v_XML2PO_0=@echo "  XML2PO" $@;
-+
-+GDU_V_MSGFMT=$(GDU__v_MSGFMT_$(V))
-+GDU__v_MSGFMT_=$(GDU__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
-+GDU__v_MSGFMT_0=@echo "  MSGFMT" $@;
-+
-+GDU_V_DB2OMF=$(GDU__v_DB2OMF_$(V))
-+GDU__v_DB2OMF_=$(GDU__v_DB2OMF_$(AM_DEFAULT_VERBOSITY))
-+GDU__v_DB2OMF_0=@echo "  DB2OMF" $@;
-+
-+GDU_V_DB2HTM=$(GDU__v_DB2HTM_$(V))
-+GDU__v_DB2HTM_=$(GDU__v_DB2HTM_$(AM_DEFAULT_VERBOSITY))
-+GDU__v_DB2HTM_0=@echo "  DB2HTM" $@;
-+
-+################################################################################
-+## @@ Rules for OMF Files
-+
-+db2omf_args =									\
-+	--stringparam db2omf.basename $(DOC_MODULE)				\
-+	--stringparam db2omf.format $(3)					\
-+	--stringparam db2omf.dtd						\
-+	$(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 		\
-+		| sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/')			\
-+	--stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2)))	\
-+	--stringparam db2omf.omf_dir "$(OMF_DIR)"				\
-+	--stringparam db2omf.help_dir "$(HELP_DIR)"				\
-+	--stringparam db2omf.omf_in "$(_DOC_OMF_IN)"				\
-+	$(if $(_ENABLE_SK),							\
-+	  --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)")		\
-+	$(_db2omf) $(2)
-+
-+## @ _DOC_OMF_IN
-+## The OMF input file
-+_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in))
-+
-+## @ _DOC_OMF_DB
-+## The OMF files for DocBook output
-+_DOC_OMF_DB = $(if $(_DOC_OMF_IN),						\
-+	$(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf))
-+
-+$(_DOC_OMF_DB) : $(_DOC_OMF_IN)
-+$(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml
-+	@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {	\
-+	  echo "The file '$(_skcontentslist)' does not exist." >&2;		\
-+	  echo "Please check your ScrollKeeper installation." >&2;		\
-+	  exit 1; }
-+	$(GDU_V_DB2OMF)xsltproc -nonet -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; }
-+
-+## @ _DOC_OMF_HTML
-+## The OMF files for HTML output
-+_DOC_OMF_HTML = $(if $(_DOC_OMF_IN),						\
-+	$(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf))
-+
-+$(_DOC_OMF_HTML) : $(_DOC_OMF_IN)
-+$(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml
-+if ENABLE_SK
-+	@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {	\
-+	  echo "The file '$(_skcontentslist)' does not exist" >&2;		\
-+	  echo "Please check your ScrollKeeper installation." >&2;		\
-+	  exit 1; }
-+endif
-+	$(GDU_V_DB2OMF)xsltproc -nonet -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; }
-+
-+## @ _DOC_OMF_ALL
-+## All OMF output files to be built
-+# FIXME
-+_DOC_OMF_ALL =									\
-+	$(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB))		\
-+	$(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML))
-+
-+.PHONY: omf
-+omf: $(_DOC_OMF_ALL)
-+
-+
-+################################################################################
-+## @@ C Locale Documents
-+
-+## @ _DOC_C_MODULE
-+## The top-level documentation file in the C locale
-+_DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml)
-+
-+## @ _DOC_C_PAGES
-+## Page files in a Mallard document in the C locale
-+_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page))
-+
-+## @ _DOC_C_ENTITIES
-+## Files included with a SYSTEM entity in the C locale
-+_DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent))
-+
-+## @ _DOC_C_XINCLUDES
-+## Files included with XInclude in the C locale
-+_DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc))
-+
-+## @ _DOC_C_DOCS
-+## All documentation files in the C locale
-+_DOC_C_DOCS =								\
-+	$(_DOC_C_ENTITIES)	$(_DOC_C_INCLUDES)			\
-+	$(_DOC_C_PAGES)		$(_DOC_C_MODULE)
-+
-+## @ _DOC_C_DOCS_NOENT
-+## All documentation files in the C locale,
-+## except files included with a SYSTEM entity
-+_DOC_C_DOCS_NOENT =							\
-+	$(_DOC_C_MODULE)	$(_DOC_C_INCLUDES)			\
-+	$(_DOC_C_PAGES)
-+
-+## @ _DOC_C_FIGURES
-+## All figures and other external data in the C locale
-+_DOC_C_FIGURES = $(if $(DOC_FIGURES),					\
-+	$(foreach fig,$(DOC_FIGURES),C/$(fig)),				\
-+	$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png)))
-+
-+## @ _DOC_C_HTML
-+## All HTML documentation in the C locale
-+# FIXME: probably have to shell escape to determine the file names
-+_DOC_C_HTML = $(foreach f,						\
-+	$(shell xsltproc -nonet --xinclude 					\
-+	  --stringparam db.chunk.basename "$(DOC_MODULE)"		\
-+	  $(_chunks) "C/$(DOC_MODULE).xml"),				\
-+	C/$(f).xhtml)
-+
-+###############################################################################
-+## @@ Other Locale Documentation
-+
-+## @ _DOC_POFILES
-+## The .po files used for translating the document
-+_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID),					\
-+	$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po))
-+
-+.PHONY: po
-+po: $(_DOC_POFILES)
-+
-+## @ _DOC_MOFILES
-+## The .mo files used for translating the document
-+_DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES))
-+
-+.PHONY: mo
-+mo: $(_DOC_MOFILES)
-+
-+## @ _DOC_LC_MODULES
-+## The top-level documentation files in all other locales
-+_DOC_LC_MODULES = $(if $(DOC_MODULE),						\
-+	$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml))
-+
-+## @ _DOC_LC_PAGES
-+## Page files in a Mallard document in all other locales
-+_DOC_LC_PAGES =									\
-+	$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES),	\
-+		$(lc)/$(notdir $(page)) ))
-+
-+## @ _DOC_LC_XINCLUDES
-+## Files included with XInclude in all other locales
-+_DOC_LC_INCLUDES =								\
-+	$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES),	\
-+		$(lc)/$(notdir $(inc)) ))
-+
-+## @ _DOC_LC_HTML
-+## All HTML documentation in all other locales
-+# FIXME: probably have to shell escape to determine the file names
-+_DOC_LC_HTML =									\
-+	$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML),		\
-+		$(lc)/$(notdir $(doc)) ))
-+
-+## @ _DOC_LC_DOCS
-+## All documentation files in all other locales
-+_DOC_LC_DOCS =									\
-+	$(_DOC_LC_MODULES)	$(_DOC_LC_INCLUDES)	$(_DOC_LC_PAGES)	\
-+	$(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML))
-+
-+## @ _DOC_LC_FIGURES
-+## All figures and other external data in all other locales
-+_DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS),				\
-+	$(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) )
-+
-+_DOC_SRC_FIGURES =								\
-+	$(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS),	\
-+		$(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) ))
-+
-+$(_DOC_POFILES):
-+	@if ! test -d $(dir $@); then \
-+	  echo "mkdir $(dir $@)"; \
-+	  mkdir "$(dir $@)"; \
-+	fi
-+	@if test ! -f $@ -a -f $(srcdir)/$@; then \
-+	  echo "cp $(srcdir)/$@ $@"; \
-+	  cp "$(srcdir)/$@" "$@"; \
-+	fi;
-+	@docs=; \
-+	list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
-+	  docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \
-+	done; \
-+	if ! test -f $@; then \
-+	  echo "(cd $(dir $@) && \
-+	    $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
-+	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
-+	  (cd $(dir $@) && \
-+	    $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
-+	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
-+	else \
-+	  echo "(cd $(dir $@) && \
-+	    $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \
-+	  (cd $(dir $@) && \
-+	    $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \
-+	fi
-+
-+$(_DOC_MOFILES): %.mo: %.po
-+	$(AM_V_at)if ! test -d $(dir $@); then mkdir "$(dir $@)"; fi
-+	$(GDU_V_MSGFMT)msgfmt -o $@ $<
-+
-+# FIXME: fix the dependancy
-+# FIXME: hook xml2po up
-+$(_DOC_LC_DOCS) : $(_DOC_MOFILES)
-+$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
-+	$(AM_V_at)if ! test -d $(dir $@); then mkdir $(dir $@); fi
-+	$(GDU_V_XML2PO)if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \
-+	mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \
-+	if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \
-+	(cd $(dir $@) && \
-+	  $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \
-+	    "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
-+	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
-+
-+## @ _DOC_POT
-+## A pot file
-+_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot,$(if $(DOC_ID),$(DOC_ID).pot))
-+.PHONY: pot
-+pot: $(_DOC_POT)
-+$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
-+	$(GDU_V_XML2PO)$(_xml2po) -m $(_xml2po_mode) -e -o $@ $^
-+
-+
-+################################################################################
-+## @@ All Documentation
-+
-+## @ _DOC_HTML_ALL
-+## All HTML documentation, only if it's built
-+_DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \
-+	$(_DOC_C_HTML) $(_DOC_LC_HTML))
-+
-+_DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml)
-+
-+$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
-+	$(GDU_V_DB2HTM)xsltproc -nonet -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@)
-+
-+
-+################################################################################
-+## All
-+
-+all:							\
-+	$(_DOC_C_DOCS)		$(_DOC_LC_DOCS)		\
-+	$(_DOC_OMF_ALL)		$(_DOC_DSK_ALL)		\
-+	$(_DOC_HTML_ALL)	$(_DOC_POFILES)
-+
-+
-+################################################################################
-+## Clean
-+
-+.PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
-+
-+clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
-+clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
-+clean-doc-lc:
-+	rm -f $(_DOC_LC_DOCS)
-+	rm -f $(_DOC_MOFILES)
-+	@list='$(_DOC_POFILES)'; for po in $$list; do \
-+	  if ! test "$$po" -ef "$(srcdir)/$$po"; then \
-+	    echo "rm -f $$po"; \
-+	    rm -f "$$po"; \
-+	  fi; \
-+	done
-+#	.xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x
-+	@for lc in C $(_DOC_REAL_LINGUAS); do \
-+	  if test -f "$$lc/.xml2po.mo"; then \
-+	    echo "rm -f $$lc/.xml2po.mo"; \
-+	    rm -f "$$lc/.xml2po.mo"; \
-+	  fi; \
-+	done
-+clean-doc-dir: clean-doc-lc
-+	@for lc in C $(_DOC_REAL_LINGUAS); do \
-+	  for dir in `find $$lc -depth -type d`; do \
-+	    if ! test $$dir -ef $(srcdir)/$$dir; then \
-+	      echo "rmdir $$dir"; \
-+	      rmdir "$$dir"; \
-+	   fi; \
-+	  done; \
-+	done
-+
-+_clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf)
-+_clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk)
-+_clean_lc  = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc)
-+_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir)
-+
-+clean-local:						\
-+	$(_clean_omf)		$(_clean_dsk)		\
-+	$(_clean_lc)		$(_clean_dir)
-+distclean-local:					\
-+	$(_clean_omf)		$(_clean_dsk)		\
-+	$(_clean_lc)		$(_clean_dir)
-+mostlyclean-local:					\
-+	$(_clean_omf)		$(_clean_dsk)		\
-+	$(_clean_lc)		$(_clean_dir)
-+maintainer-clean-local:					\
-+	$(_clean_omf)		$(_clean_dsk)		\
-+	$(_clean_lc)		$(_clean_dir)
-+
-+
-+
-+################################################################################
-+## Dist
-+
-+.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk
-+doc-dist-hook: 						\
-+	$(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs)	\
-+	$(if $(_DOC_C_FIGURES),dist-doc-figs)		\
-+	$(if $(_DOC_OMF_IN),dist-doc-omf)
-+#	$(if $(_DOC_DSK_IN),dist-doc-dsk)
-+
-+dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
-+	@for lc in C $(_DOC_REAL_LINGUAS); do \
-+	  echo " $(mkinstalldirs) $(distdir)/$$lc"; \
-+	  $(mkinstalldirs) "$(distdir)/$$lc"; \
-+	done
-+	@list='$(_DOC_C_DOCS)'; \
-+	for doc in $$list; do \
-+	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
-+	    docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
-+	    if ! test -d "$(distdir)/$$docdir"; then \
-+	      echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
-+	      $(mkinstalldirs) "$(distdir)/$$docdir"; \
-+	    fi; \
-+	  echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
-+	  $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
-+	done
-+	@list='$(_DOC_LC_DOCS)'; \
-+	for doc in $$list; do \
-+	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
-+	    docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
-+	    if ! test -d "$(distdir)/$$docdir"; then \
-+	      echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
-+	      $(mkinstalldirs) "$(distdir)/$$docdir"; \
-+	    fi; \
-+	  echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
-+	  $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
-+	done
-+	@list='$(_DOC_POFILES)'; \
-+	for doc in $$list; do \
-+	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
-+	    docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
-+	    if ! test -d "$(distdir)/$$docdir"; then \
-+	      echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
-+	      $(mkinstalldirs) "$(distdir)/$$docdir"; \
-+	    fi; \
-+	  echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
-+	  $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
-+	done
-+
-+dist-doc-figs: $(_DOC_SRC_FIGURES)
-+	@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
-+	for fig in $$list; do \
-+	  if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
-+	  if test -f "$$d$$fig"; then \
-+	    figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
-+	    if ! test -d "$(distdir)/$$figdir"; then \
-+	      echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
-+	      $(mkinstalldirs) "$(distdir)/$$figdir"; \
-+	    fi; \
-+	    echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
-+	    $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
-+	  fi; \
-+	done;
-+
-+dist-doc-omf:
-+	@if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
-+	echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
-+	$(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
-+
-+dist-doc-dsk:
-+	@if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
-+	echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
-+	$(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
-+
-+
-+
-+################################################################################
-+## Check
-+
-+.PHONY: check-doc-docs check-doc-omf
-+check:							\
-+	$(if $(DOC_MODULE),check-doc-docs)		\
-+	$(if $(DOC_ID),check-doc-pages)			\
-+	$(if $(_DOC_OMF_IN),check-doc-omf)
-+
-+check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
-+	@for lc in C $(_DOC_REAL_LINGUAS); do \
-+	  if test -f "$$lc"; \
-+	    then d=; \
-+	    xmlpath="$$lc"; \
-+	  else \
-+	    d="$(srcdir)/"; \
-+	    xmlpath="$$lc:$(srcdir)/$$lc"; \
-+	  fi; \
-+	  echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
-+	  xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
-+	done
-+
-+check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES)
-+	for lc in C $(_DOC_REAL_LINGUAS); do \
-+	  if test -f "$$lc"; \
-+	    then d=; \
-+	    xmlpath="$$lc"; \
-+	  else \
-+	    d="$(srcdir)/"; \
-+	    xmlpath="$$lc:$(srcdir)/$$lc"; \
-+	  fi; \
-+	  for page in $(DOC_PAGES); do \
-+	    echo "xmllint --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
-+	    xmllint --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
-+	  done; \
-+	done
-+
-+check-doc-omf: $(_DOC_OMF_ALL)
-+	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
-+	  echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
-+	  xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
-+	done
-+
-+
-+
-+################################################################################
-+## Install
-+
-+.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
-+
-+_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE))
-+
-+install-data-local:					\
-+	$(if $(DOC_MODULE)$(DOC_ID),install-doc-docs)	\
-+	$(if $(_DOC_HTML_ALL),install-doc-html)		\
-+	$(if $(_DOC_C_FIGURES),install-doc-figs)	\
-+	$(if $(_DOC_OMF_IN),install-doc-omf)
-+#	$(if $(_DOC_DSK_IN),install-doc-dsk)
-+
-+install-doc-docs:
-+	@for lc in C $(_DOC_REAL_LINGUAS); do \
-+	  echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \
-+	  $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \
-+	done
-+	@list='$(_DOC_C_DOCS)'; for doc in $$list; do \
-+	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
-+	  docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
-+	  docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \
-+	  if ! test -d "$$docdir"; then \
-+	    echo "$(mkinstalldirs) $$docdir"; \
-+	    $(mkinstalldirs) "$$docdir"; \
-+	  fi; \
-+	  echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
-+	  $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \
-+	done
-+	@list='$(_DOC_LC_DOCS)'; for doc in $$list; do \
-+	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
-+	  docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
-+	  docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \
-+	  if ! test -d "$$docdir"; then \
-+	    echo "$(mkinstalldirs) $$docdir"; \
-+	    $(mkinstalldirs) "$$docdir"; \
-+	  fi; \
-+	  echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
-+	  $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \
-+	done
-+
-+install-doc-figs:
-+	@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
-+	  for lc in C $(_DOC_REAL_LINGUAS); do \
-+	    figsymlink=false; \
-+	    if test -f "$$lc/$$fig"; then \
-+	      figfile="$$lc/$$fig"; \
-+	    elif test -f "$(srcdir)/$$lc/$$fig"; then \
-+	      figfile="$(srcdir)/$$lc/$$fig"; \
-+	    else \
-+	      figsymlink=true; \
-+	    fi; \
-+	    figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
-+	    figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \
-+	    if ! test -d "$$figdir"; then \
-+	      echo "$(mkinstalldirs) $$figdir"; \
-+	      $(mkinstalldirs) "$$figdir"; \
-+	    fi; \
-+	    figbase=`echo $$fig | sed -e 's/^.*\///'`; \
-+	    if $$figsymlink; then \
-+	      echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \
-+	      ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \
-+	    else \
-+	      echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
-+	      $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
-+	    fi; \
-+	  done; \
-+	done
-+
-+install-doc-html:
-+	echo install-html
-+
-+install-doc-omf:
-+	$(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)
-+	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
-+	  echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
-+	  $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \
-+	done
-+	@if test "x$(_ENABLE_SK)" = "xtrue"; then \
-+	  echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
-+	  scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
-+	fi;
-+
-+install-doc-dsk:
-+	echo install-dsk
-+
-+
-+
-+################################################################################
-+## Uninstall
-+
-+.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
-+uninstall-local:					\
-+	$(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs)	\
-+	$(if $(_DOC_HTML_ALL),uninstall-doc-html)	\
-+	$(if $(_DOC_C_FIGURES),uninstall-doc-figs)	\
-+	$(if $(_DOC_OMF_IN),uninstall-doc-omf)
-+#	$(if $(_DOC_DSK_IN),uninstall-doc-dsk)
-+
-+uninstall-doc-docs:
-+	@list='$(_DOC_C_DOCS)'; for doc in $$list; do \
-+	  echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
-+	  rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
-+	done
-+	@list='$(_DOC_LC_DOCS)'; for doc in $$list; do \
-+	  echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
-+	  rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
-+	done
-+
-+uninstall-doc-figs:
-+	@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
-+	  echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
-+	  rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
-+	done;
-+
-+uninstall-doc-omf:
-+	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
-+	  if test "x$(_ENABLE_SK)" = "xtrue"; then \
-+	    echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
-+	    scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
-+	  fi; \
-+	  echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
-+	  rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
-+	done
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/0001-Fix-build-with-gcc-5.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/0001-Fix-build-with-gcc-5.patch
deleted file mode 100644
index 6b7fc5b..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/0001-Fix-build-with-gcc-5.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 20810fcf329c6e0b48b8e7602565ccc70c7ce62b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 10 May 2015 02:10:59 -0700
-Subject: [PATCH] Fix build with gcc 5
-
-cc1: error: ../../gnome-panel/libpanel-applets-private: No such file or
-directory [-Werror=missing-include-dirs]
-cc1: error: ../../gnome-panel/libpanel-applets-private: No such file or
-directory [-Werror=missing-include-dirs]
-cc1: error: ../../gnome-panel/libpanel-applets-private: No such file or
-directory [-Werror=missing-include-dirs]
-cc1: some warnings being treated as errors
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gnome-panel/libpanel-applet-private/Makefile.am | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/gnome-panel/libpanel-applet-private/Makefile.am b/gnome-panel/libpanel-applet-private/Makefile.am
-index f12dee8..d556f12 100644
---- a/gnome-panel/libpanel-applet-private/Makefile.am
-+++ b/gnome-panel/libpanel-applet-private/Makefile.am
-@@ -8,7 +8,6 @@ AM_CPPFLAGS =							\
- 	-I$(srcdir)						\
- 	-I$(top_srcdir)/gnome-panel				\
- 	-I$(top_builddir)/gnome-panel				\
--	-I$(top_builddir)/gnome-panel/libpanel-applets-private	\
- 	-I$(top_builddir)/gnome-panel/libpanel-util		\
- 	-DDATADIR=\""$(datadir)"\"				\
- 	-DPANEL_APPLETS_DIR=\"$(appletsdir)\"			\
--- 
-2.1.4
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/as-needed.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/as-needed.patch
deleted file mode 100644
index 378e3e4..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/as-needed.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c65f1ae3472cfd4cd96fd376b7bbd95fba5eef0a Mon Sep 17 00:00:00 2001
-From: Vincent Untz <vuntz@gnome.org>
-Date: Fri, 27 May 2011 17:00:14 +0000
-Subject: build: Fix build with --as-needed
-
-upstream-status: backport
-
----
-diff --git a/applets/notification_area/Makefile.am b/applets/notification_area/Makefile.am
-index 0afc6c5..9734536 100644
---- a/applets/notification_area/Makefile.am
-+++ b/applets/notification_area/Makefile.am
-@@ -29,17 +29,17 @@ libtray_la_SOURCES =		\
- NOTIFICATION_AREA_SOURCES = main.c main.h
- 
- NOTIFICATION_AREA_LDADD =				\
-+	libtray.la					\
- 	../../libpanel-applet/libpanel-applet-4.la	\
- 	$(X_LIBS)					\
- 	$(NOTIFICATION_AREA_LIBS)			\
--	$(LIBPANEL_APPLET_LIBS)				\
--	libtray.la
-+	$(LIBPANEL_APPLET_LIBS)
- 
- testtray_SOURCES = testtray.c
- testtray_LDADD =			\
-+	libtray.la			\
- 	$(X_LIBS)			\
--	$(NOTIFICATION_AREA_LIBS)	\
--	libtray.la
-+	$(NOTIFICATION_AREA_LIBS)
- 
- if NOTIFICATION_AREA_INPROCESS
- APPLET_IN_PROCESS = true
---
-cgit v0.9
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/idl-sysroot.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/idl-sysroot.patch
deleted file mode 100644
index de4cd84..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel/idl-sysroot.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- /tmp/Makefile.am	2009-10-26 16:53:20.000000000 +0100
-+++ gnome-panel-2.28.0/gnome-panel/Makefile.am	2009-10-26 16:53:51.000000000 +0100
-@@ -43,7 +43,7 @@
- 	$(NULL)
- 
- $(CORBA_SRCLIST): $(top_srcdir)/idl/GNOME_Panel.idl $(ORBIT_IDL)
--	$(AM_V_GEN)$(ORBIT_IDL) -I $(BONOBO_IDLDIR) -I $(BONOBO_ACT_IDLDIR) $(top_srcdir)/idl/GNOME_Panel.idl
-+	$(AM_V_GEN)$(ORBIT_IDL) -I $(SYSROOT)$(BONOBO_IDLDIR) -I $(SYSROOT)$(BONOBO_ACT_IDLDIR) $(top_srcdir)/idl/GNOME_Panel.idl
- 
- BUILT_SOURCES = \
- 	$(CORBA_SRCLIST)	\
---- /tmp/Makefile.am	2009-10-26 16:54:17.000000000 +0100
-+++ gnome-panel-2.28.0/libpanel-applet/Makefile.am	2009-10-26 16:54:34.000000000 +0100
-@@ -45,7 +45,7 @@
- 	GNOME_Panel.h
- 
- $(CORBA_SRCLIST): $(top_srcdir)/idl/GNOME_Panel.idl $(ORBIT_IDL)
--	$(AM_V_GEN)$(ORBIT_IDL) -I $(BONOBO_IDLDIR) -I $(BONOBO_ACT_IDLDIR) $(top_srcdir)/idl/GNOME_Panel.idl
-+	$(AM_V_GEN)$(ORBIT_IDL) -I $(SYSROOT)$(BONOBO_IDLDIR) -I $(SYSROOT)$(BONOBO_ACT_IDLDIR) $(top_srcdir)/idl/GNOME_Panel.idl
- 
- noinst_PROGRAMS = test-bonobo-applet
- 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel3_3.0.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel3_3.0.2.bb
deleted file mode 100644
index d1cfab8..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel3_3.0.2.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "GNOME panel"
-LICENSE = "GPLv2 & LGPLv2 & GFDL-1.1"
-
-BPN = "gnome-panel"
-PR = "r1"
-
-PNBLACKLIST[gnome-panel3] ?= "CONFLICT: depends on libgweather3 which conflicts with libgweather - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-# conflicts with gnome-panel, because they provide the same package
-# http://patches.openembedded.org/patch/43105/
-EXCLUDE_FROM_WORLD = "1"
-DEFAULT_PREFERENCE = "-1"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING-DOCS;md5=c9211dab3ae61e580f48432020784324 \
-                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SECTION = "x11/gnome"
-
-DEPENDS = "gnome-doc-utils-native gtk+3 dconf gconf glib-2.0 gnome-desktop3 gtk+ pango libwnck3 gnome-menus cairo libgweather3 dbus-glib librsvg libcanberra"
-
-inherit gtk-doc gnome gettext pkgconfig
-
-SRC_URI += "file://as-needed.patch "
-
-SRC_URI[archive.md5sum] = "0f2f644dc4081b72f6df7a65282af7c6"
-SRC_URI[archive.sha256sum] = "25db8ec026c4bf47f0ef5cc7e2712f2aad175bd7fb8e4952ef5f8b200f17f196"
-
-EXTRA_OECONF = "--disable-scrollkeeper --disable-eds --enable-bonobo=no --with-in-process-applets=none"
-
-do_configure_prepend() {
-    gnome-doc-prepare --automake
-    sed -i -e s:help:: ${S}/Makefile.am
-}
-
-pkg_postinst_${PN}_append () {
-    gconftool-2 --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults \
-        --direct --load /etc/gconf/schemas/panel-default-setup.entries
-}
-
-PACKAGES =+ "libpanel-applet"
-FILES_libpanel-applet = "${libdir}/libpanel-applet-3.so.*"
-
-FILES_${PN} =+ "${datadir}/gnome* \
-                ${datadir}/dbus-1 \
-                ${datadir}/icons \
-                ${datadir}/PolicyKit \
-                ${libdir}/bonobo \
-"
-
-PNBLACKLIST[gnome-panel3] ?= "Depends on broken gnome-menus - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel_2.32.1.bb
deleted file mode 100644
index 7cb8b9d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-panel/gnome-panel_2.32.1.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "GNOME panel"
-LICENSE = "GPL-2.0 & LGPL-2.0 & GFDL-1.1"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING-DOCS;md5=c9211dab3ae61e580f48432020784324 \
-                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SECTION = "x11/gnome"
-
-PR = "r7"
-
-DEPENDS = "gnome-doc-utils gconf glib-2.0 gnome-desktop gtk+ \
-    pango libwnck gnome-menus cairo libgweather dbus dbus-glib \
-    librsvg libcanberra \
-"
-RDEPENDS_${PN} = "python"
-
-inherit gtk-doc gnome autotools-brokensep gettext pkgconfig gconf gobject-introspection
-
-SRCREV = "8292bd2b8a36df7eed3c760899400790cde68590"
-SRC_URI = "git://git.gnome.org/gnome-panel;branch=gnome-2-32 \
-           file://0001-Fix-build-with-gcc-5.patch \
-           file://0001-Add-gnome-doc-utils.make.patch \
-"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = "--disable-scrollkeeper --disable-eds --enable-bonobo=no --with-in-process-applets=none"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[networkmanager] = "--enable-network-manager,--disable-network-manager,networkmanager"
-
-do_configure_prepend() {
-    sed -i -e s:help:: ${S}/Makefile.am
-    sed -i -e s:^#!@PYTHON@:#!/usr/bin/python: ${S}/gnome-panel/gnome-panel-add.in
-}
-
-PACKAGES =+ "libpanel-applet"
-FILES_libpanel-applet = "${libdir}/libpanel-applet-*.so.*"
-
-FILES_${PN} =+ "${datadir}/gnome* \
-                ${datadir}/dbus-1 \
-                ${datadir}/icons \
-                ${datadir}/PolicyKit \
-                ${libdir}/bonobo \
-"
-
-PNBLACKLIST[gnome-panel] ?= "Depends on broken libgweather - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager-2.32.0/0001-Makefile.am-don-t-build-help-man.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager-2.32.0/0001-Makefile.am-don-t-build-help-man.patch
deleted file mode 100644
index d6d49bb..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager-2.32.0/0001-Makefile.am-don-t-build-help-man.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 3ed15a3c6ae4ab94c7e3af306644bb5d7f3fd1fa Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Mon, 29 Apr 2013 13:08:10 +0200
-Subject: [PATCH] Makefile.am: don't build help/man
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-help crashes with:
-
-| xsltproc -o gnome-power-manager-C.omf --stringparam db2omf.basename gnome-power-manager --stringparam db2omf.format 'docbook' --stringparam db2omf.dtd "-//OASIS//DTD DocBook XML V4.3//EN" --stringparam db2omf.lang C --stringparam db2omf.omf_dir "/usr/share/omf" --stringparam db2omf.help_dir "/usr/share/gnome/help" --stringparam db2omf.omf_in "/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gnome-power-manager/2.32.0-r2/gnome-power-manager-2.32.0/help/gnome-power-manager.omf.in"  /home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/sysroots/qemuarm`/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/pkg-config --variable db2omf gnome-doc-utils` C/gnome-power-manager.xml || { rm -f "gnome-power-manager-C.omf"; exit 1; }
-| unable to parse fr/gnome-power-manager.xml
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- Makefile.am |    2 --
- 1 files changed, 0 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 005b8a0..5b9e318 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -5,9 +5,7 @@ SUBDIRS = 						\
- 	src						\
- 	po						\
- 	docs						\
--	man						\
- 	data						\
--	help						\
- 	policy						\
- 	tools
- 
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager-2.32.0/sysrooted-pkg-config.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager-2.32.0/sysrooted-pkg-config.patch
deleted file mode 100644
index f3db7ab..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager-2.32.0/sysrooted-pkg-config.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-In cross environment we have to prepend the sysroot to the path found by
-pkgconfig since the path returned from pkgconfig does not have sysroot prefixed
-it ends up using the files from host system. Now usually people have gnome installed
-so the build succeeds but if you dont have gnome installed on build host then
-it wont find the files on host system and packages using gnome-doc-utils wont
-compile.
-
-This should work ok with non sysrooted builds too since in those cases PKG_CONFIG_SYSROOT_DIR
-will be empty
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gnome-power-manager-2.32.0/gnome-doc-utils.make
-===================================================================
---- gnome-power-manager-2.32.0.orig/gnome-doc-utils.make	2010-01-27 08:28:31.000000000 -0800
-+++ gnome-power-manager-2.32.0/gnome-doc-utils.make	2011-09-25 16:16:04.914813800 -0700
-@@ -124,11 +124,11 @@
- 
- _xml2po ?= `which xml2po`
- 
--_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
--_db2omf  ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
--_chunks  ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
--_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
--_ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl
-+_db2html ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2html gnome-doc-utils`
-+_db2omf  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
-+_chunks  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
-+_credits ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
-+_ids ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl
- 
- if ENABLE_SK
- _ENABLE_SK = true
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager_2.32.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager_2.32.0.bb
deleted file mode 100644
index ec21107..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager_2.32.0.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Power management daemon"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-PR = "r4"
-
-DEPENDS = "glib-2.0 gtk+ gconf libgnome-keyring dbus dbus-glib libnotify libwnck cairo libunique xrandr virtual/libx11 libxrender libcanberra upower gnome-doc-utils"
-RRECOMMENDS_${PN} += "gnome-keyring"
-
-inherit gnome
-
-SRC_URI += " \
-    file://sysrooted-pkg-config.patch \
-    file://0001-Makefile.am-don-t-build-help-man.patch \
-"
-
-SRC_URI[archive.md5sum] = "9a08e85dce3ffb90775f15e3bda4adda"
-SRC_URI[archive.sha256sum] = "17fa301bf7e133285c0e054ae3be2b0f690c48f59b09f67e04d6ed339b330476"
-GNOME_COMPRESS_TYPE="bz2"
-
-EXTRA_OECONF = " --disable-scrollkeeper \
-                 --disable-applets \
-                 --x-includes=${STAGING_INCDIR} \
-                 --x-libraries=${STAGING_LIBDIR} \
-                 --enable-compile-warnings=no \
-                 ac_cv_header_X11_extensions_dpms_h=yes \
-"
-
-do_configure_append() {
-    # Sigh... --enable-compile-warnings=no doesn't actually turn off -Werror
-    for i in $(find ${B} -name "Makefile") ; do
-        sed -i -e s:-Werror::g $i
-    done
-    sed -e "s/libtool --/${TARGET_SYS}-libtool --/" -i ${B}/src/Makefile
-}
-
-PACKAGES =+ "${PN}-applets"
-
-FILES_${PN}-applets = "${bindir}/*applet* \
-    ${libdir}/bonobo/servers \
-    ${datadir}/gnome-2.0/ui \
-"
-
-FILES_${PN} += "${datadir}/icons \
-    ${datadir}/dbus-1 \
-    ${datadir}/gnome/autostart \
-"
-
-FILES_${PN}-doc += "${datadir}/omf \
-    ${datadir}/gnome/help \
-"
-
-# gnome-power-manager-2.32.0/src/gpm-manager.c:488:18: error: too many arguments to function 'notify_notification_new'
-PNBLACKLIST[gnome-power-manager] ?= "BROKEN: not compatible with current libnotify - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-session/gnome-session/use_G_GINT64_FORMAT.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-session/gnome-session/use_G_GINT64_FORMAT.patch
deleted file mode 100644
index b09f8d2..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-session/gnome-session/use_G_GINT64_FORMAT.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-This patch fixes the build errors when building gnome-session for 64bit target using gcc 4.8
-
-| gs-idle-monitor.c: In function 'handle_alarm_notify_event':
-| gs-idle-monitor.c:196:9: error: format '%lld' expects argument of type 'long long int', but argument 5 has type 'gint64' [-Werror=format=]
-|          g_debug ("Watch %d fired, idle time = %lld",
-|          ^
-| gs-idle-monitor.c: In function '_xsync_alarm_set':
-| gs-idle-monitor.c:453:17: error: format '%lld' expects argument of type 'long long int', but argument 4 has type 'gint64' [-Werror=format=]
-|                  g_debug ("GSIdleMonitor: updating alarm for positive transition wait=%lld",
-|                  ^
-| gs-idle-monitor.c:457:17: error: format '%lld' expects argument of type 'long long int', but argument 4 has type 'gint64' [-Werror=format=]
-|                  g_debug ("GSIdleMonitor: creating new alarm for positive transition wait=%lld",
-|                  ^
-| gs-idle-monitor.c:464:17: error: format '%lld' expects argument of type 'long long int', but argument 4 has type 'gint64' [-Werror=format=]
-|                  g_debug ("GSIdleMonitor: updating alarm for negative transition wait=%lld",
-|                  ^
-| gs-idle-monitor.c:468:17: error: format '%lld' expects argument of type 'long long int', but argument 4 has type 'gint64' [-Werror=format=]
-
-Upstream-Status: Unknown
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: gnome-session-2.32.1/gnome-session/gs-idle-monitor.c
-===================================================================
---- gnome-session-2.32.1.orig/gnome-session/gs-idle-monitor.c	2010-11-17 03:17:04.000000000 -0800
-+++ gnome-session-2.32.1/gnome-session/gs-idle-monitor.c	2013-06-11 23:33:12.239960082 -0700
-@@ -193,7 +193,7 @@
-                 return;
-         }
- 
--        g_debug ("Watch %d fired, idle time = %lld",
-+        g_debug ("Watch %d fired, idle time = %" G_GINT64_FORMAT "",
-                  watch->id,
-                  _xsyncvalue_to_int64 (alarm_event->counter_value));
- 
-@@ -450,22 +450,22 @@
- 
-         attr.trigger.test_type = XSyncPositiveTransition;
-         if (watch->xalarm_positive != None) {
--                g_debug ("GSIdleMonitor: updating alarm for positive transition wait=%lld",
-+                g_debug ("GSIdleMonitor: updating alarm for positive transition wait=%" G_GINT64_FORMAT "",
-                          _xsyncvalue_to_int64 (attr.trigger.wait_value));
-                 XSyncChangeAlarm (GDK_DISPLAY (), watch->xalarm_positive, flags, &attr);
-         } else {
--                g_debug ("GSIdleMonitor: creating new alarm for positive transition wait=%lld",
-+                g_debug ("GSIdleMonitor: creating new alarm for positive transition wait=%" G_GINT64_FORMAT "",
-                          _xsyncvalue_to_int64 (attr.trigger.wait_value));
-                 watch->xalarm_positive = XSyncCreateAlarm (GDK_DISPLAY (), flags, &attr);
-         }
- 
-         attr.trigger.test_type = XSyncNegativeTransition;
-         if (watch->xalarm_negative != None) {
--                g_debug ("GSIdleMonitor: updating alarm for negative transition wait=%lld",
-+                g_debug ("GSIdleMonitor: updating alarm for negative transition wait=%" G_GINT64_FORMAT "",
-                          _xsyncvalue_to_int64 (attr.trigger.wait_value));
-                 XSyncChangeAlarm (GDK_DISPLAY (), watch->xalarm_negative, flags, &attr);
-         } else {
--                g_debug ("GSIdleMonitor: creating new alarm for negative transition wait=%lld",
-+                g_debug ("GSIdleMonitor: creating new alarm for negative transition wait=%" G_GINT64_FORMAT "",
-                          _xsyncvalue_to_int64 (attr.trigger.wait_value));
-                 watch->xalarm_negative = XSyncCreateAlarm (GDK_DISPLAY (), flags, &attr);
-         }
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-session/gnome-session_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-session/gnome-session_2.32.1.bb
deleted file mode 100644
index c49f2d3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-session/gnome-session_2.32.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Gnome session manager"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-PR = "r3"
-
-SECTION = "x11/gnome"
-DEPENDS = "libxtst gtk+ glib-2.0 upower dbus-glib gconf pango gdk-pixbuf-native startup-notification"
-
-inherit gnome
-
-SRC_URI += "file://use_G_GINT64_FORMAT.patch"
-
-SRC_URI[archive.md5sum] = "222bad6b446cb19a6b9028ea24538002"
-SRC_URI[archive.sha256sum] = "22d93ce433fcf9c7ce6b5f36dd81f64e692ea0e41faaa0f61159ddac28c3686a"
-GNOME_COMPRESS_TYPE="bz2"
-
-EXTRA_OECONF = " --with-gtk=2.0 ac_cv_path_GCONF_SANITY_CHECK=set --disable-docbook-docs"
-
-do_configure_append() {
-    for i in $(find ${S} -name "Makefile") ; do
-        sed -i -e s:"GCONFTOOL = .*/usr/bin/gconftool-2":"GCONFTOOL = /usr/bin/gconftool-2":g $i
-        sed -i -e s:"GCONF_SANITY_CHECK = set":"GCONF_SANITY_CHECK = /usr/libexec/gconf-sanity-check-2":g $i
-    done
-}
-
-RRECOMMENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-ck-connector', '', d)}"
-FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${datadir}/gnome ${libdir}/gnome-session/helpers"
-FILES_${PN}-dbg += "${libexecdir}/gnome-session/helpers/.debug"
-
-# http://errors.yoctoproject.org/Errors/Details/68621/
-PNBLACKLIST[gnome-session] ?= "BROKEN: fails to build with gcc-6 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-settings-daemon/files/0001-Require-libnotify-0.6.0.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-settings-daemon/files/0001-Require-libnotify-0.6.0.patch
deleted file mode 100644
index 6dd33f3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-settings-daemon/files/0001-Require-libnotify-0.6.0.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From e1ab570b0dce479ba235e5542ea07d1b5bafc4c9 Mon Sep 17 00:00:00 2001
-From: William Jon McCann <jmccann@redhat.com>
-Date: Mon, 11 Oct 2010 23:35:45 -0400
-Subject: [PATCH] Require libnotify 0.6.0
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
-
-Upstream-Status: Backport
-
----
- configure.ac                                      |  2 +-
- plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c |  8 ++------
- plugins/xrandr/gsd-xrandr-manager.c               | 13 +++----------
- 3 files changed, 6 insertions(+), 17 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8a90053..8624b2a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -54,7 +54,7 @@ GTK_REQUIRED_VERSION=2.91.0
- GCONF_REQUIRED_VERSION=2.6.1
- GIO_REQUIRED_VERSION=2.17.3
- GNOME_DESKTOP_REQUIRED_VERSION=2.29.92
--LIBNOTIFY_REQUIRED_VERSION=0.4.3
-+LIBNOTIFY_REQUIRED_VERSION=0.6.1
- 
- EXTRA_COMPILE_WARNINGS(yes)
- 
-diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
-index 9ca820a..f5964b9 100644
---- a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
-+++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
-@@ -608,9 +608,7 @@ ax_slowkeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
-         gsd_a11y_keyboard_manager_ensure_status_icon (manager);
-         manager->priv->notification = notify_notification_new (title,
-                                                                message,
--                                                               "preferences-desktop-accessibility",
--                                                               NULL);
--        notify_notification_attach_to_status_icon (manager->priv->notification, manager->priv->status_icon);
-+                                                               "preferences-desktop-accessibility");
-         notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000);
- 
-         notify_notification_add_action (manager->priv->notification,
-@@ -747,9 +745,7 @@ ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
-         gsd_a11y_keyboard_manager_ensure_status_icon (manager);
-         manager->priv->notification = notify_notification_new (title,
-                                                                message,
--                                                               "preferences-desktop-accessibility",
--                                                               NULL);
--        notify_notification_attach_to_status_icon (manager->priv->notification, manager->priv->status_icon);
-+                                                               "preferences-desktop-accessibility");
-         notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000);
- 
-         notify_notification_add_action (manager->priv->notification,
-diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
-index 02536a3..ef57d5b 100644
---- a/plugins/xrandr/gsd-xrandr-manager.c
-+++ b/plugins/xrandr/gsd-xrandr-manager.c
-@@ -1084,16 +1084,9 @@ error_message (GsdXrandrManager *mgr, const char *primary_text, GError *error_to
- 
-         g_assert (error_to_display == NULL || secondary_text == NULL);
- 
--        if (priv->status_icon)
--                notification = notify_notification_new_with_status_icon (primary_text,
--                                                                         error_to_display ? error_to_display->message : secondary_text,
--                                                                         GSD_XRANDR_ICON_NAME,
--                                                                         priv->status_icon);
--        else
--                notification = notify_notification_new (primary_text,
--                                                        error_to_display ? error_to_display->message : secondary_text,
--                                                        GSD_XRANDR_ICON_NAME,
--                                                        NULL);
-+        notification = notify_notification_new (primary_text,
-+                                                error_to_display ? error_to_display->message : secondary_text,
-+                                                GSD_XRANDR_ICON_NAME);
- 
-         notify_notification_show (notification, NULL); /* NULL-GError */
- #else
--- 
-2.1.0
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_2.32.1.bb
deleted file mode 100644
index c1db6d3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_2.32.1.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "GNOME settings daemon"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-PR = "r7"
-
-DEPENDS = "intltool libxxf86misc libsndfile1 libxtst glib-2.0 polkit gtk+ gconf dbus-glib libnotify libgnomekbd libxklavier gnome-doc-utils gnome-desktop"
-
-inherit gnome
-
-SRC_URI = " \
-    git://git.gnome.org/gnome-settings-daemon;branch=gnome-2-32 \
-    file://0001-Require-libnotify-0.6.0.patch \
-"
-SRCREV = "0160f6725cfb872e017f3958f108792c3b882872"
-
-S = "${WORKDIR}/git"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)}"
-PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio glib-2.0 libcanberra"
-PACKAGECONFIG[smartcard] = "--enable-smartcard-support,--disable-smartcard-support,nss"
-
-EXTRA_OECONF = " \
-    --x-includes=${STAGING_INCDIR} \
-    --x-libraries=${STAGING_LIBDIR} \
-    --enable-polkit \
-"
-
-do_configure_prepend() {
-    sed -i -e 's:-L$libdir::g' -e 's:-I$includedir::g' ${S}/configure.ac
-}
-
-FILES_${PN} += "${libdir}/gnome-settings-daemon-2.0/*.so ${libdir}/gnome-settings-daemon-2.0/*plugin \
-                ${datadir}/dbus-1/ \
-                ${datadir}/icon* \
-                ${datadir}/gnome-control-center \
-                ${datadir}/xsession*"
-
-FILES_${PN}-dbg += "${libdir}/gnome-settings-daemon-2.0/.debug"
-FILES_${PN}-dev += "${libdir}/gnome-settings-daemon-2.0/*.la"
-FILES_${PN}-staticdev += "${libdir}/gnome-settings-daemon-2.0/*.a"
-
-
-PNBLACKLIST[gnome-settings-daemon] ?= "Depends on blacklisted libgnomekbd - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[gnome-settings-daemon] ?= "Depends on blacklisted gnome-desktop - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0001-Fix-glib-includes.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0001-Fix-glib-includes.patch
deleted file mode 100644
index ace1b00..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0001-Fix-glib-includes.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 8587e35af52f7773f62361be2e72ddf286a59185 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Tue, 15 May 2012 13:02:02 +0200
-Subject: [PATCH] Fix glib includes
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-Upstream-Status: unknown
-
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- src/interface.h       |    2 +-
- src/load-graph.h      |    2 +-
- src/lsof.h            |    2 +-
- src/openfiles.h       |    2 +-
- src/procman_gnomesu.h |    2 +-
- src/util.cpp          |    2 +-
- 6 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/interface.h b/src/interface.h
-index 4bda35a..b26b670 100644
---- a/src/interface.h
-+++ b/src/interface.h
-@@ -20,7 +20,7 @@
- #ifndef _PROCMAN_INTERFACE_H_
- #define _PROCMAN_INTERFACE_H_
- 
--#include <glib/gtypes.h>
-+#include <glib.h>
- #include <gtk/gtk.h>
- #include "procman.h"
- 
-diff --git a/src/load-graph.h b/src/load-graph.h
-index 6111c78..6e7a599 100644
---- a/src/load-graph.h
-+++ b/src/load-graph.h
-@@ -1,7 +1,7 @@
- #ifndef _PROCMAN_LOAD_GRAPH_H_
- #define _PROCMAN_LOAD_GRAPH_H_
- 
--#include <glib/gtypes.h>
-+#include <glib.h>
- #include <glibtop/cpu.h>
- 
- enum
-diff --git a/src/lsof.h b/src/lsof.h
-index ad7f111..da420e2 100644
---- a/src/lsof.h
-+++ b/src/lsof.h
-@@ -1,7 +1,7 @@
- #ifndef H_PROCMAN_LSOF_1161179202
- #define H_PROCMAN_LSOF_1161179202
- 
--#include <glib/gmacros.h>
-+#include <glib.h>
- #include "procman.h"
- 
- void procman_lsof(ProcData *data);
-diff --git a/src/openfiles.h b/src/openfiles.h
-index 38b1cc8..a8b7b05 100644
---- a/src/openfiles.h
-+++ b/src/openfiles.h
-@@ -1,7 +1,7 @@
- #ifndef _OPENFILES_H_
- #define _OPENFILES_H_
- 
--#include <glib/gtypes.h>
-+#include <glib.h>
- 
- #include "procman.h"
- 
-diff --git a/src/procman_gnomesu.h b/src/procman_gnomesu.h
-index fec2650..474ca9a 100644
---- a/src/procman_gnomesu.h
-+++ b/src/procman_gnomesu.h
-@@ -1,7 +1,7 @@
- #ifndef H_GNOME_SYSTEM_MONITOR_GNOMESU_H_1132171917
- #define H_GNOME_SYSTEM_MONITOR_GNOMESU_H_1132171917
- 
--#include <glib/gtypes.h>
-+#include <glib.h>
- 
- gboolean
- procman_gnomesu_create_root_password_dialog(const char * message);
-diff --git a/src/util.cpp b/src/util.cpp
-index 9b1c9f5..90073fe 100644
---- a/src/util.cpp
-+++ b/src/util.cpp
-@@ -1,7 +1,7 @@
- #include <config.h>
- 
- #include <glib/gi18n.h>
--#include <glib/gstring.h>
-+#include <glib.h>
- #include <gtk/gtk.h>
- 
- #include <glibtop/proctime.h>
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0002-src-procman.cpp-include-main-gtkmm.h.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0002-src-procman.cpp-include-main-gtkmm.h.patch
deleted file mode 100644
index 7b67281..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0002-src-procman.cpp-include-main-gtkmm.h.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From acff719983aa1294148dc4a367c48957f5510eff Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 17 May 2013 18:25:56 +0200
-Subject: [PATCH] src/procman.cpp: include main gtkmm.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-after update of gtkmm build failed with:
-
-In file included from /home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gtkmm-2.4/gtkmm/main.h:33:0,
-                 from procman.cpp:26:
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:92:7: error: 'Value' is not a template
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:92:54: error: expected template-name before '<' token
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:92:54: error: expected '{' before '<' token
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:92:54: error: expected unqualified-id before '<' token
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:174:7: error: 'Value' is not a template
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:174:30: error: 'Glib::Value' is not a template type
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:174:58: error: expected template-name before '<' token
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:207:7: error: 'Value' is not a template
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:207:24: error: 'Glib::Value' is not a template type
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:207:51: error: expected template-name before '<' token
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:274:7: error: 'Value' is not a template
-/home/Superandy/tmp/oe-core-eglibc/sysroots/overo/usr/include/gdkmm-2.4/gdkmm/types.h:274:32: error: 'Glib::Value' is not a template type
-<...>
-
-Upstream-Status: Backport
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- src/procman.cpp |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/procman.cpp b/src/procman.cpp
-index b5c0d0a..d9b4b3f 100644
---- a/src/procman.cpp
-+++ b/src/procman.cpp
-@@ -23,7 +23,7 @@
- 
- #include <locale.h>
- 
--#include <gtkmm/main.h>
-+#include <gtkmm.h>
- #include <giomm/volumemonitor.h>
- #include <giomm/init.h>
- #include <glib.h>
--- 
-1.7.4.4
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/Remove-pkg-config-check-for-gnome-icon-theme.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/Remove-pkg-config-check-for-gnome-icon-theme.patch
deleted file mode 100644
index 3c5169e..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/Remove-pkg-config-check-for-gnome-icon-theme.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 36fd2aa23e712f05f0cce4a1be3453fcf405d026 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 15 Sep 2015 16:28:18 +0300
-Subject: [PATCH] Remove pkg-config check for gnome-icon-theme
-
-Theme is not required for building, and the icons are provided by
-adwaita-icon-theme anyway
-
-Upstream-Status: Inappropriate [Fixed in current versions]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 3600823..42262f2 100644
---- a/configure.in
-+++ b/configure.in
-@@ -37,7 +37,7 @@ LIBXML_REQUIRED=2.0
- RSVG_REQUIRED=2.12
- DBUS_REQUIRED=0.7
- 
--PKG_CHECK_MODULES(PROCMAN, glib-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED gtk+-2.0 >= $GTK_REQUIRED gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED gtkmm-2.4 >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED)
-+PKG_CHECK_MODULES(PROCMAN, glib-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED gtk+-2.0 >= $GTK_REQUIRED gtkmm-2.4 >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED)
- 
- 
- AC_ARG_ENABLE(more-warnings,
--- 
-2.1.4
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/gnome-system-monitor_2.28.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/gnome-system-monitor_2.28.2.bb
deleted file mode 100644
index 4b397bf..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/gnome-system-monitor_2.28.2.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Gnome system monitor"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-SECTION = "x11/gnome"
-PR = "r2"
-
-DEPENDS = "libgtop gtkmm glibmm gnome-doc-utils libwnck gtk+ dbus-glib librsvg intltool-native gnome-common-native"
-
-inherit gnome
-SRC_URI[archive.md5sum] = "3f0bca9b0ebc7a365466851cd580d167"
-SRC_URI[archive.sha256sum] = "b628edfd39e3a6b374ce133f367d3568475eb4e981a367f4f9d62a9784e5ae59"
-GNOME_COMPRESS_TYPE="bz2"
-SRC_URI += " \
-    file://0001-Fix-glib-includes.patch \
-    file://0002-src-procman.cpp-include-main-gtkmm.h.patch \
-    file://Remove-pkg-config-check-for-gnome-icon-theme.patch \
-"
-
-do_configure_prepend() {
-    sed -i -e s:help::g ${S}/Makefile.am
-}
-
-CXXFLAGS += "--std=c++11"
-
-RRECOMMENDS_${PN} = "adwaita-icon-theme"
-
-FILES_${PN} += "${datadir}/icons \
-                ${datadir}/dbus-1 \
-                ${datadir}/gnome/autostart \
-"
-
-FILES_${PN}-doc += "${datadir}/omf \
-                    ${datadir}/gnome/help "
-
-PNBLACKLIST[gnome-system-monitor] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/131635/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/gnome-terminal/0001-Makefile.am-do-not-build-help.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/gnome-terminal/0001-Makefile.am-do-not-build-help.patch
deleted file mode 100644
index d7874e4..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/gnome-terminal/0001-Makefile.am-do-not-build-help.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From d2549d3ef08536be6d141524e3382fef07fea8bf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Tue, 30 Apr 2013 19:48:27 +0200
-Subject: [PATCH] Makefile.am: do not build help
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- Makefile.am |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 89f7ee4..31e11ab 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = src po help
-+SUBDIRS = src po
- 
- NULL =
- 
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/gnome-terminal_2.30.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/gnome-terminal_2.30.2.bb
deleted file mode 100644
index 6b3bf76..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/gnome-terminal_2.30.2.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "GNOME Terminal"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5b51eba4ba4cafe64073227530c061ed"
-DEPENDS = "gtk+ glib-2.0 startup-notification dbus-glib vte9 gnome-doc-utils intltool-native"
-PR = "r1"
-
-inherit gnome
-
-SRC_URI += " \
-    file://0001-Makefile.am-do-not-build-help.patch \
-"
-
-EXTRA_OECONF += "--disable-scrollkeeper"
-
-SRC_URI[archive.md5sum] = "74c4528f00067072c2bd867d1f8fe844"
-SRC_URI[archive.sha256sum] = "2c7af2250698b9f9f53c6eaa93211c1118cf2c7e29cbbacfd1e8a6a10069e07a"
-GNOME_COMPRESS_TYPE="bz2"
-
-RRECOMMENDS_${PN} += "gnome-common-schemas"
-
-# http://errors.yoctoproject.org/Errors/Details/68636/
-PNBLACKLIST[gnome-terminal] ?= "BROKEN: fails to build with gcc-6 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups_0.2.3.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups_0.2.3.bb
deleted file mode 100644
index 3480712..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups_0.2.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DESCRIPTION="Gnome Cups Manager"
-LICENSE="GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS="glib-2.0 gtk+ pango cups intltool libgnomeui"
-
-PR = "r2"
-
-inherit gnomebase pkgconfig
-
-do_compile_append () {
-    cp libgnomecups-1.0.pc libgnomecups-1.0.pc.old
-    sed 's:${STAGING_DIR_HOST}::' < libgnomecups-1.0.pc.old > libgnomecups-1.0.pc
-}
-
-SRC_URI += "\
-    file://libgnomecups-0.2.3-glib.h.patch \
-    file://libgnomecups-0.2.3-cups-1.6.patch \
-"
-
-SRC_URI[archive.md5sum] = "dc4920c15c9f886f73ea74fbff0ae48b"
-SRC_URI[archive.sha256sum] = "e130e80942b386de19a288a4c194ff3dbe9140315b31e982058c8bffbb6a1d29"
-GNOME_COMPRESS_TYPE="bz2"
-
-PNBLACKLIST[libgnomecups] ?= "Depends on blacklisted libgnomeui - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/0001-configure-use-pkgconfig-for-freetype.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/0001-configure-use-pkgconfig-for-freetype.patch
deleted file mode 100644
index 174985a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/0001-configure-use-pkgconfig-for-freetype.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ed31fd89f4c77d89390774d29427898a85b25ab1 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 1 Aug 2014 13:58:36 +0200
-Subject: [PATCH] configure: use pkgconfig for freetype
-
-Upstream-status: Pending
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- configure.in | 12 +++++-------
- 1 file changed, 5 insertions(+), 7 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 729278d..e569429 100644
---- a/configure.in
-+++ b/configure.in
-@@ -164,13 +164,11 @@ dnl Checking for freetype2
- dnl =================================
- FREETYPE_LIBS=
- FREETYPE_CFLAGS=
--AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
--if test "x$FREETYPE_CONFIG" = "xno" ; then
--	AC_MSG_ERROR(You need FreeType2 (freetype-devel v 2.x package) for this version of libgnomeprint)
--else
--	FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
--	FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
--fi
-+PKG_CHECK_MODULES(FREETYPE2, freetype2, 
-+    FREETYPE_CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
-+    FREETYPE_LIBS="$LIBS $FREETYPE2_LIBS",
-+    AC_MSG_ERROR([*** Unable to find FreeType2 library (http://www.freetype.org/)])
-+)
- 
- libgnomeprint_save_ldflags=$LDFLAGS
- LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
--- 
-1.9.0
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/bison3-support.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/bison3-support.patch
deleted file mode 100644
index 29d410a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/bison3-support.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: libgnomeprint-2.18.8/libgnomeprint/grammar.y
-===================================================================
---- libgnomeprint-2.18.8.orig/libgnomeprint/grammar.y
-+++ libgnomeprint-2.18.8/libgnomeprint/grammar.y
-@@ -99,7 +99,7 @@ gnome_print_filter_parse_prop (GnomePrin
- }
- 
- static int yylex (void *lvalp);
--static int yyerror (const char *s);
-+static int yyerror (graph_t *g, const char *s);
- %}
- 
- %union {
-@@ -117,6 +117,7 @@ static int yyerror (const char *s);
- %type <p> pool
- 
- %pure_parser
-+%parse-param { graph_t *graph }
- 
- %start graph
- %%
-@@ -185,7 +186,7 @@ graph: filter {
- %%
- 
- static int
--yyerror (const char *s)
-+yyerror (graph_t *g, const char *s)
- {
- 	return -1;
- }
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/fix.includes.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/fix.includes.patch
deleted file mode 100644
index 53235a1..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/fix.includes.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -uNr libgnomeprint-2.18.7.orig/libgnomeprint/modules/cups/gnome-print-cups-transport.c libgnomeprint-2.18.7/libgnomeprint/modules/cups/gnome-print-cups-transport.c
---- libgnomeprint-2.18.7.orig/libgnomeprint/modules/cups/gnome-print-cups-transport.c	2009-04-19 19:45:36.000000000 +0200
-+++ libgnomeprint-2.18.7/libgnomeprint/modules/cups/gnome-print-cups-transport.c	2012-12-23 12:34:52.058643537 +0100
-@@ -35,6 +35,7 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#include <stdio.h>
- #include <locale.h>
- 
- #include <cups/cups.h>
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/freetype.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/freetype.patch
deleted file mode 100644
index 7a27ecd..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint/freetype.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Use proper method to include freetype headers
-
-FreeType wants to use these special macros to include its APIs
-so be it.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: libgnomeprint-2.18.7/libgnomeprint/gnome-font-face.c
-===================================================================
---- libgnomeprint-2.18.7.orig/libgnomeprint/gnome-font-face.c
-+++ libgnomeprint-2.18.7/libgnomeprint/gnome-font-face.c
-@@ -36,7 +36,9 @@
- #include <stdarg.h>
- #include <locale.h>
- 
--#include <freetype/ftoutln.h>
-+#include <ft2build.h>
-+#include FT_FREETYPE_H
-+
- 
- #include <libgnomeprint/gnome-print-private.h>
- #include <libgnomeprint/gnome-font-private.h>
-Index: libgnomeprint-2.18.7/libgnomeprint/gnome-rfont.c
-===================================================================
---- libgnomeprint-2.18.7.orig/libgnomeprint/gnome-rfont.c
-+++ libgnomeprint-2.18.7/libgnomeprint/gnome-rfont.c
-@@ -28,8 +28,8 @@
- 
- #include <ft2build.h>
- #include FT_FREETYPE_H
--#include <freetype/ftglyph.h>
--#include <freetype/ftbbox.h>
-+#include FT_GLYPH_H
-+#include FT_BBOX_H
- #include <libart_lgpl/art_misc.h>
- #include <libart_lgpl/art_affine.h>
- #include <libart_lgpl/art_vpath.h>
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint_2.18.8.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint_2.18.8.bb
deleted file mode 100644
index a462a4b..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomeprint_2.18.8.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-LICENSE = "GPLv2"
-SECTION = "x11/gnome/libs"
-
-DEPENDS = "bison-native flex-native libxml2 libgnomecups glib-2.0 pango libart-lgpl fontconfig popt gnome-common freetype"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-inherit gnomebase
-
-SRC_URI += "file://fix.includes.patch \
-            file://freetype.patch \
-            file://0001-configure-use-pkgconfig-for-freetype.patch \
-            file://bison3-support.patch \
-           "
-SRC_URI[archive.md5sum] = "63b05ffb5386e131487c6af30f4c56ac"
-SRC_URI[archive.sha256sum] = "1034ec8651051f84d2424e7a1da61c530422cc20ce5b2d9e107e1e46778d9691"
-GNOME_COMPRESS_TYPE="bz2"
-
-FILES_${PN}-dbg += "\
-    ${libdir}/${PN}/${PV}/modules/.debug \
-    ${libdir}/${PN}/${PV}/modules/*/.debug \
-"
-FILES_${PN}-staticdev += "\
-    ${libdir}/${PN}/${PV}/modules/*.a \
-    ${libdir}/${PN}/${PV}/modules/*/*.a \
-"
-
-PNBLACKLIST[libgnomeprint] ?= "Depends on broken libgnomecups - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric/0001-configure.in-drop-introspection-macros-replace-them-.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric/0001-configure.in-drop-introspection-macros-replace-them-.patch
deleted file mode 100644
index 914d2cc..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric/0001-configure.in-drop-introspection-macros-replace-them-.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From de5f0a535d6ea1932d2c7de53bd33510c8682ee7 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 22 Feb 2016 16:34:03 +0200
-Subject: [PATCH] configure.in: drop introspection macros, replace them with a
- standard one
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.in | 57 +--------------------------------------------------------
- 1 file changed, 1 insertion(+), 56 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 8e1aa37..3086503 100644
---- a/configure.in
-+++ b/configure.in
-@@ -934,63 +934,8 @@ AC_SUBST(MONO_CFLAGS)
- AC_SUBST(MONO_LIBS)
- ])
- 
--# GObject Introspection
--GIR_REQ=1.0.0
--AC_ARG_ENABLE(introspection,
--          AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
--                         [Enable introspection for this build]),, 
--                         [enable_introspection=no])
--
--AC_MSG_CHECKING([for gobject-introspection])
--
--dnl presence/version checking
--AS_CASE([$enable_introspection],
--[no], [
--    found_introspection="no (disabled, use --enable-introspection to enable)"
--],
--[yes],[
--    PKG_CHECK_EXISTS([gobject-introspection-1.0],,
--                     AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
--    PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $GIR_REQ],
--                     found_introspection=yes,
--                     AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
--],
--[auto],[
--    PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $GIR_REQ], found_introspection=yes, found_introspection=no)
--dnl Canonicalize enable_introspection
--enable_introspection=$found_introspection
--],
--[	
--    AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
--])
-+GOBJECT_INTROSPECTION_CHECK([1.46.0])
- 
--AC_MSG_RESULT([$found_introspection])
--
--INTROSPECTION_SCANNER=
--INTROSPECTION_COMPILER=
--INTROSPECTION_GENERATE=
--INTROSPECTION_GIRDIR=
--INTROSPECTION_TYPELIBDIR=
--if test "x$found_introspection" = "xyes"; then
--   INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
--   INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
--   INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
--   INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
--   INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
--   INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
--   INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
--   INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
--fi
--AC_SUBST(INTROSPECTION_SCANNER)
--AC_SUBST(INTROSPECTION_COMPILER)
--AC_SUBST(INTROSPECTION_GENERATE)
--AC_SUBST(INTROSPECTION_GIRDIR)
--AC_SUBST(INTROSPECTION_TYPELIBDIR)
--AC_SUBST(INTROSPECTION_CFLAGS)
--AC_SUBST(INTROSPECTION_LIBS)
--AC_SUBST(INTROSPECTION_MAKEFILE)
--
--AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
- dnl we need to change the install directories for distcheck
- AC_ARG_WITH([gir-dir],
- 	AS_HELP_STRING(
--- 
-2.7.0
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric/do-not-use-srcdir.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric/do-not-use-srcdir.patch
deleted file mode 100644
index cc81b1f..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric/do-not-use-srcdir.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: gnumeric-1.12.0/test/Makefile.am
-===================================================================
---- gnumeric-1.12.0.orig/test/Makefile.am	2011-05-17 17:54:24.000000000 -0700
-+++ gnumeric-1.12.0/test/Makefile.am	2013-10-17 20:28:19.920618596 -0700
-@@ -25,7 +25,9 @@
- #
- # 90xx: Misc stuff.
- 
--TESTS = $(sort $(wildcard $(srcdir)/t[0-9][0-9][0-9][0-9]-*.pl))
-+TESTS_EXTENSIONS=.pl
-+TESTS = @auto_find_tests@
-+
- SUPPS = common.supp commondots.supp gui.supp t8003-valgrind-pdf.supp
- 
- import-db:
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric_1.12.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric_1.12.0.bb
deleted file mode 100644
index 49d0fe9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnumeric/gnumeric_1.12.0.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-LICENSE = "GPLv2 | GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=be0de417af78dd340558810d1ced52e6"
-SECTION = "x11/utils"
-S = "${WORKDIR}/gnumeric-${PV}"
-DEPENDS = "gdk-pixbuf libgsf gtk+3 libxml2 libglade libart-lgpl intltool-native libgnomecanvas libgnomeprint libbonoboui orbit2-native goffice"
-SUMMARY = "Gnumeric spreadsheet for GNOME"
-
-GNOME_COMPRESS_TYPE = "xz"
-
-inherit gnome pythonnative gobject-introspection
-
-SRC_URI += "file://do-not-use-srcdir.patch \
-            file://0001-configure.in-drop-introspection-macros-replace-them-.patch"
-
-SRC_URI[archive.md5sum] = "3fd87cca95334b5d8ac922989670fe27"
-SRC_URI[archive.sha256sum] = "037b53d909e5d1454b2afda8c4fb1e7838e260343e36d4e36245f4a5d0e04111"
-
-
-EXTRA_OECONF=" --without-perl "
-
-PACKAGES_DYNAMIC += "gnumeric-plugin-*"
-PACKAGES += "libspreadsheet libspreadsheet-dev gnumeric-goffice gnumeric-goffice-dbg"
-
-FILES_${PN}-dbg += "${libdir}/gnumeric/${PV}/plugins/*/.debug"
-FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
-FILES_${PN}-staticdev = "${libdir}/libspreadsheet.la"
-FILES_libspreadsheet = "${libdir}/libspreadsheet-${PV}.so"
-FILES_libspreadsheet-dev = "${libdir}/libspreadsheet.so"
-FILES_gnumeric-goffice-dbg += "${libdir}/goffice/*/plugins/gnumeric/.debug"
-FILES_gnumeric-goffice = "${libdir}/goffice/*/plugins/gnumeric/*"
-
-# This hack works around the problem mentioned here:
-# https://mail.gnome.org/archives/gnumeric-list/2010-February/msg00006.html
-do_install_prepend() {
-    sed -i ${B}/doc/C/Makefile -e 's/\tfor file in $(omffile); do/\t-for file in $(omffile); do/'
-}
-
-python populate_packages_prepend () {
-    gnumeric_libdir = bb.data.expand('${libdir}/gnumeric/${PV}/plugins', d)
-
-    do_split_packages(d, gnumeric_libdir, '^(.*)/.*$',
-        output_pattern='gnumeric-plugin-%s',
-        description='Gnumeric plugin %s',
-        extra_depends='',
-        recursive=True,
-        prepend=True)
-}
-
-PNBLACKLIST[gnumeric] ?= "Depends on broken libgnomeprint - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/files/0001-Drop-help-directory-from-build.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/files/0001-Drop-help-directory-from-build.patch
deleted file mode 100644
index d116968..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/files/0001-Drop-help-directory-from-build.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 48cb878cb724e7a509260f014db6365510b8b541 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 17 May 2016 14:05:29 +0300
-Subject: [PATCH] Drop help directory from build
-
-It hardcodes the use of xml2po tool form gnome-doc-utils
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index d056875..3fc4a41 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = m4 copy-n-paste data po gthumb extensions tests help
-+SUBDIRS = m4 copy-n-paste data po gthumb extensions tests
- 
- ACLOCAL_AMFLAGS = -I m4
- AMCFLAGS = -fPIC -DPIC
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/files/parallel.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/files/parallel.patch
deleted file mode 100644
index 20ce5c5..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/files/parallel.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From 34969cde1dcb7740b4a7c3b6e3d04d481e5980b5 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 31 Jul 2012 17:26:27 +0100
-Subject: [PATCH] build: Fix parallel build problems with enum generation
-
-This is a backport from a patch against master.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=680925]
----
- extensions/file_tools/Makefile.am    |   10 ++++------
- extensions/importer/Makefile.am      |   10 ++++------
- extensions/pixbuf_savers/Makefile.am |   10 ++++------
- gthumb/Makefile.am                   |   10 ++++------
- 4 files changed, 16 insertions(+), 24 deletions(-)
-
-diff --git a/extensions/file_tools/Makefile.am b/extensions/file_tools/Makefile.am
-index 7785eff..d70a8a5 100644
---- a/extensions/file_tools/Makefile.am
-+++ b/extensions/file_tools/Makefile.am
-@@ -24,17 +24,16 @@ HEADER_FILES = 				\
- 	gth-file-tool-undo.h		\
- 	preferences.h
- 
--enum-types.h: $(HEADER_FILES) $(GLIB_MKENUMS)
-+enum-types.h: $(HEADER_FILES)
- 	$(AM_V_GEN)( $(GLIB_MKENUMS) \
- 		--fhead "#ifndef ENUM_TYPES_H\n#define ENUM_TYPES_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
- 		--fprod "/* enumerations from \"@filename@\" */\n" \
- 		--vhead "GType @enum_name@_get_type (void);\n#define GTH_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
- 		--ftail "G_END_DECLS\n\n#endif /* ENUM_TYPES_H */" \
- 		$^> xgen-$(@F) \
--	&& (cmp -s xgen-$(@F) enum-types.h || cp xgen-$(@F) enum-types.h ) \
--	&& rm -f xgen-$(@F) )
-+	&& mv -f xgen-$(@F) enum-types.h )
- 
--enum-types.c: $(HEADER_FILES) enum-types.h
-+enum-types.c: $(HEADER_FILES)
- 	$(AM_V_GEN)( $(GLIB_MKENUMS) \
- 		--fhead "#include <glib-object.h>\n" \
- 		--fprod "\n/* enumerations from \"@filename@\" */\n#include \"@filename@\"" \
-@@ -42,8 +41,7 @@ enum-types.c: $(HEADER_FILES) enum-types.h
- 		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
- 		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
- 		$^> xgen-$(@F) \
--	&& (cmp -s xgen-$(@F) enum-types.c || cp xgen-$(@F) enum-types.c ) \
--	&& rm -f xgen-$(@F) )
-+	&& mv -f xgen-$(@F) enum-types.c )
- 
- libfile_tools_la_SOURCES = 		\
- 	$(ENUM_TYPES)			\
-diff --git a/extensions/importer/Makefile.am b/extensions/importer/Makefile.am
-index 29e7f2c..07c1eba 100644
---- a/extensions/importer/Makefile.am
-+++ b/extensions/importer/Makefile.am
-@@ -14,17 +14,16 @@ HEADER_FILES = 					\
- 	preferences.h				\
- 	utils.h
- 
--gth-import-enum-types.h: $(HEADER_FILES) $(GLIB_MKENUMS)
-+gth-import-enum-types.h: $(HEADER_FILES)
- 	$(AM_V_GEN)( $(GLIB_MKENUMS) \
- 		--fhead "#ifndef ENUM_TYPES_H\n#define ENUM_TYPES_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
- 		--fprod "/* enumerations from \"@filename@\" */\n" \
- 		--vhead "GType @enum_name@_get_type (void);\n#define GTH_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
- 		--ftail "G_END_DECLS\n\n#endif /* ENUM_TYPES_H */" \
- 		$^> xgen-$(@F) \
--	&& (cmp -s xgen-$(@F) gth-import-enum-types.h || cp xgen-$(@F) gth-import-enum-types.h ) \
--	&& rm -f xgen-$(@F) )
-+	&& mv -f xgen-$(@F) gth-import-enum-types.h )
- 
--gth-import-enum-types.c: $(HEADER_FILES) gth-import-enum-types.h
-+gth-import-enum-types.c: $(HEADER_FILES)
- 	$(AM_V_GEN)( $(GLIB_MKENUMS) \
- 		--fhead "#include <glib-object.h>\n" \
- 		--fprod "\n/* enumerations from \"@filename@\" */\n#include \"@filename@\"" \
-@@ -32,8 +31,7 @@ gth-import-enum-types.c: $(HEADER_FILES) gth-import-enum-types.h
- 		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
- 		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
- 		$^> xgen-$(@F) \
--	&& (cmp -s xgen-$(@F) gth-import-enum-types.c || cp xgen-$(@F) gth-import-enum-types.c ) \
--	&& rm -f xgen-$(@F) )
-+	&& mv -f xgen-$(@F) gth-import-enum-types.c )
- 
- libimporter_la_SOURCES = 			\
- 	$(ENUM_TYPES)				\
-diff --git a/extensions/pixbuf_savers/Makefile.am b/extensions/pixbuf_savers/Makefile.am
-index bfe9f34..4764c32 100644
---- a/extensions/pixbuf_savers/Makefile.am
-+++ b/extensions/pixbuf_savers/Makefile.am
-@@ -10,17 +10,16 @@ ENUM_TYPES =				\
- HEADER_FILES = 				\
- 	preferences.h
- 
--enum-types.h: $(HEADER_FILES) $(GLIB_MKENUMS)
-+enum-types.h: $(HEADER_FILES)
- 	$(AM_V_GEN)( $(GLIB_MKENUMS) \
- 		--fhead "#ifndef ENUM_TYPES_H\n#define ENUM_TYPES_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
- 		--fprod "/* enumerations from \"@filename@\" */\n" \
- 		--vhead "GType @enum_name@_get_type (void);\n#define GTH_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
- 		--ftail "G_END_DECLS\n\n#endif /* ENUM_TYPES_H */" \
- 		$^> xgen-$(@F) \
--	&& (cmp -s xgen-$(@F) enum-types.h || cp xgen-$(@F) enum-types.h ) \
--	&& rm -f xgen-$(@F) )
-+	&& mv -f xgen-$(@F) enum-types.h )
- 
--enum-types.c: $(HEADER_FILES) enum-types.h
-+enum-types.c: $(HEADER_FILES)
- 	$(AM_V_GEN)( $(GLIB_MKENUMS) \
- 		--fhead "#include <glib-object.h>\n" \
- 		--fprod "\n/* enumerations from \"@filename@\" */\n#include \"@filename@\"" \
-@@ -28,8 +27,7 @@ enum-types.c: $(HEADER_FILES) enum-types.h
- 		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
- 		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
- 		$^> xgen-$(@F) \
--	&& (cmp -s xgen-$(@F) enum-types.c || cp xgen-$(@F) enum-types.c ) \
--	&& rm -f xgen-$(@F) )
-+	&& mv -f xgen-$(@F) enum-types.c )
- 
- libpixbuf_savers_la_SOURCES = 	\
- 	$(ENUM_TYPES)		\
-diff --git a/gthumb/Makefile.am b/gthumb/Makefile.am
-index e9e385e..2f14e03 100644
---- a/gthumb/Makefile.am
-+++ b/gthumb/Makefile.am
-@@ -296,17 +296,16 @@ gthumb_CFLAGS =							\
- 	-DGTHUMB_EXTENSIONS_DIR=\"$(extensions_dir)\"		\
- 	$(NULL)
- 
--gth-enum-types.h: $(PUBLIC_HEADER_FILES) $(GLIB_MKENUMS)
-+gth-enum-types.h: $(PUBLIC_HEADER_FILES)
- 	$(AM_V_GEN)( $(GLIB_MKENUMS) \
- 		--fhead "#ifndef GTH_ENUM_TYPES_H\n#define GTH_ENUM_TYPES_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
- 		--fprod "/* enumerations from \"@filename@\" */\n" \
- 		--vhead "GType @enum_name@_get_type (void);\n#define GTH_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
- 		--ftail "G_END_DECLS\n\n#endif /* GTH_ENUM_TYPES_H */" \
- 		$^> xgen-$(@F) \
--	&& (cmp -s xgen-$(@F) gth-enum-types.h || cp xgen-$(@F) gth-enum-types.h ) \
--	&& rm -f xgen-$(@F) )
-+	&& mv -f xgen-$(@F) gth-enum-types.h )
- 
--gth-enum-types.c: $(PUBLIC_HEADER_FILES) gth-enum-types.h
-+gth-enum-types.c: $(PUBLIC_HEADER_FILES)
- 	$(AM_V_GEN)( $(GLIB_MKENUMS) \
- 		--fhead "#include <glib-object.h>\n" \
- 		--fprod "\n/* enumerations from \"@filename@\" */\n#include \"@filename@\"" \
-@@ -314,8 +313,7 @@ gth-enum-types.c: $(PUBLIC_HEADER_FILES) gth-enum-types.h
- 		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
- 		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
- 		$^> xgen-$(@F) \
--	&& (cmp -s xgen-$(@F) gth-enum-types.c || cp xgen-$(@F) gth-enum-types.c ) \
--	&& rm -f xgen-$(@F) )
-+	&& mv -f xgen-$(@F) gth-enum-types.c )
- 
- gth-marshal.h: gth-marshal.list $(GLIB_GENMARSHAL)
- 	$(AM_V_GEN)( $(GLIB_GENMARSHAL) $(srcdir)/gth-marshal.list --header --prefix=gth_marshal > $@ )
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/gthumb_2.12.4.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/gthumb_2.12.4.bb
deleted file mode 100644
index 62d3df9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gthumb/gthumb_2.12.4.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "gThumb is an image viewer and browser for the GNOME Desktop"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-DEPENDS = "gnome-common-native glib-2.0 gtk+ libxml2 gnome-doc-utils libunique gconf libpng gstreamer jpeg tiff gst-plugins-base intltool-native gconf-native"
-
-PR = "r4"
-
-EXTRA_OECONF = "--disable-gnome-keyring --disable-libsoup --disable-exiv2 --disable-clutter"
-
-inherit gnome pkgconfig
-
-SRC_URI[archive.md5sum] = "97fc13221b0c5d80c27a2e25a3a3ac6f"
-SRC_URI[archive.sha256sum] = "cf809695230ab8892a078be454a42ade865754c72ec1da7c3d74d4310de54f1d"
-GNOME_COMPRESS_TYPE="bz2"
-
-SRC_URI += "file://parallel.patch \
-            file://0001-Drop-help-directory-from-build.patch"
-
-do_configure_prepend () {
-    rm -f ${S}/m4/gnome-doc-utils.m4
-}
-
-do_install_append () {
-    rm -f ${D}${libdir}/${BPN}/extensions/*.a
-}
-
-FILES_${PN} += "${datadir}/icons"
-FILES_${PN} += "${libdir}/${BPN}/extensions/*.so \
-                ${libdir}/${BPN}/extensions/*.extension"
-FILES_${PN}-dev += "${libdir}/${BPN}/extensions/*.la"
-FILES_${PN}-dbg += "${libdir}/${BPN}/extensions/.debug/"
-
-
-PNBLACKLIST[gthumb] ?= "Depends on blacklisted gstreamer - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.28.3.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.28.3.bb
deleted file mode 100644
index 62b757f..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.28.3.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-DESCRIPTION = "gvfs is a userspace virtual filesystem"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e"
-
-inherit gnome bash-completion
-
-DEPENDS += "libsecret glib-2.0 gconf intltool-native libgudev udisks2"
-
-SRC_URI = "https://download.gnome.org/sources/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.xz;name=archive"
-
-SRC_URI[archive.md5sum] = "d2399a1a217dd5030e8830c7e7c813c2"
-SRC_URI[archive.sha256sum] = "458c4cb68570f6ef4a9e152995c62d0057c3e0a07ed64d84c7200cdd22f0bd17"
-
-EXTRA_OECONF = " \
-    --disable-gdu \
-    --enable-udisks2 \
-    --disable-documentation \
-    --with-archive-includes=${STAGING_INCDIR} \
-    --with-archive-libs=${STAGING_LIBDIR} \
-"
-
-PACKAGES =+ "gvfsd-ftp gvfsd-sftp gvfsd-trash"
-
-FILES_${PN} += " \
-    ${datadir}/glib-2.0 \
-    ${datadir}/GConf \
-    ${datadir}/dbus-1/services \
-    ${libdir}/gio/modules/*.so \
-    ${libdir}/tmpfiles.d \
-    ${systemd_user_unitdir} \
-"
-RDEPENDS_${PN} = "udisks2"
-
-FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/*"
-FILES_${PN}-dev += "${libdir}/gio/modules/*.la"
-
-FILES_gvfsd-ftp = "${libexecdir}/gvfsd-ftp ${datadir}/gvfs/mounts/ftp.mount"
-FILES_gvfsd-sftp = "${libexecdir}/gvfsd-sftp ${datadir}/gvfs/mounts/sftp.mount"
-FILES_gvfsd-trash = "${libexecdir}/gvfsd-trash ${datadir}/gvfs/mounts/trash.mount"
-
-RRECOMMENDS_gvfsd-ftp += "openssh-sftp openssh-ssh"
-
-PACKAGECONFIG ?= "libgphoto2 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-
-PACKAGECONFIG[afc] = "--enable-afc, --disable-afc, libimobiledevice libplist"
-PACKAGECONFIG[archive] = "--enable-archive, --disable-archive, libarchive"
-PACKAGECONFIG[avahi] = "--enable-avahi, --disable-avahi, avahi"
-PACKAGECONFIG[gcr] = "--enable-gcr, --disable-gcr, gcr"
-PACKAGECONFIG[gtk] = "--enable-gtk, --disable-gtk, gtk+3"
-PACKAGECONFIG[http] = "--enable-http, --disable-http, libsoup-2.4"
-PACKAGECONFIG[libmtp] = "--enable-libmtp, --disable-libmtp, libmtp"
-PACKAGECONFIG[libgphoto2] = "--enable-gphoto2, --disable-gphoto2, libgphoto2"
-PACKAGECONFIG[samba] = "--enable-samba, --disable-samba, samba"
-PACKAGECONFIG[systemd] = "--with-systemduserunitdir=${systemd_user_unitdir},--without-systemduserunitdir,systemd"
-
-# needs meta-filesystems
-PACKAGECONFIG[fuse] = "--enable-fuse, --disable-fuse, fuse"
-
-# libcdio-paranoia recipe doesn't exist yet
-PACKAGECONFIG[cdda] = "--enable-cdda, --disable-cdda, libcdio-paranoia"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.32.1.bb
new file mode 100644
index 0000000..d380688
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.32.1.bb
@@ -0,0 +1,66 @@
+DESCRIPTION = "gvfs is a userspace virtual filesystem"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e"
+
+inherit gnome bash-completion gettext
+
+DEPENDS += "libsecret glib-2.0 gconf intltool-native libgudev udisks2 polkit shadow-native"
+
+SRC_URI = "https://download.gnome.org/sources/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.xz;name=archive"
+
+SRC_URI[archive.md5sum] = "cbe766b46f324e17d7abcfb4a89a1684"
+SRC_URI[archive.sha256sum] = "d0b6c9edab09d52472355657a2f0a14831b2e6c58caba395f721ab683f836ade"
+
+EXTRA_OECONF = " \
+    --disable-gdu \
+    --enable-udisks2 \
+    --disable-documentation \
+    --with-archive-includes=${STAGING_INCDIR} \
+    --with-archive-libs=${STAGING_LIBDIR} \
+"
+
+PACKAGES =+ "gvfsd-ftp gvfsd-sftp gvfsd-trash"
+
+FILES_${PN} += " \
+    ${datadir}/glib-2.0 \
+    ${datadir}/GConf \
+    ${datadir}/dbus-1/services \
+    ${libdir}/gio/modules/*.so \
+    ${libdir}/tmpfiles.d \
+    ${systemd_user_unitdir} \
+"
+RDEPENDS_${PN} = "udisks2"
+
+FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/*"
+FILES_${PN}-dev += "${libdir}/gio/modules/*.la"
+
+FILES_gvfsd-ftp = "${libexecdir}/gvfsd-ftp ${datadir}/gvfs/mounts/ftp.mount"
+FILES_gvfsd-sftp = "${libexecdir}/gvfsd-sftp ${datadir}/gvfs/mounts/sftp.mount"
+FILES_gvfsd-trash = "${libexecdir}/gvfsd-trash ${datadir}/gvfs/mounts/trash.mount"
+
+RRECOMMENDS_gvfsd-ftp += "openssh-sftp openssh-ssh"
+
+PACKAGECONFIG ?= "libgphoto2 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+PACKAGECONFIG[afc] = "--enable-afc, --disable-afc, libimobiledevice libplist"
+PACKAGECONFIG[archive] = "--enable-archive, --disable-archive, libarchive"
+PACKAGECONFIG[avahi] = "--enable-avahi, --disable-avahi, avahi"
+PACKAGECONFIG[gcr] = "--enable-gcr, --disable-gcr, gcr"
+PACKAGECONFIG[gtk] = "--enable-gtk, --disable-gtk, gtk+3"
+PACKAGECONFIG[http] = "--enable-http, --disable-http, libsoup-2.4"
+PACKAGECONFIG[libmtp] = "--enable-libmtp, --disable-libmtp, libmtp"
+PACKAGECONFIG[libgphoto2] = "--enable-gphoto2, --disable-gphoto2, libgphoto2"
+PACKAGECONFIG[samba] = "--enable-samba, --disable-samba, samba"
+PACKAGECONFIG[systemd] = "--with-systemduserunitdir=${systemd_user_unitdir},--without-systemduserunitdir,systemd"
+
+# needs meta-filesystems
+PACKAGECONFIG[fuse] = "--enable-fuse, --disable-fuse, fuse"
+
+# libcdio-paranoia recipe doesn't exist yet
+PACKAGECONFIG[cdda] = "--enable-cdda, --disable-cdda, libcdio-paranoia"
+
+# Fix up permissions on polkit rules.d to work with rpm4 constraints
+do_install_append() {
+	chmod 700 ${D}/${datadir}/polkit-1/rules.d
+	chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
+}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gweather/libgweather3_3.0.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gweather/libgweather3_3.0.2.bb
deleted file mode 100644
index 6920f0a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gweather/libgweather3_3.0.2.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SECTION = "x11/gnome/libs"
-DEPENDS = "libxml2 gconf libsoup-2.4 gtk+3"
-
-PNBLACKLIST[libgweather3] ?= "CONFLICT: 876 files are conflicting with libgweather - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-# e.g. sysroots/qemux86-64/usr/share/libgweather/locations.dtd
-#      sysroots/qemux86-64/usr/share/libgweather/Locations.zh_TW.xml
-
-BPN = "libgweather"
-
-inherit gnome
-SRC_URI[archive.md5sum] = "f1a96c6f19c9a0bc6b4e12acc9a8a85d"
-SRC_URI[archive.sha256sum] = "9041526fa0466b99dae5cf06c2cc70376f25531eec5d58b1e1378acfb302410c"
-
-do_configure_prepend() {
-    sed -i -e 's: doc : :g' ${S}/Makefile.am
-}
-
-FILES_${PN} += "${datadir}/gnome* \
-                ${datadir}/icons"
-
-PACKAGES =+ "${PN}-locationdata"
-FILES_${PN}-locationdata = "${datadir}/libgweather/*ocations*"
-
-
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gweather/libgweather_2.30.3.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gweather/libgweather_2.30.3.bb
deleted file mode 100644
index 8b69f1f..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gweather/libgweather_2.30.3.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SECTION = "x11/gnome/libs"
-DEPENDS = "libxml2 gconf libsoup-2.4 gtk+ libgnome-keyring"
-
-inherit gnome
-
-SRC_URI[archive.md5sum] = "bf6a0a05051341ecb250f332e3edfb88"
-SRC_URI[archive.sha256sum] = "b835374661423f37c46aa8e37368ae24a68856f117b7c21e475a21efdba5264c"
-GNOME_COMPRESS_TYPE="bz2"
-
-do_configure_prepend() {
-    sed -i -e 's: doc : :g' ${S}/Makefile.am
-}
-
-FILES_${PN} += "${datadir}/gnome* \
-                ${datadir}/icons"
-
-PACKAGES =+ "${PN}-locationdata"
-FILES_${PN}-locationdata = "${datadir}/libgweather/Locations*"
-
-# http://errors.yoctoproject.org/Errors/Details/68608/
-PNBLACKLIST[libgweather] ?= "BROKEN: fails to build with gcc-6 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/Makefile.am.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/Makefile.am.patch
deleted file mode 100644
index 190ba96..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/Makefile.am.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: libart_lgpl-2.3.21/Makefile.am
-===================================================================
---- libart_lgpl-2.3.21.orig/Makefile.am	2009-04-18 05:29:25.000000000 -0700
-+++ libart_lgpl-2.3.21/Makefile.am	2010-11-23 23:12:32.445450075 -0800
-@@ -7,8 +7,8 @@
- 
- BUILT_SOURCES = art_config.h
- 
--art_config.h:
--	./gen_art_config.sh > art_config.h
-+#art_config.h:
-+#	./gen_art_config.sh > art_config.h
- 
- EXTRA_DIST = 			\
- 	libart.def		\
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64/art_config.h
deleted file mode 100644
index 500ffc3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 8
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64be/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64be/art_config.h
deleted file mode 100644
index 500ffc3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64be/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 8
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64be_32/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64be_32/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/aarch64be_32/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/arm/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/arm/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/arm/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/armeb/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/armeb/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/armeb/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i386/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i386/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i386/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i586/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i586/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i586/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i686/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i686/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/i686/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips64/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips64/art_config.h
deleted file mode 100644
index d10cd95..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips64/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 8
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips64el/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips64el/art_config.h
deleted file mode 100644
index d10cd95..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mips64el/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 8
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mipsel/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mipsel/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/mipsel/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/powerpc/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/powerpc/art_config.h
deleted file mode 100644
index b0e74ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/powerpc/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 4
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/powerpc64/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/powerpc64/art_config.h
deleted file mode 100644
index 500ffc3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/powerpc64/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 8
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/x86_64/art_config.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/x86_64/art_config.h
deleted file mode 100644
index 500ffc3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl/x86_64/art_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Automatically generated by gen_art_config.c */
-
-#define ART_SIZEOF_CHAR 1
-#define ART_SIZEOF_SHORT 2
-#define ART_SIZEOF_INT 4
-#define ART_SIZEOF_LONG 8
-
-typedef unsigned char art_u8;
-typedef unsigned short art_u16;
-typedef unsigned int art_u32;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl_2.3.21.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl_2.3.21.bb
deleted file mode 100644
index 7b29506..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libart-lgpl/libart-lgpl_2.3.21.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Library of functions for 2D graphics"
-SECTION = "x11/gnome"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-PR = "r2"
-
-ART_CONFIG = "${HOST_ARCH}/art_config.h"
-
-# can't use gnome.oeclass due to _ in filename
-SRC_URI = "${GNOME_MIRROR}/libart_lgpl/2.3/libart_lgpl-${PV}.tar.bz2 \
-       file://${ART_CONFIG} \
-       file://Makefile.am.patch"
-
-SRC_URI[md5sum] = "08559ff3c67fd95d57b0c5e91a6b4302"
-SRC_URI[sha256sum] = "fdc11e74c10fc9ffe4188537e2b370c0abacca7d89021d4d303afdf7fd7476fa"
-
-inherit autotools pkgconfig
-
-DEPENDS = ""
-
-FILES_${PN} = "${libdir}/*.so.*"
-FILES_${PN}-dev += "${bindir}/libart2-config"
-
-S = "${WORKDIR}/libart_lgpl-${PV}"
-
-do_configure_prepend() {
-    cp ${WORKDIR}/${ART_CONFIG} ${S}/art_config.h
-}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_2.32.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_2.32.0.bb
deleted file mode 100644
index 852d8e1..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_2.32.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "GNOME keyboard library"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812"
-
-SECTION = "x11/gnome/libs"
-
-DEPENDS = "gconf gtk+ glib-2.0 libxklavier intltool-native gnome-common-native"
-
-inherit gnome
-
-SRC_URI[archive.md5sum] = "de32a6e3e3464b566eecdc4332bf34bd"
-SRC_URI[archive.sha256sum] = "ddd52c4cc7d83ad7ef964a1bcb4db87407e65b00ffc3e70c088ca4ee7383d256"
-GNOME_COMPRESS_TYPE="bz2"
-
-do_configure_append() {
-    find ${B} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g
-    find ${B} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g
-}
-
-PNBLACKLIST[libgnomekbd] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130608/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb
new file mode 100644
index 0000000..12ed81d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb
@@ -0,0 +1,17 @@
+SUMMARY = "GNOME keyboard library"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812"
+
+SECTION = "x11/gnome/libs"
+
+DEPENDS = "gconf glib-2.0 libxklavier gtk+3 intltool-native"
+
+inherit gnome gobject-introspection gettext
+
+GNOME_COMPRESS_TYPE = "xz"
+
+SRC_URI[archive.md5sum] = "7b1ebf99f4254c99922163c262c7ff04"
+SRC_URI[archive.sha256sum] = "340b30dabfebbd4e0e6c0fe34a378966dd5640b5d44595ab8a19b0be255d77df"
+
+EXTRA_OECONF_remove = "--disable-schemas-install"
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl.inc b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl.inc
index a402037..1a5c815 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl.inc
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl.inc
@@ -1,4 +1,5 @@
 DESCRIPTION = "Library for parsing CORBA IDL files"
+HOMEPAGE = "http://andrewtv.org/libIDL/"
 SECTION = "x11/gnome/libs"
 LICENSE = "LGPLv2+"
 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb
new file mode 100644
index 0000000..d6aeed3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Time zone map widget for Gtk+"
+HOMEPAGE = "https://launchpad.net/timezonemap"
+SECTION = "devel/lib"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/libt/${BPN}/${BPN}_${PV}.tar.gz \
+"
+SRC_URI[md5sum] = "054306fa998fe580f17b68aa1e16551b"
+SRC_URI[sha256sum] = "327e64a17c676c1bcda3b6ba3394d3d01250e5ac9a49222b9ff5737d90b15383"
+
+
+DEPENDS = "gtk+3 gdk-pixbuf libsoup-2.4 json-glib gnome-common-native \
+"
+
+B = "${S}"
+
+inherit autotools pkgconfig gobject-introspection
+
+do_configure_prepend() {
+	(cd ${S}; NOCONFIGURE="yes" . ${S}/autogen.sh)
+}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/idl-sysroot.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/idl-sysroot.patch
deleted file mode 100644
index 0062cfb..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/idl-sysroot.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-Index: nautilus-2.24.2/add-include-prefix
-===================================================================
---- nautilus-2.24.2.orig/add-include-prefix	2008-10-06 17:22:21.000000000 +0000
-+++ nautilus-2.24.2/add-include-prefix	2009-04-09 16:00:05.000000000 +0000
-@@ -1 +1 @@
--sed -e 's/^/ /' -e 's/  */ /g' -e 's/ / -I /g' -e 's/ -I $//'
-+sed -e 's:^: :' -e 's:  *: :g' -e 's: : -I '"$SYSROOT"':g' -e 's: -I '"$SYSROOT"'$::'
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/no-G_DISABLE_DEPRECATED.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/no-G_DISABLE_DEPRECATED.patch
deleted file mode 100644
index 43a6152..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/no-G_DISABLE_DEPRECATED.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e7233d98c114b03c7c8b96d1f41770452da14aa7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmx.de>
-Date: Mon, 17 Oct 2011 00:59:01 +0200
-Subject: [PATCH] nautilus build fails for newer glib versions
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-build with glib-2.0 v2.30.0 run into errors for at least G_CONST_RETURN missing
-
-Signed-off-by: Andreas Müller <schnitzeltony@gmx.de>
----
- configure.in    |    2 +-
- eel/Makefile.am |    1 -
- 2 files changed, 1 insertions(+), 2 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 97e171e..859a097 100644
---- a/configure.in
-+++ b/configure.in
-@@ -342,7 +342,7 @@ AC_SUBST(CORE_CFLAGS)
- CORE_LIBS="`$PKG_CONFIG --libs $CORE_MODULES` $x_libs"
- AC_SUBST(CORE_LIBS)
- 
--DISABLE_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
-+DISABLE_DEPRECATED_CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED"
- AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
- 
- dnl Multimedia keys
-diff --git a/eel/Makefile.am b/eel/Makefile.am
-index b1fe356..c1d56cd 100644
---- a/eel/Makefile.am
-+++ b/eel/Makefile.am
-@@ -10,7 +10,6 @@ INCLUDES =						\
- 	-DDATADIR=\""$(datadir)"\"			\
- 	-DSOURCE_DATADIR=\""$(top_srcdir)/data"\"	\
- 	-DGNOMELOCALEDIR=\""$(prefix)/${DATADIRNAME}/locale"\"	\
--	-DG_DISABLE_DEPRECATED				\
- 	-DGDK_PIXBUF_DISABLE_DEPRECATED			\
- 	-DGMENU_I_KNOW_THIS_IS_UNSTABLE			\
- 	$(NULL)
--- 
-1.7.4.4
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus3_3.2.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus3_3.2.1.bb
deleted file mode 100644
index 5580f93..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus3_3.2.1.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-# nautilus OE build file
-# Copyright (C) 2005, Advanced Micro Devices, Inc.  All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-
-LICENSE="GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426 \
-                    file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
-
-PR = "r4"
-
-DEPENDS = "libnotify gtk+3 libunique gvfs librsvg libexif gnome-desktop3"
-# optional: tracker
-
-# to include nautilus3/no-try-run-strftime.diff before the rest
-FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
-BPN = "nautilus"
-inherit gnome
-
-SRC_URI += "file://no-try-run-strftime.diff"
-SRC_URI[archive.md5sum] = "12314328b59aa1dfd83619f718b81bd5"
-SRC_URI[archive.sha256sum] = "c482d6e7babcc238304cf55586cdf7e2b2806025214a143ed355f0d89b33b154"
-
-EXTRA_OECONF = " --disable-gtk-doc  --disable-update-mimedb --enable-nst-extension"
-export SYSROOT = "${STAGING_DIR_HOST}"
-
-do_configure() {
-    sed -i -e /docs/d ${S}/Makefile.am
-    autotools_do_configure
-}
-
-RDEPENDS_${PN} = "gvfs gvfsd-ftp gvfsd-sftp gvfsd-trash glib-2.0-utils"
-FILES_${PN} += "${datadir}/icons \
-                /usr/libexec/ \
-                ${datadir}/nautilus* \
-                ${datadir}/dbus-1 \
-                ${libdir}/nautilus/extensions*/*.so \
-"
-FILES_${PN}-dbg += "/usr/libexec/.debug \
-    ${libdir}/nautilus/extensions*/.debug"
-
-# Don't make nautils drag us in
-PRIVATE_LIBS = "libnautilus-extension.so.1"
-
-pkg_postinst_${PN} () {
-if [ -n "$D" ]; then
-    exit 1
-fi
-
-glib-compile-schemas ${datadir}/glib-2.0/schemas
-}
-
-# 3.2.1-r4/nautilus-3.2.1/eel/eel-gnome-extensions.c:34:50: fatal error: libgnome-desktop/gnome-desktop-utils.h: No such file or directory
-# 3.2.1-r4/nautilus-3.2.1/eel/eel-editable-label.c:3105:55: error: 'GTK_STOCK_CUT' undeclared (first use in this function)
-PNBLACKLIST[nautilus3] ?= "BROKEN: fails to build, maybe missing dependency on gnome-desktop-utils.h provider - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_2.32.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_2.32.2.bb
deleted file mode 100644
index caf7f57..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_2.32.2.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-# nautilus OE build file
-# Copyright (C) 2005, Advanced Micro Devices, Inc.  All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-
-LICENSE="GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7c0048536e43642a1f3a724c2909872b \
-                    file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
-
-PR = "r6"
-
-DEPENDS = "gdk-pixbuf gtk+ libunique gvfs librsvg libexif esound gnome-desktop orbit2-native"
-# optional: tracker
-
-inherit gnome gobject-introspection
-
-SRC_URI[archive.md5sum] = "51565aa10d1625dff56e381228346911"
-SRC_URI[archive.sha256sum] = "2d4ff28c7a7aa5d40eb2468149954a564c257a305183773057584d22d15347a2"
-GNOME_COMPRESS_TYPE="bz2"
-
-SRC_URI += "file://idl-sysroot.patch \
-            file://no-try-run-strftime.diff \
-            file://no-G_DISABLE_DEPRECATED.patch \
-"
-
-
-EXTRA_OECONF = " --disable-gtk-doc  --disable-update-mimedb "
-export SYSROOT = "${STAGING_DIR_HOST}"
-
-do_configure() {
-    sed -i -e /docs/d ${S}/Makefile.am
-    autotools_do_configure
-    # We need native orbit-idl with target idl files. No way to say it in a clean way:
-    find ${B} -name Makefile -exec sed -i '/\/usr\/bin\/orbit-idl-2/{s:/usr/bin:${STAGING_BINDIR_NATIVE}:;s:/usr/share:${STAGING_DATADIR}:g}' {} \;
-}
-
-RDEPENDS_${PN} = "gvfs gvfsd-ftp gvfsd-sftp gvfsd-trash glib-networking"
-FILES_${PN} += "${datadir}/icons"
-
-# Don't make nautils3 drag us in
-PRIVATE_LIBS = "libnautilus-extension.so.1"
-
-
-PNBLACKLIST[nautilus] ?= "Depends on blacklisted gnome-desktop - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.19.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.19.bb
index f9af2ee..eb43972 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.19.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.19.bb
@@ -1,4 +1,5 @@
 SUMMARY = "CORBA ORB"
+HOMEPAGE = "http://www.gnome.org/projects/ORBit2"
 SECTION = "x11/gnome/libs"
 LICENSE = "GPL-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts.inc b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts.inc
deleted file mode 100644
index fedd223..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-DESCRIPTION = "Address-book application."
-HOMEPAGE = "http://pimlico-project.org/contacts.html"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2 & GPLv2+ & GPLv3+ "
-SECTION = "x11"
-DEPENDS = "glib-2.0 gtk+ evolution-data-server intltool-native"
-RDEPENDS_${PN} = "libedata-book"
-
-inherit autotools pkgconfig gconf
-
-EXTRA_OECONF += "--disable-gnome-vfs"
-EXTRA_OEMAKE += "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1"
-
-do_install_append () {
-    install -d ${D}/${datadir}/pixmaps
-    install -m 0644 ${WORKDIR}/stock_contact.png ${D}/${datadir}/pixmaps
-    install -m 0644 ${WORKDIR}/stock_person.png ${D}/${datadir}/pixmaps
-}
-
-FILES_${PN} += "${datadir}/pixmaps/stock_contact.png \
-        ${datadir}/pixmaps/stock_person.png \
-        ${datadir}/icons/hicolor"
-
-SRC_URI = "file://stock_contact.png \
-           file://stock_person.png \
-           file://contacts-conditionally-install-schema.patch \
-"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/contacts-conditionally-install-schema.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/contacts-conditionally-install-schema.patch
deleted file mode 100644
index 2ab7882..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/contacts-conditionally-install-schema.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Install schema should respect to GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
-
-If GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL is set, the schema should not
-be installed.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Pending
----
- data/Makefile.am |    7 ++++---
- 1 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/data/Makefile.am b/data/Makefile.am
-index f790823..b6fd643 100644
---- a/data/Makefile.am
-+++ b/data/Makefile.am
-@@ -14,13 +14,14 @@ dist_man1_MANS = contacts.1
- 
- if HAVE_GCONF
- install-data-local:
--	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
-+	if [ "$(GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL)" != "1" ]; then \
-+		GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
- 		$(GCONFTOOL) --makefile-install-rule $(schema_DATA) || \
- 		(echo ;\
- 		echo "*****************************************************"; \
- 		echo "Installation of schemas failed, install them manually"; \
--		echo "*****************************************************";)
--		@true
-+		echo "*****************************************************";); \
-+	fi
- endif
- 
- CLEANFILES = $(desktop_DATA)
--- 
-1.7.7.6
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/make-382.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/make-382.patch
deleted file mode 100644
index a7cfee3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/make-382.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Fix for stricter parser in make 3.82. This fix has been pushed to upstream git.
-
-JL - 15/12/10
-
-Upstream-Status: Accepted
-
-Index: git/Makefile.am
-===================================================================
---- git.orig/Makefile.am
-+++ git/Makefile.am
-@@ -11,4 +11,4 @@ DISTCLEANFILES = $(INTLTOOL_BUILT)
- MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub configure depcomp $(INTLTOOL_BUILT:=.in) install-sh ltmain.sh mkinstalldirs Makefile.in missing
- 
- snapshot:
--        $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
-+	$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts_0.9.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts_0.9.bb
deleted file mode 100644
index 516cf93..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts_0.9.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require contacts.inc
-
-PR = "r8"
-
-SRC_URI =+ "http://pimlico-project.org/sources/${BPN}/${BPN}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "aab5affbf93d6fa7b978b323a8d44de0"
-SRC_URI[sha256sum] = "9cacec98f8123993033aaa255f3f4c04c86a1be65e487dd21f0aaa54384a6f6d"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://src/contacts-main.h;endline=18;md5=0371af46fbc72e33575e0072dca5fb19 \
-                    file://src/contacts-dbus.c;endline=18;md5=e4da9ac1a0539fafc7df431010904fd5 \
-                    file://src/contacts-gtk.c;endline=21;md5=1c2e3f55b215635eff4ba76f7696f8ee"
-
-do_configure_prepend () {
-    # It used 8 spaces to instead of a tab, but it doesn't work for us
-    sed -i 's/^        $(MAKE) dist distdir=/\t$(MAKE) dist distdir/' Makefile.am
-}
-
-PNBLACKLIST[contacts] ?= "Fails to fetch, pimlico-project.org is gone http://errors.yoctoproject.org/Errors/Details/132854/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts_git.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts_git.bb
deleted file mode 100644
index b46e9d9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts_git.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require contacts.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://src/contacts-main.h;endline=20;md5=9dc3531c914fb6d6d4a8d1aee4519fef \
-                    file://src/contacts-dbus.c;endline=20;md5=95e02d77f155fbd07a14dba3348b9b03 \
-                    file://src/contacts-gtk.c;endline=23;md5=e1ee9b9e72045f2d3aa44cf17313b46e"
-
-SRCREV = "19853893fdb595de6aa59db0d9dc2f9451ed2933"
-PV = "0.12+git${SRCPV}"
-PR = "r4"
-
-S = "${WORKDIR}/git"
-
-SRC_URI =+ "git://git.gnome.org/${BPN} \
-        file://make-382.patch"
-
-S = "${WORKDIR}/git"
-
-PNBLACKLIST[contacts] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/132826/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks.inc b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks.inc
deleted file mode 100644
index f8217dc..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-DESCRIPTION = "Task list application"
-HOMEPAGE = "http://pimlico-project.org/tasks.html"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2 & GPLv2+"
-
-SECTION = "x11"
-DEPENDS = "glib-2.0 gtk+ evolution-data-server intltool-native"
-
-inherit autotools pkgconfig gtk-icon-cache
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks_0.19.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks_0.19.bb
deleted file mode 100644
index 42c20c47..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks_0.19.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require tasks.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://src/gtk/main.c;endline=19;md5=8659d0b7fd68a2ad6ac30c6539ea5b82 \
-                    file://src/omoko/openmoko-tasks.c;endline=20;md5=04d56a46863c9f4247694f40257a836a \
-                    file://src/hildon/hildon-tasks.c;endline=21;md5=488ddf31dc14b2196dec7cc736211b52"
-
-SRC_URI = "http://pimlico-project.org/sources/${BPN}/${BPN}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "0afd969758561599fd782e1effb39c08"
-SRC_URI[sha256sum] = "1a7fdc5f95a2193a1a25fdb13f071867fb7e42245ce19ccee4bcccb69e557f2e"
-
-PR = "r3"
-
-# tasks-0.19/libkoto/koto-utils.c:81:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
-PNBLACKLIST[tasks] ?= "Fails to build with gcc-6 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks_git.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks_git.bb
deleted file mode 100644
index b71f1dc..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/tasks_git.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require tasks.inc
-
-SRC_URI = "git://git.gnome.org/${BPN}"
-
-SRCREV = "ea52d46d691c5fce4473ea4e24a35411381f3a65"
-PV = "0.13+git${SRCPV}"
-PR = "r3"
-
-S = "${WORKDIR}/git"
-
-# ../../git/libkoto/koto-utils.c:81:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
-PNBLACKLIST[tasks] ?= "Fails to build with gcc-6 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends-2.10.2/add-angstrom-distro.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends-2.10.2/add-angstrom-distro.patch
deleted file mode 100644
index cb03fd8..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends-2.10.2/add-angstrom-distro.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b5084616a3bc2a0d485f43aeae69c6025f3f857e Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 10 Jun 2011 18:44:21 +0200
-Subject: [PATCH] add support for the angstrom distribtion
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- Utils/Platform.pm |    3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git a/Utils/Platform.pm b/Utils/Platform.pm
-index fc76360..8b8c770 100644
---- a/Utils/Platform.pm
-+++ b/Utils/Platform.pm
-@@ -92,6 +92,7 @@ my $PLATFORM_INFO = {
-   "nexenta-1.0"     => [ "Nexenta GNU/Solaris", "1.0", "Ellate" ],
-   "yellowdog-4.1"   => [ "Yellow Dog Linux", "4.1", "Sagitta" ],
-   "guadalinex-v4"   => [ "Guadalinex", "v4", "Toro" ],
-+  "angstrom"        => [ "Angstrom", "", "" ],
- };
- 
- sub get_platform_info
-@@ -143,6 +144,7 @@ sub ensure_distro_map
-      "vine-3.1"         => "vine-3.0",
-      "vlos-1.2"         => "gentoo",
-      "nexenta-1.0"      => "solaris-2.11",
-+     "angstrom"         => "debian",
-      );
- 
-   return $metamap{$distro} if ($metamap{$distro});
-@@ -375,6 +377,7 @@ sub guess
-                   [ \&check_ark ],
-                   [ \&check_yoper ],
-                   [ \&check_distro_file, "/etc/yellowdog-release", "yellowdog", "^Yellow Dog Linux release (\\S+)" ],
-+                  [ \&check_file_exists, "/etc/angstrom-version", "angstrom" ],
-                  ],
-     "FreeBSD" => [[ \&check_freebsd ]],
-     "SunOS"   => [[ \&check_solaris ]]
--- 
-1.6.6.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends_2.10.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends_2.10.2.bb
deleted file mode 100644
index 862c0ea..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends_2.10.2.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "gnome system tools backends"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "dbus dbus-glib glib-2.0 polkit"
-
-inherit gnome pkgconfig update-rc.d gettext
-
-SRC_URI[archive.md5sum] = "edae148b31342aecae035051adc70c74"
-SRC_URI[archive.sha256sum] = "1dbe5177df46a9c7250735e05e77129fe7ec04840771accfa87690111ca2c670"
-
-SRC_URI += " \
-            file://system-tools-backends \
-"
-
-# This needs to move to meta-angstrom
-SRC_URI_append_angstrom = " \
-            file://add-angstrom-distro.patch \
-"
-
-EXTRA_OECONF = " --with-net-dbus=${libdir}/perl5 "
-
-do_configure() {
-    rm missing || true
-    automake --add-missing
-    sed -i -e 's:CC=$(CC):CC="$(CC)":g' ${S}/Net-DBus/Makefile.am
-    sed -i -e 's:CC=$(CC):CC="$(CC)":g' ${S}/Net-DBus/Makefile.in
-    libtoolize --force --install
-    aclocal
-    gnu-configize
-    oe_runconf
-    cp ${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool ${S}
-}
-
-do_install_append () {
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/system-tools-backends ${D}/${sysconfdir}/init.d/
-}
-
-INITSCRIPT_NAME = "system-tools-backends"
-INITSCRIPT_PARAMS = "start 50 2 3 4 5 . stop 70 1 ."
-
-# Shadow added so there is a full adduser/deluser
-# (Gnome images tend to pull in shadow anyway)
-RDEPENDS_${PN} = "shadow"
-
-FILES_${PN} += " ${sysconfdir}/dbus-1/system.d"
-FILES_${PN} += " ${libdir}/pkgconfig"
-FILES_${PN} += " ${datadir}/dbus-1/system-services"
-FILES_${PN} += " ${datadir}/system-tools-backends-2.0/files"
-FILES_${PN} += " ${datadir}/system-tools-backends-2.0/scripts"
-FILES_${PN} += " ${datadir}/polkit*"
-
-PNBLACKLIST[system-tools-backends] ?= "does not build with distroless qemuarm as reported in 'State of bitbake world' thread, nobody volunteered to fix them - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/zenity/files/0001-Makefile.am-don-t-build-help.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/zenity/files/0001-Makefile.am-don-t-build-help.patch
deleted file mode 100644
index 50c9cb9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/zenity/files/0001-Makefile.am-don-t-build-help.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 17e5606f8c4c8ff26ba18489aad4c484cf8e2949 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Mon, 29 Apr 2013 11:34:27 +0200
-Subject: [PATCH] Makefile.am: don't build help
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-it crashes with:
-
-| warning: failed to load external entity "/usr/share/xml/gnome/xslt/docbook/omf/db2omf.xsl"
-| cannot parse /usr/share/xml/gnome/xslt/docbook/omf/db2omf.xsl
-| make[2]: *** [zenity-bg.omf] Error 1
-| make[2]: Leaving directory `/home/andreas/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/zenity/2.32.1-r2/zenity-2.32.1/help'
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- Makefile.am |    3 +--
- 1 files changed, 1 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 03accc1..caec7f0 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,8 +1,7 @@
- SUBDIRS = \
- 	src	\
- 	po	\
--	data	\
--	help
-+	data
- 
- EXTRA_DIST = \
- 	autogen.sh		\
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_2.32.1.bb
deleted file mode 100644
index bd9f7a0..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_2.32.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Display dialog boxes from the commandline and shell scripts"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-PR = "r2"
-
-PNBLACKLIST[zenity] ?= "BROKEN: doesn't build with B!=S - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-DEPENDS = "gtk+ glib-2.0 libnotify gnome-doc-utils"
-
-inherit gnomebase
-SRC_URI += "file://0001-Makefile.am-don-t-build-help.patch"
-SRC_URI[archive.md5sum] = "aa66ec35451b16e424519b4973082170"
-SRC_URI[archive.sha256sum] = "8838be041a07364b62a4281c971392e4a09bb01bb3237a836ec0457ec0ea18ac"
-
-EXTRA_OECONF += "--disable-scrollkeeper"
-# remove -I/usr/include from zenity_CPPFLAGS
-do_configure_prepend() {
-    sed -i -e '/-I$(includedir)/d' src/Makefile.am
-}
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/files/0001-Fix-glib-includes.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/files/0001-Fix-glib-includes.patch
deleted file mode 100644
index 83e598e..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/files/0001-Fix-glib-includes.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From c8419ef05ff92ffa3de2e626eb6acd5d2df3baa1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Tue, 15 May 2012 13:40:05 +0200
-Subject: [PATCH] Fix glib includes
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-Upstream-Status: unknown
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- src/trace.c |    5 +----
- 1 files changed, 1 insertions(+), 4 deletions(-)
-
-diff --git a/src/trace.c b/src/trace.c
-index 5ea5c13..774c56d 100644
---- a/src/trace.c
-+++ b/src/trace.c
-@@ -21,10 +21,7 @@
- 
- #include "trace.h"
- #include "system.h"
--#include <glib/gprintf.h>
--#include <glib/gutils.h>
--#include <glib/gslist.h>
--#include <glib/gstrfuncs.h>
-+#include <glib.h>
- #include <stdio.h>
- #include <stdarg.h>
- 
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/files/fix-no-atspi-compile.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/files/fix-no-atspi-compile.patch
deleted file mode 100644
index 0bb5dee..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/files/fix-no-atspi-compile.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/src/florence.c b/src/florence.c
-index b27c31b..feadefe 100644
---- a/src/florence.c
-+++ b/src/florence.c
-@@ -44,12 +44,6 @@
- /* exit signal */
- static int flo_exit=FALSE;
- 
--#ifdef ENABLE_AT_SPI2
--void flo_check_show (struct florence *florence, AtspiAccessible *obj);
--#else
--void flo_check_show (struct florence *florence, Accessible *obj);
--#endif
--
- /* Called on destroy event (systray quit or close window) */
- void flo_destroy (void)
- {
-@@ -61,6 +55,12 @@ void flo_destroy (void)
- }
- 
- #ifdef AT_SPI
-+#ifdef ENABLE_AT_SPI2
-+void flo_check_show (struct florence *florence, AtspiAccessible *obj);
-+#else
-+void flo_check_show (struct florence *florence, Accessible *obj);
-+#endif
-+
- /* Called to destroy the icon */
- void flo_icon_destroy (GtkWidget *widget, gpointer user_data)
- {
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.5.4.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.5.4.bb
deleted file mode 100644
index 8ce85c9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.5.4.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-DESCRIPTION = "Florence is a virtual keyboard (also called on-screen-keyboard), which allows the user to input text through a touchscreen."
-HOMEPAGE = "http://florence.sourceforge.net/english.html"
-
-#NOTICE: If florence can't find its gconf settings, you need to start florence with --config for one time and save the configuration once.
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-PR = "r1"
-
-DEPENDS = "gtk+ libxml2 libglade librsvg libxtst gconf gconf-native cairo intltool-native gnome-doc-utils libnotify gstreamer"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/florence/florence/${PV}-gtk2/florence-${PV}.tar.bz2 \
-           file://fix-no-atspi-compile.patch"
-SRC_URI[md5sum] = "8d5c2367a28485bfcf577650b0badab7"
-SRC_URI[sha256sum] = "26d33aa20d5fbf34ceeded4c41cb922d2988b6082e33d9acc46dd7bfe56d31a1"
-
-inherit gettext autotools gconf pkgconfig
-
-EXTRA_OECONF = "--disable-scrollkeeper --without-docs --without-at-spi --without-panelapplet --without-xrecord"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.6.3.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.6.3.bb
new file mode 100644
index 0000000..b9b7d0c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.6.3.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Florence is a virtual keyboard for touch screens"
+HOMEPAGE = "http://florence.sourceforge.net/english.html"
+
+#NOTICE: If florence can't find its gconf settings, you need to start florence with --config for one time and save the configuration once.
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+DEPENDS = "gtk+3 libxml2 libglade librsvg libxtst gconf gconf-native cairo intltool-native gnome-doc-utils libnotify gstreamer1.0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/${PN}/${PN}/${PV}/${PN}-${PV}.tar.bz2"
+SRC_URI[md5sum] = "8775051d7352f75dec5a86dc9964e8e0"
+SRC_URI[sha256sum] = "422992fd07d285be73cce721a203e22cee21320d69b0fda1579ce62944c5091e"
+
+inherit gettext autotools gconf pkgconfig
+
+EXTRA_OECONF = "--disable-scrollkeeper --without-docs --without-at-spi --without-panelapplet --without-xrecord"
+
+FILES_${PN} += "${datadir}/glib-2.0/schemas"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/goffice/goffice/0001-configure.ac-fix-paths-to-introspection-tools.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/goffice/goffice/0001-configure.ac-fix-paths-to-introspection-tools.patch
deleted file mode 100644
index a645978..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/goffice/goffice/0001-configure.ac-fix-paths-to-introspection-tools.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8e158c16cd15fff08b42ed86edc55816d3387837 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 19 Feb 2016 16:04:24 +0200
-Subject: [PATCH] configure.ac: fix paths to introspection tools
-
-They need to be prefixed with $PKG_CONFIG_SYSROOT_DIR
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 6d2b747..3b28463 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -706,9 +706,9 @@ if test "x$found_introspection" = "xyes"; then
-    dnl python where to find libgoffice, so you might also need to set
-    dnl LD_LIBRARY_PATH.
- 
--   INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
--   INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
--   INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-+   INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
-+   INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
-+   INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-    if test "x$INTROSPECTION_GIRDIR" = x; then
-      INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
-    fi
-@@ -717,7 +717,7 @@ if test "x$found_introspection" = "xyes"; then
-    fi
-    INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
-    INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
--   INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
-+   INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
- else
-    INTROSPECTION_SCANNER=
-    INTROSPECTION_COMPILER=
--- 
-2.7.0
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/goffice/goffice_0.10.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/goffice/goffice_0.10.1.bb
deleted file mode 100644
index 6a2080d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/goffice/goffice_0.10.1.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-DESCRIPTION="Gnome Office Library"
-
-LICENSE="GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6dc33ff21e1ba1ac1a2a1069d361e29e"
-
-DEPENDS = "libxml-parser-perl-native glib-2.0 gtk+3 pango cairo libgsf libpcre libxml2 libart-lgpl librsvg intltool"
-
-inherit gnomebase pkgconfig perlnative gobject-introspection
-
-GNOME_COMPRESS_TYPE = "xz"
-
-SRC_URI += "file://0001-configure.ac-fix-paths-to-introspection-tools.patch"
-
-SRC_URI[archive.md5sum] = "90fd17c6fe205b779571e00d9b0b4727"
-SRC_URI[archive.sha256sum] = "5c38f4e81e874cc8e89481b080f77c47c72bfd6fe2526f4fc2ef87c17f96cad0"
-
-FILES_${PN}-dbg += "${libdir}/goffice/${PV}/plugins/*/.debug"
-
-RRECOMMENDS_${PN} = " \
-    goffice-plugin-plot-barcol \
-    goffice-plugin-plot-distrib \
-    goffice-plugin-plot-pie \
-    goffice-plugin-plot-radar \
-    goffice-plugin-plot-surface \
-    goffice-plugin-plot-xy \
-    goffice-plugin-reg-linear \
-    goffice-plugin-reg-logfit \
-    goffice-plugin-smoothing \
-"
-
-FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
-    ${sysconfdir} ${sharedstatedir} ${localstatedir} \
-    ${base_bindir}/* ${base_sbindir}/* \
-    ${base_libdir}/*${SOLIBS} \
-    ${datadir}/${PN} \
-    ${datadir}/pixmaps ${datadir}/applications \
-    ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
-    ${libdir}/bonobo/servers"
-
-FILES_${PN}-locale = "${libdir}/locale"
-
-PACKAGES_DYNAMIC += "^goffice-plugin-.*"
-
-python populate_packages_prepend () {
-    goffice_libdir = d.expand('${libdir}/goffice/${PV}/plugins/')
-
-    do_split_packages(d, goffice_libdir, '(.*)', 'goffice-plugin-%s', 'Goffice plugin for %s', allow_dirs=True)
-}
-
-# | ../../goffice-0.10.1/goffice/math/go-complex.c:75:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
-PNBLACKLIST[goffice] ?= "BROKEN: fails to build with gcc-6 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb
new file mode 100644
index 0000000..d6744a3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "keybinder is a library for registering global key bindings, for gtk-based applications."
+HOMEPAGE = "https://github.com/engla/keybinder"
+LICENSE = "X11"
+SECTION = "devel/lib"
+DEPENDS = "gtk+3 gobject-introspection-native \
+           gtk+ \
+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=1f18f9c6d8b4cfcc7d7804a243a4c0b4"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+SRCREV = "736ccef40d39603b8111c8a3a0bca0319bbafdc0"
+PV = "3.0+git${SRCPV}"
+SRC_URI = "git://github.com/engla/keybinder.git;branch=keybinder-3.0 \
+"
+
+RDEPENDS_${PN} = "gtk+"
+
+inherit autotools gtk-doc gobject-introspection
+do_configure_prepend() {
+	touch ${S}/ChangeLog
+}
+
+SRC_DISTRIBUTE_LICENSES += "X11"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch
new file mode 100644
index 0000000..fda3789
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch
@@ -0,0 +1,67 @@
+From 1c95f64aa342147387ce4b1b7269a5c8b34bd898 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 09:01:04 -0700
+Subject: [PATCH] pypredict/lm: Define error API if platform does not have it
+
+error() API is not implemented across all libcs on linux
+e.g. musl does not provide it.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Onboard/pypredict/lm/lm.cpp         |  1 -
+ Onboard/pypredict/lm/lm.h           | 13 +++++++++++++
+ Onboard/pypredict/lm/lm_dynamic.cpp |  2 --
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/Onboard/pypredict/lm/lm.cpp b/Onboard/pypredict/lm/lm.cpp
+index 2e64296..37ae241 100644
+--- a/Onboard/pypredict/lm/lm.cpp
++++ b/Onboard/pypredict/lm/lm.cpp
+@@ -19,7 +19,6 @@
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
+-#include <error.h>
+ #include <algorithm>
+ #include <cmath>
+ #include <string>
+diff --git a/Onboard/pypredict/lm/lm.h b/Onboard/pypredict/lm/lm.h
+index ed4164a..b8b63ee 100644
+--- a/Onboard/pypredict/lm/lm.h
++++ b/Onboard/pypredict/lm/lm.h
+@@ -32,6 +32,19 @@
+ #include <algorithm>
+ #include <string>
+ 
++#if defined(HAVE_ERROR_H)
++#include <error.h>
++#else
++#include <err.h>
++#define _onboard_error(S, E, F, ...) do { \
++       if (E) \
++               err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
++       else \
++               err(S, F, ##__VA_ARGS__); \
++} while(0)
++
++#define error _onboard_error
++#endif
+ 
+ // break into debugger
+ // step twice to come back out of the raise() call into known code
+diff --git a/Onboard/pypredict/lm/lm_dynamic.cpp b/Onboard/pypredict/lm/lm_dynamic.cpp
+index 7c62824..e7c7f40 100644
+--- a/Onboard/pypredict/lm/lm_dynamic.cpp
++++ b/Onboard/pypredict/lm/lm_dynamic.cpp
+@@ -17,8 +17,6 @@
+  * along with this program. If not, see <http://www.gnu.org/licenses/>.
+  */
+ 
+-#include <error.h>
+-
+ #include "lm_dynamic.h"
+ 
+ using namespace std;
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.3.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.3.0.bb
deleted file mode 100644
index bdf0a4e..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.3.0.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "An onscreen keyboard"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.GPL3;md5=8521fa4dd51909b407c5150498d34f4e"
-
-DEPENDS += "gtk+3 hunspell libcanberra libxkbfile dconf python3-distutils-extra-native intltool-native"
-
-SRC_URI = "https://launchpad.net/onboard/1.3/${PV}/+download/${BPN}-${PV}.tar.gz"
-SRC_URI[md5sum] = "8000df3e789512a90fcb227580fd60ff"
-SRC_URI[sha256sum] = "fd74b54b8bd7a075cf5f6e1a8ca3e6de5cd2663507adb690d7b1a85e71afa2e4"
-
-inherit setuptools3 pkgconfig gtk-icon-cache gsettings
-
-FILES_${PN} += " \
-    ${datadir}/dbus-1 \
-    ${datadir}/icons \
-    ${datadir}/gnome-shell \
-    ${datadir}/help \
-"
-
-RDEPENDS_${PN} += " \
-    ncurses \
-    python3-dbus \
-    python3-pycairo \
-    python3-pygobject \
-"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
new file mode 100644
index 0000000..10765ee
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
@@ -0,0 +1,27 @@
+SUMMARY = "An onscreen keyboard"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING.GPL3;md5=8521fa4dd51909b407c5150498d34f4e"
+
+DEPENDS += "gtk+3 hunspell libcanberra libxkbfile dconf python3-distutils-extra-native intltool-native"
+
+SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz \
+           file://0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch \
+           "
+SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
+SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"
+
+inherit setuptools3 pkgconfig gtk-icon-cache gsettings
+
+FILES_${PN} += " \
+    ${datadir}/dbus-1 \
+    ${datadir}/icons \
+    ${datadir}/gnome-shell \
+    ${datadir}/help \
+"
+
+RDEPENDS_${PN} += " \
+    ncurses \
+    python3-dbus \
+    python3-pycairo \
+    python3-pygobject \
+"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/enable-sqlite-crosscompile.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/enable-sqlite-crosscompile.patch
deleted file mode 100644
index 5dadda2..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/enable-sqlite-crosscompile.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: tracker-0.10.17/m4/sqlite-threadsafe.m4
-===================================================================
---- tracker-0.10.17.orig/m4/sqlite-threadsafe.m4
-+++ tracker-0.10.17/m4/sqlite-threadsafe.m4
-@@ -45,7 +45,7 @@ int main ()
-   ]])],
-        [ax_cv_sqlite_threadsafe=yes],
-        [ax_cv_sqlite_threadsafe=no],
--       [ax_cv_sqlite_threadsafe=no])])
-+       [ax_cv_sqlite_threadsafe=yes])])
- 
-   LIBS="$save_LIBS"
- ])
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch
deleted file mode 100644
index 6c3d9de..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: tracker-0.14.2/src/libtracker-miner/tracker-storage.c
-===================================================================
---- tracker-0.14.2.orig/src/libtracker-miner/tracker-storage.c	2011-08-03 13:53:16.000000000 +0100
-+++ tracker-0.14.2/src/libtracker-miner/tracker-storage.c	2012-09-10 08:25:18.322215126 +0100
-@@ -20,6 +20,7 @@
- #include "config.h"
- 
- #include <string.h>
-+#include <sys/stat.h>
- 
- #include <gio/gio.h>
- #include <gio/gunixmounts.h>
-@@ -646,6 +647,17 @@
- 				gchar *content_type;
- 				gboolean is_multimedia;
- 				gboolean is_blank;
-+                                struct stat st;
-+
-+                                /*
-+                                 * Consider all files under /media to be
-+                                 * removable unless the file .this-is-root is
-+                                 * present.
-+                                 */
-+                                if (!strncmp (mount_path, "/media/",
-+                                              strlen ("/media/")) &&
-+                                    stat ("/media/.this-is-root", &st))
-+                                  is_removable = TRUE;
- 
- 				content_type = mount_guess_content_type (mount, &is_optical, &is_multimedia, &is_blank);
- 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/giflib5-support.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/giflib5-support.patch
deleted file mode 100644
index fab3371..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker-0.14.2/giflib5-support.patch
+++ /dev/null
@@ -1,126 +0,0 @@
- src/tracker-extract/tracker-extract-gif.c |   36 +++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
---- a/src/tracker-extract/tracker-extract-gif.c	
-+++ a/src/tracker-extract/tracker-extract-gif.c	
-@@ -75,6 +75,39 @@
- 	return (GIF_OK);
- }
- 
-+#if GIFLIB_MAJOR >= 5
-+static inline void
-+gif_error (const gchar *action, int err)
-+{
-+	const char *str = GifErrorString (err);
-+	if (str != NULL) {
-+		g_message ("%s, error: '%s'", action, str);
-+	} else {
-+		g_message ("%s, undefined error %d", action, err);
-+	}
-+}
-+#else /* GIFLIB_MAJOR >= 5 */
-+static inline void print_gif_error()
-+{
-+#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
-+	const char *str = GifErrorString ();
-+	if (str != NULL) {
-+		g_message ("GIF, error: '%s'", str);
-+	} else {
-+		g_message ("GIF, undefined error");
-+	}
-+#else
-+	PrintGifError();
-+#endif
-+}
-+#endif /* GIFLIB_MAJOR >= 5 */
-+
-+/* giflib 5.1 changed the API of DGifCloseFile to take two arguments */
-+#if !defined(GIFLIB_MAJOR) || \
-+    !(GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1))
-+#define DGifCloseFile(a, b) DGifCloseFile(a)
-+#endif
-+
- static void
- read_metadata (TrackerSparqlBuilder *preupdate,
-                TrackerSparqlBuilder *metadata,
-@@ -100,14 +133,22 @@
- 		ExtBlock extBlock;
- 
- 		if (DGifGetRecordType(gifFile, &RecordType) == GIF_ERROR) {
--			PrintGifError();
-+#if GIFLIB_MAJOR < 5
-+			print_gif_error ();
-+#else  /* GIFLIB_MAJOR < 5 */
-+			gif_error ("Could not read next GIF record type", gifFile->Error);
-+#endif /* GIFLIB_MAJOR < 5 */
- 			return;
- 		}
- 
- 		switch (RecordType) {
- 			case IMAGE_DESC_RECORD_TYPE:
- 			if (DGifGetImageDesc(gifFile) == GIF_ERROR) {
--				PrintGifError();
-+#if GIFLIB_MAJOR < 5
-+				print_gif_error();
-+#else  /* GIFLIB_MAJOR < 5 */
-+				gif_error ("Could not get GIF record information", gifFile->Error);
-+#endif /* GIFLIB_MAJOR < 5 */
- 				return;
- 			}
- 
-@@ -117,7 +158,11 @@
- 			framedata = g_malloc (framewidth*frameheight);
- 
- 			if (DGifGetLine(gifFile, framedata, framewidth*frameheight)==GIF_ERROR) {
--				PrintGifError();
-+#if GIFLIB_MAJOR < 5
-+				print_gif_error();
-+#else  /* GIFLIB_MAJOR < 5 */
-+				gif_error ("Could not load a block of GIF pixes", gifFile->Error);
-+#endif /* GIFLIB_MAJOR < 5 */
- 				return;
- 			}
- 
-@@ -593,6 +638,9 @@
- 	gchar *filename, *uri;
- 	GFile *file;
- 	int fd;
-+#if GIFLIB_MAJOR >= 5
-+	int err;
-+#endif
- 
- 	preupdate = tracker_extract_info_get_preupdate_builder (info);
- 	metadata = tracker_extract_info_get_metadata_builder (info);
-@@ -617,8 +665,14 @@
- 		return FALSE;
- 	}	
- 
-+#if GIFLIB_MAJOR < 5
- 	if ((gifFile = DGifOpenFileHandle (fd)) == NULL) {
--		PrintGifError ();
-+		print_gif_error ();
-+#else   /* GIFLIB_MAJOR < 5 */
-+	if ((gifFile = DGifOpenFileHandle (fd, &err)) == NULL) {
-+		gif_error ("Could not open GIF file with handle", err);
-+#endif /* GIFLIB_MAJOR < 5 */
-+		g_free (filename);
- 		close (fd);
- 		return FALSE;
- 	}
-@@ -637,10 +691,15 @@
- 	g_string_free (where, TRUE);
- 
- 	g_free (uri);
--
-+#if GIFLIB_MAJOR < 5
- 	if (DGifCloseFile (gifFile) != GIF_OK) {
--		PrintGifError ();
-+		print_gif_error ();
-+	}
-+#else  /* GIFLIB_MAJOR < 5 */
-+	if (DGifCloseFile (gifFile, NULL) != GIF_OK) {
-+		gif_error ("Could not close GIF file", gifFile->Error);
- 	}
-+#endif /* GIFLIB_MAJOR < 5 */
- 
- 	return TRUE;
- }
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker_0.14.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker_0.14.2.bb
deleted file mode 100644
index eb36a12..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/tracker_0.14.2.bb
+++ /dev/null
@@ -1,88 +0,0 @@
-DESCRIPTION = "Tracker is a tool designed to extract information and metadata about your personal data so that it can be searched easily and quickly."
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ee31012bf90e7b8c108c69f197f3e3a4"
-DEPENDS = "file gstreamer dbus libexif gettext sqlite3 icu gst-plugins-base libgnome-keyring poppler tiff enca libgsf libunistring giflib taglib bzip2 upower gtk+3 libgee networkmanager intltool-native"
-
-RDEPENDS_${PN} += " gvfs gsettings-desktop-schemas"
-
-RDEPENDS_${PN}-nautilus-extension += "nautilus"
-HOMEPAGE = "http://projects.gnome.org/tracker/"
-
-PR = "r7"
-
-inherit autotools pkgconfig gnomebase gettext gsettings systemd gobject-introspection
-
-VER_DIR = "${@gnome_verdir("${PV}")}"
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/tracker/${VER_DIR}/tracker-${PV}.tar.xz \
-           file://enable-sqlite-crosscompile.patch \
-           file://fix-removable-media-detection.patch \
-           file://giflib5-support.patch \
-           file://90tracker \
-           file://tracker-store.service \
-           file://tracker-miner-fs.service \
-           file://tracker-dbus.service \
-           "
-
-SYSTEMD_SERVICE_${PN} = " tracker-store.service tracker-miner-fs.service tracker-dbus.service "
-SYSTEMD_AUTO_ENABLE = "disable"
-
-EXTRA_OECONF += " tracker_cv_have_ioprio=yes"
-
-PACKAGECONFIG ?= "nautilus"
-PACKAGECONFIG[nautilus] = "--enable-nautilus-extension,--disable-nautilus-extension,nautilus"
-
-# Disable the desktop-centric miners
-EXTRA_OECONF += "--disable-miner-thunderbird --disable-miner-firefox \
-                 --disable-miner-evolution --disable-miner-flickr"
-
-LEAD_SONAME = "libtrackerclient.so.0"
-
-do_compile_prepend() {
-        export GIR_EXTRA_LIBS_PATH="${B}/src/libtracker-sparql-backend/.libs:${B}/src/libtracker-data/.libs:${B}/src/libtracker-common/.libs"
-}
-
-do_install_append() {
-    cp -PpR ${D}${STAGING_DATADIR}/* ${D}${datadir}/ || true
-#   install -d ${D}/${sysconfdir}/X11/Xsession.d/
-#   install -m 0755 ${WORKDIR}/90tracker  ${D}/${sysconfdir}/X11/Xsession.d/
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/tracker-store.service ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/tracker-miner-fs.service ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/tracker-dbus.service ${D}${systemd_unitdir}/system
-    sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
-           -e 's,@BASE_BINDIR@,${base_bindir},g' \
-               ${D}${systemd_unitdir}/system/*.service
-}
-
-PACKAGES =+ "${PN}-tests ${PN}-vala ${PN}-nautilus-extension"
-
-FILES_${PN} += "${datadir}/dbus-1/ \
-                ${libdir}/tracker-${VER_DIR}/*.so.* \
-                ${libdir}/tracker-${VER_DIR}/extract-modules/*.so \
-                ${libdir}/tracker-${VER_DIR}/writeback-modules/*.so \
-                ${datadir}/icons/hicolor/*/apps/tracker.* \
-                ${libdir}/nautilus/extensions-2.0/*.la \
-                ${datadir}/glib-2.0/schemas/* \
-                ${systemd_unitdir}/system/tracker-store.service \
-                ${systemd_unitdir}/system/tracker-miner-fs.service \
-                ${systemd_unitdir}/system/tracker-dbus.service \
-"
-
-FILES_${PN}-dev += "${libdir}/tracker-${VER_DIR}/*.la \
-                    ${libdir}/tracker-${VER_DIR}/*.so \
-                    ${libdir}/tracker-${VER_DIR}/*/*.la \
-                    ${libdir}/tracker-${VER_DIR}/extract-modules/*.la"
-
-FILES_${PN}-staticdev += "${libdir}/nautilus/extensions-2.0/*.a"
-FILES_${PN}-dbg += "${libdir}/*/*/.debug \
-                    ${libdir}/*/.debug"
-FILES_${PN}-tests = "${datadir}/tracker-tests/"
-FILES_${PN}-vala = "${datadir}/vala/"
-FILES_${PN}-nautilus-extension += "${libdir}/nautilus/extensions-2.0/*.so"
-
-SRC_URI[md5sum] = "f3a871beeebf86fd752863ebd22af9ac"
-SRC_URI[sha256sum] = "9b59330aa2e9e09feee587ded895e9247f71fc25f46b023d616d9969314bc7f1"
-
-# http://errors.yoctoproject.org/Errors/Details/81007/
-PNBLACKLIST[tracker] ?= "BROKEN: fails to build with new binutils-2.27 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-Makefile.am-Link-with-libm-for-powl-API.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-Makefile.am-Link-with-libm-for-powl-API.patch
new file mode 100644
index 0000000..76640b0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-Makefile.am-Link-with-libm-for-powl-API.patch
@@ -0,0 +1,26 @@
+From fda0ff49968aebc7b27f9711cf6eb7f6c560adc1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 25 Jul 2017 18:28:15 -0700
+Subject: [PATCH] Makefile.am: Link with libm for powl() API
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4219f28..2a5ceac 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -69,7 +69,7 @@ dist_pkgdata_DATA = usermode.ui
+ userhelper_SOURCES = userhelper.c userhelper.h shvar.c shvar.h
+ userhelper_CPPFLAGS = $(AM_CPPFLAGS) -DSYSCONFDIR='"$(sysconfdir)"'
+ userhelper_LDADD = liblib.a $(LIBUSER_LIBS) $(GLIB_LIBS) $(PAM_LIBS) \
+-	$(SELINUX_LIBS) $(EFENCE_LIBS)
++	$(SELINUX_LIBS) $(EFENCE_LIBS) -lm
+ 
+ userinfo_SOURCES = userinfo.c
+ userinfo_CPPFLAGS = $(AM_CPPFLAGS) $(PIXMAPDIR_CPPFLAGS) $(SBINDIR_CPPFLAGS) \
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-fix-compile-failure-against-musl-C-library.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-fix-compile-failure-against-musl-C-library.patch
new file mode 100644
index 0000000..bf19f28
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-fix-compile-failure-against-musl-C-library.patch
@@ -0,0 +1,27 @@
+From c77e3f0d4560797f7dc56549ae5ebcc035714a4d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 20 Jul 2017 23:20:53 -0400
+Subject: [PATCH] fix compile failure against musl C library
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ usermount.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/usermount.c b/usermount.c
+index 3aafadd..4107027 100644
+--- a/usermount.c
++++ b/usermount.c
+@@ -46,6 +46,7 @@
+ #include <limits.h>
+ #include <locale.h>
+ #include <mntent.h>
++#include <paths.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-- 
+2.8.1
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-formatting-issues.patch b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-formatting-issues.patch
new file mode 100644
index 0000000..9d512d4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode/0001-formatting-issues.patch
@@ -0,0 +1,34 @@
+From 7a316dad0697af2ef4e8079a5af51565a8195aa6 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 24 Jul 2017 01:42:30 -0400
+Subject: [PATCH] userhelper.c: fix formatting issues
+
+Fixed when compile with "-Wformat -Wformat-security -Werror=format-security":
+|../usermode-1.111/userhelper.c:585:4: error: format not a string
+literal and no format arguments [-Werror=format-security]
+|    text = g_strdup_printf(dgettext(data->domain, data->banner));
+|    ^~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ userhelper.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/userhelper.c b/userhelper.c
+index 76ad492..ee0da49 100644
+--- a/userhelper.c
++++ b/userhelper.c
+@@ -582,7 +582,7 @@ converse_console(int num_msg, const struct pam_message **msg,
+ 
+ 	if (banner == 0) {
+ 		if ((data->banner != NULL) && (data->domain != NULL)) {
+-			text = g_strdup_printf(dgettext(data->domain, data->banner));
++			text = g_strdup_printf("%s", dgettext(data->domain, data->banner));
+ 		} else {
+ 			if ((service != NULL) && (strlen(service) > 0)) {
+ 				if (data->fallback_allowed) {
+-- 
+2.8.1
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode_1.111.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode_1.111.bb
new file mode 100644
index 0000000..c2d7328
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode_1.111.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "The usermode contains the userhelper program, which can be used to allow configured \
+programs to be run with superuser privileges by ordinary users, and several \
+graphical tools for users: \
+* userinfo allows users to change their finger information. \
+* usermount lets users mount, unmount, and format filesystems. \
+* userpasswd allows users to change their passwords. \
+"
+HOMEPAGE = "https://pagure.io/usermode"
+LICENSE = "GPLv2+"
+DEPENDS = "libuser ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \
+           gtk+ desktop-file-utils-native \
+           startup-notification intltool-native \
+           util-linux \
+"
+
+SRC_URI = "https://releases.pagure.org/${BPN}/${BPN}-${PV}.tar.xz \
+           file://0001-formatting-issues.patch \
+           file://0001-fix-compile-failure-against-musl-C-library.patch \
+           file://0001-Makefile.am-Link-with-libm-for-powl-API.patch \
+           "
+SRC_URI[md5sum] = "28ba510fbd8da9f4e86e57d6c31cff29"
+SRC_URI[sha256sum] = "3dd0b9639b5bd396b7ea5fada6aaa694dbfdaa3ad06eb95a6eabcdfd02f875c6"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+inherit autotools gettext pkgconfig
+
+EXTRA_OEMAKE += "INSTALL='install -p'"
+
diff --git a/import-layers/meta-openembedded/meta-gpe/README b/import-layers/meta-openembedded/meta-gpe/README
deleted file mode 100644
index fd2997d..0000000
--- a/import-layers/meta-openembedded/meta-gpe/README
+++ /dev/null
@@ -1,17 +0,0 @@
-This layer depends on:
-
-URI: git://github.com/openembedded/oe-core.git
-branch: pyro
-revision: HEAD
-
-URI: git://github.com/openembedded/meta-oe.git
-branch: pyro
-revision: HEAD
-
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-gpe][pyro]' in the subject'
-
-When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-gpe][pyro][PATCH'
-
-pyro Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
diff --git a/import-layers/meta-openembedded/meta-gpe/conf/layer.conf b/import-layers/meta-openembedded/meta-gpe/conf/layer.conf
deleted file mode 100644
index 00f3929..0000000
--- a/import-layers/meta-openembedded/meta-gpe/conf/layer.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-# We have a conf and classes directory, append to BBPATH
-BBPATH .= ":${LAYERDIR}"
-
-# We have a recipes directory, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "gpe-layer"
-BBFILE_PATTERN_gpe-layer := "^${LAYERDIR}/"
-BBFILE_PRIORITY_gpe-layer = "7"
-
-# This should only be incremented on significant changes that will
-# cause compatibility issues with other layers
-LAYERVERSION_gpe-layer = "1"
-
-LAYERDEPENDS_gpe-layer = "core openembedded-layer"
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap/0001-Fix-the-ordering-of-LDADD-options-to-fix-a-compilati.patch b/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap/0001-Fix-the-ordering-of-LDADD-options-to-fix-a-compilati.patch
deleted file mode 100644
index c976ff4..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap/0001-Fix-the-ordering-of-LDADD-options-to-fix-a-compilati.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c551dece6768f67b74b508e9c0133320205ef2df Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Mon, 23 May 2011 15:03:29 +0200
-Subject: [PATCH] Fix the ordering of LDADD options to fix a compilation failure.
-
-"invalid DSO for symbol `XUngrabServer' definition "
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- src/Makefile.am |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 2fddc98..45bd850 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -6,7 +6,7 @@ INCLUDES = -DPKGDATADIR=\"$(pkgdatadir)\" \
- 	   $(GLADE_CFLAGS) \
-        -D_GNU_SOURCE
- 
--LIBS = $(GTK_LIBS) $(GLADE_LIBS) $(XSHAPE_LIBS)
-+LIBS = -lX11 $(XSHAPE_LIBS) $(GLADE_LIBS) $(GTK_LIBS) 
- 
- bin_PROGRAMS = gpe-scap
- gpe_scap_SOURCES = scr-i18n.h \
--- 
-1.6.6.1
-
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap/use.libsoup-2.4.patch b/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap/use.libsoup-2.4.patch
deleted file mode 100644
index 3cfe5d7..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap/use.libsoup-2.4.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -uNr gpe-scap-1.4.orig/configure.ac gpe-scap-1.4/configure.ac
---- gpe-scap-1.4.orig/configure.ac	2009-03-05 18:53:53.000000000 +0100
-+++ gpe-scap-1.4/configure.ac	2012-05-06 10:18:29.348308322 +0200
-@@ -24,7 +24,7 @@
- AC_SUBST(LDFLAGS)
- 
- dnl libraries
--GTK_MODULES="gtk+-2.0 >= 2.6.0 gthread-2.0 libsoup-2.2"
-+GTK_MODULES="gtk+-2.0 >= 2.6.0 gthread-2.0 libsoup-2.4"
- PKG_CHECK_MODULES(GTK, $GTK_MODULES)
- AC_SUBST(GTK_CFLAGS)
- AC_SUBST(GTK_LIBS)
-diff -uNr gpe-scap-1.4.orig/src/scr-shot-common.c gpe-scap-1.4/src/scr-shot-common.c
---- gpe-scap-1.4.orig/src/scr-shot-common.c	2009-03-05 12:13:20.000000000 +0100
-+++ gpe-scap-1.4/src/scr-shot-common.c	2012-05-06 10:30:52.299371576 +0200
-@@ -182,12 +182,12 @@
-   /* create session and message */
-   session = soup_session_sync_new ();
-   message = soup_message_new ("POST", url);
--  soup_message_add_header (message->request_headers, "User-Agent", "gpe-scap/" VERSION);
--  soup_message_add_header (message->request_headers, "Accept",
-+  soup_message_headers_append (message->request_headers, "User-Agent", "gpe-scap/" VERSION);
-+  soup_message_headers_append (message->request_headers, "Accept",
- 			   "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5");
--/*  soup_message_add_header (message->request_headers, "Accept-Charset", "Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7");
--  soup_message_add_header (message->request_headers, "Keep-Alive", "100");
--  soup_message_add_header (message->request_headers, "Connection", "keep-alive");
-+/*  soup_message_headers_append (message->request_headers, "Accept-Charset", "Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7");
-+  soup_message_headers_append (message->request_headers, "Keep-Alive", "100");
-+  soup_message_headers_append (message->request_headers, "Connection", "keep-alive");
-   soup_message_wire	add_header (message->request_headers, "Accept-Encoding", "gzip,deflate");
- */
-   /* build message body */
-@@ -207,7 +207,7 @@
-   memcpy (body + strlen (cmd) + len, tail, strlen (tail));
- 
-   soup_message_set_request (message, "multipart/form-data; boundary="SEP,
--                            SOUP_BUFFER_SYSTEM_OWNED, body, content_len);
-+                            SOUP_MEMORY_TAKE, body, content_len);
- 
-   soup_session_send_message (session, message);
- 
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap_1.4.bb b/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap_1.4.bb
deleted file mode 100644
index db50e38..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/gpe-scap/gpe-scap_1.4.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "A GPE application that allows you to take screenshots"
-SECTION = "gpe"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-DEPENDS = "glib-2.0 gtk+ libgpewidget libglade libsoup-2.4"
-
-PR = "r3"
-
-SRC_URI[md5sum] = "eaf545561b0ad981c9d01833f30fcf95"
-SRC_URI[sha256sum] = "762778421fae7c62d5ec6a9d27986166c0dbbe2ff51fc10bb9b8baff5c367534"
-
-GPE_TARBALL_SUFFIX = "bz2"
-
-inherit gpe autotools pkgconfig
-
-SRC_URI += "file://0001-Fix-the-ordering-of-LDADD-options-to-fix-a-compilati.patch \
-    file://use.libsoup-2.4.patch \
-"
-
-RREPLACES_${PN} = "gpe-screenshot"
-
-PNBLACKLIST[gpe-scap] ?= "Depends on blacklisted libgpewidget - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget/glib-2.32.patch b/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget/glib-2.32.patch
deleted file mode 100644
index f590caa..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget/glib-2.32.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -uNr libgpewidget-0.117.orig/gpehelp.c libgpewidget-0.117/gpehelp.c
---- libgpewidget-0.117.orig/gpehelp.c	2006-10-12 12:20:33.000000000 +0200
-+++ libgpewidget-0.117/gpehelp.c	2012-04-30 07:45:57.813293792 +0200
-@@ -33,7 +33,6 @@
- #include <gdk-pixbuf/gdk-pixbuf.h>
- #include <gdk/gdk.h>
- #include <glib.h>
--#include <glib/gkeyfile.h>
- 
- 
- /* helper function definitions*/
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget/pkgconfig.patch b/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget/pkgconfig.patch
deleted file mode 100644
index 317e01a..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget/pkgconfig.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.ac.orig	2006-02-04 17:37:55.000000000 +0100
-+++ configure.ac	2006-02-06 00:56:28.000000000 +0100
-@@ -36,7 +36,7 @@
- 	ENABLE_CAIRO=$enableval
- ],
- [
--       	PKG_CHECK_EXISTS(cairo, [ENABLE_CAIRO=yes], [ENABLE_CAIRO=no])
-+       	PKG_CHECK_MODULES(cairo, [ENABLE_CAIRO=yes], [ENABLE_CAIRO=no])
- ])
- 
- ENABLE_HILDON=false
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget_0.117.bb b/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget_0.117.bb
deleted file mode 100644
index 31e247e..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget_0.117.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DESCRIPTION = "libgpewidget contains a collection of widgets and other common code shared by many GPE applications."
-SECTION = "gpe/libs"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499"
-
-DEPENDS = "gtk+ cairo libxinerama libxcomposite libxrender"
-PR = "r5"
-
-inherit gpe pkgconfig autotools gtk-doc
-
-SRC_URI += "file://pkgconfig.patch;striplevel=0 \
-    file://glib-2.32.patch \
-"
-SRC_URI[md5sum] = "b85a839264a35d0faf9a1a38c486e189"
-SRC_URI[sha256sum] = "f96d30c09b0395ea4e146730fd52d9ea303b619bb139051d9f12d3f868a9e18c"
-
-GPE_TARBALL_SUFFIX = "bz2"
-
-EXTRA_OECONF = "--enable-cairo --disable-gtk-doc"
-LDFLAGS += " -L${STAGING_LIBDIR}"
-
-PACKAGES =+ "${PN}-bin"
-
-PNBLACKLIST[libgpewidget] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130594/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/minilite/minilite/makefile-fix.patch b/import-layers/meta-openembedded/meta-gpe/recipes-graphics/minilite/minilite/makefile-fix.patch
deleted file mode 100644
index 1be6cea..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/minilite/minilite/makefile-fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- /tmp/Makefile.old	2006-01-16 22:51:34.000000000 +0100
-+++ minilite-050/Makefile	2009-05-01 16:36:32.000000000 +0200
-@@ -45,7 +45,7 @@
- 
- install-program: all
- 	mkdir -p $(DESTDIR)$(PREFIX)/bin
--	$(INSTALL) -s $(PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
-+	$(INSTALL) $(PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
- 	mkdir -p $(DESTDIR)$(PREFIX)/share/applications
- 	$(INSTALL) -m 644 $(PACKAGE).desktop $(DESTDIR)$(PREFIX)/share/applications/$(PACKAGE).desktop
- 	mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps/
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/minilite/minilite_0.50.bb b/import-layers/meta-openembedded/meta-gpe/recipes-graphics/minilite/minilite_0.50.bb
deleted file mode 100644
index 8e064fd..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-graphics/minilite/minilite_0.50.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "GPE Screen light control dockapp"
-SECTION = "gpe"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://minilite.c;beginline=8;endline=11;md5=fe9332aaecbce9f74ce2bfeb91680ed1"
-
-DEPENDS = "libgpewidget"
-
-inherit gpe
-
-SRC_URI = "${GPE_MIRROR}/${BP}.tar.gz \
-           file://makefile-fix.patch"
-SRC_URI[md5sum] = "d81cecf269ad7bab0da960e6e7228332"
-SRC_URI[sha256sum] = "2b299425203246090a4949e034f1d0efb3ff99cd1591d0e16c57370a530b361e"
-
-export CVSBUILD="no"
-
-PNBLACKLIST[minilite] ?= "Depends on blacklisted libgpewidget - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/Makefile.patch b/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/Makefile.patch
deleted file mode 100644
index 0e498c7..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/Makefile.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -uri fbreader-0.12.1.orig/fbreader/Makefile fbreader-0.12.1/fbreader/Makefile
---- fbreader-0.12.1.orig/fbreader/Makefile	2009-12-13 09:03:11.000000000 +0100
-+++ fbreader-0.12.1/fbreader/Makefile	2009-12-14 17:18:47.548638783 +0100
-@@ -37,7 +37,6 @@
- 	@install $(TARGET) $(DESTDIR)$(BINDIR)/FBReader
- 	@install -d $(FBSHAREDIR)
- 	@install -d $(FBSHAREDIR)/help
--	@./scripts/install_help.sh $(VARIANT) $(FBSHAREDIR)/help
- 	@install -d $(FBSHAREDIR)/network
- 	@install -m 0644 $(wildcard data/network/*.xml) $(FBSHAREDIR)/network
- 	@install -d $(FBSHAREDIR)/network/certificates
-@@ -58,8 +57,8 @@
- 	@install -d $(FBSHAREDIR)/resources
- 	@install -m 0644 $(wildcard data/resources/*.xml) $(FBSHAREDIR)/resources
- 	@install -d $(DESTDIR)$(APPIMAGEDIR_REAL)
--	@install -m 0644 $(wildcard data/icons/toolbar/$(VARIANT)/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
--	@install -m 0644 $(wildcard data/icons/filetree/$(VARIANT)/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
-+	@install -m 0644 $(wildcard data/icons/toolbar/$(TARGET_ARCH)/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
-+	@install -m 0644 $(wildcard data/icons/filetree/$(TARGET_ARCH)/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
- 	@install -m 0644 $(wildcard data/icons/booktree/new/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
- 	@make -C $(TARGET_ARCH) RESOLUTION=$(RESOLUTION) install
- 
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/fix-cflags-fribidi.patch b/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/fix-cflags-fribidi.patch
deleted file mode 100644
index e72fa8c..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/fix-cflags-fribidi.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- fbreader-0.12.10/makefiles/config.mk.orig	2016-05-03 11:11:07.259734561 -0400
-+++ fbreader-0.12.10/makefiles/config.mk	2016-05-03 11:11:37.447735786 -0400
-@@ -38,7 +38,7 @@
- 	LDFLAGS += -pg
- endif
- 
--ZINCLUDE = -I $(ROOTDIR)/zlibrary/core/include -I $(ROOTDIR)/zlibrary/text/include
-+ZINCLUDE = $(shell pkg-config --cflags fribidi) -I $(ROOTDIR)/zlibrary/core/include -I $(ROOTDIR)/zlibrary/text/include
- 
- ZLSHARED ?= yes
- 
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/fix-return-code-gcc6.patch b/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/fix-return-code-gcc6.patch
deleted file mode 100644
index 97ab4d3..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/fix-return-code-gcc6.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- fbreader-0.12.10/fbreader/src/database/booksdb/BooksDB.cpp.orig	2016-06-08 14:54:04.206196501 -0400
-+++ fbreader-0.12.10/fbreader/src/database/booksdb/BooksDB.cpp	2016-06-08 14:54:17.686196322 -0400
-@@ -145,7 +145,7 @@
- 
- 	myFindFileId->setFileName(fileName);
- 	if (!myFindFileId->run()) {
--		return false;
-+		return 0;
- 	}
- 	((DBIntValue&)*myLoadBook->parameter("@file_id").value()) = myFindFileId->fileId();
- 	shared_ptr<DBDataReader> reader = myLoadBook->executeReader();
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/gcc45.patch b/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/gcc45.patch
deleted file mode 100644
index 00cba10..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader-0.12.10/gcc45.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-  Fix compilation with gcc 4.5
-
-  [FBreader Ticket #340] -- http://old.fbreader.org/mantis/view.php?id=340
-
-  Without that patch we have:
-    Compiling Library.o ...Library.cpp:42:1: error: 'Library::Library' names the constructor, not the type
-
-  Upstream-Status: Accepted [Fixed in Version 0.14.0]
-
---- fbreader-0.12.10-orig/fbreader/src/library/Library.cpp	2010-04-01 15:14:24.000000000 +0200
-+++ fbreader-0.12.10/fbreader/src/library/Library.cpp	2010-04-13 13:34:06.000000000 +0200
-@@ -39,7 +39,7 @@
- shared_ptr<Library> Library::ourInstance;
- const size_t Library::MaxRecentListSize = 10;
- 
--Library::Library &Library::Instance() {
-+Library &Library::Instance() {
- 	if (ourInstance.isNull()) {
- 		ourInstance = new Library();
- 	}
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_0.12.10.bb b/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_0.12.10.bb
deleted file mode 100644
index 2dbcef4..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_0.12.10.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "FBreader is an ebook reader"
-HOMEPAGE = "http://www.fbreader.org"
-SECTION = "x11/utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://fbreader/LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "gtk+ enca expat bzip2 libgpewidget virtual/libiconv liblinebreak libfribidi curl sqlite3"
-
-PR = "r1"
-
-SRC_URI = "http://www.fbreader.org/fbreader-sources-${PV}.tgz \
-file://Makefile.patch \
-file://gcc45.patch \
-file://fix-cflags-fribidi.patch \
-file://fix-return-code-gcc6.patch"
-
-# Set the defaults
-READER_RESOLUTION ?= "1024x600"
-READER_ARCH       ?= "desktop"
-READER_UI         ?= "gtk"
-READER_STATUS     ?= "release"
-
-FILES_${PN} += "${datadir}/FBReader ${datadir}/zlibrary ${libdir}/zlibrary"
-FILES_${PN}-dbg += "${libdir}/zlibrary/ui/.debug/"
-
-CFLAGS_append = " RESOLUTION=${READER_RESOLUTION} INSTALLDIR=${prefix}"
-EXTRA_OEMAKE = "CC='${CXX}' LD='${CXX}' LDFLAGS='${LDFLAGS}' INCPATH='${STAGING_INCDIR}' LIBPATH='${STAGING_LIBDIR}'"
-
-inherit pkgconfig
-
-do_configure() {
-    cd ${WORKDIR}/${PN}-${PV}
-    mv makefiles/target.mk makefiles/target.mk.orig
-
-    echo "TARGET_ARCH = ${READER_ARCH}" > makefiles/target.mk
-    echo "UI_TYPE = ${READER_UI}" >> makefiles/target.mk
-    echo "TARGET_STATUS = ${READER_STATUS}" >> makefiles/target.mk
-}
-
-do_install() {
-    oe_runmake install DESTDIR=${D} RESOLUTION=${READER_RESOLUTION}
-}
-
-SRC_URI[md5sum] = "da9ec4721efdb0ec0aaa182bff16ad82"
-SRC_URI[sha256sum] = "328aec454db80e225aa0b5c31adef74bf62a14357482947e87e9731686b3c624"
-
-PNBLACKLIST[fbreader] ?= "Depends on blacklisted libgpewidget - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_git.bb b/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_git.bb
deleted file mode 100644
index b3e7946..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_git.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "FBreader is an ebook reader"
-HOMEPAGE = "http://www.fbreader.org"
-SECTION = "x11/utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://fbreader/LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "gtk+ enca expat bzip2 libgpewidget virtual/libiconv liblinebreak libfribidi curl sqlite3"
-SRCREV = "2cf1ec0e306e1122dbed850bfa005cd59a6168ee"
-PV = "0.99.5+gitr${SRCPV}"
-
-PR = "r1"
-
-DEFAULT_PREFERENCE = "-1"
-
-SRC_URI = "git://github.com/geometer/FBReader.git;protocol=http;branch=master \
-           file://0001-Fix-installation-of-the-icons-when-RESOLUTION-is-set.patch"
-
-# Set the defaults
-READER_RESOLUTION ?= "1024x600"
-READER_ARCH       ?= "desktop"
-READER_UI         ?= "gtk"
-READER_STATUS     ?= "release"
-
-FILES_${PN} += "${datadir}/FBReader ${datadir}/zlibrary ${libdir}/zlibrary"
-FILES_${PN}-dbg += "${libdir}/zlibrary/ui/.debug/"
-
-CFLAGS_append = " RESOLUTION=${READER_RESOLUTION} INSTALLDIR=${prefix}"
-EXTRA_OEMAKE = "CC='${CXX}' LD='${CXX}' INCPATH='${STAGING_INCDIR}' LIBPATH='${STAGING_LIBDIR}'"
-inherit pkgconfig
-
-S = "${WORKDIR}/git"
-
-do_configure() {
-    cd "${S}"
-
-    echo "TARGET_ARCH = ${READER_ARCH}" > makefiles/target.mk
-    echo "UI_TYPE = ${READER_UI}" >> makefiles/target.mk
-    echo "TARGET_STATUS = ${READER_STATUS}" >> makefiles/target.mk
-}
-
-do_install() {
-    oe_runmake install DESTDIR=${D} RESOLUTION=${READER_RESOLUTION}
-}
-
-# http://errors.yoctoproject.org/Errors/Details/68618/
-PNBLACKLIST[fbreader] ?= "BROKEN: fails to build with gcc-6 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/files/0001-Fix-installation-of-the-icons-when-RESOLUTION-is-set.patch b/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/files/0001-Fix-installation-of-the-icons-when-RESOLUTION-is-set.patch
deleted file mode 100644
index f6e1202..0000000
--- a/import-layers/meta-openembedded/meta-gpe/recipes-support/fbreader/files/0001-Fix-installation-of-the-icons-when-RESOLUTION-is-set.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From da4170b61bb41eff0af170d1d77bfd90f9ebe5dd Mon Sep 17 00:00:00 2001
-From: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
-Date: Fri, 20 Jan 2012 11:34:42 +0100
-Subject: [PATCH] Fix installation of the icons when RESOLUTION is set
-
-When resolution is set, the following code(in fbreader/Makefile) is executed:
-  VARIANT = $(TARGET_ARCH)
-  ifneq "$(RESOLUTION)" ""
-    VARIANT = $(TARGET_ARCH)_$(RESOLUTION)
-  endif
-
-This fix is based on a patch from the openembedded project,
-  which can be found here:
-    http://cgit.openembedded.org/openembedded/tree/recipes/fbreader/fbreader-0.12.1/Makefile.patch
-
-Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
----
- Submitted trough github to git://github.com/geometer/FBReader.git as a pull request
-
- fbreader/Makefile |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/fbreader/Makefile b/fbreader/Makefile
-index bfa9242..03e6cc3 100644
---- a/fbreader/Makefile
-+++ b/fbreader/Makefile
-@@ -60,8 +60,8 @@ do_install:
- 	@install -d $(FBSHAREDIR)/resources
- 	@install -m 0644 $(wildcard data/resources/*.xml) $(FBSHAREDIR)/resources
- 	@install -d $(DESTDIR)$(APPIMAGEDIR_REAL)
--	@install -m 0644 $(wildcard data/icons/toolbar/$(VARIANT)/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
--	@install -m 0644 $(wildcard data/icons/filetree/$(VARIANT)/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
-+	@install -m 0644 $(wildcard data/icons/toolbar/$(TARGET_ARCH)/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
-+	@install -m 0644 $(wildcard data/icons/filetree/$(TARGET_ARCH)/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
- 	@install -m 0644 $(wildcard data/icons/booktree/new/*.*) $(DESTDIR)$(APPIMAGEDIR_REAL)
- 	@make -C $(TARGET_ARCH) RESOLUTION=$(RESOLUTION) install
- 
--- 
-1.7.4.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/README b/import-layers/meta-openembedded/meta-initramfs/README
index 9c05e1fd..b7dbfef 100644
--- a/import-layers/meta-openembedded/meta-initramfs/README
+++ b/import-layers/meta-openembedded/meta-initramfs/README
@@ -12,7 +12,7 @@
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: pyro
+branch: rocko
 revision: HEAD
 
 
@@ -20,12 +20,12 @@
 -----------
 
 Send patches / pull requests to openembedded-devel@lists.openembedded.org
-with '[meta-initramfs][pyro]' in the subject.
+with '[meta-initramfs][rocko]' in the subject.
 
 When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-initramfs][pyro][PATCH'
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-initramfs][rocko][PATCH'
 
-pyro Branch Maintainer:
+rocko Branch Maintainer:
 Armin Kuster <akuster808@gmail.com>
 
 
diff --git a/import-layers/meta-openembedded/meta-initramfs/classes/klibc.bbclass b/import-layers/meta-openembedded/meta-initramfs/classes/klibc.bbclass
index f864104..b7b72b7 100644
--- a/import-layers/meta-openembedded/meta-initramfs/classes/klibc.bbclass
+++ b/import-layers/meta-openembedded/meta-initramfs/classes/klibc.bbclass
@@ -3,13 +3,14 @@
 
 # Default for klcc is to build static binaries.
 # Set CC = "${TARGET_PREFIX}klcc -shared" to build the dynamic version.
+CC_forcevariable = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS}"
+CC_forcevariable_armv4_linux-gnueabi = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS} -march=armv4 -mthumb-interwork"
+CC_append_armv7ve = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
+CC_append_armv7a = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
 
-export CC = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS}"
-export CC_armv4_linux-gnueabi = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS} -march=armv4 -mthumb-interwork"
-
-export CPP = "${CC} -E"
+CPP_forcevariable = "${CC} -E"
 
 # klcc uses own optimizations by default. See klcc(1) man file.
-export CFLAGS=""
-export CPPFLAGS=""
-export LDFLAGS=""
+export CFLAGS="${TUNE_CCARGS}"
+export CPPFLAGS="${TUNE_CCARGS}"
+export LDFLAGS="${TUNE_CCARGS}"
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb
index 835b307..2573eb4 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Initramfs image for kexecboot kernel"
 DESCRIPTION = "This image provides kexecboot (linux as bootloader) and helpers."
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
 inherit image
 
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb
index b7defff..667690f 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Extremely basic live image init script"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 SRC_URI = "file://init-debug.sh"
 
 S = "${WORKDIR}"
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-fix-build-when-S-B.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-fix-build-when-S-B.patch
deleted file mode 100644
index 6d3270f..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-fix-build-when-S-B.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 8519d61a7097498b0ee93fb8dc8262286825f3e5 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Thu, 1 May 2014 23:58:51 +0200
-Subject: [PATCH 1/4] kexecboot: fix build when S != B
-
-* fatal error: ../config.h: No such file or directory
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- machine/zaurus.c | 2 +-
- res/theme-gui.h  | 2 +-
- res/theme-tui.h  | 4 ++--
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/machine/zaurus.c b/machine/zaurus.c
-index ea21047..83be13b 100644
---- a/machine/zaurus.c
-+++ b/machine/zaurus.c
-@@ -25,7 +25,7 @@
-  *
-  */
- 
--#include "../config.h"
-+#include "config.h"
- 
- #ifdef USE_ZAURUS
- 
-diff --git a/res/theme-gui.h b/res/theme-gui.h
-index f8fef7f..79bed39 100644
---- a/res/theme-gui.h
-+++ b/res/theme-gui.h
-@@ -15,7 +15,7 @@
-  *
-  */
- 
--#include "../config.h"
-+#include "config.h"
- 
- #ifdef USE_ICONS
- /** Icons **/
-diff --git a/res/theme-tui.h b/res/theme-tui.h
-index 94e7693..909be56 100644
---- a/res/theme-tui.h
-+++ b/res/theme-tui.h
-@@ -15,11 +15,11 @@
-  *
-  */
- 
--#include "../config.h"
-+#include "config.h"
- 
- #ifdef USE_TEXTUI
- /** TEXT UI colors **/
--#include "../termseq.h"
-+#include "termseq.h"
- 
- /* Background color pair */
- #define TUI_CLR_BG		TERM_CSI TERM_BG_BLACK ";" TERM_FG_WHITE TERM_SGR
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0002-kexecboot-fix-configure-warnings.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0002-kexecboot-fix-configure-warnings.patch
deleted file mode 100644
index ecf422b..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0002-kexecboot-fix-configure-warnings.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b8938acc3f1ab35273fa9a2fa7728050ef72ff65 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Fri, 2 May 2014 00:19:24 +0200
-Subject: [PATCH 2/4] kexecboot: fix configure warnings
-
-Makefile.am:5: warning: source file 'fstype/fstype.c' is in a subdirectory,
-Makefile.am:5: but option 'subdir-objects' is disabled
-automake: warning: possible forward-incompatibility.
-...
-Makefile.am:5: warning: source file 'machine/zaurus.c' is in a subdirectory,
-...
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0ca4b81..66ec54e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1,7 +1,7 @@
- AC_PREREQ(2.53)
- AC_INIT([kexecboot], [0.6], [kexecboot-devel@linuxtogo.org])
- AC_CANONICAL_HOST
--AM_INIT_AUTOMAKE([-Wall foreign])
-+AM_INIT_AUTOMAKE([-Wall foreign] [subdir-objects])
- AC_CONFIG_SRCDIR(kexecboot.c)
- AC_CONFIG_HEADERS(config.h)
- AM_MAINTAINER_MODE
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch
deleted file mode 100644
index 4caa0d5..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 800dae0d34f8629a34c638a612166b76dda03e27 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Sat, 2 Aug 2014 01:13:08 +0200
-Subject: [PATCH 3/4] kexecboot: do not hardcode MOUNTPOINT
-
-Avoid to hardcode it: could be requested as a new configure option.
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- cfgparser.c |  6 +++---
- kexecboot.c | 18 ++++++++++--------
- 2 files changed, 13 insertions(+), 11 deletions(-)
-
-diff --git a/cfgparser.c b/cfgparser.c
-index 8f6688c..dec27b1 100644
---- a/cfgparser.c
-+++ b/cfgparser.c
-@@ -141,7 +141,7 @@ static int set_kernel(struct cfgdata_t *cfgdata, char *value)
- 		return -1;
- 	}
- 
--	strcpy(sc->kernelpath, "/mnt");
-+	strcpy(sc->kernelpath, MOUNTPOINT);
- 	strcat(sc->kernelpath, value);
- 	return 0;
- }
-@@ -155,7 +155,7 @@ static int set_icon(struct cfgdata_t *cfgdata, char *value)
- 
- 	dispose(sc->iconpath);
- 	/* Add our mountpoint, since the enduser won't know it */
--	sc->iconpath = malloc(sizeof(MOUNTPOINT)+strlen(value));
-+	sc->iconpath = malloc(strlen(MOUNTPOINT)+strlen(value)+1);
- 	if (NULL == sc->iconpath) {
- 		DPRINTF("Can't allocate memory to store iconpath '%s'", value);
- 		return -1;
-@@ -194,7 +194,7 @@ static int set_initrd(struct cfgdata_t *cfgdata, char *value)
- 		return -1;
- 	}
- 
--	strcpy(sc->initrd, "/mnt");
-+	strcpy(sc->initrd, MOUNTPOINT);
- 	strcat(sc->initrd, value);
- 	return 0;
- }
-diff --git a/kexecboot.c b/kexecboot.c
-index d6657a0..7268d6b 100644
---- a/kexecboot.c
-+++ b/kexecboot.c
-@@ -57,20 +57,22 @@
- #endif
- 
- #ifdef USE_MACHINE_KERNEL
--/* Machine-dependent kernel patch */
-+/* Machine-dependent kernel path */
- char *machine_kernel = NULL;
- #endif
- 
-+#define PREPEND_MOUNTPATH(string) MOUNTPOINT""string
-+
- /* NULL-terminated array of kernel search paths
-  * First item should be filled with machine-dependent path */
- char *default_kernels[] = {
- #ifdef USE_ZIMAGE
--	"/mnt/boot/zImage",
--	"/mnt/zImage",
-+	PREPEND_MOUNTPATH("/boot/zImage"),
-+	PREPEND_MOUNTPATH("/zImage"),
- #endif
- #ifdef USE_UIMAGE
--	"/mnt/boot/uImage",
--	"/mnt/uImage",
-+	PREPEND_MOUNTPATH("/boot/uImage"),
-+	PREPEND_MOUNTPATH("/uImage"),
- #endif
- 	NULL
- };
-@@ -149,14 +151,14 @@ char *get_machine_kernelpath() {
- 			++tmp;
- 		}
- 
--		/* Prepend "/mnt/boot/zImage-" to hw */
--		tmp = malloc(strlen(hw) + 17 + 1);	/* strlen("/mnt/boot/zImage-") */
-+		/* Prepend  MOUNTPOINT"/boot/zImage-" to hw */
-+		tmp = malloc(strlen(PREPEND_MOUNTPATH("/boot/zImage-")) + strlen(hw) + 1);
- 		if (NULL == tmp) {
- 			DPRINTF("Can't allocate memory for machine-specific kernel path");
- 			return NULL;
- 		}
- 
--		strcpy(tmp, "/mnt/boot/zImage-");
-+		strcpy(tmp, PREPEND_MOUNTPATH("/boot/zImage-"));
- 		strcat(tmp, hw);
- 
- 		return tmp;
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch
deleted file mode 100644
index 6d81d83..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From de9a6284df8add6ec03e1d9981d0b6d0595bbc69 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Mon, 10 Nov 2014 23:37:23 +0100
-Subject: [PATCH 4/4] kexecboot.c: workaround for absolute kernel and initrd
- symlinks
-
-Add MOUNTPOINT prefix if the kernel/initrd symlinks start with '/'.
-Do nothing if the path is a relative symbolic link or not a symlink.
-
-Fix following situation:
-
-root@mizar:/var/tmp# ls -al boot/
-total 2076
-drwxr-xr-x 2 root root    4096 lug  5 01:38 .
-drwxrwxrwt 4 root root    4096 lug  5 12:26 ..
--rw-r--r-- 1 root root     831 lug  5 01:24 boot.cfg
--rw-r--r-- 1 root root    1322 lug  5 01:24 icon.xpm
-lrwxrwxrwx 1 root root      34 lug  5 12:26 zImage ->
-/boot/zImage-3.14.5-yocto-standard
--rw-r--r-- 1 root root 2106832 lug  5 01:20 zImage-3.14.5-yocto-standard
-
-Cannot open `/mnt/boot/zImage': No such file or directory
-Nothing has been loaded!
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- kexecboot.c | 53 ++++++++++++++++++++++++++++++++++++++++++++---------
- 1 file changed, 44 insertions(+), 9 deletions(-)
-
-diff --git a/kexecboot.c b/kexecboot.c
-index 7268d6b..8a7a7d2 100644
---- a/kexecboot.c
-+++ b/kexecboot.c
-@@ -208,11 +208,16 @@ void start_kernel(struct params_t *params, int choice)
- 	const char *load_argv[] = { NULL, "-l", NULL, NULL, NULL, NULL };
- 	const char *exec_argv[] = { NULL, "-e", NULL, NULL};
- 
--	char *cmdline_arg = NULL, *initrd_arg = NULL;
-+	char *cmdline_arg = NULL, *initrd_arg = NULL, *kernel_arg = NULL;
- 	int n, idx, u;
- 	struct stat sinfo;
- 	struct boot_item_t *item;
- 
-+	/* buffer for readlink (could be truncated) */
-+	char buf[512];
-+	int len;
-+
-+
- 	item = params->bootcfg->list[choice];
- 
- 	exec_argv[0] = kexec_path;
-@@ -306,10 +311,17 @@ void start_kernel(struct params_t *params, int choice)
- 		}
- 	}
- 
-+	/* Mount boot device */
-+	if ( -1 == mount(mount_dev, mount_point, mount_fstype,
-+			MS_RDONLY, NULL) ) {
-+		perror("Can't mount boot device");
-+		exit(-1);
-+	}
-+
- 	/* fill '--initrd' option */
- 	if (item->initrd) {
- 		/* allocate space */
--		n = sizeof(str_initrd_start) + strlen(item->initrd);
-+		n = sizeof(str_initrd_start) + strlen(item->initrd) + 1 + sizeof(mount_point) + sizeof(buf);
- 
- 		initrd_arg = (char *)malloc(n);
- 		if (NULL == initrd_arg) {
-@@ -317,24 +329,46 @@ void start_kernel(struct params_t *params, int choice)
- 		} else {
- 			strcpy(initrd_arg, str_initrd_start);	/* --initrd= */
- 			strcat(initrd_arg, item->initrd);
-+
-+			if ((len = readlink(item->initrd, buf, sizeof(buf)-1)) != -1) {
-+				buf[len] = '\0';
-+				/* Fix absolute symlinks: prepend MOUNTPOINT */
-+				if (buf[0] == '/') {
-+					strcpy(initrd_arg, str_initrd_start);	/* --initrd= */
-+					strcat(initrd_arg, mount_point);
-+					strcat(initrd_arg, buf);
-+				}
-+			}
- 			load_argv[idx] = initrd_arg;
- 			++idx;
- 		}
- 	}
- 
- 	/* Append kernelpath as last arg of kexec */
--	load_argv[idx] = item->kernelpath;
-+		/* allocate space */
-+		n = strlen(item->kernelpath) + 1 + sizeof(mount_point) + sizeof(buf);
-+
-+		kernel_arg = (char *)malloc(n);
-+		if (NULL == kernel_arg) {
-+			perror("Can't allocate memory for kernel_arg");
-+		} else {
-+			strcpy(kernel_arg, item->kernelpath);
-+
-+			if ((len = readlink(item->kernelpath, buf, sizeof(buf)-1)) != -1) {
-+				buf[len] = '\0';
-+				/* Fix absolute symlinks: prepend MOUNTPOINT */
-+				if (buf[0] == '/') {
-+					strcpy(kernel_arg, mount_point);
-+					strcat(kernel_arg, buf);
-+				}
-+			}
-+			load_argv[idx] = kernel_arg;
-+		}
- 
- 	DPRINTF("load_argv: %s, %s, %s, %s, %s", load_argv[0],
- 			load_argv[1], load_argv[2],
- 			load_argv[3], load_argv[4]);
- 
--	/* Mount boot device */
--	if ( -1 == mount(mount_dev, mount_point, mount_fstype,
--			MS_RDONLY, NULL) ) {
--		perror("Can't mount boot device");
--		exit(-1);
--	}
- 
- 	/* Load kernel */
- 	n = fexecw(kexec_path, (char *const *)load_argv, envp);
-@@ -347,6 +381,7 @@ void start_kernel(struct params_t *params, int choice)
- 
- 	dispose(cmdline_arg);
- 	dispose(initrd_arg);
-+	dispose(kernel_arg);
- 
- 	/* Check /proc/sys/net presence */
- 	if ( -1 == stat("/proc/sys/net", &sinfo) ) {
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0005-rgb.h-fix-build-with-gcc5.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0005-rgb.h-fix-build-with-gcc5.patch
deleted file mode 100644
index b54199b..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0005-rgb.h-fix-build-with-gcc5.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From b2c4fc69868a4831ec798ad98f5e7fce200cf0e3 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Thu, 24 Sep 2015 00:02:48 +0200
-Subject: [PATCH] rgb.h: fix build with gcc 5 (C99 inline semantic)
-
-Building with gcc 5.2 we trigger the following error:
-
-rgb.h:55:1: warning: inline function 'rgba2comp' declared but never defined
-|  rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
-|  ^
-
-https://gcc.gnu.org/gcc-5/porting_to.html
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- rgb.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rgb.h b/rgb.h
-index 0ba987a..4f64622 100644
---- a/rgb.h
-+++ b/rgb.h
-@@ -51,8 +51,7 @@ typedef struct {
- } kx_named_color;
- 
- /* Convert RGBA uint32 to red/green/blue/alpha components */
--inline void
--rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
-+void rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
- 		kx_ccomp *blue, kx_ccomp *alpha);
- 
- /* Convert hex rgb color to rgba color */
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
index 085955c..804ec32 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
@@ -2,7 +2,7 @@
 DESCRIPTION = "Default icon and boot.cfg for kexecboot linux-as-bootloader."
 SECTION = "base"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
 SRC_URI = "file://icon.xpm"
 
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb
deleted file mode 100644
index 45095f3..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-###########################
-# Configure options:
-#
-#  --enable-static-linking compile kexecboot as static executable [default=no]
-#  --enable-fbui           support framebuffer menu [default=yes]
-#  --enable-fbui-width     limit FB UI width to specified value [default=no]
-#  --enable-fbui-height    limit FB UI height to specified value [default=no]
-#  --enable-textui         support console text user interface [default=no]
-#  --enable-cfgfiles       support config files [default=yes]
-#  --enable-icons          support custom icons (depends on fbui) [default=yes]
-#  --enable-zaurus         compile Sharp Zaurus specific code [default=no]
-#  --enable-zimage         compile with zImage support [default=yes]
-#  --enable-uimage         compile with uImage support [default=no]
-#  --enable-machine-kernel look for machine-specific zImage kernel [default=no]
-#  --enable-devices-recreating
-#                          enable devices re-creating [default=yes]
-#  --enable-debug          enable debug output [default=no]
-#  --enable-host-debug     allow for non-destructive executing of kexecboot on
-#                            host system [default=no]
-#  --enable-numkeys        enable menu item selection by keys [0-9] [default=yes]
-#  --enable-bg-buffer      enable buffer for pre-drawed FB GUI background
-#
-#  --enable-timeout        allow to boot 1st kernel after timeout in seconds
-#                            [default=no]
-#  --enable-delay          specify delay before device scanning, allowing
-#                            initialization of old CF/SD cards [default=1]
-#  --enable-bpp            enable support of specified bpp modes
-#                            (all,32,24,18,16,4,2,1) [default=all]
-#  --enable-evdev-rate     change evdev (keyboard/mouse) repeat rate
-#                            in milliseconds e.g. "1000,250" [default=no]
-#  --with-kexec-binary     look for kexec binary at path
-#                            [default="/usr/sbin/kexec"]
-##########################
-SUMMARY = "kexecboot linux-as-bootloader"
-DESCRIPTION = "kexecboot is a graphical linux-as-bootloader implementation based on kexec."
-HOMEPAGE = "http://kexecboot.org"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-S = "${WORKDIR}/kexecboot-${PV}"
-SRC_URI = "https://github.com/kexecboot/kexecboot/archive/v${PV}.tar.gz"
-SRC_URI[md5sum] = "46b7c1a6f20531be56445ebb8669a2b8"
-SRC_URI[sha256sum] = "6b360b8aa59bc5d68a96705349a0dd416f8ed704e931fa0ac7849298258f0f15"
-
-SRC_URI += "\
-            file://0001-kexecboot-fix-build-when-S-B.patch \
-            file://0002-kexecboot-fix-configure-warnings.patch \
-            file://0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch \
-            file://0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch \
-            \
-            file://0005-rgb.h-fix-build-with-gcc5.patch \
-            "
-
-inherit autotools
-
-EXTRA_OECONF = "--enable-textui --enable-delay=2 --enable-evdev-rate=1000,250"
-
-do_install () {
-    install -d ${D}${bindir}
-    install -m 0755 kexecboot ${D}${bindir}
-    install -d ${D}/proc
-    install -d ${D}/mnt
-    install -d ${D}/dev
-    install -d ${D}/sys
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-FILES_${PN} += " ${bindir}/kexecboot /init /proc /mnt /dev /sys"
-
-pkg_postinst_${PN} () {
-    ln -sf ${bindir}/kexecboot $D/init
-}
-
-BBCLASSEXTEND = "klibc"
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
new file mode 100644
index 0000000..9f5dad7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
@@ -0,0 +1,64 @@
+###########################
+# Configure options:
+#
+#  --enable-static-linking compile kexecboot as static executable [default=no]
+#  --enable-fbui           support framebuffer menu [default=yes]
+#  --enable-fbui-width     limit FB UI width to specified value [default=no]
+#  --enable-fbui-height    limit FB UI height to specified value [default=no]
+#  --enable-textui         support console text user interface [default=no]
+#  --enable-cfgfiles       support config files [default=yes]
+#  --enable-icons          support custom icons (depends on fbui) [default=yes]
+#  --enable-zaurus         compile Sharp Zaurus specific code [default=no]
+#  --enable-zimage         compile with zImage support [default=yes]
+#  --enable-uimage         compile with uImage support [default=no]
+#  --enable-machine-kernel look for machine-specific zImage kernel [default=no]
+#  --enable-devices-recreating
+#                          enable devices re-creating [default=yes]
+#  --enable-debug          enable debug output [default=no]
+#  --enable-host-debug     allow for non-destructive executing of kexecboot on
+#                            host system [default=no]
+#  --enable-numkeys        enable menu item selection by keys [0-9] [default=yes]
+#  --enable-bg-buffer      enable buffer for pre-drawed FB GUI background
+#
+#  --enable-timeout        allow to boot 1st kernel after timeout in seconds
+#                            [default=no]
+#  --enable-delay          specify delay before device scanning, allowing
+#                            initialization of old CF/SD cards [default=1]
+#  --enable-bpp            enable support of specified bpp modes
+#                            (all,32,24,18,16,4,2,1) [default=all]
+#  --enable-evdev-rate     change evdev (keyboard/mouse) repeat rate
+#                            in milliseconds e.g. "1000,250" [default=no]
+#  --with-kexec-binary     look for kexec binary at path
+#                            [default="/usr/sbin/kexec"]
+##########################
+SUMMARY = "kexecboot linux-as-bootloader"
+DESCRIPTION = "kexecboot is a graphical linux-as-bootloader implementation based on kexec."
+HOMEPAGE = "http://kexecboot.org"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+PV = "0.6+git${SRCPV}"
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/kexecboot/kexecboot.git"
+SRCREV = "4c4f127e79ac5b8d6b6e2fbb938ccbf12b04c531"
+inherit autotools
+
+EXTRA_OECONF = "--enable-textui --enable-delay=2 --enable-evdev-rate=1000,250"
+
+do_install () {
+    install -d ${D}${bindir}
+    install -m 0755 kexecboot ${D}${bindir}
+    install -d ${D}/proc
+    install -d ${D}/mnt
+    install -d ${D}/dev
+    install -d ${D}/sys
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} += " ${bindir}/kexecboot /init /proc /mnt /dev /sys"
+
+pkg_postinst_${PN} () {
+    ln -sf ${bindir}/kexecboot $D/init
+}
+
+BBCLASSEXTEND = "klibc"
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch
new file mode 100644
index 0000000..3271403
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch
@@ -0,0 +1,33 @@
+From 06011ce55b1e892e863568a73d64eebc6389544f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 17:14:05 -0700
+Subject: [PATCH] util.h: include <sys/reg.h> when libc != glibc
+
+For musl libc it is required to include <sys/reg.h> to
+have __WORDSIZE defined to e.g. 32 for arm*-musl.
+
+Taken from void-linux
+https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/musl-__wordsize.patch
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ install/util.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/install/util.h b/install/util.h
+index 2ad3254d..062626ec 100644
+--- a/install/util.h
++++ b/install/util.h
+@@ -36,6 +36,9 @@
+ #include <sys/stat.h>
+ #include <dirent.h>
+ #include <sys/resource.h>
++#if !defined(__GLIBC__)
++#include <sys/reg.h>
++#endif
+ 
+ #include "macro.h"
+ 
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index b91f3fa..e18409d 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -1,17 +1,23 @@
 SUMMARY = "Initramfs generator using udev"
+HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
 DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d."
 
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 PE = "1"
-PV = "044+git${SRCREV}"
+PV = "045+git${SRCREV}"
 
-# v044 tag
-SRCREV = "1bc3e733f96033a508841e97fe08da7a12851782"
-SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http"
+# v045 tag
+SRCREV = "39c9b67f86145953aa30def9d77c68597a4ccfe8"
+SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
+           file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
+           "
 
-inherit bash-completion
+DEPENDS += "kmod"
+DEPENDS_append_libc-musl = " fts"
+
+inherit bash-completion pkgconfig
 
 S = "${WORKDIR}/git"
 
@@ -30,7 +36,9 @@
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
 
-EXTRA_OEMAKE += 'libdir=${prefix}/lib'
+EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
+
+LDLIBS_append_libc-musl = " -lfts"
 
 do_configure() {
     ./configure ${EXTRA_OECONF}
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch
new file mode 100644
index 0000000..1b1a993
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch
@@ -0,0 +1,26 @@
+From 22afaa21b4b258082be591e54c99e1ba6fbd7748 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 10:19:22 -0700
+Subject: [PATCH 1/2] Add another variable LIBS to provides libraries from env
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index ac14404..92a8e73 100644
+--- a/Makefile
++++ b/Makefile
+@@ -27,7 +27,7 @@ RPM_OPT_FLAGS ?= -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
+ CFLAGS += $(RPM_OPT_FLAGS) -std=gnu99 -Wall -Werror -Wno-error=unused-function -Wno-unused-function -ggdb
+ LDFLAGS := 
+ 
+-grubby_LIBS = -lblkid -lpopt
++grubby_LIBS = -lblkid -lpopt ${LIBS}
+ 
+ all: grubby
+ 
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch
new file mode 100644
index 0000000..de8133a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch
@@ -0,0 +1,25 @@
+From 8f844ac7f44b8dc428d06cd6958c5f32d383d01c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 10:19:50 -0700
+Subject: [PATCH 2/2] include paths.h for _PATH_MOUNTED
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ grubby.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/grubby.c b/grubby.c
+index 47a1a15..59f74a9 100644
+--- a/grubby.c
++++ b/grubby.c
+@@ -34,6 +34,7 @@
+ #include <libgen.h>
+ #include <execinfo.h>
+ #include <signal.h>
++#include <paths.h>
+ #include <blkid/blkid.h>
+ 
+ #include "log.h"
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
index 0e93790..5a99824 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
@@ -9,11 +9,14 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
 
 DEPENDS = "popt util-linux"
+DEPENDS_append_libc-musl = " libexecinfo"
 
 SRC_URI = "https://github.com/rhinstaller/${BPN}/archive/${PV}-1.tar.gz;downloadfilename=${BPN}-${PV}-1.tar.gz \
            file://grubby-rename-grub2-editenv-to-grub-editenv.patch \
            file://run-ptest \
-"
+           file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \
+           file://0002-include-paths.h-for-_PATH_MOUNTED.patch \
+           "
 
 SRC_URI[md5sum] = "1005907b275d6d93368d045274537d86"
 SRC_URI[sha256sum] = "85f1c678484f74c8978e8643451594967defce463a86c35cb1ee56d12767a9df"
@@ -24,8 +27,10 @@
 
 inherit autotools-brokensep ptest
 
-EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}'"
+EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' LIBS='${LIBS}'"
 
+LIBS_libc-musl = "-lexecinfo"
+LIBS ?= ""
 do_install_ptest() {
     install -d ${D}${PTEST_PATH}
     cp -r ${S}/test ${S}/test.sh ${D}${PTEST_PATH}
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch
new file mode 100644
index 0000000..7cd4c0e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch
@@ -0,0 +1,30 @@
+From 10fb440795a7796140bd657ee028847ec7c34447 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Sep 2017 23:10:54 -0700
+Subject: [PATCH] Kbuild.klibc: Add path to compiler headers via -isystem
+
+We need to include this path so it can find compiler headers e.g.
+stdarg.h which is called from wrapper stdarg.h using include_next
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ scripts/Kbuild.klibc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
+index f500d535..1d5cdc43 100644
+--- a/scripts/Kbuild.klibc
++++ b/scripts/Kbuild.klibc
+@@ -105,7 +105,8 @@ KLIBCOBJCOPY     := $(OBJCOPY)
+ KLIBCOBJDUMP     := $(OBJDUMP)
+ 
+ # klibc include paths
+-KLIBCCPPFLAGS    := -nostdinc -iwithprefix include \
++KLIBCCPPFLAGS    := -nostdinc -iwithprefix include      \
++		    -isystem $(shell $(CC) -print-file-name=include) \
+ 		    -I$(KLIBCINC)/arch/$(KLIBCARCHDIR)	\
+                     -I$(KLIBCINC)/bits$(KLIBCBITSIZE)	\
+ 		    -I$(KLIBCOBJ)/../include		\
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
new file mode 100644
index 0000000..41cc142
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
@@ -0,0 +1,30 @@
+From f66edde8a704131d98e8783ea8d4c848e8119b20 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 26 Jul 2017 16:13:16 -0700
+Subject: [PATCH 1/3] Kbuild.klibc: Use -print-libgcc-file-name instead of
+ --print-libgcc
+
+-print-libgcc-file-name works with clang and gcc unlike --print-libgcc
+which is gcc specific
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ scripts/Kbuild.klibc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
+index f500d535..101f86f5 100644
+--- a/scripts/Kbuild.klibc
++++ b/scripts/Kbuild.klibc
+@@ -128,7 +128,7 @@ KLIBCCFLAGS      += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS)  \
+ KLIBCAFLAGS      += -D__ASSEMBLY__ $(KLIBCCFLAGS)
+ KLIBCSTRIPFLAGS  += --strip-all -R .comment -R .note
+ 
+-KLIBCLIBGCC_DEF  := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
++KLIBCLIBGCC_DEF  := $(shell $(KLIBCCC) $(KLIBCCFLAGS) -print-libgcc-file-name)
+ KLIBCLIBGCC	 ?= $(KLIBCLIBGCC_DEF)
+ KLIBCCRT0        := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
+ KLIBCLIBC        := $(KLIBCOBJ)/libc.a
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
new file mode 100644
index 0000000..9c0ea63
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
@@ -0,0 +1,33 @@
+From a46a144ac883898d9cedf7a0b13aec6d10116125 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Sep 2017 23:11:53 -0700
+Subject: [PATCH] arm: Do not set a fallback march and mtune
+
+In OE we pass the options explicitly, there is
+no need to set it inside the makefiles, we will
+need to compute values for CPU_ARCH and CPU_TUNE
+which is a bit harder in OE
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ usr/klibc/arch/arm/MCONFIG | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
+index 53bc1dc3..857e2f2d 100644
+--- a/usr/klibc/arch/arm/MCONFIG
++++ b/usr/klibc/arch/arm/MCONFIG
+@@ -10,7 +10,7 @@
+ CPU_ARCH ?= armv4
+ CPU_TUNE ?= strongarm
+ 
+-KLIBCOPTFLAGS += -Os -march=$(CPU_ARCH) -mtune=$(CPU_TUNE)
++KLIBCOPTFLAGS += -Os
+ KLIBCBITSIZE  = 32
+ KLIBCREQFLAGS += -fno-exceptions
+ KLIBCSTRIPFLAGS += -R .ARM.exidx
+-- 
+2.14.2
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc.inc b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc.inc
index cd3f398..30294b1 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc.inc
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc.inc
@@ -17,6 +17,9 @@
            file://0001-include-linux-sysinfo.h-directly.patch \
            file://0001-mkfifo-Implement-mkfifo.patch \
            file://0001-always-use-bfd-linker.patch \
+           file://0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch \
+           file://0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch \
+           file://0001-arm-Do-not-set-a-fallback-march-and-mtune.patch \
 "
 
 ARMPATCHES ?= ""
@@ -38,7 +41,8 @@
                 'INSTALLDIR=${libdir}/klibc' \
                 'SHLIBDIR=${libdir}' \
                 '${KLIBCTHUMB}' \
-                'KLIBCOPTFLAGS=${TUNE_CCARGS}' \
+                'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
+                 V=1 \
                 "
 
 export FIX_ARMV4_EABI_BX = "${FIX_V4BX}"
@@ -48,6 +52,10 @@
     ln -sf "${STAGING_DIR_TARGET}${exec_prefix}" linux
 }
 
+do_compile_prepend_toolchain-clang() {
+    sed -i -e 's#$(KLIBCROSS)gcc#$(KLIBCROSS)clang#g' ${S}/Makefile
+}
+
 INHIBIT_PACKAGE_STRIP = "1"
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 INSANE_SKIP_${PN} = "already-stripped"
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
index 9d5e4eb..6e1b9ff 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
@@ -25,11 +25,11 @@
  Makefile | 24 ++----------------------
  1 file changed, 2 insertions(+), 22 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index eade234..2275865 100644
---- a/Makefile
-+++ b/Makefile
-@@ -16,28 +16,13 @@ endif
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -16,28 +16,11 @@ endif
  
  TESTS = tests
  
@@ -37,7 +37,7 @@
 -	ftl_format flash_erase nanddump doc_loadbios \
 -	ftl_check mkfs.jffs2 flash_lock flash_unlock \
 -	flash_otp_info flash_otp_dump flash_otp_lock flash_otp_write \
--	mtd_debug flashcp nandwrite nandtest \
+-	mtd_debug flashcp nandwrite nandtest mtdpart \
 -	jffs2dump \
 -	nftldump nftl_format docfdisk \
 -	rfddump rfdformat \
@@ -51,15 +51,15 @@
 -BINS += mkfs.ubifs/mkfs.ubifs
 -BINS += $(addprefix ubi-utils/,$(UBI_BINS))
 -SCRIPTS = flash_eraseall
-+BINS = $(addprefix ubi-utils/,$(UBI_BINS))
- 
- TARGETS = $(BINS)
+-
+-TARGETS = $(BINS)
 -TARGETS += lib/libmtd.a
 -TARGETS += ubi-utils/libubi.a
++BINS = $(addprefix ubi-utils/,$(UBI_BINS))
  
  OBJDEPS = $(BUILDDIR)/include/version.h
  
-@@ -61,12 +46,9 @@ endif
+@@ -61,12 +44,9 @@ endif
  	rm -f $(BUILDDIR)/include/version.h
  	$(MAKE) -C $(TESTS) clean
  
@@ -73,7 +73,7 @@
  
  tests::
  	$(MAKE) -C $(TESTS)
-@@ -91,8 +73,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
+@@ -91,8 +71,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
  LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
  LDLIBS_jffs2reader  = -lz $(LZOLDLIBS)
  
@@ -82,6 +82,3 @@
  #
  # Common libmtd
  #
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
index 2e43d5d..6b09c14 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
@@ -22,20 +22,11 @@
  include/common.h | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)
 
-diff --git a/include/common.h b/include/common.h
-index 77f3f7d..2cbee0f 100644
---- a/include/common.h
-+++ b/include/common.h
-@@ -126,7 +126,7 @@ static char __PRIxoff_t_static_assert[sizeof(off_t) == 8 ? 1 : -1];
- 	fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
- } while(0)
- 
--#if defined(__UCLIBC__)
-+#if defined(__UCLIBC__) || defined(__KLIBC__)
- /* uClibc versions before 0.9.34 don't have rpmatch() */
- #if __UCLIBC_MAJOR__ == 0 && \
- 		(__UCLIBC_MINOR__ < 9 || \
-@@ -146,15 +146,17 @@ static inline int __rpmatch(const char *resp)
+Index: git/include/common.h
+===================================================================
+--- git.orig/include/common.h
++++ git/include/common.h
+@@ -161,15 +161,17 @@ static inline int __rpmatch(const char *
   */
  static inline bool prompt(const char *msg, bool def)
  {
@@ -56,6 +47,3 @@
  			printf("failed to read prompt; assuming '%s'\n",
  				def ? "yes" : "no");
  			break;
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb
deleted file mode 100644
index 8674077..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "UBI utils statically compiled against klibc"
-DESCRIPTION = "Small sized tools from mtd-utils for use with initramfs."
-SECTION = "base"
-DEPENDS = "zlib lzo e2fsprogs util-linux"
-HOMEPAGE = "http://www.linux-mtd.infradead.org/"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
-                    file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
-
-inherit klibc
-
-SRC_URI = "git://git.infradead.org/mtd-utils.git;tag=b7455d847ab4f9eeeb6a729efc306bfda7bddc99 \
-             file://0001-Makefile-only-build-ubi-utils.patch \
-             file://0002-common.mk-for-klibc-CC-is-klcc.patch \
-             file://0003-libubi.c-add-klibc-specific-fixes.patch \
-             file://0004-common.h-klibc-fixes-1.patch \
-             file://0005-common.h-klibc-fixes-2.patch \
-             file://0006-libiniparser-remove-unused-function-needing-float.patch \
-             "
-
-S = "${WORKDIR}/git/"
-
-EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
-CFLAGS += "${TUNE_CCARGS}"
-
-do_install () {
-
-    install -d ${D}${sbindir}
-    oe_runmake DESTDIR="${D}" install
-
-}
-
-PACKAGES = "ubi-utils-klibc-dbg"
-
-PACKAGES =+ "mtdinfo-klibc ubiattach-klibc ubiblock-klibc ubicrc32-klibc ubidetach-klibc \
-             ubiformat-klibc ubimkvol-klibc ubinfo-klibc ubinize-klibc ubirename-klibc \
-             ubirmvol-klibc ubirsvol-klibc ubiupdatevol-klibc"
-
-FILES_mtdinfo-klibc = "${sbindir}/mtdinfo"
-FILES_ubiattach-klibc = "${sbindir}/ubiattach"
-FILES_ubiblock-klibc = "${sbindir}/ubiblock"
-FILES_ubicrc32-klibc = "${sbindir}/ubicrc32"
-FILES_ubidetach-klibc = "${sbindir}/ubidetach"
-FILES_ubiformat-klibc = "${sbindir}/ubiformat"
-FILES_ubimkvol-klibc = "${sbindir}/ubimkvol"
-FILES_ubinfo-klibc = "${sbindir}/ubinfo"
-FILES_ubinize-klibc = "${sbindir}/ubinize"
-FILES_ubirename-klibc = "${sbindir}/ubirename"
-FILES_ubirmvol-klibc = "${sbindir}/ubirmvol"
-FILES_ubirsvol-klibc = "${sbindir}/ubirsvol"
-FILES_ubiupdatevol-klibc = "${sbindir}/ubiupdatevol"
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
new file mode 100644
index 0000000..518c02f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
@@ -0,0 +1,48 @@
+SUMMARY = "UBI utils statically compiled against klibc"
+DESCRIPTION = "Small sized tools from mtd-utils for use with initramfs."
+SECTION = "base"
+DEPENDS = "zlib lzo e2fsprogs util-linux"
+HOMEPAGE = "http://www.linux-mtd.infradead.org/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+                    file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
+
+inherit klibc
+
+SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1"
+SRC_URI = "git://git.infradead.org/mtd-utils.git \
+             file://0001-Makefile-only-build-ubi-utils.patch \
+             file://0002-common.mk-for-klibc-CC-is-klcc.patch \
+             file://0003-libubi.c-add-klibc-specific-fixes.patch \
+             file://0004-common.h-klibc-fixes-1.patch \
+             file://0005-common.h-klibc-fixes-2.patch \
+             file://0006-libiniparser-remove-unused-function-needing-float.patch \
+             "
+
+S = "${WORKDIR}/git/"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
+
+do_install () {
+	oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
+}
+
+PACKAGES = "ubi-utils-klibc-dbg"
+
+PACKAGES =+ "mtdinfo-klibc ubiattach-klibc ubiblock-klibc ubicrc32-klibc ubidetach-klibc \
+             ubiformat-klibc ubimkvol-klibc ubinfo-klibc ubinize-klibc ubirename-klibc \
+             ubirmvol-klibc ubirsvol-klibc ubiupdatevol-klibc"
+
+FILES_mtdinfo-klibc = "${sbindir}/mtdinfo"
+FILES_ubiattach-klibc = "${sbindir}/ubiattach"
+FILES_ubiblock-klibc = "${sbindir}/ubiblock"
+FILES_ubicrc32-klibc = "${sbindir}/ubicrc32"
+FILES_ubidetach-klibc = "${sbindir}/ubidetach"
+FILES_ubiformat-klibc = "${sbindir}/ubiformat"
+FILES_ubimkvol-klibc = "${sbindir}/ubimkvol"
+FILES_ubinfo-klibc = "${sbindir}/ubinfo"
+FILES_ubinize-klibc = "${sbindir}/ubinize"
+FILES_ubirename-klibc = "${sbindir}/ubirename"
+FILES_ubirmvol-klibc = "${sbindir}/ubirmvol"
+FILES_ubirsvol-klibc = "${sbindir}/ubirsvol"
+FILES_ubiupdatevol-klibc = "${sbindir}/ubiupdatevol"
diff --git a/import-layers/meta-openembedded/meta-multimedia/README b/import-layers/meta-openembedded/meta-multimedia/README
index abdc1a2..b59dfe0 100644
--- a/import-layers/meta-openembedded/meta-multimedia/README
+++ b/import-layers/meta-openembedded/meta-multimedia/README
@@ -1,20 +1,20 @@
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: pyro
+branch: rocko
 revision: HEAD
 
 URI: git://github.com/openembedded/meta-oe.git
-layers: meta-oe, meta-ruby
-branch: pyro
+layers: meta-oe
+branch: rocko
 revision: HEAD
 
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-multimedia][pyro]' in the subject'
+Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-multimedia][rocko]' in the subject'
 
 When sending single patches, please use something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-multimedia][pyro][PATCH
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-multimedia][rocko][PATCH
 
 You are encouraged to fork the mirror on github https://github.com/openembedded/meta-oe/ to share your patches, this is preferred for patch sets consisting of more than one patch. Other services like gitorious, repo.or.cz or self hosted setups are of course accepted as well, 'git fetch <remote>' works the same on all of them. We recommend github because it is free, easy to use, has been proven to be reliable and has a really good web GUI.
 
-pyro Branch Maintainer:
+rocko Branch Maintainer:
 Armin Kuster <akuster808@gmail.com>
diff --git a/import-layers/meta-openembedded/meta-multimedia/classes/juce.bbclass b/import-layers/meta-openembedded/meta-multimedia/classes/juce.bbclass
index 715282f..3927235 100644
--- a/import-layers/meta-openembedded/meta-multimedia/classes/juce.bbclass
+++ b/import-layers/meta-openembedded/meta-multimedia/classes/juce.bbclass
@@ -1,8 +1,8 @@
 inherit pkgconfig
 
+# List of JUCE modules that requires external dependencies
 JUCE_MODULES ??= " \
   juce_core \
-  juce_events \
   ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'juce_audio_devices', '', d)} \
   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'juce_graphics juce_gui_basics', '', d)} \
   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'juce_opengl', '', d)} \
@@ -11,7 +11,6 @@
 
 PACKAGECONFIG_prepend= "${JUCE_MODULES} "
 PACKAGECONFIG[juce_core] = ",,curl,"
-PACKAGECONFIG[juce_events] = ",,libx11,"
 PACKAGECONFIG[juce_audio_devices] = ",,alsa-lib,"
 PACKAGECONFIG[juce_graphics] = ",,${JUCE_X11_DEPS} freetype,"
 PACKAGECONFIG[juce_gui_basics] = ",,${JUCE_X11_DEPS},"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/files/move_vapigen.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/files/move_vapigen.patch
new file mode 100644
index 0000000..9bfc31b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/files/move_vapigen.patch
@@ -0,0 +1,102 @@
+OE-Core's vala class known one type of vapigen.m4 and deletes it since its
+not cross compile friendly, but this is a different case here where its not
+same vapigen.m4 just name is same and it tends to inherit vala bbclass so
+save it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: gupnp-dlna-0.10.5/m4/vapigen-custom.m4
+===================================================================
+--- /dev/null
++++ gupnp-dlna-0.10.5/m4/vapigen-custom.m4
+@@ -0,0 +1,43 @@
++
++dnl vala.m4
++dnl
++dnl Copyright 2010 Marc-Andre Lureau
++dnl Copyright 2011 Rodney Dawes <dobey.pwns@gmail.com>
++dnl
++dnl This library is free software; you can redistribute it and/or
++dnl modify it under the terms of the GNU Lesser General Public
++dnl License as published by the Free Software Foundation; either
++dnl version 2.1 of the License, or (at your option) any later version.
++dnl
++dnl This library is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++dnl Lesser General Public License for more details.
++dnl
++dnl You should have received a copy of the GNU Lesser General Public
++dnl License along with this library; if not, write to the Free Software
++dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
++
++dnl dropped everything but VALA_PROG_VAPIGEN - Jens Georg <mail@jensge.org>
++
++# Check whether the Vala API Generator exists in `PATH'. If it is found,
++# the variable VAPIGEN is set. Optionally a minimum release number of the
++# generator can be requested.
++#
++# VALA_PROG_VAPIGEN([MINIMUM-VERSION])
++# ------------------------------------
++AC_DEFUN([GUPNP_PROG_VAPIGEN],
++[AC_PATH_PROG([VAPIGEN], [vapigen], [])
++  AS_IF([test -z "$VAPIGEN"],
++    [AC_MSG_WARN([No Vala API Generator found. You will not be able to generate .vapi files.])],
++    [AS_IF([test -n "$1"],
++        [AC_MSG_CHECKING([$VAPIGEN is at least version $1])
++         am__vapigen_version=`$VAPIGEN --version | sed 's/Vala API Generator  *//'`
++         AS_VERSION_COMPARE([$1], ["$am__vapigen_version"],
++           [AC_MSG_RESULT([yes])],
++           [AC_MSG_RESULT([yes])],
++           [AC_MSG_RESULT([no])
++            AC_MSG_WARN([Vala API Generator $1 not found.])
++            VAPIGEN=""
++           ])])])
++])
+Index: gupnp-dlna-0.10.5/m4/vapigen.m4
+===================================================================
+--- gupnp-dlna-0.10.5.orig/m4/vapigen.m4
++++ /dev/null
+@@ -1,43 +0,0 @@
+-
+-dnl vala.m4
+-dnl
+-dnl Copyright 2010 Marc-Andre Lureau
+-dnl Copyright 2011 Rodney Dawes <dobey.pwns@gmail.com>
+-dnl
+-dnl This library is free software; you can redistribute it and/or
+-dnl modify it under the terms of the GNU Lesser General Public
+-dnl License as published by the Free Software Foundation; either
+-dnl version 2.1 of the License, or (at your option) any later version.
+-dnl
+-dnl This library is distributed in the hope that it will be useful,
+-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-dnl Lesser General Public License for more details.
+-dnl
+-dnl You should have received a copy of the GNU Lesser General Public
+-dnl License along with this library; if not, write to the Free Software
+-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+-
+-dnl dropped everything but VALA_PROG_VAPIGEN - Jens Georg <mail@jensge.org>
+-
+-# Check whether the Vala API Generator exists in `PATH'. If it is found,
+-# the variable VAPIGEN is set. Optionally a minimum release number of the
+-# generator can be requested.
+-#
+-# VALA_PROG_VAPIGEN([MINIMUM-VERSION])
+-# ------------------------------------
+-AC_DEFUN([GUPNP_PROG_VAPIGEN],
+-[AC_PATH_PROG([VAPIGEN], [vapigen], [])
+-  AS_IF([test -z "$VAPIGEN"],
+-    [AC_MSG_WARN([No Vala API Generator found. You will not be able to generate .vapi files.])],
+-    [AS_IF([test -n "$1"],
+-        [AC_MSG_CHECKING([$VAPIGEN is at least version $1])
+-         am__vapigen_version=`$VAPIGEN --version | sed 's/Vala API Generator  *//'`
+-         AS_VERSION_COMPARE([$1], ["$am__vapigen_version"],
+-           [AC_MSG_RESULT([yes])],
+-           [AC_MSG_RESULT([yes])],
+-           [AC_MSG_RESULT([no])
+-            AC_MSG_WARN([Vala API Generator $1 not found.])
+-            VAPIGEN=""
+-           ])])])
+-])
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gssdp_0.14.8.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gssdp_0.14.8.bb
deleted file mode 100644
index 9457abc..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gssdp_0.14.8.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require gssdp.inc
-
-inherit gtk-doc
-
-PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk,gtk+3"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/0.14/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "b8658e480d047caf2d92baa4a51b9ae7"
-SRC_URI[sha256sum] = "4c3ffa01435e84dc31c954e669e1ca0749b962f76a333e74f5c2cb0de5803a13"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gssdp_1.0.2.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gssdp_1.0.2.bb
new file mode 100644
index 0000000..b60d1ea
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gssdp_1.0.2.bb
@@ -0,0 +1,9 @@
+require gssdp.inc
+
+inherit gtk-doc
+
+PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk,gtk+3"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/1.0/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "b30c9a406853c6a3a012d151d6e7ad2c"
+SRC_URI[sha256sum] = "a1e17c09c7e1a185b0bd84fd6ff3794045a3cd729b707c23e422ff66471535dc"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.12.10.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.12.10.bb
new file mode 100644
index 0000000..cfd0227
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.12.10.bb
@@ -0,0 +1,7 @@
+require gupnp-av.inc
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/0.12/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "215f626508d76b767f5da7c9b92e87d8"
+SRC_URI[sha256sum] = "8038ef84dddbe7ad91c205bf91dddf684f072df8623f39b6555a6bb72837b85a"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://libgupnp-av/gupnp-av.h;beginline=1;endline=22;md5=2b47b7b5f799d2ebabe62b895e848820"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.12.6.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.12.6.bb
deleted file mode 100644
index b8cfa27..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.12.6.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require gupnp-av.inc
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/0.12/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "f56cdb269376a9e6cb062eb9960ccf57"
-SRC_URI[sha256sum] = "e0553d60dd7c7277c65c02a68a270c4dcb9036a4c7075c902fc8111c6a5e6a44"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://libgupnp-av/gupnp-av.h;beginline=1;endline=22;md5=2b47b7b5f799d2ebabe62b895e848820"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-dlna_0.10.5.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-dlna_0.10.5.bb
new file mode 100644
index 0000000..3cafd69
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-dlna_0.10.5.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Helpers for AV applications using DLNA"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://libgupnp-dlna/gupnp-dlna-profile.h;beginline=1;endline=22;md5=1b85459f65cb1e73a885ca137aab6274"
+
+DEPENDS = "libxml2 glib-2.0"
+
+SRC_URI = "http://download.gnome.org/sources/${BPN}/0.10/${BPN}-${PV}.tar.xz \
+           file://move_vapigen.patch \
+"
+SRC_URI[md5sum] = "2d0dc1e4189d0243ac3838ece1e8fea0"
+SRC_URI[sha256sum] = "123e368227c11d5c17fc1aa76cbdaffa345355eb51d172cd39fc74a5b468ff6a"
+
+inherit autotools pkgconfig gobject-introspection vala
+
+PACKAGECONFIG ?= "gstreamer"
+PACKAGECONFIG[gstreamer] = "--enable-gstreamer-metadata-backend,--disable-gstreamer-metadata-backend,gstreamer1.0 gstreamer1.0-plugins-base"
+
+FILES_${PN} += "${datadir}/gupnp-dlna-2.0/dlna-profiles"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-dlna_0.9.4.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-dlna_0.9.4.bb
deleted file mode 100644
index 053604e..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-dlna_0.9.4.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Helpers for AV applications using DLNA"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
-                    file://libgupnp-dlna/gupnp-dlna-profile.h;beginline=1;endline=22;md5=1b85459f65cb1e73a885ca137aab6274"
-
-DEPENDS = "libxml2 glib-2.0"
-
-SRC_URI = "http://download.gnome.org/sources/${BPN}/0.9/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "f93665e535a512e4d515a86311435cb6"
-SRC_URI[sha256sum] = "69969713f36c0e815fbbbcfdfb3ad9bd447cfd10d0fd86227d82dfd8edb6c807"
-
-inherit autotools pkgconfig gobject-introspection vala
-
-PACKAGECONFIG ?= "gstreamer"
-PACKAGECONFIG[gstreamer] = "--enable-gstreamer-metadata-backend,--disable-gstreamer-metadata-backend,gstreamer1.0 gstreamer1.0-plugins-base"
-
-FILES_${PN} += "${datadir}/gupnp-dlna-2.0/dlna-profiles"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-igd_0.2.2.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-igd_0.2.2.bb
deleted file mode 100644
index 440e826..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-igd_0.2.2.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Helpers for interacting with Internet Gateway Devices over UPnP"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-                    file://libgupnp-igd/gupnp-simple-igd.c;beginline=1;endline=21;md5=aa292c0d9390463a6e1055dc5fc68e80"
-
-DEPENDS = "glib-2.0 gupnp sqlite3"
-
-SRC_URI = "http://download.gnome.org/sources/${BPN}/0.2/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "f881323304185c02634034e3bda714ba"
-SRC_URI[sha256sum] = "73b6a98a0f13b29b34c3bfc07f99f78b1319211cb95a8585752873af2b9067d3"
-
-inherit autotools pkgconfig gtk-doc gobject-introspection
-
-EXTRA_OECONF = "--disable-python"
-
-PNBLACKLIST[gupnp-igd] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130645/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-igd_0.2.4.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-igd_0.2.4.bb
new file mode 100644
index 0000000..0aa594d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-igd_0.2.4.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Helpers for interacting with Internet Gateway Devices over UPnP"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+                    file://libgupnp-igd/gupnp-simple-igd.c;beginline=1;endline=21;md5=aa292c0d9390463a6e1055dc5fc68e80"
+
+DEPENDS = "glib-2.0 gupnp sqlite3"
+
+SRC_URI = "http://download.gnome.org/sources/${BPN}/0.2/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "124371136b5a7b1056a3681780a62772"
+SRC_URI[sha256sum] = "38c4a6d7718d17eac17df95a3a8c337677eda77e58978129ad3182d769c38e44"
+
+inherit autotools pkgconfig gtk-doc gobject-introspection
+
+EXTRA_OECONF = "--disable-python"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.10.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.10.bb
deleted file mode 100644
index ba7f825..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.10.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Tools for GUPnP"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
-                    file://src/network-light/main.c;beginline=1;endline=21;md5=2c39b3a000495dabd4932f231c7efed8"
-DEPENDS = "gupnp gupnp-av gtk+3 intltool-native"
-RRECOMMENDS_${PN} = "adwaita-icon-theme"
-
-SRC_URI = "http://download.gnome.org/sources/${BPN}/0.8/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "ad8423d036e98bc6f877528d6b846f6a"
-SRC_URI[sha256sum] = "592c53289ff1cd70e676405c56ca87b28d2da37a385d34a3bb9b944ba9108d17"
-
-inherit autotools pkgconfig
-
-PNBLACKLIST[gupnp-tools] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130670/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb
new file mode 100644
index 0000000..9360d65
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb
@@ -0,0 +1,11 @@
+SUMMARY = "Tools for GUPnP"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+                    file://src/network-light/main.c;beginline=1;endline=21;md5=2c39b3a000495dabd4932f231c7efed8"
+DEPENDS = "gupnp gupnp-av gtk+3 intltool-native"
+RRECOMMENDS_${PN} = "adwaita-icon-theme"
+
+SRC_URI = "http://download.gnome.org/sources/${BPN}/0.8/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "212d85ebce89b32468b59e1164050d40"
+SRC_URI[sha256sum] = "aa3decb9d532c0e2e505adc592f431fd81c0231ded2981129e87da13712479ed"
+inherit autotools pkgconfig gettext
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp_0.20.14.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp_0.20.14.bb
deleted file mode 100644
index ed07175..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp_0.20.14.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require gupnp.inc
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/0.20/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "63346ef90ac5cd925c3a941f51d8bca6"
-SRC_URI[sha256sum] = "77ffb940ba77c4a6426d09d41004c75d92652dcbde86c84ac1c847dbd9ad59bd"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://libgupnp/gupnp.h;beginline=1;endline=20;md5=d78a69d9b6e63ee2dc72e7b674d97520"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.0.2.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.0.2.bb
new file mode 100644
index 0000000..1bdf7d7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.0.2.bb
@@ -0,0 +1,8 @@
+require gupnp.inc
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/1.0/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "afd96fe73856b38aaf1baf7526e08edd"
+SRC_URI[sha256sum] = "5173fda779111c6b01cd4a5e41b594322be9d04f8c74d3361f0a0c2069c77610"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://libgupnp/gupnp.h;beginline=1;endline=20;md5=d78a69d9b6e63ee2dc72e7b674d97520"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/CVE-2016-8863.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/CVE-2016-8863.patch
deleted file mode 100644
index abb4a72..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/CVE-2016-8863.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-libupnp-1.6.19: Fix CVE-2016-8863
-
-[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=1388771
-
-gena_device: Fix out-of-bound access in create_url_list()
-
-If there is an invalid URL in URLS->buf after a valid one, uri_parse is
-called with out pointing after the allocated memory. As uri_parse writes
-to *out before returning an error the loop in create_url_list must be
-stopped early to prevent an out-of-bound access
-
-Upstream-Status: Backported [https://sourceforge.net/p/pupnp/code/ci/9c099c2923ab4d98530ab5204af1738be5bddba7]
-CVE: CVE-2016-8863
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/upnp/src/gena/gena_device.c b/upnp/src/gena/gena_device.c
-index 39edc0b..0fd60ad 100644
---- a/upnp/src/gena/gena_device.c
-+++ b/upnp/src/gena/gena_device.c
-@@ -1133,7 +1133,7 @@ static int create_url_list(
- 	/*! [out] . */
- 	URL_list *out)
- {
--    size_t URLcount = 0;
-+    size_t URLcount = 0, URLcount2 = 0;
-     size_t i;
-     int return_code = 0;
-     uri_type temp;
-@@ -1175,16 +1175,23 @@ static int create_url_list(
-         }
-         memcpy( out->URLs, URLS->buff, URLS->size );
-         out->URLs[URLS->size] = 0;
--        URLcount = 0;
-         for( i = 0; i < URLS->size; i++ ) {
-             if( ( URLS->buff[i] == '<' ) && ( i + 1 < URLS->size ) ) {
-                 if( ( ( return_code =
-                         parse_uri( &out->URLs[i + 1], URLS->size - i + 1,
--                                   &out->parsedURLs[URLcount] ) ) ==
-+                                   &out->parsedURLs[URLcount2] ) ) ==
-                       HTTP_SUCCESS )
--                    && ( out->parsedURLs[URLcount].hostport.text.size !=
-+                    && ( out->parsedURLs[URLcount2].hostport.text.size !=
-                          0 ) ) {
--                    URLcount++;
-+                    URLcount2++;
-+                    if (URLcount2 >= URLcount)
-+                        /*
-+                         * break early here in case there is a bogus URL that
-+                         * was skipped above. This prevents to access
-+                         * out->parsedURLs[URLcount] which is beyond the
-+                         * allocation.
-+                         */
-+                        break;
-                 } else {
-                     if( return_code == UPNP_E_OUTOF_MEMORY ) {
-                         free( out->URLs );
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/avoid-redefining-strnlen-and-strndup.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/avoid-redefining-strnlen-and-strndup.patch
deleted file mode 100644
index 3c3f230..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/avoid-redefining-strnlen-and-strndup.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 22fba4f2765f92cd592a58e1fe5c450b187e30e1 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Wed, 3 Jun 2015 21:39:03 -0700
-Subject: [PATCH] avoid redefining strnlen() and strndup()
-
-Rely on string.h definitions instead. Workaround for compiler errors such as:
-
-  | i686-rdk-linux-libtool: compile:  i686-rdk-linux-gcc -m32 -march=atom -mtune=atom -fschedule-insns -fsched-pressure -msse3 -mfpmath=sse --sysroot=/home/andre/build/tmp/sysroots/7401 -DHAVE_CONFIG_H -I. -I/home/andre/build/tmp/work/core2-32-rdk-linux/libupnp/1.6.19-r0/libupnp-1.6.19/upnp -I.. -I../upnp/inc -I/home/andre/build/tmp/work/core2-32-rdk-linux/libupnp/1.6.19-r0/libupnp-1.6.19/upnp/inc -I/home/andre/build/tmp/work/core2-32-rdk-linux/libupnp/1.6.19-r0/libupnp-1.6.19/threadutil/inc -I/home/andre/build/tmp/work/core2-32-rdk-linux/libupnp/1.6.19-r0/libupnp-1.6.19/ixml/inc -I/home/andre/build/tmp/work/core2-32-rdk-linux/libupnp/1.6.19-r0/libupnp-1.6.19/upnp/src/inc -pthread -O2 -pipe -g -feliminate-unused-debug-types -Os -Wall -c /home/andre/build/tmp/work/core2-32-rdk-linux/libupnp/1.6.19-r0/libupnp-1.6.19/upnp/src/gena/gena_callback2.c -o src/gena/libupnp_la-gena_callback2.o >/dev/null 2>&1
-  | In file included from /home/andre/build/tmp/sysroots/7401/usr/include/string.h:634:0,
-  |                  from /home/andre/build/tmp/work/core2-32-rdk-linux/libupnp/1.6.19-r0/libupnp-1.6.19/upnp/src/api/UpnpString.c:23:
-  | /home/andre/build/tmp/work/core2-32-rdk-linux/libupnp/1.6.19-r0/libupnp-1.6.19/upnp/src/api/UpnpString.c:47:15: error: expected identifier or '(' before '__extension__'
-  |   extern char *strndup(__const char *__string, size_t __n);
-  |                ^
-  | make[3]: *** [src/api/libupnp_la-UpnpString.lo] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- upnp/src/api/UpnpString.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/upnp/src/api/UpnpString.c b/upnp/src/api/UpnpString.c
-index 41c9898..2fa09d7 100644
---- a/upnp/src/api/UpnpString.c
-+++ b/upnp/src/api/UpnpString.c
-@@ -32,7 +32,7 @@
- 	/* VC has strnlen which is already included but with (potentially) different linkage */
- 	/* strnlen() is a GNU extension. */
- 	#if HAVE_STRNLEN
--		extern size_t strnlen(const char *s, size_t maxlen);
-+//		extern size_t strnlen(const char *s, size_t maxlen);
- 	#else /* HAVE_STRNLEN */
- 		static size_t strnlen(const char *s, size_t n)
- 		{
-@@ -44,7 +44,7 @@
- 
- /* strndup() is a GNU extension. */
- #if HAVE_STRNDUP && !defined(WIN32)
--	extern char *strndup(__const char *__string, size_t __n);
-+//	extern char *strndup(__const char *__string, size_t __n);
- #else /* HAVE_STRNDUP && !defined(WIN32) */
- 	static char *strndup(const char *__string, size_t __n)
- 	{
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/sepbuildfix.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/sepbuildfix.patch
deleted file mode 100644
index cd9768d..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp/sepbuildfix.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From e198f0a87660a048164ca0e16d18517d0aee846e Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 9 Jun 2015 12:20:45 -0700
-Subject: [PATCH] Fix builds when using separate source and build directories.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- configure.ac           | 8 ++++----
- ixml/Makefile.am       | 2 +-
- threadutil/Makefile.am | 2 +-
- 3 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index e2c3f47..11d5e22 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -714,8 +714,8 @@ AC_OUTPUT
- #
- # Files copied for windows compilation.
- #
--echo "configure: copying \"autoconfig.h\"          to \"build/inc/autoconfig.h\""
--cp autoconfig.h build/inc/autoconfig.h
--echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"build/inc/upnpconfig.h\""
--cp upnp/inc/upnpconfig.h build/inc/upnpconfig.h
-+echo "configure: copying \"autoconfig.h\"          to \"\$srcdir/build/inc/autoconfig.h\""
-+cp autoconfig.h $srcdir/build/inc/autoconfig.h
-+echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"\$srcdir/build/inc/upnpconfig.h\""
-+cp upnp/inc/upnpconfig.h $srcdir/build/inc/upnpconfig.h
- 
-diff --git a/ixml/Makefile.am b/ixml/Makefile.am
-index 49da766..0e9ab2c 100644
---- a/ixml/Makefile.am
-+++ b/ixml/Makefile.am
-@@ -7,7 +7,7 @@
- 
- SUBDIRS 		= doc
- 
--AM_CPPFLAGS		= -I$(srcdir)/inc -I$(srcdir)/src/inc
-+AM_CPPFLAGS		= -I$(top_srcdir)/upnp/inc -I$(srcdir)/inc -I$(srcdir)/src/inc
- AM_CFLAGS		= 
- 
- LDADD			= libixml.la
-diff --git a/threadutil/Makefile.am b/threadutil/Makefile.am
-index a4ed325..42d0726 100644
---- a/threadutil/Makefile.am
-+++ b/threadutil/Makefile.am
-@@ -4,7 +4,7 @@
- # (C) Copyright 2005 Remi Turboult <r3mi@users.sourceforge.net>
- #
- 
--AM_CPPFLAGS		= -I$(srcdir)/inc -I$(srcdir)/src/inc
-+AM_CPPFLAGS		= -I$(top_srcdir)/upnp/inc -I$(srcdir)/inc -I$(srcdir)/src/inc
- 
- if ENABLE_DEBUG
-     AM_CPPFLAGS		+= -DDEBUG -DSTATS
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6/sepbuildfix.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6/sepbuildfix.patch
new file mode 100644
index 0000000..0493cea
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6/sepbuildfix.patch
@@ -0,0 +1,34 @@
+From e198f0a87660a048164ca0e16d18517d0aee846e Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 9 Jun 2015 12:20:45 -0700
+Subject: [PATCH] Fix builds when using separate source and build directories.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac           | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a8731b5..54a3c3d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -744,9 +744,9 @@ AC_OUTPUT
+ #
+ # Files copied for windows compilation.
+ #
+-echo "configure: copying \"autoconfig.h\"          to \"build/inc/autoconfig.h\""
+-test -d build/inc || mkdir -p build/inc
+-cp autoconfig.h build/inc/autoconfig.h
+-echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"build/inc/upnpconfig.h\""
+-cp upnp/inc/upnpconfig.h build/inc/upnpconfig.h
++echo "configure: copying \"autoconfig.h\"          to \"\$srcdir/build/inc/autoconfig.h\""
++test -d $srcdir/build/inc || mkdir -p $srcdir/build/inc
++cp autoconfig.h $srcdir/build/inc/autoconfig.h
++echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"\$srcdir/build/inc/upnpconfig.h\""
++cp upnp/inc/upnpconfig.h $srcdir/build/inc/upnpconfig.h
+ 
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6_1.6.21.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6_1.6.21.bb
new file mode 100644
index 0000000..c1b0429
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6_1.6.21.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Portable SDK for UPnP* Devices"
+DESCRIPTION = "The Portable SDK for UPnP Devices is an SDK for development of \
+UPnP device and control point applications. It consists of the core UPnP \
+protocols along with a UPnP-specific eXtensible Markup Language (XML) parser \
+supporting the Document Object Model (DOM) Level 2 API and an optional, \
+integrated mini web server for serving UPnP related documents."
+HOMEPAGE = "http://pupnp.sourceforge.net/"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b3190d5244e08e78e4c8ee78544f4863"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pupnp/libupnp-${PV}.tar.bz2 \
+           file://sepbuildfix.patch \
+"
+
+SRC_URI[md5sum] = "513adadb07fa039a8aeb0ceb7b7b0f6e"
+SRC_URI[sha256sum] = "af3f3c0846a1d75baeadae4aa5a2bda427567e2a1fb4559bf73ccff0a4f9a39b"
+
+S = "${WORKDIR}/libupnp-${PV}"
+
+inherit autotools
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp_1.6.19.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp_1.6.19.bb
deleted file mode 100644
index 71fc70d..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp_1.6.19.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Portable SDK for UPnP* Devices"
-DESCRIPTION = "The Portable SDK for UPnP Devices is an SDK for development of \
-UPnP device and control point applications. It consists of the core UPnP \
-protocols along with a UPnP-specific eXtensible Markup Language (XML) parser \
-supporting the Document Object Model (DOM) Level 2 API and an optional, \
-integrated mini web server for serving UPnP related documents."
-HOMEPAGE = "http://pupnp.sourceforge.net/"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b3190d5244e08e78e4c8ee78544f4863"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pupnp/${BP}.tar.bz2 \
-           file://avoid-redefining-strnlen-and-strndup.patch \
-           file://sepbuildfix.patch \
-           file://CVE-2016-8863.patch \
-"
-
-SRC_URI[md5sum] = "ee16e5d33a3ea7506f38d71facc057dd"
-SRC_URI[sha256sum] = "b3142b39601243b50532eec90f4a27dba85eb86f58d4b849ac94edeb29d9b22a"
-
-inherit autotools
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp_git.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp_git.bb
new file mode 100644
index 0000000..7a524f2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp_git.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Portable SDK for UPnP* Devices"
+DESCRIPTION = "The Portable SDK for UPnP Devices is an SDK for development of \
+UPnP device and control point applications. It consists of the core UPnP \
+protocols along with a UPnP-specific eXtensible Markup Language (XML) parser \
+supporting the Document Object Model (DOM) Level 2 API and an optional, \
+integrated mini web server for serving UPnP related documents."
+HOMEPAGE = "http://pupnp.sourceforge.net/"
+LICENSE = "BSD"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b3190d5244e08e78e4c8ee78544f4863"
+
+PV = "1.8.2+git${SRCPV}"
+SRCREV = "56d6042abae861e8838a4e6b6b5b575b99e38f34"
+SRC_URI = "git://github.com/mrjimenez/pupnp.git;protocol=https"
+
+S="${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OECONF += "--enable-reuseaddr"
\ No newline at end of file
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb
deleted file mode 100644
index bb361a1..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Lightweight UPnP IGD daemon"
-DESCRIPTION = "The miniUPnP daemon is an UPnP IGD (internet gateway device) \
-which provide NAT traversal services to any UPnP enabled client on \
-the network."
-
-SECTION = "networking"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=aa71c78c373ccfe0ff207af0cd966d91"
-
-inherit autotools gettext pkgconfig
-
-DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack"
-
-SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${P}.tar.gz \
-"
-SRC_URI[md5sum] = "1c07a215dd9b362e75a9efc05e2fb3b4"
-SRC_URI[sha256sum] = "d96aa3a00e0f5490826bba3cb97e68cd27479e5839adac4b9bcb66eae786bfb7"
-
-IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}"
-
-do_compile() {
-    cd ${S}
-    CONFIG_OPTIONS="${IPV6} --leasefile" ./genconfig.sh
-    oe_runmake -f Makefile.linux
-}
-
-do_install() {
-    install -d ${D}/${sbindir}
-    install ${S}/miniupnpd ${D}/${sbindir}
-    install -d ${D}/${sysconfdir}/${BPN}
-    install ${S}/netfilter/iptables_init.sh ${D}/${sysconfdir}/${BPN}
-    install ${S}/netfilter/iptables_removeall.sh ${D}/${sysconfdir}/${BPN}
-    install ${S}/netfilter/ip6tables_init.sh ${D}/${sysconfdir}/${BPN}
-    install ${S}/netfilter/ip6tables_removeall.sh ${D}/${sysconfdir}/${BPN}
-    install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN}
-    install -d ${D}/${sysconfdir}/init.d
-    install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd
-}
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.28.2.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.28.2.bb
deleted file mode 100644
index 38fac65..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.28.2.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "A UPnP AV media server and renderer"
-DESCRIPTION = "Rygel is a home media solution (UPnP AV MediaServer) that \
-allow you to easily share audio, video and pictures to other devices. \
-Additionally, media player software may use Rygel to become a MediaRenderer \
-that may be controlled remotely by a UPnP or DLNA Controller."
-HOMEPAGE = "http://live.gnome.org/Rygel"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
-                    file://src/rygel/rygel-main.vala;endline=27;md5=99324118da4c012d25edae2f779ae9b3"
-
-DEPENDS = "libxml2 glib-2.0 gssdp gupnp gupnp-av gupnp-dlna gstreamer1.0 gstreamer1.0-plugins-base ossp-uuid libgee libsoup-2.4 libmediaart-2.0 libunistring sqlite3 intltool-native"
-RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback shared-mime-info"
-RRECOMMENDS_${PN} = "rygel-plugin-media-export"
-
-GNOME_COMPRESS_TYPE = "xz"
-SRC_URI[archive.md5sum] = "9fbe4fb53b6cfa2f3f3723b7649a2215"
-SRC_URI[archive.sha256sum] = "9ea23df7186caac5f1aad3137edf6d507d339b9a469fc3133df4043fa66b61f5"
-
-inherit gnomebase vala gobject-introspection
-
-EXTRA_OECONF = "--disable-tracker-plugin --with-media-engine=gstreamer"
-
-PACKAGECONFIG ?= "external mpris mediathek ruih media-export gst-launch gtk+3"
-PACKAGECONFIG[external] = "--enable-external-plugin,--disable-external-plugin"
-PACKAGECONFIG[mpris] = "--enable-mpris-plugin,--disable-mpris-plugin"
-PACKAGECONFIG[mediathek] = "--enable-mediathek-plugin,--disable-mediathek-plugin"
-PACKAGECONFIG[ruih] = "--enable-ruih-plugin,--disable-ruih-plugin"
-PACKAGECONFIG[media-export] = "--enable-media-export-plugin,--disable-media-export-plugin"
-PACKAGECONFIG[gst-launch] = "--enable-gst-launch-plugin,--disable-gst-launch-plugin"
-PACKAGECONFIG[gtk+3] = ",--without-ui,gtk+3"
-
-LIBV = "2.6"
-
-do_install_append() {
-       # Remove .la files for loadable modules
-       rm -f ${D}/${libdir}/rygel-${LIBV}/engines/*.la
-       rm -f ${D}/${libdir}/rygel-${LIBV}/plugins/*.la
-}
-
-FILES_${PN} += "${libdir}/rygel-${LIBV}/engines ${datadir}/dbus-1 ${datadir}/icons"
-FILES_${PN}-dbg += "${libdir}/rygel-${LIBV}/engines/.debug ${libdir}/rygel-${LIBV}/plugins/.debug"
-
-PACKAGES += "${PN}-meta"
-ALLOW_EMPTY_${PN}-meta = "1"
-
-PACKAGES_DYNAMIC = "${PN}-plugin-*"
-
-python populate_packages_prepend () {
-    rygel_libdir = d.expand('${libdir}/rygel-${LIBV}')
-    postinst = d.getVar('plugin_postinst')
-    pkgs = []
-
-    pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), 'librygel-(.*)\.so$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
-    pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), '(.*)\.plugin$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
-
-    metapkg = d.getVar('PN') + '-meta'
-    d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs))
-}
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.34.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.34.0.bb
new file mode 100644
index 0000000..d2eda6b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.34.0.bb
@@ -0,0 +1,67 @@
+SUMMARY = "A UPnP AV media server and renderer"
+DESCRIPTION = "Rygel is a home media solution (UPnP AV MediaServer) that \
+allow you to easily share audio, video and pictures to other devices. \
+Additionally, media player software may use Rygel to become a MediaRenderer \
+that may be controlled remotely by a UPnP or DLNA Controller."
+HOMEPAGE = "http://live.gnome.org/Rygel"
+
+LICENSE = "LGPL1.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "libxml2 glib-2.0 gssdp gupnp gupnp-av gupnp-dlna gstreamer1.0 gstreamer1.0-plugins-base ossp-uuid libgee libsoup-2.4 libmediaart-2.0 libunistring sqlite3 intltool-native"
+RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback shared-mime-info"
+RRECOMMENDS_${PN} = "rygel-plugin-media-export"
+
+GNOME_COMPRESS_TYPE = "xz"
+SRC_URI[archive.md5sum] = "7d8923324b280cd5452803d61176a34a"
+SRC_URI[archive.sha256sum] = "fbb2d46cbe4e750df6610b4c66b2278f06d1f71a257c7903e676ccb394dad418"
+
+inherit gnomebase vala gobject-introspection gettext systemd
+
+EXTRA_OECONF = "--disable-tracker-plugin --with-media-engine=gstreamer"
+
+PACKAGECONFIG ?= "external mpris ruih media-export gst-launch"
+
+PACKAGECONFIG_append = "${@bb.utils.contains("DISTRO_FEATURES", "x11", " gtk+3", "", d)}"
+
+PACKAGECONFIG[external] = "--enable-external-plugin,--disable-external-plugin"
+PACKAGECONFIG[mpris] = "--enable-mpris-plugin,--disable-mpris-plugin"
+PACKAGECONFIG[ruih] = "--enable-ruih-plugin,--disable-ruih-plugin"
+PACKAGECONFIG[media-export] = "--enable-media-export-plugin,--disable-media-export-plugin"
+PACKAGECONFIG[gst-launch] = "--enable-gst-launch-plugin,--disable-gst-launch-plugin"
+PACKAGECONFIG[gtk+3] = ",--without-ui,gtk+3"
+
+LIBV = "2.6"
+
+do_install_append() {
+       # Remove .la files for loadable modules
+       rm -f ${D}/${libdir}/rygel-${LIBV}/engines/*.la
+       rm -f ${D}/${libdir}/rygel-${LIBV}/plugins/*.la
+       if [ -e ${D}${libdir}/systemd/user/rygel.service ]; then
+               mkdir -p ${D}${systemd_unitdir}/system
+               mv ${D}${libdir}/systemd/user/rygel.service ${D}${systemd_unitdir}/system
+               rmdir ${D}${libdir}/systemd/user ${D}${libdir}/systemd
+       fi
+}
+
+FILES_${PN} += "${libdir}/rygel-${LIBV}/engines ${datadir}/dbus-1 ${datadir}/icons"
+FILES_${PN}-dbg += "${libdir}/rygel-${LIBV}/engines/.debug ${libdir}/rygel-${LIBV}/plugins/.debug"
+
+PACKAGES += "${PN}-meta"
+ALLOW_EMPTY_${PN}-meta = "1"
+
+PACKAGES_DYNAMIC = "${PN}-plugin-*"
+
+SYSTEMD_SERVICE_${PN} = "rygel.service"
+
+python populate_packages_prepend () {
+    rygel_libdir = d.expand('${libdir}/rygel-${LIBV}')
+    postinst = d.getVar('plugin_postinst')
+    pkgs = []
+
+    pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), 'librygel-(.*)\.so$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
+    pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), '(.*)\.plugin$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
+
+    metapkg = d.getVar('PN') + '-meta'
+    d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs))
+}
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/dvb-apps/dvb-apps_1.1.1.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/dvb-apps/dvb-apps_1.1.1.bb
deleted file mode 100644
index 4a7ed9a..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/dvb-apps/dvb-apps_1.1.1.bb
+++ /dev/null
@@ -1,136 +0,0 @@
-HOMEPAGE = "http://www.linuxtv.org"
-SUMMARY = "Linux DVB API applications and utilities"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "v4l-utils-native"
-
-SRC_URI = " \
-            hg://linuxtv.org/hg;module=dvb-apps;protocol=http;name=apps \
-            git://linuxtv.org/git/dtv-scan-tables.git;protocol=http;destsuffix=dvb-apps/initial-scan-tables;name=scantables \
-          "
-SRCREV_apps = "3d43b280298c"
-SRCREV_scantables = "ceb11833b35f05813b1f0397a60e0f3b99430aab"
-SRCREV_FORMAT = "apps_scantables"
-
-S = "${WORKDIR}/${BPN}"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-EXTRA_OEMAKE = "VERSION_FILE='${STAGING_INCDIR}/linux/dvb/version.h'"
-
-do_configure() {
-    sed -i -e s:/usr/include:${STAGING_INCDIR}:g util/av7110_loadkeys/generate-keynames.sh
-}
-
-do_compile_append() {
-# dvb-apps only support DVBAPI v3, so generate them from the DVBAPI v5 downloaded files
-    make -C initial-scan-tables clean
-    make -C initial-scan-tables dvbv3
-}
-
-do_install() {
-    make DESTDIR=${D} install
-# dvb-apps only support DVBAPI v3, so only install the generated DVBAPI v3 files
-    make -C initial-scan-tables DATADIR=${D}/${datadir} DVBV3DIR=dvb install_v3
-
-    install -d ${D}/${bindir}
-    install -d ${D}/${docdir}/dvb-apps
-    install -d ${D}/${docdir}/dvb-apps/szap
-    chmod a+rx ${D}/${libdir}/*.so*
-
-    # Install tests
-    install -m 0755 ${S}/test/setvoltage      ${D}${bindir}/test_setvoltage
-    install -m 0755 ${S}/test/set22k          ${D}${bindir}/test_set22k
-    install -m 0755 ${S}/test/sendburst       ${D}${bindir}/test_sendburst
-    install -m 0755 ${S}/test/diseqc          ${D}${bindir}/test_diseqc
-    install -m 0755 ${S}/test/test_sections   ${D}${bindir}/
-    install -m 0755 ${S}/test/test_av_play    ${D}${bindir}/
-    install -m 0755 ${S}/test/test_stillimage ${D}${bindir}/
-    install -m 0755 ${S}/test/test_dvr_play   ${D}${bindir}/
-    install -m 0755 ${S}/test/test_tt         ${D}${bindir}/
-    install -m 0755 ${S}/test/test_sec_ne     ${D}${bindir}/
-    install -m 0755 ${S}/test/test_stc        ${D}${bindir}/
-    install -m 0755 ${S}/test/test_av         ${D}${bindir}/
-    install -m 0755 ${S}/test/test_vevent     ${D}${bindir}/
-    install -m 0755 ${S}/test/test_pes        ${D}${bindir}/
-    install -m 0755 ${S}/test/test_dvr        ${D}${bindir}/
-
-    cp -pPR ${S}/util/szap/channels-conf* ${D}/${docdir}/dvb-apps/szap/
-    cp -pPR ${S}/util/szap/README   ${D}/${docdir}/dvb-apps/szap/
-}
-
-python populate_packages_prepend () {
-    dvb_libdir = bb.data.expand('${libdir}', d)
-    do_split_packages(d, dvb_libdir, '^lib(.*)\.so$', 'lib%s', 'DVB %s package', extra_depends='', allow_links=True)
-    do_split_packages(d, dvb_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'DVB %s development package', extra_depends='${PN}-dev')
-    do_split_packages(d, dvb_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'DVB %s development package', extra_depends='${PN}-dev')
-    do_split_packages(d, dvb_libdir, '^lib(.*)\.so\.*', 'lib%s', 'DVB %s library', extra_depends='', allow_links=True)
-}
-
-PACKAGES =+ "dvb-evtest dvb-evtest-dbg \
-             dvbapp-tests dvbapp-tests-dbg \
-             dvbdate dvbdate-dbg \
-             dvbtraffic dvbtraffic-dbg \
-             dvbnet dvbnet-dbg \
-             dvb-scan dvb-scan-dbg dvb-scan-data \
-             dvb-azap dvb-azap-dbg \
-             dvb-czap dvb-czap-dbg \
-             dvb-szap dvb-szap-dbg \
-             dvb-tzap dvb-tzap-dbg \
-             dvb-femon dvb-femon-dbg \
-             dvb-zap-data"
-
-# Expose the packages from the above spitting
-PACKAGES =+ "libdvbapi libdvbcfg libdvben50221 \
-             libesg libucsi libdvbsec"
-
-FILES_${PN} = "${bindir} ${datadir}/dvb"
-FILES_${PN}-doc = ""
-FILES_${PN}-dev = "${includedir}"
-
-FILES_dvb-evtest = "${bindir}/evtest"
-FILES_dvb-evtest-dbg = "${bindir}/.debug/evtest"
-RCONFLICTS_dvb-evtest = "evtest"
-
-FILES_dvbapp-tests = "${bindir}/*test* "
-FILES_dvbapp-tests-dbg = "${bindir}/.debug/*test*"
-
-FILES_dvbdate = "${bindir}/dvbdate"
-FILES_dvbdate-dbg = "${bindir}/.debug/dvbdate"
-
-FILES_dvbtraffic = "${bindir}/dvbtraffic"
-FILES_dvbtraffic-dbg = "${bindir}/.debug/dvbtraffic"
-
-FILES_dvbnet = "${bindir}/dvbnet"
-FILES_dvbnet-dbg = "${bindir}/.debug/dvbnet"
-
-FILES_dvb-scan = "${bindir}/*scan "
-FILES_dvb-scan-dbg = "${bindir}/.debug/*scan"
-FILES_dvb-scan-data = "${datadir}/dvb"
-
-FILES_dvb-azap = "${bindir}/azap"
-FILES_dvb-azap-dbg = "${bindir}/.debug/azap"
-
-FILES_dvb-czap = "${bindir}/czap"
-FILES_dvb-czap-dbg = "${bindir}/.debug/czap"
-
-FILES_dvb-szap = "${bindir}/szap"
-FILES_dvb-szap-dbg = "${bindir}/.debug/szap"
-
-FILES_dvb-tzap = "${bindir}/tzap"
-FILES_dvb-tzap-dbg = "${bindir}/.debug/tzap"
-
-FILES_dvb-femon = "${bindir}/femon"
-FILES_dvb-femon-dbg = "${bindir}/.debug/femon"
-
-FILES_dvb-zap-data = "${docdir}/dvb-apps/szap"
-
-RDEPENDS_dvbdate =+ "libdvbapi libucsi"
-RDEPENDS_dvbtraffic =+ "libdvbapi"
-RDEPENDS_dvb-scan =+ "libdvbapi libdvbcfg libdvbsec"
-RDEPENDS_dvb-apps =+ "libdvbapi libdvbcfg libdvbsec libdvben50221 libucsi"
-RDEPENDS_dvb-femon =+ "libdvbapi"
-RDEPENDS_dvbnet =+ "libdvbapi"
-
-PNBLACKLIST[dvb-apps] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130603/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Fix-checks-for-sse2-mmx.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Fix-checks-for-sse2-mmx.patch
deleted file mode 100644
index 3283a5b..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Fix-checks-for-sse2-mmx.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From f0dab6d6fe4b0aae4394eee93be86e9747c6ed5c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Nov 2016 05:07:38 +0000
-Subject: [PATCH] Fix checks for sse2/mmx
-
-Just checking for cmdline options is not enough
-its better to check for builtin defines to be
-sure, clang does not error out on sse2 options on
-arm e.g. and it ends up doing SSE2 stuff for arm
-which is not desired
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 47d2cf2..4be000c 100755
---- a/configure
-+++ b/configure
-@@ -118,8 +118,14 @@ fi
- # Valiate compiler
- check_cc || die 'No C compiler found'
- check_cc_header execinfo
--check_cc_option mmx
--check_cc_option sse2
-+check_cc_snippet mmx '#ifndef __MMX__
-+error "MMX not supported"
-+#endif
-+'
-+check_cc_snippet sse2 '#ifndef __SSE2__
-+error "SSE2 not supported"
-+#endif
-+'
- 
- if check_cc '
- #if !defined(__clang__)
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Makefile-Ignore-warning-about-wrong-includes.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Makefile-Ignore-warning-about-wrong-includes.patch
deleted file mode 100644
index 248a5e6..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Makefile-Ignore-warning-about-wrong-includes.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7d672305c7ad2f716dfe1c487b525a1a92954d4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Nov 2016 06:22:36 +0000
-Subject: [PATCH] Makefile: Ignore warning about wrong includes
-
-It happens on musl especially
-usr/include/sys/poll.h:1:2: error: redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror,-W#warnings]
-| #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
-|  ^
-| In file included from src/avahi.c:48:
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile b/Makefile
-index f41ef1a..cc7b249 100644
---- a/Makefile
-+++ b/Makefile
-@@ -54,6 +54,7 @@ CFLAGS  += -Wno-microsoft -Qunused-arguments -Wno-unused-function
- CFLAGS  += -Wno-unused-value -Wno-tautological-constant-out-of-range-compare
- CFLAGS  += -Wno-parentheses-equality -Wno-incompatible-pointer-types
- CFLAGS  += -Wno-error=varargs
-+CFLAGS  += -Wno-error=\#warnings
- endif
- 
- ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes)
--- 
-1.8.3.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-disable-varargs-warning-on-clang.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-disable-varargs-warning-on-clang.patch
deleted file mode 100644
index a4c4c4d..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-disable-varargs-warning-on-clang.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 906d95695af95970bf551ea55b6c3e70332c6b97 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Nov 2016 05:22:32 +0000
-Subject: [PATCH] disable varargs warning on clang
-
-The issue is that 'len' is an unsigned char and we violate the promotion rules
-for passing the value to va_start.
-
-passing an object that undergoes defau
-lt argument promotion to 'va_start' has undefined behavior [-Wvarargs]
-|   va_start(ap, len);
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile b/Makefile
-index 8c5e380..f41ef1a 100644
---- a/Makefile
-+++ b/Makefile
-@@ -53,6 +53,7 @@ ifeq ($(COMPILER), clang)
- CFLAGS  += -Wno-microsoft -Qunused-arguments -Wno-unused-function
- CFLAGS  += -Wno-unused-value -Wno-tautological-constant-out-of-range-compare
- CFLAGS  += -Wno-parentheses-equality -Wno-incompatible-pointer-types
-+CFLAGS  += -Wno-error=varargs
- endif
- 
- ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes)
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-dvr-Use-labs-instead-of-abs.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-dvr-Use-labs-instead-of-abs.patch
deleted file mode 100644
index ea34cdb..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-dvr-Use-labs-instead-of-abs.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From a715671eadcbf989fdaf05f62e71b93ac1749615 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Nov 2016 06:08:31 +0000
-Subject: [PATCH] dvr: Use labs() instead of abs()
-
-Makes clang happy
-
-dvr/dvr_db.c:853:10: error: absolute value function
-'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
-if ((abs(de->de_start - e->start) < 600) && (abs(de->de_stop - e->stop) < 600)) {
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/dvr/dvr_db.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c
-index 165caa6..5656569 100644
---- a/src/dvr/dvr_db.c
-+++ b/src/dvr/dvr_db.c
-@@ -414,11 +414,11 @@ dvr_entry_fuzzy_match(dvr_entry_t *de, epg_broadcast_t *e)
-   /* Wrong length (+/-20%) */
-   t1 = de->de_stop - de->de_start;
-   t2  = e->stop - e->start;
--  if ( abs(t2 - t1) > (t1 / 5) )
-+  if ( labs(t2 - t1) > (t1 / 5) )
-     return 0;
- 
-   /* Outside of window */
--  if (abs(e->start - de->de_start) > de->de_config->dvr_update_window)
-+  if (labs(e->start - de->de_start) > de->de_config->dvr_update_window)
-     return 0;
-   
-   /* Title match (or contains?) */
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-hdhomerun-Override-forced-overrdiing-og-CC-STRIP-and.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-hdhomerun-Override-forced-overrdiing-og-CC-STRIP-and.patch
deleted file mode 100644
index 484e723..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-hdhomerun-Override-forced-overrdiing-og-CC-STRIP-and.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c3767e189e90965407937b6178adbbd8cdafe31d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Nov 2016 05:59:10 +0000
-Subject: [PATCH] hdhomerun: Override forced overrdiing og CC/STRIP and CFLAGS
-
-This is required for cross compiling otherwise it ends up
-using build host gcc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.hdhomerun | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.hdhomerun b/Makefile.hdhomerun
-index 943ffec..8bd14ff 100644
---- a/Makefile.hdhomerun
-+++ b/Makefile.hdhomerun
-@@ -18,8 +18,8 @@
- 
- include $(dir $(lastword $(MAKEFILE_LIST))).config.mk
- 
--unexport CFLAGS
--unexport LDFLAGS
-+#unexport CFLAGS
-+#unexport LDFLAGS
- 
- define DOWNLOAD
- 	@mkdir -p $(LIBHDHRDIR)/build
-@@ -75,6 +75,8 @@ $(LIBHDHRDIR)/$(LIBHDHR)/.tvh_download:
- 	$(call DOWNLOAD,$(LIBHDHR_URL),$(LIBHDHRDIR)/$(LIBHDHR_TB),$(LIBHDHR_SHA1))
- 	$(call UNTAR,$(LIBHDHR_TB),z)
- 	ln -sf libhdhomerun $(LIBHDHRDIR)/$(LIBHDHR)
-+	@sed -i -e "s/CC.*:=/CC ?=/" $(LIBHDHRDIR)/$(LIBHDHR)/Makefile
-+	@sed -i -e "s/STRIP.*:=/STRIP ?=/" $(LIBHDHRDIR)/$(LIBHDHR)/Makefile
- 	@touch $@
- 
- $(LIBHDHRDIR)/$(LIBHDHR)/.tvh_build: \
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
deleted file mode 100644
index 3b73549..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Tvheadend TV streaming server"
-HOMEPAGE = "https://www.lonelycoder.com/redmine/projects/tvheadend"
-
-DEPENDS = "avahi zlib openssl python-native dvb-apps"
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9cae5acac2e9ee2fc3aec01ac88ce5db"
-
-SRC_URI = "git://github.com/tvheadend/tvheadend.git;branch=release/4.0 \
-           file://0001-Fix-checks-for-sse2-mmx.patch \
-           file://0001-disable-varargs-warning-on-clang.patch \
-           file://0001-hdhomerun-Override-forced-overrdiing-og-CC-STRIP-and.patch \
-           file://0001-dvr-Use-labs-instead-of-abs.patch \
-           file://0001-Makefile-Ignore-warning-about-wrong-includes.patch \
-"
-SRCREV = "64fec8120158de585e18be705055259484518d94"
-PV = "4.0.9+git${SRCREV}"
-
-S = "${WORKDIR}/git"
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[uriparser] = "--enable-uriparser,--disable-uriparser,uriparser"
-
-do_configure() {
-    ./configure ${PACKAGECONFIG_CONFARGS} \
-                --prefix=${prefix} \
-                --libdir=${libdir} \
-                --bindir=${bindir} \
-                --datadir=${datadir} \
-                --arch=${TARGET_ARCH} \
-                --disable-dvbscan \
-                --disable-bundle
-}
-
-do_install() {
-    oe_runmake install DESTDIR=${D}
-}
-
-FILES_${PN} += "${datadir}/${BPN}"
-
-RDEPENDS_${PN} += "libdvben50221 libucsi libdvbapi"
-
-PNBLACKLIST[tvheadend] ?= "Depends on blacklisted dvb-apps - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
deleted file mode 100644
index c4a6ae7..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
+++ /dev/null
@@ -1,427 +0,0 @@
-From 06a8224c99282ac1a606edd9e8ea3f591112942d Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 18 Feb 2016 14:04:31 +0100
-Subject: [PATCH] Update to p8-platform
-
----
- CMakeLists.txt                         |  6 +++---
- pvr.hts/changelog.txt                  |  4 ++--
- src/AutoRecordings.cpp                 |  2 +-
- src/HTSPConnection.cpp                 |  8 +++----
- src/HTSPDemuxer.cpp                    |  2 +-
- src/HTSPVFS.cpp                        |  6 +++---
- src/TimeRecordings.cpp                 |  2 +-
- src/Tvheadend.cpp                      |  4 ++--
- src/Tvheadend.h                        | 38 +++++++++++++++++-----------------
- src/client.cpp                         |  4 ++--
- src/client.h                           |  4 ++--
- src/tvheadend/Subscription.cpp         |  2 +-
- src/tvheadend/Subscription.h           |  4 ++--
- src/tvheadend/utilities/AsyncState.cpp |  4 ++--
- src/tvheadend/utilities/AsyncState.h   |  6 +++---
- 15 files changed, 48 insertions(+), 48 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0842682..cb04942 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -6,10 +6,10 @@ enable_language(CXX)
- 
- find_package(kodi REQUIRED)
- find_package(kodiplatform REQUIRED)
--find_package(platform REQUIRED)
-+find_package(p8-platform REQUIRED)
- 
- include_directories(${kodiplatform_INCLUDE_DIRS}
--                    ${platform_INCLUDE_DIRS}
-+                    ${p8-platform_INCLUDE_DIRS}
-                     ${KODI_INCLUDE_DIR}
-                     ${PROJECT_SOURCE_DIR}/lib)
- 
-@@ -95,7 +95,7 @@ list(APPEND HTS_SOURCES
- 
- add_subdirectory(lib/libhts)
- 
--set(DEPLIBS ${platform_LIBRARIES} hts)
-+set(DEPLIBS ${p8-platform_LIBRARIES} hts)
- if(WIN32)
-   list(APPEND DEPLIBS ws2_32)
- endif()
-diff --git a/pvr.hts/changelog.txt b/pvr.hts/changelog.txt
-index 9ffa33c..1e7fe30 100644
---- a/pvr.hts/changelog.txt
-+++ b/pvr.hts/changelog.txt
-@@ -49,7 +49,7 @@
- - fixed: Autorec: Start and stop time handling.
- - fixed: LocaltimeToUTC conversion (timer settings clock display incorrect).
- - fixed: Several issues with predictive tuning.
--- added: build: Automatically fill in platform and library name.
-+- added: build: Automatically fill in p8-platform and library name.
- - fixed: Use epg data only for creation of epg-based timers.
- - improved: Do not try to reconnect to tvh while suspending or not fully awake again.
- 
-@@ -97,7 +97,7 @@
- - added: support for creating repeating timers, aka time schedules
- - fixed: conditions for addon restart after settings changes
- - internal: fixed build system regressions introduced with move to cmake
--- internal: updated to use libplatform
-+- internal: updated to use libp8-platform
- 
- 2.1.7
- - added: support for radio channel groups
-diff --git a/src/AutoRecordings.cpp b/src/AutoRecordings.cpp
-index 5fa60a0..d9e5e1d 100644
---- a/src/AutoRecordings.cpp
-+++ b/src/AutoRecordings.cpp
-@@ -26,7 +26,7 @@
- #include "tvheadend/utilities/Utilities.h"
- #include "tvheadend/utilities/Logger.h"
- 
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- using namespace tvheadend;
- using namespace tvheadend::entity;
- using namespace tvheadend::utilities;
-diff --git a/src/HTSPConnection.cpp b/src/HTSPConnection.cpp
-index aec1296..86f5004 100644
---- a/src/HTSPConnection.cpp
-+++ b/src/HTSPConnection.cpp
-@@ -19,9 +19,9 @@
-  *
-  */
- 
--#include "platform/threads/mutex.h"
--#include "platform/util/StringUtils.h"
--#include "platform/sockets/tcp.h"
-+#include "p8-platform/threads/mutex.h"
-+#include "p8-platform/util/StringUtils.h"
-+#include "p8-platform/sockets/tcp.h"
- 
- extern "C" {
- #include "libhts/htsmsg_binary.h"
-@@ -33,7 +33,7 @@ extern "C" {
- 
- using namespace std;
- using namespace ADDON;
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- using namespace tvheadend;
- using namespace tvheadend::utilities;
- 
-diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
-index a6e1f12..7f45345 100644
---- a/src/HTSPDemuxer.cpp
-+++ b/src/HTSPDemuxer.cpp
-@@ -27,7 +27,7 @@
- 
- using namespace std;
- using namespace ADDON;
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- using namespace tvheadend;
- using namespace tvheadend::utilities;
- 
-diff --git a/src/HTSPVFS.cpp b/src/HTSPVFS.cpp
-index 0463f56..0404bab 100644
---- a/src/HTSPVFS.cpp
-+++ b/src/HTSPVFS.cpp
-@@ -19,8 +19,8 @@
-  *
-  */
- 
--#include "platform/threads/mutex.h"
--#include "platform/util/StringUtils.h"
-+#include "p8-platform/threads/mutex.h"
-+#include "p8-platform/util/StringUtils.h"
- #include "tvheadend/utilities/Logger.h"
- 
- extern "C" {
-@@ -30,7 +30,7 @@ extern "C" {
- #include "Tvheadend.h"
- 
- using namespace std;
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- using namespace tvheadend::utilities;
- 
- /*
-diff --git a/src/TimeRecordings.cpp b/src/TimeRecordings.cpp
-index 5d34938..97aae09 100644
---- a/src/TimeRecordings.cpp
-+++ b/src/TimeRecordings.cpp
-@@ -25,7 +25,7 @@
- #include "tvheadend/utilities/Utilities.h"
- #include "tvheadend/utilities/Logger.h"
- 
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- using namespace tvheadend;
- using namespace tvheadend::entity;
- using namespace tvheadend::utilities;
-diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
-index 2057241..14c3bd4 100644
---- a/src/Tvheadend.cpp
-+++ b/src/Tvheadend.cpp
-@@ -23,7 +23,7 @@
- #include <ctime>
- #include <memory>
- 
--#include "platform/util/StringUtils.h"
-+#include "p8-platform/util/StringUtils.h"
- 
- #include "Tvheadend.h"
- #include "tvheadend/utilities/Utilities.h"
-@@ -31,7 +31,7 @@
- 
- using namespace std;
- using namespace ADDON;
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- using namespace tvheadend;
- using namespace tvheadend::entity;
- using namespace tvheadend::utilities;
-diff --git a/src/Tvheadend.h b/src/Tvheadend.h
-index 2ce4552..e794716 100644
---- a/src/Tvheadend.h
-+++ b/src/Tvheadend.h
-@@ -22,10 +22,10 @@
-  */
- 
- #include "client.h"
--#include "platform/sockets/tcp.h"
--#include "platform/threads/threads.h"
--#include "platform/threads/mutex.h"
--#include "platform/util/buffer.h"
-+#include "p8-platform/sockets/tcp.h"
-+#include "p8-platform/threads/threads.h"
-+#include "p8-platform/threads/mutex.h"
-+#include "p8-platform/util/buffer.h"
- #include "kodi/xbmc_codec_types.h"
- #include "kodi/xbmc_stream_utils.hpp"
- #include "kodi/libXBMC_addon.h"
-@@ -88,7 +88,7 @@ class CHTSPMessage;
- 
- /* Typedefs */
- typedef std::map<uint32_t,CHTSPResponse*> CHTSPResponseList;
--typedef PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
-+typedef P8PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
- 
- /*
-  * HTSP Response handler
-@@ -98,10 +98,10 @@ class CHTSPResponse
- public:
-   CHTSPResponse();
-   ~CHTSPResponse();
--  htsmsg_t *Get ( PLATFORM::CMutex &mutex, uint32_t timeout );
-+  htsmsg_t *Get ( P8PLATFORM::CMutex &mutex, uint32_t timeout );
-   void      Set ( htsmsg_t *m );
- private:
--  PLATFORM::CCondition<volatile bool> m_cond;
-+  P8PLATFORM::CCondition<volatile bool> m_cond;
-   bool                                m_flag;
-   htsmsg_t                           *m_msg;
- };
-@@ -146,7 +146,7 @@ public:
-  * HTSP Connection registration thread
-  */
- class CHTSPRegister
--  : public PLATFORM::CThread
-+  : public P8PLATFORM::CThread
- {
-   friend class CHTSPConnection;
- 
-@@ -163,7 +163,7 @@ private:
-  * HTSP Connection
-  */
- class CHTSPConnection
--  : public PLATFORM::CThread
-+  : public P8PLATFORM::CThread
- {
-   friend class CHTSPRegister;
- 
-@@ -190,7 +190,7 @@ public:
-   inline bool IsConnected       ( void ) const { return m_ready; }
-   bool        WaitForConnection ( void );
- 
--  inline PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
-+  inline P8PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
- 
-   void        OnSleep ( void );
-   void        OnWake  ( void );
-@@ -202,10 +202,10 @@ private:
-   bool        SendHello        ( void );
-   bool        SendAuth         ( const std::string &u, const std::string &p );
- 
--  PLATFORM::CTcpSocket               *m_socket;
--  PLATFORM::CMutex                    m_mutex;
-+  P8PLATFORM::CTcpSocket               *m_socket;
-+  P8PLATFORM::CMutex                    m_mutex;
-   CHTSPRegister                       m_regThread;
--  PLATFORM::CCondition<volatile bool> m_regCond;
-+  P8PLATFORM::CCondition<volatile bool> m_regCond;
-   bool                                m_ready;
-   uint32_t                            m_seq;
-   std::string                         m_serverName;
-@@ -273,13 +273,13 @@ public:
-   void SetStreamingProfile(const std::string &profile);
- 
- private:
--  PLATFORM::CMutex                        m_mutex;
-+  P8PLATFORM::CMutex                        m_mutex;
-   CHTSPConnection                        &m_conn;
--  PLATFORM::SyncedBuffer<DemuxPacket*>    m_pktBuffer;
-+  P8PLATFORM::SyncedBuffer<DemuxPacket*>    m_pktBuffer;
-   ADDON::XbmcStreamProperties             m_streams;
-   std::map<int,int>                       m_streamStat;
-   int64_t                                 m_seekTime;
--  PLATFORM::CCondition<volatile int64_t>  m_seekCond;
-+  P8PLATFORM::CCondition<volatile int64_t>  m_seekCond;
-   bool                                    m_seeking;
-   bool                                    m_speedChange;
-   tvheadend::status::SourceInfo           m_sourceInfo;
-@@ -350,7 +350,7 @@ private:
-  * Root object for Tvheadend connection
-  */
- class CTvheadend
--  : public PLATFORM::CThread
-+  : public P8PLATFORM::CThread
- {
- public:
-   CTvheadend();
-@@ -422,7 +422,7 @@ private:
-    */
-   tvheadend::Profiles         m_profiles;
- 
--  PLATFORM::CMutex            m_mutex;
-+  P8PLATFORM::CMutex            m_mutex;
- 
-   CHTSPConnection             m_conn;
- 
-@@ -519,7 +519,7 @@ public:
-    */
-   bool WaitForConnection ( void )
-   {
--    PLATFORM::CLockObject lock(m_conn.Mutex());
-+    P8PLATFORM::CLockObject lock(m_conn.Mutex());
-     return m_conn.WaitForConnection();
-   }
-   std::string GetServerName    ( void )
-diff --git a/src/client.cpp b/src/client.cpp
-index 94d2db9..3295914 100644
---- a/src/client.cpp
-+++ b/src/client.cpp
-@@ -22,14 +22,14 @@
- #include "client.h"
- #include "kodi/xbmc_pvr_dll.h"
- #include "kodi/libKODI_guilib.h"
--#include "platform/util/util.h"
-+#include "p8-platform/util/util.h"
- #include "Tvheadend.h"
- #include "tvheadend/Settings.h"
- #include "tvheadend/utilities/Logger.h"
- 
- using namespace std;
- using namespace ADDON;
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- using namespace tvheadend;
- using namespace tvheadend::utilities;
- 
-diff --git a/src/client.h b/src/client.h
-index 3a5f950..a10659b 100644
---- a/src/client.h
-+++ b/src/client.h
-@@ -20,8 +20,8 @@
-  *
-  */
- 
--#include "platform/os.h"
--#include "platform/threads/mutex.h"
-+#include "p8-platform/os.h"
-+#include "p8-platform/threads/mutex.h"
- #include "kodi/libXBMC_addon.h"
- #include "kodi/libXBMC_pvr.h"
- #include "kodi/libXBMC_codec.h"
-diff --git a/src/tvheadend/Subscription.cpp b/src/tvheadend/Subscription.cpp
-index 182ca7f..e18af1e 100644
---- a/src/tvheadend/Subscription.cpp
-+++ b/src/tvheadend/Subscription.cpp
-@@ -23,7 +23,7 @@
- #include "utilities/Logger.h"
- #include "../Tvheadend.h"
- 
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- using namespace tvheadend;
- using namespace tvheadend::utilities;
- 
-diff --git a/src/tvheadend/Subscription.h b/src/tvheadend/Subscription.h
-index b03bcce..363e5ef 100644
---- a/src/tvheadend/Subscription.h
-+++ b/src/tvheadend/Subscription.h
-@@ -22,7 +22,7 @@
-  */
- 
- #include <string>
--#include "platform/threads/mutex.h"
-+#include "p8-platform/threads/mutex.h"
- 
- extern "C"
- {
-@@ -146,6 +146,6 @@ namespace tvheadend
-     std::string       m_profile;
-     CHTSPConnection   &m_conn;
- 
--    mutable PLATFORM::CMutex  m_mutex;
-+    mutable P8PLATFORM::CMutex  m_mutex;
-   };
- }
-diff --git a/src/tvheadend/utilities/AsyncState.cpp b/src/tvheadend/utilities/AsyncState.cpp
-index 0c30a93..1f4fdf3 100644
---- a/src/tvheadend/utilities/AsyncState.cpp
-+++ b/src/tvheadend/utilities/AsyncState.cpp
-@@ -22,7 +22,7 @@
- #include "AsyncState.h"
- 
- using namespace tvheadend::utilities;
--using namespace PLATFORM;
-+using namespace P8PLATFORM;
- 
- struct Param {
-   eAsyncState state;
-@@ -37,7 +37,7 @@ AsyncState::AsyncState(int timeout)
- 
- eAsyncState AsyncState::GetState()
- {
--  PLATFORM::CLockObject lock(m_mutex);
-+  P8PLATFORM::CLockObject lock(m_mutex);
-   return m_state;
- }
- 
-diff --git a/src/tvheadend/utilities/AsyncState.h b/src/tvheadend/utilities/AsyncState.h
-index 1d672da..0819cd8 100644
---- a/src/tvheadend/utilities/AsyncState.h
-+++ b/src/tvheadend/utilities/AsyncState.h
-@@ -22,7 +22,7 @@
- #ifndef ASYNCSTATE_H
- #define	ASYNCSTATE_H
- 
--#include "platform/threads/mutex.h"
-+#include "p8-platform/threads/mutex.h"
- 
- namespace tvheadend {
-   namespace utilities {
-@@ -75,8 +75,8 @@ namespace tvheadend {
-       static bool PredicateCallback ( void *param );
- 
-       eAsyncState m_state;
--      PLATFORM::CMutex m_mutex;
--      PLATFORM::CCondition<bool> m_condition;
-+      P8PLATFORM::CMutex m_mutex;
-+      P8PLATFORM::CCondition<bool> m_condition;
-       int m_timeout;
- 
-     };
--- 
-2.0.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
deleted file mode 100644
index 7cafebf..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
+++ /dev/null
@@ -1,57 +0,0 @@
-SUMMARY = "Kodi Media Center PVR plugins"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://src/client.cpp;md5=c8f6b73c5bc1048a3d6506700a7a91d2"
-
-DEPENDS = " \
-            zip-native \
-            p8platform \
-            kodi-platform \
-          "
-
-SRCREV_pvrhts = "7f75b70527922aef953123ff97ebaa22d9fb7cb4"
-
-SRCREV_FORMAT = "pvrhts"
-
-PV = "2.2.13+gitr${SRCPV}"
-SRC_URI = "git://github.com/kodi-pvr/pvr.hts.git;branch=Jarvis;destsuffix=pvr.hts;name=pvrhts \
-           file://0001-Update-to-p8-platform.patch \
-          "
-
-inherit cmake pkgconfig gettext
-
-S = "${WORKDIR}/pvr.hts"
-
-EXTRA_OECMAKE = " \
-	  -DADDONS_TO_BUILD=pvr.hts \
-	  -DADDON_SRC_PREFIX=${WORKDIR}/git \
-	  -DCMAKE_BUILD_TYPE=Debug \
-	  -DCMAKE_INSTALL_PREFIX=${datadir}/kodi/addons \
-          -DCMAKE_MODULE_PATH=${STAGING_DIR_HOST}${libdir}/kodi \
-          -DCMAKE_PREFIX_PATH=${STAGING_DIR_HOST}${prefix} \
-          -DPACKAGE_ZIP=1 \
-        "
-
-do_compile_prepend() {
-	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
-	       -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
-	          ${B}/CMakeFiles/*/flags.make
-	sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
-	          ${B}/CMakeFiles/*/link.txt
-}
-
-# Make zip package for manual installation
-do_install_append() {
-	install -d ${D}${datadir}/kodi/addons/packages/
-	( cd ${D}${datadir}/kodi/addons
-	  zip -r ${D}${datadir}/kodi/addons/packages/pvr.hts-${PV}.zip pvr.hts -x '*.debug*' )
-}
-
-# Doesn't get added automagically, dlopen()?
-RDEPENDS_${PN} = "libkodiplatform"
-
-INSANE_SKIP_${PN} = "dev-so"
-FILES_${PN} += "${datadir}/kodi"
-FILES_${PN}-dbg += "${datadir}/kodi/addons/*/.debug/"
-
-PNBLACKLIST[kodi-addon-pvr-hts] ?= "Depends on blacklisted kodi - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
deleted file mode 100644
index 27e9d21..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 3136317f096ea7fda4fb907e775a01952c4aae3d Mon Sep 17 00:00:00 2001
-From: Stefan Saraev <stefan@saraev.ca>
-Date: Fri, 19 Feb 2016 10:33:00 +0100
-Subject: [PATCH] fix cross compile badness
-
-From https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/mediacenter/kodi-platform/patches/kodi-platform-01_crosscompile-badness.patch
----
- CMakeLists.txt               | 2 +-
- kodiplatform-config.cmake.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index bf6b659..9abe773 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -22,7 +22,7 @@ if(NOT WIN32)
-   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
- endif()
- 
--set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi")
-+set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX_TOOLCHAIN}/include/kodi")
- IF(WIN32)
-   LIST(APPEND kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi/windows")
- ENDIF(WIN32)
-diff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in
-index 3fc5273..60bdf1b 100644
---- a/kodiplatform-config.cmake.in
-+++ b/kodiplatform-config.cmake.in
-@@ -10,7 +10,7 @@
- #
- # propagate these properties from one build system to the other
- set (kodiplatform_VERSION "@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@")
--set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
-+set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include)
- set (kodiplatform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
- set (kodiplatform_LINKER_FLAGS "@kodiplatform_LINKER_FLAGS@")
- set (kodiplatform_CONFIG_VARS "@kodiplatform_CONFIG_VARS@")
--- 
-2.0.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
deleted file mode 100644
index a13c53b..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9abe773..ae433fc 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -9,7 +9,6 @@ find_package(kodi REQUIRED)
- find_package(TinyXML REQUIRED)
- find_package(Threads REQUIRED)
- find_package(p8-platform REQUIRED)
--include(UseMultiArch.cmake)
- include(CheckAtomic.cmake)
- 
- set(kodiplatform_NAME kodiplatform)
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
deleted file mode 100644
index 0b554ef..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Platform support library used by libCEC and binary add-ons for Kodi"
-HOMEPAGE = "http://libcec.pulse-eight.com/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://src/util/XMLUtils.cpp;beginline=2;endline=18;md5=dae8e846500e70dd8ecee55f3f018c30"
-
-DEPENDS = "libtinyxml kodi"
-
-PV = "16.0.0"
-
-SRCREV = "c8188d82678fec6b784597db69a68e74ff4986b5"
-SRC_URI = "git://github.com/xbmc/kodi-platform.git \
-           file://0001-fix-cross-compile-badness.patch \
-           file://kodi-platform-02_no-multi-lib.patch \
-          "
-
-S = "${WORKDIR}/git"
-
-inherit cmake pkgconfig
-
-EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${STAGING_DIR_TARGET} \
-                  -DCMAKE_INSTALL_LIBDIR=${libdir} \
-                  -DCMAKE_INSTALL_LIBDIR_NOARCH=${libdir} \
-                  -DKODI_INCLUDE_DIR=${STAGING_LIBDIR}/kodi \
-                  -DKODI_INCLUDE_DIR=${STAGING_INCDIR}/kodi \
-                "
-
-do_compile_prepend() {
-	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
-	       -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
-	          ${B}/CMakeFiles/kodiplatform.dir/flags.make
-	sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
-	          ${B}/CMakeFiles/kodiplatform.dir/link.txt
-}
-
-RPROVIDES_${PN} += "libkodiplatform"
-FILES_${PN}-dev += "${libdir}/*platform"
-
-PNBLACKLIST[kodi-platform] ?= "Depends on blacklisted kodi - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
deleted file mode 100644
index 47e8f38..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Systemd service for kodi startup"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
-
-PV = "1.0"
-
-SRC_URI = "file://kodi.service"
-
-inherit systemd
-
-do_install() {
-	install -d ${D}/lib/systemd/system
-	install -m 0644 ${WORKDIR}/kodi.service ${D}/lib/systemd/system/ 
-}
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "kodi.service"
-
-RDEPENDS_${PN} += "xinit kodi"
-
-PNBLACKLIST[kodi-startup] ?= "Runtime depends on blacklisted kodi - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[kodi-startup] ?= "Runtime depends on blacklisted kodi-startup-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
index 43c32fb..5158f05 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
@@ -18,6 +18,7 @@
             avahi \
             boost \
             bzip2 \
+            crossguid \
             curl \
             dcadec \
             enca \
@@ -62,11 +63,11 @@
 
 PROVIDES = "xbmc"
 
-SRCREV = "661dd08d221f5b2bf509a696a6aca5ee7d45bb27"
-BASEPV = "17.1"
-PV = "${BASEPV}+gitr${SRCPV}"
+SRCREV = "6abeebd5ba371547c8f04272296433f5e4e28e86"
+PV = "17.3+gitr${SRCPV}"
+ADDONSPV = "17.1"
 SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \
-           https://repo.voidlinux.eu/distfiles/${BPN}-${BASEPV}-generated-addons.tar.xz;name=addons;unpack=0 \
+           https://repo.voidlinux.eu/distfiles/${BPN}-${ADDONSPV}-generated-addons.tar.xz;name=addons;unpack=0 \
            file://0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \
            file://0004-handle-SIGTERM.patch \
            file://0005-add-support-to-read-frequency-output-if-using-intel-.patch \
@@ -131,6 +132,11 @@
 FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math"
 BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
 
+LDFLAGS_append_mips = " -latomic"
+LDFLAGS_append_mipsel = " -latomic"
+LDFLAGS_append_powerpc = " -latomic"
+LDFLAGS_append_arm = " -latomic"
+
 EXTRA_OECONF_append = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
 
 # for python modules
@@ -146,15 +152,14 @@
     return ""
 
 do_configure() {
-    tar xf ${WORKDIR}/${BPN}-${BASEPV}-generated-addons.tar.xz -C ${S}/
+    tar xf ${WORKDIR}/${BPN}-${ADDONSPV}-generated-addons.tar.xz -C ${S}/
 
-    ( for i in $(find ${S} -name "configure.*" ) ; do
+    ( for i in $(find ${S} -name configure.ac -or -name configure.in|grep -v ".pc") ; do
        cd $(dirname $i) && gnu-configize --force || true
     done )
     ( for f in ${S}/xbmc/interfaces/python/generated/*.cpp; do
        touch `echo $f|sed -e 's/.cpp$/.xml/g'`
     done )
-    make -C tools/depends/target/crossguid PREFIX=${STAGING_DIR_HOST}${prefix}
 
     BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
     BOOTSTRAP_STANDALONE=1 make JAVA=/bin/true -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb
index bbbe563..16e17e9 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb
@@ -1,6 +1,6 @@
 SUMMARY = "libebml is a C++ libary to parse EBML files"
 LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=f14599a2f089f6ff8c97e2baa4e3d575"
+LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=7fbc338309ac38fefcd64b04bb903e34"
 
 SRC_URI = "\
     http://dl.matroska.org/downloads/libebml/libebml-${PV}.tar.bz2 \
@@ -10,15 +10,7 @@
 SRC_URI[md5sum] = "efec729bf5a51e649e1d9d1f61c0ae7a"
 SRC_URI[sha256sum] = "83b074d6b62715aa0080406ea84d33df2e44b5d874096640233a4db49b8096de"
 
-do_unpack[postfuncs] += "dos2unix"
-
-dos2unix () {
-    cr="$(printf '\r')"
-    for f in ${S}/make/*/Makefile; do
-        tr -d "$cr" <"$f" >"$f.new" && \
-            mv "$f.new" "$f"
-    done
-}
+inherit dos2unix
 
 LIBEBML_OS = "Unknown"
 LIBEBML_OS_linux = "Linux"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb
deleted file mode 100644
index 8a14264..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb
+++ /dev/null
@@ -1,57 +0,0 @@
-SUMMARY = "MKVToolNix -- Cross-platform tools for Matroska"
-HOMEPAGE = "http://www.bunkus.org/videotools/mkvtoolnix/source.html"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-DEPENDS = "curl boost expat zlib libebml libmatroska libogg libvorbis bzip2 lzo file ruby-native"
-
-PV = "8.4.0+git${SRCPV}"
-SRCREV_mkvtoolnix = "7f63ea48ee474754a95838f37aba8f6118c94a65"
-SRCREV_libebml = "04b34b0dbded40e0cec93cafa6a4f4c8e90c3206"
-SRCREV_libmatroska = "db5d627b5bf48516c9e0b540254c0d36595760c3"
-SRCREV_FORMAT = "mkvtoolnix"
-SRC_URI = " \
-           git://github.com/mbunkus/mkvtoolnix.git;name=mkvtoolnix \
-           git://github.com/Matroska-Org/libebml.git;name=libebml;destsuffix=git/lib/libebml \
-           git://github.com/Matroska-Org/libmatroska.git;name=libmatroska;destsuffix=git/lib/libmatroska \
-          "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep gettext
-
-# make sure rb files are used from sysroot, not from host
-# ruby-1.9.3-always-use-i386.patch is doing target_cpu=`echo $target_cpu | sed s/i.86/i386/`
-# we need to replace it too (a bit longer version without importing re)
-RUBY_SYS = "${@ '${BUILD_SYS}'.replace('i486', 'i386').replace('i586', 'i386').replace('i686', 'i386') }"
-export RUBYLIB="${STAGING_DATADIR_NATIVE}/rubygems:${STAGING_LIBDIR_NATIVE}/ruby:${STAGING_LIBDIR_NATIVE}/ruby/${RUBY_SYS}"
-
-PACKAGECONFIG ??= "flac ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
-PACKAGECONFIG[flac] = "--with-flac,--without-flac,flac"
-PACKAGECONFIG[qt5] = "--enable-qt --with-moc=${STAGING_BINDIR_NATIVE}/qt5/moc --with-uic=${STAGING_BINDIR_NATIVE}/qt5/uic --with-rcc=${STAGING_BINDIR_NATIVE}/qt5/rcc,--disable-qt,qtbase"
-
-EXTRA_OECONF = " --with-boost-libdir=${STAGING_LIBDIR} \
-"
-
-FILES_${PN} += "${datadir}"
-
-# remove some hardcoded searchpaths
-do_configure_prepend() {
-    sed -i -e s:/usr/local/lib:${STAGING_LIBDIR}:g -e s:/usr/local/include:${STAGING_INCDIR}:g ${S}/ac/qt5.m4
-}
-
-# Yeah, no makefile
-do_compile() {
-    LC_ALL="en_US.UTF-8" ${S}/drake ${PARALLEL_MAKE}
-}
-
-do_install() {
-    LC_ALL="en_US.UTF-8" ${S}/drake install DESTDIR=${D}
-}
-
-# | In file included from src/common/utf8_codecvt_facet.cpp:22:0:
-# | src/common/../../lib/boost/utf8_codecvt_facet/utf8_codecvt_facet.cpp:174:5: error: 'int mtx::utf8_codecvt_facet::do_length' is not a static data member of 'struct mtx::utf8_codecvt_facet'
-# |      BOOST_CODECVT_DO_LENGTH_CONST std::mbstate_t &,
-# |      ^
-PNBLACKLIST[mkvtoolnix] ?= "BROKEN: Failx to build with gcc-5 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb
index d788763..29167d1 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb
@@ -17,6 +17,7 @@
 EXTRA_OEMAKE = " \
     CC='${CXX}' \
     CFLAGS='${CFLAGS} -ffast-math -funroll-loops -fPIC -DPIC' \
+    ARCH='' \
 "
 do_compile() {
     oe_runmake all
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/coriander/coriander/cross-compile.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/coriander/coriander/cross-compile.patch
deleted file mode 100644
index 49350fe..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/coriander/coriander/cross-compile.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-In a cross compile environment adding paths like /usr are not correct.
-With this patch we make it so that its relative to sysroot if the compiler
-defines one.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: a/src/Makefile.am
-===================================================================
---- a/src/Makefile.am	2013-02-08 22:35:08.000000000 -0800
-+++ b/src/Makefile.am	2013-10-13 01:31:38.812869080 -0700
-@@ -33,5 +33,5 @@
- 	video_encode.c video_encode.h \
- 	subtitles.c subtitles.h 
- 
--coriander_LDADD = -L/usr/X11R6/lib/ @PACKAGE_LIBS@ $(INTLLIBS) $(LIBTIFF_LIBS) $(FTPLIB_LIBS) $(SDLLIB_LIBS) $(LIBDC_LIBS) $(LIBRAW_LIBS) $(XV_LIBS) $(COR_LFS_LDFLAGS) -lgthread-2.0 $(FFMPEG_LIBS) $(X11_LIBS)
-+coriander_LDADD = -L=/usr/X11R6/lib/ @PACKAGE_LIBS@ $(INTLLIBS) $(LIBTIFF_LIBS) $(FTPLIB_LIBS) $(SDLLIB_LIBS) $(LIBDC_LIBS) $(LIBRAW_LIBS) $(XV_LIBS) $(COR_LFS_LDFLAGS) -lgthread-2.0 $(FFMPEG_LIBS) $(X11_LIBS)
- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/coriander/coriander_2.0.2.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/coriander/coriander_2.0.2.bb
deleted file mode 100755
index 1ddd9aa..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/coriander/coriander_2.0.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Control and capture GUI for IIDC compliant cameras"
-HOMEPAGE = "http://damien.douxchamps.net/ieee1394/coriander/"
-SECTION = "applications"
-LICENSE = "GPL-3.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "gtk+ libgnomeui libraw1394 libdc1394 libxv tiff"
-
-PNBLACKLIST[coriander] ?= "BROKEN: fails to use SDL probably because libsdl-config was removed, error: unknown type name 'SDL_Overlay' - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/coriander-2/${PV}/${BP}.tar.gz \
-           file://cross-compile.patch \
-          "
-
-SRC_URI[md5sum] = "431d98fb013217681f97ade168201fb8"
-SRC_URI[sha256sum] = "5c7fd31cb58d398e2742352bf1ffbd2ca22e06686c6668ecfd437735c2b79123"
-
-inherit autotools gettext
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb
index ae16765..a8e5406 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb
@@ -6,13 +6,13 @@
 
 LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
-                    file://libdleyna/server/server.c;endline=22;md5=dfa6dc3f914206c2408c0510c234f8c8"
+                    file://libdleyna/server/server.c;endline=22;md5=437455d8aeff69ebd0996a76c67397bb"
 
 DEPENDS = "glib-2.0 gssdp gupnp gupnp-av gupnp-dlna libsoup-2.4 libxml2 dleyna-core"
 RDEPENDS_${PN} = "dleyna-connector-dbus"
 
 SRC_URI = "git://github.com/01org/${BPN}.git"
-SRCREV = "38651783914c76bd861f7fe8651b25e3986d7be8"
+SRCREV = "776950d5d96ac9dbf5c5c47bde8ac06f50a3cf46"
 S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/media-service-upnp_0.5.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/media-service-upnp_0.5.0.bb
deleted file mode 100644
index baaf42b..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/media-service-upnp_0.5.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "discover, browse and search UPNP/DLNA media servers"
-HOMEPAGE = "https://01.org/dleyna/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
-                    file://src/media-service-upnp.c;beginline=1;endline=21;md5=584eb103b4f6f3432c43d169b6a123a1"
-
-DEPENDS = "dbus glib-2.0 gssdp gupnp gupnp-av gupnp-dlna libsoup-2.4"
-
-SRC_URI = "git://github.com/01org/${BPN}.git"
-SRCREV = "0dbc74a79aa07a8f8c7d32e1d2de6c4d3a0f95bc"
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
-
-do_install_append() {
-    install -d ${D}${bindir}
-    install -m 0755 dms-info ${D}${bindir}
-}
-
-PACKAGES =+ "${PN}-tests"
-
-FILES_${PN} += "${datadir}/dbus-1/services/*.service"
-FILES_${PN}-tests = "${bindir}/dms-info"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/renderer-service-upnp_0.3.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/renderer-service-upnp_0.3.0.bb
deleted file mode 100644
index 4d06d2c..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/dleyna/renderer-service-upnp_0.3.0.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "discover and manipulate UPNP/DLNA media renderers"
-HOMEPAGE = "https://01.org/dleyna/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
-                    file://src/renderer-service-upnp.c;beginline=1;endline=21;md5=c25c3082684eb4ca87474b7528c6dc15"
-
-PNBLACKLIST[renderer-service-upnp] ?= "BROKEN: doesn't build with B!=S (trying to install rendererconsole.py from ${B} instead of ${S}) - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-DEPENDS = "dbus glib-2.0 gssdp gupnp gupnp-av gupnp-dlna libsoup-2.4"
-
-SRC_URI = "git://github.com/01org/${BPN}.git"
-SRCREV = "4a0b1d7cd8e22d3cb0e09c77c344ceccbcbbd34f"
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
-
-do_install_append() {
-    install -d ${D}${bindir}
-    install -m 0755 test/rendererconsole.py ${D}${bindir}
-}
-
-PACKAGES =+ "${PN}-tests"
-
-RDEPENDS_${PN}-tests = "python-dbus python-json python-misc python-pkgutil python-xml"
-
-FILES_${PN} += "${datadir}/dbus-1/services/*.service"
-# When we have GI, package cap
-FILES_${PN}-tests = "${bindir}/rendererconsole.py"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/faac_1.28.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/faac_1.28.bb
deleted file mode 100644
index 5c9477f..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/faac_1.28.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Freeware Advanced Audio Coder (MPEG2-AAC, MPEG4-AAC)"
-SECTION = "libs"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://libfaac/coder.h;beginline=5;endline=17;md5=fa1fd6a5fa8cdc877d63a12530d273e0"
-
-inherit autotools-brokensep
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/faac/${BP}.tar.gz \
-           file://build-fix.patch \
-           file://address-gcc-6-narrowing-errors.patch \
-           file://0001-frontend-Fix-format-string-security-error.patch \
-           file://0002-mp4v2-Define-__STRING-if-cdefs.h-does-not-exist.patch \
-           "
-
-SRC_URI[md5sum] = "80763728d392c7d789cde25614c878f6"
-SRC_URI[sha256sum] = "c5141199f4cfb17d749c36ba8cfe4b25f838da67c22f0fec40228b6b9c3d19df"
-
-EXTRA_OECONF += "--without-mp4v2"
-
-PACKAGES =+ "lib${BPN} lib${BPN}-dev"
-
-FILES_${PN} = " ${bindir}/faac "
-FILES_lib${PN} = " ${libdir}/libfaac.so.*"
-FILES_lib${PN}-dev = "${includedir}/faac.h ${includedir}/faaccfg.h ${libdir}/libfaac.so ${libdir}/libfaac.la"
-FILES_lib${PN}-staticdev = "${libdir}/libfaac.a"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/faac_1.29.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/faac_1.29.bb
new file mode 100644
index 0000000..4765c6c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/faac_1.29.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Freeware Advanced Audio Coder (MPEG2-AAC, MPEG4-AAC)"
+SECTION = "libs"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://libfaac/coder.h;beginline=5;endline=17;md5=fa1fd6a5fa8cdc877d63a12530d273e0"
+
+inherit autotools
+
+SRC_URI = " \
+    ${SOURCEFORGE_MIRROR}/faac/${BP}.tar.gz \
+    file://0001-mp4v2-Define-__STRING-if-cdefs.h-does-not-exist.patch \
+"
+
+SRC_URI[md5sum] = "78603720f655180059d6970c582a3005"
+SRC_URI[sha256sum] = "8cc7b03ceb2722223a6457e95d4c994731d80214a03ba33d1af76ba53f4b3197"
+
+EXTRA_OECONF += "--without-mp4v2"
+
+PACKAGES =+ "lib${BPN} lib${BPN}-dev"
+
+FILES_${PN} = " ${bindir}/faac "
+FILES_lib${PN} = " ${libdir}/*.so.*"
+FILES_lib${PN}-dev = " \
+    ${includedir} \
+    ${libdir}/*.so \
+    ${libdir}/*.la \
+"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/0001-frontend-Fix-format-string-security-error.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/0001-frontend-Fix-format-string-security-error.patch
deleted file mode 100644
index 75e003e..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/0001-frontend-Fix-format-string-security-error.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From c1d7a8b992dc36d0012cc3d54b7d3abf4ad4d5d8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Mar 2017 21:33:01 -0700
-Subject: [PATCH 1/2] frontend: Fix format string security error
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- frontend/main.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/frontend/main.c b/frontend/main.c
-index 02146a8..cb9329c 100644
---- a/frontend/main.c
-+++ b/frontend/main.c
-@@ -715,7 +715,7 @@ int main(int argc, char *argv[])
-         break;
- #endif
-         case 'L':
--        fprintf(stderr, faac_copyright_string);
-+        fprintf(stderr, "%s", faac_copyright_string);
-         dieMessage = license;
-         break;
-     case 'X':
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/0002-mp4v2-Define-__STRING-if-cdefs.h-does-not-exist.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/0001-mp4v2-Define-__STRING-if-cdefs.h-does-not-exist.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/0002-mp4v2-Define-__STRING-if-cdefs.h-does-not-exist.patch
rename to import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/0001-mp4v2-Define-__STRING-if-cdefs.h-does-not-exist.patch
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/address-gcc-6-narrowing-errors.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/address-gcc-6-narrowing-errors.patch
deleted file mode 100644
index 92fdd9b..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/address-gcc-6-narrowing-errors.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- faac-1.28/common/mp4v2/atom_standard.cpp.orig	2016-06-16 07:59:21.657040761 -0400
-+++ faac-1.28/common/mp4v2/atom_standard.cpp	2016-06-16 08:01:50.613036724 -0400
-@@ -22,15 +22,15 @@
- #include "mp4common.h"
- #include "atoms.h"
- 
--static const char name[5]={0251,'n', 'a', 'm', '\0'};
--static const char art[5]={0251,'A', 'R', 'T', '\0'};
--static const char wrt[5]={0251,'w', 'r', 't', '\0'};
--static const char alb[5]={0251,'a', 'l', 'b', '\0'};
--static const char day[5]={0251,'d', 'a', 'y', '\0'};
--static const char too[5]={0251,'t', 'o', 'o', '\0'};
--static const char cmt[5]={0251,'c', 'm', 't', '\0'};
--static const char gen[5]={0251,'g', 'e', 'n', '\0'};
--static const char grp[5]={0251,'g', 'r', 'p', '\0'};
-+static const char name[5]={(char)0251,'n', 'a', 'm', '\0'};
-+static const char art[5]={(char)0251,'A', 'R', 'T', '\0'};
-+static const char wrt[5]={(char)0251,'w', 'r', 't', '\0'};
-+static const char alb[5]={(char)0251,'a', 'l', 'b', '\0'};
-+static const char day[5]={(char)0251,'d', 'a', 'y', '\0'};
-+static const char too[5]={(char)0251,'t', 'o', 'o', '\0'};
-+static const char cmt[5]={(char)0251,'c', 'm', 't', '\0'};
-+static const char gen[5]={(char)0251,'g', 'e', 'n', '\0'};
-+static const char grp[5]={(char)0251,'g', 'r', 'p', '\0'};
- 
- MP4StandardAtom::MP4StandardAtom (const char *type) : MP4Atom(type)
- {
---- faac-1.28/common/mp4v2/mp4atom.cpp.orig	2016-06-16 08:03:07.777034633 -0400
-+++ faac-1.28/common/mp4v2/mp4atom.cpp	2016-06-16 08:03:54.629033363 -0400
-@@ -264,11 +264,11 @@
-       }
-       break;
-     case 0251:
--      static const char name[5]={0251,'n', 'a', 'm', '\0'};
--      static const char cmt[5]={0251,'c', 'm', 't', '\0'};
--      static const char cpy[5]={0251,'c', 'p', 'y', '\0'};
--      static const char des[5]={0251,'d', 'e', 's','\0'};
--      static const char prd[5]={0251, 'p', 'r', 'd', '\0'};
-+      static const char name[5]={(char)0251,'n', 'a', 'm', '\0'};
-+      static const char cmt[5]={(char)0251,'c', 'm', 't', '\0'};
-+      static const char cpy[5]={(char)0251,'c', 'p', 'y', '\0'};
-+      static const char des[5]={(char)0251,'d', 'e', 's','\0'};
-+      static const char prd[5]={(char)0251, 'p', 'r', 'd', '\0'};
-       if (ATOMID(type) == ATOMID(name) ||
- 	  ATOMID(type) == ATOMID(cmt) ||
- 	  ATOMID(type) == ATOMID(cpy) ||
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/build-fix.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/build-fix.patch
deleted file mode 100644
index 83cff8f..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/faac/files/build-fix.patch
+++ /dev/null
@@ -1,332 +0,0 @@
-Patch fixing build error and warnings. Error consisted of redefining
-strcasestr function from string.h. Warnings consisted of deprecated conversions
-of string constants to char*, using '%llu' for type uint64_t (which on 64 bit
-systems, is defined as unsigned long int by stdint.h), and using '==' for
-equality of two strings.
-
-Patch originally from Debian.
-
-Upstream-Status: Pending
-
-==========================================================================
---- a/common/mp4v2/mpeg4ip.h
-+++ b/common/mp4v2/mpeg4ip.h
-@@ -120,14 +120,6 @@
- #endif
- #include <sys/param.h>
- 
--#ifdef __cplusplus
--extern "C" {
--#endif
--char *strcasestr(const char *haystack, const char *needle);
--#ifdef __cplusplus
--}
--#endif
--
- #define OPEN_RDWR O_RDWR
- #define OPEN_CREAT O_CREAT 
- #define OPEN_RDONLY O_RDONLY
-@@ -135,7 +127,6 @@
- #define closesocket close
- #define IOSBINARY ios::bin
- 
--#if SIZEOF_LONG == 8
- #define MAX_UINT64 -1LU
- #define D64F "ld"
- #define U64F  "lu"
-@@ -143,15 +134,6 @@
- 
- #define TO_D64(a) (a##L)
- #define TO_U64(a) (a##LU)
--#else
--#define MAX_UINT64 -1LLU
--#define D64F "lld"
--#define U64F  "llu"
--#define X64F "llx"
--
--#define TO_D64(a) (a##LL)
--#define TO_U64(a) (a##LLU)
--#endif
- 
- #ifdef HAVE_FPOS_T___POS
- #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)((fpos).__pos)
---- a/configure.in
-+++ b/configure.in
-@@ -4,6 +4,9 @@
- AM_INIT_AUTOMAKE
- 
- AM_CONFIG_HEADER(config.h)
-+AH_TOP([#ifndef CONFIG_H
-+#define CONFIG_H])
-+AH_BOTTOM([#endif /* CONFIG_H */])
- 
- AC_ARG_WITH( mp4v2,  [  --with-mp4v2            compile libmp4v2],WITHMP4V2=$withval, WITHMP4V2=yes)
- AC_ARG_ENABLE( drm,  [  --enable-drm            Digital Radio Mondiale support], enable_drm=$enableval, enable_drm=no)
---- a/common/mp4v2/atom_avcC.cpp
-+++ b/common/mp4v2/atom_avcC.cpp
-@@ -29,7 +29,7 @@
- class SizeTableProperty : public MP4TableProperty 
- {
-  public:
--  SizeTableProperty(char *name, MP4IntegerProperty *pCountProperty) :
-+  SizeTableProperty(const char *name, MP4IntegerProperty *pCountProperty) :
-     MP4TableProperty(name, pCountProperty) {};
-  protected:
-   void ReadEntry(MP4File *pFile, u_int32_t index) {
---- a/common/mp4v2/atom_ohdr.cpp
-+++ b/common/mp4v2/atom_ohdr.cpp
-@@ -21,7 +21,7 @@
-       \param useCountedFormat    counted format flag.
-       \param useUnicode          unicode flag.
-   */
--	OhdrMP4StringProperty(char* name, bool useCountedFormat = false,
-+	OhdrMP4StringProperty(const char* name, bool useCountedFormat = false,
-     bool useUnicode = false): MP4StringProperty(name, useCountedFormat,
-     useUnicode) {
-   }
---- a/common/mp4v2/atom_stz2.cpp
-+++ b/common/mp4v2/atom_stz2.cpp
-@@ -30,7 +30,7 @@
- class MP4HalfSizeTableProperty : public MP4TableProperty
- {
- public:
--  MP4HalfSizeTableProperty(char *name, MP4IntegerProperty *pCountProperty) :
-+  MP4HalfSizeTableProperty(const char *name, MP4IntegerProperty *pCountProperty) :
-     MP4TableProperty(name, pCountProperty) {};
- 
-   // The count is half the actual size
---- a/common/mp4v2/mp4atom.cpp
-+++ b/common/mp4v2/mp4atom.cpp
-@@ -806,7 +806,7 @@
- 	AddProperty(new MP4Integer24Property("flags"));
- }
- 
--void MP4Atom::AddReserved(char* name, u_int32_t size) 
-+void MP4Atom::AddReserved(const char* name, u_int32_t size)
- {
- 	MP4BytesProperty* pReserved = new MP4BytesProperty(name, size); 
- 	pReserved->SetReadOnly();
---- a/common/mp4v2/mp4atom.h
-+++ b/common/mp4v2/mp4atom.h
-@@ -204,7 +204,7 @@
- 
- 	void AddVersionAndFlags();
- 
--	void AddReserved(char* name, u_int32_t size);
-+	void AddReserved(const char* name, u_int32_t size);
- 
- 	void ExpectChildAtom(const char* name, 
- 		bool mandatory, bool onlyOne = true);
---- a/common/mp4v2/mp4file.cpp
-+++ b/common/mp4v2/mp4file.cpp
-@@ -718,7 +718,7 @@
- 	}
- }
- 
--void MP4File::ProtectWriteOperation(char* where)
-+void MP4File::ProtectWriteOperation(const char* where)
- {
- 	if (m_mode == 'r') {
- 		throw new MP4Error("operation not permitted in read mode", where);
-@@ -1274,7 +1274,7 @@
- }
- 
- // NULL terminated list of brands which require the IODS atom
--char *brandsWithIods[] = { "mp42",
-+const char *brandsWithIods[] = { "mp42",
-                            "isom",
-                            NULL};
- 
-@@ -2211,11 +2211,11 @@
- 	for (u_int32_t i = 0; i < m_pTracks.Size(); i++) {
- 		if (!strcmp(normType, m_pTracks[i]->GetType())) {
- 			if (subType) {
--				if (normType == MP4_AUDIO_TRACK_TYPE) {
-+				if (!strcmp(normType,MP4_AUDIO_TRACK_TYPE)) {
- 					if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
- 						continue;
- 					}
--				} else if (normType == MP4_VIDEO_TRACK_TYPE) {
-+				} else if (!strcmp(normType,MP4_VIDEO_TRACK_TYPE)) {
- 					if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
- 						continue;
- 					}
-@@ -2278,11 +2278,11 @@
-   for (u_int32_t i = 0; i < m_pTracks.Size(); i++) {
-     if (!strcmp(normType, m_pTracks[i]->GetType())) {
-       if (subType) {
--	if (normType == MP4_AUDIO_TRACK_TYPE) {
-+	if (!strcmp(normType,MP4_AUDIO_TRACK_TYPE)) {
- 	  if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
- 	    continue;
- 	  }
--	} else if (normType == MP4_VIDEO_TRACK_TYPE) {
-+	} else if (!strcmp(normType,MP4_VIDEO_TRACK_TYPE)) {
- 	  if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
- 	    continue;
- 	  }
---- a/common/mp4v2/mp4file.h
-+++ b/common/mp4v2/mp4file.h
-@@ -700,7 +700,7 @@
- 	const char* TempFileName();
- 	void Rename(const char* existingFileName, const char* newFileName);
- 
--	void ProtectWriteOperation(char* where);
-+	void ProtectWriteOperation(const char* where);
- 
- 	void FindIntegerProperty(const char* name, 
- 		MP4Property** ppProperty, u_int32_t* pIndex = NULL);
---- a/common/mp4v2/mp4property.cpp
-+++ b/common/mp4v2/mp4property.cpp
-@@ -313,7 +313,7 @@
- 
- // MP4StringProperty
- 
--MP4StringProperty::MP4StringProperty(char* name, 
-+MP4StringProperty::MP4StringProperty(const char* name,
- 	bool useCountedFormat, bool useUnicode)
- 	: MP4Property(name)
- {
-@@ -420,7 +420,7 @@
- 
- // MP4BytesProperty
- 
--MP4BytesProperty::MP4BytesProperty(char* name, u_int32_t valueSize,
-+MP4BytesProperty::MP4BytesProperty(const char* name, u_int32_t valueSize,
-                                    u_int32_t defaultValueSize)
- 	: MP4Property(name)
- {
-@@ -549,7 +549,7 @@
- 
- // MP4TableProperty
- 
--MP4TableProperty::MP4TableProperty(char* name, MP4IntegerProperty* pCountProperty)
-+MP4TableProperty::MP4TableProperty(const char* name, MP4IntegerProperty* pCountProperty)
- 	: MP4Property(name) 
- {
- 	m_pCountProperty = pCountProperty;
-@@ -725,7 +725,7 @@
- 
- // MP4DescriptorProperty
-   
--MP4DescriptorProperty::MP4DescriptorProperty(char* name, 
-+MP4DescriptorProperty::MP4DescriptorProperty(const char* name,
- 	u_int8_t tagsStart, u_int8_t tagsEnd, bool mandatory, bool onlyOne)
- 	: MP4Property(name) 
- { 
---- a/common/mp4v2/mp4property.h
-+++ b/common/mp4v2/mp4property.h
-@@ -100,7 +100,7 @@
- 
- class MP4IntegerProperty : public MP4Property {
- protected:
--	MP4IntegerProperty(char* name)
-+	MP4IntegerProperty(const char* name)
- 		: MP4Property(name) { };
- 
- public:
-@@ -118,7 +118,7 @@
- #define MP4INTEGER_PROPERTY_DECL2(isize, xsize) \
- 	class MP4Integer##xsize##Property : public MP4IntegerProperty { \
- 	public: \
--		MP4Integer##xsize##Property(char* name) \
-+		MP4Integer##xsize##Property(const char* name) \
- 			: MP4IntegerProperty(name) { \
- 			SetCount(1); \
- 			m_values[0] = 0; \
-@@ -188,7 +188,7 @@
- 
- class MP4BitfieldProperty : public MP4Integer64Property {
- public:
--	MP4BitfieldProperty(char* name, u_int8_t numBits)
-+	MP4BitfieldProperty(const char* name, u_int8_t numBits)
- 		: MP4Integer64Property(name) {
- 		ASSERT(numBits != 0);
- 		ASSERT(numBits <= 64);
-@@ -213,7 +213,7 @@
- 
- class MP4Float32Property : public MP4Property {
- public:
--	MP4Float32Property(char* name)
-+	MP4Float32Property(const char* name)
- 		: MP4Property(name) {
- 		m_useFixed16Format = false;
- 		m_useFixed32Format = false;
-@@ -280,7 +280,7 @@
- 
- class MP4StringProperty : public MP4Property {
- public:
--	MP4StringProperty(char* name, 
-+	MP4StringProperty(const char* name,
- 	  bool useCountedFormat = false, bool useUnicode = false);
- 
- 	~MP4StringProperty();
-@@ -355,7 +355,7 @@
- 
- class MP4BytesProperty : public MP4Property {
- public:
--	MP4BytesProperty(char* name, u_int32_t valueSize = 0,
-+	MP4BytesProperty(const char* name, u_int32_t valueSize = 0,
-                          u_int32_t defaultValueSize = 0);
- 
- 	~MP4BytesProperty();
-@@ -419,7 +419,7 @@
- 
- class MP4TableProperty : public MP4Property {
- public:
--	MP4TableProperty(char* name, MP4IntegerProperty* pCountProperty);
-+	MP4TableProperty(const char* name, MP4IntegerProperty* pCountProperty);
- 
- 	~MP4TableProperty();
- 
-@@ -469,7 +469,7 @@
- 
- class MP4DescriptorProperty : public MP4Property {
- public:
--	MP4DescriptorProperty(char* name = NULL, 
-+	MP4DescriptorProperty(const char* name = NULL,
- 	  u_int8_t tagsStart = 0, u_int8_t tagsEnd = 0,
- 	  bool mandatory = false, bool onlyOne = false);
- 
-@@ -531,7 +531,7 @@
- 
- class MP4QosQualifierProperty : public MP4DescriptorProperty {
- public:
--	MP4QosQualifierProperty(char* name = NULL, 
-+	MP4QosQualifierProperty(const char* name = NULL,
- 	  u_int8_t tagsStart = 0, u_int8_t tagsEnd = 0,
- 	  bool mandatory = false, bool onlyOne = false) :
- 	MP4DescriptorProperty(name, tagsStart, tagsEnd, mandatory, onlyOne) { }
---- a/common/mp4v2/mp4track.cpp
-+++ b/common/mp4v2/mp4track.cpp
-@@ -1360,7 +1360,7 @@
-   }
- }
- 
--MP4Atom* MP4Track::AddAtom(char* parentName, char* childName)
-+MP4Atom* MP4Track::AddAtom(const char* parentName, const char* childName)
- {
- 	MP4Atom* pChildAtom = MP4Atom::CreateAtom(childName);
- 
---- a/common/mp4v2/mp4track.h
-+++ b/common/mp4v2/mp4track.h
-@@ -168,7 +168,7 @@
- 	void UpdateSyncSamples(MP4SampleId sampleId, 
- 		bool isSyncSample);
- 
--	MP4Atom* AddAtom(char* parentName, char* childName);
-+	MP4Atom* AddAtom(const char* parentName, const char* childName);
- 
- 	void UpdateDurations(MP4Duration duration);
- 	MP4Duration ToMovieDuration(MP4Duration trackDuration);
---- a/common/mp4v2/ocidescriptors.cpp
-+++ b/common/mp4v2/ocidescriptors.cpp
-@@ -171,7 +171,7 @@
- 
- class MP4CreatorTableProperty : public MP4TableProperty {
- public:
--	MP4CreatorTableProperty(char* name, MP4Integer8Property* pCountProperty) :
-+	MP4CreatorTableProperty(const char* name, MP4Integer8Property* pCountProperty) :
- 		MP4TableProperty(name, pCountProperty) {
- 	};
- protected:
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/files/gerbera.service b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/files/gerbera.service
new file mode 100644
index 0000000..1b5a3ad
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/files/gerbera.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Start Gerbera, an UPnP media server
+After=multi-user.target network-online.target
+Wants=network-online.target
+
+[Service]
+ExecStart=/usr/bin/gerbera
+Environment='HOME=/root'
+Type=simple
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_git.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_git.bb
new file mode 100644
index 0000000..f763cf1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_git.bb
@@ -0,0 +1,32 @@
+Description = "Gerbera - An UPnP media server"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=25cdec9afe3f1f26212ead6bd2f7fac8"
+
+SRC_URI = "git://github.com/v00d00/gerbera.git;protocol=https \
+    file://gerbera.service \
+"
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "4435b165d121195aefd67d0287f7f9349e181d45"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "expat zlib curl libupnp e2fsprogs sqlite3 "
+
+SYSTEMD_SERVICE_${PN} = "gerbera.service"
+
+inherit cmake systemd
+
+PACKAGECONFIG = ""
+PACKAGECONFIG[taglib] = "-DWITH_TAGLIB=TRUE,-DWITH_TAGLIB=FALSE,taglib"
+
+EXTRA_OECMAKE = "-DWITH_JS=FALSE -DWITH_MAGIC=FALSE -DWITH_EXIF=FALSE -DLIBUUID_INCLUDE_DIRS=${STAGING_INCDIR} -DLIBUUID_LIBRARIES=-luuid"
+
+do_install_append() {
+    install -d ${D}/root/.config/
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 ${WORKDIR}/gerbera.service ${D}${systemd_system_unitdir}/
+}
+
+FILES_${PN} += "/root/.config/"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch
deleted file mode 100644
index 7da0e14..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-gst-ffmpeg: aacdec: check channel count
-
-Prevent out of array accesses
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)
-
-Upstream-Status: Backport 
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/aacdec.c |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
-index 239153a..6c17c33 100644
---- a/gst-libs/ext/libav/libavcodec/aacdec.c
-+++ b/gst-libs/ext/libav/libavcodec/aacdec.c
-@@ -914,6 +914,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
-         }
-     }
- 
-+    if (avctx->channels > MAX_CHANNELS) {
-+        av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
-+        return AVERROR_INVALIDDATA;
-+    }
-+
-     AAC_INIT_VLC_STATIC( 0, 304);
-     AAC_INIT_VLC_STATIC( 1, 270);
-     AAC_INIT_VLC_STATIC( 2, 550);
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-alac-fix-nb_samples-order-case.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-alac-fix-nb_samples-order-case.patch
deleted file mode 100644
index 10ce0f3..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-alac-fix-nb_samples-order-case.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From e0884eadf6a15e93142131b695f48776f9a0ac31 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Sat, 10 Nov 2012 17:14:04 +0100
-Subject: [PATCH] alac: fix nb_samples < order case
-
-Upstream-Status: Backport
-
-Commit e0884eadf6a15e93142131b695f48776f9a0ac31 release/1.0
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit fd4f4923cce6a2cbf4f48640b4ac706e614a1594)
----
- libavcodec/alac.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/alac.c b/libavcodec/alac.c
-index 9cd1737..e8e844a 100644
---- a/gst-libs/ext/libav/libavcodec/alac.c
-+++ b/gst-libs/ext/libav/libavcodec/alac.c
-@@ -278,7 +278,7 @@ static void predictor_decompress_fir_ada
- 
-     /* read warm-up samples */
-     if (predictor_coef_num > 0)
--        for (i = 0; i < predictor_coef_num; i++) {
-+        for (i = 0; i < predictor_coef_num && i < output_size; i++) {
-             int32_t val;
- 
-             val = buffer_out[i] + error_buffer[i+1];
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-alsdec-check-block-length.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-alsdec-check-block-length.patch
deleted file mode 100644
index 73980f4..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-alsdec-check-block-length.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 6df0d3e2916c223dbe4262bf1b876dff1cb3f980 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Wed, 12 Dec 2012 12:28:45 +0100
-Subject: [PATCH] alsdec: check block length
-
-Upstream-Status: Backport
-
-Commit 6df0d3e2916c223dbe4262bf1b876dff1cb3f980 release/1.0
-
-Fix writing over the end
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 0ceca269b66ec12a23bf0907bd2c220513cdbf16)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/alsdec.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
-index 46dd0b4..1095b01 100644
---- a/gst-libs/ext/libav/libavcodec/alsdec.c
-+++ b/gst-libs/ext/libav/libavcodec/alsdec.c
-@@ -552,12 +552,15 @@ static void get_block_sizes(ALSDecContext *ctx, unsigned int *div_blocks,
- 
- /** Read the block data for a constant block
-  */
--static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
-+static int read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
- {
-     ALSSpecificConfig *sconf = &ctx->sconf;
-     AVCodecContext *avctx    = ctx->avctx;
-     GetBitContext *gb        = &ctx->gb;
- 
-+    if (bd->block_length <= 0)
-+        return -1;
-+
-     *bd->raw_samples = 0;
-     *bd->const_block = get_bits1(gb);    // 1 = constant value, 0 = zero block (silence)
-     bd->js_blocks    = get_bits1(gb);
-@@ -572,6 +575,8 @@ static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
- 
-     // ensure constant block decoding by reusing this field
-     *bd->const_block = 1;
-+
-+    return 0;
- }
- 
- 
-@@ -971,7 +976,8 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
-         if (read_var_block_data(ctx, bd))
-             return -1;
-     } else {
--        read_const_block_data(ctx, bd);
-+        if (read_const_block_data(ctx, bd) < 0)
-+            return -1;
-     }
- 
-     return 0;
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-atrac3dec-Check-coding-mode-against-channels.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-atrac3dec-Check-coding-mode-against-channels.patch
deleted file mode 100644
index 42cb5f4..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-atrac3dec-Check-coding-mode-against-channels.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 2502914c5f8eb77659d7c0868396862557a63245 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 9 Nov 2012 13:26:20 +0100
-Subject: [PATCH] atrac3dec: Check coding mode against channels.
-
-Upstream-Status: Backport
-
-Commit 2502914c5f8eb77659d7c0868396862557a63245 release/1.0
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 13451f5520ce6b0afde861b2285dda659f8d4fb4)
-
-Conflicts:
-
-	libavcodec/atrac3.c
----
- libavcodec/atrac3.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
-index 7d076be..1da4c78 100644
---- a/gst-libs/ext/libav/libavcodec/atrac3.c
-+++ b/gst-libs/ext/libav/libavcodec/atrac3.c
-@@ -955,6 +955,11 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
-     }
-     /* Check the extradata. */
- 
-+    if (q->codingMode == JOINT_STEREO && avctx->channels < 2) {
-+        av_log(avctx, AV_LOG_ERROR, "Invalid coding mode\n");
-+        return AVERROR_INVALIDDATA;
-+    }
-+
-     if (q->atrac3version != 4) {
-         av_log(avctx,AV_LOG_ERROR,"Version %d != 4.\n",q->atrac3version);
-         return AVERROR_INVALIDDATA;
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch
deleted file mode 100644
index 31fa51a..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a99aff4e4bbef8e64b51f267cd1769214e1b4e80 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 30 Aug 2013 23:40:47 +0200
-Subject: [PATCH] avcodec/dsputil: fix signedness in sizeof() comparissions
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 454a11a1c9c686c78aa97954306fb63453299760)
-
-Upstream-Status: Backport
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/dsputil.c |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
-index 53dc2eb..6264832 100644
---- a/gst-libs/ext/libav/libavcodec/dsputil.c
-+++ b/gst-libs/ext/libav/libavcodec/dsputil.c
-@@ -1912,7 +1912,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
- 
- static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
-     long i;
--    for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
-+    for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
-         long a = *(long*)(src+i);
-         long b = *(long*)(dst+i);
-         *(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
-@@ -1937,7 +1937,7 @@ static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
-         }
-     }else
- #endif
--    for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
-+    for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
-         long a = *(long*)(src1+i);
-         long b = *(long*)(src2+i);
-         *(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch
deleted file mode 100644
index b0a3fb1..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 573d5fdedae72bf59d8c0b0766fdee171063d36f Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Sun, 16 Feb 2014 23:08:52 +0100
-Subject: [PATCH] avcodec/msrle: use av_image_get_linesize() to calculate the
- linesize
-
-Upstream-Status: Backport
-
-Commit 573d5fdedae72bf59d8c0b0766fdee171063d36f release/0.9
-
-Fixes out of array access
-Fixes: 14a74a0a2dc67ede543f0e35d834fbbe-asan_heap-oob_49572c_556_cov_215466444_44_001_engine_room.mov
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit c919e1ca2ecfc47d796382973ba0e48b8f6f92a2)
-
-Conflicts:
-
-	libavcodec/msrle.c
-(cherry picked from commit bc1c8ec5e65098fd2ccd8456f667151dfc9cda42)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/msrle.c |    3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
-index 30159bb..c39ae7b 100644
---- a/gst-libs/ext/libav/libavcodec/msrle.c
-+++ b/gst-libs/ext/libav/libavcodec/msrle.c
-@@ -35,6 +35,7 @@
- #include "avcodec.h"
- #include "dsputil.h"
- #include "msrledec.h"
-+#include "libavutil/imgutils.h"
- 
- typedef struct MsrleContext {
-     AVCodecContext *avctx;
-@@ -107,7 +108,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
- 
-     /* FIXME how to correctly detect RLE ??? */
-     if (avctx->height * istride == avpkt->size) { /* assume uncompressed */
--        int linesize = avctx->width * avctx->bits_per_coded_sample / 8;
-+        int linesize = av_image_get_linesize(avctx->pix_fmt, avctx->width, 0);
-         uint8_t *ptr = s->frame.data[0];
-         uint8_t *buf = avpkt->data + (avctx->height-1)*istride;
-         int i, j;
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch
deleted file mode 100644
index 5ff6583..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-gst-ffmpeg: avcodec/parser: reset indexes on realloc failure
-
-Fixes Ticket2982
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit f31011e9abfb2ae75bb32bc44e2c34194c8dc40a)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-
-Upstream-Status: Backport 
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
----
- libavcodec/parser.c |   10 +++++++---
- 1 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/parser.c b/libavcodec/parser.c
-index 2c6de6e..66eca06 100644
---- a/gst-libs/ext/libav/libavcodec/parser.c
-+++ b/gst-libs/ext/libav/libavcodec/parser.c
-@@ -241,8 +241,10 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
-     if(next == END_NOT_FOUND){
-         void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
- 
--        if(!new_buffer)
-+        if(!new_buffer) {
-+            pc->index = 0;
-             return AVERROR(ENOMEM);
-+        }
-         pc->buffer = new_buffer;
-         memcpy(&pc->buffer[pc->index], *buf, *buf_size);
-         pc->index += *buf_size;
-@@ -255,9 +257,11 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
-     /* append to buffer */
-     if(pc->index){
-         void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
--
--        if(!new_buffer)
-+        if(!new_buffer) {
-+            pc->overread_index =
-+            pc->index = 0;
-             return AVERROR(ENOMEM);
-+        }
-         pc->buffer = new_buffer;
-         if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
-             memcpy(&pc->buffer[pc->index], *buf,
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch
deleted file mode 100644
index 7f6eb48..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-gst-ffmpeg: avcodec/rpza: Perform pointer advance and checks before
- using the pointers
-
-Fixes out of array accesses
-Fixes Ticket2850
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 3819db745da2ac7fb3faacb116788c32f4753f34)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-
-Upstream-Status: Backport 
-
-Singed-off-by: Yue Tao <yue.tao@windriver.com>
-
----
- libavcodec/rpza.c |    8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
-index 635b406..f291a95 100644
---- a/gst-libs/ext/libav/libavcodec/rpza.c
-+++ b/gst-libs/ext/libav/libavcodec/rpza.c
-@@ -83,7 +83,7 @@ static void rpza_decode_stream(RpzaContext *s)
-     unsigned short *pixels = (unsigned short *)s->frame.data[0];
- 
-     int row_ptr = 0;
--    int pixel_ptr = 0;
-+    int pixel_ptr = -4;
-     int block_ptr;
-     int pixel_x, pixel_y;
-     int total_blocks;
-@@ -139,6 +139,7 @@ static void rpza_decode_stream(RpzaContext *s)
-             colorA = AV_RB16 (&s->buf[stream_ptr]);
-             stream_ptr += 2;
-             while (n_blocks--) {
-+                ADVANCE_BLOCK()
-                 block_ptr = row_ptr + pixel_ptr;
-                 for (pixel_y = 0; pixel_y < 4; pixel_y++) {
-                     for (pixel_x = 0; pixel_x < 4; pixel_x++){
-@@ -147,7 +148,6 @@ static void rpza_decode_stream(RpzaContext *s)
-                     }
-                     block_ptr += row_inc;
-                 }
--                ADVANCE_BLOCK();
-             }
-             break;
- 
-@@ -184,6 +184,7 @@ static void rpza_decode_stream(RpzaContext *s)
-             color4[2] |= ((21 * ta + 11 * tb) >> 5);
- 
-             while (n_blocks--) {
-+                ADVANCE_BLOCK();
-                 block_ptr = row_ptr + pixel_ptr;
-                 for (pixel_y = 0; pixel_y < 4; pixel_y++) {
-                     index = s->buf[stream_ptr++];
-@@ -194,12 +195,12 @@ static void rpza_decode_stream(RpzaContext *s)
-                     }
-                     block_ptr += row_inc;
-                 }
--                ADVANCE_BLOCK();
-             }
-             break;
- 
-         /* Fill block with 16 colors */
-         case 0x00:
-+            ADVANCE_BLOCK();
-             block_ptr = row_ptr + pixel_ptr;
-             for (pixel_y = 0; pixel_y < 4; pixel_y++) {
-                 for (pixel_x = 0; pixel_x < 4; pixel_x++){
-@@ -213,7 +214,6 @@ static void rpza_decode_stream(RpzaContext *s)
-                 }
-                 block_ptr += row_inc;
-             }
--            ADVANCE_BLOCK();
-             break;
- 
-         /* Unknown opcode */
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch
deleted file mode 100644
index 3ca6fc4..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c17a0ad1df15a94d0b1239adc2afb593bdf0a153 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 3 Oct 2014 22:50:45 +0200
-Subject: [PATCH 1/2] avcodec/smc: fix off by 1 error
-
-Upstream-Status: Backport
-
-Fixes out of array access
-Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/smc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gst-libs/ext/libav/libavcodec/smc.c b/gst-libs/ext/libav/libavcodec/smc.c
-index 3cd5e53..dec9f71 100644
---- a/gst-libs/ext/libav/libavcodec/smc.c
-+++ b/gst-libs/ext/libav/libavcodec/smc.c
-@@ -69,7 +69,7 @@ typedef struct SmcContext {
-         row_ptr += stride * 4; \
-     } \
-     total_blocks--; \
--    if (total_blocks < 0) \
-+    if (total_blocks < 0 + !!n_blocks) \
-     { \
-         av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \
-         return; \
--- 
-2.1.0
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch
deleted file mode 100644
index 68bb66e..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 12770701856a05b6b3cd706f708f8e9a4e8a1336 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Thu, 13 Feb 2014 13:59:51 +0100
-Subject: [PATCH] avformat/mpegtsenc: Check data array size in
- mpegts_write_pmt()
-
-Upstream-Status: Backport
-
-COmmit 12770701856a05b6b3cd706f708f8e9a4e8a1336 release/0.11
-
-Prevents out of array writes
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 842b6c14bcfc1c5da1a2d288fd65386eb8c158ad)
-
-Conflicts:
-
-	libavformat/mpegtsenc.c
-(cherry picked from commit e87de3f50b765134588d0b048c32ed4b8acc16fb)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavformat/mpegtsenc.c |    9 +++++++--
- 1 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
-index 793e205..a12d19f 100644
---- a/gst-libs/ext/libav/libavformat/mpegtsenc.c
-+++ b/gst-libs/ext/libav/libavformat/mpegtsenc.c
-@@ -240,7 +240,7 @@ static void mpegts_write_pat(AVFormatContext *s)
-                           data, q - data);
- }
- 
--static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
-+static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
- {
-     //    MpegTSWrite *ts = s->priv_data;
-     uint8_t data[1012], *q, *desc_length_ptr, *program_info_length_ptr;
-@@ -293,6 +293,10 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
-             stream_type = STREAM_TYPE_PRIVATE_DATA;
-             break;
-         }
-+
-+        if (q - data > sizeof(data) - 32)
-+            return AVERROR(EINVAL);
-+
-         *q++ = stream_type;
-         put16(&q, 0xe000 | ts_st->pid);
-         desc_length_ptr = q;
-@@ -324,7 +328,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
-                 len_ptr = q++;
-                 *len_ptr = 0;
- 
--                for (p = lang->value; next && *len_ptr < 255 / 4 * 4; p = next + 1) {
-+                for (p = lang->value; next && *len_ptr < 255 / 4 * 4 && q - data < sizeof(data) - 4; p = next + 1) {
-                     next = strchr(p, ',');
-                     if (strlen(p) != 3 && (!next || next != p + 3))
-                         continue; /* not a 3-letter code */
-@@ -386,6 +390,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
-     }
-     mpegts_write_section1(&service->pmt, PMT_TID, service->sid, 0, 0, 0,
-                           data, q - data);
-+    return 0;
- }
- 
- /* NOTE: str == NULL is accepted for an empty string */
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-eamad-fix-out-of-array-accesses.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-eamad-fix-out-of-array-accesses.patch
deleted file mode 100644
index f45e3fd..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-eamad-fix-out-of-array-accesses.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 63ac64864c6e0e84355aa3caa5b92208997a9a8d Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Sat, 17 Nov 2012 16:26:55 +0100
-Subject: [PATCH] eamad: fix out of array accesses
-
-Upstream-Status: Backport
-
-Commit 63ac64864c6e0e84355aa3caa5b92208997a9a8d release/1.1
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/eamad.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
-index 2805195..e38650e 100644
---- a/gst-libs/ext/libav/libavcodec/eamad.c
-+++ b/gst-libs/ext/libav/libavcodec/eamad.c
-@@ -237,7 +237,7 @@ static int decode_frame(AVCodecContext *avctx,
-     int chunk_type;
-     int inter;
- 
--    if (buf_size < 17) {
-+    if (buf_size < 26) {
-         av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
-         *data_size = 0;
-         return -1;
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch
deleted file mode 100644
index e0e4239..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-gst-ffmpeg: error concealment: initialize block index.
-
-Fixes CVE-2011-3941 (out of bounds write)
-
-Upstream-Status: Backport 
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/error_resilience.c |    3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
-index 8bb5d0c..d55c000 100644
---- a/gst-libs/ext/libav/libavcodec/error_resilience.c
-+++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
-@@ -45,6 +45,9 @@ static void decode_mb(MpegEncContext *s, int ref){
-     s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
-     s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
- 
-+    ff_init_block_index(s);
-+    ff_update_block_index(s);
-+
-     if(CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264){
-         H264Context *h= (void*)s;
-         h->mb_xy= s->mb_x + s->mb_y*s->mb_stride;
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch
deleted file mode 100644
index 8eef6e9..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-gst-ffmpeg: error_concealment: Check that the picture is not in a half
-
-Fixes state becoming inconsistent
-Fixes a null pointer dereference
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 23318a57358358e7a4dc551e830e4503f0638cfe)
-
-Upstream-Status: Backport 
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
----
- libavcodec/error_resilience.c |    6 ++++++
- 1 files changed, 6 insertions(+), 0 deletions(-)
-
-diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
-index 01f7424..2b6bc42 100644
---- a/gst-libs/ext/libav/libavcodec/error_resilience.c
-+++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
-@@ -793,6 +793,12 @@ void ff_er_frame_end(MpegEncContext *s){
-        s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled
-        s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
- 
-+    if (   s->picture_structure == PICT_FRAME
-+        && s->current_picture.linesize[0] != s->current_picture_ptr->linesize[0]) {
-+        av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
-+        return;
-+    }
-+
-     if(s->current_picture.motion_val[0] == NULL){
-         av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
- 
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch
deleted file mode 100644
index 80325db..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-gst-ffmpeg: ffserver: set oformat
-
-Fix Ticket1986
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit cbe43e62c9ac7d4aefdc13476f6f691bd626525f)
-
-Upstream-Status: Backport 
-
----
- ffserver.c |    4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/ffserver.c b/ffserver.c
-index 4044d0f..8740140 100644
---- a/gst-libs/ext/libav/ffserver.c
-+++ b/gst-libs/ext/libav/ffserver.c
-@@ -2937,12 +2937,14 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
- {
-     AVFormatContext *avc;
-     AVStream *avs = NULL;
-+    AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
-     int i;
- 
-     avc =  avformat_alloc_context();
--    if (avc == NULL) {
-+    if (avc == NULL || !rtp_format) {
-         return -1;
-     }
-+    avc->oformat = rtp_format;
-     av_dict_set(&avc->metadata, "title",
-                stream->title[0] ? stream->title : "No Title", 0);
-     avc->nb_streams = stream->nb_streams;
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch
deleted file mode 100644
index d4f55b2..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d6c184880ee2e09fd68c0ae217173832cee5afc1 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Sun, 18 Nov 2012 16:29:04 +0100
-Subject: [PATCH] h264: correct ref count check and limit, fix out of array
- accesses.
-
-Upstream-Status: Backport
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/h264.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/h264.c b/libavcodec/h264.c
-index da43f1e..32cede5 100644
---- a/gst-libs/ext/libav/libavcodec/h264.c
-+++ b/gst-libs/ext/libav/libavcodec/h264.c
-@@ -2870,6 +2870,9 @@ static int decode_slice_header(H264Conte
-             h->ref_count[0]= get_ue_golomb(&s->gb) + 1;
-             if(h->slice_type_nos==AV_PICTURE_TYPE_B)
-                 h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
-+            else
-+                // full range is spec-ok in this case, even for frames
-+                h->ref_count[1] = 1;
- 
-             if(h->ref_count[0]-1 > 32-1 || h->ref_count[1]-1 > 32-1){
-                 av_log(h->s.avctx, AV_LOG_ERROR, "reference overflow\n");
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch
deleted file mode 100644
index 05a9de3..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-gst-ffmpeg: h264: set parameters from SPS whenever it changes
-    
-Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with
-alternating bit depths.
-
-Upstream-Status: Backport
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
-diff --git a/gst-libs/ext/libav/libavcodec/h264.c.old b/gst-libs/ext/libav/libavcodec/h264.c
-index 3621f41..718906a 100644
---- a/gst-libs/ext/libav/libavcodec/h264.c.old
-+++ b/gst-libs/ext/libav/libavcodec/h264.c
-@@ -2491,6 +2491,34 @@ int ff_h264_get_profile(SPS *sps)
-     return profile;
- }
- 
-+static int h264_set_parameter_from_sps(H264Context *h)
-+{
-+    MpegEncContext *s = &h->s;
-+    AVCodecContext * avctx= s->avctx;
-+
-+    if (s->flags& CODEC_FLAG_LOW_DELAY ||
-+        (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
-+        s->low_delay=1;
-+
-+    if(avctx->has_b_frames < 2)
-+        avctx->has_b_frames= !s->low_delay;
-+
-+    if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
-+        if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
-+            avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
-+            h->pixel_shift = h->sps.bit_depth_luma > 8;
-+
-+            ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
-+            ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
-+            dsputil_init(&s->dsp, s->avctx);
-+        } else {
-+            av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
-+            return -1;
-+        }
-+    }
-+    return 0;
-+}
-+
- /**
-  * decodes a slice header.
-  * This will also call MPV_common_init() and frame_start() as needed.
-@@ -2505,7 +2533,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
-     MpegEncContext * const s0 = &h0->s;
-     unsigned int first_mb_in_slice;
-     unsigned int pps_id;
--    int num_ref_idx_active_override_flag;
-+    int num_ref_idx_active_override_flag, ret;
-     unsigned int slice_type, tmp, i, j;
-     int default_ref_list_done = 0;
-     int last_pic_structure;
-@@ -2569,7 +2597,17 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
-         av_log(h->s.avctx, AV_LOG_ERROR, "non-existing SPS %u referenced\n", h->pps.sps_id);
-         return -1;
-     }
--    h->sps = *h0->sps_buffers[h->pps.sps_id];
-+
-+    if (h->pps.sps_id != h->current_sps_id ||
-+        h0->sps_buffers[h->pps.sps_id]->new) {
-+        h0->sps_buffers[h->pps.sps_id]->new = 0;
-+
-+        h->current_sps_id = h->pps.sps_id;
-+        h->sps            = *h0->sps_buffers[h->pps.sps_id];
-+
-+        if ((ret = h264_set_parameter_from_sps(h)) < 0)
-+            return ret;
-+    }
- 
-     s->avctx->profile = ff_h264_get_profile(&h->sps);
-     s->avctx->level   = h->sps.level_idc;
-@@ -3811,26 +3811,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
-         case NAL_SPS:
-             init_get_bits(&s->gb, ptr, bit_length);
-             ff_h264_decode_seq_parameter_set(h);
--
--            if (s->flags& CODEC_FLAG_LOW_DELAY ||
--                (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
--                s->low_delay=1;
--
--            if(avctx->has_b_frames < 2)
--                avctx->has_b_frames= !s->low_delay;
--
--            if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
--                if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
--                    avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
--                    h->pixel_shift = h->sps.bit_depth_luma > 8;
--
--                    ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
--                    ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
--                    dsputil_init(&s->dsp, s->avctx);
--                } else {
--                    av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
--                    return -1;
--                }
-+            if (h264_set_parameter_from_sps(h) < 0) {
-+                return -1;
-             }
-             break;
-         case NAL_PPS:
-diff --git a/gst-libs/ext/libav/libavcodec/h264.h.old b/gst-libs/ext/libav/libavcodec/h264.h
-index e3cc815..b77ad98 100644
---- a/gst-libs/ext/libav/libavcodec/h264.h.old
-+++ b/gst-libs/ext/libav/libavcodec/h264.h
-@@ -202,6 +202,7 @@ typedef struct SPS{
-     int bit_depth_chroma;              ///< bit_depth_chroma_minus8 + 8
-     int residual_color_transform_flag; ///< residual_colour_transform_flag
-     int constraint_set_flags;          ///< constraint_set[0-3]_flag
-+    int new;                              ///< flag to keep track if the decoder context needs re-init due to changed SPS
- }SPS;
- 
- /**
-@@ -333,6 +334,7 @@ typedef struct H264Context{
-     int emu_edge_width;
-     int emu_edge_height;
- 
-+    unsigned current_sps_id; ///< id of the current SPS
-     SPS sps; ///< current sps
- 
-     /**
-diff --git a/gst-libs/ext/libav/libavcodec/h264_ps.c.old b/gst-libs/ext/libav/libavcodec/h264_ps.c
-index 7491807..0929098 100644
---- a/gst-libs/ext/libav/libavcodec/h264_ps.c.old
-+++ b/gst-libs/ext/libav/libavcodec/h264_ps.c
-@@ -438,10 +438,13 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
-                sps->timing_info_present_flag ? sps->time_scale : 0
-                );
-     }
-+    sps->new = 1;
- 
-     av_free(h->sps_buffers[sps_id]);
--    h->sps_buffers[sps_id]= sps;
--    h->sps = *sps;
-+    h->sps_buffers[sps_id] = sps;
-+    h->sps                 = *sps;
-+    h->current_sps_id      = sps_id;
-+
-     return 0;
- fail:
-     av_free(sps);
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch
deleted file mode 100644
index 5d45c1a..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-gst-ffmpeg: h264: skip error concealment when SPS and slices are
- mismatching
-
-Fixes out of array accesses
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 695af8eed642ff0104834495652d1ee784a4c14d)
-
-Upstream-Status: Backport
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/h264.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/libavcodec/h264.c b/libavcodec/h264.c
-index da144db..0aab4e7 100644
---- a/gst-libs/ext/libav/libavcodec/h264.c
-+++ b/gst-libs/ext/libav/libavcodec/h264.c
-@@ -2351,7 +2351,7 @@ static int field_end(H264Context *h, int in_setup)
-      * past end by one (callers fault) and resync_mb_y != 0
-      * causes problems for the first MB line, too.
-      */
--    if (!FIELD_PICTURE)
-+    if (!FIELD_PICTURE && h->current_slice && !h->sps.new)
-         ff_er_frame_end(s);
- 
-     ff_MPV_frame_end(s);
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch
deleted file mode 100644
index 1e62b50..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-gst-ffmpeg: h264_sei: Fix infinite loop.
-
-Fixsot yet fixed parts of CVE-2011-3946.
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-
-Upstream-Status: Backport 
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
----
- libavcodec/h264_sei.c |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-
-diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
-index 374e53d..80d70e5 100644
---- a/gst-libs/ext/libav/libavcodec/h264_sei.c
-+++ b/gst-libs/ext/libav/libavcodec/h264_sei.c
-@@ -169,11 +169,15 @@ int ff_h264_decode_sei(H264Context *h){
- 
-         type=0;
-         do{
-+            if (get_bits_left(&s->gb) < 8)
-+                return -1;
-             type+= show_bits(&s->gb, 8);
-         }while(get_bits(&s->gb, 8) == 255);
- 
-         size=0;
-         do{
-+            if (get_bits_left(&s->gb) < 8)
-+                return -1;
-             size+= show_bits(&s->gb, 8);
-         }while(get_bits(&s->gb, 8) == 255);
- 
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Check-init_vlc-return-codes.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Check-init_vlc-return-codes.patch
deleted file mode 100644
index e859e44..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Check-init_vlc-return-codes.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From b666debffec1fcbb19ef377635a53b9a58bca8a4 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Tue, 29 Jan 2013 18:29:41 +0100
-Subject: [PATCH] huffyuvdec: Check init_vlc() return codes.
-
-Upstream-Status: Backport
-
-Commit b666debffec1fcbb19ef377635a53b9a58bca8a4 release/1.0
-
-Prevents out of array writes
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit f67a0d115254461649470452058fa3c28c0df294)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/huffyuv.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
-index 58da789..993e524 100644
---- a/gst-libs/ext/libav/libavcodec/huffyuv.c
-+++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
-@@ -33,6 +33,7 @@
- #include "put_bits.h"
- #include "dsputil.h"
- #include "thread.h"
-+#include "libavutil/avassert.h"
- 
- #define VLC_BITS 11
- 
-@@ -287,6 +287,7 @@ static void generate_joint_tables(HYuvCo
-                     int len1 = s->len[p][u];
-                     if (len1 > limit || !len1)
-                         continue;
-+                    av_assert0(i < (1 << VLC_BITS));
-                     len[i] = len0 + len1;
-                     bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
-                     symbols[i] = (y<<8) + u;
-@@ -320,6 +321,7 @@ static void generate_joint_tables(HYuvCo
-                     int len2 = s->len[2][r&255];
-                     if (len2 > limit1 || !len2)
-                         continue;
-+                    av_assert0(i < (1 << VLC_BITS));
-                     len[i] = len0 + len1 + len2;
-                     bits[i] = (code << len2) + s->bits[2][r&255];
-                     if(s->decorrelate){
-@@ -343,6 +345,7 @@ static void generate_joint_tables(HYuvCo
- static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
-     GetBitContext gb;
-     int i;
-+    int ret;
- 
-     init_get_bits(&gb, src, length*8);
- 
-@@ -353,7 +356,9 @@ static int read_huffman_tables(HYuvConte
-             return -1;
-         }
-         free_vlc(&s->vlc[i]);
--        init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
-+        if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
-+                           s->bits[i], 4, 4, 0)) < 0)
-+            return ret;
-     }
- 
-     generate_joint_tables(s);
-@@ -365,6 +370,7 @@ static int read_old_huffman_tables(HYuvC
- #if 1
-     GetBitContext gb;
-     int i;
-+    int ret;
- 
-     init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8);
-     if(read_len_table(s->len[0], &gb)<0)
-@@ -385,7 +391,9 @@ static int read_old_huffman_tables(HYuvC
- 
-     for(i=0; i<3; i++){
-         free_vlc(&s->vlc[i]);
--        init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
-+        if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
-+                            s->bits[i], 4, 4, 0)) < 0)
-+            return ret;
-     }
- 
-     generate_joint_tables(s);
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch
deleted file mode 100644
index 94bf4b6..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From db0f7f7394e1f994ed38db043f78ed0f10bde0da Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Tue, 29 Jan 2013 19:22:33 +0100
-Subject: [PATCH] huffyuvdec: Skip len==0 cases
-
-Upstream-Status: Backport
-
-Commit db0f7f7394e1f994ed38db043f78ed0f10bde0da release/1.0
-
-Fixes vlc decoding for hypothetical files that would contain such cases.
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 0dfc01c2bbf4b71bb56201bc4a393321e15d1b31)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/huffyuv.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
-index 993e524..72ed351 100644
---- a/gst-libs/ext/libav/libavcodec/huffyuv.c
-+++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
-@@ -281,11 +281,11 @@ static void generate_joint_tables(HYuvCo
-             for(i=y=0; y<256; y++){
-                 int len0 = s->len[0][y];
-                 int limit = VLC_BITS - len0;
--                if(limit <= 0)
-+                if(limit <= 0 || !len0)
-                     continue;
-                 for(u=0; u<256; u++){
-                     int len1 = s->len[p][u];
--                    if(len1 > limit)
-+                    if (len1 > limit || !len1)
-                         continue;
-                     len[i] = len0 + len1;
-                     bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
-@@ -308,17 +308,17 @@ static void generate_joint_tables(HYuvCo
-         for(i=0, g=-16; g<16; g++){
-             int len0 = s->len[p0][g&255];
-             int limit0 = VLC_BITS - len0;
--            if(limit0 < 2)
-+            if (limit0 < 2 || !len0)
-                 continue;
-             for(b=-16; b<16; b++){
-                 int len1 = s->len[p1][b&255];
-                 int limit1 = limit0 - len1;
--                if(limit1 < 1)
-+                if (limit1 < 1 || !len1)
-                     continue;
-                 code = (s->bits[p0][g&255] << len1) + s->bits[p1][b&255];
-                 for(r=-16; r<16; r++){
-                     int len2 = s->len[2][r&255];
--                    if(len2 > limit1)
-+                    if (len2 > limit1 || !len2)
-                         continue;
-                     len[i] = len0 + len1 + len2;
-                     bits[i] = (code << len2) + s->bits[2][r&255];
--- 
-1.8.5.2.233.g932f7e4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch
deleted file mode 100644
index ea4aa22..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-gst-ffmpeg: lavf: compute probe buffer size more reliably.
-
-The previous code computes the offset by reversing the growth
-of the allocated buffer size: it is complex and did lead to
-inconsistencies when the size limit is reached.
-
-Fix trac ticket #1991.
-(cherry picked from commit 03847eb8259291b4ff1bd840bd779d0699d71f96)
-
-Conflicts:
-	libavformat/utils.c
-
-Upstream-Status: Backport
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
----
- libavformat/utils.c |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/utils.c b/libavformat/utils.c
-index 7940037..be73c4a 100644
---- a/gst-libs/ext/libav/libavformat/utils.c
-+++ b/gst-libs/ext/libav/libavformat/utils.c
-@@ -459,7 +459,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
- {
-     AVProbeData pd = { filename ? filename : "", NULL, -offset };
-     unsigned char *buf = NULL;
--    int ret = 0, probe_size;
-+    int ret = 0, probe_size, buf_offset = 0;
- 
-     if (!max_probe_size) {
-         max_probe_size = PROBE_BUF_MAX;
-@@ -499,7 +499,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
-             score = 0;
-             ret = 0;            /* error was end of file, nothing read */
-         }
--        pd.buf_size += ret;
-+        pd.buf_size = buf_offset += ret;
-         pd.buf = &buf[offset];
- 
-         memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-mjpegdec-check-SE.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-mjpegdec-check-SE.patch
deleted file mode 100644
index d90bafa..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-mjpegdec-check-SE.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1f41cffe1e3e79620f587545bdfcbd7e6e68ed29 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Sun, 11 Nov 2012 00:01:24 +0100
-Subject: [PATCH] mjpegdec: check SE.
-
-Upstream-Status: Backport
-
-Commit 1f41cffe1e3e79620f587545bdfcbd7e6e68ed29 release/1.1
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/mjpegdec.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
-index 6b5266d..0a71a6f 100644
---- a/gst-libs/ext/libav/libavcodec/mjpegdec.c
-+++ b/gst-libs/ext/libav/libavcodec/mjpegdec.c
-@@ -905,6 +905,11 @@ static int mjpeg_decode_scan_progressive
-     int16_t *quant_matrix = s->quant_matrixes[ s->quant_index[c] ];
-     GetBitContext mb_bitmask_gb;
- 
-+    if (se > 63) {
-+        av_log(s->avctx, AV_LOG_ERROR, "SE %d is too large\n", se);
-+        return AVERROR_INVALIDDATA;
-+    }
-+
-     if (mb_bitmask) {
-         init_get_bits(&mb_bitmask_gb, mb_bitmask, s->mb_width*s->mb_height);
-     }
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch
deleted file mode 100644
index 1041347..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 28bf685bfc6d0c744369cdf367f61a78d80d0b01 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Thu, 15 Nov 2012 16:41:28 +0100
-Subject: [PATCH] pgssubdec: check RLE size before copying. Fix out of array
- accesses
-
-Upstream-Status: Backport
-
-Commit 28bf685bfc6d0c744369cdf367f61a78d80d0b01 release/1.1
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit c0d68be555f5858703383040e04fcd6529777061)
----
- libavcodec/pgssubdec.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
-index 728f178..26a3c2a 100644
---- a/gst-libs/ext/libav/libavcodec/pgssubdec.c
-+++ b/gst-libs/ext/libav/libavcodec/pgssubdec.c
-@@ -202,6 +202,11 @@ static int parse_picture_segment(AVCodec
-         return -1;
-     }
- 
-+    if (buf_size > rle_bitmap_len) {
-+        av_log(avctx, AV_LOG_ERROR, "too much RLE data\n");
-+        return AVERROR_INVALIDDATA;
-+    }
-+
-     ctx->picture.w = width;
-     ctx->picture.h = height;
- 
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch
deleted file mode 100644
index 1e5fb7d..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-gst-ffmpeg: pngdec/filter: dont access out of array elements at the end
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-
-Upstream-Status: Backport 
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/pngdec.c |   12 ++++--------
- 1 files changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
-index 97c0ad1..193e35e 100644
---- a/gst-libs/ext/libav/libavcodec/pngdec.c
-+++ b/gst-libs/ext/libav/libavcodec/pngdec.c
-@@ -190,7 +190,7 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
-     if(bpp >= 2) g = dst[1];\
-     if(bpp >= 3) b = dst[2];\
-     if(bpp >= 4) a = dst[3];\
--    for(; i < size; i+=bpp) {\
-+    for(; i <= size - bpp; i+=bpp) {\
-         dst[i+0] = r = op(r, src[i+0], last[i+0]);\
-         if(bpp == 1) continue;\
-         dst[i+1] = g = op(g, src[i+1], last[i+1]);\
-@@ -206,13 +206,9 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
-     else if(bpp == 2) UNROLL1(2, op)\
-     else if(bpp == 3) UNROLL1(3, op)\
-     else if(bpp == 4) UNROLL1(4, op)\
--    else {\
--        for (; i < size; i += bpp) {\
--            int j;\
--            for (j = 0; j < bpp; j++)\
--                dst[i+j] = op(dst[i+j-bpp], src[i+j], last[i+j]);\
--        }\
--    }
-+    for (; i < size; i++) {\
-+        dst[i] = op(dst[i-bpp], src[i], last[i]);\
-+    }\
- 
- /* NOTE: 'dst' can be equal to 'last' */
- static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch
deleted file mode 100644
index 8c94232..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-gst-ffmpeg: qdm2: check array index before use, fix out of array
- accesses
-
-Upstream-Status: Backport 
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/qdm2.c |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
-index 4cf4b2f..1dfb8d5 100644
---- a/gst-libs/ext/libav/libavcodec/qdm2.c
-+++ b/gst-libs/ext/libav/libavcodec/qdm2.c
-@@ -1257,6 +1257,11 @@ static void qdm2_decode_super_block (QDM2Context *q)
-     for (i = 0; packet_bytes > 0; i++) {
-         int j;
- 
-+        if (i>=FF_ARRAY_ELEMS(q->sub_packet_list_A)) {
-+            SAMPLES_NEEDED_2("too many packet bytes");
-+            return;
-+        }
-+
-         q->sub_packet_list_A[i].next = NULL;
- 
-         if (i > 0) {
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch
deleted file mode 100644
index 43ffc03..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-gst-ffmpeg: qdm2dec: fix buffer overflow. Fixes NGS00144
-
-This also adds a few lines of code from master that are needed for this fix.
-
-Thanks to Phillip for suggestions to improve the patch.
-Found-by: Phillip Langlois
-
-Upstream-Status: Backport 
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/qdm2.c |    9 +++++++--
- 1 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
-index 3aa9e5b..e000df8 100644
---- a/gst-libs/ext/libav/libavcodec/qdm2.c
-+++ b/gst-libs/ext/libav/libavcodec/qdm2.c
-@@ -76,6 +76,7 @@ do { \
- #define SAMPLES_NEEDED_2(why) \
-      av_log (NULL,AV_LOG_INFO,"This file triggers some missing code. Please contact the developers.\nPosition: %s\n",why);
- 
-+#define QDM2_MAX_FRAME_SIZE 512
- 
- typedef int8_t sb_int8_array[2][30][64];
- 
-@@ -168,7 +169,7 @@ typedef struct {
-     /// I/O data
-     const uint8_t *compressed_data;
-     int compressed_size;
--    float output_buffer[1024];
-+    float output_buffer[QDM2_MAX_FRAME_SIZE * MPA_MAX_CHANNELS * 2];
- 
-     /// Synthesis filter
-     MPADSPContext mpadsp;
-@@ -1819,6 +1820,9 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
-     s->group_order = av_log2(s->group_size) + 1;
-     s->frame_size = s->group_size / 16; // 16 iterations per super block
- 
-+    if (s->frame_size > QDM2_MAX_FRAME_SIZE)
-+        return AVERROR_INVALIDDATA;
-+
-     s->sub_sampling = s->fft_order - 7;
-     s->frequency_range = 255 / (1 << (2 - s->sub_sampling));
- 
-@@ -1887,6 +1891,9 @@ static int qdm2_decode (QDM2Context *q, const uint8_t *in, int16_t *out)
-     int ch, i;
-     const int frame_size = (q->frame_size * q->channels);
- 
-+    if((unsigned)frame_size > FF_ARRAY_ELEMS(q->output_buffer)/2)
-+        return -1;
-+
-     /* select input buffer */
-     q->compressed_data = in;
-     q->compressed_size = q->checksum_size;
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-roqvideodec-check-dimensions-validity.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-roqvideodec-check-dimensions-validity.patch
deleted file mode 100644
index 7e58afc..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-roqvideodec-check-dimensions-validity.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 391e0fc6c90ced6656b74f50f3a487b6dc76ea63 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Thu, 29 Nov 2012 15:18:17 +0100
-Subject: [PATCH] roqvideodec: check dimensions validity
-
-Upstream-Status: Backport
-
-Commit 391e0fc6c90ced6656b74f50f3a487b6dc76ea63 release/0.7
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit 3ae610451170cd5a28b33950006ff0bd23036845)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/roqvideodec.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
-index f0977f6..4e34231 100644
---- a/gst-libs/ext/libav/libavcodec/roqvideodec.c
-+++ b/gst-libs/ext/libav/libavcodec/roqvideodec.c
-@@ -157,6 +157,12 @@ static av_cold int roq_decode_init(AVCodecContext *avctx)
-     RoqContext *s = avctx->priv_data;
- 
-     s->avctx = avctx;
-+
-+    if (avctx->width%16 || avctx->height%16) {
-+         av_log_ask_for_sample(avctx, "dimensions not being a multiple of 16 are unsupported\n");
-+         return AVERROR_PATCHWELCOME;
-+    }
-+
-     s->width = avctx->width;
-     s->height = avctx->height;
-     avcodec_get_frame_defaults(&s->frames[0]);
--- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch
deleted file mode 100644
index 15b1614..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-gst-ffmpeg: smackerdec: Check that the last indexes are within the
- table.
-
-Fixes CVE-2011-3944
-
-Upstream-Status: Backport 
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/smacker.c |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
-index 30f99b4..2a8bae8 100644
---- a/gst-libs/ext/libav/libavcodec/smacker.c
-+++ b/gst-libs/ext/libav/libavcodec/smacker.c
-@@ -259,6 +259,11 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
-     if(ctx.last[0] == -1) ctx.last[0] = huff.current++;
-     if(ctx.last[1] == -1) ctx.last[1] = huff.current++;
-     if(ctx.last[2] == -1) ctx.last[2] = huff.current++;
-+    if(huff.current > huff.length){
-+        ctx.last[0] = ctx.last[1] = ctx.last[2] = 1;
-+        av_log(smk->avctx, AV_LOG_ERROR, "bigtree damaged\n");
-+        return -1;
-+    }
- 
-     *recodes = huff.values;
- 
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch
deleted file mode 100644
index a1989cf..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-gst-ffmpeg: vp3: Copy all 3 frames for thread updates.
-
-This fixes a double release of the current frame on deinit.
-Fixes CVE-2011-3934
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-
-Upstream-Status: Backport
-
-Signed-off-by: Yue.Tao <yue.tao@windriver.com>
-
----
- libavcodec/vp3.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
-index 738ae9f..b5daafc 100644
---- a/gst-libs/ext/libav/libavcodec/vp3.c
-+++ b/gst-libs/ext/libav/libavcodec/vp3.c
-@@ -1859,7 +1859,7 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
-         ||s->width != s1->width
-         ||s->height!= s1->height) {
-         if (s != s1)
--            copy_fields(s, s1, golden_frame, current_frame);
-+            copy_fields(s, s1, golden_frame, keyframe);
-         return -1;
-     }
- 
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch
deleted file mode 100644
index e83d8f4..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-gst-ffmpeg: vp3: fix oob read for negative tokens and memleaks on error.
-
-Upstream-Status: Backport 
-
-Signed-off-by: Yue.Tao <yue.tao@windriver.com>
-
----
- libavcodec/vp3.c |   59 +++++++++++++++++++++++++++++++++++++++++------------
- 1 files changed, 45 insertions(+), 14 deletions(-)
-
-diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
-index 36715bb..ce14e63 100644
---- a/gst-libs/ext/libav/libavcodec/vp3.c
-+++ b/gst-libs/ext/libav/libavcodec/vp3.c
-@@ -45,6 +45,7 @@
- #define FRAGMENT_PIXELS 8
- 
- static av_cold int vp3_decode_end(AVCodecContext *avctx);
-+static void vp3_decode_flush(AVCodecContext *avctx);
- 
- //FIXME split things out into their own arrays
- typedef struct Vp3Fragment {
-@@ -890,7 +891,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
-             /* decode a VLC into a token */
-             token = get_vlc2(gb, vlc_table, 11, 3);
-             /* use the token to get a zero run, a coefficient, and an eob run */
--            if (token <= 6) {
-+            if ((unsigned) token <= 6U) {
-                 eob_run = eob_run_base[token];
-                 if (eob_run_get_bits[token])
-                     eob_run += get_bits(gb, eob_run_get_bits[token]);
-@@ -908,7 +909,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
-                     coeff_i        += eob_run;
-                     eob_run = 0;
-                 }
--            } else {
-+            } else if (token >= 0) {
-                 bits_to_get = coeff_get_bits[token];
-                 if (bits_to_get)
-                     bits_to_get = get_bits(gb, bits_to_get);
-@@ -942,6 +943,10 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
-                 for (i = coeff_index+1; i <= coeff_index+zero_run; i++)
-                     s->num_coded_frags[plane][i]--;
-                 coeff_i++;
-+            } else {
-+                av_log(s->avctx, AV_LOG_ERROR,
-+                       "Invalid token %d\n", token);
-+                return -1;
-             }
-     }
- 
-@@ -991,6 +996,8 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
-     /* unpack the Y plane DC coefficients */
-     residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_y_table], 0,
-         0, residual_eob_run);
-+    if (residual_eob_run < 0)
-+        return residual_eob_run;
- 
-     /* reverse prediction of the Y-plane DC coefficients */
-     reverse_dc_prediction(s, 0, s->fragment_width[0], s->fragment_height[0]);
-@@ -998,8 +1005,12 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
-     /* unpack the C plane DC coefficients */
-     residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
-         1, residual_eob_run);
-+    if (residual_eob_run < 0)
-+        return residual_eob_run;
-     residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
-         2, residual_eob_run);
-+    if (residual_eob_run < 0)
-+        return residual_eob_run;
- 
-     /* reverse prediction of the C-plane DC coefficients */
-     if (!(s->avctx->flags & CODEC_FLAG_GRAY))
-@@ -1036,11 +1047,17 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
-     for (i = 1; i <= 63; i++) {
-             residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,
-                 0, residual_eob_run);
-+            if (residual_eob_run < 0)
-+                return residual_eob_run;
- 
-             residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
-                 1, residual_eob_run);
-+            if (residual_eob_run < 0)
-+                return residual_eob_run;
-             residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
-                 2, residual_eob_run);
-+            if (residual_eob_run < 0)
-+                return residual_eob_run;
-     }
- 
-     return 0;
-@@ -1777,10 +1794,15 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
-     Vp3DecodeContext *s = dst->priv_data, *s1 = src->priv_data;
-     int qps_changed = 0, i, err;
- 
-+#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
-+
-     if (!s1->current_frame.data[0]
-         ||s->width != s1->width
--        ||s->height!= s1->height)
-+        ||s->height!= s1->height) {
-+        if (s != s1)
-+            copy_fields(s, s1, golden_frame, current_frame);
-         return -1;
-+    }
- 
-     if (s != s1) {
-         // init tables if the first frame hasn't been decoded
-@@ -1796,8 +1818,6 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
-             memcpy(s->motion_val[1], s1->motion_val[1], c_fragment_count * sizeof(*s->motion_val[1]));
-         }
- 
--#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
--
-         // copy previous frame data
-         copy_fields(s, s1, golden_frame, dsp);
- 
-@@ -1987,9 +2007,6 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
-     Vp3DecodeContext *s = avctx->priv_data;
-     int i;
- 
--    if (avctx->is_copy && !s->current_frame.data[0])
--        return 0;
--
-     av_free(s->superblock_coding);
-     av_free(s->all_fragments);
-     av_free(s->coded_fragment_list[0]);
-@@ -2016,12 +2033,7 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
-     free_vlc(&s->motion_vector_vlc);
- 
-     /* release all frames */
--    if (s->golden_frame.data[0])
--        ff_thread_release_buffer(avctx, &s->golden_frame);
--    if (s->last_frame.data[0] && s->last_frame.type != FF_BUFFER_TYPE_COPY)
--        ff_thread_release_buffer(avctx, &s->last_frame);
--    /* no need to release the current_frame since it will always be pointing
--     * to the same frame as either the golden or last frame */
-+    vp3_decode_flush(avctx);
- 
-     return 0;
- }
-@@ -2341,6 +2353,23 @@ static void vp3_decode_flush(AVCodecContext *avctx)
-         ff_thread_release_buffer(avctx, &s->current_frame);
- }
- 
-+static int vp3_init_thread_copy(AVCodecContext *avctx)
-+{
-+    Vp3DecodeContext *s = avctx->priv_data;
-+
-+    s->superblock_coding      = NULL;
-+    s->all_fragments          = NULL;
-+    s->coded_fragment_list[0] = NULL;
-+    s->dct_tokens_base        = NULL;
-+    s->superblock_fragments   = NULL;
-+    s->macroblock_coding      = NULL;
-+    s->motion_val[0]          = NULL;
-+    s->motion_val[1]          = NULL;
-+    s->edge_emu_buffer        = NULL;
-+
-+    return 0;
-+}
-+
- AVCodec ff_theora_decoder = {
-     .name           = "theora",
-     .type           = AVMEDIA_TYPE_VIDEO,
-@@ -2352,6 +2381,7 @@ AVCodec ff_theora_decoder = {
-     .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
-     .flush = vp3_decode_flush,
-     .long_name = NULL_IF_CONFIG_SMALL("Theora"),
-+    .init_thread_copy      = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
-     .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
- };
- #endif
-@@ -2367,5 +2397,6 @@ AVCodec ff_vp3_decoder = {
-     .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
-     .flush = vp3_decode_flush,
-     .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
-+    .init_thread_copy      = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
-     .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
- };
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch
deleted file mode 100644
index 7e4f682..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 2cac35086c9e103fa98960c546d5017e7363803a Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 25 Jan 2013 06:11:59 +0100
-Subject: [PATCH] vqavideo: check chunk sizes before reading chunks
-
-Upstream-Status: Backport
-
-Commit 2cac35086c9e103fa98960c546d5017e7363803a release/0.7
-
-Fixes out of array writes
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
----
- libavcodec/vqavideo.c |   10 ++++++++++
- 1 files changed, 10 insertions(+), 0 deletions(-)
-
-diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
-index d1eab5b..6e1ce6c 100644
---- a/gst-libs/ext/libav/libavcodec/vqavideo.c
-+++ b/gst-libs/ext/libav/libavcodec/vqavideo.c
-@@ -527,6 +527,11 @@ static void vqa_decode_chunk(VqaContext *s)
-         chunk_size = AV_RB32(&s->buf[cbp0_chunk + 4]);
-         cbp0_chunk += CHUNK_PREAMBLE_SIZE;
- 
-+        if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
-+            av_log(s->avctx, AV_LOG_ERROR, "cbp0 chunk too large (0x%X bytes)\n", chunk_size);
-+            return AVERROR_INVALIDDATA;
-+        }
-+
-         /* accumulate partial codebook */
-         memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
-             &s->buf[cbp0_chunk], chunk_size);
-@@ -550,6 +555,11 @@ static void vqa_decode_chunk(VqaContext *s)
-         chunk_size = AV_RB32(&s->buf[cbpz_chunk + 4]);
-         cbpz_chunk += CHUNK_PREAMBLE_SIZE;
- 
-+        if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
-+            av_log(s->avctx, AV_LOG_ERROR, "cbpz chunk too large (0x%X bytes)\n", chunk_size);
-+            return AVERROR_INVALIDDATA;
-+        }
-+
-         /* accumulate partial codebook */
-         memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
-             &s->buf[cbpz_chunk], chunk_size);
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch
deleted file mode 100644
index c8bafd5..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 6043c431c97d55173f339fafbd033d3c0642e2e9 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 3 Oct 2014 01:50:27 +0200
-Subject: [PATCH 2/2] avcodec/mjpegdec: check bits per pixel for changes
- similar to dimensions
-
-Upstream-Status: Backport
-
-Fixes out of array accesses
-Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-
-Conflicts:
-	libavcodec/mjpegdec.c
----
- libavcodec/mjpegdec.c | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/gst-libs/ext/libav/libavcodec/mjpegdec.c b/gst-libs/ext/libav/libavcodec/mjpegdec.c
-index 84343c0..c0137d8 100644
---- a/gst-libs/ext/libav/libavcodec/mjpegdec.c
-+++ b/gst-libs/ext/libav/libavcodec/mjpegdec.c
-@@ -210,16 +210,16 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
- 
- int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
- {
--    int len, nb_components, i, width, height, pix_fmt_id;
-+    int len, nb_components, i, bits, width, height, pix_fmt_id;
- 
-     /* XXX: verify len field validity */
-     len = get_bits(&s->gb, 16);
--    s->bits= get_bits(&s->gb, 8);
-+    bits= get_bits(&s->gb, 8);
- 
--    if(s->pegasus_rct) s->bits=9;
--    if(s->bits==9 && !s->pegasus_rct) s->rct=1;    //FIXME ugly
-+    if(s->pegasus_rct) bits=9;
-+    if(bits==9 && !s->pegasus_rct) s->rct=1;    //FIXME ugly
- 
--    if (s->bits != 8 && !s->lossless){
-+    if (bits != 8 && !s->lossless){
-         av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n");
-         return -1;
-     }
-@@ -239,7 +239,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
-     if (nb_components <= 0 ||
-         nb_components > MAX_COMPONENTS)
-         return -1;
--    if (s->ls && !(s->bits <= 8 || nb_components == 1)){
-+    if (s->ls && !(bits <= 8 || nb_components == 1)){
-         av_log(s->avctx, AV_LOG_ERROR, "only <= 8 bits/component or 16-bit gray accepted for JPEG-LS\n");
-         return -1;
-     }
-@@ -272,10 +272,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
- 
-     /* if different size, realloc/alloc picture */
-     /* XXX: also check h_count and v_count */
--    if (width != s->width || height != s->height) {
-+    if (width != s->width || height != s->height || bits != s->bits) {
-         av_freep(&s->qscale_table);
- 
-         s->width = width;
-+        s->bits= bits;
-         s->height = height;
-         s->interlaced = 0;
- 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/configure-fix.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/configure-fix.patch
deleted file mode 100644
index 9ef6f7c..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/configure-fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Disable yasm for libav when --disable-yasm
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Shane Wang <shane.wang@intel.com>
-
-diff -r f2f8f74c6e30 configure.ac
---- a/configure.ac	Thu Dec 22 23:56:09 2011 +0800
-+++ b/configure.ac	Thu Dec 22 23:57:37 2011 +0800
-@@ -325,6 +325,12 @@
-         --enable-gpl"
-   fi
- 
-+ AC_ARG_ENABLE(yasm,
-+              [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])])
-+  if test "x$enable_yasm" = "xno"; then
-+    embffmpeg_configure_args="$embffmpeg_configure_args --disable-yasm"
-+  fi
-+
-   # if we are cross-compiling, tell ffmpeg so
-   target_os=`echo $host_os | sed 's/-gnu//'`
-   if test "x$cross_compiling" = xyes; then
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch
deleted file mode 100644
index 3c8d8e3..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-gst-ffmpeg: Security Advisory - ffmpeg - CVE-2013-0855
-
-Upstream-Status: Backport 
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
-diff --git a/gst-libs/ext/libav/libavcodec/alac.c.old b/gst-libs/ext/libav/libavcodec/alac.c
-index 2a0df8c..bcbd56d 100644
---- a/gst-libs/ext/libav/libavcodec/alac.c.old
-+++ b/gst-libs/ext/libav/libavcodec/alac.c
-@@ -87,18 +87,44 @@ typedef struct {
-     int wasted_bits;
- } ALACContext;
- 
--static void allocate_buffers(ALACContext *alac)
-+static av_cold int alac_decode_close(AVCodecContext *avctx)
-+{
-+    ALACContext *alac = avctx->priv_data;
-+
-+    int chan;
-+    for (chan = 0; chan < MAX_CHANNELS; chan++) {
-+        av_freep(&alac->predicterror_buffer[chan]);
-+        av_freep(&alac->outputsamples_buffer[chan]);
-+        av_freep(&alac->wasted_bits_buffer[chan]);
-+    }
-+
-+    return 0;
-+}
-+
-+static int allocate_buffers(ALACContext *alac)
- {
-     int chan;
-+    int buf_size;
-+
-+    if (alac->setinfo_max_samples_per_frame > INT_MAX / sizeof(int32_t))
-+        goto buf_alloc_fail;
-+    buf_size = alac->setinfo_max_samples_per_frame * sizeof(int32_t);
-+
-     for (chan = 0; chan < MAX_CHANNELS; chan++) {
--        alac->predicterror_buffer[chan] =
--            av_malloc(alac->setinfo_max_samples_per_frame * 4);
- 
--        alac->outputsamples_buffer[chan] =
--            av_malloc(alac->setinfo_max_samples_per_frame * 4);
-+        FF_ALLOC_OR_GOTO(alac->avctx, alac->predicterror_buffer[chan],
-+                         buf_size, buf_alloc_fail);
- 
--        alac->wasted_bits_buffer[chan] = av_malloc(alac->setinfo_max_samples_per_frame * 4);
-+        FF_ALLOC_OR_GOTO(alac->avctx, alac->outputsamples_buffer[chan],
-+                         buf_size, buf_alloc_fail);
-+
-+        FF_ALLOC_OR_GOTO(alac->avctx, alac->wasted_bits_buffer[chan],
-+                         buf_size, buf_alloc_fail);
-     }
-+    return 0;
-+buf_alloc_fail:
-+    alac_decode_close(alac->avctx);
-+    return AVERROR(ENOMEM);
- }
- 
- static int alac_set_info(ALACContext *alac)
-@@ -131,8 +157,6 @@ static int alac_set_info(ALACContext *alac)
-     bytestream_get_be32(&ptr);      /* bitrate ? */
-     bytestream_get_be32(&ptr);      /* samplerate */
- 
--    allocate_buffers(alac);
--
-     return 0;
- }
- 
-@@ -659,6 +683,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
- 
- static av_cold int alac_decode_init(AVCodecContext * avctx)
- {
-+    int ret;
-     ALACContext *alac = avctx->priv_data;
-     alac->avctx = avctx;
-     alac->numchannels = alac->avctx->channels;
-@@ -674,18 +699,9 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
-         return -1;
-     }
- 
--    return 0;
--}
--
--static av_cold int alac_decode_close(AVCodecContext *avctx)
--{
--    ALACContext *alac = avctx->priv_data;
--
--    int chan;
--    for (chan = 0; chan < MAX_CHANNELS; chan++) {
--        av_freep(&alac->predicterror_buffer[chan]);
--        av_freep(&alac->outputsamples_buffer[chan]);
--        av_freep(&alac->wasted_bits_buffer[chan]);
-+    if ((ret = allocate_buffers(alac)) < 0) {
-+        av_log(avctx, AV_LOG_ERROR, "Error allocating buffers\n");
-+        return ret;
-     }
- 
-     return 0;
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-3674.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-3674.patch
deleted file mode 100644
index aa385f5..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-3674.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-avcodec/cdgraphics: check buffer size before use
-
-Fixes out of array accesses
-
-Backported from:http://git.videolan.org/?p=ffmpeg.git;a=commit;h=ad002e1a13a8df934bd6cb2c84175a4780ab8942
-
-Upstream-Status: Backport
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
-
-diff -urpN a/gst-libs/ext/libav/libavcodec/cdgraphics.c b/gst-libs/ext/libav/libavcodec/cdgraphics.c
---- a/gst-libs/ext/libav/libavcodec/cdgraphics.c	2013-07-18 13:17:08.399876575 +0800
-+++ b/gst-libs/ext/libav/libavcodec/cdgraphics.c	2013-07-18 13:18:05.880502267 +0800
-@@ -291,7 +291,9 @@ static int cdg_decode_frame(AVCodecConte
-     inst    = bytestream_get_byte(&buf);
-     inst    &= CDG_MASK;
-     buf += 2;  /// skipping 2 unneeded bytes
--    bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
-+
-+    if (buf_size > CDG_HEADER_SIZE)
-+        bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
- 
-     if ((command & CDG_MASK) == CDG_COMMAND) {
-         switch (inst) {
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2011-4352.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2011-4352.patch
deleted file mode 100644
index 90f3fd0..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2011-4352.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 8b94df0f2047e9728cb872adc9e64557b7a5152f Mon Sep 17 00:00:00 2001
-From: Reinhard Tartler <siretart@tauware.de>
-Date: Sun, 4 Dec 2011 10:10:33 +0100
-Subject: [PATCH] vp3dec: Check coefficient index in vp3_dequant()
-
-Based on a patch by Michael Niedermayer <michaelni@gmx.at>
-
-Fixes NGS00145, CVE-2011-4352
-
-Found-by: Phillip Langlois
-Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-
-
-Upstream-Status: Backport
-
-http://git.videolan.org/?p=ffmpeg.git;a=commit;h=8b94df0f2047e9728cb872adc9e64557b7a5152f
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- libavcodec/vp3.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
-index 51ab048..f44d084 100644
---- a/gst-libs/ext/libav/libavcodec/vp3.c
-+++ b/gst-libs/ext/libav/libavcodec/vp3.c
-@@ -1363,6 +1363,10 @@ static inline int vp3_dequant(Vp3DecodeContext *s, Vp3Fragment *frag,
-         case 1: // zero run
-             s->dct_tokens[plane][i]++;
-             i += (token >> 2) & 0x7f;
-+            if (i > 63) {
-+                av_log(s->avctx, AV_LOG_ERROR, "Coefficient index overflow\n");
-+                return i;
-+            }
-             block[perm[i]] = (token >> 9) * dequantizer[perm[i]];
-             i++;
-             break;
-@@ -1566,7 +1570,10 @@ static void render_slice(Vp3DecodeContext *s, int slice)
-                     /* invert DCT and place (or add) in final output */
- 
-                     if (s->all_fragments[i].coding_method == MODE_INTRA) {
--                        vp3_dequant(s, s->all_fragments + i, plane, 0, block);
-+                        int index;
-+                        index = vp3_dequant(s, s->all_fragments + i, plane, 0, block);
-+                        if (index > 63)
-+                            continue;
-                         if(s->avctx->idct_algo!=FF_IDCT_VP3)
-                             block[0] += 128<<3;
-                         s->dsp.idct_put(
-@@ -1574,7 +1581,10 @@ static void render_slice(Vp3DecodeContext *s, int slice)
-                             stride,
-                             block);
-                     } else {
--                        if (vp3_dequant(s, s->all_fragments + i, plane, 1, block)) {
-+                        int index = vp3_dequant(s, s->all_fragments + i, plane, 1, block);
-+                        if (index > 63)
-+                            continue;
-+                        if (index > 0) {
-                         s->dsp.idct_add(
-                             output_plane + first_pixel,
-                             stride,
--- 
-2.1.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-7933.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-7933.patch
deleted file mode 100644
index 3c537c7..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-7933.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 2266b8bc3370856d874334ba62b337ce4f1eb255 Mon Sep 17 00:00:00 2001
-From: Kai Kang <kai.kang@windriver.com>
-Date: Wed, 13 May 2015 16:46:06 +0800
-Subject: [PATCH 2/2] gst-ffmpeg: fix CVE-2014-7933
-
-Upstream-Status: Backport
-
-http://git.videolan.org/?p=ffmpeg.git;a=commit;h=33301f00
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- gst-libs/ext/libav/libavformat/matroskadec.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/gst-libs/ext/libav/libavformat/matroskadec.c b/gst-libs/ext/libav/libavformat/matroskadec.c
-index 59dce4f..e5f5fc1 100644
---- a/gst-libs/ext/libav/libavformat/matroskadec.c
-+++ b/gst-libs/ext/libav/libavformat/matroskadec.c
-@@ -1916,7 +1916,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
-                               int64_t timestamp, int flags)
- {
-     MatroskaDemuxContext *matroska = s->priv_data;
--    MatroskaTrack *tracks = matroska->tracks.elem;
-+    MatroskaTrack *tracks = NULL;
-     AVStream *st = s->streams[stream_index];
-     int i, index, index_sub, index_min;
- 
-@@ -1939,6 +1939,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
-         return 0;
- 
-     index_min = index;
-+    tracks = matroska->tracks.elem;
-     for (i=0; i < matroska->tracks.nb_elem; i++) {
-         tracks[i].audio.pkt_cnt = 0;
-         tracks[i].audio.sub_packet_cnt = 0;
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8542.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8542.patch
deleted file mode 100644
index ca47c81..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8542.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 105654e376a736d243aef4a1d121abebce912e6b Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 3 Oct 2014 04:30:58 +0200
-Subject: [PATCH] avcodec/utils: Add case for jv to
- avcodec_align_dimensions2()
-
-(Upstream commit 105654e376a736d243aef4a1d121abebce912e6b)
-
-Fixes out of array accesses
-Fixes: asan_heap-oob_12304aa_8_asan_heap-oob_4da4f3_300_intro.jv
-
-Upstream-Status: Backport
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/utils.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index d4f5532..c2c5579 100644
---- a/gst-libs/ext/libav/libavcodec/utils.c
-+++ b/gst-libs/ext/libav/libavcodec/utils.c
-@@ -173,6 +173,10 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int l
-             w_align=4;
-             h_align=4;
-         }
-+        if (s->codec_id == CODEC_ID_JV){
-+            w_align = 8;
-+            h_align = 8;
-+        }
-         break;
-     case PIX_FMT_BGR24:
-         if((s->codec_id == CODEC_ID_MSZH) || (s->codec_id == CODEC_ID_ZLIB)){
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8543.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8543.patch
deleted file mode 100644
index b65e55f..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8543.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 3 Oct 2014 14:45:04 +0200
-Subject: [PATCH] avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks
-
-(Upstream commit 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e)
-
-Fixes out of array access
-Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm
-
-Upstream-Status: Backport
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/mmvideo.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
-index 026d463..9ff6393 100644
---- a/gst-libs/ext/libav/libavcodec/mmvideo.c
-+++ b/gst-libs/ext/libav/libavcodec/mmvideo.c
-@@ -104,7 +104,7 @@ static void mm_decode_intra(MmContext * s, int half_horiz, int half_vert, const
- 
-         if (color) {
-             memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
--            if (half_vert)
-+            if (half_vert && y + half_vert < s->avctx->height)
-                 memset(s->frame.data[0] + (y+1)*s->frame.linesize[0] + x, color, run_length);
-         }
-         x+= run_length;
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8544.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8544.patch
deleted file mode 100644
index a124e3a..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8544.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 3 Oct 2014 16:08:32 +0200
-Subject: [PATCH] avcodec/tiff: more completely check bpp/bppcount
-
-(Upstream commit e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5)
-
-Fixes pixel format selection
-Fixes out of array accesses
-Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif
-
-Upstream-Status: Backport
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/tiff.c |   13 ++++++++++---
- 1 file changed, 10 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
-index 6e2096f..0870e31 100644
---- a/gst-libs/ext/libav/libavcodec/tiff.c
-+++ b/gst-libs/ext/libav/libavcodec/tiff.c
-@@ -324,11 +324,11 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
-         s->height = value;
-         break;
-     case TIFF_BPP:
--        s->bppcount = count;
--        if(count > 4){
--            av_log(s->avctx, AV_LOG_ERROR, "This format is not supported (bpp=%d, %d components)\n", s->bpp, count);
-+        if(count > 4U){
-+            av_log(s->avctx, AV_LOG_ERROR, "This format is not supported (bpp=%d, %d components)\n", value, count);
-             return -1;
-         }
-+        s->bppcount = count;
-         if(count == 1) s->bpp = value;
-         else{
-             switch(type){
-@@ -344,6 +344,13 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
-                 s->bpp = -1;
-             }
-         }
-+        if (s->bpp > 64U) {
-+            av_log(s->avctx, AV_LOG_ERROR,
-+                   "This format is not supported (bpp=%d, %d components)\n",
-+                   s->bpp, count);
-+            s->bpp = 0;
-+            return AVERROR_INVALIDDATA;
-+        }
-         break;
-     case TIFF_SAMPLES_PER_PIXEL:
-         if (count != 1) {
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8545.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8545.patch
deleted file mode 100644
index 29d5f77..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8545.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 3 Oct 2014 17:35:58 +0200
-Subject: [PATCH] avcodec/pngdec: Check bits per pixel before setting
- monoblack pixel format
-
-(Upstream commit 3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6)
-
-Fixes out of array accesses
-Fixes: asan_heap-oob_14dbfcf_4_asan_heap-oob_1ce5767_179_add_method_small.png
-
-Upstream-Status: Backport
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/pngdec.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
-index da91aab..f3603b3 100644
---- a/gst-libs/ext/libav/libavcodec/pngdec.c
-+++ b/gst-libs/ext/libav/libavcodec/pngdec.c
-@@ -481,7 +481,7 @@ static int decode_frame(AVCodecContext *avctx,
-                 } else if (s->bit_depth == 16 &&
-                            s->color_type == PNG_COLOR_TYPE_RGB) {
-                     avctx->pix_fmt = PIX_FMT_RGB48BE;
--                } else if (s->bit_depth == 1 &&
-+                } else if (s->bit_depth == 1 && s->bits_per_pixel == 1 &&
-                            s->color_type == PNG_COLOR_TYPE_GRAY) {
-                     avctx->pix_fmt = PIX_FMT_MONOBLACK;
-                 } else if (s->color_type == PNG_COLOR_TYPE_PALETTE) {
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8546.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8546.patch
deleted file mode 100644
index d55d9eb..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8546.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From e7e5114c506957f40aafd794e06de1a7e341e9d5 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 3 Oct 2014 19:33:01 +0200
-Subject: [PATCH] avcodec/cinepak: fix integer underflow
-
-(Upstream commit e7e5114c506957f40aafd794e06de1a7e341e9d5)
-
-Fixes out of array access
-Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi
-
-Upstream-status: Backport
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/cinepak.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
-index 4746289..f651c48 100644
---- a/gst-libs/ext/libav/libavcodec/cinepak.c
-+++ b/gst-libs/ext/libav/libavcodec/cinepak.c
-@@ -125,7 +125,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip,
-     const uint8_t   *eod = (data + size);
-     uint32_t         flag, mask;
-     cvid_codebook   *codebook;
--    unsigned int     x, y;
-+    int             x, y;
-     uint32_t         iy[4];
-     uint32_t         iu[2];
-     uint32_t         iv[2];
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8547.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8547.patch
deleted file mode 100644
index a8616fa..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-8547.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 8f1457864be8fb9653643519dea1c6492f1dde57 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Fri, 3 Oct 2014 20:15:52 +0200
-Subject: [PATCH] avcodec/gifdec: factorize interleave end handling out
-
-(Upstream commit 8f1457864be8fb9653643519dea1c6492f1dde57)
-
-also change it to a loop
-Fixes out of array access
-Fixes: asan_heap-oob_ca5410_8_asan_heap-oob_ca5410_97_ID_LSD_Size_Less_Then_Data_Inter_3.gif
-
-Upstream-Status: Backport
-
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/gifdec.c |   15 +++++----------
- 1 file changed, 5 insertions(+), 10 deletions(-)
-
-diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
-index dee48f5..90de38b 100644
---- a/gst-libs/ext/libav/libavcodec/gifdec.c
-+++ b/gst-libs/ext/libav/libavcodec/gifdec.c
-@@ -271,26 +271,21 @@ static int gif_read_image(GifState *s, AVFrame *frame)
-             case 1:
-                 y1 += 8;
-                 ptr += linesize * 8;
--                if (y1 >= height) {
--                    y1 = pass ? 2 : 4;
--                    ptr = ptr1 + linesize * y1;
--                    pass++;
--                }
-                 break;
-             case 2:
-                 y1 += 4;
-                 ptr += linesize * 4;
--                if (y1 >= height) {
--                    y1 = 1;
--                    ptr = ptr1 + linesize;
--                    pass++;
--                }
-                 break;
-             case 3:
-                 y1 += 2;
-                 ptr += linesize * 2;
-                 break;
-             }
-+            while (y1 >= height) {
-+                y1 = 4 >> pass;
-+                ptr = ptr1 + linesize * y1;
-+                pass++;
-+            }
-         } else {
-             ptr += linesize;
-         }
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-9318.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-9318.patch
deleted file mode 100644
index 0553cee..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-9318.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 0d3a3b9f8907625b361420d48fe05716859620ff Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni@gmx.at>
-Date: Wed, 26 Nov 2014 18:56:39 +0100
-Subject: [PATCH] avcodec/rawdec: Check the return code of
- avpicture_get_size()
-
-(Upstream commit 1d3a3b9f8907625b361420d48fe05716859620ff)
-
-Fixes out of array access
-Fixes: asan_heap-oob_22388d0_3435_cov_3297128910_small_roll5_FlashCine1.cine
-Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-
-Upstream-Status: Backport
-
-Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- libavcodec/rawdec.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
-index 28792a1..647dfa9 100644
---- a/gst-libs/ext/libav/libavcodec/rawdec.c
-+++ b/gst-libs/ext/libav/libavcodec/rawdec.c
-@@ -87,6 +87,9 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
- 
-     ff_set_systematic_pal2(context->palette, avctx->pix_fmt);
-     context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
-+    if (context->length < 0)
-+        return context->length;
-+
-     if((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) &&
-        avctx->pix_fmt==PIX_FMT_PAL8 &&
-        (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-9603.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-9603.patch
deleted file mode 100644
index 5dda4cc..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/gst-ffmpeg-fix-CVE-2014-9603.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From dc68faf8339a885bc55fabe5b01f1de4f8f3782c Mon Sep 17 00:00:00 2001
-From: Kai Kang <kai.kang@windriver.com>
-Date: Wed, 13 May 2015 16:30:53 +0800
-Subject: [PATCH 1/2] gst-ffmpeg: fix CVE-2014-9603
-
-Upstream-Status: Backport
-
-Upstream is version 2.x and vmdav.c is splitted into 2 files vmdaudio.c
-and vmdvideo.c. Becuase source code changes, just partly backport commit which
-is applicable to version 0.10.13 to fix CVE-2014-9603.
-
-http://git.videolan.org/?p=ffmpeg.git;a=commit;h=3030fb7e0d41836f8add6399e9a7c7b740b48bfd
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- gst-libs/ext/libav/libavcodec/vmdav.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/gst-libs/ext/libav/libavcodec/vmdav.c b/gst-libs/ext/libav/libavcodec/vmdav.c
-index d258252..ba88ad8 100644
---- a/gst-libs/ext/libav/libavcodec/vmdav.c
-+++ b/gst-libs/ext/libav/libavcodec/vmdav.c
-@@ -294,10 +294,13 @@ static void vmd_decode(VmdVideoContext *s)
-                     len = *pb++;
-                     if (len & 0x80) {
-                         len = (len & 0x7F) + 1;
--                        if (*pb++ == 0xFF)
-+                        if (*pb++ == 0xFF) {
-                             len = rle_unpack(pb, &dp[ofs], len, frame_width - ofs);
--                        else
-+                        } else {
-+                            if (ofs + len > frame_width)
-+                                return;
-                             memcpy(&dp[ofs], pb, len);
-+                        }
-                         pb += len;
-                         ofs += len;
-                     } else {
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/h264_qpel_mmx.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/h264_qpel_mmx.patch
deleted file mode 100644
index ade24dc..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/h264_qpel_mmx.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Backport http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=5f654897e325349dacf2546674e0510bb72ecb50;hp=250cebeb3b348c3da71f9972eb500d6005dc01f1
-
-Fixes these errors on x86
-
-libavcodec/x86/h264_qpel_mmx.c: Assembler messages:
-libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
-libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
-libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
-libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
-libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
-libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
-libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
-make[5]: *** [libavcodec/x86/dsputil_mmx.o] Error 1
-
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport
-Index: gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c
-===================================================================
---- gst-ffmpeg-0.10.13.orig/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c	2012-03-30 11:39:41.324522051 -0700
-+++ gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c	2012-03-30 11:54:08.152564075 -0700
-@@ -398,7 +398,7 @@
-             "2:                         \n\t"\
-             \
-             : "+a"(src), "+c"(dst)\
--            : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
-+            : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
-             : "memory"\
-         );\
-         src += 4-(h+5)*srcStride;\
-@@ -446,7 +446,7 @@
-             QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\
-             "2:                     \n\t"\
-             : "+a"(src)\
--            : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\
-+            : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\
-             : "memory"\
-             );\
-         tmp += 4;\
-@@ -823,7 +823,7 @@
-         "2:                          \n\t"\
-         \
-         : "+a"(src), "+c"(dst)\
--        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
-+        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
-         : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \
-                        "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\
-           "memory"\
-@@ -878,7 +878,7 @@
-             QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48)
-             "2:                         \n\t"
-             : "+a"(src)
--            : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)
-+            : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)
-             : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3",
-                            "%xmm4", "%xmm5", "%xmm6", "%xmm7",)
-               "memory"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav-9.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav-9.patch
deleted file mode 100644
index 1860752..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav-9.patch
+++ /dev/null
@@ -1,9304 +0,0 @@
-Taken from gentoo patchset:
-http://dev.gentoo.org/~tetromino/distfiles/gst-plugins-ffmpeg/gst-ffmpeg-0.10.13_p2012.11-libav-9-patches.tar.xz
-
-Upstream-Status: Pending
-
-Contains following changes, rebased to apply on top of our changes
-0002-Fix-includes-for-systemwide-build.patch
-0003-libav-Switch-to-non-deprecated-symbols.patch
-0005-av-Update-for-some-constant-changes.patch
-0006-av-Remove-palette-support-for-now.patch
-0007-av-Port-remaining-simple-bits.patch
-0008-av-Use-av_codec_is_-en-de-coder-API-instead-of-priva.patch
-0009-avprotocol-Port-from-the-URL-protocol-handler-to-san.patch
-0010-avdec-don-t-wait-for-keyframe.patch
-
-Following changes were skipped:
-0001-Partially-revert-commit-0300801b.patch
-0004-av-update-to-use-AVOption-variants.patch
-0011-av_get_bits_per_sample_format-was-removed-in-libav-9.patch
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.c	2011-10-31 11:14:03.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.c	2014-08-08 15:26:07.872857555 +0200
-@@ -151,9 +151,6 @@
- #endif
-   gst_ffmpegaudioresample_register (plugin);
- 
--  av_register_protocol2 (&gstreamer_protocol, sizeof (URLProtocol));
--  av_register_protocol2 (&gstpipe_protocol, sizeof (URLProtocol));
--
-   /* Now we can return the pointer to the newly created Plugin object. */
-   return TRUE;
- }
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.h gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.h
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.h	2011-05-17 10:53:16.000000000 +0200
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.h	2014-08-08 15:26:07.872857555 +0200
-@@ -58,10 +58,13 @@
- int gst_ffmpeg_avcodec_close (AVCodecContext *avctx);
- int gst_ffmpeg_av_find_stream_info(AVFormatContext *ic);
- 
--G_END_DECLS
-+int gst_ffmpegdata_open (GstPad * pad, int flags, AVIOContext ** context);
-+int gst_ffmpegdata_close (AVIOContext * h);
-+typedef struct _GstFFMpegPipe GstFFMpegPipe;
-+int gst_ffmpeg_pipe_open (GstFFMpegPipe *ffpipe, int flags, AVIOContext ** context);
-+int gst_ffmpeg_pipe_close (AVIOContext * h);
- 
--extern URLProtocol gstreamer_protocol;
--extern URLProtocol gstpipe_protocol;
-+G_END_DECLS
- 
- /* use GST_FFMPEG URL_STREAMHEADER with URL_WRONLY if the first
-  * buffer should be used as streamheader property on the pad's caps. */
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcfg.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcfg.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcfg.c	2011-07-12 16:35:27.000000000 +0200
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcfg.c	2014-08-08 15:24:17.899853612 +0200
-@@ -147,7 +147,6 @@
-       {FF_DCT_FASTINT, "Fast Integer", "fastint"},
-       {FF_DCT_INT, "Accurate Integer", "int"},
-       {FF_DCT_MMX, "MMX", "mmx"},
--      {FF_DCT_MLIB, "MLIB", "mlib"},
-       {FF_DCT_ALTIVEC, "ALTIVEC", "altivec"},
-       {FF_DCT_FAAN, "FAAN", "faan"},
-       {0, NULL, NULL},
-@@ -173,8 +172,6 @@
-       {FF_IDCT_SIMPLE, "Simple", "simple"},
-       {FF_IDCT_SIMPLEMMX, "Simple MMX", "simplemmx"},
-       {FF_IDCT_LIBMPEG2MMX, "LIBMPEG2MMX", "libmpeg2mmx"},
--      {FF_IDCT_PS2, "PS2", "ps2"},
--      {FF_IDCT_MLIB, "MLIB", "mlib"},
-       {FF_IDCT_ARM, "ARM", "arm"},
-       {FF_IDCT_ALTIVEC, "ALTIVEC", "altivec"},
-       {FF_IDCT_SH4, "SH4", "sh4"},
-@@ -263,16 +260,11 @@
- 
-   if (!ffmpeg_flags_type) {
-     static const GFlagsValue ffmpeg_flags[] = {
--      {CODEC_FLAG_OBMC, "Use overlapped block motion compensation (h263+)",
--          "obmc"},
-       {CODEC_FLAG_QSCALE, "Use fixed qscale", "qscale"},
-       {CODEC_FLAG_4MV, "Allow 4 MV per MB", "4mv"},
--      {CODEC_FLAG_H263P_AIV, "H.263 alternative inter VLC", "aiv"},
-       {CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"},
-       {CODEC_FLAG_GMC, "GMC", "gmc"},
-       {CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"},
--      {CODEC_FLAG_PART,
--          "Store MV, DC and AC coefficients in seperate partitions", "part"},
-       {CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"},
-       {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
-       {CODEC_FLAG_NORMALIZE_AQP,
-@@ -282,13 +274,9 @@
-           "global-headers"},
-       {CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction",
-           "aic"},
--      {CODEC_FLAG_H263P_UMV, "Unlimited Motion Vector", "umv"},
-       {CODEC_FLAG_CBP_RD, "Rate Distoration Optimization for CBP", "cbp-rd"},
-       {CODEC_FLAG_QP_RD, "Rate Distoration Optimization for QP selection",
-           "qp-rd"},
--      {CODEC_FLAG_H263P_SLICE_STRUCT, "H263 slice struct", "ss"},
--      {CODEC_FLAG_SVCD_SCAN_OFFSET,
--          "Reserve space for SVCD scan offset user data", "scanoffset"},
-       {CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"},
-       {0, NULL, NULL},
-     };
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c	2011-10-31 11:14:03.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c	2014-08-08 15:31:30.968869139 +0200
-@@ -25,8 +25,10 @@
- #include <gst/gst.h>
- #ifdef HAVE_FFMPEG_UNINSTALLED
- #include <avcodec.h>
-+#include <channel_layout.h>
- #else
- #include <libavcodec/avcodec.h>
-+#include <libavutil/channel_layout.h>
- #endif
- #include <string.h>
- 
-@@ -35,43 +37,6 @@
- 
- #include <gst/pbutils/codec-utils.h>
- 
--/*
-- * Read a palette from a caps.
-- */
--
--static void
--gst_ffmpeg_get_palette (const GstCaps * caps, AVCodecContext * context)
--{
--  GstStructure *str = gst_caps_get_structure (caps, 0);
--  const GValue *palette_v;
--  const GstBuffer *palette;
--
--  /* do we have a palette? */
--  if ((palette_v = gst_structure_get_value (str, "palette_data")) && context) {
--    palette = gst_value_get_buffer (palette_v);
--    if (GST_BUFFER_SIZE (palette) >= AVPALETTE_SIZE) {
--      if (context->palctrl)
--        av_free (context->palctrl);
--      context->palctrl = av_malloc (sizeof (AVPaletteControl));
--      context->palctrl->palette_changed = 1;
--      memcpy (context->palctrl->palette, GST_BUFFER_DATA (palette),
--          AVPALETTE_SIZE);
--    }
--  }
--}
--
--static void
--gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context)
--{
--  if (context->palctrl) {
--    GstBuffer *palette = gst_buffer_new_and_alloc (AVPALETTE_SIZE);
--
--    memcpy (GST_BUFFER_DATA (palette), context->palctrl->palette,
--        AVPALETTE_SIZE);
--    gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, palette, NULL);
--  }
--}
--
- /* IMPORTANT: Keep this sorted by the ffmpeg channel masks */
- static const struct
- {
-@@ -79,26 +44,26 @@
-   GstAudioChannelPosition gst;
- } _ff_to_gst_layout[] = {
-   {
--  CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
--  CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
--  CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
--  CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
--  CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
--  CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
--  CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
--  CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
--  CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
--  CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
--  CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
--  CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
--  CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
--  CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
--  CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
--  CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
--  CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
--  CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
--  CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
--  CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
-+  AV_CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
-+  AV_CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
-+  AV_CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
-+  AV_CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
-+  AV_CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
-+  AV_CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
-+  AV_CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
-+  AV_CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
-+  AV_CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
-+  AV_CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
-+  AV_CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
-+  AV_CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
-+  AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
- };
- 
- static GstAudioChannelPosition *
-@@ -342,8 +307,8 @@
- 
-     if (channel_layout == 0) {
-       const guint64 default_channel_set[] = {
--        0, 0, CH_LAYOUT_SURROUND, CH_LAYOUT_QUAD, CH_LAYOUT_5POINT0,
--        CH_LAYOUT_5POINT1, 0, CH_LAYOUT_7POINT1
-+        0, 0, AV_CH_LAYOUT_SURROUND, AV_CH_LAYOUT_QUAD, AV_CH_LAYOUT_5POINT0,
-+        AV_CH_LAYOUT_5POINT1, 0, AV_CH_LAYOUT_7POINT1
-       };
- 
-       switch (codec_id) {
-@@ -1267,8 +1232,6 @@
-     case CODEC_ID_FLIC:
-     case CODEC_ID_VMDVIDEO:
-     case CODEC_ID_VMDAUDIO:
--    case CODEC_ID_SONIC:
--    case CODEC_ID_SONIC_LS:
-     case CODEC_ID_SNOW:
-     case CODEC_ID_VIXL:
-     case CODEC_ID_QPEG:
-@@ -1689,11 +1652,6 @@
-       gst_buffer_unref (data);
-     }
- 
--    /* palette */
--    if (context) {
--      gst_ffmpeg_set_palette (caps, context);
--    }
--
-     GST_LOG ("caps for codec_id=%d: %" GST_PTR_FORMAT, codec_id, caps);
- 
-   } else {
-@@ -1830,9 +1788,6 @@
-             "bpp", G_TYPE_INT, bpp,
-             "depth", G_TYPE_INT, depth,
-             "endianness", G_TYPE_INT, endianness, NULL);
--        if (caps && context) {
--          gst_ffmpeg_set_palette (caps, context);
--        }
-       }
-     } else if (fmt) {
-       caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-yuv",
-@@ -1857,7 +1812,7 @@
-  */
- 
- static GstCaps *
--gst_ffmpeg_smpfmt_to_caps (enum SampleFormat sample_fmt,
-+gst_ffmpeg_smpfmt_to_caps (enum AVSampleFormat sample_fmt,
-     AVCodecContext * context, enum CodecID codec_id)
- {
-   GstCaps *caps = NULL;
-@@ -1867,22 +1822,22 @@
-   gboolean signedness = FALSE;
- 
-   switch (sample_fmt) {
--    case SAMPLE_FMT_S16:
-+    case AV_SAMPLE_FMT_S16:
-       signedness = TRUE;
-       bpp = 16;
-       break;
- 
--    case SAMPLE_FMT_S32:
-+    case AV_SAMPLE_FMT_S32:
-       signedness = TRUE;
-       bpp = 32;
-       break;
- 
--    case SAMPLE_FMT_FLT:
-+    case AV_SAMPLE_FMT_FLT:
-       integer = FALSE;
-       bpp = 32;
-       break;
- 
--    case SAMPLE_FMT_DBL:
-+    case AV_SAMPLE_FMT_DBL:
-       integer = FALSE;
-       bpp = 64;
-       break;
-@@ -1941,12 +1896,12 @@
-     }
-   } else {
-     GstCaps *temp;
--    enum SampleFormat i;
-+    enum AVSampleFormat i;
-     AVCodecContext ctx = { 0, };
- 
-     ctx.channels = -1;
-     caps = gst_caps_new_empty ();
--    for (i = 0; i <= SAMPLE_FMT_DBL; i++) {
-+    for (i = 0; i <= AV_SAMPLE_FMT_DBL; i++) {
-       temp = gst_ffmpeg_smpfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
-       if (temp != NULL) {
-         gst_caps_append (caps, temp);
-@@ -2049,9 +2004,9 @@
-         gst_structure_get_int (structure, "endianness", &endianness)) {
-       if (endianness == G_BYTE_ORDER) {
-         if (width == 32)
--          context->sample_fmt = SAMPLE_FMT_FLT;
-+          context->sample_fmt = AV_SAMPLE_FMT_FLT;
-         else if (width == 64)
--          context->sample_fmt = SAMPLE_FMT_DBL;
-+          context->sample_fmt = AV_SAMPLE_FMT_DBL;
-       }
-     }
-   } else {
-@@ -2062,9 +2017,9 @@
-         gst_structure_get_int (structure, "endianness", &endianness)) {
-       if ((endianness == G_BYTE_ORDER) && (signedness == TRUE)) {
-         if ((width == 16) && (depth == 16))
--          context->sample_fmt = SAMPLE_FMT_S16;
-+          context->sample_fmt = AV_SAMPLE_FMT_S16;
-         else if ((width == 32) && (depth == 32))
--          context->sample_fmt = SAMPLE_FMT_S32;
-+          context->sample_fmt = AV_SAMPLE_FMT_S32;
-       }
-     }
-   }
-@@ -2190,7 +2145,6 @@
-       } else {
-         if (bpp == 8) {
-           context->pix_fmt = PIX_FMT_PAL8;
--          gst_ffmpeg_get_palette (caps, context);
-         }
-       }
-     }
-@@ -2576,7 +2530,6 @@
-   switch (codec_type) {
-     case AVMEDIA_TYPE_VIDEO:
-       gst_ffmpeg_caps_to_pixfmt (caps, context, codec_id == CODEC_ID_RAWVIDEO);
--      gst_ffmpeg_get_palette (caps, context);
-       break;
-     case AVMEDIA_TYPE_AUDIO:
-       gst_ffmpeg_caps_to_smpfmt (caps, context, FALSE);
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.orig
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.orig	1970-01-01 01:00:00.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.orig	2014-08-08 15:30:34.006867097 +0200
-@@ -0,0 +1,3447 @@
-+/* GStreamer
-+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
-+ * This file:
-+ * Copyright (c) 2002-2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+#include <gst/gst.h>
-+#ifdef HAVE_FFMPEG_UNINSTALLED
-+#include <avcodec.h>
-+#include <channel_layout.h>>
-+#else
-+#include <libavcodec/avcodec.h>
-+#include <libavutil/channel_layout.h>
-+#endif
-+#include <string.h>
-+
-+#include "gstffmpeg.h"
-+#include "gstffmpegcodecmap.h"
-+
-+#include <gst/pbutils/codec-utils.h>
-+
-+/*
-+ * Read a palette from a caps.
-+ */
-+
-+static void
-+gst_ffmpeg_get_palette (const GstCaps * caps, AVCodecContext * context)
-+{
-+  GstStructure *str = gst_caps_get_structure (caps, 0);
-+  const GValue *palette_v;
-+  const GstBuffer *palette;
-+
-+  /* do we have a palette? */
-+  if ((palette_v = gst_structure_get_value (str, "palette_data")) && context) {
-+    palette = gst_value_get_buffer (palette_v);
-+    if (GST_BUFFER_SIZE (palette) >= AVPALETTE_SIZE) {
-+      if (context->palctrl)
-+        av_free (context->palctrl);
-+      context->palctrl = av_malloc (sizeof (AVPaletteControl));
-+      context->palctrl->palette_changed = 1;
-+      memcpy (context->palctrl->palette, GST_BUFFER_DATA (palette),
-+          AVPALETTE_SIZE);
-+    }
-+  }
-+}
-+
-+static void
-+gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context)
-+{
-+  if (context->palctrl) {
-+    GstBuffer *palette = gst_buffer_new_and_alloc (AVPALETTE_SIZE);
-+
-+    memcpy (GST_BUFFER_DATA (palette), context->palctrl->palette,
-+        AVPALETTE_SIZE);
-+    gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, palette, NULL);
-+  }
-+}
-+
-+/* IMPORTANT: Keep this sorted by the ffmpeg channel masks */
-+static const struct
-+{
-+  guint64 ff;
-+  GstAudioChannelPosition gst;
-+} _ff_to_gst_layout[] = {
-+  {
-+  AV_CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
-+  AV_CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
-+  AV_CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
-+  AV_CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
-+  AV_CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
-+  AV_CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
-+  AV_CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
-+  AV_CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
-+  AV_CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
-+  AV_CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
-+  AV_CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
-+  AV_CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
-+  AV_CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
-+  AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
-+};
-+
-+static GstAudioChannelPosition *
-+gst_ff_channel_layout_to_gst (guint64 channel_layout, guint channels)
-+{
-+  guint nchannels = 0, i, j;
-+  GstAudioChannelPosition *pos = NULL;
-+  gboolean none_layout = FALSE;
-+
-+  for (i = 0; i < 64; i++) {
-+    if ((channel_layout & (G_GUINT64_CONSTANT (1) << i)) != 0) {
-+      nchannels++;
-+    }
-+  }
-+
-+  if (channel_layout == 0) {
-+    nchannels = channels;
-+    none_layout = TRUE;
-+  }
-+
-+  if (nchannels != channels) {
-+    GST_ERROR ("Number of channels is different (%u != %u)", channels,
-+        nchannels);
-+    return NULL;
-+  }
-+
-+  pos = g_new (GstAudioChannelPosition, nchannels);
-+
-+  for (i = 0, j = 0; i < G_N_ELEMENTS (_ff_to_gst_layout); i++) {
-+    if ((channel_layout & _ff_to_gst_layout[i].ff) != 0) {
-+      pos[j++] = _ff_to_gst_layout[i].gst;
-+
-+      if (_ff_to_gst_layout[i].gst == GST_AUDIO_CHANNEL_POSITION_NONE)
-+        none_layout = TRUE;
-+    }
-+  }
-+
-+  if (j != nchannels) {
-+    GST_WARNING ("Unknown channels in channel layout - assuming NONE layout");
-+    none_layout = TRUE;
-+  }
-+
-+  if (!none_layout && !gst_audio_check_channel_positions (pos, nchannels)) {
-+    GST_ERROR ("Invalid channel layout %" G_GUINT64_FORMAT
-+        " - assuming NONE layout", channel_layout);
-+    none_layout = TRUE;
-+  }
-+
-+  if (none_layout) {
-+    if (nchannels == 1) {
-+      pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
-+    } else if (nchannels == 2) {
-+      pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT;
-+      pos[1] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT;
-+    } else if (channel_layout == 0) {
-+      g_free (pos);
-+      pos = NULL;
-+    } else {
-+      for (i = 0; i < nchannels; i++)
-+        pos[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
-+    }
-+  }
-+
-+  if (nchannels == 1 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER) {
-+    GST_DEBUG ("mono common case; won't set channel positions");
-+    g_free (pos);
-+    pos = NULL;
-+  } else if (nchannels == 2 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT
-+      && pos[1] == GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT) {
-+    GST_DEBUG ("stereo common case; won't set channel positions");
-+    g_free (pos);
-+    pos = NULL;
-+  }
-+
-+  return pos;
-+}
-+
-+/* this macro makes a caps width fixed or unfixed width/height
-+ * properties depending on whether we've got a context.
-+ *
-+ * See below for why we use this.
-+ *
-+ * We should actually do this stuff at the end, like in riff-media.c,
-+ * but I'm too lazy today. Maybe later.
-+ */
-+static GstCaps *
-+gst_ff_vid_caps_new (AVCodecContext * context, enum CodecID codec_id,
-+    const char *mimetype, const char *fieldname, ...)
-+{
-+  GstStructure *structure = NULL;
-+  GstCaps *caps = NULL;
-+  va_list var_args;
-+  gint i;
-+
-+  GST_LOG ("context:%p, codec_id:%d, mimetype:%s", context, codec_id, mimetype);
-+
-+  /* fixed, non probing context */
-+  if (context != NULL && context->width != -1) {
-+    gint num, denom;
-+
-+    caps = gst_caps_new_simple (mimetype,
-+        "width", G_TYPE_INT, context->width,
-+        "height", G_TYPE_INT, context->height, NULL);
-+
-+    num = context->time_base.den / context->ticks_per_frame;
-+    denom = context->time_base.num;
-+
-+    if (!denom) {
-+      GST_LOG ("invalid framerate: %d/0, -> %d/1", num, num);
-+      denom = 1;
-+    }
-+    if (gst_util_fraction_compare (num, denom, 1000, 1) > 0) {
-+      GST_LOG ("excessive framerate: %d/%d, -> 0/1", num, denom);
-+      num = 0;
-+      denom = 1;
-+    }
-+    GST_LOG ("setting framerate: %d/%d", num, denom);
-+    gst_caps_set_simple (caps,
-+        "framerate", GST_TYPE_FRACTION, num, denom, NULL);
-+  } else {
-+    /* so we are after restricted caps in this case */
-+    switch (codec_id) {
-+      case CODEC_ID_H261:
-+      {
-+        caps = gst_caps_new_simple (mimetype,
-+            "width", G_TYPE_INT, 352,
-+            "height", G_TYPE_INT, 288,
-+            "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-+        gst_caps_append (caps, gst_caps_new_simple (mimetype,
-+                "width", G_TYPE_INT, 176,
-+                "height", G_TYPE_INT, 144,
-+                "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL));
-+        break;
-+      }
-+      case CODEC_ID_H263:
-+      {
-+        /* 128x96, 176x144, 352x288, 704x576, and 1408x1152. slightly reordered
-+         * because we want automatic negotiation to go as close to 320x240 as
-+         * possible. */
-+        const static gint widths[] = { 352, 704, 176, 1408, 128 };
-+        const static gint heights[] = { 288, 576, 144, 1152, 96 };
-+        GstCaps *temp;
-+        gint n_sizes = G_N_ELEMENTS (widths);
-+
-+        caps = gst_caps_new_empty ();
-+        for (i = 0; i < n_sizes; i++) {
-+          temp = gst_caps_new_simple (mimetype,
-+              "width", G_TYPE_INT, widths[i],
-+              "height", G_TYPE_INT, heights[i],
-+              "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-+
-+          gst_caps_append (caps, temp);
-+        }
-+        break;
-+      }
-+      case CODEC_ID_DVVIDEO:
-+      {
-+        static struct
-+        {
-+          guint32 csp;
-+          gint width, height;
-+          gint par_n, par_d;
-+          gint framerate_n, framerate_d;
-+        } profiles[] = {
-+          {
-+          GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 480, 10, 11, 30000, 1001}, {
-+          GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 480, 40, 33, 30000, 1001}, {
-+          GST_MAKE_FOURCC ('I', '4', '2', '0'), 720, 576, 59, 54, 25, 1}, {
-+          GST_MAKE_FOURCC ('I', '4', '2', '0'), 720, 576, 118, 81, 25, 1}, {
-+          GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 576, 59, 54, 25, 1}, {
-+          GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 576, 118, 81, 25, 1}
-+        };
-+        GstCaps *temp;
-+        gint n_sizes = G_N_ELEMENTS (profiles);
-+
-+        caps = gst_caps_new_empty ();
-+        for (i = 0; i < n_sizes; i++) {
-+          temp = gst_caps_new_simple (mimetype,
-+              "width", G_TYPE_INT, profiles[i].width,
-+              "height", G_TYPE_INT, profiles[i].height,
-+              "framerate", GST_TYPE_FRACTION, profiles[i].framerate_n,
-+              profiles[i].framerate_d, "pixel-aspect-ratio", GST_TYPE_FRACTION,
-+              profiles[i].par_n, profiles[i].par_d, NULL);
-+
-+          gst_caps_append (caps, temp);
-+        }
-+        break;
-+      }
-+      case CODEC_ID_DNXHD:
-+      {
-+        caps = gst_caps_new_simple (mimetype,
-+            "width", G_TYPE_INT, 1920,
-+            "height", G_TYPE_INT, 1080,
-+            "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-+        gst_caps_append (caps, gst_caps_new_simple (mimetype,
-+                "width", G_TYPE_INT, 1280,
-+                "height", G_TYPE_INT, 720,
-+                "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL));
-+        break;
-+      }
-+      default:
-+        break;
-+    }
-+  }
-+
-+  /* no fixed caps or special restrictions applied;
-+   * default unfixed setting */
-+  if (!caps) {
-+    GST_DEBUG ("Creating default caps");
-+    caps = gst_caps_new_simple (mimetype,
-+        "width", GST_TYPE_INT_RANGE, 16, 4096,
-+        "height", GST_TYPE_INT_RANGE, 16, 4096,
-+        "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-+  }
-+
-+  for (i = 0; i < gst_caps_get_size (caps); i++) {
-+    va_start (var_args, fieldname);
-+    structure = gst_caps_get_structure (caps, i);
-+    gst_structure_set_valist (structure, fieldname, var_args);
-+    va_end (var_args);
-+  }
-+
-+  return caps;
-+}
-+
-+/* same for audio - now with channels/sample rate
-+ */
-+static GstCaps *
-+gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
-+    const char *mimetype, const char *fieldname, ...)
-+{
-+  GstCaps *caps = NULL;
-+  GstStructure *structure = NULL;
-+  gint i;
-+  va_list var_args;
-+
-+  /* fixed, non-probing context */
-+  if (context != NULL && context->channels != -1) {
-+    GstAudioChannelPosition *pos;
-+    guint64 channel_layout = context->channel_layout;
-+
-+    if (channel_layout == 0) {
-+      const guint64 default_channel_set[] = {
-+        0, 0, AV_CH_LAYOUT_SURROUND, AV_CH_LAYOUT_QUAD, AV_CH_LAYOUT_5POINT0,
-+        AV_CH_LAYOUT_5POINT1, 0, AV_CH_LAYOUT_7POINT1
-+      };
-+
-+      switch (codec_id) {
-+        case CODEC_ID_EAC3:
-+        case CODEC_ID_AC3:
-+        case CODEC_ID_DTS:
-+          if (context->channels > 0
-+              && context->channels < G_N_ELEMENTS (default_channel_set))
-+            channel_layout = default_channel_set[context->channels - 1];
-+          break;
-+        default:
-+          break;
-+      }
-+    }
-+
-+    caps = gst_caps_new_simple (mimetype,
-+        "rate", G_TYPE_INT, context->sample_rate,
-+        "channels", G_TYPE_INT, context->channels, NULL);
-+
-+    pos = gst_ff_channel_layout_to_gst (channel_layout, context->channels);
-+    if (pos != NULL) {
-+      gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
-+      g_free (pos);
-+    }
-+  } else {
-+    gint maxchannels = 2;
-+    const gint *rates = NULL;
-+    gint n_rates = 0;
-+
-+    /* so we must be after restricted caps in this case */
-+    switch (codec_id) {
-+      case CODEC_ID_AAC:
-+      case CODEC_ID_AAC_LATM:
-+      case CODEC_ID_DTS:
-+        maxchannels = 6;
-+        break;
-+      case CODEC_ID_MP2:
-+      {
-+        const static gint l_rates[] =
-+            { 48000, 44100, 32000, 24000, 22050, 16000 };
-+        n_rates = G_N_ELEMENTS (l_rates);
-+        rates = l_rates;
-+        break;
-+      }
-+      case CODEC_ID_EAC3:
-+      case CODEC_ID_AC3:
-+      {
-+        const static gint l_rates[] = { 48000, 44100, 32000 };
-+        maxchannels = 6;
-+        n_rates = G_N_ELEMENTS (l_rates);
-+        rates = l_rates;
-+        break;
-+      }
-+      case CODEC_ID_ADPCM_G722:
-+      {
-+        const static gint l_rates[] = { 16000 };
-+        n_rates = G_N_ELEMENTS (l_rates);
-+        rates = l_rates;
-+        maxchannels = 1;
-+        break;
-+      }
-+      case CODEC_ID_ADPCM_G726:
-+      {
-+        const static gint l_rates[] = { 8000 };
-+        n_rates = G_N_ELEMENTS (l_rates);
-+        rates = l_rates;
-+        maxchannels = 1;
-+        break;
-+      }
-+      case CODEC_ID_ADPCM_SWF:
-+      {
-+        const static gint l_rates[] = { 11025, 22050, 44100 };
-+        n_rates = G_N_ELEMENTS (l_rates);
-+        rates = l_rates;
-+        break;
-+      }
-+      case CODEC_ID_ROQ_DPCM:
-+      {
-+        const static gint l_rates[] = { 22050 };
-+        n_rates = G_N_ELEMENTS (l_rates);
-+        rates = l_rates;
-+        break;
-+      }
-+      case CODEC_ID_AMR_NB:
-+      {
-+        const static gint l_rates[] = { 8000 };
-+        maxchannels = 1;
-+        n_rates = G_N_ELEMENTS (l_rates);
-+        rates = l_rates;
-+        break;
-+      }
-+      case CODEC_ID_AMR_WB:
-+      {
-+        const static gint l_rates[] = { 16000 };
-+        maxchannels = 1;
-+        n_rates = G_N_ELEMENTS (l_rates);
-+        rates = l_rates;
-+        break;
-+      }
-+      default:
-+        break;
-+    }
-+
-+    /* TODO: handle context->channel_layouts here to set
-+     * the list of channel layouts supported by the encoder.
-+     * Unfortunately no encoder uses this yet....
-+     */
-+    /* regardless of encode/decode, open up channels if applicable */
-+    /* Until decoders/encoders expose the maximum number of channels
-+     * they support, we whitelist them here. */
-+    switch (codec_id) {
-+      case CODEC_ID_WMAPRO:
-+      case CODEC_ID_TRUEHD:
-+        maxchannels = 8;
-+        break;
-+      default:
-+        break;
-+    }
-+
-+    if (maxchannels == 1)
-+      caps = gst_caps_new_simple (mimetype,
-+          "channels", G_TYPE_INT, maxchannels, NULL);
-+    else
-+      caps = gst_caps_new_simple (mimetype,
-+          "channels", GST_TYPE_INT_RANGE, 1, maxchannels, NULL);
-+    if (n_rates) {
-+      GValue list = { 0, };
-+      GstStructure *structure;
-+
-+      g_value_init (&list, GST_TYPE_LIST);
-+      for (i = 0; i < n_rates; i++) {
-+        GValue v = { 0, };
-+
-+        g_value_init (&v, G_TYPE_INT);
-+        g_value_set_int (&v, rates[i]);
-+        gst_value_list_append_value (&list, &v);
-+        g_value_unset (&v);
-+      }
-+      structure = gst_caps_get_structure (caps, 0);
-+      gst_structure_set_value (structure, "rate", &list);
-+      g_value_unset (&list);
-+    } else
-+      gst_caps_set_simple (caps, "rate", GST_TYPE_INT_RANGE, 4000, 96000, NULL);
-+  }
-+
-+  for (i = 0; i < gst_caps_get_size (caps); i++) {
-+    va_start (var_args, fieldname);
-+    structure = gst_caps_get_structure (caps, i);
-+    gst_structure_set_valist (structure, fieldname, var_args);
-+    va_end (var_args);
-+  }
-+
-+  return caps;
-+}
-+
-+/* Convert a FFMPEG codec ID and optional AVCodecContext
-+ * to a GstCaps. If the context is ommitted, no fixed values
-+ * for video/audio size will be included in the GstCaps
-+ *
-+ * CodecID is primarily meant for compressed data GstCaps!
-+ *
-+ * encode is a special parameter. gstffmpegdec will say
-+ * FALSE, gstffmpegenc will say TRUE. The output caps
-+ * depends on this, in such a way that it will be very
-+ * specific, defined, fixed and correct caps for encoders,
-+ * yet very wide, "forgiving" caps for decoders. Example
-+ * for mp3: decode: audio/mpeg,mpegversion=1,layer=[1-3]
-+ * but encode: audio/mpeg,mpegversion=1,layer=3,bitrate=x,
-+ * rate=x,channels=x.
-+ */
-+
-+GstCaps *
-+gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
-+    AVCodecContext * context, gboolean encode)
-+{
-+  GstCaps *caps = NULL;
-+  gboolean buildcaps = FALSE;
-+
-+  GST_LOG ("codec_id:%d, context:%p, encode:%d", codec_id, context, encode);
-+
-+  switch (codec_id) {
-+    case CODEC_ID_MPEG1VIDEO:
-+      /* FIXME: bitrate */
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
-+          "mpegversion", G_TYPE_INT, 1,
-+          "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
-+      break;
-+
-+    case CODEC_ID_MPEG2VIDEO:
-+      if (encode) {
-+        /* FIXME: bitrate */
-+        caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
-+            "mpegversion", G_TYPE_INT, 2,
-+            "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
-+      } else {
-+        /* decode both MPEG-1 and MPEG-2; width/height/fps are all in
-+         * the MPEG video stream headers, so may be omitted from caps. */
-+        caps = gst_caps_new_simple ("video/mpeg",
-+            "mpegversion", GST_TYPE_INT_RANGE, 1, 2,
-+            "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_MPEG2VIDEO_XVMC:
-+      /* this is a special ID - don't need it in GStreamer, I think */
-+      break;
-+
-+    case CODEC_ID_H263:
-+      if (encode) {
-+        caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263",
-+            "variant", G_TYPE_STRING, "itu",
-+            "h263version", G_TYPE_STRING, "h263", NULL);
-+      } else {
-+        /* don't pass codec_id, we can decode other variants with the H263
-+         * decoder that don't have specific size requirements
-+         */
-+        caps = gst_ff_vid_caps_new (context, CODEC_ID_NONE, "video/x-h263",
-+            "variant", G_TYPE_STRING, "itu", NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_H263P:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263",
-+          "variant", G_TYPE_STRING, "itu",
-+          "h263version", G_TYPE_STRING, "h263p", NULL);
-+      if (encode && context) {
-+
-+        gst_caps_set_simple (caps,
-+            "annex-f", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_4MV,
-+            "annex-j", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_LOOP_FILTER,
-+            "annex-i", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED,
-+            "annex-t", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED,
-+            NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_H263I:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-intel-h263",
-+          "variant", G_TYPE_STRING, "intel", NULL);
-+      break;
-+
-+    case CODEC_ID_H261:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h261", NULL);
-+      break;
-+
-+    case CODEC_ID_RV10:
-+    case CODEC_ID_RV20:
-+    case CODEC_ID_RV30:
-+    case CODEC_ID_RV40:
-+    {
-+      gint version;
-+
-+      switch (codec_id) {
-+        case CODEC_ID_RV40:
-+          version = 4;
-+          break;
-+        case CODEC_ID_RV30:
-+          version = 3;
-+          break;
-+        case CODEC_ID_RV20:
-+          version = 2;
-+          break;
-+        default:
-+          version = 1;
-+          break;
-+      }
-+
-+      /* FIXME: context->sub_id must be filled in during decoding */
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-pn-realvideo",
-+          "systemstream", G_TYPE_BOOLEAN, FALSE,
-+          "rmversion", G_TYPE_INT, version, NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps, "format", G_TYPE_INT, context->sub_id, NULL);
-+        if (context->extradata_size >= 8) {
-+          gst_caps_set_simple (caps,
-+              "subformat", G_TYPE_INT, GST_READ_UINT32_BE (context->extradata),
-+              NULL);
-+        }
-+      }
-+    }
-+      break;
-+
-+    case CODEC_ID_MP1:
-+      /* FIXME: bitrate */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
-+          "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 1, NULL);
-+      break;
-+
-+    case CODEC_ID_MP2:
-+      /* FIXME: bitrate */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
-+          "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 2, NULL);
-+      break;
-+
-+    case CODEC_ID_MP3:
-+      if (encode) {
-+        /* FIXME: bitrate */
-+        caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
-+            "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
-+      } else {
-+        /* Decodes MPEG-1 layer 1/2/3. Samplerate, channels et al are
-+         * in the MPEG audio header, so may be omitted from caps. */
-+        caps = gst_caps_new_simple ("audio/mpeg",
-+            "mpegversion", G_TYPE_INT, 1,
-+            "layer", GST_TYPE_INT_RANGE, 1, 3, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_MUSEPACK7:
-+      caps =
-+          gst_ff_aud_caps_new (context, codec_id,
-+          "audio/x-ffmpeg-parsed-musepack", "streamversion", G_TYPE_INT, 7,
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_MUSEPACK8:
-+      caps =
-+          gst_ff_aud_caps_new (context, codec_id,
-+          "audio/x-ffmpeg-parsed-musepack", "streamversion", G_TYPE_INT, 8,
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_AC3:
-+      /* FIXME: bitrate */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-ac3", NULL);
-+      break;
-+
-+    case CODEC_ID_EAC3:
-+      /* FIXME: bitrate */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-eac3", NULL);
-+      break;
-+
-+    case CODEC_ID_TRUEHD:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-true-hd", NULL);
-+      break;
-+
-+    case CODEC_ID_ATRAC1:
-+      caps =
-+          gst_ff_aud_caps_new (context, codec_id, "audio/x-vnd.sony.atrac1",
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_ATRAC3:
-+      caps =
-+          gst_ff_aud_caps_new (context, codec_id, "audio/x-vnd.sony.atrac3",
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_DTS:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dts", NULL);
-+      break;
-+
-+    case CODEC_ID_APE:
-+      caps =
-+          gst_ff_aud_caps_new (context, codec_id, "audio/x-ffmpeg-parsed-ape",
-+          NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "depth", G_TYPE_INT, context->bits_per_coded_sample, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_MLP:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mlp", NULL);
-+      break;
-+
-+    case CODEC_ID_IMC:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-imc", NULL);
-+      break;
-+
-+      /* MJPEG is normal JPEG, Motion-JPEG and Quicktime MJPEG-A. MJPEGB
-+       * is Quicktime's MJPEG-B. LJPEG is lossless JPEG. I don't know what
-+       * sp5x is, but it's apparently something JPEG... We don't separate
-+       * between those in GStreamer. Should we (at least between MJPEG,
-+       * MJPEG-B and sp5x decoding...)? */
-+    case CODEC_ID_MJPEG:
-+    case CODEC_ID_LJPEG:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/jpeg", NULL);
-+      break;
-+
-+    case CODEC_ID_SP5X:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/sp5x", NULL);
-+      break;
-+
-+    case CODEC_ID_MJPEGB:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mjpeg-b", NULL);
-+      break;
-+
-+    case CODEC_ID_MPEG4:
-+      if (encode && context != NULL) {
-+        /* I'm not exactly sure what ffmpeg outputs... ffmpeg itself uses
-+         * the AVI fourcc 'DIVX', but 'mp4v' for Quicktime... */
-+        switch (context->codec_tag) {
-+          case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
-+            caps = gst_ff_vid_caps_new (context, codec_id, "video/x-divx",
-+                "divxversion", G_TYPE_INT, 5, NULL);
-+            break;
-+          case GST_MAKE_FOURCC ('m', 'p', '4', 'v'):
-+          default:
-+            /* FIXME: bitrate */
-+            caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
-+                "systemstream", G_TYPE_BOOLEAN, FALSE,
-+                "mpegversion", G_TYPE_INT, 4, NULL);
-+            break;
-+        }
-+      } else {
-+        /* The trick here is to separate xvid, divx, mpeg4, 3ivx et al */
-+        caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
-+            "mpegversion", G_TYPE_INT, 4,
-+            "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
-+        if (encode) {
-+          gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
-+                  "video/x-divx", "divxversion", G_TYPE_INT, 5, NULL));
-+        } else {
-+          gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
-+                  "video/x-divx", "divxversion", GST_TYPE_INT_RANGE, 4, 5,
-+                  NULL));
-+          gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
-+                  "video/x-xvid", NULL));
-+          gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
-+                  "video/x-3ivx", NULL));
-+        }
-+      }
-+      break;
-+
-+    case CODEC_ID_RAWVIDEO:
-+      caps =
-+          gst_ffmpeg_codectype_to_caps (AVMEDIA_TYPE_VIDEO, context, codec_id,
-+          encode);
-+      break;
-+
-+    case CODEC_ID_MSMPEG4V1:
-+    case CODEC_ID_MSMPEG4V2:
-+    case CODEC_ID_MSMPEG4V3:
-+    {
-+      gint version = 41 + codec_id - CODEC_ID_MSMPEG4V1;
-+
-+      /* encode-FIXME: bitrate */
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-msmpeg",
-+          "msmpegversion", G_TYPE_INT, version, NULL);
-+      if (!encode && codec_id == CODEC_ID_MSMPEG4V3) {
-+        gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
-+                "video/x-divx", "divxversion", G_TYPE_INT, 3, NULL));
-+      }
-+    }
-+      break;
-+
-+    case CODEC_ID_WMV1:
-+    case CODEC_ID_WMV2:
-+    {
-+      gint version = (codec_id == CODEC_ID_WMV1) ? 1 : 2;
-+
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
-+          "wmvversion", G_TYPE_INT, version, NULL);
-+    }
-+      break;
-+
-+    case CODEC_ID_FLV1:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-flash-video",
-+          "flvversion", G_TYPE_INT, 1, NULL);
-+      break;
-+
-+    case CODEC_ID_SVQ1:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-svq",
-+          "svqversion", G_TYPE_INT, 1, NULL);
-+      break;
-+
-+    case CODEC_ID_SVQ3:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-svq",
-+          "svqversion", G_TYPE_INT, 3, NULL);
-+      break;
-+
-+    case CODEC_ID_DVAUDIO:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dv", NULL);
-+      break;
-+
-+    case CODEC_ID_DVVIDEO:
-+    {
-+      if (encode && context) {
-+        guint32 fourcc;
-+
-+        switch (context->pix_fmt) {
-+          case PIX_FMT_YUYV422:
-+            fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
-+            break;
-+          case PIX_FMT_YUV420P:
-+            fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
-+            break;
-+          case PIX_FMT_YUVA420P:
-+            fourcc = GST_MAKE_FOURCC ('A', '4', '2', '0');
-+            break;
-+          case PIX_FMT_YUV411P:
-+            fourcc = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
-+            break;
-+          case PIX_FMT_YUV422P:
-+            fourcc = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
-+            break;
-+          case PIX_FMT_YUV410P:
-+            fourcc = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
-+            break;
-+          default:
-+            GST_WARNING
-+                ("Couldnt' find fourcc for pixfmt %d, defaulting to I420",
-+                context->pix_fmt);
-+            fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
-+            break;
-+        }
-+        caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dv",
-+            "systemstream", G_TYPE_BOOLEAN, FALSE,
-+            "format", GST_TYPE_FOURCC, fourcc, NULL);
-+      } else {
-+        caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dv",
-+            "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
-+      }
-+    }
-+      break;
-+
-+    case CODEC_ID_WMAV1:
-+    case CODEC_ID_WMAV2:
-+    {
-+      gint version = (codec_id == CODEC_ID_WMAV1) ? 1 : 2;
-+
-+      if (context) {
-+        caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
-+            "wmaversion", G_TYPE_INT, version,
-+            "block_align", G_TYPE_INT, context->block_align,
-+            "bitrate", G_TYPE_INT, context->bit_rate, NULL);
-+      } else {
-+        caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
-+            "wmaversion", G_TYPE_INT, version,
-+            "block_align", GST_TYPE_INT_RANGE, 0, G_MAXINT,
-+            "bitrate", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
-+      }
-+    }
-+      break;
-+    case CODEC_ID_WMAPRO:
-+    {
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
-+          "wmaversion", G_TYPE_INT, 3, NULL);
-+      break;
-+    }
-+
-+    case CODEC_ID_WMAVOICE:
-+    {
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wms", NULL);
-+      break;
-+    }
-+
-+    case CODEC_ID_MACE3:
-+    case CODEC_ID_MACE6:
-+    {
-+      gint version = (codec_id == CODEC_ID_MACE3) ? 3 : 6;
-+
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mace",
-+          "maceversion", G_TYPE_INT, version, NULL);
-+    }
-+      break;
-+
-+    case CODEC_ID_HUFFYUV:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-huffyuv", NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "bpp", G_TYPE_INT, context->bits_per_coded_sample, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_CYUV:
-+      caps =
-+          gst_ff_vid_caps_new (context, codec_id, "video/x-compressed-yuv",
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_H264:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h264", NULL);
-+      break;
-+
-+    case CODEC_ID_INDEO5:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
-+          "indeoversion", G_TYPE_INT, 5, NULL);
-+      break;
-+
-+    case CODEC_ID_INDEO3:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
-+          "indeoversion", G_TYPE_INT, 3, NULL);
-+      break;
-+
-+    case CODEC_ID_INDEO2:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
-+          "indeoversion", G_TYPE_INT, 2, NULL);
-+      break;
-+
-+    case CODEC_ID_FLASHSV:
-+      caps =
-+          gst_ff_vid_caps_new (context, codec_id, "video/x-flash-screen", NULL);
-+      break;
-+
-+    case CODEC_ID_VP3:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp3", NULL);
-+      break;
-+
-+    case CODEC_ID_VP5:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp5", NULL);
-+      break;
-+
-+    case CODEC_ID_VP6:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6", NULL);
-+      break;
-+
-+    case CODEC_ID_VP6F:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-flash", NULL);
-+      break;
-+
-+    case CODEC_ID_VP6A:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-alpha", NULL);
-+      break;
-+
-+    case CODEC_ID_VP8:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp8", NULL);
-+      break;
-+
-+    case CODEC_ID_THEORA:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-theora", NULL);
-+      break;
-+
-+    case CODEC_ID_AAC:
-+    {
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg", NULL);
-+
-+      if (!encode) {
-+        GValue arr = { 0, };
-+        GValue item = { 0, };
-+
-+        g_value_init (&arr, GST_TYPE_LIST);
-+        g_value_init (&item, G_TYPE_INT);
-+        g_value_set_int (&item, 2);
-+        gst_value_list_append_value (&arr, &item);
-+        g_value_set_int (&item, 4);
-+        gst_value_list_append_value (&arr, &item);
-+        g_value_unset (&item);
-+
-+        gst_caps_set_value (caps, "mpegversion", &arr);
-+        g_value_unset (&arr);
-+
-+        g_value_init (&arr, GST_TYPE_LIST);
-+        g_value_init (&item, G_TYPE_STRING);
-+        g_value_set_string (&item, "raw");
-+        gst_value_list_append_value (&arr, &item);
-+        g_value_set_string (&item, "adts");
-+        gst_value_list_append_value (&arr, &item);
-+        g_value_set_string (&item, "adif");
-+        gst_value_list_append_value (&arr, &item);
-+        g_value_unset (&item);
-+
-+        gst_caps_set_value (caps, "stream-format", &arr);
-+        g_value_unset (&arr);
-+      } else {
-+        gst_caps_set_simple (caps, "mpegversion", G_TYPE_INT, 4,
-+            "stream-format", G_TYPE_STRING, "raw",
-+            "base-profile", G_TYPE_STRING, "lc", NULL);
-+
-+        if (context && context->extradata_size > 0)
-+          gst_codec_utils_aac_caps_set_level_and_profile (caps,
-+              context->extradata, context->extradata_size);
-+      }
-+
-+      break;
-+    }
-+    case CODEC_ID_AAC_LATM:    /* LATM/LOAS AAC syntax */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
-+          "mpegversion", G_TYPE_INT, 4, "stream-format", G_TYPE_STRING, "loas",
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_ASV1:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-asus",
-+          "asusversion", G_TYPE_INT, 1, NULL);
-+      break;
-+    case CODEC_ID_ASV2:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-asus",
-+          "asusversion", G_TYPE_INT, 2, NULL);
-+      break;
-+
-+    case CODEC_ID_FFV1:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ffv",
-+          "ffvversion", G_TYPE_INT, 1, NULL);
-+      break;
-+
-+    case CODEC_ID_4XM:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-4xm", NULL);
-+      break;
-+
-+    case CODEC_ID_XAN_WC3:
-+    case CODEC_ID_XAN_WC4:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-xan",
-+          "wcversion", G_TYPE_INT, 3 - CODEC_ID_XAN_WC3 + codec_id, NULL);
-+      break;
-+
-+    case CODEC_ID_CLJR:
-+      caps =
-+          gst_ff_vid_caps_new (context, codec_id,
-+          "video/x-cirrus-logic-accupak", NULL);
-+      break;
-+
-+    case CODEC_ID_FRAPS:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-fraps", NULL);
-+      break;
-+
-+    case CODEC_ID_MDEC:
-+    case CODEC_ID_ROQ:
-+    case CODEC_ID_INTERPLAY_VIDEO:
-+      buildcaps = TRUE;
-+      break;
-+
-+    case CODEC_ID_VCR1:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ati-vcr",
-+          "vcrversion", G_TYPE_INT, 1, NULL);
-+      break;
-+
-+    case CODEC_ID_RPZA:
-+      caps =
-+          gst_ff_vid_caps_new (context, codec_id, "video/x-apple-video", NULL);
-+      break;
-+
-+    case CODEC_ID_CINEPAK:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-cinepak", NULL);
-+      break;
-+
-+      /* WS_VQA belogns here (order) */
-+
-+    case CODEC_ID_MSRLE:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-rle",
-+          "layout", G_TYPE_STRING, "microsoft", NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
-+      } else {
-+        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_QTRLE:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-rle",
-+          "layout", G_TYPE_STRING, "quicktime", NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
-+      } else {
-+        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_MSVIDEO1:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-msvideocodec",
-+          "msvideoversion", G_TYPE_INT, 1, NULL);
-+      break;
-+
-+    case CODEC_ID_WMV3:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
-+          "wmvversion", G_TYPE_INT, 3, NULL);
-+      break;
-+    case CODEC_ID_VC1:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
-+          "wmvversion", G_TYPE_INT, 3, "format", GST_TYPE_FOURCC,
-+          GST_MAKE_FOURCC ('W', 'V', 'C', '1'), NULL);
-+      break;
-+    case CODEC_ID_QDM2:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-qdm2", NULL);
-+      break;
-+
-+    case CODEC_ID_MSZH:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mszh", NULL);
-+      break;
-+
-+    case CODEC_ID_ZLIB:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-zlib", NULL);
-+      break;
-+
-+    case CODEC_ID_TRUEMOTION1:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-truemotion",
-+          "trueversion", G_TYPE_INT, 1, NULL);
-+      break;
-+    case CODEC_ID_TRUEMOTION2:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-truemotion",
-+          "trueversion", G_TYPE_INT, 2, NULL);
-+      break;
-+
-+    case CODEC_ID_ULTI:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ultimotion",
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_TSCC:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camtasia", NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
-+      } else {
-+        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_KMVC:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-kmvc", NULL);
-+      break;
-+
-+    case CODEC_ID_NUV:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-nuv", NULL);
-+      break;
-+
-+    case CODEC_ID_GIF:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/gif", NULL);
-+      break;
-+
-+    case CODEC_ID_PNG:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/png", NULL);
-+      break;
-+
-+    case CODEC_ID_PPM:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/ppm", NULL);
-+      break;
-+
-+    case CODEC_ID_PBM:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/pbm", NULL);
-+      break;
-+
-+    case CODEC_ID_PAM:
-+      caps =
-+          gst_ff_vid_caps_new (context, codec_id, "image/x-portable-anymap",
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_PGM:
-+      caps =
-+          gst_ff_vid_caps_new (context, codec_id, "image/x-portable-graymap",
-+          NULL);
-+      break;
-+
-+    case CODEC_ID_PCX:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/x-pcx", NULL);
-+      break;
-+
-+    case CODEC_ID_SGI:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/x-sgi", NULL);
-+      break;
-+
-+    case CODEC_ID_TARGA:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/x-tga", NULL);
-+      break;
-+
-+    case CODEC_ID_TIFF:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "image/tiff", NULL);
-+      break;
-+
-+    case CODEC_ID_SUNRAST:
-+      caps =
-+          gst_ff_vid_caps_new (context, codec_id, "image/x-sun-raster", NULL);
-+      break;
-+
-+    case CODEC_ID_SMC:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-smc", NULL);
-+      break;
-+
-+    case CODEC_ID_QDRAW:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-qdrw", NULL);
-+      break;
-+
-+    case CODEC_ID_DNXHD:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dnxhd", NULL);
-+      break;
-+
-+    case CODEC_ID_MIMIC:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mimic", NULL);
-+      break;
-+
-+    case CODEC_ID_VMNC:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vmnc", NULL);
-+      break;
-+
-+    case CODEC_ID_TRUESPEECH:
-+      caps =
-+          gst_ff_aud_caps_new (context, codec_id, "audio/x-truespeech", NULL);
-+      break;
-+
-+    case CODEC_ID_QCELP:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/qcelp", NULL);
-+      break;
-+
-+    case CODEC_ID_AMV:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-amv", NULL);
-+      break;
-+
-+    case CODEC_ID_AASC:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-aasc", NULL);
-+      break;
-+
-+    case CODEC_ID_LOCO:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-loco", NULL);
-+      break;
-+
-+    case CODEC_ID_ZMBV:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-zmbv", NULL);
-+      break;
-+
-+    case CODEC_ID_LAGARITH:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-lagarith", NULL);
-+      break;
-+
-+    case CODEC_ID_CSCD:
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camstudio", NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
-+      } else {
-+        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_WS_VQA:
-+    case CODEC_ID_IDCIN:
-+    case CODEC_ID_8BPS:
-+    case CODEC_ID_FLIC:
-+    case CODEC_ID_VMDVIDEO:
-+    case CODEC_ID_VMDAUDIO:
-+    case CODEC_ID_SNOW:
-+    case CODEC_ID_VIXL:
-+    case CODEC_ID_QPEG:
-+    case CODEC_ID_PGMYUV:
-+    case CODEC_ID_FFVHUFF:
-+    case CODEC_ID_WNV1:
-+    case CODEC_ID_MP3ADU:
-+    case CODEC_ID_MP3ON4:
-+    case CODEC_ID_WESTWOOD_SND1:
-+    case CODEC_ID_MMVIDEO:
-+    case CODEC_ID_AVS:
-+    case CODEC_ID_CAVS:
-+      buildcaps = TRUE;
-+      break;
-+
-+      /* weird quasi-codecs for the demuxers only */
-+    case CODEC_ID_PCM_S16LE:
-+    case CODEC_ID_PCM_S16BE:
-+    case CODEC_ID_PCM_U16LE:
-+    case CODEC_ID_PCM_U16BE:
-+    case CODEC_ID_PCM_S8:
-+    case CODEC_ID_PCM_U8:
-+    {
-+      gint width = 0, depth = 0, endianness = 0;
-+      gboolean signedness = FALSE;      /* blabla */
-+
-+      switch (codec_id) {
-+        case CODEC_ID_PCM_S16LE:
-+          width = 16;
-+          depth = 16;
-+          endianness = G_LITTLE_ENDIAN;
-+          signedness = TRUE;
-+          break;
-+        case CODEC_ID_PCM_S16BE:
-+          width = 16;
-+          depth = 16;
-+          endianness = G_BIG_ENDIAN;
-+          signedness = TRUE;
-+          break;
-+        case CODEC_ID_PCM_U16LE:
-+          width = 16;
-+          depth = 16;
-+          endianness = G_LITTLE_ENDIAN;
-+          signedness = FALSE;
-+          break;
-+        case CODEC_ID_PCM_U16BE:
-+          width = 16;
-+          depth = 16;
-+          endianness = G_BIG_ENDIAN;
-+          signedness = FALSE;
-+          break;
-+        case CODEC_ID_PCM_S8:
-+          width = 8;
-+          depth = 8;
-+          endianness = G_BYTE_ORDER;
-+          signedness = TRUE;
-+          break;
-+        case CODEC_ID_PCM_U8:
-+          width = 8;
-+          depth = 8;
-+          endianness = G_BYTE_ORDER;
-+          signedness = FALSE;
-+          break;
-+        default:
-+          g_assert (0);         /* don't worry, we never get here */
-+          break;
-+      }
-+
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-int",
-+          "width", G_TYPE_INT, width,
-+          "depth", G_TYPE_INT, depth,
-+          "endianness", G_TYPE_INT, endianness,
-+          "signed", G_TYPE_BOOLEAN, signedness, NULL);
-+    }
-+      break;
-+
-+    case CODEC_ID_PCM_MULAW:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mulaw", NULL);
-+      break;
-+
-+    case CODEC_ID_PCM_ALAW:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alaw", NULL);
-+      break;
-+
-+    case CODEC_ID_ADPCM_G722:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/G722", NULL);
-+      if (context)
-+        gst_caps_set_simple (caps,
-+            "block_align", G_TYPE_INT, context->block_align,
-+            "bitrate", G_TYPE_INT, context->bit_rate, NULL);
-+      break;
-+
-+    case CODEC_ID_ADPCM_G726:
-+    {
-+      /* the G726 decoder can also handle G721 */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-adpcm",
-+          "layout", G_TYPE_STRING, "g726", NULL);
-+      if (context)
-+        gst_caps_set_simple (caps,
-+            "block_align", G_TYPE_INT, context->block_align,
-+            "bitrate", G_TYPE_INT, context->bit_rate, NULL);
-+
-+      if (!encode) {
-+        gst_caps_append (caps, gst_caps_new_simple ("audio/x-adpcm",
-+                "layout", G_TYPE_STRING, "g721",
-+                "channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, 8000, NULL));
-+      }
-+      break;
-+    }
-+    case CODEC_ID_ADPCM_IMA_QT:
-+    case CODEC_ID_ADPCM_IMA_WAV:
-+    case CODEC_ID_ADPCM_IMA_DK3:
-+    case CODEC_ID_ADPCM_IMA_DK4:
-+    case CODEC_ID_ADPCM_IMA_WS:
-+    case CODEC_ID_ADPCM_IMA_SMJPEG:
-+    case CODEC_ID_ADPCM_IMA_AMV:
-+    case CODEC_ID_ADPCM_IMA_ISS:
-+    case CODEC_ID_ADPCM_IMA_EA_EACS:
-+    case CODEC_ID_ADPCM_IMA_EA_SEAD:
-+    case CODEC_ID_ADPCM_MS:
-+    case CODEC_ID_ADPCM_4XM:
-+    case CODEC_ID_ADPCM_XA:
-+    case CODEC_ID_ADPCM_ADX:
-+    case CODEC_ID_ADPCM_EA:
-+    case CODEC_ID_ADPCM_CT:
-+    case CODEC_ID_ADPCM_SWF:
-+    case CODEC_ID_ADPCM_YAMAHA:
-+    case CODEC_ID_ADPCM_SBPRO_2:
-+    case CODEC_ID_ADPCM_SBPRO_3:
-+    case CODEC_ID_ADPCM_SBPRO_4:
-+    case CODEC_ID_ADPCM_EA_R1:
-+    case CODEC_ID_ADPCM_EA_R2:
-+    case CODEC_ID_ADPCM_EA_R3:
-+    case CODEC_ID_ADPCM_EA_MAXIS_XA:
-+    case CODEC_ID_ADPCM_EA_XAS:
-+    case CODEC_ID_ADPCM_THP:
-+    {
-+      const gchar *layout = NULL;
-+
-+      switch (codec_id) {
-+        case CODEC_ID_ADPCM_IMA_QT:
-+          layout = "quicktime";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_WAV:
-+          layout = "dvi";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_DK3:
-+          layout = "dk3";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_DK4:
-+          layout = "dk4";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_WS:
-+          layout = "westwood";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_SMJPEG:
-+          layout = "smjpeg";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_AMV:
-+          layout = "amv";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_ISS:
-+          layout = "iss";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_EA_EACS:
-+          layout = "ea-eacs";
-+          break;
-+        case CODEC_ID_ADPCM_IMA_EA_SEAD:
-+          layout = "ea-sead";
-+          break;
-+        case CODEC_ID_ADPCM_MS:
-+          layout = "microsoft";
-+          break;
-+        case CODEC_ID_ADPCM_4XM:
-+          layout = "4xm";
-+          break;
-+        case CODEC_ID_ADPCM_XA:
-+          layout = "xa";
-+          break;
-+        case CODEC_ID_ADPCM_ADX:
-+          layout = "adx";
-+          break;
-+        case CODEC_ID_ADPCM_EA:
-+          layout = "ea";
-+          break;
-+        case CODEC_ID_ADPCM_CT:
-+          layout = "ct";
-+          break;
-+        case CODEC_ID_ADPCM_SWF:
-+          layout = "swf";
-+          break;
-+        case CODEC_ID_ADPCM_YAMAHA:
-+          layout = "yamaha";
-+          break;
-+        case CODEC_ID_ADPCM_SBPRO_2:
-+          layout = "sbpro2";
-+          break;
-+        case CODEC_ID_ADPCM_SBPRO_3:
-+          layout = "sbpro3";
-+          break;
-+        case CODEC_ID_ADPCM_SBPRO_4:
-+          layout = "sbpro4";
-+          break;
-+        case CODEC_ID_ADPCM_EA_R1:
-+          layout = "ea-r1";
-+          break;
-+        case CODEC_ID_ADPCM_EA_R2:
-+          layout = "ea-r3";
-+          break;
-+        case CODEC_ID_ADPCM_EA_R3:
-+          layout = "ea-r3";
-+          break;
-+        case CODEC_ID_ADPCM_EA_MAXIS_XA:
-+          layout = "ea-maxis-xa";
-+          break;
-+        case CODEC_ID_ADPCM_EA_XAS:
-+          layout = "ea-xas";
-+          break;
-+        case CODEC_ID_ADPCM_THP:
-+          layout = "thp";
-+          break;
-+        default:
-+          g_assert (0);         /* don't worry, we never get here */
-+          break;
-+      }
-+
-+      /* FIXME: someone please check whether we need additional properties
-+       * in this caps definition. */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-adpcm",
-+          "layout", G_TYPE_STRING, layout, NULL);
-+      if (context)
-+        gst_caps_set_simple (caps,
-+            "block_align", G_TYPE_INT, context->block_align,
-+            "bitrate", G_TYPE_INT, context->bit_rate, NULL);
-+    }
-+      break;
-+
-+    case CODEC_ID_AMR_NB:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR", NULL);
-+      break;
-+
-+    case CODEC_ID_AMR_WB:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR-WB", NULL);
-+      break;
-+
-+    case CODEC_ID_GSM:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-gsm", NULL);
-+      break;
-+
-+    case CODEC_ID_GSM_MS:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/ms-gsm", NULL);
-+      break;
-+
-+    case CODEC_ID_NELLYMOSER:
-+      caps =
-+          gst_ff_aud_caps_new (context, codec_id, "audio/x-nellymoser", NULL);
-+      break;
-+
-+    case CODEC_ID_SIPR:
-+    {
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-sipro", NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "leaf_size", G_TYPE_INT, context->block_align,
-+            "bitrate", G_TYPE_INT, context->bit_rate, NULL);
-+      }
-+    }
-+      break;
-+
-+    case CODEC_ID_RA_144:
-+    case CODEC_ID_RA_288:
-+    case CODEC_ID_COOK:
-+    {
-+      gint version = 0;
-+
-+      switch (codec_id) {
-+        case CODEC_ID_RA_144:
-+          version = 1;
-+          break;
-+        case CODEC_ID_RA_288:
-+          version = 2;
-+          break;
-+        case CODEC_ID_COOK:
-+          version = 8;
-+          break;
-+        default:
-+          break;
-+      }
-+
-+      /* FIXME: properties? */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-pn-realaudio",
-+          "raversion", G_TYPE_INT, version, NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "leaf_size", G_TYPE_INT, context->block_align,
-+            "bitrate", G_TYPE_INT, context->bit_rate, NULL);
-+      }
-+    }
-+      break;
-+
-+    case CODEC_ID_ROQ_DPCM:
-+    case CODEC_ID_INTERPLAY_DPCM:
-+    case CODEC_ID_XAN_DPCM:
-+    case CODEC_ID_SOL_DPCM:
-+    {
-+      const gchar *layout = NULL;
-+
-+      switch (codec_id) {
-+        case CODEC_ID_ROQ_DPCM:
-+          layout = "roq";
-+          break;
-+        case CODEC_ID_INTERPLAY_DPCM:
-+          layout = "interplay";
-+          break;
-+        case CODEC_ID_XAN_DPCM:
-+          layout = "xan";
-+          break;
-+        case CODEC_ID_SOL_DPCM:
-+          layout = "sol";
-+          break;
-+        default:
-+          g_assert (0);         /* don't worry, we never get here */
-+          break;
-+      }
-+
-+      /* FIXME: someone please check whether we need additional properties
-+       * in this caps definition. */
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dpcm",
-+          "layout", G_TYPE_STRING, layout, NULL);
-+      if (context)
-+        gst_caps_set_simple (caps,
-+            "block_align", G_TYPE_INT, context->block_align,
-+            "bitrate", G_TYPE_INT, context->bit_rate, NULL);
-+    }
-+      break;
-+
-+    case CODEC_ID_SHORTEN:
-+      caps = gst_caps_new_simple ("audio/x-shorten", NULL);
-+      break;
-+
-+    case CODEC_ID_ALAC:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alac", NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_FLAC:
-+      /* Note that ffmpeg has no encoder yet, but just for safety. In the
-+       * encoder case, we want to add things like samplerate, channels... */
-+      if (!encode) {
-+        caps = gst_caps_new_simple ("audio/x-flac", NULL);
-+      }
-+      break;
-+
-+    case CODEC_ID_DVD_SUBTITLE:
-+    case CODEC_ID_DVB_SUBTITLE:
-+      caps = NULL;
-+      break;
-+    case CODEC_ID_BMP:
-+      caps = gst_caps_new_simple ("image/bmp", NULL);
-+      break;
-+    case CODEC_ID_TTA:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-tta", NULL);
-+      if (context) {
-+        gst_caps_set_simple (caps,
-+            "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
-+      }
-+      break;
-+    case CODEC_ID_TWINVQ:
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-twin-vq", NULL);
-+      break;
-+    default:
-+      GST_DEBUG ("Unknown codec ID %d, please add mapping here", codec_id);
-+      break;
-+  }
-+
-+  if (buildcaps) {
-+    AVCodec *codec;
-+
-+    if ((codec = avcodec_find_decoder (codec_id)) ||
-+        (codec = avcodec_find_encoder (codec_id))) {
-+      gchar *mime = NULL;
-+
-+      GST_LOG ("Could not create stream format caps for %s", codec->name);
-+
-+      switch (codec->type) {
-+        case AVMEDIA_TYPE_VIDEO:
-+          mime = g_strdup_printf ("video/x-gst_ff-%s", codec->name);
-+          caps = gst_ff_vid_caps_new (context, codec_id, mime, NULL);
-+          g_free (mime);
-+          break;
-+        case AVMEDIA_TYPE_AUDIO:
-+          mime = g_strdup_printf ("audio/x-gst_ff-%s", codec->name);
-+          caps = gst_ff_aud_caps_new (context, codec_id, mime, NULL);
-+          if (context)
-+            gst_caps_set_simple (caps,
-+                "block_align", G_TYPE_INT, context->block_align,
-+                "bitrate", G_TYPE_INT, context->bit_rate, NULL);
-+          g_free (mime);
-+          break;
-+        default:
-+          break;
-+      }
-+    }
-+  }
-+
-+  if (caps != NULL) {
-+
-+    /* set private data */
-+    if (context && context->extradata_size > 0) {
-+      GstBuffer *data = gst_buffer_new_and_alloc (context->extradata_size);
-+
-+      memcpy (GST_BUFFER_DATA (data), context->extradata,
-+          context->extradata_size);
-+      gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, data, NULL);
-+      gst_buffer_unref (data);
-+    }
-+
-+    /* palette */
-+    if (context) {
-+      gst_ffmpeg_set_palette (caps, context);
-+    }
-+
-+    GST_LOG ("caps for codec_id=%d: %" GST_PTR_FORMAT, codec_id, caps);
-+
-+  } else {
-+    GST_LOG ("No caps found for codec_id=%d", codec_id);
-+  }
-+
-+  return caps;
-+}
-+
-+/* Convert a FFMPEG Pixel Format and optional AVCodecContext
-+ * to a GstCaps. If the context is ommitted, no fixed values
-+ * for video/audio size will be included in the GstCaps
-+ *
-+ * See below for usefullness
-+ */
-+
-+GstCaps *
-+gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context,
-+    enum CodecID codec_id)
-+{
-+  GstCaps *caps = NULL;
-+
-+  int bpp = 0, depth = 0, endianness = 0;
-+  gulong g_mask = 0, r_mask = 0, b_mask = 0, a_mask = 0;
-+  guint32 fmt = 0;
-+
-+  switch (pix_fmt) {
-+    case PIX_FMT_YUVJ420P:
-+    case PIX_FMT_YUV420P:
-+      fmt = GST_MAKE_FOURCC ('I', '4', '2', '0');
-+      break;
-+    case PIX_FMT_YUVA420P:
-+      fmt = GST_MAKE_FOURCC ('A', '4', '2', '0');
-+      break;
-+    case PIX_FMT_YUYV422:
-+      fmt = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
-+      break;
-+    case PIX_FMT_RGB24:
-+      bpp = depth = 24;
-+      endianness = G_BIG_ENDIAN;
-+      r_mask = 0xff0000;
-+      g_mask = 0x00ff00;
-+      b_mask = 0x0000ff;
-+      break;
-+    case PIX_FMT_BGR24:
-+      bpp = depth = 24;
-+      endianness = G_BIG_ENDIAN;
-+      r_mask = 0x0000ff;
-+      g_mask = 0x00ff00;
-+      b_mask = 0xff0000;
-+      break;
-+    case PIX_FMT_YUVJ422P:
-+    case PIX_FMT_YUV422P:
-+      fmt = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
-+      break;
-+    case PIX_FMT_YUVJ444P:
-+    case PIX_FMT_YUV444P:
-+      fmt = GST_MAKE_FOURCC ('Y', '4', '4', '4');
-+      break;
-+    case PIX_FMT_RGB32:
-+      bpp = 32;
-+      depth = 32;
-+      endianness = G_BIG_ENDIAN;
-+#if (G_BYTE_ORDER == G_BIG_ENDIAN)
-+      r_mask = 0x00ff0000;
-+      g_mask = 0x0000ff00;
-+      b_mask = 0x000000ff;
-+      a_mask = 0xff000000;
-+#else
-+      r_mask = 0x0000ff00;
-+      g_mask = 0x00ff0000;
-+      b_mask = 0xff000000;
-+      a_mask = 0x000000ff;
-+#endif
-+      break;
-+    case PIX_FMT_YUV410P:
-+      fmt = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
-+      break;
-+    case PIX_FMT_YUV411P:
-+      fmt = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
-+      break;
-+    case PIX_FMT_RGB565:
-+      bpp = depth = 16;
-+      endianness = G_BYTE_ORDER;
-+      r_mask = 0xf800;
-+      g_mask = 0x07e0;
-+      b_mask = 0x001f;
-+      break;
-+    case PIX_FMT_RGB555:
-+      bpp = 16;
-+      depth = 15;
-+      endianness = G_BYTE_ORDER;
-+      r_mask = 0x7c00;
-+      g_mask = 0x03e0;
-+      b_mask = 0x001f;
-+      break;
-+    case PIX_FMT_PAL8:
-+      bpp = depth = 8;
-+      endianness = G_BYTE_ORDER;
-+      break;
-+    case PIX_FMT_GRAY8:
-+      bpp = depth = 8;
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-gray",
-+          "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL);
-+      break;
-+    default:
-+      /* give up ... */
-+      break;
-+  }
-+
-+  if (caps == NULL) {
-+    if (bpp != 0) {
-+      if (r_mask != 0) {
-+        if (a_mask) {
-+          caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
-+              "bpp", G_TYPE_INT, bpp,
-+              "depth", G_TYPE_INT, depth,
-+              "red_mask", G_TYPE_INT, r_mask,
-+              "green_mask", G_TYPE_INT, g_mask,
-+              "blue_mask", G_TYPE_INT, b_mask,
-+              "alpha_mask", G_TYPE_INT, a_mask,
-+              "endianness", G_TYPE_INT, endianness, NULL);
-+        } else {
-+          caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
-+              "bpp", G_TYPE_INT, bpp,
-+              "depth", G_TYPE_INT, depth,
-+              "red_mask", G_TYPE_INT, r_mask,
-+              "green_mask", G_TYPE_INT, g_mask,
-+              "blue_mask", G_TYPE_INT, b_mask,
-+              "endianness", G_TYPE_INT, endianness, NULL);
-+        }
-+      } else {
-+        caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
-+            "bpp", G_TYPE_INT, bpp,
-+            "depth", G_TYPE_INT, depth,
-+            "endianness", G_TYPE_INT, endianness, NULL);
-+        if (caps && context) {
-+          gst_ffmpeg_set_palette (caps, context);
-+        }
-+      }
-+    } else if (fmt) {
-+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-yuv",
-+          "format", GST_TYPE_FOURCC, fmt, NULL);
-+    }
-+  }
-+
-+  if (caps != NULL) {
-+    GST_DEBUG ("caps for pix_fmt=%d: %" GST_PTR_FORMAT, pix_fmt, caps);
-+  } else {
-+    GST_LOG ("No caps found for pix_fmt=%d", pix_fmt);
-+  }
-+
-+  return caps;
-+}
-+
-+/* Convert a FFMPEG Sample Format and optional AVCodecContext
-+ * to a GstCaps. If the context is ommitted, no fixed values
-+ * for video/audio size will be included in the GstCaps
-+ *
-+ * See below for usefullness
-+ */
-+
-+static GstCaps *
-+gst_ffmpeg_smpfmt_to_caps (enum AVSampleFormat sample_fmt,
-+    AVCodecContext * context, enum CodecID codec_id)
-+{
-+  GstCaps *caps = NULL;
-+
-+  int bpp = 0;
-+  gboolean integer = TRUE;
-+  gboolean signedness = FALSE;
-+
-+  switch (sample_fmt) {
-+    case AV_SAMPLE_FMT_S16:
-+      signedness = TRUE;
-+      bpp = 16;
-+      break;
-+
-+    case AV_SAMPLE_FMT_S32:
-+      signedness = TRUE;
-+      bpp = 32;
-+      break;
-+
-+    case AV_SAMPLE_FMT_FLT:
-+      integer = FALSE;
-+      bpp = 32;
-+      break;
-+
-+    case AV_SAMPLE_FMT_DBL:
-+      integer = FALSE;
-+      bpp = 64;
-+      break;
-+    default:
-+      /* .. */
-+      break;
-+  }
-+
-+  if (bpp) {
-+    if (integer) {
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-int",
-+          "signed", G_TYPE_BOOLEAN, signedness,
-+          "endianness", G_TYPE_INT, G_BYTE_ORDER,
-+          "width", G_TYPE_INT, bpp, "depth", G_TYPE_INT, bpp, NULL);
-+    } else {
-+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-float",
-+          "endianness", G_TYPE_INT, G_BYTE_ORDER,
-+          "width", G_TYPE_INT, bpp, NULL);
-+    }
-+  }
-+
-+  if (caps != NULL) {
-+    GST_LOG ("caps for sample_fmt=%d: %" GST_PTR_FORMAT, sample_fmt, caps);
-+  } else {
-+    GST_LOG ("No caps found for sample_fmt=%d", sample_fmt);
-+  }
-+
-+  return caps;
-+}
-+
-+GstCaps *
-+gst_ffmpeg_codectype_to_audio_caps (AVCodecContext * context,
-+    enum CodecID codec_id, gboolean encode, AVCodec * codec)
-+{
-+  GstCaps *caps = NULL;
-+
-+  GST_DEBUG ("context:%p, codec_id:%d, encode:%d, codec:%p",
-+      context, codec_id, encode, codec);
-+  if (codec)
-+    GST_DEBUG ("sample_fmts:%p, samplerates:%p",
-+        codec->sample_fmts, codec->supported_samplerates);
-+
-+  if (context) {
-+    /* Specific codec context */
-+    caps = gst_ffmpeg_smpfmt_to_caps (context->sample_fmt, context, codec_id);
-+  } else if (codec && codec->sample_fmts) {
-+    GstCaps *temp;
-+    int i;
-+
-+    caps = gst_caps_new_empty ();
-+    for (i = 0; codec->sample_fmts[i] != -1; i++) {
-+      temp =
-+          gst_ffmpeg_smpfmt_to_caps (codec->sample_fmts[i], context, codec_id);
-+      if (temp != NULL)
-+        gst_caps_append (caps, temp);
-+    }
-+  } else {
-+    GstCaps *temp;
-+    enum AVSampleFormat i;
-+    AVCodecContext ctx = { 0, };
-+
-+    ctx.channels = -1;
-+    caps = gst_caps_new_empty ();
-+    for (i = 0; i <= AV_SAMPLE_FMT_DBL; i++) {
-+      temp = gst_ffmpeg_smpfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
-+      if (temp != NULL) {
-+        gst_caps_append (caps, temp);
-+      }
-+    }
-+  }
-+  return caps;
-+}
-+
-+GstCaps *
-+gst_ffmpeg_codectype_to_video_caps (AVCodecContext * context,
-+    enum CodecID codec_id, gboolean encode, AVCodec * codec)
-+{
-+  GstCaps *caps;
-+
-+  GST_LOG ("context:%p, codec_id:%d, encode:%d, codec:%p",
-+      context, codec_id, encode, codec);
-+
-+  if (context) {
-+    caps = gst_ffmpeg_pixfmt_to_caps (context->pix_fmt, context, codec_id);
-+  } else {
-+    GstCaps *temp;
-+    enum PixelFormat i;
-+    AVCodecContext ctx = { 0, };
-+
-+    caps = gst_caps_new_empty ();
-+    for (i = 0; i < PIX_FMT_NB; i++) {
-+      ctx.width = -1;
-+      ctx.pix_fmt = i;
-+      temp = gst_ffmpeg_pixfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
-+      if (temp != NULL) {
-+        gst_caps_append (caps, temp);
-+      }
-+    }
-+  }
-+  return caps;
-+}
-+
-+/* Convert a FFMPEG codec Type and optional AVCodecContext
-+ * to a GstCaps. If the context is ommitted, no fixed values
-+ * for video/audio size will be included in the GstCaps
-+ *
-+ * AVMediaType is primarily meant for uncompressed data GstCaps!
-+ */
-+
-+GstCaps *
-+gst_ffmpeg_codectype_to_caps (enum AVMediaType codec_type,
-+    AVCodecContext * context, enum CodecID codec_id, gboolean encode)
-+{
-+  GstCaps *caps;
-+
-+  switch (codec_type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+      caps =
-+          gst_ffmpeg_codectype_to_video_caps (context, codec_id, encode, NULL);
-+      break;
-+    case AVMEDIA_TYPE_AUDIO:
-+      caps =
-+          gst_ffmpeg_codectype_to_audio_caps (context, codec_id, encode, NULL);
-+      break;
-+    default:
-+      caps = NULL;
-+      break;
-+  }
-+
-+  return caps;
-+}
-+
-+/* Convert a GstCaps (audio/raw) to a FFMPEG SampleFmt
-+ * and other audio properties in a AVCodecContext.
-+ *
-+ * For usefullness, see below
-+ */
-+
-+static void
-+gst_ffmpeg_caps_to_smpfmt (const GstCaps * caps,
-+    AVCodecContext * context, gboolean raw)
-+{
-+  GstStructure *structure;
-+  gint depth = 0, width = 0, endianness = 0;
-+  gboolean signedness = FALSE;
-+  const gchar *name;
-+
-+  g_return_if_fail (gst_caps_get_size (caps) == 1);
-+  structure = gst_caps_get_structure (caps, 0);
-+
-+  gst_structure_get_int (structure, "channels", &context->channels);
-+  gst_structure_get_int (structure, "rate", &context->sample_rate);
-+  gst_structure_get_int (structure, "block_align", &context->block_align);
-+  gst_structure_get_int (structure, "bitrate", &context->bit_rate);
-+
-+  if (!raw)
-+    return;
-+
-+  name = gst_structure_get_name (structure);
-+
-+  if (!strcmp (name, "audio/x-raw-float")) {
-+    /* FLOAT */
-+    if (gst_structure_get_int (structure, "width", &width) &&
-+        gst_structure_get_int (structure, "endianness", &endianness)) {
-+      if (endianness == G_BYTE_ORDER) {
-+        if (width == 32)
-+          context->sample_fmt = AV_SAMPLE_FMT_FLT;
-+        else if (width == 64)
-+          context->sample_fmt = AV_SAMPLE_FMT_DBL;
-+      }
-+    }
-+  } else {
-+    /* INT */
-+    if (gst_structure_get_int (structure, "width", &width) &&
-+        gst_structure_get_int (structure, "depth", &depth) &&
-+        gst_structure_get_boolean (structure, "signed", &signedness) &&
-+        gst_structure_get_int (structure, "endianness", &endianness)) {
-+      if ((endianness == G_BYTE_ORDER) && (signedness == TRUE)) {
-+        if ((width == 16) && (depth == 16))
-+          context->sample_fmt = AV_SAMPLE_FMT_S16;
-+        else if ((width == 32) && (depth == 32))
-+          context->sample_fmt = AV_SAMPLE_FMT_S32;
-+      }
-+    }
-+  }
-+}
-+
-+
-+/* Convert a GstCaps (video/raw) to a FFMPEG PixFmt
-+ * and other video properties in a AVCodecContext.
-+ *
-+ * For usefullness, see below
-+ */
-+
-+static void
-+gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
-+    AVCodecContext * context, gboolean raw)
-+{
-+  GstStructure *structure;
-+  const GValue *fps;
-+  const GValue *par = NULL;
-+
-+  GST_DEBUG ("converting caps %" GST_PTR_FORMAT, caps);
-+  g_return_if_fail (gst_caps_get_size (caps) == 1);
-+  structure = gst_caps_get_structure (caps, 0);
-+
-+  gst_structure_get_int (structure, "width", &context->width);
-+  gst_structure_get_int (structure, "height", &context->height);
-+  gst_structure_get_int (structure, "bpp", &context->bits_per_coded_sample);
-+
-+  fps = gst_structure_get_value (structure, "framerate");
-+  if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
-+
-+    /* somehow these seem mixed up.. */
-+    context->time_base.den = gst_value_get_fraction_numerator (fps);
-+    context->time_base.num = gst_value_get_fraction_denominator (fps);
-+    context->ticks_per_frame = 1;
-+
-+    GST_DEBUG ("setting framerate %d/%d = %lf",
-+        context->time_base.den, context->time_base.num,
-+        1. * context->time_base.den / context->time_base.num);
-+  }
-+
-+  par = gst_structure_get_value (structure, "pixel-aspect-ratio");
-+  if (par && GST_VALUE_HOLDS_FRACTION (par)) {
-+
-+    context->sample_aspect_ratio.num = gst_value_get_fraction_numerator (par);
-+    context->sample_aspect_ratio.den = gst_value_get_fraction_denominator (par);
-+
-+    GST_DEBUG ("setting pixel-aspect-ratio %d/%d = %lf",
-+        context->sample_aspect_ratio.den, context->sample_aspect_ratio.num,
-+        1. * context->sample_aspect_ratio.den /
-+        context->sample_aspect_ratio.num);
-+  }
-+
-+  if (!raw)
-+    return;
-+
-+  g_return_if_fail (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps));
-+
-+  if (strcmp (gst_structure_get_name (structure), "video/x-raw-yuv") == 0) {
-+    guint32 fourcc;
-+
-+    if (gst_structure_get_fourcc (structure, "format", &fourcc)) {
-+      switch (fourcc) {
-+        case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
-+          context->pix_fmt = PIX_FMT_YUYV422;
-+          break;
-+        case GST_MAKE_FOURCC ('I', '4', '2', '0'):
-+          context->pix_fmt = PIX_FMT_YUV420P;
-+          break;
-+        case GST_MAKE_FOURCC ('A', '4', '2', '0'):
-+          context->pix_fmt = PIX_FMT_YUVA420P;
-+          break;
-+        case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
-+          context->pix_fmt = PIX_FMT_YUV411P;
-+          break;
-+        case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
-+          context->pix_fmt = PIX_FMT_YUV422P;
-+          break;
-+        case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
-+          context->pix_fmt = PIX_FMT_YUV410P;
-+          break;
-+#if 0
-+        case FIXME:
-+          context->pix_fmt = PIX_FMT_YUV444P;
-+          break;
-+#endif
-+      }
-+    }
-+  } else if (strcmp (gst_structure_get_name (structure),
-+          "video/x-raw-rgb") == 0) {
-+    gint bpp = 0, rmask = 0, endianness = 0;
-+
-+    if (gst_structure_get_int (structure, "bpp", &bpp) &&
-+        gst_structure_get_int (structure, "endianness", &endianness)) {
-+      if (gst_structure_get_int (structure, "red_mask", &rmask)) {
-+        switch (bpp) {
-+          case 32:
-+#if (G_BYTE_ORDER == G_BIG_ENDIAN)
-+            if (rmask == 0x00ff0000)
-+#else
-+            if (rmask == 0x0000ff00)
-+#endif
-+              context->pix_fmt = PIX_FMT_RGB32;
-+            break;
-+          case 24:
-+            if (rmask == 0x0000FF)
-+              context->pix_fmt = PIX_FMT_BGR24;
-+            else
-+              context->pix_fmt = PIX_FMT_RGB24;
-+            break;
-+          case 16:
-+            if (endianness == G_BYTE_ORDER)
-+              context->pix_fmt = PIX_FMT_RGB565;
-+            break;
-+          case 15:
-+            if (endianness == G_BYTE_ORDER)
-+              context->pix_fmt = PIX_FMT_RGB555;
-+            break;
-+          default:
-+            /* nothing */
-+            break;
-+        }
-+      } else {
-+        if (bpp == 8) {
-+          context->pix_fmt = PIX_FMT_PAL8;
-+          gst_ffmpeg_get_palette (caps, context);
-+        }
-+      }
-+    }
-+  } else if (strcmp (gst_structure_get_name (structure),
-+          "video/x-raw-gray") == 0) {
-+    gint bpp = 0;
-+
-+    if (gst_structure_get_int (structure, "bpp", &bpp)) {
-+      switch (bpp) {
-+        case 8:
-+          context->pix_fmt = PIX_FMT_GRAY8;
-+          break;
-+      }
-+    }
-+  }
-+}
-+
-+/* Convert a GstCaps and a FFMPEG codec Type to a
-+ * AVCodecContext. If the context is ommitted, no fixed values
-+ * for video/audio size will be included in the context
-+ *
-+ * AVMediaType is primarily meant for uncompressed data GstCaps!
-+ */
-+
-+void
-+gst_ffmpeg_caps_with_codectype (enum AVMediaType type,
-+    const GstCaps * caps, AVCodecContext * context)
-+{
-+  if (context == NULL)
-+    return;
-+
-+  switch (type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+      gst_ffmpeg_caps_to_pixfmt (caps, context, TRUE);
-+      break;
-+
-+    case AVMEDIA_TYPE_AUDIO:
-+      gst_ffmpeg_caps_to_smpfmt (caps, context, TRUE);
-+      break;
-+
-+    default:
-+      /* unknown */
-+      break;
-+  }
-+}
-+
-+#if 0
-+static void
-+nal_escape (guint8 * dst, guint8 * src, guint size, guint * destsize)
-+{
-+  guint8 *dstp = dst;
-+  guint8 *srcp = src;
-+  guint8 *end = src + size;
-+  gint count = 0;
-+
-+  while (srcp < end) {
-+    if (count == 2 && *srcp <= 0x03) {
-+      GST_DEBUG ("added escape code");
-+      *dstp++ = 0x03;
-+      count = 0;
-+    }
-+    if (*srcp == 0)
-+      count++;
-+    else
-+      count = 0;
-+
-+    GST_DEBUG ("copy %02x, count %d", *srcp, count);
-+    *dstp++ = *srcp++;
-+  }
-+  *destsize = dstp - dst;
-+}
-+
-+/* copy the config, escaping NAL units as we iterate them, if something fails we
-+ * copy everything and hope for the best. */
-+static void
-+copy_config (guint8 * dst, guint8 * src, guint size, guint * destsize)
-+{
-+  guint8 *dstp = dst;
-+  guint8 *srcp = src;
-+  gint cnt, i;
-+  guint nalsize, esize;
-+
-+  /* check size */
-+  if (size < 7)
-+    goto full_copy;
-+
-+  /* check version */
-+  if (*srcp != 1)
-+    goto full_copy;
-+
-+  cnt = *(srcp + 5) & 0x1f;     /* Number of sps */
-+
-+  GST_DEBUG ("num SPS %d", cnt);
-+
-+  memcpy (dstp, srcp, 6);
-+  srcp += 6;
-+  dstp += 6;
-+
-+  for (i = 0; i < cnt; i++) {
-+    GST_DEBUG ("copy SPS %d", i);
-+    nalsize = (srcp[0] << 8) | srcp[1];
-+    nal_escape (dstp + 2, srcp + 2, nalsize, &esize);
-+    dstp[0] = esize >> 8;
-+    dstp[1] = esize & 0xff;
-+    dstp += esize + 2;
-+    srcp += nalsize + 2;
-+  }
-+
-+  cnt = *(dstp++) = *(srcp++);  /* Number of pps */
-+
-+  GST_DEBUG ("num PPS %d", cnt);
-+
-+  for (i = 0; i < cnt; i++) {
-+    GST_DEBUG ("copy PPS %d", i);
-+    nalsize = (srcp[0] << 8) | srcp[1];
-+    nal_escape (dstp + 2, srcp + 2, nalsize, &esize);
-+    dstp[0] = esize >> 8;
-+    dstp[1] = esize & 0xff;
-+    dstp += esize + 2;
-+    srcp += nalsize + 2;
-+  }
-+  *destsize = dstp - dst;
-+
-+  return;
-+
-+full_copy:
-+  {
-+    GST_DEBUG ("something unexpected, doing full copy");
-+    memcpy (dst, src, size);
-+    *destsize = size;
-+    return;
-+  }
-+}
-+#endif
-+
-+/*
-+ * caps_with_codecid () transforms a GstCaps for a known codec
-+ * ID into a filled-in context.
-+ * codec_data from caps will override possible extradata already in the context
-+ */
-+
-+void
-+gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
-+    enum AVMediaType codec_type, const GstCaps * caps, AVCodecContext * context)
-+{
-+  GstStructure *str;
-+  const GValue *value;
-+  const GstBuffer *buf;
-+
-+  GST_LOG ("codec_id:%d, codec_type:%d, caps:%" GST_PTR_FORMAT " context:%p",
-+      codec_id, codec_type, caps, context);
-+
-+  if (!context || !gst_caps_get_size (caps))
-+    return;
-+
-+  str = gst_caps_get_structure (caps, 0);
-+
-+  /* extradata parsing (esds [mpeg4], wma/wmv, msmpeg4v1/2/3, etc.) */
-+  if ((value = gst_structure_get_value (str, "codec_data"))) {
-+    guint size;
-+    guint8 *data;
-+
-+    buf = GST_BUFFER_CAST (gst_value_get_mini_object (value));
-+    size = GST_BUFFER_SIZE (buf);
-+    data = GST_BUFFER_DATA (buf);
-+
-+    /* free the old one if it is there */
-+    if (context->extradata)
-+      av_free (context->extradata);
-+
-+#if 0
-+    if (codec_id == CODEC_ID_H264) {
-+      guint extrasize;
-+
-+      GST_DEBUG ("copy, escaping codec_data %d", size);
-+      /* ffmpeg h264 expects the codec_data to be escaped, there is no real
-+       * reason for this but let's just escape it for now. Start by allocating
-+       * enough space, x2 is more than enough.
-+       *
-+       * FIXME, we disabled escaping because some file already contain escaped
-+       * codec_data and then we escape twice and fail. It's better to leave it
-+       * as is, as that is what most players do. */
-+      context->extradata =
-+          av_mallocz (GST_ROUND_UP_16 (size * 2 +
-+              FF_INPUT_BUFFER_PADDING_SIZE));
-+      copy_config (context->extradata, data, size, &extrasize);
-+      GST_DEBUG ("escaped size: %d", extrasize);
-+      context->extradata_size = extrasize;
-+    } else
-+#endif
-+    {
-+      /* allocate with enough padding */
-+      GST_DEBUG ("copy codec_data");
-+      context->extradata =
-+          av_mallocz (GST_ROUND_UP_16 (size + FF_INPUT_BUFFER_PADDING_SIZE));
-+      memcpy (context->extradata, data, size);
-+      context->extradata_size = size;
-+    }
-+
-+    /* Hack for VC1. Sometimes the first (length) byte is 0 for some files */
-+    if (codec_id == CODEC_ID_VC1 && size > 0 && data[0] == 0) {
-+      context->extradata[0] = (guint8) size;
-+    }
-+
-+    GST_DEBUG ("have codec data of size %d", size);
-+  } else if (context->extradata == NULL && codec_id != CODEC_ID_AAC_LATM &&
-+      codec_id != CODEC_ID_FLAC) {
-+    /* no extradata, alloc dummy with 0 sized, some codecs insist on reading
-+     * extradata anyway which makes then segfault. */
-+    context->extradata =
-+        av_mallocz (GST_ROUND_UP_16 (FF_INPUT_BUFFER_PADDING_SIZE));
-+    context->extradata_size = 0;
-+    GST_DEBUG ("no codec data");
-+  }
-+
-+  switch (codec_id) {
-+    case CODEC_ID_MPEG4:
-+    {
-+      const gchar *mime = gst_structure_get_name (str);
-+
-+      if (!strcmp (mime, "video/x-divx"))
-+        context->codec_tag = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
-+      else if (!strcmp (mime, "video/x-xvid"))
-+        context->codec_tag = GST_MAKE_FOURCC ('X', 'V', 'I', 'D');
-+      else if (!strcmp (mime, "video/x-3ivx"))
-+        context->codec_tag = GST_MAKE_FOURCC ('3', 'I', 'V', '1');
-+      else if (!strcmp (mime, "video/mpeg"))
-+        context->codec_tag = GST_MAKE_FOURCC ('m', 'p', '4', 'v');
-+    }
-+      break;
-+
-+    case CODEC_ID_SVQ3:
-+      /* FIXME: this is a workaround for older gst-plugins releases
-+       * (<= 0.8.9). This should be removed at some point, because
-+       * it causes wrong decoded frame order. */
-+      if (!context->extradata) {
-+        gint halfpel_flag, thirdpel_flag, low_delay, unknown_svq3_flag;
-+        guint16 flags;
-+
-+        if (gst_structure_get_int (str, "halfpel_flag", &halfpel_flag) ||
-+            gst_structure_get_int (str, "thirdpel_flag", &thirdpel_flag) ||
-+            gst_structure_get_int (str, "low_delay", &low_delay) ||
-+            gst_structure_get_int (str, "unknown_svq3_flag",
-+                &unknown_svq3_flag)) {
-+          context->extradata = (guint8 *) av_mallocz (0x64);
-+          g_stpcpy ((gchar *) context->extradata, "SVQ3");
-+          flags = 1 << 3;
-+          flags |= low_delay;
-+          flags = flags << 2;
-+          flags |= unknown_svq3_flag;
-+          flags = flags << 6;
-+          flags |= halfpel_flag;
-+          flags = flags << 1;
-+          flags |= thirdpel_flag;
-+          flags = flags << 3;
-+
-+          flags = GUINT16_FROM_LE (flags);
-+
-+          memcpy ((gchar *) context->extradata + 0x62, &flags, 2);
-+          context->extradata_size = 0x64;
-+        }
-+      }
-+      break;
-+
-+    case CODEC_ID_MSRLE:
-+    case CODEC_ID_QTRLE:
-+    case CODEC_ID_TSCC:
-+    case CODEC_ID_CSCD:
-+    case CODEC_ID_APE:
-+    {
-+      gint depth;
-+
-+      if (gst_structure_get_int (str, "depth", &depth)) {
-+        context->bits_per_coded_sample = depth;
-+      } else {
-+        GST_WARNING ("No depth field in caps %" GST_PTR_FORMAT, caps);
-+      }
-+
-+    }
-+      break;
-+
-+    case CODEC_ID_RV10:
-+    case CODEC_ID_RV20:
-+    case CODEC_ID_RV30:
-+    case CODEC_ID_RV40:
-+    {
-+      gint format;
-+
-+      if (gst_structure_get_int (str, "format", &format))
-+        context->sub_id = format;
-+
-+      break;
-+    }
-+    case CODEC_ID_COOK:
-+    case CODEC_ID_RA_288:
-+    case CODEC_ID_RA_144:
-+    case CODEC_ID_SIPR:
-+    {
-+      gint leaf_size;
-+      gint bitrate;
-+
-+      if (gst_structure_get_int (str, "leaf_size", &leaf_size))
-+        context->block_align = leaf_size;
-+      if (gst_structure_get_int (str, "bitrate", &bitrate))
-+        context->bit_rate = bitrate;
-+    }
-+    case CODEC_ID_ALAC:
-+      gst_structure_get_int (str, "samplesize",
-+          &context->bits_per_coded_sample);
-+      break;
-+
-+    case CODEC_ID_DVVIDEO:
-+    {
-+      guint32 fourcc;
-+
-+      if (gst_structure_get_fourcc (str, "format", &fourcc))
-+        switch (fourcc) {
-+          case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
-+            context->pix_fmt = PIX_FMT_YUYV422;
-+            break;
-+          case GST_MAKE_FOURCC ('I', '4', '2', '0'):
-+            context->pix_fmt = PIX_FMT_YUV420P;
-+            break;
-+          case GST_MAKE_FOURCC ('A', '4', '2', '0'):
-+            context->pix_fmt = PIX_FMT_YUVA420P;
-+            break;
-+          case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
-+            context->pix_fmt = PIX_FMT_YUV411P;
-+            break;
-+          case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
-+            context->pix_fmt = PIX_FMT_YUV422P;
-+            break;
-+          case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
-+            context->pix_fmt = PIX_FMT_YUV410P;
-+            break;
-+          default:
-+            GST_WARNING ("couldn't convert fourcc %" GST_FOURCC_FORMAT
-+                " to a pixel format", GST_FOURCC_ARGS (fourcc));
-+            break;
-+        }
-+      break;
-+    }
-+    case CODEC_ID_H263P:
-+    {
-+      gboolean val;
-+
-+      if (!gst_structure_get_boolean (str, "annex-f", &val) || val)
-+        context->flags |= CODEC_FLAG_4MV;
-+      else
-+        context->flags &= ~CODEC_FLAG_4MV;
-+      if ((!gst_structure_get_boolean (str, "annex-i", &val) || val) &&
-+          (!gst_structure_get_boolean (str, "annex-t", &val) || val))
-+        context->flags |= CODEC_FLAG_AC_PRED;
-+      else
-+        context->flags &= ~CODEC_FLAG_AC_PRED;
-+      if (!gst_structure_get_boolean (str, "annex-j", &val) || val)
-+        context->flags |= CODEC_FLAG_LOOP_FILTER;
-+      else
-+        context->flags &= ~CODEC_FLAG_LOOP_FILTER;
-+      break;
-+    }
-+    case CODEC_ID_ADPCM_G726:
-+    {
-+      const gchar *layout;
-+
-+      if ((layout = gst_structure_get_string (str, "layout"))) {
-+        if (!strcmp (layout, "g721")) {
-+          context->sample_rate = 8000;
-+          context->channels = 1;
-+          context->bit_rate = 32000;
-+        }
-+      }
-+      break;
-+    }
-+    default:
-+      break;
-+  }
-+
-+  if (!gst_caps_is_fixed (caps))
-+    return;
-+
-+  /* common properties (width, height, fps) */
-+  switch (codec_type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+      gst_ffmpeg_caps_to_pixfmt (caps, context, codec_id == CODEC_ID_RAWVIDEO);
-+      gst_ffmpeg_get_palette (caps, context);
-+      break;
-+    case AVMEDIA_TYPE_AUDIO:
-+      gst_ffmpeg_caps_to_smpfmt (caps, context, FALSE);
-+      break;
-+    default:
-+      break;
-+  }
-+
-+  /* fixup of default settings */
-+  switch (codec_id) {
-+    case CODEC_ID_QCELP:
-+      /* QCELP is always mono, no matter what the caps say */
-+      context->channels = 1;
-+      break;
-+    default:
-+      break;
-+  }
-+}
-+
-+/* _formatid_to_caps () is meant for muxers/demuxers, it
-+ * transforms a name (ffmpeg way of ID'ing these, why don't
-+ * they have unique numerical IDs?) to the corresponding
-+ * caps belonging to that mux-format
-+ *
-+ * Note: we don't need any additional info because the caps
-+ * isn't supposed to contain any useful info besides the
-+ * media type anyway
-+ */
-+
-+GstCaps *
-+gst_ffmpeg_formatid_to_caps (const gchar * format_name)
-+{
-+  GstCaps *caps = NULL;
-+
-+  if (!strcmp (format_name, "mpeg")) {
-+    caps = gst_caps_new_simple ("video/mpeg",
-+        "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
-+  } else if (!strcmp (format_name, "mpegts")) {
-+    caps = gst_caps_new_simple ("video/mpegts",
-+        "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
-+  } else if (!strcmp (format_name, "rm")) {
-+    caps = gst_caps_new_simple ("application/x-pn-realmedia",
-+        "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
-+  } else if (!strcmp (format_name, "asf")) {
-+    caps = gst_caps_new_simple ("video/x-ms-asf", NULL);
-+  } else if (!strcmp (format_name, "avi")) {
-+    caps = gst_caps_new_simple ("video/x-msvideo", NULL);
-+  } else if (!strcmp (format_name, "wav")) {
-+    caps = gst_caps_new_simple ("audio/x-wav", NULL);
-+  } else if (!strcmp (format_name, "ape")) {
-+    caps = gst_caps_new_simple ("application/x-ape", NULL);
-+  } else if (!strcmp (format_name, "swf")) {
-+    caps = gst_caps_new_simple ("application/x-shockwave-flash", NULL);
-+  } else if (!strcmp (format_name, "au")) {
-+    caps = gst_caps_new_simple ("audio/x-au", NULL);
-+  } else if (!strcmp (format_name, "dv")) {
-+    caps = gst_caps_new_simple ("video/x-dv",
-+        "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
-+  } else if (!strcmp (format_name, "4xm")) {
-+    caps = gst_caps_new_simple ("video/x-4xm", NULL);
-+  } else if (!strcmp (format_name, "matroska")) {
-+    caps = gst_caps_new_simple ("video/x-matroska", NULL);
-+  } else if (!strcmp (format_name, "mp3")) {
-+    caps = gst_caps_new_simple ("application/x-id3", NULL);
-+  } else if (!strcmp (format_name, "flic")) {
-+    caps = gst_caps_new_simple ("video/x-fli", NULL);
-+  } else if (!strcmp (format_name, "flv")) {
-+    caps = gst_caps_new_simple ("video/x-flv", NULL);
-+  } else if (!strcmp (format_name, "tta")) {
-+    caps = gst_caps_new_simple ("audio/x-ttafile", NULL);
-+  } else if (!strcmp (format_name, "aiff")) {
-+    caps = gst_caps_new_simple ("audio/x-aiff", NULL);
-+  } else if (!strcmp (format_name, "mov_mp4_m4a_3gp_3g2")) {
-+    caps =
-+        gst_caps_from_string
-+        ("application/x-3gp; video/quicktime; audio/x-m4a");
-+  } else if (!strcmp (format_name, "mov")) {
-+    caps = gst_caps_from_string ("video/quicktime,variant=(string)apple");
-+  } else if (!strcmp (format_name, "mp4")) {
-+    caps = gst_caps_from_string ("video/quicktime,variant=(string)iso");
-+  } else if (!strcmp (format_name, "3gp")) {
-+    caps = gst_caps_from_string ("video/quicktime,variant=(string)3gpp");
-+  } else if (!strcmp (format_name, "3g2")) {
-+    caps = gst_caps_from_string ("video/quicktime,variant=(string)3g2");
-+  } else if (!strcmp (format_name, "psp")) {
-+    caps = gst_caps_from_string ("video/quicktime,variant=(string)psp");
-+  } else if (!strcmp (format_name, "ipod")) {
-+    caps = gst_caps_from_string ("video/quicktime,variant=(string)ipod");
-+  } else if (!strcmp (format_name, "aac")) {
-+    caps = gst_caps_new_simple ("audio/mpeg",
-+        "mpegversion", G_TYPE_INT, 4, NULL);
-+  } else if (!strcmp (format_name, "gif")) {
-+    caps = gst_caps_from_string ("image/gif");
-+  } else if (!strcmp (format_name, "ogg")) {
-+    caps = gst_caps_from_string ("application/ogg");
-+  } else if (!strcmp (format_name, "mxf") || !strcmp (format_name, "mxf_d10")) {
-+    caps = gst_caps_from_string ("application/mxf");
-+  } else if (!strcmp (format_name, "gxf")) {
-+    caps = gst_caps_from_string ("application/gxf");
-+  } else if (!strcmp (format_name, "yuv4mpegpipe")) {
-+    caps = gst_caps_new_simple ("application/x-yuv4mpeg",
-+        "y4mversion", G_TYPE_INT, 2, NULL);
-+  } else if (!strcmp (format_name, "mpc")) {
-+    caps = gst_caps_from_string ("audio/x-musepack, streamversion = (int) 7");
-+  } else if (!strcmp (format_name, "vqf")) {
-+    caps = gst_caps_from_string ("audio/x-vqf");
-+  } else if (!strcmp (format_name, "nsv")) {
-+    caps = gst_caps_from_string ("video/x-nsv");
-+  } else if (!strcmp (format_name, "amr")) {
-+    caps = gst_caps_from_string ("audio/x-amr-nb-sh");
-+  } else if (!strcmp (format_name, "webm")) {
-+    caps = gst_caps_from_string ("video/webm");
-+  } else {
-+    gchar *name;
-+
-+    GST_LOG ("Could not create stream format caps for %s", format_name);
-+    name = g_strdup_printf ("application/x-gst_ff-%s", format_name);
-+    caps = gst_caps_new_simple (name, NULL);
-+    g_free (name);
-+  }
-+
-+  return caps;
-+}
-+
-+gboolean
-+gst_ffmpeg_formatid_get_codecids (const gchar * format_name,
-+    enum CodecID ** video_codec_list, enum CodecID ** audio_codec_list,
-+    AVOutputFormat * plugin)
-+{
-+  static enum CodecID tmp_vlist[] = {
-+    CODEC_ID_NONE,
-+    CODEC_ID_NONE
-+  };
-+  static enum CodecID tmp_alist[] = {
-+    CODEC_ID_NONE,
-+    CODEC_ID_NONE
-+  };
-+
-+  GST_LOG ("format_name : %s", format_name);
-+
-+  if (!strcmp (format_name, "mp4")) {
-+    static enum CodecID mp4_video_list[] = {
-+      CODEC_ID_MPEG4, CODEC_ID_H264,
-+      CODEC_ID_MJPEG,
-+      CODEC_ID_NONE
-+    };
-+    static enum CodecID mp4_audio_list[] = {
-+      CODEC_ID_AAC, CODEC_ID_MP3,
-+      CODEC_ID_NONE
-+    };
-+
-+    *video_codec_list = mp4_video_list;
-+    *audio_codec_list = mp4_audio_list;
-+  } else if (!strcmp (format_name, "mpeg")) {
-+    static enum CodecID mpeg_video_list[] = { CODEC_ID_MPEG1VIDEO,
-+      CODEC_ID_MPEG2VIDEO,
-+      CODEC_ID_H264,
-+      CODEC_ID_NONE
-+    };
-+    static enum CodecID mpeg_audio_list[] = { CODEC_ID_MP1,
-+      CODEC_ID_MP2,
-+      CODEC_ID_MP3,
-+      CODEC_ID_NONE
-+    };
-+
-+    *video_codec_list = mpeg_video_list;
-+    *audio_codec_list = mpeg_audio_list;
-+  } else if (!strcmp (format_name, "dvd")) {
-+    static enum CodecID mpeg_video_list[] = { CODEC_ID_MPEG2VIDEO,
-+      CODEC_ID_NONE
-+    };
-+    static enum CodecID mpeg_audio_list[] = { CODEC_ID_MP2,
-+      CODEC_ID_AC3,
-+      CODEC_ID_DTS,
-+      CODEC_ID_PCM_S16BE,
-+      CODEC_ID_NONE
-+    };
-+
-+    *video_codec_list = mpeg_video_list;
-+    *audio_codec_list = mpeg_audio_list;
-+  } else if (!strcmp (format_name, "mpegts")) {
-+    static enum CodecID mpegts_video_list[] = { CODEC_ID_MPEG1VIDEO,
-+      CODEC_ID_MPEG2VIDEO,
-+      CODEC_ID_H264,
-+      CODEC_ID_NONE
-+    };
-+    static enum CodecID mpegts_audio_list[] = { CODEC_ID_MP2,
-+      CODEC_ID_MP3,
-+      CODEC_ID_AC3,
-+      CODEC_ID_DTS,
-+      CODEC_ID_AAC,
-+      CODEC_ID_NONE
-+    };
-+
-+    *video_codec_list = mpegts_video_list;
-+    *audio_codec_list = mpegts_audio_list;
-+  } else if (!strcmp (format_name, "vob")) {
-+    static enum CodecID vob_video_list[] =
-+        { CODEC_ID_MPEG2VIDEO, CODEC_ID_NONE };
-+    static enum CodecID vob_audio_list[] = { CODEC_ID_MP2, CODEC_ID_AC3,
-+      CODEC_ID_DTS, CODEC_ID_NONE
-+    };
-+
-+    *video_codec_list = vob_video_list;
-+    *audio_codec_list = vob_audio_list;
-+  } else if (!strcmp (format_name, "flv")) {
-+    static enum CodecID flv_video_list[] = { CODEC_ID_FLV1, CODEC_ID_NONE };
-+    static enum CodecID flv_audio_list[] = { CODEC_ID_MP3, CODEC_ID_NONE };
-+
-+    *video_codec_list = flv_video_list;
-+    *audio_codec_list = flv_audio_list;
-+  } else if (!strcmp (format_name, "asf")) {
-+    static enum CodecID asf_video_list[] =
-+        { CODEC_ID_WMV1, CODEC_ID_WMV2, CODEC_ID_MSMPEG4V3, CODEC_ID_NONE };
-+    static enum CodecID asf_audio_list[] =
-+        { CODEC_ID_WMAV1, CODEC_ID_WMAV2, CODEC_ID_MP3, CODEC_ID_NONE };
-+
-+    *video_codec_list = asf_video_list;
-+    *audio_codec_list = asf_audio_list;
-+  } else if (!strcmp (format_name, "dv")) {
-+    static enum CodecID dv_video_list[] = { CODEC_ID_DVVIDEO, CODEC_ID_NONE };
-+    static enum CodecID dv_audio_list[] = { CODEC_ID_PCM_S16LE, CODEC_ID_NONE };
-+
-+    *video_codec_list = dv_video_list;
-+    *audio_codec_list = dv_audio_list;
-+  } else if (!strcmp (format_name, "mov")) {
-+    static enum CodecID mov_video_list[] = {
-+      CODEC_ID_SVQ1, CODEC_ID_SVQ3, CODEC_ID_MPEG4,
-+      CODEC_ID_H263, CODEC_ID_H263P,
-+      CODEC_ID_H264, CODEC_ID_DVVIDEO,
-+      CODEC_ID_MJPEG,
-+      CODEC_ID_NONE
-+    };
-+    static enum CodecID mov_audio_list[] = {
-+      CODEC_ID_PCM_MULAW, CODEC_ID_PCM_ALAW, CODEC_ID_ADPCM_IMA_QT,
-+      CODEC_ID_MACE3, CODEC_ID_MACE6, CODEC_ID_AAC,
-+      CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
-+      CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE,
-+      CODEC_ID_MP3, CODEC_ID_NONE
-+    };
-+
-+    *video_codec_list = mov_video_list;
-+    *audio_codec_list = mov_audio_list;
-+  } else if ((!strcmp (format_name, "3gp") || !strcmp (format_name, "3g2"))) {
-+    static enum CodecID tgp_video_list[] = {
-+      CODEC_ID_MPEG4, CODEC_ID_H263, CODEC_ID_H263P, CODEC_ID_H264,
-+      CODEC_ID_NONE
-+    };
-+    static enum CodecID tgp_audio_list[] = {
-+      CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
-+      CODEC_ID_AAC,
-+      CODEC_ID_NONE
-+    };
-+
-+    *video_codec_list = tgp_video_list;
-+    *audio_codec_list = tgp_audio_list;
-+  } else if (!strcmp (format_name, "mmf")) {
-+    static enum CodecID mmf_audio_list[] = {
-+      CODEC_ID_ADPCM_YAMAHA, CODEC_ID_NONE
-+    };
-+    *video_codec_list = NULL;
-+    *audio_codec_list = mmf_audio_list;
-+  } else if (!strcmp (format_name, "amr")) {
-+    static enum CodecID amr_audio_list[] = {
-+      CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
-+      CODEC_ID_NONE
-+    };
-+    *video_codec_list = NULL;
-+    *audio_codec_list = amr_audio_list;
-+  } else if (!strcmp (format_name, "gif")) {
-+    static enum CodecID gif_image_list[] = {
-+      CODEC_ID_RAWVIDEO, CODEC_ID_NONE
-+    };
-+    *video_codec_list = gif_image_list;
-+    *audio_codec_list = NULL;
-+  } else if ((plugin->audio_codec != CODEC_ID_NONE) ||
-+      (plugin->video_codec != CODEC_ID_NONE)) {
-+    tmp_vlist[0] = plugin->video_codec;
-+    tmp_alist[0] = plugin->audio_codec;
-+
-+    *video_codec_list = tmp_vlist;
-+    *audio_codec_list = tmp_alist;
-+  } else {
-+    GST_LOG ("Format %s not found", format_name);
-+    return FALSE;
-+  }
-+
-+  return TRUE;
-+}
-+
-+/* Convert a GstCaps to a FFMPEG codec ID. Size et all
-+ * are omitted, that can be queried by the user itself,
-+ * we're not eating the GstCaps or anything
-+ * A pointer to an allocated context is also needed for
-+ * optional extra info
-+ */
-+
-+enum CodecID
-+gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
-+{
-+  enum CodecID id = CODEC_ID_NONE;
-+  const gchar *mimetype;
-+  const GstStructure *structure;
-+  gboolean video = FALSE, audio = FALSE;        /* we want to be sure! */
-+
-+  g_return_val_if_fail (caps != NULL, CODEC_ID_NONE);
-+  g_return_val_if_fail (gst_caps_get_size (caps) == 1, CODEC_ID_NONE);
-+  structure = gst_caps_get_structure (caps, 0);
-+
-+  mimetype = gst_structure_get_name (structure);
-+
-+  if (!strcmp (mimetype, "video/x-raw-rgb") ||
-+      !strcmp (mimetype, "video/x-raw-yuv")) {
-+    id = CODEC_ID_RAWVIDEO;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-raw-int")) {
-+    gint depth, width, endianness;
-+    gboolean signedness;
-+
-+    if (gst_structure_get_int (structure, "endianness", &endianness) &&
-+        gst_structure_get_boolean (structure, "signed", &signedness) &&
-+        gst_structure_get_int (structure, "width", &width) &&
-+        gst_structure_get_int (structure, "depth", &depth) && depth == width) {
-+      switch (depth) {
-+        case 8:
-+          if (signedness) {
-+            id = CODEC_ID_PCM_S8;
-+          } else {
-+            id = CODEC_ID_PCM_U8;
-+          }
-+          break;
-+        case 16:
-+          switch (endianness) {
-+            case G_BIG_ENDIAN:
-+              if (signedness) {
-+                id = CODEC_ID_PCM_S16BE;
-+              } else {
-+                id = CODEC_ID_PCM_U16BE;
-+              }
-+              break;
-+            case G_LITTLE_ENDIAN:
-+              if (signedness) {
-+                id = CODEC_ID_PCM_S16LE;
-+              } else {
-+                id = CODEC_ID_PCM_U16LE;
-+              }
-+              break;
-+          }
-+          break;
-+      }
-+      if (id != CODEC_ID_NONE)
-+        audio = TRUE;
-+    }
-+  } else if (!strcmp (mimetype, "audio/x-mulaw")) {
-+    id = CODEC_ID_PCM_MULAW;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-alaw")) {
-+    id = CODEC_ID_PCM_ALAW;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-dv")) {
-+    gboolean sys_strm;
-+
-+    if (gst_structure_get_boolean (structure, "systemstream", &sys_strm) &&
-+        !sys_strm) {
-+      id = CODEC_ID_DVVIDEO;
-+      video = TRUE;
-+    }
-+  } else if (!strcmp (mimetype, "audio/x-dv")) {        /* ??? */
-+    id = CODEC_ID_DVAUDIO;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-h263")) {
-+    const gchar *h263version =
-+        gst_structure_get_string (structure, "h263version");
-+    if (h263version && !strcmp (h263version, "h263p"))
-+      id = CODEC_ID_H263P;
-+    else
-+      id = CODEC_ID_H263;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-intel-h263")) {
-+    id = CODEC_ID_H263I;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-h261")) {
-+    id = CODEC_ID_H261;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/mpeg")) {
-+    gboolean sys_strm;
-+    gint mpegversion;
-+
-+    if (gst_structure_get_boolean (structure, "systemstream", &sys_strm) &&
-+        gst_structure_get_int (structure, "mpegversion", &mpegversion) &&
-+        !sys_strm) {
-+      switch (mpegversion) {
-+        case 1:
-+          id = CODEC_ID_MPEG1VIDEO;
-+          break;
-+        case 2:
-+          id = CODEC_ID_MPEG2VIDEO;
-+          break;
-+        case 4:
-+          id = CODEC_ID_MPEG4;
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      video = TRUE;
-+  } else if (!strcmp (mimetype, "image/jpeg")) {
-+    id = CODEC_ID_MJPEG;        /* A... B... */
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-jpeg-b")) {
-+    id = CODEC_ID_MJPEGB;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-wmv")) {
-+    gint wmvversion = 0;
-+
-+    if (gst_structure_get_int (structure, "wmvversion", &wmvversion)) {
-+      switch (wmvversion) {
-+        case 1:
-+          id = CODEC_ID_WMV1;
-+          break;
-+        case 2:
-+          id = CODEC_ID_WMV2;
-+          break;
-+        case 3:
-+        {
-+          guint32 fourcc;
-+
-+          /* WMV3 unless the fourcc exists and says otherwise */
-+          id = CODEC_ID_WMV3;
-+
-+          if (gst_structure_get_fourcc (structure, "format", &fourcc)) {
-+            if ((fourcc == GST_MAKE_FOURCC ('W', 'V', 'C', '1')) ||
-+                (fourcc == GST_MAKE_FOURCC ('W', 'M', 'V', 'A'))) {
-+              id = CODEC_ID_VC1;
-+            }
-+          }
-+        }
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      video = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-vorbis")) {
-+    id = CODEC_ID_VORBIS;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-qdm2")) {
-+    id = CODEC_ID_QDM2;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/mpeg")) {
-+    gint layer = 0;
-+    gint mpegversion = 0;
-+
-+    if (gst_structure_get_int (structure, "mpegversion", &mpegversion)) {
-+      switch (mpegversion) {
-+        case 2:                /* ffmpeg uses faad for both... */
-+        case 4:
-+          id = CODEC_ID_AAC;
-+          break;
-+        case 1:
-+          if (gst_structure_get_int (structure, "layer", &layer)) {
-+            switch (layer) {
-+              case 1:
-+                id = CODEC_ID_MP1;
-+                break;
-+              case 2:
-+                id = CODEC_ID_MP2;
-+                break;
-+              case 3:
-+                id = CODEC_ID_MP3;
-+                break;
-+            }
-+          }
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-musepack")) {
-+    gint streamversion = -1;
-+
-+    if (gst_structure_get_int (structure, "streamversion", &streamversion)) {
-+      if (streamversion == 7)
-+        id = CODEC_ID_MUSEPACK7;
-+    } else {
-+      id = CODEC_ID_MUSEPACK7;
-+    }
-+  } else if (!strcmp (mimetype, "audio/x-wma")) {
-+    gint wmaversion = 0;
-+
-+    if (gst_structure_get_int (structure, "wmaversion", &wmaversion)) {
-+      switch (wmaversion) {
-+        case 1:
-+          id = CODEC_ID_WMAV1;
-+          break;
-+        case 2:
-+          id = CODEC_ID_WMAV2;
-+          break;
-+        case 3:
-+          id = CODEC_ID_WMAPRO;
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-wms")) {
-+    id = CODEC_ID_WMAVOICE;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-ac3")) {
-+    id = CODEC_ID_AC3;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-eac3")) {
-+    id = CODEC_ID_EAC3;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-vnd.sony.atrac3") ||
-+      !strcmp (mimetype, "audio/atrac3")) {
-+    id = CODEC_ID_ATRAC3;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-dts")) {
-+    id = CODEC_ID_DTS;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "application/x-ape")) {
-+    id = CODEC_ID_APE;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-msmpeg")) {
-+    gint msmpegversion = 0;
-+
-+    if (gst_structure_get_int (structure, "msmpegversion", &msmpegversion)) {
-+      switch (msmpegversion) {
-+        case 41:
-+          id = CODEC_ID_MSMPEG4V1;
-+          break;
-+        case 42:
-+          id = CODEC_ID_MSMPEG4V2;
-+          break;
-+        case 43:
-+          id = CODEC_ID_MSMPEG4V3;
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-svq")) {
-+    gint svqversion = 0;
-+
-+    if (gst_structure_get_int (structure, "svqversion", &svqversion)) {
-+      switch (svqversion) {
-+        case 1:
-+          id = CODEC_ID_SVQ1;
-+          break;
-+        case 3:
-+          id = CODEC_ID_SVQ3;
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-huffyuv")) {
-+    id = CODEC_ID_HUFFYUV;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-mace")) {
-+    gint maceversion = 0;
-+
-+    if (gst_structure_get_int (structure, "maceversion", &maceversion)) {
-+      switch (maceversion) {
-+        case 3:
-+          id = CODEC_ID_MACE3;
-+          break;
-+        case 6:
-+          id = CODEC_ID_MACE6;
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      audio = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-theora")) {
-+    id = CODEC_ID_THEORA;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-vp3")) {
-+    id = CODEC_ID_VP3;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-vp5")) {
-+    id = CODEC_ID_VP5;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-vp6")) {
-+    id = CODEC_ID_VP6;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-vp6-flash")) {
-+    id = CODEC_ID_VP6F;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-vp6-alpha")) {
-+    id = CODEC_ID_VP6A;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-vp8")) {
-+    id = CODEC_ID_VP8;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-flash-screen")) {
-+    id = CODEC_ID_FLASHSV;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-indeo")) {
-+    gint indeoversion = 0;
-+
-+    if (gst_structure_get_int (structure, "indeoversion", &indeoversion)) {
-+      switch (indeoversion) {
-+        case 5:
-+          id = CODEC_ID_INDEO5;
-+          break;
-+        case 3:
-+          id = CODEC_ID_INDEO3;
-+          break;
-+        case 2:
-+          id = CODEC_ID_INDEO2;
-+          break;
-+      }
-+      if (id != CODEC_ID_NONE)
-+        video = TRUE;
-+    }
-+  } else if (!strcmp (mimetype, "video/x-divx")) {
-+    gint divxversion = 0;
-+
-+    if (gst_structure_get_int (structure, "divxversion", &divxversion)) {
-+      switch (divxversion) {
-+        case 3:
-+          id = CODEC_ID_MSMPEG4V3;
-+          break;
-+        case 4:
-+        case 5:
-+          id = CODEC_ID_MPEG4;
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-3ivx")) {
-+    id = CODEC_ID_MPEG4;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-xvid")) {
-+    id = CODEC_ID_MPEG4;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-ffv")) {
-+    gint ffvversion = 0;
-+
-+    if (gst_structure_get_int (structure, "ffvversion", &ffvversion) &&
-+        ffvversion == 1) {
-+      id = CODEC_ID_FFV1;
-+      video = TRUE;
-+    }
-+  } else if (!strcmp (mimetype, "audio/x-adpcm")) {
-+    const gchar *layout;
-+
-+    layout = gst_structure_get_string (structure, "layout");
-+    if (layout == NULL) {
-+      /* break */
-+    } else if (!strcmp (layout, "quicktime")) {
-+      id = CODEC_ID_ADPCM_IMA_QT;
-+    } else if (!strcmp (layout, "microsoft")) {
-+      id = CODEC_ID_ADPCM_MS;
-+    } else if (!strcmp (layout, "dvi")) {
-+      id = CODEC_ID_ADPCM_IMA_WAV;
-+    } else if (!strcmp (layout, "4xm")) {
-+      id = CODEC_ID_ADPCM_4XM;
-+    } else if (!strcmp (layout, "smjpeg")) {
-+      id = CODEC_ID_ADPCM_IMA_SMJPEG;
-+    } else if (!strcmp (layout, "dk3")) {
-+      id = CODEC_ID_ADPCM_IMA_DK3;
-+    } else if (!strcmp (layout, "dk4")) {
-+      id = CODEC_ID_ADPCM_IMA_DK4;
-+    } else if (!strcmp (layout, "westwood")) {
-+      id = CODEC_ID_ADPCM_IMA_WS;
-+    } else if (!strcmp (layout, "iss")) {
-+      id = CODEC_ID_ADPCM_IMA_ISS;
-+    } else if (!strcmp (layout, "xa")) {
-+      id = CODEC_ID_ADPCM_XA;
-+    } else if (!strcmp (layout, "adx")) {
-+      id = CODEC_ID_ADPCM_ADX;
-+    } else if (!strcmp (layout, "ea")) {
-+      id = CODEC_ID_ADPCM_EA;
-+    } else if (!strcmp (layout, "g726")) {
-+      id = CODEC_ID_ADPCM_G726;
-+    } else if (!strcmp (layout, "g721")) {
-+      id = CODEC_ID_ADPCM_G726;
-+    } else if (!strcmp (layout, "ct")) {
-+      id = CODEC_ID_ADPCM_CT;
-+    } else if (!strcmp (layout, "swf")) {
-+      id = CODEC_ID_ADPCM_SWF;
-+    } else if (!strcmp (layout, "yamaha")) {
-+      id = CODEC_ID_ADPCM_YAMAHA;
-+    } else if (!strcmp (layout, "sbpro2")) {
-+      id = CODEC_ID_ADPCM_SBPRO_2;
-+    } else if (!strcmp (layout, "sbpro3")) {
-+      id = CODEC_ID_ADPCM_SBPRO_3;
-+    } else if (!strcmp (layout, "sbpro4")) {
-+      id = CODEC_ID_ADPCM_SBPRO_4;
-+    }
-+    if (id != CODEC_ID_NONE)
-+      audio = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-4xm")) {
-+    id = CODEC_ID_4XM;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-dpcm")) {
-+    const gchar *layout;
-+
-+    layout = gst_structure_get_string (structure, "layout");
-+    if (!layout) {
-+      /* .. */
-+    } else if (!strcmp (layout, "roq")) {
-+      id = CODEC_ID_ROQ_DPCM;
-+    } else if (!strcmp (layout, "interplay")) {
-+      id = CODEC_ID_INTERPLAY_DPCM;
-+    } else if (!strcmp (layout, "xan")) {
-+      id = CODEC_ID_XAN_DPCM;
-+    } else if (!strcmp (layout, "sol")) {
-+      id = CODEC_ID_SOL_DPCM;
-+    }
-+    if (id != CODEC_ID_NONE)
-+      audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-flac")) {
-+    id = CODEC_ID_FLAC;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-shorten")) {
-+    id = CODEC_ID_SHORTEN;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-alac")) {
-+    id = CODEC_ID_ALAC;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-cinepak")) {
-+    id = CODEC_ID_CINEPAK;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-pn-realvideo")) {
-+    gint rmversion;
-+
-+    if (gst_structure_get_int (structure, "rmversion", &rmversion)) {
-+      switch (rmversion) {
-+        case 1:
-+          id = CODEC_ID_RV10;
-+          break;
-+        case 2:
-+          id = CODEC_ID_RV20;
-+          break;
-+        case 3:
-+          id = CODEC_ID_RV30;
-+          break;
-+        case 4:
-+          id = CODEC_ID_RV40;
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      video = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-sipro")) {
-+    id = CODEC_ID_SIPR;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/x-pn-realaudio")) {
-+    gint raversion;
-+
-+    if (gst_structure_get_int (structure, "raversion", &raversion)) {
-+      switch (raversion) {
-+        case 1:
-+          id = CODEC_ID_RA_144;
-+          break;
-+        case 2:
-+          id = CODEC_ID_RA_288;
-+          break;
-+        case 8:
-+          id = CODEC_ID_COOK;
-+          break;
-+      }
-+    }
-+    if (id != CODEC_ID_NONE)
-+      audio = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-rle")) {
-+    const gchar *layout;
-+
-+    if ((layout = gst_structure_get_string (structure, "layout"))) {
-+      if (!strcmp (layout, "microsoft")) {
-+        id = CODEC_ID_MSRLE;
-+        video = TRUE;
-+      }
-+    }
-+  } else if (!strcmp (mimetype, "video/x-xan")) {
-+    gint wcversion = 0;
-+
-+    if ((gst_structure_get_int (structure, "wcversion", &wcversion))) {
-+      switch (wcversion) {
-+        case 3:
-+          id = CODEC_ID_XAN_WC3;
-+          video = TRUE;
-+          break;
-+        case 4:
-+          id = CODEC_ID_XAN_WC4;
-+          video = TRUE;
-+          break;
-+        default:
-+          break;
-+      }
-+    }
-+  } else if (!strcmp (mimetype, "audio/AMR")) {
-+    audio = TRUE;
-+    id = CODEC_ID_AMR_NB;
-+  } else if (!strcmp (mimetype, "audio/AMR-WB")) {
-+    id = CODEC_ID_AMR_WB;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "audio/qcelp")) {
-+    id = CODEC_ID_QCELP;
-+    audio = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-h264")) {
-+    id = CODEC_ID_H264;
-+    video = TRUE;
-+  } else if (!strcmp (mimetype, "video/x-flash-video")) {
-+    gint flvversion = 0;
-+
-+    if ((gst_structure_get_int (structure, "flvversion", &flvversion))) {
-+      switch (flvversion) {
-+        case 1:
-+          id = CODEC_ID_FLV1;
-+          video = TRUE;
-+          break;
-+        default:
-+          break;
-+      }
-+    }
-+
-+  } else if (!strcmp (mimetype, "audio/x-nellymoser")) {
-+    id = CODEC_ID_NELLYMOSER;
-+    audio = TRUE;
-+  } else if (!strncmp (mimetype, "audio/x-gst_ff-", 15)) {
-+    gchar ext[16];
-+    AVCodec *codec;
-+
-+    if (strlen (mimetype) <= 30 &&
-+        sscanf (mimetype, "audio/x-gst_ff-%s", ext) == 1) {
-+      if ((codec = avcodec_find_decoder_by_name (ext)) ||
-+          (codec = avcodec_find_encoder_by_name (ext))) {
-+        id = codec->id;
-+        audio = TRUE;
-+      }
-+    }
-+  } else if (!strncmp (mimetype, "video/x-gst_ff-", 15)) {
-+    gchar ext[16];
-+    AVCodec *codec;
-+
-+    if (strlen (mimetype) <= 30 &&
-+        sscanf (mimetype, "video/x-gst_ff-%s", ext) == 1) {
-+      if ((codec = avcodec_find_decoder_by_name (ext)) ||
-+          (codec = avcodec_find_encoder_by_name (ext))) {
-+        id = codec->id;
-+        video = TRUE;
-+      }
-+    }
-+  }
-+
-+  if (context != NULL) {
-+    if (video == TRUE) {
-+      context->codec_type = AVMEDIA_TYPE_VIDEO;
-+    } else if (audio == TRUE) {
-+      context->codec_type = AVMEDIA_TYPE_AUDIO;
-+    } else {
-+      context->codec_type = AVMEDIA_TYPE_UNKNOWN;
-+    }
-+    context->codec_id = id;
-+    gst_ffmpeg_caps_with_codecid (id, context->codec_type, caps, context);
-+  }
-+
-+  if (id != CODEC_ID_NONE) {
-+    GST_DEBUG ("The id=%d belongs to the caps %" GST_PTR_FORMAT, id, caps);
-+  } else {
-+    GST_WARNING ("Couldn't figure out the id for caps %" GST_PTR_FORMAT, caps);
-+  }
-+
-+  return id;
-+}
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.rej gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.rej
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.rej	1970-01-01 01:00:00.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.rej	2014-08-08 15:31:06.055868246 +0200
-@@ -0,0 +1,12 @@
-+--- ext/ffmpeg/gstffmpegcodecmap.c
-++++ ext/ffmpeg/gstffmpegcodecmap.c
-+@@ -1884,9 +1842,6 @@
-+             gst_ff_vid_caps_new (context, codec_id, encode, "video/x-raw-rgb",
-+             "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, "endianness",
-+             G_TYPE_INT, endianness, NULL);
-+-        if (caps && context) {
-+-          gst_ffmpeg_set_palette (caps, context);
-+-        }
-+       }
-+     } else if (fmt) {
-+       caps = gst_ff_vid_caps_new (context, codec_id, encode, "video/x-raw-yuv",
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c	2014-08-08 14:46:31.462772351 +0200
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c	2014-08-08 15:32:18.608870847 +0200
-@@ -88,7 +88,6 @@
-       gint depth;
-     } audio;
-   } format;
--  gboolean waiting_for_key;
-   gboolean discont;
-   gboolean clear_ts;
- 
-@@ -438,7 +437,6 @@
-   ffmpegdec->pcache = NULL;
-   ffmpegdec->par = NULL;
-   ffmpegdec->opened = FALSE;
--  ffmpegdec->waiting_for_key = TRUE;
-   ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
-   ffmpegdec->direct_rendering = DEFAULT_DIRECT_RENDERING;
-   ffmpegdec->do_padding = DEFAULT_DO_PADDING;
-@@ -608,11 +606,6 @@
-     gst_ffmpeg_avcodec_close (ffmpegdec->context);
-   ffmpegdec->opened = FALSE;
- 
--  if (ffmpegdec->context->palctrl) {
--    av_free (ffmpegdec->context->palctrl);
--    ffmpegdec->context->palctrl = NULL;
--  }
--
-   if (ffmpegdec->context->extradata) {
-     av_free (ffmpegdec->context->extradata);
-     ffmpegdec->context->extradata = NULL;
-@@ -864,7 +857,7 @@
- 
-   /* workaround encoder bugs */
-   ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
--  ffmpegdec->context->error_recognition = 1;
-+  ffmpegdec->context->err_recognition = 1;
- 
-   /* for slow cpus */
-   ffmpegdec->context->lowres = ffmpegdec->lowres;
-@@ -944,7 +937,7 @@
-   fsize = gst_ffmpeg_avpicture_get_size (ffmpegdec->context->pix_fmt,
-       width, height);
- 
--  if (!ffmpegdec->context->palctrl && ffmpegdec->can_allocate_aligned) {
-+  if (ffmpegdec->can_allocate_aligned) {
-     GST_LOG_OBJECT (ffmpegdec, "calling pad_alloc");
-     /* no pallete, we can use the buffer size to alloc */
-     ret = gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
-@@ -1083,7 +1076,6 @@
-   /* tell ffmpeg we own this buffer, tranfer the ref we have on the buffer to
-    * the opaque data. */
-   picture->type = FF_BUFFER_TYPE_USER;
--  picture->age = 256 * 256 * 256 * 64;
-   picture->opaque = buf;
- 
- #ifdef EXTRA_REF
-@@ -1414,10 +1406,6 @@
-   } else {
-     if (diff >= 0) {
-       /* we're too slow, try to speed up */
--      if (ffmpegdec->waiting_for_key) {
--        /* we were waiting for a keyframe, that's ok */
--        goto skipping;
--      }
-       /* switch to skip_frame mode */
-       goto skip_frame;
-     }
-@@ -1427,11 +1415,6 @@
-   ffmpegdec->processed++;
-   return TRUE;
- 
--skipping:
--  {
--    res = FALSE;
--    goto drop_qos;
--  }
- normal_mode:
-   {
-     if (ffmpegdec->context->skip_frame != AVDISCARD_DEFAULT) {
-@@ -1528,43 +1511,6 @@
- }
- 
- 
--/* figure out if the current picture is a keyframe, return TRUE if that is
-- * the case. */
--static gboolean
--check_keyframe (GstFFMpegDec * ffmpegdec)
--{
--  GstFFMpegDecClass *oclass;
--  gboolean is_itype = FALSE;
--  gboolean is_reference = FALSE;
--  gboolean iskeyframe;
--
--  /* figure out if we are dealing with a keyframe */
--  oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
--
--  /* remember that we have B frames, we need this for the DTS -> PTS conversion
--   * code */
--  if (!ffmpegdec->has_b_frames && ffmpegdec->picture->pict_type == FF_B_TYPE) {
--    GST_DEBUG_OBJECT (ffmpegdec, "we have B frames");
--    ffmpegdec->has_b_frames = TRUE;
--  }
--
--  is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
--  is_reference = (ffmpegdec->picture->reference == 1);
--
--  iskeyframe = (is_itype || is_reference || ffmpegdec->picture->key_frame)
--      || (oclass->in_plugin->id == CODEC_ID_INDEO3)
--      || (oclass->in_plugin->id == CODEC_ID_MSZH)
--      || (oclass->in_plugin->id == CODEC_ID_ZLIB)
--      || (oclass->in_plugin->id == CODEC_ID_VP3)
--      || (oclass->in_plugin->id == CODEC_ID_HUFFYUV);
--
--  GST_LOG_OBJECT (ffmpegdec,
--      "current picture: type: %d, is_keyframe:%d, is_itype:%d, is_reference:%d",
--      ffmpegdec->picture->pict_type, iskeyframe, is_itype, is_reference);
--
--  return iskeyframe;
--}
--
- /* get an outbuf buffer with the current picture */
- static GstFlowReturn
- get_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf)
-@@ -1694,7 +1640,6 @@
- {
-   gint len = -1;
-   gint have_data;
--  gboolean iskeyframe;
-   gboolean mode_switch;
-   gboolean decode;
-   gint skip_frame = AVDISCARD_DEFAULT;
-@@ -1809,7 +1754,6 @@
-     gst_ffmpegdec_negotiate (ffmpegdec, TRUE);
-   }
- 
--
-   /* Whether a frame is interlaced or not is unknown at the time of
-      buffer allocation, so caps on the buffer in opaque will have
-      the previous frame's interlaced flag set. So if interlacedness
-@@ -1831,10 +1775,6 @@
-     }
-   }
- 
--  /* check if we are dealing with a keyframe here, this will also check if we
--   * are dealing with B frames. */
--  iskeyframe = check_keyframe (ffmpegdec);
--
-   /* check that the timestamps go upwards */
-   if (ffmpegdec->last_out != -1 && ffmpegdec->last_out > out_pts) {
-     /* timestamps go backwards, this means frames were reordered and we must
-@@ -1865,7 +1805,7 @@
-    * timestamps */
-   if (!ffmpegdec->reordered_in && ffmpegdec->reordered_out) {
-     /* PTS and DTS are the same for keyframes */
--    if (!iskeyframe && ffmpegdec->next_out != -1) {
-+    if (ffmpegdec->next_out != -1) {
-       /* interpolate all timestamps except for keyframes, FIXME, this is
-        * wrong when QoS is active. */
-       GST_DEBUG_OBJECT (ffmpegdec, "interpolate timestamps");
-@@ -1874,16 +1814,6 @@
-     }
-   }
- 
--  /* when we're waiting for a keyframe, see if we have one or drop the current
--   * non-keyframe */
--  if (G_UNLIKELY (ffmpegdec->waiting_for_key)) {
--    if (G_LIKELY (!iskeyframe))
--      goto drop_non_keyframe;
--
--    /* we have a keyframe, we can stop waiting for one */
--    ffmpegdec->waiting_for_key = FALSE;
--  }
--
-   /* get a handle to the output buffer */
-   *ret = get_output_buffer (ffmpegdec, outbuf);
-   if (G_UNLIKELY (*ret != GST_FLOW_OK))
-@@ -2000,20 +1930,11 @@
-   else
-     ffmpegdec->next_out = -1;
- 
--  /* palette is not part of raw video frame in gst and the size
--   * of the outgoing buffer needs to be adjusted accordingly */
--  if (ffmpegdec->context->palctrl != NULL)
--    GST_BUFFER_SIZE (*outbuf) -= AVPALETTE_SIZE;
--
-   /* now see if we need to clip the buffer against the segment boundaries. */
-   if (G_UNLIKELY (!clip_video_buffer (ffmpegdec, *outbuf, out_timestamp,
-               out_duration)))
-     goto clipped;
- 
--  /* mark as keyframe or delta unit */
--  if (!iskeyframe)
--    GST_BUFFER_FLAG_SET (*outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
--
-   if (ffmpegdec->picture->top_field_first)
-     GST_BUFFER_FLAG_SET (*outbuf, GST_VIDEO_BUFFER_TFF);
- 
-@@ -2024,11 +1945,6 @@
-   return len;
- 
-   /* special cases */
--drop_non_keyframe:
--  {
--    GST_WARNING_OBJECT (ffmpegdec, "Dropping non-keyframe (seek/init)");
--    goto beach;
--  }
- no_output:
-   {
-     GST_DEBUG_OBJECT (ffmpegdec, "no output buffer");
-@@ -2422,7 +2338,6 @@
-       gst_ffmpegdec_reset_ts (ffmpegdec);
-       gst_ffmpegdec_reset_qos (ffmpegdec);
-       gst_ffmpegdec_flush_pcache (ffmpegdec);
--      ffmpegdec->waiting_for_key = TRUE;
-       gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
-       clear_queued (ffmpegdec);
-       break;
-@@ -2560,17 +2475,6 @@
- 
-   oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
- 
--  /* do early keyframe check pretty bad to rely on the keyframe flag in the
--   * source for this as it might not even be parsed (UDP/file/..).  */
--  if (G_UNLIKELY (ffmpegdec->waiting_for_key)) {
--    GST_DEBUG_OBJECT (ffmpegdec, "waiting for keyframe");
--    if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DELTA_UNIT) &&
--        oclass->in_plugin->type != AVMEDIA_TYPE_AUDIO)
--      goto skip_keyframe;
--
--    GST_DEBUG_OBJECT (ffmpegdec, "got keyframe");
--    ffmpegdec->waiting_for_key = FALSE;
--  }
-   /* parse cache joining. If there is cached data */
-   if (ffmpegdec->pcache) {
-     /* join with previous data */
-@@ -2805,12 +2709,6 @@
-     gst_buffer_unref (inbuf);
-     return GST_FLOW_NOT_NEGOTIATED;
-   }
--skip_keyframe:
--  {
--    GST_DEBUG_OBJECT (ffmpegdec, "skipping non keyframe");
--    gst_buffer_unref (inbuf);
--    return GST_FLOW_OK;
--  }
- }
- 
- static GstStateChangeReturn
-@@ -2936,7 +2834,7 @@
-     gchar *plugin_name;
- 
-     /* only decoders */
--    if (!in_plugin->decode) {
-+    if (!av_codec_is_decoder (in_plugin)) {
-       goto next;
-     }
- 
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.orig
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.orig	1970-01-01 01:00:00.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.orig	2014-08-08 15:31:06.057868246 +0200
-@@ -0,0 +1,2973 @@
-+/* GStreamer
-+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <assert.h>
-+#include <string.h>
-+
-+#ifdef HAVE_FFMPEG_UNINSTALLED
-+#include <avcodec.h>
-+#else
-+#include <libavcodec/avcodec.h>
-+#endif
-+
-+#include <gst/gst.h>
-+#include <gst/video/video.h>
-+
-+#include "gstffmpeg.h"
-+#include "gstffmpegcodecmap.h"
-+#include "gstffmpegutils.h"
-+
-+/* define to enable alternative buffer refcounting algorithm */
-+#undef EXTRA_REF
-+
-+typedef struct _GstFFMpegDec GstFFMpegDec;
-+
-+#define MAX_TS_MASK 0xff
-+
-+/* for each incomming buffer we keep all timing info in a structure like this.
-+ * We keep a circular array of these structures around to store the timing info.
-+ * The index in the array is what we pass as opaque data (to pictures) and
-+ * pts (to parsers) so that ffmpeg can remember them for us. */
-+typedef struct
-+{
-+  gint idx;
-+  GstClockTime timestamp;
-+  GstClockTime duration;
-+  gint64 offset;
-+} GstTSInfo;
-+
-+struct _GstFFMpegDec
-+{
-+  GstElement element;
-+
-+  /* We need to keep track of our pads, so we do so here. */
-+  GstPad *srcpad;
-+  GstPad *sinkpad;
-+
-+  /* decoding */
-+  AVCodecContext *context;
-+  AVFrame *picture;
-+  gboolean opened;
-+  union
-+  {
-+    struct
-+    {
-+      gint width, height;
-+      gint clip_width, clip_height;
-+      gint par_n, par_d;
-+      gint fps_n, fps_d;
-+      gint old_fps_n, old_fps_d;
-+      gboolean interlaced;
-+
-+      enum PixelFormat pix_fmt;
-+    } video;
-+    struct
-+    {
-+      gint channels;
-+      gint samplerate;
-+      gint depth;
-+    } audio;
-+  } format;
-+  gboolean discont;
-+  gboolean clear_ts;
-+
-+  /* for tracking DTS/PTS */
-+  gboolean has_b_frames;
-+  gboolean reordered_in;
-+  GstClockTime last_in;
-+  GstClockTime last_diff;
-+  guint last_frames;
-+  gboolean reordered_out;
-+  GstClockTime last_out;
-+  GstClockTime next_out;
-+
-+  /* parsing */
-+  gboolean turnoff_parser;      /* used for turning off aac raw parsing
-+                                 * See bug #566250 */
-+  AVCodecParserContext *pctx;
-+  GstBuffer *pcache;
-+  guint8 *padded;
-+  guint padded_size;
-+
-+  GValue *par;                  /* pixel aspect ratio of incoming data */
-+  gboolean current_dr;          /* if direct rendering is enabled */
-+  gboolean extra_ref;           /* keep extra ref around in get/release */
-+
-+  /* some properties */
-+  enum AVDiscard skip_frame;
-+  gint lowres;
-+  gboolean direct_rendering;
-+  gboolean do_padding;
-+  gboolean debug_mv;
-+  gboolean crop;
-+  int max_threads;
-+
-+  /* QoS stuff *//* with LOCK */
-+  gdouble proportion;
-+  GstClockTime earliest_time;
-+  gint64 processed;
-+  gint64 dropped;
-+
-+  /* clipping segment */
-+  GstSegment segment;
-+
-+  gboolean is_realvideo;
-+
-+  GstTSInfo ts_info[MAX_TS_MASK + 1];
-+  gint ts_idx;
-+
-+  /* reverse playback queue */
-+  GList *queued;
-+
-+  /* Can downstream allocate 16bytes aligned data. */
-+  gboolean can_allocate_aligned;
-+};
-+
-+typedef struct _GstFFMpegDecClass GstFFMpegDecClass;
-+
-+struct _GstFFMpegDecClass
-+{
-+  GstElementClass parent_class;
-+
-+  AVCodec *in_plugin;
-+  GstPadTemplate *srctempl, *sinktempl;
-+};
-+
-+#define GST_TS_INFO_NONE &ts_info_none
-+static const GstTSInfo ts_info_none = { -1, -1, -1, -1 };
-+
-+static const GstTSInfo *
-+gst_ts_info_store (GstFFMpegDec * dec, GstClockTime timestamp,
-+    GstClockTime duration, gint64 offset)
-+{
-+  gint idx = dec->ts_idx;
-+  dec->ts_info[idx].idx = idx;
-+  dec->ts_info[idx].timestamp = timestamp;
-+  dec->ts_info[idx].duration = duration;
-+  dec->ts_info[idx].offset = offset;
-+  dec->ts_idx = (idx + 1) & MAX_TS_MASK;
-+
-+  return &dec->ts_info[idx];
-+}
-+
-+static const GstTSInfo *
-+gst_ts_info_get (GstFFMpegDec * dec, gint idx)
-+{
-+  if (G_UNLIKELY (idx < 0 || idx > MAX_TS_MASK))
-+    return GST_TS_INFO_NONE;
-+
-+  return &dec->ts_info[idx];
-+}
-+
-+#define GST_TYPE_FFMPEGDEC \
-+  (gst_ffmpegdec_get_type())
-+#define GST_FFMPEGDEC(obj) \
-+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGDEC,GstFFMpegDec))
-+#define GST_FFMPEGDEC_CLASS(klass) \
-+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGDEC,GstFFMpegDecClass))
-+#define GST_IS_FFMPEGDEC(obj) \
-+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGDEC))
-+#define GST_IS_FFMPEGDEC_CLASS(klass) \
-+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGDEC))
-+
-+#define DEFAULT_LOWRES			0
-+#define DEFAULT_SKIPFRAME		0
-+#define DEFAULT_DIRECT_RENDERING	TRUE
-+#define DEFAULT_DO_PADDING		TRUE
-+#define DEFAULT_DEBUG_MV		FALSE
-+#define DEFAULT_CROP			TRUE
-+#define DEFAULT_MAX_THREADS		1
-+
-+enum
-+{
-+  PROP_0,
-+  PROP_LOWRES,
-+  PROP_SKIPFRAME,
-+  PROP_DIRECT_RENDERING,
-+  PROP_DO_PADDING,
-+  PROP_DEBUG_MV,
-+  PROP_CROP,
-+  PROP_MAX_THREADS,
-+  PROP_LAST
-+};
-+
-+/* A number of function prototypes are given so we can refer to them later. */
-+static void gst_ffmpegdec_base_init (GstFFMpegDecClass * klass);
-+static void gst_ffmpegdec_class_init (GstFFMpegDecClass * klass);
-+static void gst_ffmpegdec_init (GstFFMpegDec * ffmpegdec);
-+static void gst_ffmpegdec_finalize (GObject * object);
-+
-+static gboolean gst_ffmpegdec_query (GstPad * pad, GstQuery * query);
-+static gboolean gst_ffmpegdec_src_event (GstPad * pad, GstEvent * event);
-+
-+static gboolean gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps);
-+static gboolean gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event);
-+static GstFlowReturn gst_ffmpegdec_chain (GstPad * pad, GstBuffer * buf);
-+
-+static GstStateChangeReturn gst_ffmpegdec_change_state (GstElement * element,
-+    GstStateChange transition);
-+
-+static void gst_ffmpegdec_set_property (GObject * object,
-+    guint prop_id, const GValue * value, GParamSpec * pspec);
-+static void gst_ffmpegdec_get_property (GObject * object,
-+    guint prop_id, GValue * value, GParamSpec * pspec);
-+
-+static gboolean gst_ffmpegdec_negotiate (GstFFMpegDec * ffmpegdec,
-+    gboolean force);
-+
-+/* some sort of bufferpool handling, but different */
-+static int gst_ffmpegdec_get_buffer (AVCodecContext * context,
-+    AVFrame * picture);
-+static void gst_ffmpegdec_release_buffer (AVCodecContext * context,
-+    AVFrame * picture);
-+
-+static void gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec);
-+
-+#define GST_FFDEC_PARAMS_QDATA g_quark_from_static_string("ffdec-params")
-+
-+static GstElementClass *parent_class = NULL;
-+
-+#define GST_FFMPEGDEC_TYPE_LOWRES (gst_ffmpegdec_lowres_get_type())
-+static GType
-+gst_ffmpegdec_lowres_get_type (void)
-+{
-+  static GType ffmpegdec_lowres_type = 0;
-+
-+  if (!ffmpegdec_lowres_type) {
-+    static const GEnumValue ffmpegdec_lowres[] = {
-+      {0, "0", "full"},
-+      {1, "1", "1/2-size"},
-+      {2, "2", "1/4-size"},
-+      {0, NULL, NULL},
-+    };
-+
-+    ffmpegdec_lowres_type =
-+        g_enum_register_static ("GstFFMpegDecLowres", ffmpegdec_lowres);
-+  }
-+
-+  return ffmpegdec_lowres_type;
-+}
-+
-+#define GST_FFMPEGDEC_TYPE_SKIPFRAME (gst_ffmpegdec_skipframe_get_type())
-+static GType
-+gst_ffmpegdec_skipframe_get_type (void)
-+{
-+  static GType ffmpegdec_skipframe_type = 0;
-+
-+  if (!ffmpegdec_skipframe_type) {
-+    static const GEnumValue ffmpegdec_skipframe[] = {
-+      {0, "0", "Skip nothing"},
-+      {1, "1", "Skip B-frames"},
-+      {2, "2", "Skip IDCT/Dequantization"},
-+      {5, "5", "Skip everything"},
-+      {0, NULL, NULL},
-+    };
-+
-+    ffmpegdec_skipframe_type =
-+        g_enum_register_static ("GstFFMpegDecSkipFrame", ffmpegdec_skipframe);
-+  }
-+
-+  return ffmpegdec_skipframe_type;
-+}
-+
-+static void
-+gst_ffmpegdec_base_init (GstFFMpegDecClass * klass)
-+{
-+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-+  GstPadTemplate *sinktempl, *srctempl;
-+  GstCaps *sinkcaps, *srccaps;
-+  AVCodec *in_plugin;
-+  gchar *longname, *classification, *description;
-+
-+  in_plugin =
-+      (AVCodec *) g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
-+      GST_FFDEC_PARAMS_QDATA);
-+  g_assert (in_plugin != NULL);
-+
-+  /* construct the element details struct */
-+  longname = g_strdup_printf ("FFmpeg %s decoder", in_plugin->long_name);
-+  classification = g_strdup_printf ("Codec/Decoder/%s",
-+      (in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
-+  description = g_strdup_printf ("FFmpeg %s decoder", in_plugin->name);
-+  gst_element_class_set_details_simple (element_class, longname, classification,
-+      description,
-+      "Wim Taymans <wim.taymans@gmail.com>, "
-+      "Ronald Bultje <rbultje@ronald.bitfreak.net>, "
-+      "Edward Hervey <bilboed@bilboed.com>");
-+  g_free (longname);
-+  g_free (classification);
-+  g_free (description);
-+
-+  /* get the caps */
-+  sinkcaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, FALSE);
-+  if (!sinkcaps) {
-+    GST_DEBUG ("Couldn't get sink caps for decoder '%s'", in_plugin->name);
-+    sinkcaps = gst_caps_from_string ("unknown/unknown");
-+  }
-+  if (in_plugin->type == AVMEDIA_TYPE_VIDEO) {
-+    srccaps = gst_caps_from_string ("video/x-raw-rgb; video/x-raw-yuv");
-+  } else {
-+    srccaps = gst_ffmpeg_codectype_to_audio_caps (NULL,
-+        in_plugin->id, FALSE, in_plugin);
-+  }
-+  if (!srccaps) {
-+    GST_DEBUG ("Couldn't get source caps for decoder '%s'", in_plugin->name);
-+    srccaps = gst_caps_from_string ("unknown/unknown");
-+  }
-+
-+  /* pad templates */
-+  sinktempl = gst_pad_template_new ("sink", GST_PAD_SINK,
-+      GST_PAD_ALWAYS, sinkcaps);
-+  srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
-+
-+  gst_element_class_add_pad_template (element_class, srctempl);
-+  gst_element_class_add_pad_template (element_class, sinktempl);
-+
-+  klass->in_plugin = in_plugin;
-+  klass->srctempl = srctempl;
-+  klass->sinktempl = sinktempl;
-+}
-+
-+static void
-+gst_ffmpegdec_class_init (GstFFMpegDecClass * klass)
-+{
-+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-+  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
-+
-+  parent_class = g_type_class_peek_parent (klass);
-+
-+  gobject_class->finalize = gst_ffmpegdec_finalize;
-+
-+  gobject_class->set_property = gst_ffmpegdec_set_property;
-+  gobject_class->get_property = gst_ffmpegdec_get_property;
-+
-+  if (klass->in_plugin->type == AVMEDIA_TYPE_VIDEO) {
-+    int caps;
-+
-+    g_object_class_install_property (gobject_class, PROP_SKIPFRAME,
-+        g_param_spec_enum ("skip-frame", "Skip frames",
-+            "Which types of frames to skip during decoding",
-+            GST_FFMPEGDEC_TYPE_SKIPFRAME, 0,
-+            G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+    g_object_class_install_property (gobject_class, PROP_LOWRES,
-+        g_param_spec_enum ("lowres", "Low resolution",
-+            "At which resolution to decode images", GST_FFMPEGDEC_TYPE_LOWRES,
-+            0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+    g_object_class_install_property (gobject_class, PROP_DIRECT_RENDERING,
-+        g_param_spec_boolean ("direct-rendering", "Direct Rendering",
-+            "Enable direct rendering", DEFAULT_DIRECT_RENDERING,
-+            G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+    g_object_class_install_property (gobject_class, PROP_DO_PADDING,
-+        g_param_spec_boolean ("do-padding", "Do Padding",
-+            "Add 0 padding before decoding data", DEFAULT_DO_PADDING,
-+            G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+    g_object_class_install_property (gobject_class, PROP_DEBUG_MV,
-+        g_param_spec_boolean ("debug-mv", "Debug motion vectors",
-+            "Whether ffmpeg should print motion vectors on top of the image",
-+            DEFAULT_DEBUG_MV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+#if 0
-+    g_object_class_install_property (gobject_class, PROP_CROP,
-+        g_param_spec_boolean ("crop", "Crop",
-+            "Crop images to the display region",
-+            DEFAULT_CROP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+#endif
-+
-+    caps = klass->in_plugin->capabilities;
-+    if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) {
-+      g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_THREADS,
-+          g_param_spec_int ("max-threads", "Maximum decode threads",
-+              "Maximum number of worker threads to spawn. (0 = auto)",
-+              0, G_MAXINT, DEFAULT_MAX_THREADS,
-+              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+    }
-+  }
-+
-+  gstelement_class->change_state = gst_ffmpegdec_change_state;
-+}
-+
-+static void
-+gst_ffmpegdec_init (GstFFMpegDec * ffmpegdec)
-+{
-+  GstFFMpegDecClass *oclass;
-+
-+  oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
-+
-+  /* setup pads */
-+  ffmpegdec->sinkpad = gst_pad_new_from_template (oclass->sinktempl, "sink");
-+  gst_pad_set_setcaps_function (ffmpegdec->sinkpad,
-+      GST_DEBUG_FUNCPTR (gst_ffmpegdec_setcaps));
-+  gst_pad_set_event_function (ffmpegdec->sinkpad,
-+      GST_DEBUG_FUNCPTR (gst_ffmpegdec_sink_event));
-+  gst_pad_set_chain_function (ffmpegdec->sinkpad,
-+      GST_DEBUG_FUNCPTR (gst_ffmpegdec_chain));
-+  gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->sinkpad);
-+
-+  ffmpegdec->srcpad = gst_pad_new_from_template (oclass->srctempl, "src");
-+  gst_pad_use_fixed_caps (ffmpegdec->srcpad);
-+  gst_pad_set_event_function (ffmpegdec->srcpad,
-+      GST_DEBUG_FUNCPTR (gst_ffmpegdec_src_event));
-+  gst_pad_set_query_function (ffmpegdec->srcpad,
-+      GST_DEBUG_FUNCPTR (gst_ffmpegdec_query));
-+  gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->srcpad);
-+
-+  /* some ffmpeg data */
-+  ffmpegdec->context = avcodec_alloc_context ();
-+  ffmpegdec->picture = avcodec_alloc_frame ();
-+  ffmpegdec->pctx = NULL;
-+  ffmpegdec->pcache = NULL;
-+  ffmpegdec->par = NULL;
-+  ffmpegdec->opened = FALSE;
-+  ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
-+  ffmpegdec->direct_rendering = DEFAULT_DIRECT_RENDERING;
-+  ffmpegdec->do_padding = DEFAULT_DO_PADDING;
-+  ffmpegdec->debug_mv = DEFAULT_DEBUG_MV;
-+  ffmpegdec->crop = DEFAULT_CROP;
-+  ffmpegdec->max_threads = DEFAULT_MAX_THREADS;
-+
-+  ffmpegdec->format.video.par_n = -1;
-+  ffmpegdec->format.video.fps_n = -1;
-+  ffmpegdec->format.video.old_fps_n = -1;
-+  gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
-+
-+  /* We initially assume downstream can allocate 16 bytes aligned buffers */
-+  ffmpegdec->can_allocate_aligned = TRUE;
-+}
-+
-+static void
-+gst_ffmpegdec_finalize (GObject * object)
-+{
-+  GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
-+
-+  if (ffmpegdec->context != NULL) {
-+    av_free (ffmpegdec->context);
-+    ffmpegdec->context = NULL;
-+  }
-+
-+  if (ffmpegdec->picture != NULL) {
-+    av_free (ffmpegdec->picture);
-+    ffmpegdec->picture = NULL;
-+  }
-+
-+  G_OBJECT_CLASS (parent_class)->finalize (object);
-+}
-+
-+static gboolean
-+gst_ffmpegdec_query (GstPad * pad, GstQuery * query)
-+{
-+  GstFFMpegDec *ffmpegdec;
-+  GstPad *peer;
-+  gboolean res;
-+
-+  ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
-+
-+  res = FALSE;
-+
-+  if ((peer = gst_pad_get_peer (ffmpegdec->sinkpad))) {
-+    /* just forward to peer */
-+    res = gst_pad_query (peer, query);
-+    gst_object_unref (peer);
-+  }
-+#if 0
-+  {
-+    GstFormat bfmt;
-+
-+    bfmt = GST_FORMAT_BYTES;
-+
-+    /* ok, do bitrate calc... */
-+    if ((type != GST_QUERY_POSITION && type != GST_QUERY_TOTAL) ||
-+        *fmt != GST_FORMAT_TIME || ffmpegdec->context->bit_rate == 0 ||
-+        !gst_pad_query (peer, type, &bfmt, value))
-+      return FALSE;
-+
-+    if (ffmpegdec->pcache && type == GST_QUERY_POSITION)
-+      *value -= GST_BUFFER_SIZE (ffmpegdec->pcache);
-+    *value *= GST_SECOND / ffmpegdec->context->bit_rate;
-+  }
-+#endif
-+
-+  gst_object_unref (ffmpegdec);
-+
-+  return res;
-+}
-+
-+static void
-+gst_ffmpegdec_reset_ts (GstFFMpegDec * ffmpegdec)
-+{
-+  ffmpegdec->last_in = GST_CLOCK_TIME_NONE;
-+  ffmpegdec->last_diff = GST_CLOCK_TIME_NONE;
-+  ffmpegdec->last_frames = 0;
-+  ffmpegdec->last_out = GST_CLOCK_TIME_NONE;
-+  ffmpegdec->next_out = GST_CLOCK_TIME_NONE;
-+  ffmpegdec->reordered_in = FALSE;
-+  ffmpegdec->reordered_out = FALSE;
-+}
-+
-+static void
-+gst_ffmpegdec_update_qos (GstFFMpegDec * ffmpegdec, gdouble proportion,
-+    GstClockTime timestamp)
-+{
-+  GST_LOG_OBJECT (ffmpegdec, "update QOS: %f, %" GST_TIME_FORMAT,
-+      proportion, GST_TIME_ARGS (timestamp));
-+
-+  GST_OBJECT_LOCK (ffmpegdec);
-+  ffmpegdec->proportion = proportion;
-+  ffmpegdec->earliest_time = timestamp;
-+  GST_OBJECT_UNLOCK (ffmpegdec);
-+}
-+
-+static void
-+gst_ffmpegdec_reset_qos (GstFFMpegDec * ffmpegdec)
-+{
-+  gst_ffmpegdec_update_qos (ffmpegdec, 0.5, GST_CLOCK_TIME_NONE);
-+  ffmpegdec->processed = 0;
-+  ffmpegdec->dropped = 0;
-+}
-+
-+static void
-+gst_ffmpegdec_read_qos (GstFFMpegDec * ffmpegdec, gdouble * proportion,
-+    GstClockTime * timestamp)
-+{
-+  GST_OBJECT_LOCK (ffmpegdec);
-+  *proportion = ffmpegdec->proportion;
-+  *timestamp = ffmpegdec->earliest_time;
-+  GST_OBJECT_UNLOCK (ffmpegdec);
-+}
-+
-+static gboolean
-+gst_ffmpegdec_src_event (GstPad * pad, GstEvent * event)
-+{
-+  GstFFMpegDec *ffmpegdec;
-+  gboolean res;
-+
-+  ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
-+
-+  switch (GST_EVENT_TYPE (event)) {
-+    case GST_EVENT_QOS:
-+    {
-+      gdouble proportion;
-+      GstClockTimeDiff diff;
-+      GstClockTime timestamp;
-+
-+      gst_event_parse_qos (event, &proportion, &diff, &timestamp);
-+
-+      /* update our QoS values */
-+      gst_ffmpegdec_update_qos (ffmpegdec, proportion, timestamp + diff);
-+
-+      /* forward upstream */
-+      res = gst_pad_push_event (ffmpegdec->sinkpad, event);
-+      break;
-+    }
-+    default:
-+      /* forward upstream */
-+      res = gst_pad_push_event (ffmpegdec->sinkpad, event);
-+      break;
-+  }
-+
-+  gst_object_unref (ffmpegdec);
-+
-+  return res;
-+}
-+
-+/* with LOCK */
-+static void
-+gst_ffmpegdec_close (GstFFMpegDec * ffmpegdec)
-+{
-+  if (!ffmpegdec->opened)
-+    return;
-+
-+  GST_LOG_OBJECT (ffmpegdec, "closing ffmpeg codec");
-+
-+  if (ffmpegdec->par) {
-+    g_free (ffmpegdec->par);
-+    ffmpegdec->par = NULL;
-+  }
-+
-+  if (ffmpegdec->context->priv_data)
-+    gst_ffmpeg_avcodec_close (ffmpegdec->context);
-+  ffmpegdec->opened = FALSE;
-+
-+  if (ffmpegdec->context->extradata) {
-+    av_free (ffmpegdec->context->extradata);
-+    ffmpegdec->context->extradata = NULL;
-+  }
-+
-+  if (ffmpegdec->pctx) {
-+    if (ffmpegdec->pcache) {
-+      gst_buffer_unref (ffmpegdec->pcache);
-+      ffmpegdec->pcache = NULL;
-+    }
-+    av_parser_close (ffmpegdec->pctx);
-+    ffmpegdec->pctx = NULL;
-+  }
-+
-+  ffmpegdec->format.video.par_n = -1;
-+  ffmpegdec->format.video.fps_n = -1;
-+  ffmpegdec->format.video.old_fps_n = -1;
-+  ffmpegdec->format.video.interlaced = FALSE;
-+}
-+
-+/* with LOCK */
-+static gboolean
-+gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
-+{
-+  GstFFMpegDecClass *oclass;
-+
-+  oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
-+
-+  if (gst_ffmpeg_avcodec_open (ffmpegdec->context, oclass->in_plugin) < 0)
-+    goto could_not_open;
-+
-+  ffmpegdec->opened = TRUE;
-+  ffmpegdec->is_realvideo = FALSE;
-+
-+  GST_LOG_OBJECT (ffmpegdec, "Opened ffmpeg codec %s, id %d",
-+      oclass->in_plugin->name, oclass->in_plugin->id);
-+
-+  /* open a parser if we can */
-+  switch (oclass->in_plugin->id) {
-+    case CODEC_ID_MPEG4:
-+    case CODEC_ID_MJPEG:
-+    case CODEC_ID_VC1:
-+      GST_LOG_OBJECT (ffmpegdec, "not using parser, blacklisted codec");
-+      ffmpegdec->pctx = NULL;
-+      break;
-+    case CODEC_ID_H264:
-+      /* For H264, only use a parser if there is no context data, if there is, 
-+       * we're talking AVC */
-+      if (ffmpegdec->context->extradata_size == 0) {
-+        GST_LOG_OBJECT (ffmpegdec, "H264 with no extradata, creating parser");
-+        ffmpegdec->pctx = av_parser_init (oclass->in_plugin->id);
-+      } else {
-+        GST_LOG_OBJECT (ffmpegdec,
-+            "H264 with extradata implies framed data - not using parser");
-+        ffmpegdec->pctx = NULL;
-+      }
-+      break;
-+    case CODEC_ID_RV10:
-+    case CODEC_ID_RV30:
-+    case CODEC_ID_RV20:
-+    case CODEC_ID_RV40:
-+      ffmpegdec->is_realvideo = TRUE;
-+      break;
-+    default:
-+      if (!ffmpegdec->turnoff_parser) {
-+        ffmpegdec->pctx = av_parser_init (oclass->in_plugin->id);
-+        if (ffmpegdec->pctx)
-+          GST_LOG_OBJECT (ffmpegdec, "Using parser %p", ffmpegdec->pctx);
-+        else
-+          GST_LOG_OBJECT (ffmpegdec, "No parser for codec");
-+      } else {
-+        GST_LOG_OBJECT (ffmpegdec, "Parser deactivated for format");
-+      }
-+      break;
-+  }
-+
-+  switch (oclass->in_plugin->type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+      ffmpegdec->format.video.width = 0;
-+      ffmpegdec->format.video.height = 0;
-+      ffmpegdec->format.video.clip_width = -1;
-+      ffmpegdec->format.video.clip_height = -1;
-+      ffmpegdec->format.video.pix_fmt = PIX_FMT_NB;
-+      ffmpegdec->format.video.interlaced = FALSE;
-+      break;
-+    case AVMEDIA_TYPE_AUDIO:
-+      ffmpegdec->format.audio.samplerate = 0;
-+      ffmpegdec->format.audio.channels = 0;
-+      ffmpegdec->format.audio.depth = 0;
-+      break;
-+    default:
-+      break;
-+  }
-+
-+  gst_ffmpegdec_reset_ts (ffmpegdec);
-+  /* FIXME, reset_qos holds the LOCK */
-+  ffmpegdec->proportion = 0.0;
-+  ffmpegdec->earliest_time = -1;
-+
-+  return TRUE;
-+
-+  /* ERRORS */
-+could_not_open:
-+  {
-+    gst_ffmpegdec_close (ffmpegdec);
-+    GST_DEBUG_OBJECT (ffmpegdec, "ffdec_%s: Failed to open FFMPEG codec",
-+        oclass->in_plugin->name);
-+    return FALSE;
-+  }
-+}
-+
-+static gboolean
-+gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
-+{
-+  GstFFMpegDec *ffmpegdec;
-+  GstFFMpegDecClass *oclass;
-+  GstStructure *structure;
-+  const GValue *par;
-+  const GValue *fps;
-+  gboolean ret = TRUE;
-+
-+  ffmpegdec = (GstFFMpegDec *) (gst_pad_get_parent (pad));
-+  oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
-+
-+  GST_DEBUG_OBJECT (pad, "setcaps called");
-+
-+  GST_OBJECT_LOCK (ffmpegdec);
-+
-+  /* stupid check for VC1 */
-+  if ((oclass->in_plugin->id == CODEC_ID_WMV3) ||
-+      (oclass->in_plugin->id == CODEC_ID_VC1))
-+    oclass->in_plugin->id = gst_ffmpeg_caps_to_codecid (caps, NULL);
-+
-+  /* close old session */
-+  if (ffmpegdec->opened) {
-+    GST_OBJECT_UNLOCK (ffmpegdec);
-+    gst_ffmpegdec_drain (ffmpegdec);
-+    GST_OBJECT_LOCK (ffmpegdec);
-+    gst_ffmpegdec_close (ffmpegdec);
-+
-+    /* and reset the defaults that were set when a context is created */
-+    avcodec_get_context_defaults (ffmpegdec->context);
-+  }
-+
-+  /* set buffer functions */
-+  ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
-+  ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
-+  ffmpegdec->context->draw_horiz_band = NULL;
-+
-+  /* default is to let format decide if it needs a parser */
-+  ffmpegdec->turnoff_parser = FALSE;
-+
-+  ffmpegdec->has_b_frames = FALSE;
-+
-+  GST_LOG_OBJECT (ffmpegdec, "size %dx%d", ffmpegdec->context->width,
-+      ffmpegdec->context->height);
-+
-+  /* get size and so */
-+  gst_ffmpeg_caps_with_codecid (oclass->in_plugin->id,
-+      oclass->in_plugin->type, caps, ffmpegdec->context);
-+
-+  GST_LOG_OBJECT (ffmpegdec, "size after %dx%d", ffmpegdec->context->width,
-+      ffmpegdec->context->height);
-+
-+  if (!ffmpegdec->context->time_base.den || !ffmpegdec->context->time_base.num) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "forcing 25/1 framerate");
-+    ffmpegdec->context->time_base.num = 1;
-+    ffmpegdec->context->time_base.den = 25;
-+  }
-+
-+  /* get pixel aspect ratio if it's set */
-+  structure = gst_caps_get_structure (caps, 0);
-+
-+  par = gst_structure_get_value (structure, "pixel-aspect-ratio");
-+  if (par) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "sink caps have pixel-aspect-ratio of %d:%d",
-+        gst_value_get_fraction_numerator (par),
-+        gst_value_get_fraction_denominator (par));
-+    /* should be NULL */
-+    if (ffmpegdec->par)
-+      g_free (ffmpegdec->par);
-+    ffmpegdec->par = g_new0 (GValue, 1);
-+    gst_value_init_and_copy (ffmpegdec->par, par);
-+  }
-+
-+  /* get the framerate from incoming caps. fps_n is set to -1 when
-+   * there is no valid framerate */
-+  fps = gst_structure_get_value (structure, "framerate");
-+  if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
-+    ffmpegdec->format.video.fps_n = gst_value_get_fraction_numerator (fps);
-+    ffmpegdec->format.video.fps_d = gst_value_get_fraction_denominator (fps);
-+    GST_DEBUG_OBJECT (ffmpegdec, "Using framerate %d/%d from incoming caps",
-+        ffmpegdec->format.video.fps_n, ffmpegdec->format.video.fps_d);
-+  } else {
-+    ffmpegdec->format.video.fps_n = -1;
-+    GST_DEBUG_OBJECT (ffmpegdec, "Using framerate from codec");
-+  }
-+
-+  /* figure out if we can use direct rendering */
-+  ffmpegdec->current_dr = FALSE;
-+  ffmpegdec->extra_ref = FALSE;
-+  if (ffmpegdec->direct_rendering) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "trying to enable direct rendering");
-+    if (oclass->in_plugin->capabilities & CODEC_CAP_DR1) {
-+      if (oclass->in_plugin->id == CODEC_ID_H264) {
-+        GST_DEBUG_OBJECT (ffmpegdec, "disable direct rendering setup for H264");
-+        /* does not work, many stuff reads outside of the planes */
-+        ffmpegdec->current_dr = FALSE;
-+        ffmpegdec->extra_ref = TRUE;
-+      } else if ((oclass->in_plugin->id == CODEC_ID_SVQ1) ||
-+          (oclass->in_plugin->id == CODEC_ID_VP5) ||
-+          (oclass->in_plugin->id == CODEC_ID_VP6) ||
-+          (oclass->in_plugin->id == CODEC_ID_VP6F) ||
-+          (oclass->in_plugin->id == CODEC_ID_VP6A)) {
-+        GST_DEBUG_OBJECT (ffmpegdec,
-+            "disable direct rendering setup for broken stride support");
-+        /* does not work, uses a incompatible stride. See #610613 */
-+        ffmpegdec->current_dr = FALSE;
-+        ffmpegdec->extra_ref = TRUE;
-+      } else {
-+        GST_DEBUG_OBJECT (ffmpegdec, "enabled direct rendering");
-+        ffmpegdec->current_dr = TRUE;
-+      }
-+    } else {
-+      GST_DEBUG_OBJECT (ffmpegdec, "direct rendering not supported");
-+    }
-+  }
-+  if (ffmpegdec->current_dr) {
-+    /* do *not* draw edges when in direct rendering, for some reason it draws
-+     * outside of the memory. */
-+    ffmpegdec->context->flags |= CODEC_FLAG_EMU_EDGE;
-+  }
-+
-+  /* for AAC we only use av_parse if not on stream-format==raw or ==loas */
-+  if (oclass->in_plugin->id == CODEC_ID_AAC
-+      || oclass->in_plugin->id == CODEC_ID_AAC_LATM) {
-+    const gchar *format = gst_structure_get_string (structure, "stream-format");
-+
-+    if (format == NULL || strcmp (format, "raw") == 0) {
-+      ffmpegdec->turnoff_parser = TRUE;
-+    }
-+  }
-+
-+  /* for FLAC, don't parse if it's already parsed */
-+  if (oclass->in_plugin->id == CODEC_ID_FLAC) {
-+    if (gst_structure_has_field (structure, "streamheader"))
-+      ffmpegdec->turnoff_parser = TRUE;
-+  }
-+
-+  /* workaround encoder bugs */
-+  ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
-+  ffmpegdec->context->err_recognition = 1;
-+
-+  /* for slow cpus */
-+  ffmpegdec->context->lowres = ffmpegdec->lowres;
-+  ffmpegdec->context->skip_frame = ffmpegdec->skip_frame;
-+
-+  /* ffmpeg can draw motion vectors on top of the image (not every decoder
-+   * supports it) */
-+  ffmpegdec->context->debug_mv = ffmpegdec->debug_mv;
-+
-+  if (ffmpegdec->max_threads == 0)
-+    ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
-+  else
-+    ffmpegdec->context->thread_count = ffmpegdec->max_threads;
-+
-+  /* open codec - we don't select an output pix_fmt yet,
-+   * simply because we don't know! We only get it
-+   * during playback... */
-+  if (!gst_ffmpegdec_open (ffmpegdec))
-+    goto open_failed;
-+
-+  /* clipping region */
-+  gst_structure_get_int (structure, "width",
-+      &ffmpegdec->format.video.clip_width);
-+  gst_structure_get_int (structure, "height",
-+      &ffmpegdec->format.video.clip_height);
-+
-+  GST_DEBUG_OBJECT (pad, "clipping to %dx%d",
-+      ffmpegdec->format.video.clip_width, ffmpegdec->format.video.clip_height);
-+
-+  /* take into account the lowres property */
-+  if (ffmpegdec->format.video.clip_width != -1)
-+    ffmpegdec->format.video.clip_width >>= ffmpegdec->lowres;
-+  if (ffmpegdec->format.video.clip_height != -1)
-+    ffmpegdec->format.video.clip_height >>= ffmpegdec->lowres;
-+
-+  GST_DEBUG_OBJECT (pad, "final clipping to %dx%d",
-+      ffmpegdec->format.video.clip_width, ffmpegdec->format.video.clip_height);
-+
-+done:
-+  GST_OBJECT_UNLOCK (ffmpegdec);
-+
-+  gst_object_unref (ffmpegdec);
-+
-+  return ret;
-+
-+  /* ERRORS */
-+open_failed:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec, "Failed to open");
-+    if (ffmpegdec->par) {
-+      g_free (ffmpegdec->par);
-+      ffmpegdec->par = NULL;
-+    }
-+    ret = FALSE;
-+    goto done;
-+  }
-+}
-+
-+static GstFlowReturn
-+alloc_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf,
-+    gint width, gint height)
-+{
-+  GstFlowReturn ret;
-+  gint fsize;
-+
-+  ret = GST_FLOW_ERROR;
-+  *outbuf = NULL;
-+
-+  GST_LOG_OBJECT (ffmpegdec, "alloc output buffer");
-+
-+  /* see if we need renegotiation */
-+  if (G_UNLIKELY (!gst_ffmpegdec_negotiate (ffmpegdec, FALSE)))
-+    goto negotiate_failed;
-+
-+  /* get the size of the gstreamer output buffer given a
-+   * width/height/format */
-+  fsize = gst_ffmpeg_avpicture_get_size (ffmpegdec->context->pix_fmt,
-+      width, height);
-+
-+  if (ffmpegdec->can_allocate_aligned) {
-+    GST_LOG_OBJECT (ffmpegdec, "calling pad_alloc");
-+    /* no pallete, we can use the buffer size to alloc */
-+    ret = gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
-+        GST_BUFFER_OFFSET_NONE, fsize,
-+        GST_PAD_CAPS (ffmpegdec->srcpad), outbuf);
-+    if (G_UNLIKELY (ret != GST_FLOW_OK))
-+      goto alloc_failed;
-+
-+    /* If buffer isn't 128-bit aligned, create a memaligned one ourselves */
-+    if (((uintptr_t) GST_BUFFER_DATA (*outbuf)) % 16) {
-+      GST_DEBUG_OBJECT (ffmpegdec,
-+          "Downstream can't allocate aligned buffers.");
-+      ffmpegdec->can_allocate_aligned = FALSE;
-+      gst_buffer_unref (*outbuf);
-+      *outbuf = new_aligned_buffer (fsize, GST_PAD_CAPS (ffmpegdec->srcpad));
-+    }
-+  } else {
-+    GST_LOG_OBJECT (ffmpegdec,
-+        "not calling pad_alloc, we have a pallete or downstream can't give 16 byte aligned buffers.");
-+    /* for paletted data we can't use pad_alloc_buffer(), because
-+     * fsize contains the size of the palette, so the overall size
-+     * is bigger than ffmpegcolorspace's unit size, which will
-+     * prompt GstBaseTransform to complain endlessly ... */
-+    *outbuf = new_aligned_buffer (fsize, GST_PAD_CAPS (ffmpegdec->srcpad));
-+    ret = GST_FLOW_OK;
-+  }
-+  /* set caps, we do this here because the buffer is still writable here and we
-+   * are sure to be negotiated */
-+  gst_buffer_set_caps (*outbuf, GST_PAD_CAPS (ffmpegdec->srcpad));
-+
-+  return ret;
-+
-+  /* special cases */
-+negotiate_failed:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec, "negotiate failed");
-+    return GST_FLOW_NOT_NEGOTIATED;
-+  }
-+alloc_failed:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec, "pad_alloc failed %d (%s)", ret,
-+        gst_flow_get_name (ret));
-+    return ret;
-+  }
-+}
-+
-+static int
-+gst_ffmpegdec_get_buffer (AVCodecContext * context, AVFrame * picture)
-+{
-+  GstBuffer *buf = NULL;
-+  GstFFMpegDec *ffmpegdec;
-+  gint width, height;
-+  gint coded_width, coded_height;
-+  gint res;
-+
-+  ffmpegdec = (GstFFMpegDec *) context->opaque;
-+
-+  GST_DEBUG_OBJECT (ffmpegdec, "getting buffer");
-+
-+  /* apply the last info we have seen to this picture, when we get the
-+   * picture back from ffmpeg we can use this to correctly timestamp the output
-+   * buffer */
-+  picture->reordered_opaque = context->reordered_opaque;
-+  /* make sure we don't free the buffer when it's not ours */
-+  picture->opaque = NULL;
-+
-+  /* take width and height before clipping */
-+  width = context->width;
-+  height = context->height;
-+  coded_width = context->coded_width;
-+  coded_height = context->coded_height;
-+
-+  GST_LOG_OBJECT (ffmpegdec, "dimension %dx%d, coded %dx%d", width, height,
-+      coded_width, coded_height);
-+  if (!ffmpegdec->current_dr) {
-+    GST_LOG_OBJECT (ffmpegdec, "direct rendering disabled, fallback alloc");
-+    res = avcodec_default_get_buffer (context, picture);
-+
-+    GST_LOG_OBJECT (ffmpegdec, "linsize %d %d %d", picture->linesize[0],
-+        picture->linesize[1], picture->linesize[2]);
-+    GST_LOG_OBJECT (ffmpegdec, "data %u %u %u", 0,
-+        (guint) (picture->data[1] - picture->data[0]),
-+        (guint) (picture->data[2] - picture->data[0]));
-+    return res;
-+  }
-+
-+  switch (context->codec_type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+      /* some ffmpeg video plugins don't see the point in setting codec_type ... */
-+    case AVMEDIA_TYPE_UNKNOWN:
-+    {
-+      GstFlowReturn ret;
-+      gint clip_width, clip_height;
-+
-+      /* take final clipped output size */
-+      if ((clip_width = ffmpegdec->format.video.clip_width) == -1)
-+        clip_width = width;
-+      if ((clip_height = ffmpegdec->format.video.clip_height) == -1)
-+        clip_height = height;
-+
-+      GST_LOG_OBJECT (ffmpegdec, "raw outsize %d/%d", width, height);
-+
-+      /* this is the size ffmpeg needs for the buffer */
-+      avcodec_align_dimensions (context, &width, &height);
-+
-+      GST_LOG_OBJECT (ffmpegdec, "aligned outsize %d/%d, clip %d/%d",
-+          width, height, clip_width, clip_height);
-+
-+      if (width != clip_width || height != clip_height) {
-+        /* We can't alloc if we need to clip the output buffer later */
-+        GST_LOG_OBJECT (ffmpegdec, "we need clipping, fallback alloc");
-+        return avcodec_default_get_buffer (context, picture);
-+      }
-+
-+      /* alloc with aligned dimensions for ffmpeg */
-+      ret = alloc_output_buffer (ffmpegdec, &buf, width, height);
-+      if (G_UNLIKELY (ret != GST_FLOW_OK)) {
-+        /* alloc default buffer when we can't get one from downstream */
-+        GST_LOG_OBJECT (ffmpegdec, "alloc failed, fallback alloc");
-+        return avcodec_default_get_buffer (context, picture);
-+      }
-+
-+      /* copy the right pointers and strides in the picture object */
-+      gst_ffmpeg_avpicture_fill ((AVPicture *) picture,
-+          GST_BUFFER_DATA (buf), context->pix_fmt, width, height);
-+      break;
-+    }
-+    case AVMEDIA_TYPE_AUDIO:
-+    default:
-+      GST_ERROR_OBJECT (ffmpegdec,
-+          "_get_buffer() should never get called for non-video buffers !");
-+      g_assert_not_reached ();
-+      break;
-+  }
-+
-+  /* tell ffmpeg we own this buffer, tranfer the ref we have on the buffer to
-+   * the opaque data. */
-+  picture->type = FF_BUFFER_TYPE_USER;
-+  picture->opaque = buf;
-+
-+#ifdef EXTRA_REF
-+  if (picture->reference != 0 || ffmpegdec->extra_ref) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "adding extra ref");
-+    gst_buffer_ref (buf);
-+  }
-+#endif
-+
-+  GST_LOG_OBJECT (ffmpegdec, "returned buffer %p", buf);
-+
-+  return 0;
-+}
-+
-+static void
-+gst_ffmpegdec_release_buffer (AVCodecContext * context, AVFrame * picture)
-+{
-+  gint i;
-+  GstBuffer *buf;
-+  GstFFMpegDec *ffmpegdec;
-+
-+  ffmpegdec = (GstFFMpegDec *) context->opaque;
-+
-+  /* check if it was our buffer */
-+  if (picture->opaque == NULL) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "default release buffer");
-+    avcodec_default_release_buffer (context, picture);
-+    return;
-+  }
-+
-+  /* we remove the opaque data now */
-+  buf = GST_BUFFER_CAST (picture->opaque);
-+  GST_DEBUG_OBJECT (ffmpegdec, "release buffer %p", buf);
-+  picture->opaque = NULL;
-+
-+#ifdef EXTRA_REF
-+  if (picture->reference != 0 || ffmpegdec->extra_ref) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "remove extra ref");
-+    gst_buffer_unref (buf);
-+  }
-+#else
-+  gst_buffer_unref (buf);
-+#endif
-+
-+  /* zero out the reference in ffmpeg */
-+  for (i = 0; i < 4; i++) {
-+    picture->data[i] = NULL;
-+    picture->linesize[i] = 0;
-+  }
-+}
-+
-+static void
-+gst_ffmpegdec_add_pixel_aspect_ratio (GstFFMpegDec * ffmpegdec,
-+    GstStructure * s)
-+{
-+  gboolean demuxer_par_set = FALSE;
-+  gboolean decoder_par_set = FALSE;
-+  gint demuxer_num = 1, demuxer_denom = 1;
-+  gint decoder_num = 1, decoder_denom = 1;
-+
-+  GST_OBJECT_LOCK (ffmpegdec);
-+
-+  if (ffmpegdec->par) {
-+    demuxer_num = gst_value_get_fraction_numerator (ffmpegdec->par);
-+    demuxer_denom = gst_value_get_fraction_denominator (ffmpegdec->par);
-+    demuxer_par_set = TRUE;
-+    GST_DEBUG_OBJECT (ffmpegdec, "Demuxer PAR: %d:%d", demuxer_num,
-+        demuxer_denom);
-+  }
-+
-+  if (ffmpegdec->context->sample_aspect_ratio.num &&
-+      ffmpegdec->context->sample_aspect_ratio.den) {
-+    decoder_num = ffmpegdec->context->sample_aspect_ratio.num;
-+    decoder_denom = ffmpegdec->context->sample_aspect_ratio.den;
-+    decoder_par_set = TRUE;
-+    GST_DEBUG_OBJECT (ffmpegdec, "Decoder PAR: %d:%d", decoder_num,
-+        decoder_denom);
-+  }
-+
-+  GST_OBJECT_UNLOCK (ffmpegdec);
-+
-+  if (!demuxer_par_set && !decoder_par_set)
-+    goto no_par;
-+
-+  if (demuxer_par_set && !decoder_par_set)
-+    goto use_demuxer_par;
-+
-+  if (decoder_par_set && !demuxer_par_set)
-+    goto use_decoder_par;
-+
-+  /* Both the demuxer and the decoder provide a PAR. If one of
-+   * the two PARs is 1:1 and the other one is not, use the one
-+   * that is not 1:1. */
-+  if (demuxer_num == demuxer_denom && decoder_num != decoder_denom)
-+    goto use_decoder_par;
-+
-+  if (decoder_num == decoder_denom && demuxer_num != demuxer_denom)
-+    goto use_demuxer_par;
-+
-+  /* Both PARs are non-1:1, so use the PAR provided by the demuxer */
-+  goto use_demuxer_par;
-+
-+use_decoder_par:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec,
-+        "Setting decoder provided pixel-aspect-ratio of %u:%u", decoder_num,
-+        decoder_denom);
-+    gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, decoder_num,
-+        decoder_denom, NULL);
-+    return;
-+  }
-+
-+use_demuxer_par:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec,
-+        "Setting demuxer provided pixel-aspect-ratio of %u:%u", demuxer_num,
-+        demuxer_denom);
-+    gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, demuxer_num,
-+        demuxer_denom, NULL);
-+    return;
-+  }
-+no_par:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec,
-+        "Neither demuxer nor codec provide a pixel-aspect-ratio");
-+    return;
-+  }
-+}
-+
-+static gboolean
-+gst_ffmpegdec_negotiate (GstFFMpegDec * ffmpegdec, gboolean force)
-+{
-+  GstFFMpegDecClass *oclass;
-+  GstCaps *caps;
-+
-+  oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
-+
-+  switch (oclass->in_plugin->type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+      if (!force && ffmpegdec->format.video.width == ffmpegdec->context->width
-+          && ffmpegdec->format.video.height == ffmpegdec->context->height
-+          && ffmpegdec->format.video.fps_n == ffmpegdec->format.video.old_fps_n
-+          && ffmpegdec->format.video.fps_d == ffmpegdec->format.video.old_fps_d
-+          && ffmpegdec->format.video.pix_fmt == ffmpegdec->context->pix_fmt
-+          && ffmpegdec->format.video.par_n ==
-+          ffmpegdec->context->sample_aspect_ratio.num
-+          && ffmpegdec->format.video.par_d ==
-+          ffmpegdec->context->sample_aspect_ratio.den)
-+        return TRUE;
-+      GST_DEBUG_OBJECT (ffmpegdec,
-+          "Renegotiating video from %dx%d@ %d:%d PAR %d/%d fps to %dx%d@ %d:%d PAR %d/%d fps",
-+          ffmpegdec->format.video.width, ffmpegdec->format.video.height,
-+          ffmpegdec->format.video.par_n, ffmpegdec->format.video.par_d,
-+          ffmpegdec->format.video.old_fps_n, ffmpegdec->format.video.old_fps_n,
-+          ffmpegdec->context->width, ffmpegdec->context->height,
-+          ffmpegdec->context->sample_aspect_ratio.num,
-+          ffmpegdec->context->sample_aspect_ratio.den,
-+          ffmpegdec->format.video.fps_n, ffmpegdec->format.video.fps_d);
-+      ffmpegdec->format.video.width = ffmpegdec->context->width;
-+      ffmpegdec->format.video.height = ffmpegdec->context->height;
-+      ffmpegdec->format.video.old_fps_n = ffmpegdec->format.video.fps_n;
-+      ffmpegdec->format.video.old_fps_d = ffmpegdec->format.video.fps_d;
-+      ffmpegdec->format.video.pix_fmt = ffmpegdec->context->pix_fmt;
-+      ffmpegdec->format.video.par_n =
-+          ffmpegdec->context->sample_aspect_ratio.num;
-+      ffmpegdec->format.video.par_d =
-+          ffmpegdec->context->sample_aspect_ratio.den;
-+      break;
-+    case AVMEDIA_TYPE_AUDIO:
-+    {
-+      gint depth = av_smp_format_depth (ffmpegdec->context->sample_fmt);
-+      if (!force && ffmpegdec->format.audio.samplerate ==
-+          ffmpegdec->context->sample_rate &&
-+          ffmpegdec->format.audio.channels == ffmpegdec->context->channels &&
-+          ffmpegdec->format.audio.depth == depth)
-+        return TRUE;
-+      GST_DEBUG_OBJECT (ffmpegdec,
-+          "Renegotiating audio from %dHz@%dchannels (%d) to %dHz@%dchannels (%d)",
-+          ffmpegdec->format.audio.samplerate, ffmpegdec->format.audio.channels,
-+          ffmpegdec->format.audio.depth,
-+          ffmpegdec->context->sample_rate, ffmpegdec->context->channels, depth);
-+      ffmpegdec->format.audio.samplerate = ffmpegdec->context->sample_rate;
-+      ffmpegdec->format.audio.channels = ffmpegdec->context->channels;
-+      ffmpegdec->format.audio.depth = depth;
-+    }
-+      break;
-+    default:
-+      break;
-+  }
-+
-+  caps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type,
-+      ffmpegdec->context, oclass->in_plugin->id, FALSE);
-+
-+  if (caps == NULL)
-+    goto no_caps;
-+
-+  switch (oclass->in_plugin->type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+    {
-+      gint width, height;
-+      gboolean interlaced;
-+
-+      width = ffmpegdec->format.video.clip_width;
-+      height = ffmpegdec->format.video.clip_height;
-+      interlaced = ffmpegdec->format.video.interlaced;
-+
-+      if (width != -1 && height != -1) {
-+        /* overwrite the output size with the dimension of the
-+         * clipping region but only if they are smaller. */
-+        if (width < ffmpegdec->context->width)
-+          gst_caps_set_simple (caps, "width", G_TYPE_INT, width, NULL);
-+        if (height < ffmpegdec->context->height)
-+          gst_caps_set_simple (caps, "height", G_TYPE_INT, height, NULL);
-+      }
-+      gst_caps_set_simple (caps, "interlaced", G_TYPE_BOOLEAN, interlaced,
-+          NULL);
-+
-+      /* If a demuxer provided a framerate then use it (#313970) */
-+      if (ffmpegdec->format.video.fps_n != -1) {
-+        gst_caps_set_simple (caps, "framerate",
-+            GST_TYPE_FRACTION, ffmpegdec->format.video.fps_n,
-+            ffmpegdec->format.video.fps_d, NULL);
-+      }
-+      gst_ffmpegdec_add_pixel_aspect_ratio (ffmpegdec,
-+          gst_caps_get_structure (caps, 0));
-+      break;
-+    }
-+    case AVMEDIA_TYPE_AUDIO:
-+    {
-+      break;
-+    }
-+    default:
-+      break;
-+  }
-+
-+  if (!gst_pad_set_caps (ffmpegdec->srcpad, caps))
-+    goto caps_failed;
-+
-+  gst_caps_unref (caps);
-+
-+  return TRUE;
-+
-+  /* ERRORS */
-+no_caps:
-+  {
-+#ifdef HAVE_FFMPEG_UNINSTALLED
-+    /* using internal ffmpeg snapshot */
-+    GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
-+        ("Could not find GStreamer caps mapping for FFmpeg codec '%s'.",
-+            oclass->in_plugin->name), (NULL));
-+#else
-+    /* using external ffmpeg */
-+    GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
-+        ("Could not find GStreamer caps mapping for FFmpeg codec '%s', and "
-+            "you are using an external libavcodec. This is most likely due to "
-+            "a packaging problem and/or libavcodec having been upgraded to a "
-+            "version that is not compatible with this version of "
-+            "gstreamer-ffmpeg. Make sure your gstreamer-ffmpeg and libavcodec "
-+            "packages come from the same source/repository.",
-+            oclass->in_plugin->name), (NULL));
-+#endif
-+    return FALSE;
-+  }
-+caps_failed:
-+  {
-+    GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
-+        ("Could not set caps for ffmpeg decoder (%s), not fixed?",
-+            oclass->in_plugin->name));
-+    gst_caps_unref (caps);
-+
-+    return FALSE;
-+  }
-+}
-+
-+/* perform qos calculations before decoding the next frame.
-+ *
-+ * Sets the skip_frame flag and if things are really bad, skips to the next
-+ * keyframe.
-+ * 
-+ * Returns TRUE if the frame should be decoded, FALSE if the frame can be dropped
-+ * entirely.
-+ */
-+static gboolean
-+gst_ffmpegdec_do_qos (GstFFMpegDec * ffmpegdec, GstClockTime timestamp,
-+    gboolean * mode_switch)
-+{
-+  GstClockTimeDiff diff;
-+  gdouble proportion;
-+  GstClockTime qostime, earliest_time;
-+  gboolean res = TRUE;
-+
-+  *mode_switch = FALSE;
-+
-+  /* no timestamp, can't do QoS */
-+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (timestamp)))
-+    goto no_qos;
-+
-+  /* get latest QoS observation values */
-+  gst_ffmpegdec_read_qos (ffmpegdec, &proportion, &earliest_time);
-+
-+  /* skip qos if we have no observation (yet) */
-+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (earliest_time))) {
-+    /* no skip_frame initialy */
-+    ffmpegdec->context->skip_frame = AVDISCARD_DEFAULT;
-+    goto no_qos;
-+  }
-+
-+  /* qos is done on running time of the timestamp */
-+  qostime = gst_segment_to_running_time (&ffmpegdec->segment, GST_FORMAT_TIME,
-+      timestamp);
-+
-+  /* timestamp can be out of segment, then we don't do QoS */
-+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (qostime)))
-+    goto no_qos;
-+
-+  /* see how our next timestamp relates to the latest qos timestamp. negative
-+   * values mean we are early, positive values mean we are too late. */
-+  diff = GST_CLOCK_DIFF (qostime, earliest_time);
-+
-+  GST_DEBUG_OBJECT (ffmpegdec, "QOS: qostime %" GST_TIME_FORMAT
-+      ", earliest %" GST_TIME_FORMAT, GST_TIME_ARGS (qostime),
-+      GST_TIME_ARGS (earliest_time));
-+
-+  /* if we using less than 40% of the available time, we can try to
-+   * speed up again when we were slow. */
-+  if (proportion < 0.4 && diff < 0) {
-+    goto normal_mode;
-+  } else {
-+    if (diff >= 0) {
-+      /* we're too slow, try to speed up */
-+      /* switch to skip_frame mode */
-+      goto skip_frame;
-+    }
-+  }
-+
-+no_qos:
-+  ffmpegdec->processed++;
-+  return TRUE;
-+
-+normal_mode:
-+  {
-+    if (ffmpegdec->context->skip_frame != AVDISCARD_DEFAULT) {
-+      ffmpegdec->context->skip_frame = AVDISCARD_DEFAULT;
-+      *mode_switch = TRUE;
-+      GST_DEBUG_OBJECT (ffmpegdec, "QOS: normal mode %g < 0.4", proportion);
-+    }
-+    ffmpegdec->processed++;
-+    return TRUE;
-+  }
-+skip_frame:
-+  {
-+    if (ffmpegdec->context->skip_frame != AVDISCARD_NONREF) {
-+      ffmpegdec->context->skip_frame = AVDISCARD_NONREF;
-+      *mode_switch = TRUE;
-+      GST_DEBUG_OBJECT (ffmpegdec,
-+          "QOS: hurry up, diff %" G_GINT64_FORMAT " >= 0", diff);
-+    }
-+    goto drop_qos;
-+  }
-+drop_qos:
-+  {
-+    GstClockTime stream_time, jitter;
-+    GstMessage *qos_msg;
-+
-+    ffmpegdec->dropped++;
-+    stream_time =
-+        gst_segment_to_stream_time (&ffmpegdec->segment, GST_FORMAT_TIME,
-+        timestamp);
-+    jitter = GST_CLOCK_DIFF (qostime, earliest_time);
-+    qos_msg =
-+        gst_message_new_qos (GST_OBJECT_CAST (ffmpegdec), FALSE, qostime,
-+        stream_time, timestamp, GST_CLOCK_TIME_NONE);
-+    gst_message_set_qos_values (qos_msg, jitter, proportion, 1000000);
-+    gst_message_set_qos_stats (qos_msg, GST_FORMAT_BUFFERS,
-+        ffmpegdec->processed, ffmpegdec->dropped);
-+    gst_element_post_message (GST_ELEMENT_CAST (ffmpegdec), qos_msg);
-+
-+    return res;
-+  }
-+}
-+
-+/* returns TRUE if buffer is within segment, else FALSE.
-+ * if Buffer is on segment border, it's timestamp and duration will be clipped */
-+static gboolean
-+clip_video_buffer (GstFFMpegDec * dec, GstBuffer * buf, GstClockTime in_ts,
-+    GstClockTime in_dur)
-+{
-+  gboolean res = TRUE;
-+  gint64 cstart, cstop;
-+  GstClockTime stop;
-+
-+  GST_LOG_OBJECT (dec,
-+      "timestamp:%" GST_TIME_FORMAT " , duration:%" GST_TIME_FORMAT,
-+      GST_TIME_ARGS (in_ts), GST_TIME_ARGS (in_dur));
-+
-+  /* can't clip without TIME segment */
-+  if (G_UNLIKELY (dec->segment.format != GST_FORMAT_TIME))
-+    goto beach;
-+
-+  /* we need a start time */
-+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (in_ts)))
-+    goto beach;
-+
-+  /* generate valid stop, if duration unknown, we have unknown stop */
-+  stop =
-+      GST_CLOCK_TIME_IS_VALID (in_dur) ? (in_ts + in_dur) : GST_CLOCK_TIME_NONE;
-+
-+  /* now clip */
-+  res =
-+      gst_segment_clip (&dec->segment, GST_FORMAT_TIME, in_ts, stop, &cstart,
-+      &cstop);
-+  if (G_UNLIKELY (!res))
-+    goto beach;
-+
-+  /* we're pretty sure the duration of this buffer is not till the end of this
-+   * segment (which _clip will assume when the stop is -1) */
-+  if (stop == GST_CLOCK_TIME_NONE)
-+    cstop = GST_CLOCK_TIME_NONE;
-+
-+  /* update timestamp and possibly duration if the clipped stop time is
-+   * valid */
-+  GST_BUFFER_TIMESTAMP (buf) = cstart;
-+  if (GST_CLOCK_TIME_IS_VALID (cstop))
-+    GST_BUFFER_DURATION (buf) = cstop - cstart;
-+
-+  GST_LOG_OBJECT (dec,
-+      "clipped timestamp:%" GST_TIME_FORMAT " , duration:%" GST_TIME_FORMAT,
-+      GST_TIME_ARGS (cstart), GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
-+
-+beach:
-+  GST_LOG_OBJECT (dec, "%sdropping", (res ? "not " : ""));
-+  return res;
-+}
-+
-+
-+/* get an outbuf buffer with the current picture */
-+static GstFlowReturn
-+get_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf)
-+{
-+  GstFlowReturn ret;
-+
-+  ret = GST_FLOW_OK;
-+  *outbuf = NULL;
-+
-+  if (ffmpegdec->picture->opaque != NULL) {
-+    /* we allocated a picture already for ffmpeg to decode into, let's pick it
-+     * up and use it now. */
-+    *outbuf = (GstBuffer *) ffmpegdec->picture->opaque;
-+    GST_LOG_OBJECT (ffmpegdec, "using opaque buffer %p", *outbuf);
-+#ifndef EXTRA_REF
-+    gst_buffer_ref (*outbuf);
-+#endif
-+  } else {
-+    AVPicture pic, *outpic;
-+    gint width, height;
-+
-+    GST_LOG_OBJECT (ffmpegdec, "get output buffer");
-+
-+    /* figure out size of output buffer, this is the clipped output size because
-+     * we will copy the picture into it but only when the clipping region is
-+     * smaller than the actual picture size. */
-+    if ((width = ffmpegdec->format.video.clip_width) == -1)
-+      width = ffmpegdec->context->width;
-+    else if (width > ffmpegdec->context->width)
-+      width = ffmpegdec->context->width;
-+
-+    if ((height = ffmpegdec->format.video.clip_height) == -1)
-+      height = ffmpegdec->context->height;
-+    else if (height > ffmpegdec->context->height)
-+      height = ffmpegdec->context->height;
-+
-+    GST_LOG_OBJECT (ffmpegdec, "clip width %d/height %d", width, height);
-+
-+    ret = alloc_output_buffer (ffmpegdec, outbuf, width, height);
-+    if (G_UNLIKELY (ret != GST_FLOW_OK))
-+      goto alloc_failed;
-+
-+    /* original ffmpeg code does not handle odd sizes correctly.
-+     * This patched up version does */
-+    gst_ffmpeg_avpicture_fill (&pic, GST_BUFFER_DATA (*outbuf),
-+        ffmpegdec->context->pix_fmt, width, height);
-+
-+    outpic = (AVPicture *) ffmpegdec->picture;
-+
-+    GST_LOG_OBJECT (ffmpegdec, "linsize %d %d %d", outpic->linesize[0],
-+        outpic->linesize[1], outpic->linesize[2]);
-+    GST_LOG_OBJECT (ffmpegdec, "data %u %u %u", 0,
-+        (guint) (outpic->data[1] - outpic->data[0]),
-+        (guint) (outpic->data[2] - outpic->data[0]));
-+
-+    av_picture_copy (&pic, outpic, ffmpegdec->context->pix_fmt, width, height);
-+  }
-+  ffmpegdec->picture->reordered_opaque = -1;
-+
-+  return ret;
-+
-+  /* special cases */
-+alloc_failed:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec, "pad_alloc failed");
-+    return ret;
-+  }
-+}
-+
-+static void
-+clear_queued (GstFFMpegDec * ffmpegdec)
-+{
-+  g_list_foreach (ffmpegdec->queued, (GFunc) gst_mini_object_unref, NULL);
-+  g_list_free (ffmpegdec->queued);
-+  ffmpegdec->queued = NULL;
-+}
-+
-+static GstFlowReturn
-+flush_queued (GstFFMpegDec * ffmpegdec)
-+{
-+  GstFlowReturn res = GST_FLOW_OK;
-+
-+  while (ffmpegdec->queued) {
-+    GstBuffer *buf = GST_BUFFER_CAST (ffmpegdec->queued->data);
-+
-+    GST_LOG_OBJECT (ffmpegdec, "pushing buffer %p, offset %"
-+        G_GUINT64_FORMAT ", timestamp %"
-+        GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT, buf,
-+        GST_BUFFER_OFFSET (buf),
-+        GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
-+        GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
-+
-+    /* iterate ouput queue an push downstream */
-+    res = gst_pad_push (ffmpegdec->srcpad, buf);
-+
-+    ffmpegdec->queued =
-+        g_list_delete_link (ffmpegdec->queued, ffmpegdec->queued);
-+  }
-+  return res;
-+}
-+
-+static void
-+gst_avpacket_init (AVPacket * packet, guint8 * data, guint size)
-+{
-+  memset (packet, 0, sizeof (AVPacket));
-+  packet->data = data;
-+  packet->size = size;
-+}
-+
-+/* gst_ffmpegdec_[video|audio]_frame:
-+ * ffmpegdec:
-+ * data: pointer to the data to decode
-+ * size: size of data in bytes
-+ * in_timestamp: incoming timestamp.
-+ * in_duration: incoming duration.
-+ * in_offset: incoming offset (frame number).
-+ * outbuf: outgoing buffer. Different from NULL ONLY if it contains decoded data.
-+ * ret: Return flow.
-+ *
-+ * Returns: number of bytes used in decoding. The check for successful decode is
-+ *   outbuf being non-NULL.
-+ */
-+static gint
-+gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
-+    guint8 * data, guint size,
-+    const GstTSInfo * dec_info, GstBuffer ** outbuf, GstFlowReturn * ret)
-+{
-+  gint len = -1;
-+  gint have_data;
-+  gboolean mode_switch;
-+  gboolean decode;
-+  gint skip_frame = AVDISCARD_DEFAULT;
-+  GstClockTime out_timestamp, out_duration, out_pts;
-+  gint64 out_offset;
-+  const GstTSInfo *out_info;
-+  AVPacket packet;
-+
-+  *ret = GST_FLOW_OK;
-+  *outbuf = NULL;
-+
-+  ffmpegdec->context->opaque = ffmpegdec;
-+
-+  /* in case we skip frames */
-+  ffmpegdec->picture->pict_type = -1;
-+
-+  /* run QoS code, we don't stop decoding the frame when we are late because
-+   * else we might skip a reference frame */
-+  decode = gst_ffmpegdec_do_qos (ffmpegdec, dec_info->timestamp, &mode_switch);
-+
-+  if (ffmpegdec->is_realvideo && data != NULL) {
-+    gint slice_count;
-+    gint i;
-+
-+    /* setup the slice table for realvideo */
-+    if (ffmpegdec->context->slice_offset == NULL)
-+      ffmpegdec->context->slice_offset = g_malloc (sizeof (guint32) * 1000);
-+
-+    slice_count = (*data++) + 1;
-+    ffmpegdec->context->slice_count = slice_count;
-+
-+    for (i = 0; i < slice_count; i++) {
-+      data += 4;
-+      ffmpegdec->context->slice_offset[i] = GST_READ_UINT32_LE (data);
-+      data += 4;
-+    }
-+  }
-+
-+  if (!decode) {
-+    /* no decoding needed, save previous skip_frame value and brutely skip
-+     * decoding everything */
-+    skip_frame = ffmpegdec->context->skip_frame;
-+    ffmpegdec->context->skip_frame = AVDISCARD_NONREF;
-+  }
-+
-+  /* save reference to the timing info */
-+  ffmpegdec->context->reordered_opaque = (gint64) dec_info->idx;
-+  ffmpegdec->picture->reordered_opaque = (gint64) dec_info->idx;
-+
-+  GST_DEBUG_OBJECT (ffmpegdec, "stored opaque values idx %d", dec_info->idx);
-+
-+  /* now decode the frame */
-+  gst_avpacket_init (&packet, data, size);
-+  len = avcodec_decode_video2 (ffmpegdec->context,
-+      ffmpegdec->picture, &have_data, &packet);
-+
-+  /* restore previous state */
-+  if (!decode)
-+    ffmpegdec->context->skip_frame = skip_frame;
-+
-+  GST_DEBUG_OBJECT (ffmpegdec, "after decode: len %d, have_data %d",
-+      len, have_data);
-+
-+  /* when we are in skip_frame mode, don't complain when ffmpeg returned
-+   * no data because we told it to skip stuff. */
-+  if (len < 0 && (mode_switch || ffmpegdec->context->skip_frame))
-+    len = 0;
-+
-+  if (len > 0 && have_data <= 0 && (mode_switch
-+          || ffmpegdec->context->skip_frame)) {
-+    /* we consumed some bytes but nothing decoded and we are skipping frames,
-+     * disable the interpollation of DTS timestamps */
-+    ffmpegdec->last_out = -1;
-+  }
-+
-+  /* no data, we're done */
-+  if (len < 0 || have_data <= 0)
-+    goto beach;
-+
-+  /* get the output picture timing info again */
-+  out_info = gst_ts_info_get (ffmpegdec, ffmpegdec->picture->reordered_opaque);
-+  out_pts = out_info->timestamp;
-+  out_duration = out_info->duration;
-+  out_offset = out_info->offset;
-+
-+  GST_DEBUG_OBJECT (ffmpegdec,
-+      "pts %" G_GUINT64_FORMAT " duration %" G_GUINT64_FORMAT " offset %"
-+      G_GINT64_FORMAT, out_pts, out_duration, out_offset);
-+  GST_DEBUG_OBJECT (ffmpegdec, "picture: pts %" G_GUINT64_FORMAT,
-+      (guint64) ffmpegdec->picture->pts);
-+  GST_DEBUG_OBJECT (ffmpegdec, "picture: num %d",
-+      ffmpegdec->picture->coded_picture_number);
-+  GST_DEBUG_OBJECT (ffmpegdec, "picture: ref %d",
-+      ffmpegdec->picture->reference);
-+  GST_DEBUG_OBJECT (ffmpegdec, "picture: display %d",
-+      ffmpegdec->picture->display_picture_number);
-+  GST_DEBUG_OBJECT (ffmpegdec, "picture: opaque %p",
-+      ffmpegdec->picture->opaque);
-+  GST_DEBUG_OBJECT (ffmpegdec, "picture: reordered opaque %" G_GUINT64_FORMAT,
-+      (guint64) ffmpegdec->picture->reordered_opaque);
-+  GST_DEBUG_OBJECT (ffmpegdec, "repeat_pict:%d",
-+      ffmpegdec->picture->repeat_pict);
-+  GST_DEBUG_OBJECT (ffmpegdec, "interlaced_frame:%d",
-+      ffmpegdec->picture->interlaced_frame);
-+
-+  if (G_UNLIKELY (ffmpegdec->picture->interlaced_frame !=
-+          ffmpegdec->format.video.interlaced)) {
-+    GST_WARNING ("Change in interlacing ! picture:%d, recorded:%d",
-+        ffmpegdec->picture->interlaced_frame,
-+        ffmpegdec->format.video.interlaced);
-+    ffmpegdec->format.video.interlaced = ffmpegdec->picture->interlaced_frame;
-+    gst_ffmpegdec_negotiate (ffmpegdec, TRUE);
-+  }
-+
-+  /* Whether a frame is interlaced or not is unknown at the time of
-+     buffer allocation, so caps on the buffer in opaque will have
-+     the previous frame's interlaced flag set. So if interlacedness
-+     has changed since allocation, we update the buffer (if any)
-+     caps now with the correct interlaced flag. */
-+  if (ffmpegdec->picture->opaque != NULL) {
-+    GstBuffer *buffer = ffmpegdec->picture->opaque;
-+    if (GST_BUFFER_CAPS (buffer) && GST_PAD_CAPS (ffmpegdec->srcpad)) {
-+      GstStructure *s = gst_caps_get_structure (GST_BUFFER_CAPS (buffer), 0);
-+      gboolean interlaced;
-+      gboolean found = gst_structure_get_boolean (s, "interlaced", &interlaced);
-+      if (!found || (!!interlaced != !!ffmpegdec->format.video.interlaced)) {
-+        GST_DEBUG_OBJECT (ffmpegdec,
-+            "Buffer interlacing does not match pad, updating");
-+        buffer = gst_buffer_make_metadata_writable (buffer);
-+        gst_buffer_set_caps (buffer, GST_PAD_CAPS (ffmpegdec->srcpad));
-+        ffmpegdec->picture->opaque = buffer;
-+      }
-+    }
-+  }
-+
-+  /* check that the timestamps go upwards */
-+  if (ffmpegdec->last_out != -1 && ffmpegdec->last_out > out_pts) {
-+    /* timestamps go backwards, this means frames were reordered and we must
-+     * be dealing with DTS as the buffer timestamps */
-+    if (!ffmpegdec->reordered_out) {
-+      GST_DEBUG_OBJECT (ffmpegdec, "detected reordered out timestamps");
-+      ffmpegdec->reordered_out = TRUE;
-+    }
-+    if (ffmpegdec->reordered_in) {
-+      /* we reset the input reordering here because we want to recover from an
-+       * occasionally wrong reordered input timestamp */
-+      GST_DEBUG_OBJECT (ffmpegdec, "assuming DTS input timestamps");
-+      ffmpegdec->reordered_in = FALSE;
-+    }
-+  }
-+
-+  if (out_pts == 0 && out_pts == ffmpegdec->last_out) {
-+    GST_LOG_OBJECT (ffmpegdec, "ffmpeg returns 0 timestamps, ignoring");
-+    /* some codecs only output 0 timestamps, when that happens, make us select an
-+     * output timestamp based on the input timestamp. We do this by making the
-+     * ffmpeg timestamp and the interpollated next timestamp invalid. */
-+    out_pts = -1;
-+    ffmpegdec->next_out = -1;
-+  } else
-+    ffmpegdec->last_out = out_pts;
-+
-+  /* we assume DTS as input timestamps unless we see reordered input
-+   * timestamps */
-+  if (!ffmpegdec->reordered_in && ffmpegdec->reordered_out) {
-+    /* PTS and DTS are the same for keyframes */
-+    if (ffmpegdec->next_out != -1) {
-+      /* interpolate all timestamps except for keyframes, FIXME, this is
-+       * wrong when QoS is active. */
-+      GST_DEBUG_OBJECT (ffmpegdec, "interpolate timestamps");
-+      out_pts = -1;
-+      out_offset = -1;
-+    }
-+  }
-+
-+  /* get a handle to the output buffer */
-+  *ret = get_output_buffer (ffmpegdec, outbuf);
-+  if (G_UNLIKELY (*ret != GST_FLOW_OK))
-+    goto no_output;
-+
-+  /*
-+   * Timestamps:
-+   *
-+   *  1) Copy picture timestamp if valid
-+   *  2) else interpolate from previous output timestamp
-+   *  3) else copy input timestamp
-+   */
-+  out_timestamp = -1;
-+  if (out_pts != -1) {
-+    /* Get (interpolated) timestamp from FFMPEG */
-+    out_timestamp = (GstClockTime) out_pts;
-+    GST_LOG_OBJECT (ffmpegdec, "using timestamp %" GST_TIME_FORMAT
-+        " returned by ffmpeg", GST_TIME_ARGS (out_timestamp));
-+  }
-+  if (!GST_CLOCK_TIME_IS_VALID (out_timestamp) && ffmpegdec->next_out != -1) {
-+    out_timestamp = ffmpegdec->next_out;
-+    GST_LOG_OBJECT (ffmpegdec, "using next timestamp %" GST_TIME_FORMAT,
-+        GST_TIME_ARGS (out_timestamp));
-+  }
-+  if (!GST_CLOCK_TIME_IS_VALID (out_timestamp)) {
-+    out_timestamp = dec_info->timestamp;
-+    GST_LOG_OBJECT (ffmpegdec, "using in timestamp %" GST_TIME_FORMAT,
-+        GST_TIME_ARGS (out_timestamp));
-+  }
-+  GST_BUFFER_TIMESTAMP (*outbuf) = out_timestamp;
-+
-+  /*
-+   * Offset:
-+   *  0) Use stored input offset (from opaque)
-+   *  1) Use value converted from timestamp if valid
-+   *  2) Use input offset if valid
-+   */
-+  if (out_offset != GST_BUFFER_OFFSET_NONE) {
-+    /* out_offset already contains the offset from ts_info */
-+    GST_LOG_OBJECT (ffmpegdec, "Using offset returned by ffmpeg");
-+  } else if (out_timestamp != GST_CLOCK_TIME_NONE) {
-+    GstFormat out_fmt = GST_FORMAT_DEFAULT;
-+    GST_LOG_OBJECT (ffmpegdec, "Using offset converted from timestamp");
-+    /* FIXME, we should really remove this as it's not nice at all to do
-+     * upstream queries for each frame to get the frame offset. We also can't
-+     * really remove this because it is the only way of setting frame offsets
-+     * on outgoing buffers. We should have metadata so that the upstream peer
-+     * can set a frame number on the encoded data. */
-+    gst_pad_query_peer_convert (ffmpegdec->sinkpad,
-+        GST_FORMAT_TIME, out_timestamp, &out_fmt, &out_offset);
-+  } else if (dec_info->offset != GST_BUFFER_OFFSET_NONE) {
-+    /* FIXME, the input offset is input media specific and might not
-+     * be the same for the output media. (byte offset as input, frame number
-+     * as output, for example) */
-+    GST_LOG_OBJECT (ffmpegdec, "using in_offset %" G_GINT64_FORMAT,
-+        dec_info->offset);
-+    out_offset = dec_info->offset;
-+  } else {
-+    GST_LOG_OBJECT (ffmpegdec, "no valid offset found");
-+    out_offset = GST_BUFFER_OFFSET_NONE;
-+  }
-+  GST_BUFFER_OFFSET (*outbuf) = out_offset;
-+
-+  /*
-+   * Duration:
-+   *
-+   *  1) Use reordered input duration if valid
-+   *  2) Else use input duration
-+   *  3) else use input framerate
-+   *  4) else use ffmpeg framerate
-+   */
-+  if (GST_CLOCK_TIME_IS_VALID (out_duration)) {
-+    /* We have a valid (reordered) duration */
-+    GST_LOG_OBJECT (ffmpegdec, "Using duration returned by ffmpeg");
-+  } else if (GST_CLOCK_TIME_IS_VALID (dec_info->duration)) {
-+    GST_LOG_OBJECT (ffmpegdec, "using in_duration");
-+    out_duration = dec_info->duration;
-+  } else if (GST_CLOCK_TIME_IS_VALID (ffmpegdec->last_diff)) {
-+    GST_LOG_OBJECT (ffmpegdec, "using last-diff");
-+    out_duration = ffmpegdec->last_diff;
-+  } else {
-+    /* if we have an input framerate, use that */
-+    if (ffmpegdec->format.video.fps_n != -1 &&
-+        (ffmpegdec->format.video.fps_n != 1000 &&
-+            ffmpegdec->format.video.fps_d != 1)) {
-+      GST_LOG_OBJECT (ffmpegdec, "using input framerate for duration");
-+      out_duration = gst_util_uint64_scale_int (GST_SECOND,
-+          ffmpegdec->format.video.fps_d, ffmpegdec->format.video.fps_n);
-+    } else {
-+      /* don't try to use the decoder's framerate when it seems a bit abnormal,
-+       * which we assume when den >= 1000... */
-+      if (ffmpegdec->context->time_base.num != 0 &&
-+          (ffmpegdec->context->time_base.den > 0 &&
-+              ffmpegdec->context->time_base.den < 1000)) {
-+        GST_LOG_OBJECT (ffmpegdec, "using decoder's framerate for duration");
-+        out_duration = gst_util_uint64_scale_int (GST_SECOND,
-+            ffmpegdec->context->time_base.num *
-+            ffmpegdec->context->ticks_per_frame,
-+            ffmpegdec->context->time_base.den);
-+      } else {
-+        GST_LOG_OBJECT (ffmpegdec, "no valid duration found");
-+      }
-+    }
-+  }
-+
-+  /* Take repeat_pict into account */
-+  if (GST_CLOCK_TIME_IS_VALID (out_duration)) {
-+    out_duration += out_duration * ffmpegdec->picture->repeat_pict / 2;
-+  }
-+  GST_BUFFER_DURATION (*outbuf) = out_duration;
-+
-+  if (out_timestamp != -1 && out_duration != -1 && out_duration != 0)
-+    ffmpegdec->next_out = out_timestamp + out_duration;
-+  else
-+    ffmpegdec->next_out = -1;
-+
-+  /* now see if we need to clip the buffer against the segment boundaries. */
-+  if (G_UNLIKELY (!clip_video_buffer (ffmpegdec, *outbuf, out_timestamp,
-+              out_duration)))
-+    goto clipped;
-+
-+  if (ffmpegdec->picture->top_field_first)
-+    GST_BUFFER_FLAG_SET (*outbuf, GST_VIDEO_BUFFER_TFF);
-+
-+
-+beach:
-+  GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d",
-+      *ret, *outbuf, len);
-+  return len;
-+
-+  /* special cases */
-+no_output:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec, "no output buffer");
-+    len = -1;
-+    goto beach;
-+  }
-+clipped:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec, "buffer clipped");
-+    gst_buffer_unref (*outbuf);
-+    *outbuf = NULL;
-+    goto beach;
-+  }
-+}
-+
-+/* returns TRUE if buffer is within segment, else FALSE.
-+ * if Buffer is on segment border, it's timestamp and duration will be clipped */
-+static gboolean
-+clip_audio_buffer (GstFFMpegDec * dec, GstBuffer * buf, GstClockTime in_ts,
-+    GstClockTime in_dur)
-+{
-+  GstClockTime stop;
-+  gint64 diff, ctime, cstop;
-+  gboolean res = TRUE;
-+
-+  GST_LOG_OBJECT (dec,
-+      "timestamp:%" GST_TIME_FORMAT ", duration:%" GST_TIME_FORMAT
-+      ", size %u", GST_TIME_ARGS (in_ts), GST_TIME_ARGS (in_dur),
-+      GST_BUFFER_SIZE (buf));
-+
-+  /* can't clip without TIME segment */
-+  if (G_UNLIKELY (dec->segment.format != GST_FORMAT_TIME))
-+    goto beach;
-+
-+  /* we need a start time */
-+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (in_ts)))
-+    goto beach;
-+
-+  /* trust duration */
-+  stop = in_ts + in_dur;
-+
-+  res = gst_segment_clip (&dec->segment, GST_FORMAT_TIME, in_ts, stop, &ctime,
-+      &cstop);
-+  if (G_UNLIKELY (!res))
-+    goto out_of_segment;
-+
-+  /* see if some clipping happened */
-+  if (G_UNLIKELY ((diff = ctime - in_ts) > 0)) {
-+    /* bring clipped time to bytes */
-+    diff =
-+        gst_util_uint64_scale_int (diff, dec->format.audio.samplerate,
-+        GST_SECOND) * (dec->format.audio.depth * dec->format.audio.channels);
-+
-+    GST_DEBUG_OBJECT (dec, "clipping start to %" GST_TIME_FORMAT " %"
-+        G_GINT64_FORMAT " bytes", GST_TIME_ARGS (ctime), diff);
-+
-+    GST_BUFFER_SIZE (buf) -= diff;
-+    GST_BUFFER_DATA (buf) += diff;
-+  }
-+  if (G_UNLIKELY ((diff = stop - cstop) > 0)) {
-+    /* bring clipped time to bytes */
-+    diff =
-+        gst_util_uint64_scale_int (diff, dec->format.audio.samplerate,
-+        GST_SECOND) * (dec->format.audio.depth * dec->format.audio.channels);
-+
-+    GST_DEBUG_OBJECT (dec, "clipping stop to %" GST_TIME_FORMAT " %"
-+        G_GINT64_FORMAT " bytes", GST_TIME_ARGS (cstop), diff);
-+
-+    GST_BUFFER_SIZE (buf) -= diff;
-+  }
-+  GST_BUFFER_TIMESTAMP (buf) = ctime;
-+  GST_BUFFER_DURATION (buf) = cstop - ctime;
-+
-+beach:
-+  GST_LOG_OBJECT (dec, "%sdropping", (res ? "not " : ""));
-+  return res;
-+
-+  /* ERRORS */
-+out_of_segment:
-+  {
-+    GST_LOG_OBJECT (dec, "out of segment");
-+    goto beach;
-+  }
-+}
-+
-+static gint
-+gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec,
-+    AVCodec * in_plugin, guint8 * data, guint size,
-+    const GstTSInfo * dec_info, GstBuffer ** outbuf, GstFlowReturn * ret)
-+{
-+  gint len = -1;
-+  gint have_data = AVCODEC_MAX_AUDIO_FRAME_SIZE;
-+  GstClockTime out_timestamp, out_duration;
-+  gint64 out_offset;
-+  AVPacket packet;
-+
-+  GST_DEBUG_OBJECT (ffmpegdec,
-+      "size:%d, offset:%" G_GINT64_FORMAT ", ts:%" GST_TIME_FORMAT ", dur:%"
-+      GST_TIME_FORMAT ", ffmpegdec->next_out:%" GST_TIME_FORMAT, size,
-+      dec_info->offset, GST_TIME_ARGS (dec_info->timestamp),
-+      GST_TIME_ARGS (dec_info->duration), GST_TIME_ARGS (ffmpegdec->next_out));
-+
-+  *outbuf =
-+      new_aligned_buffer (AVCODEC_MAX_AUDIO_FRAME_SIZE,
-+      GST_PAD_CAPS (ffmpegdec->srcpad));
-+
-+  gst_avpacket_init (&packet, data, size);
-+  len = avcodec_decode_audio3 (ffmpegdec->context,
-+      (int16_t *) GST_BUFFER_DATA (*outbuf), &have_data, &packet);
-+  GST_DEBUG_OBJECT (ffmpegdec,
-+      "Decode audio: len=%d, have_data=%d", len, have_data);
-+
-+  if (len >= 0 && have_data > 0) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "Creating output buffer");
-+    if (!gst_ffmpegdec_negotiate (ffmpegdec, FALSE)) {
-+      gst_buffer_unref (*outbuf);
-+      *outbuf = NULL;
-+      len = -1;
-+      goto beach;
-+    }
-+
-+    /* Buffer size */
-+    GST_BUFFER_SIZE (*outbuf) = have_data;
-+
-+    /*
-+     * Timestamps:
-+     *
-+     *  1) Copy input timestamp if valid
-+     *  2) else interpolate from previous input timestamp
-+     */
-+    /* always take timestamps from the input buffer if any */
-+    if (GST_CLOCK_TIME_IS_VALID (dec_info->timestamp)) {
-+      out_timestamp = dec_info->timestamp;
-+    } else {
-+      out_timestamp = ffmpegdec->next_out;
-+    }
-+
-+    /*
-+     * Duration:
-+     *
-+     *  1) calculate based on number of samples
-+     */
-+    out_duration = gst_util_uint64_scale (have_data, GST_SECOND,
-+        ffmpegdec->format.audio.depth * ffmpegdec->format.audio.channels *
-+        ffmpegdec->format.audio.samplerate);
-+
-+    /* offset:
-+     *
-+     * Just copy
-+     */
-+    out_offset = dec_info->offset;
-+
-+    GST_DEBUG_OBJECT (ffmpegdec,
-+        "Buffer created. Size:%d , timestamp:%" GST_TIME_FORMAT " , duration:%"
-+        GST_TIME_FORMAT, have_data,
-+        GST_TIME_ARGS (out_timestamp), GST_TIME_ARGS (out_duration));
-+
-+    GST_BUFFER_TIMESTAMP (*outbuf) = out_timestamp;
-+    GST_BUFFER_DURATION (*outbuf) = out_duration;
-+    GST_BUFFER_OFFSET (*outbuf) = out_offset;
-+    gst_buffer_set_caps (*outbuf, GST_PAD_CAPS (ffmpegdec->srcpad));
-+
-+    /* the next timestamp we'll use when interpolating */
-+    if (GST_CLOCK_TIME_IS_VALID (out_timestamp))
-+      ffmpegdec->next_out = out_timestamp + out_duration;
-+
-+    /* now see if we need to clip the buffer against the segment boundaries. */
-+    if (G_UNLIKELY (!clip_audio_buffer (ffmpegdec, *outbuf, out_timestamp,
-+                out_duration)))
-+      goto clipped;
-+
-+  } else {
-+    gst_buffer_unref (*outbuf);
-+    *outbuf = NULL;
-+  }
-+
-+  /* If we don't error out after the first failed read with the AAC decoder,
-+   * we must *not* carry on pushing data, else we'll cause segfaults... */
-+  if (len == -1 && (in_plugin->id == CODEC_ID_AAC
-+          || in_plugin->id == CODEC_ID_AAC_LATM)) {
-+    GST_ELEMENT_ERROR (ffmpegdec, STREAM, DECODE, (NULL),
-+        ("Decoding of AAC stream by FFMPEG failed."));
-+    *ret = GST_FLOW_ERROR;
-+  }
-+
-+beach:
-+  GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d",
-+      *ret, *outbuf, len);
-+  return len;
-+
-+  /* ERRORS */
-+clipped:
-+  {
-+    GST_DEBUG_OBJECT (ffmpegdec, "buffer clipped");
-+    gst_buffer_unref (*outbuf);
-+    *outbuf = NULL;
-+    goto beach;
-+  }
-+}
-+
-+/* gst_ffmpegdec_frame:
-+ * ffmpegdec:
-+ * data: pointer to the data to decode
-+ * size: size of data in bytes
-+ * got_data: 0 if no data was decoded, != 0 otherwise.
-+ * in_time: timestamp of data
-+ * in_duration: duration of data
-+ * ret: GstFlowReturn to return in the chain function
-+ *
-+ * Decode the given frame and pushes it downstream.
-+ *
-+ * Returns: Number of bytes used in decoding, -1 on error/failure.
-+ */
-+
-+static gint
-+gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
-+    guint8 * data, guint size, gint * got_data, const GstTSInfo * dec_info,
-+    GstFlowReturn * ret)
-+{
-+  GstFFMpegDecClass *oclass;
-+  GstBuffer *outbuf = NULL;
-+  gint have_data = 0, len = 0;
-+
-+  if (G_UNLIKELY (ffmpegdec->context->codec == NULL))
-+    goto no_codec;
-+
-+  GST_LOG_OBJECT (ffmpegdec, "data:%p, size:%d, id:%d", data, size,
-+      dec_info->idx);
-+
-+  *ret = GST_FLOW_OK;
-+  ffmpegdec->context->frame_number++;
-+
-+  oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
-+
-+  switch (oclass->in_plugin->type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+      len =
-+          gst_ffmpegdec_video_frame (ffmpegdec, data, size, dec_info, &outbuf,
-+          ret);
-+      break;
-+    case AVMEDIA_TYPE_AUDIO:
-+      len =
-+          gst_ffmpegdec_audio_frame (ffmpegdec, oclass->in_plugin, data, size,
-+          dec_info, &outbuf, ret);
-+
-+      /* if we did not get an output buffer and we have a pending discont, don't
-+       * clear the input timestamps, we will put them on the next buffer because
-+       * else we might create the first buffer with a very big timestamp gap. */
-+      if (outbuf == NULL && ffmpegdec->discont) {
-+        GST_DEBUG_OBJECT (ffmpegdec, "no buffer but keeping timestamp");
-+        ffmpegdec->clear_ts = FALSE;
-+      }
-+      break;
-+    default:
-+      GST_ERROR_OBJECT (ffmpegdec, "Asked to decode non-audio/video frame !");
-+      g_assert_not_reached ();
-+      break;
-+  }
-+
-+  if (outbuf)
-+    have_data = 1;
-+
-+  if (len < 0 || have_data < 0) {
-+    GST_WARNING_OBJECT (ffmpegdec,
-+        "ffdec_%s: decoding error (len: %d, have_data: %d)",
-+        oclass->in_plugin->name, len, have_data);
-+    *got_data = 0;
-+    goto beach;
-+  } else if (len == 0 && have_data == 0) {
-+    *got_data = 0;
-+    goto beach;
-+  } else {
-+    /* this is where I lost my last clue on ffmpeg... */
-+    *got_data = 1;
-+  }
-+
-+  if (outbuf) {
-+    GST_LOG_OBJECT (ffmpegdec,
-+        "Decoded data, now pushing buffer %p with offset %" G_GINT64_FORMAT
-+        ", timestamp %" GST_TIME_FORMAT " and duration %" GST_TIME_FORMAT,
-+        outbuf, GST_BUFFER_OFFSET (outbuf),
-+        GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
-+        GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
-+
-+    /* mark pending discont */
-+    if (ffmpegdec->discont) {
-+      GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
-+      ffmpegdec->discont = FALSE;
-+    }
-+
-+    if (ffmpegdec->segment.rate > 0.0) {
-+      /* and off we go */
-+      *ret = gst_pad_push (ffmpegdec->srcpad, outbuf);
-+    } else {
-+      /* reverse playback, queue frame till later when we get a discont. */
-+      GST_DEBUG_OBJECT (ffmpegdec, "queued frame");
-+      ffmpegdec->queued = g_list_prepend (ffmpegdec->queued, outbuf);
-+      *ret = GST_FLOW_OK;
-+    }
-+  } else {
-+    GST_DEBUG_OBJECT (ffmpegdec, "We didn't get a decoded buffer");
-+  }
-+
-+beach:
-+  return len;
-+
-+  /* ERRORS */
-+no_codec:
-+  {
-+    GST_ERROR_OBJECT (ffmpegdec, "no codec context");
-+    return -1;
-+  }
-+}
-+
-+static void
-+gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec)
-+{
-+  GstFFMpegDecClass *oclass;
-+
-+  oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
-+
-+  if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
-+    gint have_data, len, try = 0;
-+
-+    GST_LOG_OBJECT (ffmpegdec,
-+        "codec has delay capabilities, calling until ffmpeg has drained everything");
-+
-+    do {
-+      GstFlowReturn ret;
-+
-+      len =
-+          gst_ffmpegdec_frame (ffmpegdec, NULL, 0, &have_data, &ts_info_none,
-+          &ret);
-+      if (len < 0 || have_data == 0)
-+        break;
-+    } while (try++ < 10);
-+  }
-+  if (ffmpegdec->segment.rate < 0.0) {
-+    /* if we have some queued frames for reverse playback, flush them now */
-+    flush_queued (ffmpegdec);
-+  }
-+}
-+
-+static void
-+gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec)
-+{
-+  if (ffmpegdec->pctx) {
-+    gint size, bsize;
-+    guint8 *data;
-+    guint8 bdata[FF_INPUT_BUFFER_PADDING_SIZE];
-+
-+    bsize = FF_INPUT_BUFFER_PADDING_SIZE;
-+    memset (bdata, 0, bsize);
-+
-+    /* parse some dummy data to work around some ffmpeg weirdness where it keeps
-+     * the previous pts around */
-+    av_parser_parse2 (ffmpegdec->pctx, ffmpegdec->context,
-+        &data, &size, bdata, bsize, -1, -1, -1);
-+    ffmpegdec->pctx->pts = -1;
-+    ffmpegdec->pctx->dts = -1;
-+  }
-+
-+  if (ffmpegdec->pcache) {
-+    gst_buffer_unref (ffmpegdec->pcache);
-+    ffmpegdec->pcache = NULL;
-+  }
-+}
-+
-+static gboolean
-+gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
-+{
-+  GstFFMpegDec *ffmpegdec;
-+  gboolean ret = FALSE;
-+
-+  ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
-+
-+  GST_DEBUG_OBJECT (ffmpegdec, "Handling %s event",
-+      GST_EVENT_TYPE_NAME (event));
-+
-+  switch (GST_EVENT_TYPE (event)) {
-+    case GST_EVENT_EOS:
-+    {
-+      gst_ffmpegdec_drain (ffmpegdec);
-+      break;
-+    }
-+    case GST_EVENT_FLUSH_STOP:
-+    {
-+      if (ffmpegdec->opened) {
-+        avcodec_flush_buffers (ffmpegdec->context);
-+      }
-+      gst_ffmpegdec_reset_ts (ffmpegdec);
-+      gst_ffmpegdec_reset_qos (ffmpegdec);
-+      gst_ffmpegdec_flush_pcache (ffmpegdec);
-+      gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
-+      clear_queued (ffmpegdec);
-+      break;
-+    }
-+    case GST_EVENT_NEWSEGMENT:
-+    {
-+      gboolean update;
-+      GstFormat fmt;
-+      gint64 start, stop, time;
-+      gdouble rate, arate;
-+
-+      gst_event_parse_new_segment_full (event, &update, &rate, &arate, &fmt,
-+          &start, &stop, &time);
-+
-+      switch (fmt) {
-+        case GST_FORMAT_TIME:
-+          /* fine, our native segment format */
-+          break;
-+        case GST_FORMAT_BYTES:
-+        {
-+          gint bit_rate;
-+
-+          bit_rate = ffmpegdec->context->bit_rate;
-+
-+          /* convert to time or fail */
-+          if (!bit_rate)
-+            goto no_bitrate;
-+
-+          GST_DEBUG_OBJECT (ffmpegdec, "bitrate: %d", bit_rate);
-+
-+          /* convert values to TIME */
-+          if (start != -1)
-+            start = gst_util_uint64_scale_int (start, GST_SECOND, bit_rate);
-+          if (stop != -1)
-+            stop = gst_util_uint64_scale_int (stop, GST_SECOND, bit_rate);
-+          if (time != -1)
-+            time = gst_util_uint64_scale_int (time, GST_SECOND, bit_rate);
-+
-+          /* unref old event */
-+          gst_event_unref (event);
-+
-+          /* create new converted time segment */
-+          fmt = GST_FORMAT_TIME;
-+          /* FIXME, bitrate is not good enough too find a good stop, let's
-+           * hope start and time were 0... meh. */
-+          stop = -1;
-+          event = gst_event_new_new_segment (update, rate, fmt,
-+              start, stop, time);
-+          break;
-+        }
-+        default:
-+          /* invalid format */
-+          goto invalid_format;
-+      }
-+
-+      /* drain pending frames before trying to use the new segment, queued
-+       * buffers belonged to the previous segment. */
-+      if (ffmpegdec->context->codec)
-+        gst_ffmpegdec_drain (ffmpegdec);
-+
-+      GST_DEBUG_OBJECT (ffmpegdec,
-+          "NEWSEGMENT in time start %" GST_TIME_FORMAT " -- stop %"
-+          GST_TIME_FORMAT, GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
-+
-+      /* and store the values */
-+      gst_segment_set_newsegment_full (&ffmpegdec->segment, update,
-+          rate, arate, fmt, start, stop, time);
-+      break;
-+    }
-+    default:
-+      break;
-+  }
-+
-+  /* and push segment downstream */
-+  ret = gst_pad_push_event (ffmpegdec->srcpad, event);
-+
-+done:
-+  gst_object_unref (ffmpegdec);
-+
-+  return ret;
-+
-+  /* ERRORS */
-+no_bitrate:
-+  {
-+    GST_WARNING_OBJECT (ffmpegdec, "no bitrate to convert BYTES to TIME");
-+    gst_event_unref (event);
-+    goto done;
-+  }
-+invalid_format:
-+  {
-+    GST_WARNING_OBJECT (ffmpegdec, "unknown format received in NEWSEGMENT");
-+    gst_event_unref (event);
-+    goto done;
-+  }
-+}
-+
-+static GstFlowReturn
-+gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
-+{
-+  GstFFMpegDec *ffmpegdec;
-+  GstFFMpegDecClass *oclass;
-+  guint8 *data, *bdata;
-+  gint size, bsize, len, have_data;
-+  GstFlowReturn ret = GST_FLOW_OK;
-+  GstClockTime in_timestamp;
-+  GstClockTime in_duration;
-+  gboolean discont;
-+  gint64 in_offset;
-+  const GstTSInfo *in_info;
-+  const GstTSInfo *dec_info;
-+
-+  ffmpegdec = (GstFFMpegDec *) (GST_PAD_PARENT (pad));
-+
-+  if (G_UNLIKELY (!ffmpegdec->opened))
-+    goto not_negotiated;
-+
-+  discont = GST_BUFFER_IS_DISCONT (inbuf);
-+
-+  /* The discont flags marks a buffer that is not continuous with the previous
-+   * buffer. This means we need to clear whatever data we currently have. We
-+   * currently also wait for a new keyframe, which might be suboptimal in the
-+   * case of a network error, better show the errors than to drop all data.. */
-+  if (G_UNLIKELY (discont)) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "received DISCONT");
-+    /* drain what we have queued */
-+    gst_ffmpegdec_drain (ffmpegdec);
-+    gst_ffmpegdec_flush_pcache (ffmpegdec);
-+    avcodec_flush_buffers (ffmpegdec->context);
-+    ffmpegdec->discont = TRUE;
-+    gst_ffmpegdec_reset_ts (ffmpegdec);
-+  }
-+  /* by default we clear the input timestamp after decoding each frame so that
-+   * interpollation can work. */
-+  ffmpegdec->clear_ts = TRUE;
-+
-+  oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
-+
-+  /* parse cache joining. If there is cached data */
-+  if (ffmpegdec->pcache) {
-+    /* join with previous data */
-+    GST_LOG_OBJECT (ffmpegdec, "join parse cache");
-+    inbuf = gst_buffer_join (ffmpegdec->pcache, inbuf);
-+    /* no more cached data, we assume we can consume the complete cache */
-+    ffmpegdec->pcache = NULL;
-+  }
-+
-+  in_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
-+  in_duration = GST_BUFFER_DURATION (inbuf);
-+  in_offset = GST_BUFFER_OFFSET (inbuf);
-+
-+  /* get handle to timestamp info, we can pass this around to ffmpeg */
-+  in_info = gst_ts_info_store (ffmpegdec, in_timestamp, in_duration, in_offset);
-+
-+  if (in_timestamp != -1) {
-+    /* check for increasing timestamps if they are jumping backwards, we
-+     * probably are dealing with PTS as timestamps */
-+    if (!ffmpegdec->reordered_in && ffmpegdec->last_in != -1) {
-+      if (in_timestamp < ffmpegdec->last_in) {
-+        GST_LOG_OBJECT (ffmpegdec, "detected reordered input timestamps");
-+        ffmpegdec->reordered_in = TRUE;
-+        ffmpegdec->last_diff = GST_CLOCK_TIME_NONE;
-+      } else if (in_timestamp > ffmpegdec->last_in) {
-+        GstClockTime diff;
-+        /* keep track of timestamp diff to estimate duration */
-+        diff = in_timestamp - ffmpegdec->last_in;
-+        /* need to scale with amount of frames in the interval */
-+        if (ffmpegdec->last_frames)
-+          diff /= ffmpegdec->last_frames;
-+
-+        GST_LOG_OBJECT (ffmpegdec, "estimated duration %" GST_TIME_FORMAT " %u",
-+            GST_TIME_ARGS (diff), ffmpegdec->last_frames);
-+
-+        ffmpegdec->last_diff = diff;
-+      }
-+    }
-+    ffmpegdec->last_in = in_timestamp;
-+    ffmpegdec->last_frames = 0;
-+  }
-+
-+  GST_LOG_OBJECT (ffmpegdec,
-+      "Received new data of size %u, offset:%" G_GUINT64_FORMAT ", ts:%"
-+      GST_TIME_FORMAT ", dur:%" GST_TIME_FORMAT ", info %d",
-+      GST_BUFFER_SIZE (inbuf), GST_BUFFER_OFFSET (inbuf),
-+      GST_TIME_ARGS (in_timestamp), GST_TIME_ARGS (in_duration), in_info->idx);
-+
-+  /* workarounds, functions write to buffers:
-+   *  libavcodec/svq1.c:svq1_decode_frame writes to the given buffer.
-+   *  libavcodec/svq3.c:svq3_decode_slice_header too.
-+   * ffmpeg devs know about it and will fix it (they said). */
-+  if (oclass->in_plugin->id == CODEC_ID_SVQ1 ||
-+      oclass->in_plugin->id == CODEC_ID_SVQ3) {
-+    inbuf = gst_buffer_make_writable (inbuf);
-+  }
-+
-+  bdata = GST_BUFFER_DATA (inbuf);
-+  bsize = GST_BUFFER_SIZE (inbuf);
-+
-+  if (ffmpegdec->do_padding) {
-+    /* add padding */
-+    if (ffmpegdec->padded_size < bsize + FF_INPUT_BUFFER_PADDING_SIZE) {
-+      ffmpegdec->padded_size = bsize + FF_INPUT_BUFFER_PADDING_SIZE;
-+      ffmpegdec->padded = g_realloc (ffmpegdec->padded, ffmpegdec->padded_size);
-+      GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d",
-+          ffmpegdec->padded_size);
-+    }
-+    memcpy (ffmpegdec->padded, bdata, bsize);
-+    memset (ffmpegdec->padded + bsize, 0, FF_INPUT_BUFFER_PADDING_SIZE);
-+
-+    bdata = ffmpegdec->padded;
-+  }
-+
-+  do {
-+    guint8 tmp_padding[FF_INPUT_BUFFER_PADDING_SIZE];
-+
-+    /* parse, if at all possible */
-+    if (ffmpegdec->pctx) {
-+      gint res;
-+
-+      GST_LOG_OBJECT (ffmpegdec,
-+          "Calling av_parser_parse2 with offset %" G_GINT64_FORMAT ", ts:%"
-+          GST_TIME_FORMAT " size %d", in_offset, GST_TIME_ARGS (in_timestamp),
-+          bsize);
-+
-+      /* feed the parser. We pass the timestamp info so that we can recover all
-+       * info again later */
-+      res = av_parser_parse2 (ffmpegdec->pctx, ffmpegdec->context,
-+          &data, &size, bdata, bsize, in_info->idx, in_info->idx, in_offset);
-+
-+      GST_LOG_OBJECT (ffmpegdec,
-+          "parser returned res %d and size %d, id %" G_GINT64_FORMAT, res, size,
-+          ffmpegdec->pctx->pts);
-+
-+      /* store pts for decoding */
-+      if (ffmpegdec->pctx->pts != AV_NOPTS_VALUE && ffmpegdec->pctx->pts != -1)
-+        dec_info = gst_ts_info_get (ffmpegdec, ffmpegdec->pctx->pts);
-+      else {
-+        /* ffmpeg sometimes loses track after a flush, help it by feeding a
-+         * valid start time */
-+        ffmpegdec->pctx->pts = in_info->idx;
-+        ffmpegdec->pctx->dts = in_info->idx;
-+        dec_info = in_info;
-+      }
-+
-+      GST_LOG_OBJECT (ffmpegdec, "consuming %d bytes. id %d", size,
-+          dec_info->idx);
-+
-+      if (res) {
-+        /* there is output, set pointers for next round. */
-+        bsize -= res;
-+        bdata += res;
-+      } else {
-+        /* Parser did not consume any data, make sure we don't clear the
-+         * timestamp for the next round */
-+        ffmpegdec->clear_ts = FALSE;
-+      }
-+
-+      /* if there is no output, we must break and wait for more data. also the
-+       * timestamp in the context is not updated. */
-+      if (size == 0) {
-+        if (bsize > 0)
-+          continue;
-+        else
-+          break;
-+      }
-+    } else {
-+      data = bdata;
-+      size = bsize;
-+
-+      dec_info = in_info;
-+    }
-+
-+    if (ffmpegdec->do_padding) {
-+      /* add temporary padding */
-+      memcpy (tmp_padding, data + size, FF_INPUT_BUFFER_PADDING_SIZE);
-+      memset (data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
-+    }
-+
-+    /* decode a frame of audio/video now */
-+    len =
-+        gst_ffmpegdec_frame (ffmpegdec, data, size, &have_data, dec_info, &ret);
-+
-+    if (ffmpegdec->do_padding) {
-+      memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE);
-+    }
-+
-+    if (ret != GST_FLOW_OK) {
-+      GST_LOG_OBJECT (ffmpegdec, "breaking because of flow ret %s",
-+          gst_flow_get_name (ret));
-+      /* bad flow retun, make sure we discard all data and exit */
-+      bsize = 0;
-+      break;
-+    }
-+    if (!ffmpegdec->pctx) {
-+      if (len == 0 && !have_data) {
-+        /* nothing was decoded, this could be because no data was available or
-+         * because we were skipping frames.
-+         * If we have no context we must exit and wait for more data, we keep the
-+         * data we tried. */
-+        GST_LOG_OBJECT (ffmpegdec, "Decoding didn't return any data, breaking");
-+        break;
-+      } else if (len < 0) {
-+        /* a decoding error happened, we must break and try again with next data. */
-+        GST_LOG_OBJECT (ffmpegdec, "Decoding error, breaking");
-+        bsize = 0;
-+        break;
-+      }
-+      /* prepare for the next round, for codecs with a context we did this
-+       * already when using the parser. */
-+      bsize -= len;
-+      bdata += len;
-+    } else {
-+      if (len == 0) {
-+        /* nothing was decoded, this could be because no data was available or
-+         * because we were skipping frames. Since we have a parser we can
-+         * continue with the next frame */
-+        GST_LOG_OBJECT (ffmpegdec,
-+            "Decoding didn't return any data, trying next");
-+      } else if (len < 0) {
-+        /* we have a context that will bring us to the next frame */
-+        GST_LOG_OBJECT (ffmpegdec, "Decoding error, trying next");
-+      }
-+    }
-+
-+    /* make sure we don't use the same old timestamp for the next frame and let
-+     * the interpollation take care of it. */
-+    if (ffmpegdec->clear_ts) {
-+      in_timestamp = GST_CLOCK_TIME_NONE;
-+      in_duration = GST_CLOCK_TIME_NONE;
-+      in_offset = GST_BUFFER_OFFSET_NONE;
-+      in_info = GST_TS_INFO_NONE;
-+    } else {
-+      ffmpegdec->clear_ts = TRUE;
-+    }
-+    ffmpegdec->last_frames++;
-+
-+    GST_LOG_OBJECT (ffmpegdec, "Before (while bsize>0).  bsize:%d , bdata:%p",
-+        bsize, bdata);
-+  } while (bsize > 0);
-+
-+  /* keep left-over */
-+  if (ffmpegdec->pctx && bsize > 0) {
-+    in_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
-+    in_offset = GST_BUFFER_OFFSET (inbuf);
-+
-+    GST_LOG_OBJECT (ffmpegdec,
-+        "Keeping %d bytes of data with offset %" G_GINT64_FORMAT ", timestamp %"
-+        GST_TIME_FORMAT, bsize, in_offset, GST_TIME_ARGS (in_timestamp));
-+
-+    ffmpegdec->pcache = gst_buffer_create_sub (inbuf,
-+        GST_BUFFER_SIZE (inbuf) - bsize, bsize);
-+    /* we keep timestamp, even though all we really know is that the correct
-+     * timestamp is not below the one from inbuf */
-+    GST_BUFFER_TIMESTAMP (ffmpegdec->pcache) = in_timestamp;
-+    GST_BUFFER_OFFSET (ffmpegdec->pcache) = in_offset;
-+  } else if (bsize > 0) {
-+    GST_DEBUG_OBJECT (ffmpegdec, "Dropping %d bytes of data", bsize);
-+  }
-+  gst_buffer_unref (inbuf);
-+
-+  return ret;
-+
-+  /* ERRORS */
-+not_negotiated:
-+  {
-+    oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
-+    GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
-+        ("ffdec_%s: input format was not set before data start",
-+            oclass->in_plugin->name));
-+    gst_buffer_unref (inbuf);
-+    return GST_FLOW_NOT_NEGOTIATED;
-+  }
-+}
-+
-+static GstStateChangeReturn
-+gst_ffmpegdec_change_state (GstElement * element, GstStateChange transition)
-+{
-+  GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) element;
-+  GstStateChangeReturn ret;
-+
-+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-+
-+  switch (transition) {
-+    case GST_STATE_CHANGE_PAUSED_TO_READY:
-+      GST_OBJECT_LOCK (ffmpegdec);
-+      gst_ffmpegdec_close (ffmpegdec);
-+      GST_OBJECT_UNLOCK (ffmpegdec);
-+      clear_queued (ffmpegdec);
-+      g_free (ffmpegdec->padded);
-+      ffmpegdec->padded = NULL;
-+      ffmpegdec->padded_size = 0;
-+      ffmpegdec->can_allocate_aligned = TRUE;
-+      break;
-+    default:
-+      break;
-+  }
-+
-+  return ret;
-+}
-+
-+static void
-+gst_ffmpegdec_set_property (GObject * object,
-+    guint prop_id, const GValue * value, GParamSpec * pspec)
-+{
-+  GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
-+
-+  switch (prop_id) {
-+    case PROP_LOWRES:
-+      ffmpegdec->lowres = ffmpegdec->context->lowres = g_value_get_enum (value);
-+      break;
-+    case PROP_SKIPFRAME:
-+      ffmpegdec->skip_frame = ffmpegdec->context->skip_frame =
-+          g_value_get_enum (value);
-+      break;
-+    case PROP_DIRECT_RENDERING:
-+      ffmpegdec->direct_rendering = g_value_get_boolean (value);
-+      break;
-+    case PROP_DO_PADDING:
-+      ffmpegdec->do_padding = g_value_get_boolean (value);
-+      break;
-+    case PROP_DEBUG_MV:
-+      ffmpegdec->debug_mv = ffmpegdec->context->debug_mv =
-+          g_value_get_boolean (value);
-+      break;
-+    case PROP_CROP:
-+      ffmpegdec->crop = g_value_get_boolean (value);
-+      break;
-+    case PROP_MAX_THREADS:
-+      ffmpegdec->max_threads = g_value_get_int (value);
-+      break;
-+    default:
-+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-+      break;
-+  }
-+}
-+
-+static void
-+gst_ffmpegdec_get_property (GObject * object,
-+    guint prop_id, GValue * value, GParamSpec * pspec)
-+{
-+  GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
-+
-+  switch (prop_id) {
-+    case PROP_LOWRES:
-+      g_value_set_enum (value, ffmpegdec->context->lowres);
-+      break;
-+    case PROP_SKIPFRAME:
-+      g_value_set_enum (value, ffmpegdec->context->skip_frame);
-+      break;
-+    case PROP_DIRECT_RENDERING:
-+      g_value_set_boolean (value, ffmpegdec->direct_rendering);
-+      break;
-+    case PROP_DO_PADDING:
-+      g_value_set_boolean (value, ffmpegdec->do_padding);
-+      break;
-+    case PROP_DEBUG_MV:
-+      g_value_set_boolean (value, ffmpegdec->context->debug_mv);
-+      break;
-+    case PROP_CROP:
-+      g_value_set_boolean (value, ffmpegdec->crop);
-+      break;
-+    case PROP_MAX_THREADS:
-+      g_value_set_int (value, ffmpegdec->max_threads);
-+      break;
-+    default:
-+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-+      break;
-+  }
-+}
-+
-+gboolean
-+gst_ffmpegdec_register (GstPlugin * plugin)
-+{
-+  GTypeInfo typeinfo = {
-+    sizeof (GstFFMpegDecClass),
-+    (GBaseInitFunc) gst_ffmpegdec_base_init,
-+    NULL,
-+    (GClassInitFunc) gst_ffmpegdec_class_init,
-+    NULL,
-+    NULL,
-+    sizeof (GstFFMpegDec),
-+    0,
-+    (GInstanceInitFunc) gst_ffmpegdec_init,
-+  };
-+  GType type;
-+  AVCodec *in_plugin;
-+  gint rank;
-+
-+  in_plugin = av_codec_next (NULL);
-+
-+  GST_LOG ("Registering decoders");
-+
-+  while (in_plugin) {
-+    gchar *type_name;
-+    gchar *plugin_name;
-+
-+    /* only decoders */
-+    if (!in_plugin->decode) {
-+      goto next;
-+    }
-+
-+    /* no quasi-codecs, please */
-+    if (in_plugin->id == CODEC_ID_RAWVIDEO ||
-+        in_plugin->id == CODEC_ID_V210 ||
-+        in_plugin->id == CODEC_ID_V210X ||
-+        in_plugin->id == CODEC_ID_R210 ||
-+        (in_plugin->id >= CODEC_ID_PCM_S16LE &&
-+            in_plugin->id <= CODEC_ID_PCM_BLURAY)) {
-+      goto next;
-+    }
-+
-+    /* No decoders depending on external libraries (we don't build them, but
-+     * people who build against an external ffmpeg might have them.
-+     * We have native gstreamer plugins for all of those libraries anyway. */
-+    if (!strncmp (in_plugin->name, "lib", 3)) {
-+      GST_DEBUG
-+          ("Not using external library decoder %s. Use the gstreamer-native ones instead.",
-+          in_plugin->name);
-+      goto next;
-+    }
-+
-+    /* No vdpau plugins until we can figure out how to properly use them
-+     * outside of ffmpeg. */
-+    if (g_str_has_suffix (in_plugin->name, "_vdpau")) {
-+      GST_DEBUG
-+          ("Ignoring VDPAU decoder %s. We can't handle this outside of ffmpeg",
-+          in_plugin->name);
-+      goto next;
-+    }
-+
-+    if (g_str_has_suffix (in_plugin->name, "_xvmc")) {
-+      GST_DEBUG
-+          ("Ignoring XVMC decoder %s. We can't handle this outside of ffmpeg",
-+          in_plugin->name);
-+      goto next;
-+    }
-+
-+    GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
-+
-+    /* no codecs for which we're GUARANTEED to have better alternatives */
-+    /* MPEG1VIDEO : the mpeg2video decoder is preferred */
-+    /* MP1 : Use MP3 for decoding */
-+    /* MP2 : Use MP3 for decoding */
-+    /* Theora: Use libtheora based theoradec */
-+    if (!strcmp (in_plugin->name, "gif") ||
-+        !strcmp (in_plugin->name, "vorbis") ||
-+        !strcmp (in_plugin->name, "theora") ||
-+        !strcmp (in_plugin->name, "mpeg1video") ||
-+        !strcmp (in_plugin->name, "wavpack") ||
-+        !strcmp (in_plugin->name, "mp1") ||
-+        !strcmp (in_plugin->name, "mp2") ||
-+        !strcmp (in_plugin->name, "libfaad") ||
-+        !strcmp (in_plugin->name, "mpeg4aac") ||
-+        !strcmp (in_plugin->name, "ass") ||
-+        !strcmp (in_plugin->name, "srt") ||
-+        !strcmp (in_plugin->name, "pgssub") ||
-+        !strcmp (in_plugin->name, "dvdsub") ||
-+        !strcmp (in_plugin->name, "dvbsub")) {
-+      GST_LOG ("Ignoring decoder %s", in_plugin->name);
-+      goto next;
-+    }
-+
-+    /* construct the type */
-+    plugin_name = g_strdup ((gchar *) in_plugin->name);
-+    g_strdelimit (plugin_name, NULL, '_');
-+    type_name = g_strdup_printf ("ffdec_%s", plugin_name);
-+    g_free (plugin_name);
-+
-+    type = g_type_from_name (type_name);
-+
-+    if (!type) {
-+      /* create the gtype now */
-+      type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
-+      g_type_set_qdata (type, GST_FFDEC_PARAMS_QDATA, (gpointer) in_plugin);
-+    }
-+
-+    /* (Ronald) MPEG-4 gets a higher priority because it has been well-
-+     * tested and by far outperforms divxdec/xviddec - so we prefer it.
-+     * msmpeg4v3 same, as it outperforms divxdec for divx3 playback.
-+     * VC1/WMV3 are not working and thus unpreferred for now. */
-+    switch (in_plugin->id) {
-+      case CODEC_ID_MPEG4:
-+      case CODEC_ID_MSMPEG4V3:
-+      case CODEC_ID_H264:
-+      case CODEC_ID_RA_144:
-+      case CODEC_ID_RA_288:
-+      case CODEC_ID_RV10:
-+      case CODEC_ID_RV20:
-+      case CODEC_ID_RV30:
-+      case CODEC_ID_RV40:
-+      case CODEC_ID_COOK:
-+        rank = GST_RANK_SECONDARY;
-+        break;
-+        /* DVVIDEO: we have a good dv decoder, fast on both ppc as well as x86.
-+         * They say libdv's quality is better though. leave as secondary.
-+         * note: if you change this, see the code in gstdv.c in good/ext/dv.
-+         *
-+         * SIPR: decoder should have a higher rank than realaudiodec.
-+         */
-+      case CODEC_ID_DVVIDEO:
-+      case CODEC_ID_SIPR:
-+        rank = GST_RANK_SECONDARY;
-+        break;
-+      case CODEC_ID_MP3:
-+        rank = GST_RANK_NONE;
-+        break;
-+        /* TEMPORARILY DISABLING AC3/EAC3/DTS for 0.10.12 release
-+         * due to downmixing failure.
-+         * See Bug #608892 for more details */
-+      case CODEC_ID_EAC3:
-+      case CODEC_ID_AC3:
-+      case CODEC_ID_DTS:
-+        rank = GST_RANK_NONE;
-+        break;
-+      default:
-+        rank = GST_RANK_MARGINAL;
-+        break;
-+    }
-+    if (!gst_element_register (plugin, type_name, rank, type)) {
-+      g_warning ("Failed to register %s", type_name);
-+      g_free (type_name);
-+      return FALSE;
-+    }
-+
-+    g_free (type_name);
-+
-+  next:
-+    in_plugin = av_codec_next (in_plugin);
-+  }
-+
-+  GST_LOG ("Finished Registering decoders");
-+
-+  return TRUE;
-+}
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.rej gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.rej
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.rej	1970-01-01 01:00:00.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.rej	2014-08-08 15:26:38.471858652 +0200
-@@ -0,0 +1,11 @@
-+--- ext/ffmpeg/gstffmpegdec.c
-++++ ext/ffmpeg/gstffmpegdec.c
-+@@ -1565,7 +1564,7 @@
-+         gst_message_new_latency (GST_OBJECT_CAST (ffmpegdec)));
-+   }
-+ 
-+-  is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
-++  is_itype = (ffmpegdec->picture->pict_type == AV_PICTURE_TYPE_I);
-+   is_reference = (ffmpegdec->picture->reference == 1);
-+ 
-+   iskeyframe = (is_itype || is_reference || ffmpegdec->picture->key_frame)
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdemux.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdemux.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdemux.c	2011-07-13 11:07:28.000000000 +0200
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdemux.c	2014-08-08 15:26:07.874857555 +0200
-@@ -343,8 +343,11 @@
-   demux->audiopads = 0;
- 
-   /* close demuxer context from ffmpeg */
--  av_close_input_file (demux->context);
--  demux->context = NULL;
-+  if (demux->seekable)
-+    gst_ffmpegdata_close (demux->context->pb);
-+  else
-+    gst_ffmpeg_pipe_close (demux->context->pb);
-+  avformat_close_input (&demux->context);
- 
-   GST_OBJECT_LOCK (demux);
-   demux->opened = FALSE;
-@@ -1146,9 +1149,9 @@
- static gboolean
- gst_ffmpegdemux_open (GstFFMpegDemux * demux)
- {
-+  AVIOContext *iocontext = NULL;
-   GstFFMpegDemuxClass *oclass =
-       (GstFFMpegDemuxClass *) G_OBJECT_GET_CLASS (demux);
--  gchar *location;
-   gint res, n_streams, i;
- #if 0
-   /* Re-enable once converted to new AVMetaData API
-@@ -1164,15 +1167,14 @@
- 
-   /* open via our input protocol hack */
-   if (demux->seekable)
--    location = g_strdup_printf ("gstreamer://%p", demux->sinkpad);
-+    res = gst_ffmpegdata_open (demux->sinkpad, AVIO_FLAG_READ, &iocontext);
-   else
--    location = g_strdup_printf ("gstpipe://%p", &demux->ffpipe);
--  GST_DEBUG_OBJECT (demux, "about to call av_open_input_file %s", location);
-+    res = gst_ffmpeg_pipe_open (&demux->ffpipe, AVIO_FLAG_READ, &iocontext);
- 
--  res = av_open_input_file (&demux->context, location,
--      oclass->in_plugin, 0, NULL);
-+  demux->context = avformat_alloc_context ();
-+  demux->context->pb = iocontext;
-+  res = avformat_open_input (&demux->context, NULL, oclass->in_plugin, NULL);
- 
--  g_free (location);
-   GST_DEBUG_OBJECT (demux, "av_open_input returned %d", res);
-   if (res < 0)
-     goto open_failed;
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegenc.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegenc.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegenc.c	2011-10-31 11:14:03.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegenc.c	2014-08-08 15:32:18.608870847 +0200
-@@ -770,7 +770,7 @@
-   GST_OBJECT_UNLOCK (ffmpegenc);
- 
-   if (force_keyframe)
--    ffmpegenc->picture->pict_type = FF_I_TYPE;
-+    ffmpegenc->picture->pict_type = AV_PICTURE_TYPE_I;
- 
-   frame_size = gst_ffmpeg_avpicture_fill ((AVPicture *) ffmpegenc->picture,
-       GST_BUFFER_DATA (inbuf),
-@@ -1136,7 +1136,7 @@
-       const GstStructure *s;
-       s = gst_event_get_structure (event);
-       if (gst_structure_has_name (s, "GstForceKeyUnit")) {
--        ffmpegenc->picture->pict_type = FF_I_TYPE;
-+        ffmpegenc->picture->pict_type = AV_PICTURE_TYPE_I;
-       }
-       break;
-     }
-@@ -1339,7 +1339,7 @@
-     }
- 
-     /* only encoders */
--    if (!in_plugin->encode) {
-+    if (!av_codec_is_encoder (in_plugin)) {
-       goto next;
-     }
- 
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c	2011-07-13 11:07:28.000000000 +0200
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c	2014-08-08 15:26:07.874857555 +0200
-@@ -24,8 +24,10 @@
- #include <string.h>
- #ifdef HAVE_FFMPEG_UNINSTALLED
- #include <avformat.h>
-+#include <opt.h>
- #else
- #include <libavformat/avformat.h>
-+#include <libavutil/opt.h>
- #endif
- 
- #include <gst/gst.h>
-@@ -336,9 +338,6 @@
-   ffmpegmux->context = g_new0 (AVFormatContext, 1);
-   ffmpegmux->context->oformat = oclass->in_plugin;
-   ffmpegmux->context->nb_streams = 0;
--  g_snprintf (ffmpegmux->context->filename,
--      sizeof (ffmpegmux->context->filename),
--      "gstreamer://%p", ffmpegmux->srcpad);
-   ffmpegmux->opened = FALSE;
- 
-   ffmpegmux->videopads = 0;
-@@ -450,10 +449,10 @@
-   gst_element_add_pad (element, pad);
- 
-   /* AVStream needs to be created */
--  st = av_new_stream (ffmpegmux->context, collect_pad->padnum);
-+  st = avformat_new_stream (ffmpegmux->context, NULL);
-+  st->id = collect_pad->padnum;
-   st->codec->codec_type = type;
-   st->codec->codec_id = CODEC_ID_NONE;  /* this is a check afterwards */
--  st->stream_copy = 1;          /* we're not the actual encoder */
-   st->codec->bit_rate = bitrate;
-   st->codec->frame_size = framesize;
-   /* we fill in codec during capsnego */
-@@ -485,7 +484,7 @@
-   collect_pad = (GstFFMpegMuxPad *) gst_pad_get_element_private (pad);
- 
-   st = ffmpegmux->context->streams[collect_pad->padnum];
--  ffmpegmux->context->preload = ffmpegmux->preload;
-+  av_opt_set_int (&ffmpegmux->context, "preload", ffmpegmux->preload, 0);
-   ffmpegmux->context->max_delay = ffmpegmux->max_delay;
- 
-   /* for the format-specific guesses, we'll go to
-@@ -552,7 +551,7 @@
- 
-   /* open "file" (gstreamer protocol to next element) */
-   if (!ffmpegmux->opened) {
--    int open_flags = URL_WRONLY;
-+    int open_flags = AVIO_FLAG_WRITE;
- 
-     /* we do need all streams to have started capsnego,
-      * or things will go horribly wrong */
-@@ -646,19 +645,13 @@
-       open_flags |= GST_FFMPEG_URL_STREAMHEADER;
-     }
- 
--    if (url_fopen (&ffmpegmux->context->pb,
--            ffmpegmux->context->filename, open_flags) < 0) {
-+    if (gst_ffmpegdata_open (ffmpegmux->srcpad, open_flags,
-+            &ffmpegmux->context->pb) < 0) {
-       GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
-           ("Failed to open stream context in ffmux"));
-       return GST_FLOW_ERROR;
-     }
- 
--    if (av_set_parameters (ffmpegmux->context, NULL) < 0) {
--      GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, INIT, (NULL),
--          ("Failed to initialize muxer"));
--      return GST_FLOW_ERROR;
--    }
--
-     /* now open the mux format */
-     if (av_write_header (ffmpegmux->context) < 0) {
-       GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, SETTINGS, (NULL),
-@@ -670,7 +663,7 @@
-     ffmpegmux->opened = TRUE;
- 
-     /* flush the header so it will be used as streamheader */
--    put_flush_packet (ffmpegmux->context->pb);
-+    avio_flush (ffmpegmux->context->pb);
-   }
- 
-   /* take the one with earliest timestamp,
-@@ -770,8 +763,8 @@
-     /* close down */
-     av_write_trailer (ffmpegmux->context);
-     ffmpegmux->opened = FALSE;
--    put_flush_packet (ffmpegmux->context->pb);
--    url_fclose (ffmpegmux->context->pb);
-+    avio_flush (ffmpegmux->context->pb);
-+    gst_ffmpegdata_close (ffmpegmux->context->pb);
-     gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ());
-     return GST_FLOW_UNEXPECTED;
-   }
-@@ -795,6 +788,10 @@
-       break;
-     case GST_STATE_CHANGE_PAUSED_TO_READY:
-       gst_collect_pads_stop (ffmpegmux->collect);
-+      if (ffmpegmux->opened) {
-+        ffmpegmux->opened = FALSE;
-+        gst_ffmpegdata_close (ffmpegmux->context->pb);
-+      }
-       break;
-     default:
-       break;
-@@ -809,7 +806,7 @@
-       gst_tag_setter_reset_tags (GST_TAG_SETTER (ffmpegmux));
-       if (ffmpegmux->opened) {
-         ffmpegmux->opened = FALSE;
--        url_fclose (ffmpegmux->context->pb);
-+        avio_close (ffmpegmux->context->pb);
-       }
-       break;
-     case GST_STATE_CHANGE_READY_TO_NULL:
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c.orig
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c.orig	1970-01-01 01:00:00.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c.orig	2011-07-13 11:07:28.000000000 +0200
-@@ -0,0 +1,970 @@
-+/* GStreamer
-+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <string.h>
-+#ifdef HAVE_FFMPEG_UNINSTALLED
-+#include <avformat.h>
-+#else
-+#include <libavformat/avformat.h>
-+#endif
-+
-+#include <gst/gst.h>
-+#include <gst/base/gstcollectpads.h>
-+
-+#include "gstffmpeg.h"
-+#include "gstffmpegcodecmap.h"
-+#include "gstffmpegutils.h"
-+
-+typedef struct _GstFFMpegMux GstFFMpegMux;
-+typedef struct _GstFFMpegMuxPad GstFFMpegMuxPad;
-+
-+struct _GstFFMpegMuxPad
-+{
-+  GstCollectData collect;       /* we extend the CollectData */
-+
-+  gint padnum;
-+};
-+
-+struct _GstFFMpegMux
-+{
-+  GstElement element;
-+
-+  GstCollectPads *collect;
-+  /* We need to keep track of our pads, so we do so here. */
-+  GstPad *srcpad;
-+
-+  AVFormatContext *context;
-+  gboolean opened;
-+
-+  gint videopads, audiopads;
-+
-+  /*< private > */
-+  /* event_function is the collectpads default eventfunction */
-+  GstPadEventFunction event_function;
-+  int preload;
-+  int max_delay;
-+};
-+
-+typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass;
-+
-+struct _GstFFMpegMuxClass
-+{
-+  GstElementClass parent_class;
-+
-+  AVOutputFormat *in_plugin;
-+};
-+
-+#define GST_TYPE_FFMPEGMUX \
-+  (gst_ffmpegdec_get_type())
-+#define GST_FFMPEGMUX(obj) \
-+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGMUX,GstFFMpegMux))
-+#define GST_FFMPEGMUX_CLASS(klass) \
-+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGMUX,GstFFMpegMuxClass))
-+#define GST_IS_FFMPEGMUX(obj) \
-+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGMUX))
-+#define GST_IS_FFMPEGMUX_CLASS(klass) \
-+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGMUX))
-+
-+enum
-+{
-+  /* FILL ME */
-+  LAST_SIGNAL
-+};
-+
-+enum
-+{
-+  ARG_0,
-+  /* FILL ME */
-+};
-+
-+enum
-+{
-+  PROP_0,
-+  PROP_PRELOAD,
-+  PROP_MAXDELAY
-+};
-+
-+/* A number of function prototypes are given so we can refer to them later. */
-+static void gst_ffmpegmux_class_init (GstFFMpegMuxClass * klass);
-+static void gst_ffmpegmux_base_init (gpointer g_class);
-+static void gst_ffmpegmux_init (GstFFMpegMux * ffmpegmux,
-+    GstFFMpegMuxClass * g_class);
-+static void gst_ffmpegmux_finalize (GObject * object);
-+
-+static gboolean gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps);
-+static GstPad *gst_ffmpegmux_request_new_pad (GstElement * element,
-+    GstPadTemplate * templ, const gchar * name);
-+static GstFlowReturn gst_ffmpegmux_collected (GstCollectPads * pads,
-+    gpointer user_data);
-+
-+static gboolean gst_ffmpegmux_sink_event (GstPad * pad, GstEvent * event);
-+
-+static GstStateChangeReturn gst_ffmpegmux_change_state (GstElement * element,
-+    GstStateChange transition);
-+
-+static void gst_ffmpegmux_set_property (GObject * object, guint prop_id,
-+    const GValue * value, GParamSpec * pspec);
-+static void gst_ffmpegmux_get_property (GObject * object, guint prop_id,
-+    GValue * value, GParamSpec * pspec);
-+
-+static GstCaps *gst_ffmpegmux_get_id_caps (enum CodecID *id_list);
-+static void gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps,
-+    const gchar * field, guint num, const gint * values);
-+
-+#define GST_FFMUX_PARAMS_QDATA g_quark_from_static_string("ffmux-params")
-+
-+static GstElementClass *parent_class = NULL;
-+
-+/*static guint gst_ffmpegmux_signals[LAST_SIGNAL] = { 0 }; */
-+
-+typedef struct
-+{
-+  const char *name;
-+  const char *replacement;
-+} GstFFMpegMuxReplacement;
-+
-+static const char *
-+gst_ffmpegmux_get_replacement (const char *name)
-+{
-+  static const GstFFMpegMuxReplacement blacklist[] = {
-+    {"avi", "avimux"},
-+    {"matroska", "matroskamux"},
-+    {"mov", "qtmux"},
-+    {"mpegts", "mpegtsmux"},
-+    {"mp4", "mp4mux"},
-+    {"mpjpeg", "multipartmux"},
-+    {"ogg", "oggmux"},
-+    {"wav", "wavenc"},
-+    {"webm", "webmmux"},
-+    {"mxf", "mxfmux"},
-+    {"3gp", "gppmux"},
-+    {"yuv4mpegpipe", "y4menc"},
-+    {"aiff", "aiffmux"},
-+    {"adts", "aacparse"},
-+    {"asf", "asfmux"},
-+    {"asf_stream", "asfmux"},
-+    {"flv", "flvmux"},
-+    {"mp3", "id3v2mux"},
-+    {"mp2", "id3v2mux"}
-+  };
-+  int i;
-+
-+  for (i = 0; i < sizeof (blacklist) / sizeof (blacklist[0]); i++) {
-+    if (strcmp (blacklist[i].name, name) == 0) {
-+      return blacklist[i].replacement;
-+    }
-+  }
-+
-+  return NULL;
-+}
-+
-+static gboolean
-+gst_ffmpegmux_is_formatter (const char *name)
-+{
-+  static const char *replace[] = {
-+    "mp2", "mp3", NULL
-+  };
-+  int i;
-+
-+  for (i = 0; replace[i]; i++)
-+    if (strcmp (replace[i], name) == 0)
-+      return TRUE;
-+  return FALSE;
-+}
-+
-+static void
-+gst_ffmpegmux_base_init (gpointer g_class)
-+{
-+  GstFFMpegMuxClass *klass = (GstFFMpegMuxClass *) g_class;
-+  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
-+  GstPadTemplate *videosinktempl, *audiosinktempl, *srctempl;
-+  AVOutputFormat *in_plugin;
-+  GstCaps *srccaps, *audiosinkcaps, *videosinkcaps;
-+  enum CodecID *video_ids = NULL, *audio_ids = NULL;
-+  gchar *longname, *description;
-+  const char *replacement;
-+  gboolean is_formatter;
-+
-+  in_plugin =
-+      (AVOutputFormat *) g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
-+      GST_FFMUX_PARAMS_QDATA);
-+  g_assert (in_plugin != NULL);
-+
-+  /* construct the element details struct */
-+  replacement = gst_ffmpegmux_get_replacement (in_plugin->name);
-+  is_formatter = gst_ffmpegmux_is_formatter (in_plugin->name);
-+  if (replacement != NULL) {
-+    longname =
-+        g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
-+        in_plugin->long_name, is_formatter ? "formatter" : "muxer",
-+        replacement);
-+    description =
-+        g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
-+        in_plugin->long_name, is_formatter ? "formatter" : "muxer",
-+        replacement);
-+  } else {
-+    longname = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
-+        is_formatter ? "formatter" : "muxer");
-+    description = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
-+        is_formatter ? "formatter" : "muxer");
-+  }
-+  gst_element_class_set_details_simple (element_class, longname,
-+      is_formatter ? "Formatter/Metadata" : "Codec/Muxer", description,
-+      "Wim Taymans <wim.taymans@chello.be>, "
-+      "Ronald Bultje <rbultje@ronald.bitfreak.net>");
-+  g_free (longname);
-+  g_free (description);
-+
-+  /* Try to find the caps that belongs here */
-+  srccaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
-+  if (!srccaps) {
-+    GST_DEBUG ("Couldn't get source caps for muxer '%s', skipping format",
-+        in_plugin->name);
-+    goto beach;
-+  }
-+
-+  if (!gst_ffmpeg_formatid_get_codecids (in_plugin->name,
-+          &video_ids, &audio_ids, in_plugin)) {
-+    gst_caps_unref (srccaps);
-+    GST_DEBUG
-+        ("Couldn't get sink caps for muxer '%s'. Most likely because no input format mapping exists.",
-+        in_plugin->name);
-+    goto beach;
-+  }
-+
-+  videosinkcaps = video_ids ? gst_ffmpegmux_get_id_caps (video_ids) : NULL;
-+  audiosinkcaps = audio_ids ? gst_ffmpegmux_get_id_caps (audio_ids) : NULL;
-+
-+  /* fix up allowed caps for some muxers */
-+  /* FIXME : This should be in gstffmpegcodecmap.c ! */
-+  if (strcmp (in_plugin->name, "flv") == 0) {
-+    const gint rates[] = { 44100, 22050, 11025 };
-+
-+    gst_ffmpeg_mux_simple_caps_set_int_list (audiosinkcaps, "rate", 3, rates);
-+  } else if (strcmp (in_plugin->name, "gif") == 0) {
-+    if (videosinkcaps)
-+      gst_caps_unref (videosinkcaps);
-+
-+    videosinkcaps =
-+        gst_caps_from_string ("video/x-raw-rgb, bpp=(int)24, depth=(int)24");
-+  }
-+
-+  /* pad templates */
-+  srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
-+  gst_element_class_add_pad_template (element_class, srctempl);
-+
-+  if (audiosinkcaps) {
-+    audiosinktempl = gst_pad_template_new ("audio_%d",
-+        GST_PAD_SINK, GST_PAD_REQUEST, audiosinkcaps);
-+    gst_element_class_add_pad_template (element_class, audiosinktempl);
-+  }
-+
-+  if (videosinkcaps) {
-+    videosinktempl = gst_pad_template_new ("video_%d",
-+        GST_PAD_SINK, GST_PAD_REQUEST, videosinkcaps);
-+    gst_element_class_add_pad_template (element_class, videosinktempl);
-+  }
-+
-+beach:
-+  klass->in_plugin = in_plugin;
-+}
-+
-+static void
-+gst_ffmpegmux_class_init (GstFFMpegMuxClass * klass)
-+{
-+  GObjectClass *gobject_class;
-+  GstElementClass *gstelement_class;
-+
-+  gobject_class = (GObjectClass *) klass;
-+  gstelement_class = (GstElementClass *) klass;
-+
-+  parent_class = g_type_class_peek_parent (klass);
-+
-+  gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_ffmpegmux_set_property);
-+  gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_ffmpegmux_get_property);
-+
-+  g_object_class_install_property (gobject_class, PROP_PRELOAD,
-+      g_param_spec_int ("preload", "preload",
-+          "Set the initial demux-decode delay (in microseconds)", 0, G_MAXINT,
-+          0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+  g_object_class_install_property (gobject_class, PROP_MAXDELAY,
-+      g_param_spec_int ("maxdelay", "maxdelay",
-+          "Set the maximum demux-decode delay (in microseconds)", 0, G_MAXINT,
-+          0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+  gstelement_class->request_new_pad = gst_ffmpegmux_request_new_pad;
-+  gstelement_class->change_state = gst_ffmpegmux_change_state;
-+  gobject_class->finalize = gst_ffmpegmux_finalize;
-+}
-+
-+static void
-+gst_ffmpegmux_init (GstFFMpegMux * ffmpegmux, GstFFMpegMuxClass * g_class)
-+{
-+  GstElementClass *klass = GST_ELEMENT_CLASS (g_class);
-+  GstFFMpegMuxClass *oclass = (GstFFMpegMuxClass *) klass;
-+  GstPadTemplate *templ = gst_element_class_get_pad_template (klass, "src");
-+
-+  ffmpegmux->srcpad = gst_pad_new_from_template (templ, "src");
-+  gst_pad_set_caps (ffmpegmux->srcpad, gst_pad_template_get_caps (templ));
-+  gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->srcpad);
-+
-+  ffmpegmux->collect = gst_collect_pads_new ();
-+  gst_collect_pads_set_function (ffmpegmux->collect,
-+      (GstCollectPadsFunction) gst_ffmpegmux_collected, ffmpegmux);
-+
-+  ffmpegmux->context = g_new0 (AVFormatContext, 1);
-+  ffmpegmux->context->oformat = oclass->in_plugin;
-+  ffmpegmux->context->nb_streams = 0;
-+  g_snprintf (ffmpegmux->context->filename,
-+      sizeof (ffmpegmux->context->filename),
-+      "gstreamer://%p", ffmpegmux->srcpad);
-+  ffmpegmux->opened = FALSE;
-+
-+  ffmpegmux->videopads = 0;
-+  ffmpegmux->audiopads = 0;
-+  ffmpegmux->preload = 0;
-+  ffmpegmux->max_delay = 0;
-+}
-+
-+static void
-+gst_ffmpegmux_set_property (GObject * object, guint prop_id,
-+    const GValue * value, GParamSpec * pspec)
-+{
-+  GstFFMpegMux *src;
-+
-+  src = (GstFFMpegMux *) object;
-+
-+  switch (prop_id) {
-+    case PROP_PRELOAD:
-+      src->preload = g_value_get_int (value);
-+      break;
-+    case PROP_MAXDELAY:
-+      src->max_delay = g_value_get_int (value);
-+      break;
-+    default:
-+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-+      break;
-+  }
-+}
-+
-+static void
-+gst_ffmpegmux_get_property (GObject * object, guint prop_id, GValue * value,
-+    GParamSpec * pspec)
-+{
-+  GstFFMpegMux *src;
-+
-+  src = (GstFFMpegMux *) object;
-+
-+  switch (prop_id) {
-+    case PROP_PRELOAD:
-+      g_value_set_int (value, src->preload);
-+      break;
-+    case PROP_MAXDELAY:
-+      g_value_set_int (value, src->max_delay);
-+      break;
-+    default:
-+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-+      break;
-+  }
-+}
-+
-+
-+static void
-+gst_ffmpegmux_finalize (GObject * object)
-+{
-+  GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) object;
-+
-+  g_free (ffmpegmux->context);
-+  gst_object_unref (ffmpegmux->collect);
-+
-+  if (G_OBJECT_CLASS (parent_class)->finalize)
-+    G_OBJECT_CLASS (parent_class)->finalize (object);
-+}
-+
-+static GstPad *
-+gst_ffmpegmux_request_new_pad (GstElement * element,
-+    GstPadTemplate * templ, const gchar * name)
-+{
-+  GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) element;
-+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
-+  GstFFMpegMuxPad *collect_pad;
-+  gchar *padname;
-+  GstPad *pad;
-+  AVStream *st;
-+  enum AVMediaType type;
-+  gint bitrate = 0, framesize = 0;
-+
-+  g_return_val_if_fail (templ != NULL, NULL);
-+  g_return_val_if_fail (templ->direction == GST_PAD_SINK, NULL);
-+  g_return_val_if_fail (ffmpegmux->opened == FALSE, NULL);
-+
-+  /* figure out a name that *we* like */
-+  if (templ == gst_element_class_get_pad_template (klass, "video_%d")) {
-+    padname = g_strdup_printf ("video_%d", ffmpegmux->videopads++);
-+    type = AVMEDIA_TYPE_VIDEO;
-+    bitrate = 64 * 1024;
-+    framesize = 1152;
-+  } else if (templ == gst_element_class_get_pad_template (klass, "audio_%d")) {
-+    padname = g_strdup_printf ("audio_%d", ffmpegmux->audiopads++);
-+    type = AVMEDIA_TYPE_AUDIO;
-+    bitrate = 285 * 1024;
-+  } else {
-+    g_warning ("ffmux: unknown pad template!");
-+    return NULL;
-+  }
-+
-+  /* create pad */
-+  pad = gst_pad_new_from_template (templ, padname);
-+  collect_pad = (GstFFMpegMuxPad *)
-+      gst_collect_pads_add_pad (ffmpegmux->collect, pad,
-+      sizeof (GstFFMpegMuxPad));
-+  collect_pad->padnum = ffmpegmux->context->nb_streams;
-+
-+  /* small hack to put our own event pad function and chain up to collect pad */
-+  ffmpegmux->event_function = GST_PAD_EVENTFUNC (pad);
-+  gst_pad_set_event_function (pad,
-+      GST_DEBUG_FUNCPTR (gst_ffmpegmux_sink_event));
-+
-+  gst_pad_set_setcaps_function (pad, GST_DEBUG_FUNCPTR (gst_ffmpegmux_setcaps));
-+  gst_element_add_pad (element, pad);
-+
-+  /* AVStream needs to be created */
-+  st = av_new_stream (ffmpegmux->context, collect_pad->padnum);
-+  st->codec->codec_type = type;
-+  st->codec->codec_id = CODEC_ID_NONE;  /* this is a check afterwards */
-+  st->stream_copy = 1;          /* we're not the actual encoder */
-+  st->codec->bit_rate = bitrate;
-+  st->codec->frame_size = framesize;
-+  /* we fill in codec during capsnego */
-+
-+  /* we love debug output (c) (tm) (r) */
-+  GST_DEBUG ("Created %s pad for ffmux_%s element",
-+      padname, ((GstFFMpegMuxClass *) klass)->in_plugin->name);
-+  g_free (padname);
-+
-+  return pad;
-+}
-+
-+/**
-+ * gst_ffmpegmux_setcaps
-+ * @pad: #GstPad
-+ * @caps: New caps.
-+ *
-+ * Set caps to pad.
-+ *
-+ * Returns: #TRUE on success.
-+ */
-+static gboolean
-+gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps)
-+{
-+  GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) (gst_pad_get_parent (pad));
-+  GstFFMpegMuxPad *collect_pad;
-+  AVStream *st;
-+
-+  collect_pad = (GstFFMpegMuxPad *) gst_pad_get_element_private (pad);
-+
-+  st = ffmpegmux->context->streams[collect_pad->padnum];
-+  ffmpegmux->context->preload = ffmpegmux->preload;
-+  ffmpegmux->context->max_delay = ffmpegmux->max_delay;
-+
-+  /* for the format-specific guesses, we'll go to
-+   * our famous codec mapper */
-+  if (gst_ffmpeg_caps_to_codecid (caps, st->codec) == CODEC_ID_NONE)
-+    goto not_accepted;
-+
-+  /* copy over the aspect ratios, ffmpeg expects the stream aspect to match the
-+   * codec aspect. */
-+  st->sample_aspect_ratio = st->codec->sample_aspect_ratio;
-+
-+  GST_LOG_OBJECT (pad, "accepted caps %" GST_PTR_FORMAT, caps);
-+  return TRUE;
-+
-+  /* ERRORS */
-+not_accepted:
-+  {
-+    GST_LOG_OBJECT (pad, "rejecting caps %" GST_PTR_FORMAT, caps);
-+    return FALSE;
-+  }
-+}
-+
-+
-+static gboolean
-+gst_ffmpegmux_sink_event (GstPad * pad, GstEvent * event)
-+{
-+  GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) gst_pad_get_parent (pad);
-+  gboolean res = TRUE;
-+
-+  switch (GST_EVENT_TYPE (event)) {
-+    case GST_EVENT_TAG:{
-+      GstTagList *taglist;
-+      GstTagSetter *setter = GST_TAG_SETTER (ffmpegmux);
-+      const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter);
-+
-+      gst_event_parse_tag (event, &taglist);
-+      gst_tag_setter_merge_tags (setter, taglist, mode);
-+      break;
-+    }
-+    default:
-+      break;
-+  }
-+
-+  /* chaining up to collectpads default event function */
-+  res = ffmpegmux->event_function (pad, event);
-+
-+  gst_object_unref (ffmpegmux);
-+  return res;
-+}
-+
-+static GstFlowReturn
-+gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
-+{
-+  GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) user_data;
-+  GSList *collected;
-+  GstFFMpegMuxPad *best_pad;
-+  GstClockTime best_time;
-+#if 0
-+  /* Re-enable once converted to new AVMetaData API
-+   * See #566605
-+   */
-+  const GstTagList *tags;
-+#endif
-+
-+  /* open "file" (gstreamer protocol to next element) */
-+  if (!ffmpegmux->opened) {
-+    int open_flags = URL_WRONLY;
-+
-+    /* we do need all streams to have started capsnego,
-+     * or things will go horribly wrong */
-+    for (collected = ffmpegmux->collect->data; collected;
-+        collected = g_slist_next (collected)) {
-+      GstFFMpegMuxPad *collect_pad = (GstFFMpegMuxPad *) collected->data;
-+      AVStream *st = ffmpegmux->context->streams[collect_pad->padnum];
-+
-+      /* check whether the pad has successfully completed capsnego */
-+      if (st->codec->codec_id == CODEC_ID_NONE) {
-+        GST_ELEMENT_ERROR (ffmpegmux, CORE, NEGOTIATION, (NULL),
-+            ("no caps set on stream %d (%s)", collect_pad->padnum,
-+                (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) ?
-+                "video" : "audio"));
-+        return GST_FLOW_ERROR;
-+      }
-+      /* set framerate for audio */
-+      if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
-+        switch (st->codec->codec_id) {
-+          case CODEC_ID_PCM_S16LE:
-+          case CODEC_ID_PCM_S16BE:
-+          case CODEC_ID_PCM_U16LE:
-+          case CODEC_ID_PCM_U16BE:
-+          case CODEC_ID_PCM_S8:
-+          case CODEC_ID_PCM_U8:
-+            st->codec->frame_size = 1;
-+            break;
-+          default:
-+          {
-+            GstBuffer *buffer;
-+
-+            /* FIXME : This doesn't work for RAW AUDIO...
-+             * in fact I'm wondering if it even works for any kind of audio... */
-+            buffer = gst_collect_pads_peek (ffmpegmux->collect,
-+                (GstCollectData *) collect_pad);
-+            if (buffer) {
-+              st->codec->frame_size =
-+                  st->codec->sample_rate *
-+                  GST_BUFFER_DURATION (buffer) / GST_SECOND;
-+              gst_buffer_unref (buffer);
-+            }
-+          }
-+        }
-+      }
-+    }
-+
-+#if 0
-+    /* Re-enable once converted to new AVMetaData API
-+     * See #566605
-+     */
-+
-+    /* tags */
-+    tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (ffmpegmux));
-+    if (tags) {
-+      gint i;
-+      gchar *s;
-+
-+      /* get the interesting ones */
-+      if (gst_tag_list_get_string (tags, GST_TAG_TITLE, &s)) {
-+        strncpy (ffmpegmux->context->title, s,
-+            sizeof (ffmpegmux->context->title));
-+      }
-+      if (gst_tag_list_get_string (tags, GST_TAG_ARTIST, &s)) {
-+        strncpy (ffmpegmux->context->author, s,
-+            sizeof (ffmpegmux->context->author));
-+      }
-+      if (gst_tag_list_get_string (tags, GST_TAG_COPYRIGHT, &s)) {
-+        strncpy (ffmpegmux->context->copyright, s,
-+            sizeof (ffmpegmux->context->copyright));
-+      }
-+      if (gst_tag_list_get_string (tags, GST_TAG_COMMENT, &s)) {
-+        strncpy (ffmpegmux->context->comment, s,
-+            sizeof (ffmpegmux->context->comment));
-+      }
-+      if (gst_tag_list_get_string (tags, GST_TAG_ALBUM, &s)) {
-+        strncpy (ffmpegmux->context->album, s,
-+            sizeof (ffmpegmux->context->album));
-+      }
-+      if (gst_tag_list_get_string (tags, GST_TAG_GENRE, &s)) {
-+        strncpy (ffmpegmux->context->genre, s,
-+            sizeof (ffmpegmux->context->genre));
-+      }
-+      if (gst_tag_list_get_int (tags, GST_TAG_TRACK_NUMBER, &i)) {
-+        ffmpegmux->context->track = i;
-+      }
-+    }
-+#endif
-+
-+    /* set the streamheader flag for gstffmpegprotocol if codec supports it */
-+    if (!strcmp (ffmpegmux->context->oformat->name, "flv")) {
-+      open_flags |= GST_FFMPEG_URL_STREAMHEADER;
-+    }
-+
-+    if (url_fopen (&ffmpegmux->context->pb,
-+            ffmpegmux->context->filename, open_flags) < 0) {
-+      GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
-+          ("Failed to open stream context in ffmux"));
-+      return GST_FLOW_ERROR;
-+    }
-+
-+    if (av_set_parameters (ffmpegmux->context, NULL) < 0) {
-+      GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, INIT, (NULL),
-+          ("Failed to initialize muxer"));
-+      return GST_FLOW_ERROR;
-+    }
-+
-+    /* now open the mux format */
-+    if (av_write_header (ffmpegmux->context) < 0) {
-+      GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, SETTINGS, (NULL),
-+          ("Failed to write file header - check codec settings"));
-+      return GST_FLOW_ERROR;
-+    }
-+
-+    /* we're now opened */
-+    ffmpegmux->opened = TRUE;
-+
-+    /* flush the header so it will be used as streamheader */
-+    put_flush_packet (ffmpegmux->context->pb);
-+  }
-+
-+  /* take the one with earliest timestamp,
-+   * and push it forward */
-+  best_pad = NULL;
-+  best_time = GST_CLOCK_TIME_NONE;
-+  for (collected = ffmpegmux->collect->data; collected;
-+      collected = g_slist_next (collected)) {
-+    GstFFMpegMuxPad *collect_pad = (GstFFMpegMuxPad *) collected->data;
-+    GstBuffer *buffer = gst_collect_pads_peek (ffmpegmux->collect,
-+        (GstCollectData *) collect_pad);
-+
-+    /* if there's no buffer, just continue */
-+    if (buffer == NULL) {
-+      continue;
-+    }
-+
-+    /* if we have no buffer yet, just use the first one */
-+    if (best_pad == NULL) {
-+      best_pad = collect_pad;
-+      best_time = GST_BUFFER_TIMESTAMP (buffer);
-+      goto next_pad;
-+    }
-+
-+    /* if we do have one, only use this one if it's older */
-+    if (GST_BUFFER_TIMESTAMP (buffer) < best_time) {
-+      best_time = GST_BUFFER_TIMESTAMP (buffer);
-+      best_pad = collect_pad;
-+    }
-+
-+  next_pad:
-+    gst_buffer_unref (buffer);
-+
-+    /* Mux buffers with invalid timestamp first */
-+    if (!GST_CLOCK_TIME_IS_VALID (best_time))
-+      break;
-+  }
-+
-+  /* now handle the buffer, or signal EOS if we have
-+   * no buffers left */
-+  if (best_pad != NULL) {
-+    GstBuffer *buf;
-+    AVPacket pkt;
-+    gboolean need_free = FALSE;
-+
-+    /* push out current buffer */
-+    buf = gst_collect_pads_pop (ffmpegmux->collect,
-+        (GstCollectData *) best_pad);
-+
-+    ffmpegmux->context->streams[best_pad->padnum]->codec->frame_number++;
-+
-+    /* set time */
-+    pkt.pts = gst_ffmpeg_time_gst_to_ff (GST_BUFFER_TIMESTAMP (buf),
-+        ffmpegmux->context->streams[best_pad->padnum]->time_base);
-+    pkt.dts = pkt.pts;
-+
-+    if (strcmp (ffmpegmux->context->oformat->name, "gif") == 0) {
-+      AVStream *st = ffmpegmux->context->streams[best_pad->padnum];
-+      AVPicture src, dst;
-+
-+      need_free = TRUE;
-+      pkt.size = st->codec->width * st->codec->height * 3;
-+      pkt.data = g_malloc (pkt.size);
-+
-+      dst.data[0] = pkt.data;
-+      dst.data[1] = NULL;
-+      dst.data[2] = NULL;
-+      dst.linesize[0] = st->codec->width * 3;
-+
-+      gst_ffmpeg_avpicture_fill (&src, GST_BUFFER_DATA (buf),
-+          PIX_FMT_RGB24, st->codec->width, st->codec->height);
-+
-+      av_picture_copy (&dst, &src, PIX_FMT_RGB24,
-+          st->codec->width, st->codec->height);
-+    } else {
-+      pkt.data = GST_BUFFER_DATA (buf);
-+      pkt.size = GST_BUFFER_SIZE (buf);
-+    }
-+
-+    pkt.stream_index = best_pad->padnum;
-+    pkt.flags = 0;
-+
-+    if (!GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT))
-+      pkt.flags |= AV_PKT_FLAG_KEY;
-+
-+    if (GST_BUFFER_DURATION_IS_VALID (buf))
-+      pkt.duration =
-+          gst_ffmpeg_time_gst_to_ff (GST_BUFFER_DURATION (buf),
-+          ffmpegmux->context->streams[best_pad->padnum]->time_base);
-+    else
-+      pkt.duration = 0;
-+    av_write_frame (ffmpegmux->context, &pkt);
-+    gst_buffer_unref (buf);
-+    if (need_free)
-+      g_free (pkt.data);
-+  } else {
-+    /* close down */
-+    av_write_trailer (ffmpegmux->context);
-+    ffmpegmux->opened = FALSE;
-+    put_flush_packet (ffmpegmux->context->pb);
-+    url_fclose (ffmpegmux->context->pb);
-+    gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ());
-+    return GST_FLOW_UNEXPECTED;
-+  }
-+
-+  return GST_FLOW_OK;
-+}
-+
-+static GstStateChangeReturn
-+gst_ffmpegmux_change_state (GstElement * element, GstStateChange transition)
-+{
-+  GstFlowReturn ret;
-+  GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) (element);
-+
-+  switch (transition) {
-+    case GST_STATE_CHANGE_NULL_TO_READY:
-+      break;
-+    case GST_STATE_CHANGE_READY_TO_PAUSED:
-+      gst_collect_pads_start (ffmpegmux->collect);
-+      break;
-+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-+      break;
-+    case GST_STATE_CHANGE_PAUSED_TO_READY:
-+      gst_collect_pads_stop (ffmpegmux->collect);
-+      break;
-+    default:
-+      break;
-+  }
-+
-+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-+
-+  switch (transition) {
-+    case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
-+      break;
-+    case GST_STATE_CHANGE_PAUSED_TO_READY:
-+      gst_tag_setter_reset_tags (GST_TAG_SETTER (ffmpegmux));
-+      if (ffmpegmux->opened) {
-+        ffmpegmux->opened = FALSE;
-+        url_fclose (ffmpegmux->context->pb);
-+      }
-+      break;
-+    case GST_STATE_CHANGE_READY_TO_NULL:
-+      break;
-+    default:
-+      break;
-+  }
-+
-+  return ret;
-+}
-+
-+static GstCaps *
-+gst_ffmpegmux_get_id_caps (enum CodecID *id_list)
-+{
-+  GstCaps *caps, *t;
-+  gint i;
-+
-+  caps = gst_caps_new_empty ();
-+  for (i = 0; id_list[i] != CODEC_ID_NONE; i++) {
-+    if ((t = gst_ffmpeg_codecid_to_caps (id_list[i], NULL, TRUE)))
-+      gst_caps_append (caps, t);
-+  }
-+  if (gst_caps_is_empty (caps)) {
-+    gst_caps_unref (caps);
-+    return NULL;
-+  }
-+
-+  return caps;
-+}
-+
-+/* set a list of integer values on the caps, e.g. for sample rates */
-+static void
-+gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps, const gchar * field,
-+    guint num, const gint * values)
-+{
-+  GValue list = { 0, };
-+  GValue val = { 0, };
-+  gint i;
-+
-+  g_return_if_fail (GST_CAPS_IS_SIMPLE (caps));
-+
-+  g_value_init (&list, GST_TYPE_LIST);
-+  g_value_init (&val, G_TYPE_INT);
-+
-+  for (i = 0; i < num; ++i) {
-+    g_value_set_int (&val, values[i]);
-+    gst_value_list_append_value (&list, &val);
-+  }
-+
-+  gst_structure_set_value (gst_caps_get_structure (caps, 0), field, &list);
-+
-+  g_value_unset (&val);
-+  g_value_unset (&list);
-+}
-+
-+gboolean
-+gst_ffmpegmux_register (GstPlugin * plugin)
-+{
-+  GTypeInfo typeinfo = {
-+    sizeof (GstFFMpegMuxClass),
-+    (GBaseInitFunc) gst_ffmpegmux_base_init,
-+    NULL,
-+    (GClassInitFunc) gst_ffmpegmux_class_init,
-+    NULL,
-+    NULL,
-+    sizeof (GstFFMpegMux),
-+    0,
-+    (GInstanceInitFunc) gst_ffmpegmux_init,
-+  };
-+  static const GInterfaceInfo tag_setter_info = {
-+    NULL, NULL, NULL
-+  };
-+  GType type;
-+  AVOutputFormat *in_plugin;
-+
-+  in_plugin = av_oformat_next (NULL);
-+
-+  GST_LOG ("Registering muxers");
-+
-+  while (in_plugin) {
-+    gchar *type_name;
-+    gchar *p;
-+    GstRank rank = GST_RANK_MARGINAL;
-+
-+    if ((!strncmp (in_plugin->name, "u16", 3)) ||
-+        (!strncmp (in_plugin->name, "s16", 3)) ||
-+        (!strncmp (in_plugin->name, "u24", 3)) ||
-+        (!strncmp (in_plugin->name, "s24", 3)) ||
-+        (!strncmp (in_plugin->name, "u8", 2)) ||
-+        (!strncmp (in_plugin->name, "s8", 2)) ||
-+        (!strncmp (in_plugin->name, "u32", 3)) ||
-+        (!strncmp (in_plugin->name, "s32", 3)) ||
-+        (!strncmp (in_plugin->name, "f32", 3)) ||
-+        (!strncmp (in_plugin->name, "f64", 3)) ||
-+        (!strncmp (in_plugin->name, "raw", 3)) ||
-+        (!strncmp (in_plugin->name, "crc", 3)) ||
-+        (!strncmp (in_plugin->name, "null", 4)) ||
-+        (!strncmp (in_plugin->name, "gif", 3)) ||
-+        (!strncmp (in_plugin->name, "frame", 5)) ||
-+        (!strncmp (in_plugin->name, "image", 5)) ||
-+        (!strncmp (in_plugin->name, "mulaw", 5)) ||
-+        (!strncmp (in_plugin->name, "alaw", 4)) ||
-+        (!strncmp (in_plugin->name, "h26", 3)) ||
-+        (!strncmp (in_plugin->name, "rtp", 3)) ||
-+        (!strncmp (in_plugin->name, "ass", 3)) ||
-+        (!strncmp (in_plugin->name, "ffmetadata", 10)) ||
-+        (!strncmp (in_plugin->name, "srt", 3))
-+        ) {
-+      GST_LOG ("Ignoring muxer %s", in_plugin->name);
-+      goto next;
-+    }
-+
-+    if ((!strncmp (in_plugin->long_name, "raw ", 4))) {
-+      GST_LOG ("Ignoring raw muxer %s", in_plugin->name);
-+      goto next;
-+    }
-+
-+    if (gst_ffmpegmux_get_replacement (in_plugin->name))
-+      rank = GST_RANK_NONE;
-+
-+    /* FIXME : We need a fast way to know whether we have mappings for this
-+     * muxer type. */
-+
-+    /* construct the type */
-+    type_name = g_strdup_printf ("ffmux_%s", in_plugin->name);
-+
-+    p = type_name;
-+
-+    while (*p) {
-+      if (*p == '.')
-+        *p = '_';
-+      p++;
-+    }
-+
-+    type = g_type_from_name (type_name);
-+
-+    if (!type) {
-+      /* create the type now */
-+      type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
-+      g_type_set_qdata (type, GST_FFMUX_PARAMS_QDATA, (gpointer) in_plugin);
-+      g_type_add_interface_static (type, GST_TYPE_TAG_SETTER, &tag_setter_info);
-+    }
-+
-+    if (!gst_element_register (plugin, type_name, rank, type)) {
-+      g_free (type_name);
-+      return FALSE;
-+    }
-+
-+    g_free (type_name);
-+
-+  next:
-+    in_plugin = av_oformat_next (in_plugin);
-+  }
-+
-+  GST_LOG ("Finished registering muxers");
-+
-+  return TRUE;
-+}
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegprotocol.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegprotocol.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegprotocol.c	2011-07-12 16:35:28.000000000 +0200
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegprotocol.c	2014-08-08 15:26:07.875857555 +0200
-@@ -46,63 +46,14 @@
- };
- 
- static int
--gst_ffmpegdata_open (URLContext * h, const char *filename, int flags)
--{
--  GstProtocolInfo *info;
--  GstPad *pad;
--
--  GST_LOG ("Opening %s", filename);
--
--  info = g_new0 (GstProtocolInfo, 1);
--
--  info->set_streamheader = flags & GST_FFMPEG_URL_STREAMHEADER;
--  flags &= ~GST_FFMPEG_URL_STREAMHEADER;
--  h->flags &= ~GST_FFMPEG_URL_STREAMHEADER;
--
--  /* we don't support R/W together */
--  if (flags != URL_RDONLY && flags != URL_WRONLY) {
--    GST_WARNING ("Only read-only or write-only are supported");
--    return -EINVAL;
--  }
--
--  if (sscanf (&filename[12], "%p", &pad) != 1) {
--    GST_WARNING ("could not decode pad from %s", filename);
--    return -EIO;
--  }
--
--  /* make sure we're a pad and that we're of the right type */
--  g_return_val_if_fail (GST_IS_PAD (pad), -EINVAL);
--
--  switch (flags) {
--    case URL_RDONLY:
--      g_return_val_if_fail (GST_PAD_IS_SINK (pad), -EINVAL);
--      break;
--    case URL_WRONLY:
--      g_return_val_if_fail (GST_PAD_IS_SRC (pad), -EINVAL);
--      break;
--  }
--
--  info->eos = FALSE;
--  info->pad = pad;
--  info->offset = 0;
--
--  h->priv_data = (void *) info;
--  h->is_streamed = FALSE;
--  h->max_packet_size = 0;
--
--  return 0;
--}
--
--static int
--gst_ffmpegdata_peek (URLContext * h, unsigned char *buf, int size)
-+gst_ffmpegdata_peek (void *priv_data, unsigned char *buf, int size)
- {
-   GstProtocolInfo *info;
-   GstBuffer *inbuf = NULL;
-   GstFlowReturn ret;
-   int total = 0;
- 
--  g_return_val_if_fail (h->flags == URL_RDONLY, AVERROR (EIO));
--  info = (GstProtocolInfo *) h->priv_data;
-+  info = (GstProtocolInfo *) priv_data;
- 
-   GST_DEBUG ("Pulling %d bytes at position %" G_GUINT64_FORMAT, size,
-       info->offset);
-@@ -134,17 +85,17 @@
- }
- 
- static int
--gst_ffmpegdata_read (URLContext * h, unsigned char *buf, int size)
-+gst_ffmpegdata_read (void *priv_data, unsigned char *buf, int size)
- {
-   gint res;
-   GstProtocolInfo *info;
- 
--  info = (GstProtocolInfo *) h->priv_data;
-+  info = (GstProtocolInfo *) priv_data;
- 
-   GST_DEBUG ("Reading %d bytes of data at position %" G_GUINT64_FORMAT, size,
-       info->offset);
- 
--  res = gst_ffmpegdata_peek (h, buf, size);
-+  res = gst_ffmpegdata_peek (priv_data, buf, size);
-   if (res >= 0)
-     info->offset += res;
- 
-@@ -154,15 +105,13 @@
- }
- 
- static int
--gst_ffmpegdata_write (URLContext * h, const unsigned char *buf, int size)
-+gst_ffmpegdata_write (void *priv_data, const unsigned char *buf, int size)
- {
-   GstProtocolInfo *info;
-   GstBuffer *outbuf;
- 
-   GST_DEBUG ("Writing %d bytes", size);
--  info = (GstProtocolInfo *) h->priv_data;
--
--  g_return_val_if_fail (h->flags != URL_RDONLY, -EIO);
-+  info = (GstProtocolInfo *) priv_data;
- 
-   /* create buffer and push data further */
-   if (gst_pad_alloc_buffer_and_set_caps (info->pad,
-@@ -179,7 +128,7 @@
- }
- 
- static int64_t
--gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence)
-+gst_ffmpegdata_seek (void *priv_data, int64_t pos, int whence)
- {
-   GstProtocolInfo *info;
-   guint64 newpos = 0;
-@@ -187,70 +136,62 @@
-   GST_DEBUG ("Seeking to %" G_GINT64_FORMAT ", whence=%d",
-       (gint64) pos, whence);
- 
--  info = (GstProtocolInfo *) h->priv_data;
-+  info = (GstProtocolInfo *) priv_data;
- 
-   /* TODO : if we are push-based, we need to return sensible info */
- 
--  switch (h->flags) {
--    case URL_RDONLY:
--    {
--      /* sinkpad */
--      switch (whence) {
--        case SEEK_SET:
--          newpos = (guint64) pos;
--          break;
--        case SEEK_CUR:
--          newpos = info->offset + pos;
--          break;
--        case SEEK_END:
--        case AVSEEK_SIZE:
--          /* ffmpeg wants to know the current end position in bytes ! */
--        {
--          GstFormat format = GST_FORMAT_BYTES;
--          gint64 duration;
--
--          GST_DEBUG ("Seek end");
--
--          if (gst_pad_is_linked (info->pad))
--            if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
--                    &duration))
--              newpos = ((guint64) duration) + pos;
--        }
--          break;
--        default:
--          g_assert (0);
--          break;
-+  if (GST_PAD_IS_SINK (info->pad)) {
-+    /* sinkpad */
-+    switch (whence) {
-+      case SEEK_SET:
-+        newpos = (guint64) pos;
-+        break;
-+      case SEEK_CUR:
-+        newpos = info->offset + pos;
-+        break;
-+      case SEEK_END:
-+      case AVSEEK_SIZE:
-+        /* ffmpeg wants to know the current end position in bytes ! */
-+      {
-+        GstFormat format = GST_FORMAT_BYTES;
-+        gint64 duration;
-+
-+        GST_DEBUG ("Seek end");
-+
-+        if (gst_pad_is_linked (info->pad))
-+          if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
-+                  &duration))
-+            newpos = ((guint64) duration) + pos;
-       }
--      /* FIXME : implement case for push-based behaviour */
--      if (whence != AVSEEK_SIZE)
--        info->offset = newpos;
-+        break;
-+      default:
-+        g_assert (0);
-+        break;
-     }
--      break;
--    case URL_WRONLY:
--    {
--      /* srcpad */
--      switch (whence) {
--        case SEEK_SET:
--          info->offset = (guint64) pos;
--          gst_pad_push_event (info->pad, gst_event_new_new_segment
--              (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
--                  GST_CLOCK_TIME_NONE, info->offset));
--          break;
--        case SEEK_CUR:
--          info->offset += pos;
--          gst_pad_push_event (info->pad, gst_event_new_new_segment
--              (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
--                  GST_CLOCK_TIME_NONE, info->offset));
--          break;
--        default:
--          break;
--      }
--      newpos = info->offset;
-+    /* FIXME : implement case for push-based behaviour */
-+    if (whence != AVSEEK_SIZE)
-+      info->offset = newpos;
-+  } else if (GST_PAD_IS_SRC (info->pad)) {
-+    /* srcpad */
-+    switch (whence) {
-+      case SEEK_SET:
-+        info->offset = (guint64) pos;
-+        gst_pad_push_event (info->pad, gst_event_new_new_segment
-+            (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
-+                GST_CLOCK_TIME_NONE, info->offset));
-+        break;
-+      case SEEK_CUR:
-+        info->offset += pos;
-+        gst_pad_push_event (info->pad, gst_event_new_new_segment
-+            (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
-+                GST_CLOCK_TIME_NONE, info->offset));
-+        break;
-+      default:
-+        break;
-     }
--      break;
--    default:
--      g_assert (0);
--      break;
-+    newpos = info->offset;
-+  } else {
-+    g_assert_not_reached ();
-   }
- 
-   GST_DEBUG ("Now at offset %" G_GUINT64_FORMAT " (returning %" G_GUINT64_FORMAT
-@@ -258,85 +199,91 @@
-   return newpos;
- }
- 
--static int
--gst_ffmpegdata_close (URLContext * h)
-+int
-+gst_ffmpegdata_close (AVIOContext * h)
- {
-   GstProtocolInfo *info;
- 
--  info = (GstProtocolInfo *) h->priv_data;
-+  info = (GstProtocolInfo *) h->opaque;
-   if (info == NULL)
-     return 0;
- 
-   GST_LOG ("Closing file");
- 
--  switch (h->flags) {
--    case URL_WRONLY:
--    {
--      /* send EOS - that closes down the stream */
--      gst_pad_push_event (info->pad, gst_event_new_eos ());
--      break;
--    }
--    default:
--      break;
-+  if (GST_PAD_IS_SRC (info->pad)) {
-+    /* send EOS - that closes down the stream */
-+    gst_pad_push_event (info->pad, gst_event_new_eos ());
-   }
- 
-   /* clean up data */
-   g_free (info);
--  h->priv_data = NULL;
-+  h->opaque = NULL;
-+
-+  av_freep (&h->buffer);
-+  av_free (h);
- 
-   return 0;
- }
- 
-+int
-+gst_ffmpegdata_open (GstPad * pad, int flags, AVIOContext ** context)
-+{
-+  GstProtocolInfo *info;
-+  static const int buffer_size = 4096;
-+  unsigned char *buffer = NULL;
- 
--URLProtocol gstreamer_protocol = {
--  /*.name = */ "gstreamer",
--  /*.url_open = */ gst_ffmpegdata_open,
--  /*.url_read = */ gst_ffmpegdata_read,
--  /*.url_write = */ gst_ffmpegdata_write,
--  /*.url_seek = */ gst_ffmpegdata_seek,
--  /*.url_close = */ gst_ffmpegdata_close,
--};
-+  info = g_new0 (GstProtocolInfo, 1);
- 
-+  info->set_streamheader = flags & GST_FFMPEG_URL_STREAMHEADER;
-+  flags &= ~GST_FFMPEG_URL_STREAMHEADER;
- 
--/* specialized protocol for cross-thread pushing,
-- * based on ffmpeg's pipe protocol */
-+  /* we don't support R/W together */
-+  if ((flags & AVIO_FLAG_WRITE) && (flags & AVIO_FLAG_READ)) {
-+    GST_WARNING ("Only read-only or write-only are supported");
-+    return -EINVAL;
-+  }
- 
--static int
--gst_ffmpeg_pipe_open (URLContext * h, const char *filename, int flags)
--{
--  GstFFMpegPipe *ffpipe;
-+  /* make sure we're a pad and that we're of the right type */
-+  g_return_val_if_fail (GST_IS_PAD (pad), -EINVAL);
- 
--  GST_LOG ("Opening %s", filename);
-+  if ((flags & AVIO_FLAG_READ))
-+    g_return_val_if_fail (GST_PAD_IS_SINK (pad), -EINVAL);
-+  if ((flags & AVIO_FLAG_WRITE))
-+    g_return_val_if_fail (GST_PAD_IS_SRC (pad), -EINVAL);
- 
--  /* we don't support W together */
--  if (flags != URL_RDONLY) {
--    GST_WARNING ("Only read-only is supported");
--    return -EINVAL;
--  }
-+  info->eos = FALSE;
-+  info->pad = pad;
-+  info->offset = 0;
- 
--  if (sscanf (&filename[10], "%p", &ffpipe) != 1) {
--    GST_WARNING ("could not decode pipe info from %s", filename);
--    return -EIO;
-+  buffer = av_malloc (buffer_size);
-+  if (buffer == NULL) {
-+    GST_WARNING ("Failed to allocate buffer");
-+    return -ENOMEM;
-   }
- 
--  /* sanity check */
--  g_return_val_if_fail (GST_IS_ADAPTER (ffpipe->adapter), -EINVAL);
--
--  h->priv_data = (void *) ffpipe;
--  h->is_streamed = TRUE;
--  h->max_packet_size = 0;
-+  *context =
-+      avio_alloc_context (buffer, buffer_size, flags, (void *) info,
-+      gst_ffmpegdata_read, gst_ffmpegdata_write, gst_ffmpegdata_seek);
-+  (*context)->seekable = AVIO_SEEKABLE_NORMAL;
-+  if (!(flags & AVIO_FLAG_WRITE)) {
-+    (*context)->buf_ptr = (*context)->buf_end;
-+    (*context)->write_flag = 0;
-+  }
- 
-   return 0;
- }
- 
-+/* specialized protocol for cross-thread pushing,
-+ * based on ffmpeg's pipe protocol */
-+
- static int
--gst_ffmpeg_pipe_read (URLContext * h, unsigned char *buf, int size)
-+gst_ffmpeg_pipe_read (void *priv_data, unsigned char *buf, int size)
- {
-   GstFFMpegPipe *ffpipe;
-   const guint8 *data;
-   guint available;
- 
--  ffpipe = (GstFFMpegPipe *) h->priv_data;
-+  ffpipe = (GstFFMpegPipe *) priv_data;
- 
-   GST_LOG ("requested size %d", size);
- 
-@@ -367,21 +314,38 @@
-   return size;
- }
- 
--static int
--gst_ffmpeg_pipe_close (URLContext * h)
-+int
-+gst_ffmpeg_pipe_close (AVIOContext * h)
- {
-   GST_LOG ("Closing pipe");
- 
--  h->priv_data = NULL;
-+  h->opaque = NULL;
-+  av_freep (&h->buffer);
-+  av_free (h);
- 
-   return 0;
- }
- 
--URLProtocol gstpipe_protocol = {
--  "gstpipe",
--  gst_ffmpeg_pipe_open,
--  gst_ffmpeg_pipe_read,
--  NULL,
--  NULL,
--  gst_ffmpeg_pipe_close,
--};
-+int
-+gst_ffmpeg_pipe_open (GstFFMpegPipe * ffpipe, int flags, AVIOContext ** context)
-+{
-+  static const int buffer_size = 4096;
-+  unsigned char *buffer = NULL;
-+
-+  /* sanity check */
-+  g_return_val_if_fail (GST_IS_ADAPTER (ffpipe->adapter), -EINVAL);
-+
-+  buffer = av_malloc (buffer_size);
-+  if (buffer == NULL) {
-+    GST_WARNING ("Failed to allocate buffer");
-+    return -ENOMEM;
-+  }
-+
-+  *context =
-+      avio_alloc_context (buffer, buffer_size, 0, (void *) ffpipe,
-+      gst_ffmpeg_pipe_read, NULL, NULL);
-+  (*context)->seekable = 0;
-+  (*context)->buf_ptr = (*context)->buf_end;
-+
-+  return 0;
-+}
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c	2011-07-13 11:07:28.000000000 +0200
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c	2014-08-08 15:34:04.007874626 +0200
-@@ -25,6 +25,11 @@
- #ifdef __APPLE__
- #include <sys/sysctl.h>
- #endif
-+#ifdef HAVE_FFMPEG_UNINSTALLED
-+#include <avformat.h>
-+#else
-+#include <libavformat/avformat.h>
-+#endif
- 
- G_CONST_RETURN gchar *
- gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
-@@ -39,21 +44,21 @@
- }
- 
- gint
--av_smp_format_depth (enum SampleFormat smp_fmt)
-+av_smp_format_depth (enum AVSampleFormat smp_fmt)
- {
-   gint depth = -1;
-   switch (smp_fmt) {
--    case SAMPLE_FMT_U8:
-+    case AV_SAMPLE_FMT_U8:
-       depth = 1;
-       break;
--    case SAMPLE_FMT_S16:
-+    case AV_SAMPLE_FMT_S16:
-       depth = 2;
-       break;
--    case SAMPLE_FMT_S32:
--    case SAMPLE_FMT_FLT:
-+    case AV_SAMPLE_FMT_S32:
-+    case AV_SAMPLE_FMT_FLT:
-       depth = 4;
-       break;
--    case SAMPLE_FMT_DBL:
-+    case AV_SAMPLE_FMT_DBL:
-       depth = 8;
-       break;
-     default:
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c.orig
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c.orig	1970-01-01 01:00:00.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c.orig	2011-07-13 11:07:28.000000000 +0200
-@@ -0,0 +1,483 @@
-+/* GStreamer
-+ * Copyright (c) 2009 Edward Hervey <bilboed@bilboed.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+#include "gstffmpegutils.h"
-+#include <unistd.h>
-+#ifdef __APPLE__
-+#include <sys/sysctl.h>
-+#endif
-+
-+G_CONST_RETURN gchar *
-+gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
-+{
-+  AVCodec *codec;
-+  /* Let's use what ffmpeg can provide us */
-+
-+  if ((codec = avcodec_find_decoder (codec_id)) ||
-+      (codec = avcodec_find_encoder (codec_id)))
-+    return codec->long_name;
-+  return NULL;
-+}
-+
-+gint
-+av_smp_format_depth (enum SampleFormat smp_fmt)
-+{
-+  gint depth = -1;
-+  switch (smp_fmt) {
-+    case SAMPLE_FMT_U8:
-+      depth = 1;
-+      break;
-+    case SAMPLE_FMT_S16:
-+      depth = 2;
-+      break;
-+    case SAMPLE_FMT_S32:
-+    case SAMPLE_FMT_FLT:
-+      depth = 4;
-+      break;
-+    case SAMPLE_FMT_DBL:
-+      depth = 8;
-+      break;
-+    default:
-+      GST_ERROR ("UNHANDLED SAMPLE FORMAT !");
-+      break;
-+  }
-+  return depth;
-+}
-+
-+
-+/*
-+ * Fill in pointers to memory in a AVPicture, where
-+ * everything is aligned by 4 (as required by X).
-+ * This is mostly a copy from imgconvert.c with some
-+ * small changes.
-+ */
-+
-+#define FF_COLOR_RGB      0     /* RGB color space */
-+#define FF_COLOR_GRAY     1     /* gray color space */
-+#define FF_COLOR_YUV      2     /* YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
-+#define FF_COLOR_YUV_JPEG 3     /* YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
-+
-+#define FF_PIXEL_PLANAR   0     /* each channel has one component in AVPicture */
-+#define FF_PIXEL_PACKED   1     /* only one components containing all the channels */
-+#define FF_PIXEL_PALETTE  2     /* one components containing indexes for a palette */
-+
-+typedef struct PixFmtInfo
-+{
-+  const char *name;
-+  uint8_t nb_channels;          /* number of channels (including alpha) */
-+  uint8_t color_type;           /* color type (see FF_COLOR_xxx constants) */
-+  uint8_t pixel_type;           /* pixel storage type (see FF_PIXEL_xxx constants) */
-+  uint8_t is_alpha:1;           /* true if alpha can be specified */
-+  uint8_t x_chroma_shift;       /* X chroma subsampling factor is 2 ^ shift */
-+  uint8_t y_chroma_shift;       /* Y chroma subsampling factor is 2 ^ shift */
-+  uint8_t depth;                /* bit depth of the color components */
-+} PixFmtInfo;
-+
-+
-+/* this table gives more information about formats */
-+static PixFmtInfo pix_fmt_info[PIX_FMT_NB];
-+void
-+gst_ffmpeg_init_pix_fmt_info (void)
-+{
-+  /* YUV formats */
-+  pix_fmt_info[PIX_FMT_YUV420P].name = g_strdup ("yuv420p");
-+  pix_fmt_info[PIX_FMT_YUV420P].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_YUV420P].color_type = FF_COLOR_YUV;
-+  pix_fmt_info[PIX_FMT_YUV420P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUV420P].depth = 8,
-+      pix_fmt_info[PIX_FMT_YUV420P].x_chroma_shift = 1,
-+      pix_fmt_info[PIX_FMT_YUV420P].y_chroma_shift = 1;
-+
-+  pix_fmt_info[PIX_FMT_YUV422P].name = g_strdup ("yuv422p");
-+  pix_fmt_info[PIX_FMT_YUV422P].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_YUV422P].color_type = FF_COLOR_YUV;
-+  pix_fmt_info[PIX_FMT_YUV422P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUV422P].depth = 8;
-+  pix_fmt_info[PIX_FMT_YUV422P].x_chroma_shift = 1;
-+  pix_fmt_info[PIX_FMT_YUV422P].y_chroma_shift = 0;
-+
-+  pix_fmt_info[PIX_FMT_YUV444P].name = g_strdup ("yuv444p");
-+  pix_fmt_info[PIX_FMT_YUV444P].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_YUV444P].color_type = FF_COLOR_YUV;
-+  pix_fmt_info[PIX_FMT_YUV444P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUV444P].depth = 8;
-+  pix_fmt_info[PIX_FMT_YUV444P].x_chroma_shift = 0;
-+  pix_fmt_info[PIX_FMT_YUV444P].y_chroma_shift = 0;
-+
-+  pix_fmt_info[PIX_FMT_YUYV422].name = g_strdup ("yuv422");
-+  pix_fmt_info[PIX_FMT_YUYV422].nb_channels = 1;
-+  pix_fmt_info[PIX_FMT_YUYV422].color_type = FF_COLOR_YUV;
-+  pix_fmt_info[PIX_FMT_YUYV422].pixel_type = FF_PIXEL_PACKED;
-+  pix_fmt_info[PIX_FMT_YUYV422].depth = 8;
-+  pix_fmt_info[PIX_FMT_YUYV422].x_chroma_shift = 1;
-+  pix_fmt_info[PIX_FMT_YUYV422].y_chroma_shift = 0;
-+
-+  pix_fmt_info[PIX_FMT_YUV410P].name = g_strdup ("yuv410p");
-+  pix_fmt_info[PIX_FMT_YUV410P].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_YUV410P].color_type = FF_COLOR_YUV;
-+  pix_fmt_info[PIX_FMT_YUV410P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUV410P].depth = 8;
-+  pix_fmt_info[PIX_FMT_YUV410P].x_chroma_shift = 2;
-+  pix_fmt_info[PIX_FMT_YUV410P].y_chroma_shift = 2;
-+
-+  pix_fmt_info[PIX_FMT_YUV411P].name = g_strdup ("yuv411p");
-+  pix_fmt_info[PIX_FMT_YUV411P].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_YUV411P].color_type = FF_COLOR_YUV;
-+  pix_fmt_info[PIX_FMT_YUV411P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUV411P].depth = 8;
-+  pix_fmt_info[PIX_FMT_YUV411P].x_chroma_shift = 2;
-+  pix_fmt_info[PIX_FMT_YUV411P].y_chroma_shift = 0;
-+
-+  /* JPEG YUV */
-+  pix_fmt_info[PIX_FMT_YUVJ420P].name = g_strdup ("yuvj420p");
-+  pix_fmt_info[PIX_FMT_YUVJ420P].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_YUVJ420P].color_type = FF_COLOR_YUV_JPEG;
-+  pix_fmt_info[PIX_FMT_YUVJ420P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUVJ420P].depth = 8;
-+  pix_fmt_info[PIX_FMT_YUVJ420P].x_chroma_shift = 1;
-+  pix_fmt_info[PIX_FMT_YUVJ420P].y_chroma_shift = 1;
-+
-+  pix_fmt_info[PIX_FMT_YUVJ422P].name = g_strdup ("yuvj422p");
-+  pix_fmt_info[PIX_FMT_YUVJ422P].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_YUVJ422P].color_type = FF_COLOR_YUV_JPEG;
-+  pix_fmt_info[PIX_FMT_YUVJ422P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUVJ422P].depth = 8;
-+  pix_fmt_info[PIX_FMT_YUVJ422P].x_chroma_shift = 1;
-+  pix_fmt_info[PIX_FMT_YUVJ422P].y_chroma_shift = 0;
-+
-+  pix_fmt_info[PIX_FMT_YUVJ444P].name = g_strdup ("yuvj444p");
-+  pix_fmt_info[PIX_FMT_YUVJ444P].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_YUVJ444P].color_type = FF_COLOR_YUV_JPEG;
-+  pix_fmt_info[PIX_FMT_YUVJ444P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUVJ444P].depth = 8;
-+  pix_fmt_info[PIX_FMT_YUVJ444P].x_chroma_shift = 0;
-+  pix_fmt_info[PIX_FMT_YUVJ444P].y_chroma_shift = 0;
-+
-+  /* RGB formats */
-+  pix_fmt_info[PIX_FMT_RGB24].name = g_strdup ("rgb24");
-+  pix_fmt_info[PIX_FMT_RGB24].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_RGB24].color_type = FF_COLOR_RGB;
-+  pix_fmt_info[PIX_FMT_RGB24].pixel_type = FF_PIXEL_PACKED;
-+  pix_fmt_info[PIX_FMT_RGB24].depth = 8;
-+  pix_fmt_info[PIX_FMT_RGB24].x_chroma_shift = 0;
-+  pix_fmt_info[PIX_FMT_RGB24].y_chroma_shift = 0;
-+
-+  pix_fmt_info[PIX_FMT_BGR24].name = g_strdup ("bgr24");
-+  pix_fmt_info[PIX_FMT_BGR24].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_BGR24].color_type = FF_COLOR_RGB;
-+  pix_fmt_info[PIX_FMT_BGR24].pixel_type = FF_PIXEL_PACKED;
-+  pix_fmt_info[PIX_FMT_BGR24].depth = 8;
-+  pix_fmt_info[PIX_FMT_BGR24].x_chroma_shift = 0;
-+  pix_fmt_info[PIX_FMT_BGR24].y_chroma_shift = 0;
-+
-+  pix_fmt_info[PIX_FMT_RGB32].name = g_strdup ("rgba32");
-+  pix_fmt_info[PIX_FMT_RGB32].nb_channels = 4;
-+  pix_fmt_info[PIX_FMT_RGB32].is_alpha = 1;
-+  pix_fmt_info[PIX_FMT_RGB32].color_type = FF_COLOR_RGB;
-+  pix_fmt_info[PIX_FMT_RGB32].pixel_type = FF_PIXEL_PACKED;
-+  pix_fmt_info[PIX_FMT_RGB32].depth = 8;
-+  pix_fmt_info[PIX_FMT_RGB32].x_chroma_shift = 0;
-+  pix_fmt_info[PIX_FMT_RGB32].y_chroma_shift = 0;
-+
-+  pix_fmt_info[PIX_FMT_RGB565].name = g_strdup ("rgb565");
-+  pix_fmt_info[PIX_FMT_RGB565].nb_channels = 3;
-+  pix_fmt_info[PIX_FMT_RGB565].color_type = FF_COLOR_RGB;
-+  pix_fmt_info[PIX_FMT_RGB565].pixel_type = FF_PIXEL_PACKED;
-+  pix_fmt_info[PIX_FMT_RGB565].depth = 5;
-+  pix_fmt_info[PIX_FMT_RGB565].x_chroma_shift = 0;
-+  pix_fmt_info[PIX_FMT_RGB565].y_chroma_shift = 0;
-+
-+  pix_fmt_info[PIX_FMT_RGB555].name = g_strdup ("rgb555");
-+  pix_fmt_info[PIX_FMT_RGB555].nb_channels = 4;
-+  pix_fmt_info[PIX_FMT_RGB555].is_alpha = 1;
-+  pix_fmt_info[PIX_FMT_RGB555].color_type = FF_COLOR_RGB;
-+  pix_fmt_info[PIX_FMT_RGB555].pixel_type = FF_PIXEL_PACKED;
-+  pix_fmt_info[PIX_FMT_RGB555].depth = 5;
-+  pix_fmt_info[PIX_FMT_RGB555].x_chroma_shift = 0;
-+  pix_fmt_info[PIX_FMT_RGB555].y_chroma_shift = 0;
-+
-+  /* gray / mono formats */
-+  pix_fmt_info[PIX_FMT_GRAY8].name = g_strdup ("gray");
-+  pix_fmt_info[PIX_FMT_GRAY8].nb_channels = 1;
-+  pix_fmt_info[PIX_FMT_GRAY8].color_type = FF_COLOR_GRAY;
-+  pix_fmt_info[PIX_FMT_GRAY8].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_GRAY8].depth = 8;
-+
-+  pix_fmt_info[PIX_FMT_MONOWHITE].name = g_strdup ("monow");
-+  pix_fmt_info[PIX_FMT_MONOWHITE].nb_channels = 1;
-+  pix_fmt_info[PIX_FMT_MONOWHITE].color_type = FF_COLOR_GRAY;
-+  pix_fmt_info[PIX_FMT_MONOWHITE].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_MONOWHITE].depth = 1;
-+
-+  pix_fmt_info[PIX_FMT_MONOBLACK].name = g_strdup ("monob");
-+  pix_fmt_info[PIX_FMT_MONOBLACK].nb_channels = 1;
-+  pix_fmt_info[PIX_FMT_MONOBLACK].color_type = FF_COLOR_GRAY;
-+  pix_fmt_info[PIX_FMT_MONOBLACK].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_MONOBLACK].depth = 1;
-+
-+  /* paletted formats */
-+  pix_fmt_info[PIX_FMT_PAL8].name = g_strdup ("pal8");
-+  pix_fmt_info[PIX_FMT_PAL8].nb_channels = 4;
-+  pix_fmt_info[PIX_FMT_PAL8].is_alpha = 1;
-+  pix_fmt_info[PIX_FMT_PAL8].color_type = FF_COLOR_RGB;
-+  pix_fmt_info[PIX_FMT_PAL8].pixel_type = FF_PIXEL_PALETTE;
-+  pix_fmt_info[PIX_FMT_PAL8].depth = 8;
-+
-+  pix_fmt_info[PIX_FMT_YUVA420P].name = g_strdup ("yuva420p");
-+  pix_fmt_info[PIX_FMT_YUVA420P].nb_channels = 4;
-+  pix_fmt_info[PIX_FMT_YUVA420P].is_alpha = 1;
-+  pix_fmt_info[PIX_FMT_YUVA420P].color_type = FF_COLOR_YUV;
-+  pix_fmt_info[PIX_FMT_YUVA420P].pixel_type = FF_PIXEL_PLANAR;
-+  pix_fmt_info[PIX_FMT_YUVA420P].depth = 8,
-+      pix_fmt_info[PIX_FMT_YUVA420P].x_chroma_shift = 1,
-+      pix_fmt_info[PIX_FMT_YUVA420P].y_chroma_shift = 1;
-+};
-+
-+int
-+gst_ffmpeg_avpicture_get_size (int pix_fmt, int width, int height)
-+{
-+  AVPicture dummy_pict;
-+
-+  return gst_ffmpeg_avpicture_fill (&dummy_pict, NULL, pix_fmt, width, height);
-+}
-+
-+#define GEN_MASK(x) ((1<<(x))-1)
-+#define ROUND_UP_X(v,x) (((v) + GEN_MASK(x)) & ~GEN_MASK(x))
-+#define ROUND_UP_2(x) ROUND_UP_X (x, 1)
-+#define ROUND_UP_4(x) ROUND_UP_X (x, 2)
-+#define ROUND_UP_8(x) ROUND_UP_X (x, 3)
-+#define DIV_ROUND_UP_X(v,x) (((v) + GEN_MASK(x)) >> (x))
-+
-+int
-+gst_ffmpeg_avpicture_fill (AVPicture * picture,
-+    uint8_t * ptr, enum PixelFormat pix_fmt, int width, int height)
-+{
-+  int size, w2, h2, size2;
-+  int stride, stride2;
-+  PixFmtInfo *pinfo;
-+
-+  pinfo = &pix_fmt_info[pix_fmt];
-+
-+  switch (pix_fmt) {
-+    case PIX_FMT_YUV420P:
-+    case PIX_FMT_YUV422P:
-+    case PIX_FMT_YUV444P:
-+    case PIX_FMT_YUV410P:
-+    case PIX_FMT_YUV411P:
-+    case PIX_FMT_YUVJ420P:
-+    case PIX_FMT_YUVJ422P:
-+    case PIX_FMT_YUVJ444P:
-+      stride = ROUND_UP_4 (width);
-+      h2 = ROUND_UP_X (height, pinfo->y_chroma_shift);
-+      size = stride * h2;
-+      w2 = DIV_ROUND_UP_X (width, pinfo->x_chroma_shift);
-+      stride2 = ROUND_UP_4 (w2);
-+      h2 = DIV_ROUND_UP_X (height, pinfo->y_chroma_shift);
-+      size2 = stride2 * h2;
-+      picture->data[0] = ptr;
-+      picture->data[1] = picture->data[0] + size;
-+      picture->data[2] = picture->data[1] + size2;
-+      picture->data[3] = NULL;
-+      picture->linesize[0] = stride;
-+      picture->linesize[1] = stride2;
-+      picture->linesize[2] = stride2;
-+      picture->linesize[3] = 0;
-+      GST_DEBUG ("planes %d %d %d", 0, size, size + size2);
-+      GST_DEBUG ("strides %d %d %d", stride, stride2, stride2);
-+      return size + 2 * size2;
-+    case PIX_FMT_YUVA420P:
-+      stride = ROUND_UP_4 (width);
-+      h2 = ROUND_UP_X (height, pinfo->y_chroma_shift);
-+      size = stride * h2;
-+      w2 = DIV_ROUND_UP_X (width, pinfo->x_chroma_shift);
-+      stride2 = ROUND_UP_4 (w2);
-+      h2 = DIV_ROUND_UP_X (height, pinfo->y_chroma_shift);
-+      size2 = stride2 * h2;
-+      picture->data[0] = ptr;
-+      picture->data[1] = picture->data[0] + size;
-+      picture->data[2] = picture->data[1] + size2;
-+      picture->data[3] = picture->data[2] + size2;
-+      picture->linesize[0] = stride;
-+      picture->linesize[1] = stride2;
-+      picture->linesize[2] = stride2;
-+      picture->linesize[3] = stride;
-+      GST_DEBUG ("planes %d %d %d %d", 0, size, size + size2, size + 2 * size2);
-+      GST_DEBUG ("strides %d %d %d %d", stride, stride2, stride2, stride);
-+      return 2 * size + 2 * size2;
-+    case PIX_FMT_RGB24:
-+    case PIX_FMT_BGR24:
-+      stride = ROUND_UP_4 (width * 3);
-+      size = stride * height;
-+      picture->data[0] = ptr;
-+      picture->data[1] = NULL;
-+      picture->data[2] = NULL;
-+      picture->data[3] = NULL;
-+      picture->linesize[0] = stride;
-+      picture->linesize[1] = 0;
-+      picture->linesize[2] = 0;
-+      picture->linesize[3] = 0;
-+      return size;
-+      /*case PIX_FMT_AYUV4444:
-+         case PIX_FMT_BGR32:
-+         case PIX_FMT_BGRA32:
-+         case PIX_FMT_RGB32: */
-+    case PIX_FMT_RGB32:
-+      stride = width * 4;
-+      size = stride * height;
-+      picture->data[0] = ptr;
-+      picture->data[1] = NULL;
-+      picture->data[2] = NULL;
-+      picture->data[3] = NULL;
-+      picture->linesize[0] = stride;
-+      picture->linesize[1] = 0;
-+      picture->linesize[2] = 0;
-+      picture->linesize[3] = 0;
-+      return size;
-+    case PIX_FMT_RGB555:
-+    case PIX_FMT_RGB565:
-+    case PIX_FMT_YUYV422:
-+    case PIX_FMT_UYVY422:
-+      stride = ROUND_UP_4 (width * 2);
-+      size = stride * height;
-+      picture->data[0] = ptr;
-+      picture->data[1] = NULL;
-+      picture->data[2] = NULL;
-+      picture->data[3] = NULL;
-+      picture->linesize[0] = stride;
-+      picture->linesize[1] = 0;
-+      picture->linesize[2] = 0;
-+      picture->linesize[3] = 0;
-+      return size;
-+    case PIX_FMT_UYYVYY411:
-+      /* FIXME, probably not the right stride */
-+      stride = ROUND_UP_4 (width);
-+      size = stride * height;
-+      picture->data[0] = ptr;
-+      picture->data[1] = NULL;
-+      picture->data[2] = NULL;
-+      picture->data[3] = NULL;
-+      picture->linesize[0] = width + width / 2;
-+      picture->linesize[1] = 0;
-+      picture->linesize[2] = 0;
-+      picture->linesize[3] = 0;
-+      return size + size / 2;
-+    case PIX_FMT_GRAY8:
-+      stride = ROUND_UP_4 (width);
-+      size = stride * height;
-+      picture->data[0] = ptr;
-+      picture->data[1] = NULL;
-+      picture->data[2] = NULL;
-+      picture->data[3] = NULL;
-+      picture->linesize[0] = stride;
-+      picture->linesize[1] = 0;
-+      picture->linesize[2] = 0;
-+      picture->linesize[3] = 0;
-+      return size;
-+    case PIX_FMT_MONOWHITE:
-+    case PIX_FMT_MONOBLACK:
-+      stride = ROUND_UP_4 ((width + 7) >> 3);
-+      size = stride * height;
-+      picture->data[0] = ptr;
-+      picture->data[1] = NULL;
-+      picture->data[2] = NULL;
-+      picture->data[3] = NULL;
-+      picture->linesize[0] = stride;
-+      picture->linesize[1] = 0;
-+      picture->linesize[2] = 0;
-+      picture->linesize[3] = 0;
-+      return size;
-+    case PIX_FMT_PAL8:
-+      /* already forced to be with stride, so same result as other function */
-+      stride = ROUND_UP_4 (width);
-+      size = stride * height;
-+      picture->data[0] = ptr;
-+      picture->data[1] = ptr + size;    /* palette is stored here as 256 32 bit words */
-+      picture->data[2] = NULL;
-+      picture->data[3] = NULL;
-+      picture->linesize[0] = stride;
-+      picture->linesize[1] = 4;
-+      picture->linesize[2] = 0;
-+      picture->linesize[3] = 0;
-+      return size + 256 * 4;
-+    default:
-+      picture->data[0] = NULL;
-+      picture->data[1] = NULL;
-+      picture->data[2] = NULL;
-+      picture->data[3] = NULL;
-+      return -1;
-+  }
-+
-+  return 0;
-+}
-+
-+/* Create a GstBuffer of the requested size and caps.
-+ * The memory will be allocated by ffmpeg, making sure it's properly aligned
-+ * for any processing. */
-+
-+GstBuffer *
-+new_aligned_buffer (gint size, GstCaps * caps)
-+{
-+  GstBuffer *buf;
-+
-+  buf = gst_buffer_new ();
-+  GST_BUFFER_DATA (buf) = GST_BUFFER_MALLOCDATA (buf) = av_malloc (size);
-+  GST_BUFFER_SIZE (buf) = size;
-+  GST_BUFFER_FREE_FUNC (buf) = av_free;
-+  if (caps)
-+    gst_buffer_set_caps (buf, caps);
-+
-+  return buf;
-+}
-+
-+int
-+gst_ffmpeg_auto_max_threads (void)
-+{
-+  static gsize n_threads = 0;
-+  if (g_once_init_enter (&n_threads)) {
-+    int n = 1;
-+#if defined(_WIN32)
-+    {
-+      const char *s = getenv ("NUMBER_OF_PROCESSORS");
-+      if (s) {
-+        n = atoi (s);
-+      }
-+    }
-+#elif defined(__APPLE__)
-+    {
-+      int mib[] = { CTL_HW, HW_NCPU };
-+      size_t dataSize = sizeof (int);
-+
-+      if (sysctl (mib, 2, &n_threads, &dataSize, NULL, 0)) {
-+        n = 1;
-+      }
-+    }
-+#else
-+    n = sysconf (_SC_NPROCESSORS_CONF);
-+#endif
-+    if (n < 1)
-+      n = 1;
-+
-+    g_once_init_leave (&n_threads, n);
-+  }
-+
-+  return (int) (n_threads);
-+}
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h	2011-11-02 14:04:05.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h	2014-08-08 15:34:04.007874626 +0200
-@@ -23,6 +23,7 @@
- #ifdef HAVE_FFMPEG_UNINSTALLED
- #include <avcodec.h>
- #else
-+#include <libavutil/mathematics.h>
- #include <libavcodec/avcodec.h>
- #endif
- #include <gst/gst.h>
-@@ -87,7 +88,7 @@
- gst_ffmpeg_get_codecid_longname (enum CodecID codec_id);
- 
- gint
--av_smp_format_depth(enum SampleFormat smp_fmt);
-+av_smp_format_depth(enum AVSampleFormat smp_fmt);
- 
- GstBuffer *
- new_aligned_buffer (gint size, GstCaps * caps);
-diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h.orig
---- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h.orig	1970-01-01 01:00:00.000000000 +0100
-+++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h.orig	2014-08-08 15:26:38.473858652 +0200
-@@ -0,0 +1,95 @@
-+/* GStreamer
-+ * Copyright (C) <2009> Edward Hervey <bilboed@bilboed.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ */
-+
-+#ifndef __GST_FFMPEG_UTILS_H__
-+#define __GST_FFMPEG_UTILS_H__
-+
-+#ifdef HAVE_FFMPEG_UNINSTALLED
-+#include <avcodec.h>
-+#else
-+#include <libavcodec/avcodec.h>
-+#endif
-+#include <gst/gst.h>
-+
-+/*
-+ *Get the size of an picture
-+ */
-+int
-+gst_ffmpeg_avpicture_get_size (int pix_fmt, int width, int height);
-+
-+/*
-+ * Fill in pointers in an AVPicture, aligned by 4 (required by X).
-+ */
-+
-+int
-+gst_ffmpeg_avpicture_fill (AVPicture * picture,
-+                           uint8_t *   ptr,
-+                           enum PixelFormat pix_fmt,
-+                           int         width,
-+                           int         height);
-+
-+/*
-+ * Convert from/to a GStreamer <-> FFMpeg timestamp.
-+ */
-+static inline guint64
-+gst_ffmpeg_time_ff_to_gst (gint64 pts, AVRational base)
-+{
-+  guint64 out;
-+
-+  if (pts == AV_NOPTS_VALUE){
-+    out = GST_CLOCK_TIME_NONE;
-+  } else {
-+    AVRational bq = { 1, GST_SECOND };
-+    out = av_rescale_q (pts, base, bq);
-+  }
-+
-+  return out;
-+}
-+
-+static inline gint64
-+gst_ffmpeg_time_gst_to_ff (guint64 time, AVRational base)
-+{
-+  gint64 out;
-+
-+  if (!GST_CLOCK_TIME_IS_VALID (time) || base.num == 0) {
-+    out = AV_NOPTS_VALUE;
-+  } else {
-+    AVRational bq = { 1, GST_SECOND };
-+    out = av_rescale_q (time, bq, base);
-+  }
-+
-+  return out;
-+}
-+
-+void 
-+gst_ffmpeg_init_pix_fmt_info(void);
-+
-+int
-+gst_ffmpeg_auto_max_threads(void);
-+
-+G_CONST_RETURN gchar *
-+gst_ffmpeg_get_codecid_longname (enum CodecID codec_id);
-+
-+gint
-+av_smp_format_depth(enum AVSampleFormat smp_fmt);
-+
-+GstBuffer *
-+new_aligned_buffer (gint size, GstCaps * caps);
-+
-+#endif /* __GST_FFMPEG_UTILS_H__ */
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav_e500mc.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav_e500mc.patch
deleted file mode 100644
index eba4988..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav_e500mc.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure
-index 8473069..4f74952 100755
---- a/gst-libs/ext/libav/configure
-+++ b/gst-libs/ext/libav/configure
-Fix gst-ffmpeg build issues for libav on e500mc (fsl-p4080)
-
-Upstream-Status: Backport
-
-Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
-
-@@ -2210,6 +2210,10 @@ elif enabled ppc; then
-             cpuflags="-mcpu=cell"
-             enable ldbrx
-         ;;
-+        e500mc)
-+            cpuflags="-mcpu=e500mc"
-+            disable altivec
-+        ;;
-         e500v2)
-             cpuflags="-mcpu=8548 -mhard-float -mfloat-gprs=double"
-             disable altivec
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav_e5500.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav_e5500.patch
deleted file mode 100644
index d9ea2c2..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/libav_e5500.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-libav: Add configs for ppc e5500
-
-Upstream-Status: Pending
-
-Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
-
---- gst-ffmpeg-0.10.13/gst-libs/ext/libav/configure	2013-06-20 05:18:36.073104964 -0400
-+++ gst-ffmpeg-0.10.13/gst-libs/ext/libav/configure	2013-06-20 05:18:38.269104150 -0400
-@@ -2222,6 +2222,10 @@
-             cpuflags="-mcpu=8540 -mhard-float"
-             disable altivec
-         ;;
-+        e5500)
-+            cpuflags="-mcpu=e5500 -mhard-float"
-+            disable altivec
-+        ;;
-     esac
- 
- elif enabled x86; then
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg_0.10.13.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg_0.10.13.bb
deleted file mode 100644
index ca19fd6..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg_0.10.13.bb
+++ /dev/null
@@ -1,103 +0,0 @@
-SUMMARY = "FFmpeg-based GStreamer plug-in"
-SECTION = "multimedia"
-LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://ext/libpostproc/gstpostproc.c;beginline=1;endline=18;md5=5896e445e41681324381f5869ee33d38 \
-                    file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605 \
-                    file://ext/ffmpeg/gstffmpeg.h;beginline=1;endline=18;md5=ff65467b0c53cdfa98d0684c1bc240a9 \
-                    file://gst-libs/ext/libav/LICENSE;md5=abc3b8cb02856aa7823bbbd162d16232 \
-                    file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
-                    file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-LICENSE_FLAGS = "commercial"
-HOMEPAGE = "http://www.gstreamer.net/"
-DEPENDS = "gstreamer gst-plugins-base zlib bzip2 yasm-native libpostproc"
-
-inherit autotools-brokensep pkgconfig
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://lower-rank.diff \
-           file://configure-fix.patch \
-           file://h264_qpel_mmx.patch \
-           file://libav_e500mc.patch \
-           file://libav_e5500.patch \
-           file://gst-ffmpeg-CVE-2013-3674.patch \
-           file://0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch \
-           file://0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch \
-           file://0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch \
-           file://0001-huffyuvdec-Skip-len-0-cases.patch \
-           file://0001-huffyuvdec-Check-init_vlc-return-codes.patch \
-           file://0001-alsdec-check-block-length.patch \
-           file://0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch \
-           file://0001-atrac3dec-Check-coding-mode-against-channels.patch \
-           file://0001-eamad-fix-out-of-array-accesses.patch \
-           file://0001-mjpegdec-check-SE.patch \
-           file://0001-alac-fix-nb_samples-order-case.patch \
-           file://0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch \
-           file://0001-roqvideodec-check-dimensions-validity.patch \
-           file://0001-aacdec-check-channel-count.patch \
-           file://0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch \
-           file://0001-error_concealment-Check-that-the-picture-is-not-in-a.patch \
-           file://0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch \
-           file://0001-vp3-Copy-all-3-frames-for-thread-updates.patch \
-           file://0001-h264_sei-Fix-infinite-loop.patch \
-           file://0001-avcodec-parser-reset-indexes-on-realloc-failure.patch \
-           file://0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch \
-           file://gst-ffmpeg-CVE-2013-0855.patch \
-           file://0001-qdm2dec-fix-buffer-overflow.patch \
-           file://0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch \
-           file://0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch \
-           file://0001-error-concealment-initialize-block-index.patch \
-           file://0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch \
-           file://0001-lavf-compute-probe-buffer-size-more-reliably.patch \
-           file://0001-ffserver-set-oformat.patch \
-           file://0001-h264-set-parameters-from-SPS-whenever-it-changes.patch \
-           file://0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch \
-           file://0001-avcodec-smc-fix-off-by-1-error.patch \
-           file://0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch \
-           file://libav-9.patch \
-           file://gst-ffmpeg-fix-CVE-2011-4352.patch \
-           file://gst-ffmpeg-fix-CVE-2014-7933.patch \
-           file://gst-ffmpeg-fix-CVE-2014-8542.patch \
-           file://gst-ffmpeg-fix-CVE-2014-8543.patch \
-           file://gst-ffmpeg-fix-CVE-2014-8544.patch \
-           file://gst-ffmpeg-fix-CVE-2014-8545.patch \
-           file://gst-ffmpeg-fix-CVE-2014-8546.patch \
-           file://gst-ffmpeg-fix-CVE-2014-8547.patch \
-           file://gst-ffmpeg-fix-CVE-2014-9318.patch \
-           file://gst-ffmpeg-fix-CVE-2014-9603.patch \
-"
-
-SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
-SRC_URI[sha256sum] = "76fca05b08e00134e3cb92fa347507f42cbd48ddb08ed3343a912def187fbb62"
-
-PR = "r8"
-
-GSTREAMER_DEBUG ?= "--disable-debug"
-
-FFMPEG_EXTRA_CONFIGURE = "--with-ffmpeg-extra-configure"
-# pass --cpu for powerpc. get cpu name by stripping "ppc" or "ppc64"
-# from DEFAULTTUNE
-FFMPEG_CPU_powerpc = "--cpu=${@d.getVar('DEFAULTTUNE', False)[3:]}"
-FFMPEG_CPU_powerpc64 = "--cpu=${@d.getVar('DEFAULTTUNE', False)[5:]}"
-FFMPEG_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux ${FFMPEG_CPU} \
-  --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
-  --ranlib='${RANLIB}' \
-  ${GSTREAMER_DEBUG}"
-FFMPEG_EXTRA_CONFIGURE_COMMON = \
-'${FFMPEG_EXTRA_CONFIGURE}="${FFMPEG_EXTRA_CONFIGURE_COMMON_ARG}"'
-
-EXTRA_OECONF = "${FFMPEG_EXTRA_CONFIGURE_COMMON}"
-
-PACKAGECONFIG ??= "external-libav"
-PACKAGECONFIG[external-libav] = "--with-system-ffmpeg,,libav"
-PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
-
-FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
-FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
-FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la"
-FILES_${PN}-staticdev += "${libdir}/gstreamer-0.10/*.a"
-
-# http://errors.yoctoproject.org/Errors/Details/40736/
-PNBLACKLIST[gst-ffmpeg] ?= "Not compatible with currently used ffmpeg 3 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-meta-base_0.10.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-meta-base_0.10.bb
index 039abe1..88f1abf 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-meta-base_0.10.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-meta-base_0.10.bb
@@ -6,7 +6,7 @@
 DEPENDS_BAD="${@'gst-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}"
 DEPENDS = "gstreamer gst-plugins-base gst-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}"
 
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-gl/rpi-egl-gles2-dep.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-gl/rpi-egl-gles2-dep.patch
new file mode 100644
index 0000000..7db1c5a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-gl/rpi-egl-gles2-dep.patch
@@ -0,0 +1,22 @@
+Check for header and library separately and check for GLESv2 before egl
+this is to overcome an annoying issue with rpi/userland where egl depends
+on sysmbols from libGLESv2
+
+-Khem
+Index: gst-plugins-gl-0.10.3/configure.ac
+===================================================================
+--- gst-plugins-gl-0.10.3.orig/configure.ac
++++ gst-plugins-gl-0.10.3/configure.ac
+@@ -183,8 +183,10 @@ case $host in
+     else
+       AC_CHECK_HEADERS([EGL/egl.h], [HAVE_EGL=yes], [HAVE_EGL=no])
+       if test "x$HAVE_EGL" = "xyes"; then
+-        AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h,, AC_MSG_ERROR([EGL is required]))
+-        AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h,, AC_MSG_ERROR([OpenGLES2 is required]))
++        AC_CHECK_HEADERS([GLES2/gl2.h],, AC_MSG_ERROR([OpenGLES2 is required]))
++        AC_CHECK_LIB(GLESv2,[glTexImage2D],, AC_MSG_ERROR([OpenGLES2 is required]))
++        AC_CHECK_HEADERS([EGL/egl.h],, AC_MSG_ERROR([EGL is required]))
++        AC_CHECK_LIB(EGL,[eglGetError],, AC_MSG_ERROR([EGL is required]))
+         GL_LIBS="$LIBS $X_LIBS -lEGL -lGLESv2"
+         GL_BACKEND=x11ES2
+         GL_TYPE=gles
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-gl_0.10.3.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-gl_0.10.3.bb
index 6859f33..f3eaf30 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-gl_0.10.3.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-gl_0.10.3.bb
@@ -6,13 +6,17 @@
 SRC_URI[md5sum] = "ac70ede13f79978d56eaed8abaa3c938"
 SRC_URI[sha256sum] = "48340b6a4b8abce16344a7bc33e74a94fdcce4f57ef6342cdf2f941c429bf210"
 
-SRC_URI += " file://0001-conditional-gl-framebuffer-undefined-use.patch"
+SRC_URI += " file://0001-conditional-gl-framebuffer-undefined-use.patch \
+             file://rpi-egl-gles2-dep.patch \
+"
 
 DEPENDS += "gst-plugins-base virtual/libgles2 virtual/egl jpeg libpng glew"
 
 PR = "r4"
 
-inherit gettext
+inherit gettext distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
 
 # This package doesn't have a configure switch for EGL or GL, so forcibly tell
 # configure that it can't find gl.h so it always uses EGL.  If/when we have some
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/files/display.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/files/display.patch
deleted file mode 100644
index 61b0e6c..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/files/display.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 3e46d2e501da68d929bb5f26900a292a5fc04a1f Mon Sep 17 00:00:00 2001
-From: Stefan Westerfeld <stefan@space.twc.de>
-Date: Mon, 23 Apr 2012 03:10:22 +0200
-Subject: [PATCH] Fix time display updates (broken by introduction of quiet
- mode).
-
----
- src/gst123.cc |    1 +
- src/msg.cc    |    7 +++++++
- src/msg.h     |    1 +
- 3 files changed, 9 insertions(+)
-
-diff --git a/src/gst123.cc b/src/gst123.cc
-index 20e91e5..ce5876d 100644
---- a/src/gst123.cc
-+++ b/src/gst123.cc
-@@ -640,6 +640,7 @@ cb_print_position (gpointer *data)
-       else
-         blanks += "         ";
-       Msg::print ("%s%s\r", status.c_str(), blanks.c_str());
-+      Msg::flush();
-     }
- 
-   /* call me again */
-diff --git a/src/msg.cc b/src/msg.cc
-index 547cd90..33cada2 100644
---- a/src/msg.cc
-+++ b/src/msg.cc
-@@ -41,6 +41,13 @@ print (const char *format, ...)
-     }
- }
- 
-+void
-+flush()
-+{
-+  if (!Options::the().quiet)
-+    fflush (stdout);
-+}
-+
- }
- 
- }
-diff --git a/src/msg.h b/src/msg.h
-index e0ced24..5bebac0 100644
---- a/src/msg.h
-+++ b/src/msg.h
-@@ -27,6 +27,7 @@ namespace Msg
- {
- 
- void print (const char *format, ...);
-+void flush();
- 
- }
- 
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/gst123_0.3.1.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/gst123_0.3.1.bb
deleted file mode 100644
index 9fe1bc6..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/gst123_0.3.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Flexible CLI player in the spirit of mpg123, based on GStreamer"
-HOMEPAGE = "http://space.twc.de/~stefan/gst123.php"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
-                    file://src/gst123.cc;beginline=1;endline=19;md5=05d2f5d54b985b986c26af931d2084f8"
-
-DEPENDS = "libx11 gstreamer gst-plugins-base gtk+ ncurses"
-
-SRC_URI = "http://space.twc.de/~stefan/gst123/${BPN}-${PV}.tar.bz2 \
-           file://display.patch"
-
-SRC_URI[md5sum] = "1e77767c9d6fecee5641f95804f160fe"
-SRC_URI[sha256sum] = "89d1de025eca0466c125dcd6a11b64341bdf98ee4c03c3e5a12321d77cb8b0ce"
-
-inherit autotools
-
-PNBLACKLIST[gst123] ?= "gst123 is still "sometimes" using wrong sysroot - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/juce/projucer.inc b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/juce/projucer.inc
index 6f696e2..63ed9e9 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/juce/projucer.inc
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/juce/projucer.inc
@@ -3,19 +3,19 @@
 JUCE supported platforms, including Linux and Embedded Linux."
 SECTION = "utils"
 HOMEPAGE = "http://juce.com/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://README.txt;md5=9ab765ccda8890efc753f287911a1958"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://README.md;md5=65c50b4ff3522b99436da100536ccd1c"
 
 inherit pkgconfig
 
 DEPENDS = "libx11 libxext libxinerama libxrandr libxcursor freetype alsa-lib curl"
 
-SRCREV = "a8a7fa28e2e9cb19db6a27fcccb567a8ccfe6109"
-BRANCH = "develop"
-SRC_URI = "git://github.com/julianstorer/JUCE.git;protocol=https;branch=${BRANCH}"
+SRCREV = "4f41f28b47d01b939559123d145b4e5860528bb7"
+BRANCH = "master"
+SRC_URI = "git://github.com/WeAreROLI/JUCE.git;protocol=https;branch=${BRANCH}"
 
 S = "${WORKDIR}/git"
-PV = "4.2.3+git${SRCPV}"
+PV = "5.0.1"
 
 JUCE_PROJUCER_BUILD_PATH = "${B}/extras/Projucer/Builds"
 JUCE_PROJUCER_MAKEFILE_PATH = "${JUCE_PROJUCER_BUILD_PATH}/LinuxMakefile"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb
index c16f3be..2eb21a3 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb
@@ -36,9 +36,12 @@
     dbus \
     expat \
     zlib \
-    libupnp \
+    libupnp1.6 \
 "
 
+# While this item does not require it, it depends on mpg123 which does
+LICENSE_FLAGS = "commercial"
+
 SRC_URI = " \
     http://www.musicpd.org/download/${BPN}/0.19/${BP}.tar.xz \
     file://mpd.conf.in \
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb
index e115f1c..3eb1856 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb
@@ -6,6 +6,9 @@
 
 DEPENDS = "libpng ffmpeg libsndfile1 libvorbis"
 
+# While this item does not require it, it depends on ffmpeg which does
+LICENSE_FLAGS = "commercial"
+
 PR = "r2"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio', d)} \
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/streamripper/streamripper_1.64.6.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/streamripper/streamripper_1.64.6.bb
index 94355b6..722815a 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/streamripper/streamripper_1.64.6.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/streamripper/streamripper_1.64.6.bb
@@ -6,6 +6,9 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
 DEPENDS = "glib-2.0 libmad libogg libvorbis"
 
+# While this item does not require it, it depends on libmad which does
+LICENSE_FLAGS = "commercial"
+
 SRC_URI = "\
     ${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
     file://0001-build-these-are-foreign-automake-projects.patch \
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc
index 087baab..acb3ccd 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc
@@ -13,6 +13,9 @@
    libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \
    tiff"
 
+# While this item does not require it, it depends on ffmpeg which does
+LICENSE_FLAGS = "commercial"
+
 SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz"
 
 inherit autotools gettext pkgconfig distro_features_check
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch
new file mode 100644
index 0000000..7668df3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch
@@ -0,0 +1,29 @@
+From 4945dca11bc4ddec60bd858f45212dc8f39638e0 Mon Sep 17 00:00:00 2001
+From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
+Date: Tue, 5 Jul 2016 18:07:45 -0400
+Subject: [PATCH 1/6] build: Protect against unsupported CPU types
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+Upstream-Status: Accepted [expected in 0.4]
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6f9553b..f5304b8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,8 +70,9 @@ AS_CASE(["${host_cpu}"],
+         [
+          HAVE_ARM=1
+          ARCH_CFLAGS="-DWEBRTC_ARCH_ARM"
+-        ]
++        ],
+     # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines
++    [AC_MSG_ERROR([Unsupported CPU type $host_cpu])]
+ )
+ AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"])
+ AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"])
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch
new file mode 100644
index 0000000..2e202b0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch
@@ -0,0 +1,30 @@
+From b5bda3431159b6505dcd069641c863018c4d4309 Mon Sep 17 00:00:00 2001
+From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
+Date: Wed, 6 Jul 2016 15:18:15 -0400
+Subject: [PATCH 2/6] build: Add ARM 64bit support
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+Upstream-Status: Accepted [expected in 0.4]
+---
+ configure.ac | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index f5304b8..be20514 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,6 +71,11 @@ AS_CASE(["${host_cpu}"],
+          HAVE_ARM=1
+          ARCH_CFLAGS="-DWEBRTC_ARCH_ARM"
+         ],
++    [aarch64*],
++        [
++         HAVE_NEON=1
++         ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64"
++        ],
+     # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines
+     [AC_MSG_ERROR([Unsupported CPU type $host_cpu])]
+ )
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch
new file mode 100644
index 0000000..82e270f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch
@@ -0,0 +1,96 @@
+From 7722fb8a3189fea0f6381f02a0e4f63c847f0393 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sat, 6 Aug 2016 11:02:43 +0200
+Subject: [PATCH 3/6] build: fix architecture detection
+
+The current architecture detection, based on the "host_cpu" part of the
+tuple does not work properly for a number of reason:
+
+ - The code assumes that if host_cpu starts with "arm" then ARM
+   instructions are available, which is incorrect. Indeed, Cortex-M
+   platforms can run Linux, they are ARM platforms (so host_cpu = arm),
+   but they don't support ARM instructions: they support only the
+   Thumb-2 instruction set.
+
+ - The armv7 case is also not very useful, as it is not standard at all
+   to pass armv7 as host_cpu even if the host system is actually ARMv7
+   based.
+
+ - For the same reason, the armv8 case is not very useful: ARMv8 is
+   AArch64, and there is already a separate case to handle this
+   architecture.
+
+So, this commit moves away from a host_cpu based logic, and instead
+tests using AC_CHECK_DECLS() the built-in definitions of the compiler:
+
+ - If we have __ARM_ARCH_ISA_ARM defined, then it's an ARM processor
+   that supports the ARM instruction set (this allows to exclude Thumb-2
+   only processors).
+
+ - If we have __ARM_ARCH_7A__, then we have an ARMv7-A processor, and
+   we can enable the corresponding optimizations
+
+ - Same for __aarch64__, __i386__ and __x86_64__.
+
+In addition, we remove the AC_MSG_ERROR() that makes the build fail for
+all architectures but the ones that are explicitly supported. Indeed,
+webrtc-audio-processing builds just fine for other architectures (tested
+on MIPS), it's just that none of the architecture-specific optimizations
+will be used.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+Upstream-Status: Accepted [expected in 0.4]
+---
+ configure.ac | 35 +++++++++++------------------------
+ 1 file changed, 11 insertions(+), 24 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index be20514..e898014 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,30 +55,17 @@ AS_CASE(["${host}"],
+ )
+ AC_SUBST(PLATFORM_CFLAGS)
+ 
+-AS_CASE(["${host_cpu}"],
+-    [i?86|x86_64],
+-        [
+-         HAVE_X86=1
+-        ],
+-    [armv7*|armv8*],
+-        [
+-         HAVE_ARM=1
+-         HAVE_ARMV7=1
+-         ARCH_CFLAGS="-DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7"
+-        ],
+-    [arm*],
+-        [
+-         HAVE_ARM=1
+-         ARCH_CFLAGS="-DWEBRTC_ARCH_ARM"
+-        ],
+-    [aarch64*],
+-        [
+-         HAVE_NEON=1
+-         ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64"
+-        ],
+-    # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines
+-    [AC_MSG_ERROR([Unsupported CPU type $host_cpu])]
+-)
++# Testing __ARM_ARCH_ISA_ARM since the code contains ARM instructions,
++# which don't work on Thumb-2 only platforms (ARMv7-M).
++AC_CHECK_DECLS([__ARM_ARCH_ISA_ARM],
++	[HAVE_ARM=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM"])
++AC_CHECK_DECLS([__ARM_ARCH_7A__],
++	[HAVE_ARMV7=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM_V7"])
++AC_CHECK_DECLS([__aarch64__],
++	[HAVE_NEON=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64"])
++AC_CHECK_DECLS([__i386__], [HAVE_X86=1])
++AC_CHECK_DECLS([__x86_64__], [HAVE_X86=1])
++
+ AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"])
+ AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"])
+ AM_CONDITIONAL(HAVE_ARMV7, [test "x${HAVE_ARMV7}" = "x1"])
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch
new file mode 100644
index 0000000..c96f10e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch
@@ -0,0 +1,41 @@
+From 0c332b7d94f8425c4f33344ddf406b6eea458861 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Mon, 8 May 2017 17:01:49 +0300
+Subject: [PATCH 4/6] typedefs.h: add support for 64-bit and big endian MIPS
+
+The 64-bit check is taken from the upstream webrtc project, the big
+endian check is my own addition.
+
+Upstream-Status: Pending
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ webrtc/typedefs.h | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
+index d875490..d1b2f54 100644
+--- a/webrtc/typedefs.h
++++ b/webrtc/typedefs.h
+@@ -41,9 +41,18 @@
+ //#define WEBRTC_ARCH_ARMEL
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+-#elif defined(__MIPSEL__)
++#elif defined(__MIPSEL__) || defined(__MIPSEB__)
++#define WEBRTC_ARCH_MIPS_FAMILY
++#if defined(__LP64__)
++#define WEBRTC_ARCH_64_BITS
++#else
+ #define WEBRTC_ARCH_32_BITS
++#endif
++#if defined(__MIPSEL__)
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
++#else
++#define WEBRTC_ARCH_BIG_ENDIAN
++#endif
+ #elif defined(__pnacl__)
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0005-typedefs.h-add-support-for-PowerPC.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0005-typedefs.h-add-support-for-PowerPC.patch
new file mode 100644
index 0000000..e16b57e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0005-typedefs.h-add-support-for-PowerPC.patch
@@ -0,0 +1,28 @@
+From db5f570e928c8ca5b0b8dc702e1af0a57277f092 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Mon, 3 Jul 2017 16:20:08 +0300
+Subject: [PATCH 5/6] typedefs.h: add support for PowerPC
+
+Upstream-Status: Pending
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ webrtc/typedefs.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
+index d1b2f54..6e34d9e 100644
+--- a/webrtc/typedefs.h
++++ b/webrtc/typedefs.h
+@@ -53,6 +53,9 @@
+ #else
+ #define WEBRTC_ARCH_BIG_ENDIAN
+ #endif
++#elif defined(__powerpc__)
++#define WEBRTC_ARCH_32_BITS
++#define WEBRTC_ARCH_BIG_ENDIAN
+ #elif defined(__pnacl__)
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0006-common_audio-implement-endianness-conversion-in-wav-.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0006-common_audio-implement-endianness-conversion-in-wav-.patch
new file mode 100644
index 0000000..5826ab0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0006-common_audio-implement-endianness-conversion-in-wav-.patch
@@ -0,0 +1,116 @@
+From 7d31da8ef93987000f297d435dbacaf7d436107b Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Thu, 15 Jun 2017 18:38:30 +0300
+Subject: [PATCH 6/6] common_audio: implement endianness conversion in wav file
+ handling
+
+The code didn't build for big endian machines due to the missing
+endianness conversions.
+
+Upstream-Status: Pending
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ webrtc/common_audio/wav_file.cc   | 27 +++++++++++++++++++++------
+ webrtc/common_audio/wav_header.cc | 32 +++++++++++++++++++++++++++++++-
+ 2 files changed, 52 insertions(+), 7 deletions(-)
+
+diff --git a/webrtc/common_audio/wav_file.cc b/webrtc/common_audio/wav_file.cc
+index b14b620..e2f7738 100644
+--- a/webrtc/common_audio/wav_file.cc
++++ b/webrtc/common_audio/wav_file.cc
+@@ -64,9 +64,6 @@ WavReader::~WavReader() {
+ }
+ 
+ size_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) {
+-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
+-#error "Need to convert samples to big-endian when reading from WAV file"
+-#endif
+   // There could be metadata after the audio; ensure we don't read it.
+   num_samples = std::min(rtc::checked_cast<uint32_t>(num_samples),
+                          num_samples_remaining_);
+@@ -76,6 +73,13 @@ size_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) {
+   RTC_CHECK(read == num_samples || feof(file_handle_));
+   RTC_CHECK_LE(read, num_samples_remaining_);
+   num_samples_remaining_ -= rtc::checked_cast<uint32_t>(read);
++
++#ifdef WEBRTC_ARCH_BIG_ENDIAN
++  // Convert the read samples from little-endian to big-endian.
++  for (size_t i = 0; i < read; i++)
++    samples[i] = ((uint16_t) samples[i] >> 8) | ((uint16_t) samples[i] << 8);
++#endif
++
+   return read;
+ }
+ 
+@@ -119,11 +123,22 @@ WavWriter::~WavWriter() {
+ }
+ 
+ void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {
+-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
+-#error "Need to convert samples to little-endian when writing to WAV file"
+-#endif
++#ifdef WEBRTC_ARCH_BIG_ENDIAN
++  // Convert the samples from big-endian samples to little-endian.
++  int16_t* converted_samples = static_cast<int16_t*>(malloc(num_samples * sizeof(*samples)));
++  RTC_CHECK(converted_samples) << "Out of memory.";
++  for (int i = 0; i < num_samples; i++)
++    converted_samples[i] =
++        ((uint16_t) samples[i] >> 8) | ((uint16_t) samples[i] << 8);
++
++  const size_t written =
++      fwrite(converted_samples, sizeof(*converted_samples), num_samples,
++             file_handle_);
++  free(converted_samples);
++#else
+   const size_t written =
+       fwrite(samples, sizeof(*samples), num_samples, file_handle_);
++#endif
+   RTC_CHECK_EQ(num_samples, written);
+   num_samples_ += static_cast<uint32_t>(written);
+   RTC_CHECK(written <= std::numeric_limits<uint32_t>::max() ||
+diff --git a/webrtc/common_audio/wav_header.cc b/webrtc/common_audio/wav_header.cc
+index 61cfffe..382bfc7 100644
+--- a/webrtc/common_audio/wav_header.cc
++++ b/webrtc/common_audio/wav_header.cc
+@@ -129,7 +129,37 @@ static inline std::string ReadFourCC(uint32_t x) {
+   return std::string(reinterpret_cast<char*>(&x), 4);
+ }
+ #else
+-#error "Write be-to-le conversion functions"
++static inline void WriteLE16(uint16_t* f, uint16_t x) {
++  *f = x >> 8 | x << 8;
++}
++static inline void WriteLE32(uint32_t* f, uint32_t x) {
++  *f = x >> 24
++      | (x && 0xFF0000) >> 8
++      | (x && 0xFF00) << 8
++      | x << 24;
++}
++static inline void WriteFourCC(uint32_t* f, char a, char b, char c, char d) {
++  *f = static_cast<uint32_t>(d)
++      | static_cast<uint32_t>(c) << 8
++      | static_cast<uint32_t>(b) << 16
++      | static_cast<uint32_t>(a) << 24;
++}
++
++static inline uint32_t ReadLE16(uint16_t x) {
++  return x >> 8 | x << 8;
++}
++
++static inline uint32_t ReadLE32(uint32_t x) {
++  return x >> 24
++      | (x && 0xFF0000) >> 8
++      | (x && 0xFF00) << 8
++      | x << 24;
++}
++
++static inline std::string ReadFourCC(uint32_t x) {
++  x = ReadLE32(x);
++  return std::string(reinterpret_cast<char*>(&x), 4);
++}
+ #endif
+ 
+ static inline uint32_t RiffChunkSize(uint32_t bytes_in_payload) {
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.bb
new file mode 100644
index 0000000..2b0f7c6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "Audio processing bits of the WebRTC reference implementation"
+HOMEPAGE = "https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/"
+SECTION = "audio"
+
+DEPENDS_append_libc-musl = " libexecinfo"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=da08a38a32a340c5d91e13ee86a118f2 \
+                    file://webrtc/common.h;beginline=1;endline=9;md5=41f7322d91deabaf0acbbd0b8d0bc548 \
+"
+
+# Note that patch 3 effectively reverts patches 1 and 2. The only reason
+# why patches 1 and 2 are included is that otherwise patch 3 wouldn't
+# apply cleanly.
+SRC_URI = "http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/${BP}.tar.xz \
+           file://0001-build-Protect-against-unsupported-CPU-types.patch \
+           file://0002-build-Add-ARM-64bit-support.patch \
+           file://0003-build-fix-architecture-detection.patch \
+           file://0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch \
+           file://0005-typedefs.h-add-support-for-PowerPC.patch \
+           file://0006-common_audio-implement-endianness-conversion-in-wav-.patch \
+"
+
+SRC_URI[md5sum] = "336ae032f608e65808ac577cde0ab72c"
+SRC_URI[sha256sum] = "756e291d4f557d88cd50c4fe3b8454ec238362d22cedb3e6173240d90f0a80fa"
+
+LDFLAGS_append_libc-musl = " -lexecinfo"
+inherit autotools
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-support/crossguid/crossguid.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-support/crossguid/crossguid.bb
new file mode 100644
index 0000000..228b8b6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-support/crossguid/crossguid.bb
@@ -0,0 +1,25 @@
+# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Lightweight cross platform C++ GUID/UUID library"
+HOMEPAGE = "https://github.com/graeme-hill/crossguid"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1373274bc8d8001edc54933919f36f68"
+DEPENDS += "util-linux"
+
+PV = "0.0+git${SRCPV}"
+
+SRCREV = "b56957ac453575e91ca1b63a80c0077c2b0d011a"
+SRC_URI = "git://github.com/graeme-hill/crossguid;protocol=https"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+	${CXX} -c guid.cpp -o guid.o ${CXXFLAGS} -std=c++11 -DGUID_LIBUUID
+	${AR} rvs libcrossguid.a guid.o
+}
+
+do_install() {
+	install -D -m 0644 ${B}/libcrossguid.a ${D}${libdir}/libcrossguid.a
+	install -D -m 0644 ${S}/guid.h ${D}${includedir}/guid.h
+}
diff --git a/import-layers/meta-openembedded/meta-networking/MAINTAINERS b/import-layers/meta-openembedded/meta-networking/MAINTAINERS
index 8e6e3a0..771c73c 100644
--- a/import-layers/meta-openembedded/meta-networking/MAINTAINERS
+++ b/import-layers/meta-openembedded/meta-networking/MAINTAINERS
@@ -2,15 +2,15 @@
 
 Please submit any patches against meta-networking to the OpenEmbedded
 development mailing list (openembedded-devel@lists.openembedded.org) with
-'[meta-networking][pyro]' in the subject.
+'[meta-networking][rocko]' in the subject.
 
 When sending single patches, please use something like:
 
    git send-email -1 -M \
         --to openembedded-devel@lists.openembedded.org \
-        --subject-prefix=meta-networking][pyro][PATCH
+        --subject-prefix=meta-networking][rocko][PATCH
 
-pyro Branch Maintainer:
+rocko Branch Maintainer:
 Armin Kuster <akuster808@gmail.com>
 
 You may also contact the maintainers directly.
diff --git a/import-layers/meta-openembedded/meta-networking/conf/distro/include/meta_networking_security_flags.inc b/import-layers/meta-openembedded/meta-networking/conf/distro/include/meta_networking_security_flags.inc
deleted file mode 100644
index 19e13ea..0000000
--- a/import-layers/meta-openembedded/meta-networking/conf/distro/include/meta_networking_security_flags.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-# configure righteously complains:
-# | configure:3479: using CFLAGS:  -O2 -pipe -g -feliminate-unused-debug-types -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2
-# | configure:3485: CFLAGS error: CFLAGS may only be used to specify C compiler flags, not macro definitions. Use CPPFLAGS for: -D_FORTIFY_SOURCE=2
-# | configure:3516: error: Can not continue. Fix errors mentioned immediately above this line.
-
-# Make sure it's at least empty in builds which don't include
-# conf/distro/include/security_flags.inc
-lcl_maybe_fortify ?= ""
-TARGET_CFLAGS_remove_pn-c-ares = "${lcl_maybe_fortify}"
-TARGET_CPPFLAGS_append_pn-c-ares = "${lcl_maybe_fortify}"
diff --git a/import-layers/meta-openembedded/meta-networking/conf/layer.conf b/import-layers/meta-openembedded/meta-networking/conf/layer.conf
index b5aa159..2dfde4b 100644
--- a/import-layers/meta-openembedded/meta-networking/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-networking/conf/layer.conf
@@ -19,9 +19,6 @@
 
 LICENSE_PATH += "${LAYERDIR}/licenses"
 
-# Override security flags
-require conf/distro/include/meta_networking_security_flags.inc
-
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
   wireguard-tools->wireguard-module \
 "
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
index 47cb163..ec35175 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
@@ -29,3 +29,7 @@
 SRC_URI[sha256sum] = "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb"
 
 inherit autotools
+
+DISABLE_STATIC = ""
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch
new file mode 100644
index 0000000..db8caab
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch
@@ -0,0 +1,28 @@
+From 66e8bcdcca8971b5c43c31755d56d7f675d8b5ff Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Jun 2017 20:10:49 -0700
+Subject: [PATCH] rlm_mschap: Use includedir instead of hardcoding /usr/include
+
+OE QA flags it correctly as a voilation of cross compilation
+namespace
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/modules/rlm_mschap/configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: freeradius-server-3.0.14/src/modules/rlm_mschap/configure.ac
+===================================================================
+--- freeradius-server-3.0.14.orig/src/modules/rlm_mschap/configure.ac
++++ freeradius-server-3.0.14/src/modules/rlm_mschap/configure.ac
+@@ -72,7 +72,7 @@ if test x$with_[]modname != xno; then
+         mod_ldflags="-framework DirectoryService"
+     fi
+ 
+-    smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
++    smart_try_dir="$winbind_include_dir =/usr/include/samba-4.0"
+     FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h>
+ 					#include <stdbool.h>])
+     if test "x$ac_cv_header_wbclient_h" != "xyes"; then
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius
new file mode 100644
index 0000000..fa412e2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius
@@ -0,0 +1,110 @@
+#!/bin/sh
+# Start/stop the FreeRADIUS daemon.
+
+### BEGIN INIT INFO
+# Provides:          freeradius
+# Required-Start:    $remote_fs $network $syslog
+# Should-Start:      $time mysql slapd postgresql samba krb5-kdc
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Radius Daemon
+# Description:       Extensible, configurable radius daemon
+### END INIT INFO
+
+set -e
+
+# Source function library.
+. /etc/init.d/functions
+
+if [ -f /lib/lsb/init-functions ]; then
+  . /lib/lsb/init-functions
+fi
+
+PROG="radiusd"
+PROGRAM="/usr/sbin/radiusd"
+PIDFILE="/var/run/radiusd/radiusd.pid"
+DESCR="FreeRADIUS daemon"
+
+if [ -r /etc/default/$PROG ]; then
+  . /etc/default/$PROG
+fi
+
+test -f $PROGRAM || exit 0
+
+check_certs() {
+	if [ ! -f /etc/raddb/certs/server.pem ]; then
+		echo -n "Creating certificates for freeradius..."
+		if sudo -u radiusd /etc/raddb/certs/bootstrap 1> /dev/null 2> /dev/null; then
+			echo "done"
+		else
+			echo "failed!"
+		fi
+	fi
+
+}
+
+# /var/run may be a tmpfs
+if [ ! -d /var/run/radiusd ]; then
+  mkdir -p /var/run/radiusd
+  chown radiusd:radiusd /var/run/radiusd
+fi
+
+if [ ! -d /var/log/radius ]; then
+  mkdir -p /var/log/radius
+  touch /var/log/radius/radius.log
+  chown radiusd:radiusd /var/run/radius
+fi
+
+if [ ! -f ${PIDFILE} ]; then
+  touch ${PIDFILE}
+  chown radiusd:radiusd ${PIDFILE}
+fi
+
+export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
+
+ret=0
+
+case "$1" in
+        start)
+		check_certs
+                echo -n "Starting $DESCR" "$PROG"
+                start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM -- $FREERADIUS_OPTIONS || ret=$?
+                [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+                exit $ret
+                ;;
+        stop)
+                echo -n "Stopping $DESCR" "$PROG"
+                if [ -f "$PIDFILE" ] ; then
+                  start-stop-daemon --stop --retry=TERM/30/KILL/5 --quiet --pidfile $PIDFILE || ret=$?
+                else
+                  echo -n "$PIDFILE not found"
+                  ret=1
+                fi
+                [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+                ;;
+        status)
+                status $PROGRAM;
+                exit $?
+                ;;
+        restart)
+                $0 stop
+                $0 start
+                ;;
+        reload|force-reload)
+                echo -n "Reloading $DESCR" "$PROG"
+                if [ -f "$PIDFILE" ] ; then
+                  start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE || ret=$?
+                else
+                  echo -n "$PIDFILE not found"
+                  ret=1
+                fi
+                [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+                ;;
+        *)
+                echo "Usage: $0 start|stop|status|restart|force-reload|reload"
+                exit 1
+                ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
new file mode 100644
index 0000000..9c99766
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
@@ -0,0 +1,197 @@
+From dc41591d5ceb18900ec85894f8f7b7bb44bb3bd9 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 4 Jan 2016 01:44:04 -0500
+Subject: [PATCH] avoid searching host dirs
+
+Don't search the hardcoded host dirs to avoid
+host contamination.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ acinclude.m4                                                | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac        | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac   | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac      | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac      | 6 +++---
+ src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac     | 2 +-
+ src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac   | 4 ++--
+ 8 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index da48acc..b513ae1 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -178,7 +178,7 @@ if test "x$smart_lib" = "x"; then
+   FR_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}])
+   FR_LOCATE_DIR(smart_lib_dir,[lib$1.a])
+ 
+-  for try in $smart_lib_dir /usr/local/lib /opt/lib; do
++  for try in $smart_lib_dir; do
+     AC_MSG_CHECKING([for $2 in -l$1 in $try])
+     LIBS="-l$1 $old_LIBS"
+     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
+@@ -218,7 +218,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
+ old_CPPFLAGS="$CPPFLAGS"
+ smart_include=
+ dnl #  The default directories we search in (in addition to the compilers search path)
+-smart_include_dir="/usr/local/include /opt/include"
++smart_include_dir=
+ 
+ dnl #  Our local versions
+ _smart_try_dir=
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
+index 75c851a..a262d71 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ 		esac])
+ 
+ 	dnl Check for SQLConnect in -ldb2
+-	smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib"
++	smart_try_dir="$ibmdb2_lib_dir"
+ 	FR_SMART_CHECK_LIB(db2, SQLConnect)
+ 	if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then
+ 		fail="$fail libdb2"
+ 	fi
+ 
+ 	dnl Check for sqlcli.h
+-	smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include"
++	smart_try_dir="$ibmdb2_include_dir"
+ 	FR_SMART_CHECK_INCLUDE(sqlcli.h)
+ 	if test "x$ac_cv_header_sqlcli_h" != xyes; then
+ 		fail="$fail sqlcli.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
+index 4da57b3..752b043 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
+@@ -56,14 +56,14 @@ if test x$with_[]modname != xno; then
+ 		esac])
+ 
+ 	dnl Check for isc_attach_database in -lfbclient
+-	smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib"
++	smart_try_dir="$firebird_lib_dir"
+ 	FR_SMART_CHECK_LIB(fbclient, isc_attach_database)
+ 	if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then
+ 		fail="$fail libfbclient"
+ 	fi
+ 
+ 	dnl Check for ibase.h
+-	smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include"
++	smart_try_dir="$firebird_include_dir"
+ 	FR_SMART_CHECK_INCLUDE(ibase.h)
+ 	if test "x$ac_cv_header_ibase_h" != xyes; then
+ 		fail="$fail ibase.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
+index ba6304f..3393557 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ 		esac])
+ 
+ 	dnl Check for SQLConnect in -liodbc
+-	smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc"
++	smart_try_dir="$iodbc_lib_dir"
+ 	FR_SMART_CHECK_LIB(iodbc, SQLConnect)
+ 	if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then
+ 		fail="$fail libiodbc"
+ 	fi
+ 
+ 	dnl Check for isql.h
+-	smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include"
++	smart_try_dir="$iodbc_include_dir"
+ 	FR_SMART_CHECK_INCLUDE(isql.h)
+ 	if test "x$ac_cv_header_isql_h" != xyes; then
+ 		fail="$fail isql.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
+index 1401677..2e7db44 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
+@@ -136,7 +136,7 @@ if test x$with_[]modname != xno; then
+ 
+ 	dnl # Check for libmysqlclient_r
+ 	if test "x$have_a_libmysqlclient" != "xyes"; then
+-	    smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
++	    smart_try_dir="$mysql_lib_dir"
+ 	    FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init)
+ 	    if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then
+ 			have_a_libmysqlclient='yes'
+@@ -145,7 +145,7 @@ if test x$with_[]modname != xno; then
+ 
+ 	dnl # Check for libmysqlclient
+ 	if test "x$have_a_libmysqlclient" != "xyes"; then
+-	    smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
++	    smart_try_dir="$mysql_lib_dir"
+ 	    FR_SMART_CHECK_LIB(mysqlclient, mysql_init)
+ 	    if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then
+ 			have_a_libmysqlclient='yes'
+@@ -189,7 +189,7 @@ if test x$with_[]modname != xno; then
+     fi
+ 
+     if test "x$have_mysql_h" != "xyes"; then
+-		smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include"
++		smart_try_dir="$mysql_include_dir"
+ 		FR_SMART_CHECK_INCLUDE(mysql/mysql.h)
+ 		if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then
+ 	    	AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>])
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
+index 3178462..5cbc8c2 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
+@@ -63,7 +63,7 @@ if test x$with_[]modname != xno; then
+     dnl # Check for header files
+     dnl ############################################################
+ 
+-    smart_try_dir="$oracle_include_dir /usr/local/instaclient/include"
++    smart_try_dir="$oracle_include_dir"
+ 
+     if test "x$ORACLE_HOME" != "x"; then
+ 	smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
+index 4f9a890..e1cf811 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
+@@ -41,7 +41,7 @@ if test x$with_[]modname != xno; then
+ 	  esac ]
+ 	)
+ 
+-	smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql"
++	smart_try_dir="$rlm_sql_postgresql_include_dir"
+ 	FR_SMART_CHECK_INCLUDE(libpq-fe.h)
+ 	if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then
+ 		fail="$fail libpq-fe.h"
+@@ -76,7 +76,7 @@ if test x$with_[]modname != xno; then
+ 		  ])
+ 	fi
+ 
+-	smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib"
++	smart_try_dir="$rlm_sql_postgresql_lib_dir"
+ 	FR_SMART_CHECK_LIB(pq, PQconnectdb)
+ 	if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then
+ 		fail="$fail libpq"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
+index 3545387..c543ed4 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ 		esac])
+ 
+ 	dnl Check for SQLConnect in -lodbc
+-	smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib"
++	smart_try_dir="$unixodbc_lib_dir"
+ 	FR_SMART_CHECK_LIB(odbc, SQLConnect)
+ 	if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then
+ 		fail="$fail libodbc"
+ 	fi
+ 
+ 	dnl Check for sql.h
+-	smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include"
++	smart_try_dir="$unixodbc_include_dir"
+ 	FR_SMART_CHECK_INCLUDE(sql.h)
+ 	if test "x$ac_cv_header_sql_h" != xyes; then
+ 		fail="$fail sql.h"
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
new file mode 100644
index 0000000..71b7809
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
@@ -0,0 +1,70 @@
+From 74eed61dec8702c89f3e121d577ea9db25c961a4 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 11 Jan 2016 02:52:16 -0500
+Subject: [PATCH] configure.ac: add option for libcap
+
+Upstream-Status: Pending
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 37 ++++++++++++++++++++++++++++---------
+ 1 file changed, 28 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 066d3d7..6e4266b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -948,6 +948,23 @@ fi
+ dnl Set by FR_SMART_CHECKLIB
+ LIBS="${old_LIBS}"
+ 
++dnl #
++dnl #  extra argument: --with-libcap
++dnl #
++WITH_LIBCAP=yes
++AC_ARG_WITH(libcap,
++[  --with-licap          use licap for debugger checks. (default=yes)],
++[ case "$withval" in
++  no)
++    WITH_LIBCAP=no
++    ;;
++  *)
++    WITH_LIBCAP=yes
++    ;;
++  esac ]
++)
++
++
+ dnl Check for cap
+ dnl extra argument: --with-cap-lib-dir=DIR
+ cap_lib_dir=
+@@ -981,15 +998,17 @@ AC_ARG_WITH(cap-include-dir,
+       ;;
+   esac])
+ 
+-smart_try_dir="$cap_lib_dir"
+-FR_SMART_CHECK_LIB(cap, cap_get_proc)
+-if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
+-  AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
+-else
+-  AC_DEFINE(HAVE_LIBCAP, 1,
+-    [Define to 1 if you have the `cap' library (-lcap).]
+-  )
+-  HAVE_LIBCAP=1
++if test "x$WITH_LIBCAP" = xyes; then
++  smart_try_dir="$cap_lib_dir"
++  FR_SMART_CHECK_LIB(cap, cap_get_proc)
++  if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
++    AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
++  else
++    AC_DEFINE(HAVE_LIBCAP, 1,
++      [Define to 1 if you have the `cap' library (-lcap).]
++    )
++    HAVE_LIBCAP=1
++  fi
+ fi
+ 
+ VL_LIB_READLINE
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
new file mode 100644
index 0000000..30497a6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
@@ -0,0 +1,31 @@
+Subject: [PATCH] configure.ac: allow cross-compilation
+
+The checking OpenSSL library and header version consistency will
+always fail in cross compiling, skip the check and give a warning
+instead for cross compiling.
+
+Upstream-Status: Inappropriate[embedded specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/modules/rlm_krb5/configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac
+index eb43534..113a079 100644
+--- a/src/modules/rlm_krb5/configure.ac
++++ b/src/modules/rlm_krb5/configure.ac
+@@ -137,7 +137,8 @@ if test x$with_[]modname != xno; then
+ 		FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe)
+ 		if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" == xyes; then
+ 			AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])],
+-				[krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])])
++				[krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])],
++				[AC_MSG_WARN(cross compiling: not checking)])
+ 		fi
+ 	else
+ 		krb5threadsafe=""
+-- 
+2.10.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
new file mode 100644
index 0000000..4a62bf1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
@@ -0,0 +1,28 @@
+Enable and change user and group of freeradius server to radiusd
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ raddb/radiusd.conf.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in
+index c62f4ff..0b4a84e 100644
+--- a/raddb/radiusd.conf.in
++++ b/raddb/radiusd.conf.in
+@@ -436,8 +436,8 @@ security {
+ 	#  member.  This can allow for some finer-grained access
+ 	#  controls.
+ 	#
+-#	user = radius
+-#	group = radius
++	user = radiusd
++	group = radiusd
+ 
+ 	#  Core dumps are a bad thing.  This should only be set to
+ 	#  'yes' if you're debugging a problem with the server.
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
new file mode 100644
index 0000000..af1bff0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
@@ -0,0 +1,61 @@
+From 5b6d8b14f2696fcf1dca119212f9d0a0fa04defd Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Wed, 18 Jan 2017 14:59:39 +0800
+Subject: [PATCH] fix error for expansion of macro in thread.h
+
+The parameter declaration is missing in expansion of macro
+which cause the build error:
+| In file included from src/freeradius-devel/libradius.h:80:0,
+|                  from src/lib/log.c:26:
+| src/lib/log.c: In function '__fr_thread_local_destroy_fr_strerror_buffer':
+| src/lib/log.c:37:31: error: 'fr_strerror_buffer' undeclared (first use in this function)
+|  fr_thread_local_setup(char *, fr_strerror_buffer) /* macro */
+|                                ^
+
+Add the missing declaration in macro.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/include/threads.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/include/threads.h b/src/include/threads.h
+index e36d81d..2bcb6aa 100644
+--- a/src/include/threads.h
++++ b/src/include/threads.h
+@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ #  define fr_thread_local_get(_n) _n
+ #elif defined(HAVE_PTHREAD_H)
+ #  include <pthread.h>
+-#  define fr_thread_local_setup(_t, _n) \
++#  define fr_thread_local_setup(_t, _n) static __thread _t _n;\
+ static pthread_key_t __fr_thread_local_key_##_n;\
+ static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\
+ static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\
+@@ -100,17 +100,17 @@ static void __fr_thread_local_destroy_##_n(UNUSED void *unused)\
+ static void __fr_thread_local_key_init_##_n(void)\
+ {\
+ 	(void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\
+-	(void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ }\
+ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ {\
+ 	__fr_thread_local_destructor_##_n = func;\
+ 	if (_n) return _n; \
+ 	(void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
++	(void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ 	return _n;\
+ }
+-#  define fr_thread_local_init(_n, _f)			__fr_thread_local_init_##_n(_f)
+-#  define fr_thread_local_set(_n, _v)			__fr_thread_local_set_##_n(_v)
+-#  define fr_thread_local_get(_n)			__fr_thread_local_get_##_n()
++#  define fr_thread_local_init(_n, _f)	__fr_thread_local_init_##_n(_f)
++#  define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
++#  define fr_thread_local_get(_n) _n
+ #endif
+ #endif
+-- 
+2.10.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
new file mode 100644
index 0000000..d29b2ac
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
@@ -0,0 +1,236 @@
+From d8e251ef97869ab2c1c82bd374016f402083997c Mon Sep 17 00:00:00 2001
+From: Jorge Pereira <jpereiran@gmail.com>
+Date: Mon, 7 Dec 2015 16:51:07 -0200
+Subject: [PATCH] Fixing issues related to m4 include path
+
+Upstream-Status: Submitted [1]
+
+[1]: https://github.com/FreeRADIUS/freeradius-server/pull/1428
+
+Submmited by: Jorge Pereira <jpereiran@gmail.com>
+---
+ src/modules/rlm_example/config.h.in                | 39 ++--------------------
+ src/modules/rlm_ldap/configure                     |  2 +-
+ src/modules/rlm_pam/config.h.in                    |  3 ++
+ src/modules/rlm_perl/config.h.in                   |  3 ++
+ src/modules/rlm_perl/configure.ac                  |  2 +-
+ src/modules/rlm_radutmp/config.h.in                |  3 ++
+ src/modules/rlm_ruby/configure                     |  1 +
+ src/modules/rlm_ruby/configure.ac                  |  9 ++---
+ src/modules/rlm_smsotp/config.h.in                 |  3 ++
+ .../rlm_sql/drivers/rlm_sql_mysql/config.h.in      |  3 ++
+ src/modules/rlm_unix/config.h.in                   |  6 ++++
+ 11 files changed, 32 insertions(+), 42 deletions(-)
+
+diff --git a/src/modules/rlm_example/config.h.in b/src/modules/rlm_example/config.h.in
+index 2a81ef5..f80de9c 100644
+--- a/src/modules/rlm_example/config.h.in
++++ b/src/modules/rlm_example/config.h.in
+@@ -1,38 +1,5 @@
+ /* config.h.in.  Generated from configure.ac by autoheader.  */
+ 
+-/* Define to 1 if you have the <inttypes.h> header file. */
+-#undef HAVE_INTTYPES_H
+-
+-/* Define to 1 if you have the <memory.h> header file. */
+-#undef HAVE_MEMORY_H
+-
+-/* Define to 1 if you have the `printf' function. */
+-#undef HAVE_PRINTF
+-
+-/* Define to 1 if you have the <stdint.h> header file. */
+-#undef HAVE_STDINT_H
+-
+-/* Define to 1 if you have the <stdio.h> header file. */
+-#undef HAVE_STDIO_H
+-
+-/* Define to 1 if you have the <stdlib.h> header file. */
+-#undef HAVE_STDLIB_H
+-
+-/* Define to 1 if you have the <strings.h> header file. */
+-#undef HAVE_STRINGS_H
+-
+-/* Define to 1 if you have the <string.h> header file. */
+-#undef HAVE_STRING_H
+-
+-/* Define to 1 if you have the <sys/stat.h> header file. */
+-#undef HAVE_SYS_STAT_H
+-
+-/* Define to 1 if you have the <sys/types.h> header file. */
+-#undef HAVE_SYS_TYPES_H
+-
+-/* Define to 1 if you have the <unistd.h> header file. */
+-#undef HAVE_UNISTD_H
+-
+ /* Define to the address where bug reports for this package should be sent. */
+ #undef PACKAGE_BUGREPORT
+ 
+@@ -45,8 +12,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+ 
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+-
+-/* Define to 1 if you have the ANSI C header files. */
+-#undef STDC_HEADERS
+diff --git a/src/modules/rlm_ldap/configure b/src/modules/rlm_ldap/configure
+index e0c15d9..cdf96d5 100755
+--- a/src/modules/rlm_ldap/configure
++++ b/src/modules/rlm_ldap/configure
+@@ -3992,7 +3992,7 @@ smart_prefix=
+ $as_echo "#define WITH_SASL 1" >>confdefs.h
+ 
+ 	    SASL=sasl.c
+-          fi
++	  fi
+ 	fi
+ 
+ 	targetname=rlm_ldap
+diff --git a/src/modules/rlm_pam/config.h.in b/src/modules/rlm_pam/config.h.in
+index 32ef6ff..1ad20c5 100644
+--- a/src/modules/rlm_pam/config.h.in
++++ b/src/modules/rlm_pam/config.h.in
+@@ -45,6 +45,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+ 
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+ 
+diff --git a/src/modules/rlm_perl/config.h.in b/src/modules/rlm_perl/config.h.in
+index 989ed53..f80de9c 100644
+--- a/src/modules/rlm_perl/config.h.in
++++ b/src/modules/rlm_perl/config.h.in
+@@ -12,5 +12,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+ 
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+diff --git a/src/modules/rlm_perl/configure.ac b/src/modules/rlm_perl/configure.ac
+index 44c5fc9..6b2a043 100644
+--- a/src/modules/rlm_perl/configure.ac
++++ b/src/modules/rlm_perl/configure.ac
+@@ -3,7 +3,7 @@ AC_INIT(rlm_perl.c)
+ AC_REVISION($Revision$)
+ AC_DEFUN(modname,[rlm_perl])
+ 
+-m4_include([ax_with_prog.m4])
++m4_include([m4/ax_with_prog.m4])
+ 
+ if test x$with_[]modname != xno; then
+ 	AC_PROG_CC
+diff --git a/src/modules/rlm_radutmp/config.h.in b/src/modules/rlm_radutmp/config.h.in
+index 9a883cc..750b434 100644
+--- a/src/modules/rlm_radutmp/config.h.in
++++ b/src/modules/rlm_radutmp/config.h.in
+@@ -42,6 +42,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+ 
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+ 
+diff --git a/src/modules/rlm_ruby/configure b/src/modules/rlm_ruby/configure
+index 15868ab..c728af2 100755
+--- a/src/modules/rlm_ruby/configure
++++ b/src/modules/rlm_ruby/configure
+@@ -1875,6 +1875,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+ 
+ 
++
+ # ===========================================================================
+ #    http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
+ # ===========================================================================
+diff --git a/src/modules/rlm_ruby/configure.ac b/src/modules/rlm_ruby/configure.ac
+index 9306382..f1c8118 100644
+--- a/src/modules/rlm_ruby/configure.ac
++++ b/src/modules/rlm_ruby/configure.ac
+@@ -3,15 +3,16 @@ AC_INIT(rlm_ruby.c)
+ AC_REVISION($Revision: 1.9 $)
+ AC_DEFUN(modname,[rlm_ruby])
+ 
+-m4_include([ax_with_prog.m4])
++m4_include([m4/ax_with_prog.m4])
+ 
+ AC_DEFUN([AX_WITH_RUBY],[
+     AX_WITH_PROG([RUBY],[ruby],[not-found],[${PATH}:/usr/bin:/usr/local/bin])
+ ])
+ 
+-m4_include([ax_compare_version.m4])
+-m4_include([ax_prog_ruby_version.m4])
+-m4_include([ax_ruby_devel.m4])
++
++m4_include([m4/ax_compare_version.m4])
++m4_include([m4/ax_prog_ruby_version.m4])
++m4_include([m4/ax_ruby_devel.m4])
+ 
+ targetname=modname
+ mod_cflags=
+diff --git a/src/modules/rlm_smsotp/config.h.in b/src/modules/rlm_smsotp/config.h.in
+index 5feaf91..9e69f85 100644
+--- a/src/modules/rlm_smsotp/config.h.in
++++ b/src/modules/rlm_smsotp/config.h.in
+@@ -42,6 +42,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+ 
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+ 
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in b/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
+index e03d1a9..6262c48 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
+@@ -18,5 +18,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+ 
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+diff --git a/src/modules/rlm_unix/config.h.in b/src/modules/rlm_unix/config.h.in
+index dcb9aa2..70b4680 100644
+--- a/src/modules/rlm_unix/config.h.in
++++ b/src/modules/rlm_unix/config.h.in
+@@ -1,5 +1,8 @@
+ /* config.h.in.  Generated from configure.ac by autoheader.  */
+ 
++/* Define to 1 if you have the `getpwnam' function. */
++#undef HAVE_GETPWNAM
++
+ /* Define to 1 if you have the `getspnam' function. */
+ #undef HAVE_GETSPNAM
+ 
+@@ -54,6 +57,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+ 
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+ 
+-- 
+2.3.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
new file mode 100644
index 0000000..b0929c4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
@@ -0,0 +1,55 @@
+Fix quoting for BUILD_WITH
+
+The escaped quotes are to make the -D values produce strings which
+can be used to display these values. However, if the values are more
+than one word, with spaces, they also need shell quoting to make them
+into single words.
+
+Upstream-Status: Pending
+
+Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/main/libfreeradius-server.mk    | 2 +-
+ src/main/unittest.mk                | 2 +-
+ src/modules/rlm_eap/radeapclient.mk | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/main/libfreeradius-server.mk b/src/main/libfreeradius-server.mk
+index 4495f72..07c28f1 100644
+--- a/src/main/libfreeradius-server.mk
++++ b/src/main/libfreeradius-server.mk
+@@ -18,5 +18,5 @@ SOURCES	:=	conffile.c \
+ TGT_LDLIBS      := $(OPENSSL_LIBS)
+ 
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS	+= -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS	+= -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+diff --git a/src/main/unittest.mk b/src/main/unittest.mk
+index 09f3938..ed33952 100644
+--- a/src/main/unittest.mk
++++ b/src/main/unittest.mk
+@@ -21,5 +21,5 @@ TGT_PREREQS	+= libfreeradius-eap.a
+ endif
+ 
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS	+= -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS	+= -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+diff --git a/src/modules/rlm_eap/radeapclient.mk b/src/modules/rlm_eap/radeapclient.mk
+index 6068f54..7d3c556 100644
+--- a/src/modules/rlm_eap/radeapclient.mk
++++ b/src/modules/rlm_eap/radeapclient.mk
+@@ -23,7 +23,7 @@ SRC_CFLAGS += -DWITH_EAPCLIENT
+ SRC_INCDIRS  := ${top_srcdir}/src/modules/rlm_eap/libeap
+ 
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS	+= -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS	+= -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+ 
+ endif
+-- 
+2.10.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
new file mode 100644
index 0000000..4eb61ff
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
@@ -0,0 +1,89 @@
+From 56ef434e454bcc82c162a83d9bcb076d4fc72b7f Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 9 Jan 2014 14:30:26 +0800
+Subject: [PATCH] Fix libtool detection
+
+Upstream-Status: pending
+
+Use LT_INIT instead of the deprecated AC_PROG_LIBTOOL to detect libtool, so it
+can work with our libtoolize and libtool.
+
+Simplify the detection of ltdl. It will find the ltdl from the sysroot; the
+switch --with-system-libltdl is no longer needed. The code is copied from
+pulseaudio configure.ac, together with the comment paragraph.
+
+Also patch autogen.sh so it uses autoreconf, which handles libtoolize better.
+
+Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ autogen.sh   |  5 +----
+ configure.ac | 36 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 3418673..e42c3d5 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -5,10 +5,7 @@ parentdir=`dirname $0`
+ cd $parentdir
+ parentdir=`pwd`
+ 
+-libtoolize -f -c
+-#aclocal
+-autoheader
+-autoconf
++autoreconf -Wcross --verbose --install --force
+ 
+ mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`"
+ mysubdirs=`echo $mysubdirs`
+diff --git a/configure.ac b/configure.ac
+index e73e4ad..066d3d7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -205,6 +205,42 @@ dnl #  See if we have Git.
+ dnl #
+ AC_CHECK_PROG(GIT, git, yes, no)
+ 
++#### libtool stuff ####
++
++dnl set this shit so it doesn't force CFLAGS...
++LTCFLAGS=" "
++
++LT_PREREQ(2.2)
++LT_INIT([dlopen disable-static])
++
++dnl Unfortunately, even up to libtool 2.2.6a there is no way to know
++dnl exactly which version of libltdl is present in the system, so we
++dnl just assume that it's a working version as long as we have the
++dnl library and the header files.
++dnl
++dnl As an extra safety device, check for lt_dladvise_init() which is
++dnl only implemented in libtool 2.x, and refine as we go if we have
++dnl refined requirements.
++dnl
++dnl Check the header files first since the system may have a
++dnl libltdl.so for runtime, but no headers, and we want to bail out as
++dnl soon as possible.
++dnl
++dnl We don't need any special variable for this though, since the user
++dnl can give the proper place to find libltdl through the standard
++dnl variables like LDFLAGS and CPPFLAGS.
++
++AC_CHECK_HEADER([ltdl.h],
++    [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
++    [LIBLTDL=])
++
++AS_IF([test "x$LIBLTDL" = "x"],
++    [AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])])
++AC_SUBST([LIBLTDL])
++LTDL_SUBDIRS=
++INCLTDL=-DWITH_SYSTEM_LTDL
++AC_SUBST(LTDL_SUBDIRS)
++
+ dnl Put this in later, when all distributed modules use autoconf.
+ dnl AC_ARG_WITH(disablemodulefoo,
+ dnl [  --without-rlm_foo         Disables module compilation.  Module list:]
+-- 
+1.8.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
new file mode 100644
index 0000000..1954586
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
@@ -0,0 +1,160 @@
+From 16bf899447fc1524ffc3c79e1d35380e5285a552 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 7 Jan 2016 22:37:30 -0800
+Subject: [PATCH] libtool: do not use jlibtool
+
+jlibtool is hardcoded to be used but we need to use
+our libtool, so fix the makfiles to make it compatible
+with our libtool.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ Make.inc.in        |  4 ++--
+ scripts/boiler.mk  |  2 ++
+ scripts/install.mk | 14 +++++++-------
+ scripts/libtool.mk | 22 ++++++++++++++++------
+ 4 files changed, 27 insertions(+), 15 deletions(-)
+
+diff --git a/Make.inc.in b/Make.inc.in
+index 7a77625..fd8aa3e 100644
+--- a/Make.inc.in
++++ b/Make.inc.in
+@@ -57,7 +57,7 @@ CPPFLAGS	= @CPPFLAGS@
+ LIBPREFIX	= @LIBPREFIX@
+ EXEEXT		= @EXEEXT@
+ 
+-LIBTOOL		= JLIBTOOL
++LIBTOOL		= @LIBTOOL@
+ ACLOCAL		= @ACLOCAL@
+ AUTOCONF	= @AUTOCONF@
+ AUTOHEADER	= @AUTOHEADER@
+@@ -163,7 +163,7 @@ ANALYZE.c       := @clang_path@
+ #
+ ifeq "$(USE_SHARED_LIBS)" "yes"
+ 	TESTBINDIR = ./$(BUILD_DIR)/bin/local
+-	TESTBIN    =  FR_LIBRARY_PATH=./build/lib/.libs $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR)
++	TESTBIN    =  FR_LIBRARY_PATH=./build/lib/.libs $(LIBTOOL) --quiet --mode=execute $(TESTBINDIR)
+ else
+ 	TESTBINDIR = ./$(BUILD_DIR)/bin
+ 	TESTBIN    = ./$(BUILD_DIR)/bin
+diff --git a/scripts/boiler.mk b/scripts/boiler.mk
+index bccec5e..926a13e 100644
+--- a/scripts/boiler.mk
++++ b/scripts/boiler.mk
+@@ -266,6 +266,7 @@ define COMPILE_C_CMDS
+ 	$(Q)$(ECHO) CC $<
+ 	$(Q)$(strip ${COMPILE.c} -o $@ -c -MD ${CPPFLAGS} ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
+ 	    $(addprefix -I, ${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} $<)
++	${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
+ endef
+ else
+ #
+@@ -281,6 +282,7 @@ define COMPILE_C_CMDS
+ 	$(Q)cppcheck --enable=style -q ${CHECKFLAGS} $(filter -isystem%,${SRC_CFLAGS}) \
+ 	     $(filter -I%,${SRC_CFLAGS}) $(filter -D%,${SRC_CFLAGS}) ${INCDIRS} \
+ 	     $(addprefix -I,${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} --suppress=variableScope --suppress=invalidscanf $<
++	${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
+ endef
+ endif
+ 
+diff --git a/scripts/install.mk b/scripts/install.mk
+index 9164115..e38c1ed 100644
+--- a/scripts/install.mk
++++ b/scripts/install.mk
+@@ -46,7 +46,7 @@ define ADD_INSTALL_RULE.exe
+     install: $${${1}_INSTALLDIR}/$(notdir ${1})
+ 
+     # Install executable ${1}
+-    $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
++    $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ 	@$(ECHO) INSTALL ${1}
+ 	$(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/bin/${1} $${${1}_INSTALLDIR}/
+ 	$(Q)$${${1}_POSTINSTALL}
+@@ -65,7 +65,7 @@ define ADD_INSTALL_RULE.a
+     install: $${${1}_INSTALLDIR}/$(notdir ${1})
+ 
+     # Install static library ${1}
+-    $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} ${1} | $${${1}_INSTALLDIR}
++    $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} ${1} | $${${1}_INSTALLDIR}
+ 	@$(ECHO) INSTALL ${1}
+ 	$(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+ 	$(Q)$${${1}_POSTINSTALL}
+@@ -87,9 +87,9 @@ define ADD_INSTALL_RULE.la
+     install: $${${1}_INSTALLDIR}/$(notdir ${1})
+ 
+     # Install libtool library ${1}
+-    $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
++    $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ 	@$(ECHO) INSTALL ${1}
+-	$(Q)$${PROGRAM_INSTALL} -c -m 755 $${LOCAL_FLAGS_MIN} $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
++	$(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+ 	$(Q)$${${1}_POSTINSTALL}
+ 
+ endef
+@@ -107,7 +107,7 @@ define ADD_INSTALL_RULE.man
+     install: ${2}/$(notdir ${1})
+ 
+     # Install manual page ${1}
+-    ${2}/$(notdir ${1}): ${JLIBTOOL} ${1} | ${2}
++    ${2}/$(notdir ${1}): ${LIBTOOL} ${1} | ${2}
+ 	@$(ECHO) INSTALL $(notdir ${1})
+ 	$(Q)$${PROGRAM_INSTALL} -c -m 644 ${1} ${2}/
+ 
+@@ -122,9 +122,9 @@ endef
+ define ADD_INSTALL_RULE.dir
+     # Install directory
+     .PHONY: ${1}
+-    ${1}: ${JLIBTOOL}
++    ${1}: ${LIBTOOL}
+ 	@$(ECHO) INSTALL -d -m 755 ${1}
+-	$(Q)$${PROGRAM_INSTALL} -d -m 755 ${1}
++	$(Q)$${INSTALL} -d -m 755 ${1}
+ endef
+ 
+ 
+diff --git a/scripts/libtool.mk b/scripts/libtool.mk
+index 57915e1..2cb2f7d 100644
+--- a/scripts/libtool.mk
++++ b/scripts/libtool.mk
+@@ -55,7 +55,9 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
+     # Tell GNU Make to use this value, rather than anything specified
+     # on the command line.
+     override LIBTOOL := ${JLIBTOOL}
+-endif    # else we're not using jlibtool
++else    # else we're not using jlibtool
++    all install: ${LIBTOOL}
++endif
+ 
+ # When using libtool, it produces a '.libs' directory.  Ensure that it
+ # is removed on "make clean", too.
+@@ -69,11 +71,19 @@ clean: .libs_clean
+ # Re-define compilers and linkers
+ #
+ OBJ_EXT = lo
+-COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
+-COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
+-LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
+-LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
+-PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
++ifeq "${LIBTOOL}" "JLIBTOOL"
++    COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
++    COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
++    LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
++    LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
++    PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
++else
++    COMPILE.c = ${LIBTOOL} --mode=compile --tag=CC ${CC}
++    COMPILE.cxx = ${LIBTOOL} --mode=compile --tag=CC ${CXX}
++    LINK.c = ${LIBTOOL} --mode=link --tag=CC ${CC} -module -export-dynamic
++    LINK.cxx = ${LIBTOOL} --mode=link --tag=CC ${CXX} -module -export-dynamic
++    PROGRAM_INSTALL = ${LIBTOOL} --mode=install ${INSTALL}
++endif
+ 
+ 
+ # LIBTOOL_ENDINGS - Given a library ending in ".a" or ".so", replace that
+-- 
+2.10.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
new file mode 100644
index 0000000..675940d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
@@ -0,0 +1,33 @@
+From a0bf65e04d2bbd3271cab94bd5ac93f8e877bfc5 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 27 Jan 2016 05:07:19 -0500
+Subject: [PATCH] rlm_python: add PY_INC_DIR in search dir
+
+Upstream-Status: Pending
+
+configure option --with-rlm-python-include-dir is used to set
+PY_INC_DIR which is never used and it fails to find Python.h,
+so add it into search dir to fix it.
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/modules/rlm_python/configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/modules/rlm_python/configure.ac b/src/modules/rlm_python/configure.ac
+index 831a33a..c3792d8 100644
+--- a/src/modules/rlm_python/configure.ac
++++ b/src/modules/rlm_python/configure.ac
+@@ -93,7 +93,7 @@ if test x$with_[]modname != xno; then
+ 
+ 		old_CFLAGS=$CFLAGS
+ 		CFLAGS="$CFLAGS $PY_CFLAGS"
+-		smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION"
++		smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION $PY_INC_DIR"
+ 		FR_SMART_CHECK_INCLUDE(Python.h)
+ 		CFLAGS=$old_CFLAGS
+ 
+-- 
+2.10.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
new file mode 100644
index 0000000..fa62962
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
@@ -0,0 +1,2 @@
+d /var/log/radius  0755 radiusd radiusd -
+d /var/run/radiusd 0755 radiusd radiusd -
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
new file mode 100644
index 0000000..899c4e4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=FreeRADIUS high performance RADIUS server.
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=@STATEDIR@/run/radiusd/radiusd.pid
+ExecStartPre=-@BASE_BINDIR@/chown -R radiusd.radiusd @STATEDIR@/run/radiusd
+ExecStartPre=-@BASE_BINDIR@/sh -c "if [ ! -f @SYSCONFDIR@/raddb/certs/server.pem ]; then sudo -u radiusd @SYSCONFDIR@/raddb/certs/bootstrap; fi"
+ExecStartPre=@SBINDIR@/radiusd -C
+ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/raddb
+ExecReload=@SBINDIR@/radiusd -C
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
new file mode 100644
index 0000000..8cbdae8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d radiusd radiusd 0755 /var/run/radiusd none
+d radiusd radiusd 0755 /var/log/radius none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.15.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.15.bb
new file mode 100644
index 0000000..4155a40
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.15.bb
@@ -0,0 +1,222 @@
+DESCRIPTION = "FreeRADIUS is an Internet authentication daemon, which implements the RADIUS \
+protocol, as defined in RFC 2865 (and others). It allows Network Access \
+Servers (NAS boxes) to perform authentication for dial-up users. There are \
+also RADIUS clients available for Web servers, firewalls, Unix logins, and \
+more.  Using RADIUS allows authentication and authorization for a network to \
+be centralized, and minimizes the amount of re-configuration which has to be \
+done when adding or deleting new users."
+
+SUMMARY = "High-performance and highly configurable RADIUS server"
+HOMEPAGE = "http://www.freeradius.org/"
+SECTION = "System/Servers"
+LICENSE = "GPLv2 & LGPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
+DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc"
+
+SRC_URI = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${PV}.tar.bz2 \
+    file://freeradius \
+    file://volatiles.58_radiusd \
+    file://freeradius-enble-user-in-conf.patch \
+    file://freeradius-configure.ac-allow-cross-compilation.patch \
+    file://freeradius-fix-issues-related-to-m4-include-path.patch \
+    file://freeradius-libtool-detection.patch \
+    file://freeradius-configure.ac-add-option-for-libcap.patch \
+    file://freeradius-avoid-searching-host-dirs.patch \
+    file://freeradius-rlm_python-add-PY_INC_DIR.patch \
+    file://freeradius-libtool-do-not-use-jlibtool.patch \
+    file://freeradius-fix-quoting-for-BUILT_WITH.patch \
+    file://freeradius-fix-error-for-expansion-of-macro.patch \
+    file://0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch \
+    file://radiusd.service \
+    file://radiusd-volatiles.conf \
+"
+SRC_URI[md5sum] = "0c81a4464ccf1d04f7ef1218a029d37a"
+SRC_URI[sha256sum] = "23267d8505e7b2909f5bdbf3938ca077c1fe122290dc969304d4f3b594f7e3ba"
+
+PARALLEL_MAKE = ""
+
+S = "${WORKDIR}/freeradius-server-${PV}"
+
+EXTRA_OECONF = " --enable-strict-dependencies \
+        --with-docdir=${docdir}/freeradius-${PV} \
+        --with-openssl-includes=${STAGING_INCDIR} \
+        --with-openssl-libraries=${STAGING_LIBDIR} \
+        --without-rlm_ippool \
+        --without-rlm_cache_memcached \
+        --without-rlm_counter \
+        --without-rlm_couchbase \
+        --without-rlm_dbm \
+        --without-rlm_eap_tnc \
+        --without-rlm_eap_ikev2 \
+        --without-rlm_opendirectory \
+        --without-rlm_redis \
+        --without-rlm_rediswho \
+        --without-rlm_sql_db2 \
+        --without-rlm_sql_firebird \
+        --without-rlm_sql_freetds \
+        --without-rlm_sql_iodbc \
+        --without-rlm_sql_oracle \
+        --without-rlm_sql_sybase \
+        --without-rlm_sqlhpwippool \
+        ac_cv_path_PERL=${bindir}/perl \
+        ax_cv_cc_builtin_choose_expr=no \
+        ax_cv_cc_builtin_types_compatible_p=no \
+        ax_cv_cc_builtin_bswap64=no \
+        ax_cv_cc_bounded_attribute=no \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+                   pcre libcap \
+"
+
+PACKAGECONFIG[krb5] = "--with-rlm_krb5,--without-rlm_krb5,krb5"
+PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap"
+PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5"
+PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3"
+PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc"
+PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgresql,postgresql"
+PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
+PACKAGECONFIG[perl] = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl --with-rlm_perl,--without-rlm_perl,perl-native perl,perl"
+PACKAGECONFIG[python] = "--with-rlm_python --with-rlm-python-bin=${STAGING_BINDIR_NATIVE}/python-native/python --with-rlm-python-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python,python-native python"
+PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest,curl json-c"
+PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby"
+
+inherit useradd autotools-brokensep update-rc.d systemd
+
+# This is not a cpan or python based package, but it needs some definitions
+# from cpan-base and python-dir bbclasses for building rlm_perl and rlm_python
+# correctly.
+inherit cpan-base python-dir
+
+# The modules subdirs also need to be processed by autoreconf. Use autogen.sh
+# in order to handle the subdirs correctly.
+do_configure () {
+    ./autogen.sh
+
+    # the configure of rlm_perl needs this to get correct
+    # mod_cflags and mod_ldflags
+    if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then
+        export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+    fi
+
+    oe_runconf
+
+    # we don't need dhcpclient
+    sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk
+}
+
+INITSCRIPT_NAME = "radiusd"
+
+SYSTEMD_SERVICE_${PN} = "radiusd.service"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd"
+
+do_install() {
+    rm -rf ${D}
+    mkdir -p ${D}/${sysconfdir}/logrotate.d
+    mkdir -p ${D}/${sysconfdir}/pam.d
+    mkdir -p ${D}/${sysconfdir}/init.d
+    mkdir -p ${D}/${localstatedir}/lib/radiusd
+    mkdir -p ${D}${sysconfdir}/default/volatiles
+
+    export LD_LIBRARY_PATH=${D}/${libdir}
+    oe_runmake install R=${D} INSTALLSTRIP=""
+
+    # remove unsupported config files
+    rm -f ${D}/${sysconfdir}/raddb/experimental.conf
+
+    # remove scripts that required Perl(DBI)
+    rm -rf ${D}/${bindir}/radsqlrelay
+
+    cp -f ${WORKDIR}/freeradius ${D}/etc/init.d/radiusd
+    rm -f ${D}/${sbindir}/rc.radiusd
+    chmod +x ${D}/${sysconfdir}/init.d/radiusd
+    rm -rf ${D}/${localstatedir}/run/
+    install -m 0644 ${WORKDIR}/volatiles.58_radiusd  ${D}${sysconfdir}/default/volatiles/58_radiusd
+
+    chown -R radiusd:radiusd ${D}/${sysconfdir}/raddb/
+    chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd
+
+    # For systemd
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/radiusd.service ${D}${systemd_unitdir}/system
+    sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+           -e 's,@SBINDIR@,${sbindir},g' \
+           -e 's,@STATEDIR@,${localstatedir},g' \
+           -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+           ${D}${systemd_unitdir}/system/radiusd.service
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d/
+        install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/
+    fi
+}
+
+# This is only needed when we install/update on a running target.
+#
+pkg_postinst_${PN} () {
+    if [ -z "$D" ]; then
+        if command -v systemd-tmpfiles >/dev/null; then
+            # create /var/log/radius, /var/run/radiusd
+            systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd-volatiles.conf
+        elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+            ${sysconfdir}/init.d/populate-volatile.sh update
+        fi
+
+        # Fix ownership for /etc/raddb/*, /var/lib/radiusd
+        chown -R radiusd:radiusd ${sysconfdir}/raddb
+        chown -R radiusd:radiusd ${localstatedir}/lib/radiusd
+    fi
+}
+
+# We really need the symlink :(
+INSANE_SKIP_${PN} = "dev-so"
+INSANE_SKIP_${PN}-krb5 = "dev-so"
+INSANE_SKIP_${PN}-ldap = "dev-so"
+INSANE_SKIP_${PN}-mysql = "dev-so"
+INSANE_SKIP_${PN}-perl = "dev-so"
+INSANE_SKIP_${PN}-postgresql = "dev-so"
+INSANE_SKIP_${PN}-python = "dev-so"
+INSANE_SKIP_${PN}-unixodbc = "dev-so"
+
+PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \
+    ${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc"
+
+FILES_${PN}-utils = "${bindir}/*"
+
+FILES_${PN}-ldap = "${libdir}/rlm_ldap.so* \
+    ${sysconfdir}/raddb/mods-available/ldap \
+"
+
+FILES_${PN}-krb5 = "${libdir}/rlm_krb5.so* \
+    ${sysconfdir}/raddb/mods-available/krb5 \
+"
+
+FILES_${PN}-perl = "${libdir}/rlm_perl.so* \
+    ${sysconfdir}/raddb/mods-config/perl \
+    ${sysconfdir}/raddb/mods-available/perl \
+"
+
+FILES_${PN}-python = "${libdir}/rlm_python.so* \
+    ${sysconfdir}/raddb/mods-config/python \
+    ${sysconfdir}/raddb/mods-available/python \
+"
+
+FILES_${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \
+    ${sysconfdir}/raddb/mods-config/sql/*/mysql \
+    ${sysconfdir}/raddb/mods-available/sql \
+"
+
+FILES_${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \
+    ${sysconfdir}/raddb/mods-config/sql/*/postgresql \
+"
+
+FILES_${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*"
+
+FILES_${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*"
+
+RDEPENDS_${PN} += "perl"
+RDEPENDS_${PN}-utils = "${PN}"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
index f48b655..e579de5 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
@@ -13,3 +13,4 @@
 
 acpaths = "-I ./config/"
 
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb
new file mode 100644
index 0000000..c6f36e1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Lightweight UPnP IGD daemon"
+DESCRIPTION = "The miniUPnP daemon is an UPnP IGD (internet gateway device) \
+which provide NAT traversal services to any UPnP enabled client on \
+the network."
+
+SECTION = "networking"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=aa71c78c373ccfe0ff207af0cd966d91"
+
+inherit autotools gettext pkgconfig
+
+DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack"
+
+SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${P}.tar.gz;downloadfilename=${P}.tar.gz \
+"
+SRC_URI[md5sum] = "1c07a215dd9b362e75a9efc05e2fb3b4"
+SRC_URI[sha256sum] = "d96aa3a00e0f5490826bba3cb97e68cd27479e5839adac4b9bcb66eae786bfb7"
+
+IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}"
+
+do_compile() {
+    cd ${S}
+    CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux
+}
+
+do_install() {
+    install -d ${D}/${sbindir}
+    install ${S}/miniupnpd ${D}/${sbindir}
+    install -d ${D}/${sysconfdir}/${BPN}
+    install ${S}/netfilter/iptables_init.sh ${D}/${sysconfdir}/${BPN}
+    install ${S}/netfilter/iptables_removeall.sh ${D}/${sysconfdir}/${BPN}
+    install ${S}/netfilter/ip6tables_init.sh ${D}/${sysconfdir}/${BPN}
+    install ${S}/netfilter/ip6tables_removeall.sh ${D}/${sysconfdir}/${BPN}
+    install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN}
+    install -d ${D}/${sysconfdir}/init.d
+    install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch
new file mode 100644
index 0000000..bd194a6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch
@@ -0,0 +1,621 @@
+From: Sjoerd Simons <sjoerd@luon.net>
+Date: Sun, 21 Aug 2016 21:46:02 +0200
+Subject: [PATCH] dns/resolved: add systemd-resolved backend
+
+Add initial DNS backend that pushes DNS information into
+systemd-resolved. Backend is choosen by default if the systems
+resolv.conv is setup to pointing to one of the standard resolved
+locations.
+
+This doesn't handle global dns configuration.
+
+Signed-off-by: Sjoerd Simons <sjoerd@luon.net>
+
+https://bugzilla.gnome.org/show_bug.cgi?id=762540
+
+Upstream-Status: Backport
+
+---
+ man/NetworkManager.conf.xml               |  10 +-
+ src/Makefile.am                           |   2 +
+ src/dns-manager/nm-dns-manager.c          |  43 ++-
+ src/dns-manager/nm-dns-systemd-resolved.c | 427 ++++++++++++++++++++++++++++++
+ src/dns-manager/nm-dns-systemd-resolved.h |  45 ++++
+ 5 files changed, 523 insertions(+), 4 deletions(-)
+ create mode 100644 src/dns-manager/nm-dns-systemd-resolved.c
+ create mode 100644 src/dns-manager/nm-dns-systemd-resolved.h
+
+diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml
+index 6295b82..0a67ae5 100644
+--- a/man/NetworkManager.conf.xml
++++ b/man/NetworkManager.conf.xml
+@@ -275,10 +275,12 @@ no-auto-default=*
+       <varlistentry>
+         <term><varname>dns</varname></term>
+         <listitem><para>Set the DNS (<filename>resolv.conf</filename>) processing mode.</para>
+-        <para><literal>default</literal>: The default if the key is
+-        not specified. NetworkManager will update
++        <para><literal>default</literal>: NetworkManager will update
+         <filename>resolv.conf</filename> to reflect the nameservers
+-        provided by currently active connections.</para>
++        provided by currently active connections.  This is the default
++        if the key is not specified, unless the system is configured
++        to use systemd-resolved; in this case the default is
++        <literal>systemd-resolved</literal></para>
+         <para><literal>dnsmasq</literal>: NetworkManager will run
+         dnsmasq as a local caching nameserver, using a "split DNS"
+         configuration if you are connected to a VPN, and then update
+@@ -288,6 +290,8 @@ no-auto-default=*
+         to unbound and dnssec-triggerd, providing a "split DNS"
+         configuration with DNSSEC support. The <filename>/etc/resolv.conf</filename>
+         will be managed by dnssec-trigger daemon.</para>
++        <para><literal>systemd-resolved</literal>: NetworkManager will
++        push the DNS configuration to systemd-resolved</para>
+         <para><literal>none</literal>: NetworkManager will not
+         modify resolv.conf. This implies
+         <literal>rc-manager</literal>&nbsp;<literal>unmanaged</literal></para>
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8d29b19..10f63de 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -345,6 +345,8 @@ libNetworkManager_la_SOURCES = \
+ 	\
+ 	dns-manager/nm-dns-dnsmasq.c \
+ 	dns-manager/nm-dns-dnsmasq.h \
++	dns-manager/nm-dns-systemd-resolved.c \
++	dns-manager/nm-dns-systemd-resolved.h \
+ 	dns-manager/nm-dns-unbound.c \
+ 	dns-manager/nm-dns-unbound.h \
+ 	dns-manager/nm-dns-manager.c \
+diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
+index 5a758a9..38bc786 100644
+--- a/src/dns-manager/nm-dns-manager.c
++++ b/src/dns-manager/nm-dns-manager.c
+@@ -45,6 +45,7 @@
+ 
+ #include "nm-dns-plugin.h"
+ #include "nm-dns-dnsmasq.h"
++#include "nm-dns-systemd-resolved.h"
+ #include "nm-dns-unbound.h"
+ 
+ #if WITH_LIBSOUP
+@@ -1588,6 +1589,37 @@ _check_resconf_immutable (NMDnsManagerResolvConfManager rc_manager)
+ 
+ NM_DEFINE_SINGLETON_GETTER (NMDnsManager, nm_dns_manager_get, NM_TYPE_DNS_MANAGER);
+ 
++static gboolean
++_resolvconf_resolved_managed (void)
++{
++	static const char *const resolved_paths[] = {
++		"/run/systemd/resolve/resolv.conf",
++		"/lib/systemd/resolv.conf",
++		"/usr/lib/systemd/resolv.conf",
++	};
++	GFile *f;
++	GFileInfo *info;
++	gboolean ret = FALSE;
++
++	f = g_file_new_for_path (_PATH_RESCONF);
++	info = g_file_query_info (f,
++	                          G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK","\
++	                          G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET,
++	                          G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
++	                          NULL, NULL);
++
++	if (info && g_file_info_get_is_symlink (info)) {
++		ret = _nm_utils_strv_find_first ((gchar **) resolved_paths,
++		                                 G_N_ELEMENTS (resolved_paths),
++		                                 g_file_info_get_symlink_target (info)) >= 0;
++	}
++
++	g_clear_object(&info);
++	g_clear_object(&f);
++
++	return ret;
++}
++
+ static void
+ init_resolv_conf_mode (NMDnsManager *self, gboolean force_reload_plugin)
+ {
+@@ -1633,7 +1665,16 @@ again:
+ 
+ 	rc_manager = _check_resconf_immutable (rc_manager);
+ 
+-	if (nm_streq0 (mode, "dnsmasq")) {
++	if (   (!mode && _resolvconf_resolved_managed ())
++	    || nm_streq0 (mode, "systemd-resolved")) {
++		if (   force_reload_plugin
++		    || !NM_IS_DNS_SYSTEMD_RESOLVED (priv->plugin)) {
++			_clear_plugin (self);
++			priv->plugin = nm_dns_systemd_resolved_new ();
++			plugin_changed = TRUE;
++		}
++		mode = "systemd-resolved";
++	} else if (nm_streq0 (mode, "dnsmasq")) {
+ 		if (force_reload_plugin || !NM_IS_DNS_DNSMASQ (priv->plugin)) {
+ 			_clear_plugin (self);
+ 			priv->plugin = nm_dns_dnsmasq_new ();
+diff --git a/src/dns-manager/nm-dns-systemd-resolved.c b/src/dns-manager/nm-dns-systemd-resolved.c
+new file mode 100644
+index 0000000..6bdd5f6
+--- /dev/null
++++ b/src/dns-manager/nm-dns-systemd-resolved.c
+@@ -0,0 +1,427 @@
++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
++/*
++ * Copyright (C) 2010 Dan Williams <dcbw@redhat.com>
++ * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ */
++
++#include "nm-default.h"
++
++#include "nm-dns-systemd-resolved.h"
++
++#include <stdlib.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/wait.h>
++#include <arpa/inet.h>
++#include <sys/stat.h>
++#include <linux/if.h>
++
++#include "nm-core-internal.h"
++#include "nm-platform.h"
++#include "nm-utils.h"
++#include "nm-ip4-config.h"
++#include "nm-ip6-config.h"
++#include "nm-bus-manager.h"
++#include "nm-manager.h"
++#include "nm-device.h"
++#include "NetworkManagerUtils.h"
++
++G_DEFINE_TYPE (NMDnsSystemdResolved, nm_dns_systemd_resolved, NM_TYPE_DNS_PLUGIN)
++
++#define NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE(o) \
++  (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DNS_SYSTEMD_RESOLVED, \
++    NMDnsSystemdResolvedPrivate))
++
++#define SYSTEMD_RESOLVED_DBUS_SERVICE "org.freedesktop.resolve1"
++#define SYSTEMD_RESOLVED_DBUS_PATH "/org/freedesktop/resolve1"
++
++typedef struct {
++	int ifindex;
++	GList *configs;
++} InterfaceConfig;
++
++typedef struct {
++	GDBusProxy *resolve;
++	GCancellable *init_cancellable;
++	GCancellable *update_cancellable;
++	GQueue dns_updates;
++	GQueue domain_updates;
++} NMDnsSystemdResolvedPrivate;
++
++/*****************************************************************************/
++
++#define _NMLOG_DOMAIN         LOGD_DNS
++#define _NMLOG_PREFIX_NAME    "systemd-resolved"
++#define _NMLOG(level, ...) \
++    G_STMT_START { \
++        nm_log ((level), _NMLOG_DOMAIN, \
++                "%s[%p]: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
++                _NMLOG_PREFIX_NAME, \
++                (self) \
++                _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
++    } G_STMT_END
++
++/*****************************************************************************/
++
++static void
++call_done (GObject *source, GAsyncResult *r, gpointer user_data)
++{
++	GVariant *v;
++	GError *error = NULL;
++	NMDnsSystemdResolved *self = (NMDnsSystemdResolved *) user_data;
++
++	v = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), r, &error);
++
++	if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
++		return;
++
++	if (error != NULL) {
++		_LOGW ("Failed: %s\n", error->message);
++		g_error_free (error);
++	}
++}
++
++static void
++add_interface_configuration (NMDnsSystemdResolved *self,
++                             GArray *interfaces,
++                             const NMDnsIPConfigData *data)
++{
++	int i;
++	InterfaceConfig *ic = NULL;
++	int ifindex;
++	NMDevice *device;
++
++	if (NM_IS_IP4_CONFIG (data->config))
++		ifindex = nm_ip4_config_get_ifindex (data->config);
++	else if (NM_IS_IP6_CONFIG  (data->config))
++		ifindex = nm_ip6_config_get_ifindex (data->config);
++	else
++		g_return_if_reached ();
++
++	device = nm_manager_get_device_by_ifindex (nm_manager_get (), ifindex);
++
++	if (!nm_device_get_managed (device, FALSE))
++		return;
++
++	for (i = 0; i < interfaces->len; i++) {
++		InterfaceConfig *tic = &g_array_index (interfaces, InterfaceConfig, i);
++		if (ifindex == tic->ifindex) {
++			ic = tic;
++			break;
++		}
++	}
++
++	if (!ic) {
++		g_array_set_size (interfaces, interfaces->len + 1);
++		ic = &g_array_index (interfaces, InterfaceConfig,
++		                     interfaces->len - 1);
++		ic->ifindex = ifindex;
++	}
++
++	ic->configs = g_list_append (ic->configs, data->config);
++}
++
++static void
++add_domain (GVariantBuilder *domains,
++            const char *domain,
++            gboolean never_default)
++{
++	/* If this link is never the default (e.g. only used for resources on this
++	 * network) add a routing domain. */
++	g_variant_builder_add (domains, "(sb)", domain, never_default);
++}
++
++static void
++update_add_ip6_config (NMDnsSystemdResolved *self,
++                       GVariantBuilder *dns,
++                       GVariantBuilder *domains,
++                       const NMIP6Config *config)
++{
++	guint i, n;
++
++	n = nm_ip6_config_get_num_nameservers (config);
++	for (i = 0 ; i < n; i++) {
++		const struct in6_addr *ip;
++
++		g_variant_builder_open (dns, G_VARIANT_TYPE ("(iay)"));
++		g_variant_builder_add (dns, "i", AF_INET6);
++		ip = nm_ip6_config_get_nameserver (config, i),
++
++		g_variant_builder_add_value (dns, g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, ip, 16, 1));
++		g_variant_builder_close (dns);
++	}
++
++	n = nm_ip6_config_get_num_searches (config);
++	if (n > 0) {
++		for (i = 0; i < n; i++) {
++			add_domain (domains, nm_ip6_config_get_search (config, i),
++			            nm_ip6_config_get_never_default (config));
++		}
++	} else {
++		n = nm_ip6_config_get_num_domains (config);
++		for (i = 0; i < n; i++) {
++			add_domain (domains, nm_ip6_config_get_domain (config, i),
++			            nm_ip6_config_get_never_default (config));
++		}
++	}
++}
++
++static void
++update_add_ip4_config (NMDnsSystemdResolved *self,
++                       GVariantBuilder *dns,
++                       GVariantBuilder *domains,
++                       const NMIP4Config *config)
++{
++	guint i, n;
++
++	n = nm_ip4_config_get_num_nameservers (config);
++	for (i = 0 ; i < n; i++) {
++		guint32 ns;
++
++		g_variant_builder_open (dns, G_VARIANT_TYPE ("(iay)"));
++		g_variant_builder_add (dns, "i", AF_INET);
++		ns = nm_ip4_config_get_nameserver (config, i),
++
++		g_variant_builder_add_value (dns, g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, &ns, 4, 1));
++		g_variant_builder_close (dns);
++	}
++
++	n = nm_ip4_config_get_num_searches (config);
++	if (n  > 0) {
++		for (i = 0; i < n; i++) {
++			add_domain (domains, nm_ip4_config_get_search (config, i),
++			            nm_ip4_config_get_never_default (config));
++		}
++	} else {
++		n = nm_ip4_config_get_num_domains (config);
++		for (i = 0; i < n; i++) {
++			add_domain (domains, nm_ip4_config_get_domain (config, i),
++			            nm_ip4_config_get_never_default (config));
++		}
++	}
++}
++
++static void
++free_pending_updates (NMDnsSystemdResolved *self)
++{
++	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
++	GVariant *v;
++
++	while ((v = g_queue_pop_head (&priv->dns_updates)) != NULL)
++		g_variant_unref (v);
++
++	while ((v = g_queue_pop_head (&priv->domain_updates)) != NULL)
++		g_variant_unref (v);
++}
++
++static void
++prepare_one_interface (NMDnsSystemdResolved *self, InterfaceConfig *ic)
++{
++	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
++	GVariantBuilder dns, domains;
++	GList *l;
++
++	g_variant_builder_init (&dns, G_VARIANT_TYPE ("(ia(iay))"));
++	g_variant_builder_add (&dns, "i", ic->ifindex);
++	g_variant_builder_open (&dns, G_VARIANT_TYPE ("a(iay)"));
++
++	g_variant_builder_init (&domains, G_VARIANT_TYPE ("(ia(sb))"));
++	g_variant_builder_add (&domains, "i", ic->ifindex);
++	g_variant_builder_open (&domains, G_VARIANT_TYPE ("a(sb)"));
++
++	for (l = ic->configs ; l != NULL ; l = g_list_next (l)) {
++		if (NM_IS_IP4_CONFIG (l->data))
++			update_add_ip4_config (self, &dns, &domains, l->data);
++		else if (NM_IS_IP6_CONFIG (l->data))
++			update_add_ip6_config (self, &dns, &domains, l->data);
++		else
++			g_assert_not_reached ();
++	}
++	g_variant_builder_close (&dns);
++	g_variant_builder_close (&domains);
++
++	g_queue_push_tail (&priv->dns_updates,
++	                   g_variant_ref_sink (g_variant_builder_end (&dns)));
++	g_queue_push_tail (&priv->domain_updates,
++	                   g_variant_ref_sink (g_variant_builder_end (&domains)));
++}
++
++static void
++send_updates (NMDnsSystemdResolved *self)
++{
++	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
++	GVariant *v;
++
++	nm_clear_g_cancellable (&priv->update_cancellable);
++
++	if (!priv->resolve)
++		return;
++
++	priv->update_cancellable = g_cancellable_new ();
++
++	while ((v = g_queue_pop_head (&priv->dns_updates)) != NULL) {
++		g_dbus_proxy_call (priv->resolve, "SetLinkDNS", v,
++		                   G_DBUS_CALL_FLAGS_NONE,
++		                   -1, priv->update_cancellable, call_done, self);
++		g_variant_unref (v);
++	}
++
++	while ((v = g_queue_pop_head (&priv->domain_updates)) != NULL) {
++		g_dbus_proxy_call (priv->resolve, "SetLinkDomains", v,
++		                   G_DBUS_CALL_FLAGS_NONE,
++		                   -1, priv->update_cancellable, call_done, self);
++		g_variant_unref (v);
++	}
++}
++
++static gboolean
++update (NMDnsPlugin *plugin,
++        const NMDnsIPConfigData **configs,
++        const NMGlobalDnsConfig *global_config,
++        const char *hostname)
++{
++	NMDnsSystemdResolved *self = NM_DNS_SYSTEMD_RESOLVED (plugin);
++	GArray *interfaces = g_array_new (TRUE, TRUE, sizeof (InterfaceConfig));
++	const NMDnsIPConfigData **c;
++	int i;
++
++	for (c = configs; *c != NULL; c++)
++		add_interface_configuration (self, interfaces, *c);
++
++	free_pending_updates (self);
++
++	for (i = 0; i < interfaces->len; i++) {
++		InterfaceConfig *ic = &g_array_index (interfaces, InterfaceConfig, i);
++
++		prepare_one_interface (self, ic);
++		g_list_free (ic->configs);
++	}
++
++	g_array_free (interfaces, TRUE);
++
++	send_updates (self);
++
++	return TRUE;
++}
++
++/****************************************************************/
++
++static gboolean
++is_caching (NMDnsPlugin *plugin)
++{
++	return TRUE;
++}
++
++static const char *
++get_name (NMDnsPlugin *plugin)
++{
++	return "systemd-resolved";
++}
++
++/****************************************************************/
++
++NMDnsPlugin *
++nm_dns_systemd_resolved_new (void)
++{
++	return g_object_new (NM_TYPE_DNS_SYSTEMD_RESOLVED, NULL);
++}
++
++static void
++resolved_proxy_created (GObject *source, GAsyncResult *r, gpointer user_data)
++{
++	NMDnsSystemdResolved *self = (NMDnsSystemdResolved *) user_data;
++	NMDnsSystemdResolvedPrivate *priv;
++	gs_free_error GError *error = NULL;
++	GDBusProxy *resolve;
++
++	resolve = g_dbus_proxy_new_finish (r, &error);
++	if (   !resolve
++	    && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
++		return;
++
++	priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
++	g_clear_object (&priv->init_cancellable);
++	if (!resolve) {
++		_LOGW ("failed to connect to resolved via DBus: %s", error->message);
++		g_signal_emit_by_name (self, NM_DNS_PLUGIN_FAILED);
++		return;
++	}
++
++	priv->resolve = resolve;
++	send_updates (self);
++}
++
++
++static void
++nm_dns_systemd_resolved_init (NMDnsSystemdResolved *self)
++{
++	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
++	NMBusManager *dbus_mgr;
++	GDBusConnection *connection;
++
++	g_queue_init (&priv->dns_updates);
++	g_queue_init (&priv->domain_updates);
++
++	dbus_mgr = nm_bus_manager_get ();
++	g_return_if_fail (dbus_mgr);
++
++	connection = nm_bus_manager_get_connection (dbus_mgr);
++	g_return_if_fail (connection);
++
++	priv->init_cancellable = g_cancellable_new ();
++	g_dbus_proxy_new (connection,
++	                  G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
++	                  G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
++	                  NULL,
++	                  SYSTEMD_RESOLVED_DBUS_SERVICE,
++	                  SYSTEMD_RESOLVED_DBUS_PATH,
++	                  SYSTEMD_RESOLVED_DBUS_SERVICE ".Manager",
++	                  priv->init_cancellable,
++	                  resolved_proxy_created,
++	                  self);
++}
++
++static void
++dispose (GObject *object)
++{
++	NMDnsSystemdResolved *self = NM_DNS_SYSTEMD_RESOLVED (object);
++	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
++
++	free_pending_updates (self);
++	g_clear_object (&priv->resolve);
++	nm_clear_g_cancellable (&priv->init_cancellable);
++	nm_clear_g_cancellable (&priv->update_cancellable);
++
++	G_OBJECT_CLASS (nm_dns_systemd_resolved_parent_class)->dispose (object);
++}
++
++static void
++nm_dns_systemd_resolved_class_init (NMDnsSystemdResolvedClass *dns_class)
++{
++	NMDnsPluginClass *plugin_class = NM_DNS_PLUGIN_CLASS (dns_class);
++	GObjectClass *object_class = G_OBJECT_CLASS (dns_class);
++
++	g_type_class_add_private (dns_class, sizeof (NMDnsSystemdResolvedPrivate));
++
++	object_class->dispose = dispose;
++
++	plugin_class->is_caching = is_caching;
++	plugin_class->update = update;
++	plugin_class->get_name = get_name;
++}
++
+diff --git a/src/dns-manager/nm-dns-systemd-resolved.h b/src/dns-manager/nm-dns-systemd-resolved.h
+new file mode 100644
+index 0000000..45c64b3
+--- /dev/null
++++ b/src/dns-manager/nm-dns-systemd-resolved.h
+@@ -0,0 +1,45 @@
++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
++/* This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Copyright (C) 2010 Red Hat, Inc.
++ * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net>
++ */
++
++#ifndef __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__
++#define __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__
++
++#include "nm-dns-plugin.h"
++
++#define NM_TYPE_DNS_SYSTEMD_RESOLVED            (nm_dns_systemd_resolved_get_type ())
++#define NM_DNS_SYSTEMD_RESOLVED(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolved))
++#define NM_DNS_SYSTEMD_RESOLVED_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolvedClass))
++#define NM_IS_DNS_SYSTEMD_RESOLVED(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED))
++#define NM_IS_DNS_SYSTEMD_RESOLVED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DNS_SYSTEMD_RESOLVED))
++#define NM_DNS_SYSTEMD_RESOLVED_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolvedClass))
++
++typedef struct {
++	NMDnsPlugin parent;
++} NMDnsSystemdResolved;
++
++typedef struct {
++	NMDnsPluginClass parent;
++} NMDnsSystemdResolvedClass;
++
++GType nm_dns_systemd_resolved_get_type (void);
++
++NMDnsPlugin *nm_dns_systemd_resolved_new (void);
++
++#endif /* __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__ */
++
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch
new file mode 100644
index 0000000..ca7e4a4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch
@@ -0,0 +1,29 @@
+From 6f799f1f0e68cc7bf89c0a56aec5ecf46937619d Mon Sep 17 00:00:00 2001
+From: Ricardo Salveti <rsalveti@rsalveti.net>
+Date: Thu, 15 Jun 2017 10:02:38 -0300
+Subject: [PATCH] dns/resolved: also check for /etc/resolv-conf.systemd
+
+OE specific resolv.conf path, so it can be enabled by default if available.
+
+Upstream-Status: Inappropriate [OE config specific]
+
+Signed-off-by: Ricardo Salveti <rsalveti@rsalveti.net>
+---
+ src/dns-manager/nm-dns-manager.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
+index c1d2bf7..d70d4b4 100644
+--- a/src/dns-manager/nm-dns-manager.c
++++ b/src/dns-manager/nm-dns-manager.c
+@@ -1596,6 +1596,7 @@ _resolvconf_resolved_managed (void)
+ 		"/run/systemd/resolve/resolv.conf",
+ 		"/lib/systemd/resolv.conf",
+ 		"/usr/lib/systemd/resolv.conf",
++		"/etc/resolv-conf.systemd",
+ 	};
+ 	GFile *f;
+ 	GFileInfo *info;
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch
new file mode 100644
index 0000000..4234e2b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch
@@ -0,0 +1,29 @@
+From a9bfe6f2029d75caf28fcdf3e740843cf6359615 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 07:31:25 -0700
+Subject: [PATCH 1/2] systemd: xlocale.h is dropped by newer glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/systemd/src/basic/parse-util.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c
+index 9c21e5a..dd95d1f 100644
+--- a/src/systemd/src/basic/parse-util.c
++++ b/src/systemd/src/basic/parse-util.c
+@@ -25,11 +25,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#ifdef __GLIBC__
+-#include <xlocale.h>
+-#else
+ #include <locale.h>
+-#endif
+ #include "alloc-util.h"
+ #include "extract-word.h"
+ #include "macro.h"
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch
new file mode 100644
index 0000000..e32b5c0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch
@@ -0,0 +1,67 @@
+From adc0668b854289a11cfc29597b5566ba1869d17e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 07:32:09 -0700
+Subject: [PATCH 2/2] user format string in g_dbus_message_new_method_error ()
+
+This fixes format errors with -Werror=format-security
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/nm-manager.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/nm-manager.c b/src/nm-manager.c
+index c3d65cd..e814912 100644
+--- a/src/nm-manager.c
++++ b/src/nm-manager.c
+@@ -4871,6 +4871,7 @@ prop_set_auth_done_cb (NMAuthChain *chain,
+ 	if (error || (result != NM_AUTH_CALL_RESULT_YES)) {
+ 		reply = g_dbus_message_new_method_error (pfd->message,
+ 		                                         NM_PERM_DENIED_ERROR,
++		                                         "%s",
+ 		                                         (error_message = "Not authorized to perform this operation"));
+ 		if (error)
+ 			error_message = error->message;
+@@ -4882,6 +4883,7 @@ prop_set_auth_done_cb (NMAuthChain *chain,
+ 	if (!object) {
+ 		reply = g_dbus_message_new_method_error (pfd->message,
+ 		                                         "org.freedesktop.DBus.Error.UnknownObject",
++		                                         "%s",
+ 		                                         (error_message = "Object doesn't exist."));
+ 		goto done;
+ 	}
+@@ -4890,6 +4892,7 @@ prop_set_auth_done_cb (NMAuthChain *chain,
+ 	if (!nm_exported_object_get_interface_by_type (object, pfd->interface_type)) {
+ 		reply = g_dbus_message_new_method_error (pfd->message,
+ 		                                         "org.freedesktop.DBus.Error.InvalidArgs",
++		                                         "%s",
+ 		                                         (error_message = "Object is of unexpected type."));
+ 		goto done;
+ 	}
+@@ -4905,6 +4908,7 @@ prop_set_auth_done_cb (NMAuthChain *chain,
+ 		if (global_dns && !nm_global_dns_config_is_internal (global_dns)) {
+ 			reply = g_dbus_message_new_method_error (pfd->message,
+ 			                                         NM_PERM_DENIED_ERROR,
++			                                         "%s",
+ 			                                         (error_message = "Global DNS configuration already set via configuration file"));
+ 			goto done;
+ 		}
+@@ -4949,6 +4953,7 @@ do_set_property_check (gpointer user_data)
+ 	if (!pfd->subject) {
+ 		reply = g_dbus_message_new_method_error (pfd->message,
+ 		                                         NM_PERM_DENIED_ERROR,
++		                                         "%s",
+ 		                                         (error_message = "Could not determine request UID."));
+ 		goto out;
+ 	}
+@@ -4958,6 +4963,7 @@ do_set_property_check (gpointer user_data)
+ 	if (!chain) {
+ 		reply = g_dbus_message_new_method_error (pfd->message,
+ 		                                         NM_PERM_DENIED_ERROR,
++		                                         "%s",
+ 		                                         (error_message = "Could not authenticate request."));
+ 		goto out;
+ 	}
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb
new file mode 100644
index 0000000..d5f456f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb
@@ -0,0 +1,136 @@
+SUMMARY = "NetworkManager"
+HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
+SECTION = "net/misc"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \
+                    file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \
+                    file://docs/api/html/license.html;md5=8eb8e72bab097b9d11763002cb003697 \
+"
+
+DEPENDS = " \
+    intltool-native \
+    libnl \
+    dbus \
+    dbus-glib \
+    dbus-glib-native \
+    libgudev \
+    util-linux \
+    libndp \
+    libnewt \
+    polkit \
+    jansson \
+"
+
+inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection
+
+GI_DATA_ENABLED_libc-musl = "False"
+
+SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
+           file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
+           file://0002-Fix-nm-version-macro-includes.patch \
+           file://0001-adjust-net-headers-for-musl-compatibility.patch \
+           file://0002-socket-util.h-Include-linux-sockios.h-on-musl.patch \
+           file://0003-Define-ETH_ALEN.patch \
+           file://0004-Define-missing-features-to-cater-for-musl.patch \
+           file://0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \
+           file://0001-check-for-strndupa-before-using-it.patch \
+           file://0001-dns-resolved-add-systemd-resolved-backend.patch \
+           file://0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch \
+           file://0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch \
+           file://0002-user-format-string-in-g_dbus_message_new_method_erro.patch \
+           "
+SRC_URI[md5sum] = "63f1e0d6d7e9099499d062c84c927a75"
+SRC_URI[sha256sum] = "829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309"
+
+S = "${WORKDIR}/NetworkManager-${PV}"
+
+EXTRA_OECONF = " \
+    --disable-ifcfg-rh \
+    --disable-ifnet \
+    --disable-ifcfg-suse \
+    --disable-more-warnings \
+    --with-iptables=${sbindir}/iptables \
+    --with-tests \
+    --with-nmtui=yes \
+"
+
+do_compile_prepend() {
+        export GIR_EXTRA_LIBS_PATH="${B}/libnm-util/.libs"
+}
+
+PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \
+       bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi', d)} \
+"
+PACKAGECONFIG[systemd] = " \
+    --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \
+    --without-systemdsystemunitdir, \
+    polkit \
+"
+PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
+# consolekit is not picked by shlibs, so add it to RDEPENDS too
+PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
+PACKAGECONFIG[concheck] = "--with-libsoup=yes,--with-libsoup=no,libsoup-2.4"
+PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
+PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
+# Use full featured dhcp client instead of internal one
+PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client"
+PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq"
+PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
+PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
+PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,wireless-tools,wpa-supplicant wireless-tools"
+PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
+PACKAGECONFIG[netconfig] = "--with-netconfig=yes,--with-netconfig=no"
+PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free"
+
+PACKAGES =+ "libnmutil libnmglib libnmglib-vpn \
+  ${PN}-nmtui ${PN}-nmtui-doc \
+  ${PN}-adsl \
+"
+
+FILES_libnmutil += "${libdir}/libnm-util.so.*"
+FILES_libnmglib += "${libdir}/libnm-glib.so.*"
+FILES_libnmglib-vpn += "${libdir}/libnm-glib-vpn.so.*"
+
+FILES_${PN}-adsl = "${libdir}/NetworkManager/libnm-device-plugin-adsl.so"
+
+FILES_${PN} += " \
+    ${libexecdir} \
+    ${libdir}/pppd/*/nm-pppd-plugin.so \
+    ${libdir}/NetworkManager/*.so \
+    ${datadir}/polkit-1 \
+    ${datadir}/dbus-1 \
+    ${base_libdir}/udev/* \
+    ${systemd_unitdir}/system \
+"
+
+RRECOMMENDS_${PN} += "iptables \
+    ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
+"
+RCONFLICTS_${PN} = "connman"
+
+FILES_${PN}-dev += " \
+    ${datadir}/NetworkManager/gdb-cmd \
+    ${libdir}/pppd/*/*.la \
+    ${libdir}/NetworkManager/*.la \
+"
+
+FILES_${PN}-nmtui = " \
+    ${bindir}/nmtui \
+    ${bindir}/nmtui-edit \
+    ${bindir}/nmtui-connect \
+    ${bindir}/nmtui-hostname \
+"
+
+FILES_${PN}-nmtui-doc = " \
+    ${mandir}/man1/nmtui* \
+"
+
+SYSTEMD_SERVICE_${PN} = "NetworkManager.service NetworkManager-dispatcher.service"
+
+do_install_append() {
+    rm -rf ${D}/run ${D}${localstatedir}/run
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb
index 3a1f0f3..c944144 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb
@@ -14,9 +14,9 @@
 # not config defaults
 PACKAGECONFIG[pcsc-lite] = "--with-libpcsclite,--without-libpcsclite,pcsc-lite,"
 
-PV = "7.06"
+PV = "7.08"
 
-SRCREV = "35542d52202672b8c12ecc63867432128244013a"
+SRCREV = "9697bea0e50952cab57063238b43a7099e498cbb"
 SRC_URI = "git://git.infradead.org/users/dwmw2/openconnect.git"
 
 S = "${WORKDIR}/git"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb
new file mode 100644
index 0000000..4e41aa5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Easy communication with NetworkManager from Python"
+HOMEPAGE = "https://github.com/seveas/python-networkmanager"
+LICENSE = "Zlib"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8d8bac174bf8422b151200e6cc78ebe4"
+
+SRC_URI[md5sum] = "5fc644a65463031295c6b7dd51a0f1bd"
+SRC_URI[sha256sum] = "bc36507506ad29bfdac941b0987ebd1cc9633c9a9291d7378e229e4515a0a517"
+
+PYPI_PACKAGE = "python-networkmanager"
+inherit pypi setuptools
+
+RDEPENDS_${PN} = "networkmanager python-dbus python-six"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch
new file mode 100644
index 0000000..08ba2c3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch
@@ -0,0 +1,40 @@
+From e0c690acfcddd3c3421f6eb0182c54815fd70f8f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 23:21:08 -0700
+Subject: [PATCH] rdate: define logwtmp on libc != glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/rdate.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/src/rdate.c b/src/rdate.c
+index 943d481..685b1b8 100644
+--- a/src/rdate.c
++++ b/src/rdate.c
+@@ -41,7 +41,22 @@ static int print_mode = 0;		// display the time
+ static int timeout = 10;		// timeout for each connection attempt
+ static char *service = DEFAULT_SERVICE;
+ 
++#ifndef __GLIBC__
++static void logwtmp(const char * line, const char * name, const char * host)
++{
++    struct utmp u;
++    memset(&u, 0, sizeof(u));
++
++    u.ut_pid = getpid();
++    u.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
++    strncpy(u.ut_line, line, sizeof(u.ut_line));
++    strncpy(u.ut_name, name, sizeof(u.ut_name));
++    strncpy(u.ut_host, host, sizeof(u.ut_host));
++    gettimeofday(&(u.ut_tv), NULL);
+ 
++    updwtmp(_PATH_WTMP, &u);
++}
++#endif /* __GLIBC__ */
+ 
+ // Returns string from address info pointer
+ static char*
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
new file mode 100644
index 0000000..2f65189
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
@@ -0,0 +1,33 @@
+From f58bcb43c31d08de58853b088681cbe4df36cbf9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 26 Jun 2017 22:50:56 -0700
+Subject: [PATCH] src/rdate: Fix printf format errors
+
+Fixes
+
+rdate.c:85:41: error: format not a string literal and no format arguments [-Werror=format-security]
+|    syslog(is_error?LOG_WARNING:LOG_INFO, buf);
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ src/rdate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rdate.c b/src/rdate.c
+index 5c3e829..943d481 100644
+--- a/src/rdate.c
++++ b/src/rdate.c
+@@ -82,7 +82,7 @@ write_log(int is_error, char *format, ...)
+ 		return; /* Error, which we can't report because this _is_ the error
+ 				reporting mechanism */
+ 	if(log_mode)
+-		syslog(is_error?LOG_WARNING:LOG_INFO, buf);
++		syslog(is_error?LOG_WARNING:LOG_INFO, "%s", buf);
+ 	if(is_error || print_mode)
+ 		fprintf(is_error?stderr:stdout, "%s: %s\n", argv0, buf);
+ }
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
new file mode 100644
index 0000000..cd4db12
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Tool for getting the date/time from a remote machine."
+DESCRIPTION = "The rdate utility retrieves the date and time from \
+  another machine on your network, using the protocol described in RFC 868. \
+  If you run rdate as root, it will set your machine local time to the \
+  time of the machine that you queried. \
+"
+
+HOMEPAGE= "https://www.aelius.com/njh/rdate/"
+SECTION = "Applications/System"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz \
+           file://0001-src-rdate-Fix-printf-format-errors.patch \
+           file://0001-rdate-define-logwtmp-on-libc-glibc.patch \
+           "
+SRC_URI[md5sum] = "0a4f612480777fdf25264ac03c57eae6"
+SRC_URI[sha256sum] = "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d"
+
+inherit autotools
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch
new file mode 100644
index 0000000..c95eaf8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch
@@ -0,0 +1,75 @@
+From 244861e2c9bb9cc44f4bd246964ba850a7cf1216 Mon Sep 17 00:00:00 2001
+From: Xin Ouyang <Xin.Ouyang@windriver.com>
+Date: Tue, 15 May 2012 15:06:43 +0800
+Subject: [PATCH] rdist: bitbake build
+
+Upstream-Status: Inappropriate [OE specific]
+
+---
+ Makefile.local    |    8 ++++----
+ doc/Makefile.real |    4 +++-
+ src/Makefile.real |    1 +
+ 3 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.local b/Makefile.local
+index 26092b2..389cb84 100644
+--- a/Makefile.local
++++ b/Makefile.local
+@@ -14,7 +14,7 @@
+ # BIN_DIR variable, you would uncomment the following line
+ # or add your own line.
+ #
+-#BIN_DIR	= /usr/bin
++BIN_DIR	= ${DESTDIR}/${bindir}
+ 
+ #
+ # Add any local definitions you want pass to the compiler to DEFS_LOCAL
+@@ -46,13 +46,13 @@ LIBS_LOCAL	=
+ # Set a site specific install program to use.  Must support BSD style
+ # install(1) arguments.
+ #
+-#INSTALL		= install
++INSTALL		= install
+ 
+ #
+ # Site specific Man Page configuration.
+ #
+-#MAN_1_DIR	= /usr/local/man/man1
+-#MAN_8_DIR	= /usr/local/man/man8
++MAN_1_DIR	= ${DESTDIR}/${mandir}/man1
++MAN_8_DIR	= ${DESTDIR}/${mandir}/man8
+ #MAN_OWNER	= bin
+ #MAN_GROUP	= bin
+ #MAN_MODE	= 644
+diff --git a/doc/Makefile.real b/doc/Makefile.real
+index 42cabec..e32c30b 100644
+--- a/doc/Makefile.real
++++ b/doc/Makefile.real
+@@ -16,9 +16,11 @@ all:
+ 
+ doc:
+ 
+-install:
++install: install.man
+ 
+ install.man: rdist.man rdistd.man
++	test -d ${MAN_1_DIR} || ${INSTALL} -d ${MAN_1_DIR}
++	test -d ${MAN_8_DIR} || ${INSTALL} -d ${MAN_8_DIR}
+ 	${INSTALL} ${INSTALL_ARGS} rdist.man ${CLIENT_DEST}
+ 	${INSTALL} ${INSTALL_ARGS} rdistd.man ${SERVER_DEST}
+ 
+diff --git a/src/Makefile.real b/src/Makefile.real
+index 02179e4..9ec551d 100644
+--- a/src/Makefile.real
++++ b/src/Makefile.real
+@@ -52,6 +52,7 @@ clean:
+ 		$(COMMONOBJS) $(MISSINGOBJS)
+ 
+ install:
++	test -d $(BIN_DIR) || $(INSTALL) -d $(BIN_DIR)
+ 	$(INSTALL) ${IN_ARGS} -o $(BIN_OWNER) -m ${RDIST_MODE} \
+ 		$(CLIENT_BIN) $(BIN_DIR)/$(CLIENT)
+ 	$(INSTALL) ${IN_ARGS} -o ${BIN_OWNER} -m ${RDISTD_MODE} \
+-- 
+1.7.5.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch
new file mode 100644
index 0000000..4354912
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch
@@ -0,0 +1,147 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/gram.y.bison	1998-11-10 05:10:42.000000000 +0100
++++ rdist-6.1.5/src/gram.y	2003-06-04 16:02:19.000000000 +0200
+@@ -90,10 +90,10 @@
+ 	struct namelist        *namel;
+ }
+ 
+-%type <optval> OPTION, options
+-%type <string> NAME, STRING
+-%type <subcmd> INSTALL, NOTIFY, EXCEPT, PATTERN, SPECIAL, CMDSPECIAL, cmdlist, cmd
+-%type <namel> namelist, names, opt_namelist nlist
++%type <optval> OPTION options
++%type <string> NAME STRING
++%type <subcmd> INSTALL NOTIFY EXCEPT PATTERN SPECIAL CMDSPECIAL cmdlist cmd
++%type <namel> namelist names opt_namelist nlist
+ 
+ %%
+ 
+@@ -101,19 +101,19 @@
+ 		| file command
+ 		;
+ 
+-command:	  NAME '=' namelist = {
++command:	  NAME '=' namelist {
+ 			(void) lookup($1, INSERT, $3);
+ 		}
+-		| namelist ARROW namelist cmdlist = {
++		| namelist ARROW namelist cmdlist {
+ 			insert((char *)NULL, $1, $3, $4);
+ 		}
+-		| NAME COLON namelist ARROW namelist cmdlist = {
++		| NAME COLON namelist ARROW namelist cmdlist {
+ 			insert($1, $3, $5, $6);
+ 		}
+-		| namelist DCOLON NAME cmdlist = {
++		| namelist DCOLON NAME cmdlist {
+ 			append((char *)NULL, $1, $3, $4);
+ 		}
+-		| NAME COLON namelist DCOLON NAME cmdlist = {
++		| NAME COLON namelist DCOLON NAME cmdlist {
+ 			append($1, $3, $5, $6);
+ 		}
+ 		| error
+@@ -133,10 +133,10 @@
+ 		}
+ 		;
+ 
+-nlist:	  NAME = {
++nlist:	  NAME {
+ 			$$ = makenl($1);
+ 		}
+-		| '(' names ')' = {
++		| '(' names ')' {
+ 			$$ = $2;
+ 		}
+ 		;
+@@ -144,7 +144,7 @@
+ names:		  /* VOID */ {
+ 			$$ = last_n = NULL;
+ 		}
+-		| names NAME = {
++		| names NAME {
+ 			if (last_n == NULL)
+ 				$$ = last_n = makenl($2);
+ 			else {
+@@ -158,7 +158,7 @@
+ cmdlist:	  /* VOID */ {
+ 			$$ = last_sc = NULL;
+ 		}
+-		| cmdlist cmd = {
++		| cmdlist cmd {
+ 			if (last_sc == NULL)
+ 				$$ = last_sc = $2;
+ 			else {
+@@ -169,7 +169,7 @@
+ 		}
+ 		;
+ 
+-cmd:		  INSTALL options opt_namelist ';' = {
++cmd:		  INSTALL options opt_namelist ';' {
+ 			register struct namelist *nl;
+ 
+ 			$1->sc_options = $2 | options;
+@@ -185,17 +185,17 @@
+ 			}
+ 			$$ = $1;
+ 		}
+-		| NOTIFY namelist ';' = {
++		| NOTIFY namelist ';' {
+ 			if ($2 != NULL)
+ 				$1->sc_args = expand($2, E_VARS);
+ 			$$ = $1;
+ 		}
+-		| EXCEPT namelist ';' = {
++		| EXCEPT namelist ';' {
+ 			if ($2 != NULL)
+ 				$1->sc_args = expand($2, E_ALL);
+ 			$$ = $1;
+ 		}
+-		| PATTERN namelist ';' = {
++		| PATTERN namelist ';' {
+ 			struct namelist *nl;
+ 			char *cp, *re_comp();
+ 
+@@ -205,13 +205,13 @@
+ 			$1->sc_args = expand($2, E_VARS);
+ 			$$ = $1;
+ 		}
+-		| SPECIAL opt_namelist STRING ';' = {
++		| SPECIAL opt_namelist STRING ';' {
+ 			if ($2 != NULL)
+ 				$1->sc_args = expand($2, E_ALL);
+ 			$1->sc_name = $3;
+ 			$$ = $1;
+ 		}
+-		| CMDSPECIAL opt_namelist STRING ';' = {
++		| CMDSPECIAL opt_namelist STRING ';' {
+ 			if ($2 != NULL)
+ 				$1->sc_args = expand($2, E_ALL);
+ 			$1->sc_name = $3;
+@@ -219,18 +219,18 @@
+ 		}
+ 		;
+ 
+-options:	  /* VOID */ = {
++options:	  /* VOID */ {
+ 			$$ = 0;
+ 		}
+-		| options OPTION = {
++		| options OPTION {
+ 			$$ |= $2;
+ 		}
+ 		;
+ 
+-opt_namelist:	  /* VOID */ = {
++opt_namelist:	  /* VOID */ {
+ 			$$ = NULL;
+ 		}
+-		| namelist = {
++		| namelist {
+ 			$$ = $1;
+ 		}
+ 		;
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch
new file mode 100644
index 0000000..ed3d7f1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch
@@ -0,0 +1,2087 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/gram.y.cleanup	2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/gram.y	2003-12-17 11:38:16.000000000 +0100
+@@ -40,7 +40,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: gram.y,v 6.30 1998/11/10 04:10:42 mcooper Exp $";
+ 
+@@ -170,7 +170,7 @@
+ 		;
+ 
+ cmd:		  INSTALL options opt_namelist ';' {
+-			register struct namelist *nl;
++			struct namelist *nl;
+ 
+ 			$1->sc_options = $2 | options;
+ 			if ($3 != NULL) {
+@@ -240,11 +240,11 @@
+ int	yylineno = 1;
+ extern	FILE *fin;
+ 
+-yylex()
++int yylex()
+ {
+ 	static char yytext[INMAX];
+-	register int c;
+-	register char *cp1, *cp2;
++	int c;
++	char *cp1, *cp2;
+ 	static char quotechars[] = "[]{}*?$";
+ 	
+ again:
+@@ -409,8 +409,8 @@
+  * some of the characters we use.
+  */
+ extern int any(c, str)
+-	register int c;
+-	register char *str;
++	int c;
++	char *str;
+ {
+ 	while (*str)
+ 		if (c == *str++)
+@@ -421,13 +421,14 @@
+ /*
+  * Insert or append ARROW command to list of hosts to be updated.
+  */
++void
+ insert(label, files, hosts, subcmds)
+ 	char *label;
+ 	struct namelist *files, *hosts;
+ 	struct subcmd *subcmds;
+ {
+-	register struct cmd *c, *prev, *nc;
+-	register struct namelist *h, *lasth;
++	struct cmd *c, *prev, *nc;
++	struct namelist *h, *lasth;
+ 
+ 	debugmsg(DM_CALL, "insert(%s, %x, %x, %x) start, files = %s", 
+ 		 label == NULL ? "(null)" : label,
+@@ -475,13 +476,14 @@
+  * Append DCOLON command to the end of the command list since these are always
+  * executed in the order they appear in the distfile.
+  */
++void
+ append(label, files, stamp, subcmds)
+ 	char *label;
+ 	struct namelist *files;
+ 	char *stamp;
+ 	struct subcmd *subcmds;
+ {
+-	register struct cmd *c;
++	struct cmd *c;
+ 
+ 	c = ALLOC(cmd);
+ 	c->c_type = DCOLON;
+@@ -501,6 +503,7 @@
+ /*
+  * Error printing routine in parser.
+  */
++void
+ yyerror(s)
+ 	char *s;
+ {
+@@ -530,7 +533,7 @@
+ makenl(name)
+ 	char *name;
+ {
+-	register struct namelist *nl;
++	struct namelist *nl;
+ 
+ 	debugmsg(DM_CALL, "makenl(%s)", name == NULL ? "null" : name);
+ 
+@@ -627,7 +630,7 @@
+ makesubcmd(type)
+ 	int type;
+ {
+-	register struct subcmd *sc;
++	struct subcmd *sc;
+ 
+ 	sc = ALLOC(subcmd);
+ 	sc->sc_type = type;
+--- rdist-6.1.5/src/rdist.c.cleanup	1998-11-10 05:13:50.000000000 +0100
++++ rdist-6.1.5/src/rdist.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: rdist.c,v 6.66 1998/11/10 04:13:49 mcooper Exp $";
+ 
+@@ -80,7 +80,7 @@
+ 	char *name;
+ 	struct namelist **hostlist;
+ {
+-	register struct namelist *ptr, *new;
++	struct namelist *ptr, *new;
+ 
+ 	if (!name || !hostlist)
+ 		return;
+@@ -97,14 +97,15 @@
+ 		*hostlist = new;
+ }
+ 
++int
+ main(argc, argv, envp)
+ 	int argc;
+ 	char *argv[];
+ 	char **envp;
+ {
+ 	struct namelist *hostlist = NULL;
+-	register int x;
+-	register char *cp;
++	int x;
++	char *cp;
+ 	int cmdargs = 0;
+ 	int c;
+ 
+@@ -114,7 +115,7 @@
+ 	 */
+ 	setprogname(argv);
+ 
+-	if (cp = msgparseopts(localmsglist, TRUE)) {
++	if ((cp = msgparseopts(localmsglist, TRUE))) {
+ 		error("Bad builtin log option (%s): %s.", 
+ 		      localmsglist, cp);
+ 		usage();
+@@ -158,7 +159,7 @@
+ 	while ((c = getopt(argc, argv, optchars)) != -1)
+ 		switch (c) {
+ 		case 'l':
+-			if (cp = msgparseopts(optarg, TRUE)) {
++			if ((cp = msgparseopts(optarg, TRUE))) {
+ 				error("Bad log option \"%s\": %s.", optarg,cp);
+ 				usage();
+ 			}
+@@ -206,7 +207,7 @@
+ 
+ 		case 'D':
+ 			debug = DM_ALL;
+-			if (cp = msgparseopts("stdout=all,debug", TRUE)) {
++			if ((cp = msgparseopts("stdout=all,debug", TRUE))) {
+ 				error("Enable debug messages failed: %s.", cp);
+ 				usage();
+ 			}
+@@ -245,7 +246,7 @@
+ 				error("No path specified to \"-P\".");
+ 				usage();
+ 			}
+-			if (cp = searchpath(optarg))
++			if ((cp = searchpath(optarg)))
+ 				path_remsh = strdup(cp);
+ 			else {
+ 				error("No component of path \"%s\" exists.",
+@@ -297,7 +298,7 @@
+ 	else {
+ 		if (fin == NULL)
+ 			fin = opendist(distfile);
+-		(void) yyparse();
++		yyparse();
+ 		/*
+ 		 * Need to keep stdin open for child processing later
+ 		 */
+@@ -348,6 +349,7 @@
+ /*
+  * Print usage message and exit.
+  */
++void
+ usage()
+ {
+ 	char *sopts = "cDFnv";
+@@ -379,12 +381,13 @@
+ /*
+  * rcp like interface for distributing files.
+  */
++void
+ docmdargs(nargs, args)
+ 	int nargs;
+ 	char *args[];
+ {
+-	register struct namelist *nl, *prev;
+-	register char *cp;
++	struct namelist *nl, *prev;
++	char *cp;
+ 	struct namelist *files, *hosts;
+ 	struct subcmd *cmds;
+ 	char *dest;
+@@ -433,10 +436,10 @@
+  * Get a list of NAME blocks (mostly for debugging).
+  */
+ extern char *getnlstr(nl)
+-	register struct namelist *nl;
++	struct namelist *nl;
+ {
+ 	static char buf[16384];
+-	register int count = 0, len = 0;
++	int count = 0, len = 0;
+ 
+ 	(void) sprintf(buf, "(");
+ 
+--- rdist-6.1.5/src/client.c.cleanup	2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/client.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: client.c,v 6.82 1998/11/10 04:08:47 mcooper Exp $";
+ 
+@@ -84,7 +84,7 @@
+ 	int destdir;
+ {
+ 	extern struct namelist *filelist;
+-	register char *lname, *cp;
++	char *lname, *cp;
+ 	static char buff[BUFSIZ];
+ 	int srclen, pathlen;
+ 	char *p;
+@@ -146,7 +146,7 @@
+ 	struct namelist *list;
+ 	char *file;
+ {
+-	register struct namelist *nl;
++	struct namelist *nl;
+ 
+ 	for (nl = list; nl != NULL; nl = nl->n_next)
+ 		if (strcmp(file, nl->n_name) == 0)
+@@ -163,7 +163,7 @@
+ 	char *rname;
+ 	int destdir;
+ {
+-	register struct subcmd *sc;
++	struct subcmd *sc;
+ 	extern struct subcmd *subcmds;
+ 	char *rfile;
+ 
+@@ -200,7 +200,7 @@
+ {
+ 	char *rfile;
+ 	struct namelist *new;
+-	register struct subcmd *sc;
++	struct subcmd *sc;
+ 	extern struct subcmd *subcmds;
+ 	int isokay = 0;
+ 
+@@ -227,7 +227,7 @@
+  */
+ static void freecmdspecialfiles()
+ {
+-	register struct namelist *ptr, *save;
++	struct namelist *ptr, *save;
+ 
+ 	for (ptr = updfilelist; ptr; ) {
+ 		if (ptr->n_name) (void) free(ptr->n_name);
+@@ -249,10 +249,8 @@
+ 	char **filev;
+ 	opt_t opts;
+ {
+-	register struct subcmd *sc;
+-	register struct namelist *f;
+-	register char **cpp;
+-	char *file;
++	struct subcmd *sc;
++	struct namelist *f;
+ 	int first = TRUE;
+ 
+ 	for (sc = cmd->c_cmds; sc != NULL; sc = sc->sc_next) {
+@@ -294,7 +292,7 @@
+ int checkfilename(name)
+ 	char *name;
+ {
+-	register char *cp;
++	char *cp;
+ 
+ 	if (strchr(name, '\n')) {
+ 		for (cp = name; *cp; cp++)
+@@ -501,7 +499,7 @@
+ static int rmchk(opts)
+ 	opt_t opts;
+ {
+-	register u_char *s;
++	u_char *s;
+ 	struct stat stb;
+ 	int didupdate = 0;
+ 	int n;
+@@ -618,7 +616,7 @@
+ 	
+ 	optarget = ptarget;
+ 	len = ptarget - target;
+-	while (dp = readdir(d)) {
++	while ((dp = readdir(d))) {
+ 		if (!strcmp(dp->d_name, ".") ||
+ 		    !strcmp(dp->d_name, ".."))
+ 			continue;
+@@ -631,7 +629,7 @@
+ 		if (ptarget[-1] != '/')
+ 			*ptarget++ = '/';
+ 		cp = dp->d_name;
+-		while (*ptarget++ = *cp++)
++		while ((*ptarget++ = *cp++))
+ 			;
+ 		ptarget--;
+ 		if (sendit(dp->d_name, opts, destdir) > 0)
+@@ -770,13 +768,13 @@
+ 	opt_t opts;
+ 	struct stat *statp;
+ {
+-	register off_t size;
+-	register time_t mtime;
++	off_t size;
++	time_t mtime;
+ 	unsigned short lmode;
+ 	unsigned short rmode;
+ 	char *owner = NULL, *group = NULL;
+ 	int done, n;
+-	u_char *cp;
++	char *cp;
+ 
+ 	debugmsg(DM_CALL, "update(%s, 0x%x, 0x%x)\n", rname, opts, statp);
+ 
+@@ -1035,7 +1033,6 @@
+ 	int destdir;
+ {
+ 	static struct stat stb;
+-	extern struct subcmd *subcmds;
+ 	char *user, *group;
+ 	int u, len;
+ 	int didupdate = 0;
+@@ -1157,7 +1154,7 @@
+ 	(void) unlink(statfile);
+ #endif
+ 
+-	if (file = getnotifyfile())
++	if ((file = getnotifyfile()))
+ 		(void) unlink(file);
+ }
+ 
+--- rdist-6.1.5/src/child.c.cleanup	1998-11-10 05:18:57.000000000 +0100
++++ rdist-6.1.5/src/child.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: child.c,v 6.29 1998/11/10 04:18:56 mcooper Exp $";
+ 
+@@ -90,7 +90,7 @@
+ static void removechild(child)
+ 	CHILD *child;
+ {
+-	register CHILD *pc, *prevpc;
++	CHILD *pc, *prevpc;
+ 
+ 	debugmsg(DM_CALL, "removechild(%s, %d, %d) start",
+ 		 child->c_name, child->c_pid, child->c_readfd);
+@@ -148,7 +148,7 @@
+ static CHILD *copychild(child)
+ 	CHILD *child;
+ {
+-	register CHILD *newc;
++	CHILD *newc;
+ 
+ 	newc = (CHILD *) xmalloc(sizeof(CHILD));
+ 
+@@ -167,7 +167,7 @@
+ static void addchild(child)
+ 	CHILD *child;
+ {
+-	register CHILD *pc;
++	CHILD *pc;
+ 
+ 	debugmsg(DM_CALL, "addchild() start\n");
+ 
+@@ -280,7 +280,7 @@
+  */
+ static void reap()
+ {
+-	register CHILD *pc;
++	CHILD *pc;
+ 	int status = 0;
+ 	pid_t pid;
+ 
+@@ -336,7 +336,7 @@
+  */
+ static void childscan() 
+ {
+-	register CHILD *pc, *nextpc;
++	CHILD *pc, *nextpc;
+ 	
+ 	debugmsg(DM_CALL, "childscan() start");
+ 
+@@ -366,8 +366,8 @@
+ extern void waitup()
+ {
+ #if	defined(HAVE_SELECT)
+-	register int count;
+-	register CHILD *pc;
++	int count;
++	CHILD *pc;
+ 	fd_set rchildfds;
+ 
+ 	debugmsg(DM_CALL, "waitup() start\n");
+--- rdist-6.1.5/src/docmd.c.cleanup	2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/docmd.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: docmd.c,v 6.87 1998/11/10 04:08:32 mcooper Exp $";
+ 
+@@ -99,10 +99,10 @@
+  */
+ static void notify(rhost, to, lmod)
+ 	char *rhost;
+-	register struct namelist *to;
++	struct namelist *to;
+ 	time_t lmod;
+ {
+-	register int fd, len;
++	int fd, len;
+ 	FILE *pf, *popen();
+ 	struct stat stb;
+ 	static char buf[BUFSIZ];
+@@ -221,7 +221,7 @@
+ 	struct cmd *cmd;
+ 	struct cmd *cmdlist;
+ {
+-	register struct cmd *pcmd;
++	struct cmd *pcmd;
+ 	
+ 	for (pcmd = cmdlist; pcmd; pcmd = pcmd->c_next) {
+ 		checkcmd(pcmd);
+@@ -238,7 +238,7 @@
+ 	struct cmd *cmd;
+ 	struct cmd *cmdlist;
+ {
+-	register struct cmd *pc;
++	struct cmd *pc;
+ 
+ 	if (!cmd) {
+ 		debugmsg(DM_MISC, "markfailed() NULL cmd parameter");
+@@ -309,7 +309,7 @@
+ static int makeconn(rhost)
+ 	char *rhost;
+ {
+-	register char *ruser, *cp;
++	char *ruser, *cp;
+ 	static char *cur_host = NULL;
+ 	extern char *locuser;
+ 	extern long min_freefiles, min_freespace;
+@@ -430,9 +430,9 @@
+ 	struct cmd *cmd;
+ 	char **filev;
+ {
+-	register struct namelist *f;
+-	register struct subcmd *sc;
+-	register char **cpp;
++	struct namelist *f;
++	struct subcmd *sc;
++	char **cpp;
+ 	int n, ddir, destdir, opts = options;
+ 	struct namelist *files;
+ 	struct subcmd *sbcmds;
+@@ -567,7 +567,6 @@
+ 		}
+ 	}
+ 
+-done:
+ 	/*
+ 	 * Run any commands for the entire cmd
+ 	 */
+@@ -584,7 +583,7 @@
+ 			notify(rhost, sc->sc_args, (time_t) 0);
+ 
+ 	if (!nflag) {
+-		register struct linkbuf *nextl, *l;
++		struct linkbuf *nextl, *l;
+ 
+ 		for (l = ihead; l != NULL; freelinkinfo(l), l = nextl) {
+ 			nextl = l->nextp;
+@@ -601,11 +600,12 @@
+ 	setjmp_ok = FALSE;
+ }
+ 
++int
+ okname(name)
+-	register char *name;
++	char *name;
+ {
+-	register char *cp = name;
+-	register int c, isbad;
++	char *cp = name;
++	int c, isbad;
+ 
+ 	for (isbad = FALSE; *cp && !isbad; ++cp) {
+ 		c = *cp;
+@@ -627,9 +627,9 @@
+ 	struct subcmd *sbcmds;
+ 	char **env;
+ {
+-	register DIR *d;
+-	register DIRENTRY *dp;
+-	register char *cp;
++	DIR *d;
++	DIRENTRY *dp;
++	char *cp;
+ 	char *optarget;
+ 	int len;
+ 
+@@ -641,7 +641,7 @@
+ 	}
+ 	optarget = ptarget;
+ 	len = ptarget - target;
+-	while (dp = readdir(d)) {
++	while ((dp = readdir(d))) {
+ 		if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
+ 			continue;
+ 		if (len + 1 + (int)strlen(dp->d_name) >= BUFSIZ - 1) {
+@@ -651,7 +651,7 @@
+ 		ptarget = optarget;
+ 		*ptarget++ = '/';
+ 		cp = dp->d_name;
+-		while (*ptarget++ = *cp++)
++		while ((*ptarget++ = *cp++))
+ 			;
+ 		ptarget--;
+ 		cmptime(target, sbcmds, env);
+@@ -740,9 +740,9 @@
+ 	struct cmd *cmd;
+ 	char **filev;
+ {
+-	register struct subcmd *sc;
+-	register struct namelist *f;
+-	register char *cp, **cpp;
++	struct subcmd *sc;
++	struct namelist *f;
++	char *cp, **cpp;
+ 	struct stat stb;
+ 	struct namelist *files = cmd->c_files;
+ 	struct subcmd *sbcmds = cmd->c_cmds;
+@@ -824,8 +824,8 @@
+ extern int except(file)
+ 	char *file;
+ {
+-	register struct	subcmd *sc;
+-	register struct	namelist *nl;
++	struct	subcmd *sc;
++	struct	namelist *nl;
+ 
+ 	debugmsg(DM_CALL, "except(%s)", file);
+ 
+@@ -918,8 +918,8 @@
+ 	int argc;
+ 	char **argv;
+ {
+-	register struct namelist *f;
+-	register int i;
++	struct namelist *f;
++	int i;
+ 
+ 	if (argc) {
+ 		for (i = 0; i < argc; i++) {
+@@ -962,9 +962,9 @@
+ 	int argc;
+ 	char **argv;
+ {
+-	register struct cmd *c;
+-	register char *cp;
+-	register int i;
++	struct cmd *c;
++	char *cp;
++	int i;
+ 
+ 	(void) signal(SIGHUP, sighandler);
+ 	(void) signal(SIGINT, sighandler);
+@@ -1032,7 +1032,7 @@
+ 
+ 		if (hostlist) {
+ 			/* Do specific hosts as specified on command line */
+-			register struct namelist *nlptr;
++			struct namelist *nlptr;
+ 
+ 			for (nlptr = hostlist; nlptr; nlptr = nlptr->n_next)
+ 				/*
+--- rdist-6.1.5/src/distopt.c.cleanup	1998-11-10 05:09:11.000000000 +0100
++++ rdist-6.1.5/src/distopt.c	2003-12-17 11:38:16.000000000 +0100
+@@ -6,7 +6,7 @@
+  * appropriately.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: distopt.c,v 6.12 1998/11/10 04:09:11 mcooper Exp $";
+ 
+@@ -55,7 +55,7 @@
+ extern DISTOPTINFO *getdistopt(name)
+ 	char *name;
+ {
+-	register int i;
++	int i;
+ 
+ 	for (i = 0; distoptinfo[i].do_name; ++i)
+ 		if (strcasecmp(name, distoptinfo[i].do_name) == 0)
+@@ -74,7 +74,7 @@
+ 	opt_t *optptr;
+ 	int doerrs;
+ {
+-	register char *string, *optstr;
++	char *string, *optstr;
+ 	DISTOPTINFO *distopt;
+ 	int negate;
+ 
+@@ -93,7 +93,7 @@
+ 		 * and the option starts with "no", strip "no"
+ 		 * from option and retry lookup.
+ 		 */
+-		if (distopt = getdistopt(optstr)) {
++		if ((distopt = getdistopt(optstr))) {
+ 			FLAG_ON(*optptr, distopt->do_value);
+ 			continue;
+ 		}
+@@ -116,7 +116,7 @@
+  */
+ extern char *getdistoptlist()
+ {
+-	register int i;
++	int i;
+ 	static char buf[1024];
+ 
+ 	for (i = 0, buf[0] = CNULL; distoptinfo[i].do_name; ++i) {
+@@ -138,7 +138,7 @@
+ extern char *getondistoptlist(opts)
+ 	opt_t opts;
+ {
+-	register int i;
++	int i;
+ 	static char buf[1024];
+ 
+ 	for (i = 0, buf[0] = CNULL; distoptinfo[i].do_name; ++i) {
+--- rdist-6.1.5/src/expand.c.cleanup	1998-11-10 05:09:31.000000000 +0100
++++ rdist-6.1.5/src/expand.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: expand.c,v 6.19 1998/11/10 04:09:31 mcooper Exp $";
+ 
+@@ -81,9 +81,9 @@
+ 		      sizeof(*sortbase), argcmp), sortbase = &eargv[eargc]
+ 
+ static void Cat(s1, s2)				/* quote in s1 and s2 */
+-	register u_char *s1, *s2;
++	u_char *s1, *s2;
+ {
+-	register char *cp;
++	char *cp;
+ 	int len = strlen((char *)s1) + strlen((char *)s2) + 2;
+ 
+ 	if ((eargc + 1) >= MAXEARGS) {
+@@ -97,12 +97,12 @@
+ 	do { 
+ 		if (*s1 == QUOTECHAR) 
+ 			s1++; 
+-	} while (*cp++ = *s1++);
++	} while ((*cp++ = *s1++));
+ 	cp--;
+ 	do { 
+ 		if (*s2 == QUOTECHAR) 
+ 			s2++; 
+-	} while (*cp++ = *s2++);
++	} while ((*cp++ = *s2++));
+ }
+ 
+ static void addpath(c)
+@@ -131,8 +131,8 @@
+ 	struct namelist *list;
+ 	int wh;
+ {
+-	register struct namelist *nl, *prev;
+-	register int n;
++	struct namelist *nl, *prev;
++	int n;
+ 	char pathbuf[BUFSIZ];
+ 
+ 	if (debug)
+@@ -182,7 +182,7 @@
+ 	u_char *str;
+ 	int ch;
+ {
+-	register u_char *cp;
++	u_char *cp;
+ 
+ 	for (cp = str; cp && *cp != CNULL; ++cp)
+ 		if (ch == *cp)
+@@ -194,8 +194,8 @@
+ void expstr(s)
+ 	u_char *s;
+ {
+-	register u_char *cp, *cp1;
+-	register struct namelist *tp;
++	u_char *cp, *cp1;
++	struct namelist *tp;
+ 	u_char *tail;
+ 	u_char ebuf[BUFSIZ];
+ 	u_char varbuff[BUFSIZ];
+@@ -302,7 +302,7 @@
+ 			cp1 = (u_char *)pw->pw_dir;
+ 			s = cp;
+ 		}
+-		for (cp = (u_char *)path; *cp++ = *cp1++; )
++		for (cp = (u_char *)path; (*cp++ = *cp1++); )
+ 			;
+ 		tpathp = pathp = (char *)cp - 1;
+ 	} else {
+@@ -326,7 +326,7 @@
+ 	sort();
+ }
+ 
+-static
++static int
+ argcmp(a1, a2)
+ 	char **a1, **a2;
+ {
+@@ -341,8 +341,8 @@
+ void expsh(s)				/* quote in s */
+ 	u_char *s;
+ {
+-	register u_char *cp, *oldcp;
+-	register char *spathp;
++	u_char *cp, *oldcp;
++	char *spathp;
+ 	struct stat stb;
+ 
+ 	spathp = pathp;
+@@ -380,7 +380,7 @@
+ 	char *pattern;
+ {
+ 	struct stat stb;
+-	register DIRENTRY *dp;
++	DIRENTRY *dp;
+ 	DIR *dirp;
+ 
+ 	dirp = opendir(path);
+@@ -417,11 +417,12 @@
+ 	yyerror(path);
+ }
+ 
++int
+ execbrc(p, s)				/* quote in p */
+ 	u_char *p, *s;
+ {
+ 	u_char restbuf[BUFSIZ + 2];
+-	register u_char *pe, *pm, *pl;
++	u_char *pe, *pm, *pl;
+ 	int brclev = 0;
+ 	u_char *lm, savec;
+ 	char *spathp;
+@@ -507,11 +508,12 @@
+ 	return (0);
+ }
+ 
++int
+ match(s, p)					/* quote in p */
+ 	char *s, *p;
+ {
+-	register int c;
+-	register char *sentp;
++	int c;
++	char *sentp;
+ 	char sexpany = expany;
+ 
+ 	if (*s == '.' && *p != '.')
+@@ -524,11 +526,12 @@
+ 	return (c);
+ }
+ 
++int
+ amatch(s, p)					/* quote in p */
+-	register char *s;
+-	register u_char *p;
++	char *s;
++	u_char *p;
+ {
+-	register int scc;
++	int scc;
+ 	int ok, lc;
+ 	char *spathp;
+ 	struct stat stb;
+@@ -545,7 +548,7 @@
+ 		case '[':
+ 			ok = 0;
+ 			lc = 077777;
+-			while (cc = *p++) {
++			while ((cc = *p++)) {
+ 				if (cc == ']') {
+ 					if (ok)
+ 						break;
+@@ -599,7 +602,7 @@
+ 			while (*s)
+ 				addpath(*s++);
+ 			addpath('/');
+-			if (stat(path, &stb) == 0 && S_ISDIR(stb.st_mode))
++			if (stat(path, &stb) == 0 && S_ISDIR(stb.st_mode)) {
+ 				if (*p == CNULL) {
+ 					if (which & E_TILDE)
+ 						Cat((u_char *)path, 
+@@ -609,6 +612,7 @@
+ 						    (u_char *)tpathp);
+ 				} else
+ 					expsh(p);
++			}
+ 			pathp = spathp;
+ 			*pathp = CNULL;
+ 			return (0);
+--- rdist-6.1.5/src/lookup.c.cleanup	1998-11-10 05:12:56.000000000 +0100
++++ rdist-6.1.5/src/lookup.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: lookup.c,v 6.9 1998/11/10 04:12:56 mcooper Exp $";
+ 
+@@ -68,11 +68,12 @@
+ /*
+  * Define a variable from a command line argument.
+  */
++void
+ define(name)
+ 	char *name;
+ {
+-	register char *cp, *s;
+-	register struct namelist *nl;
++	char *cp, *s;
++	struct namelist *nl;
+ 	struct namelist *value;
+ 
+ 	debugmsg(DM_CALL, "define(%s)", name);
+@@ -137,9 +138,9 @@
+ 	int action;
+ 	struct namelist *value;
+ {
+-	register unsigned n;
+-	register char *cp;
+-	register struct syment *s;
++	unsigned n;
++	char *cp;
++	struct syment *s;
+ 	char ebuf[BUFSIZ];
+ 
+ 	debugmsg(DM_CALL, "lookup(%s, %d, %x)", name, action, value);
+--- rdist-6.1.5/src/isexec.c.cleanup	1998-11-10 05:11:42.000000000 +0100
++++ rdist-6.1.5/src/isexec.c	2003-12-17 11:38:16.000000000 +0100
+@@ -37,7 +37,7 @@
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  */
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: isexec.c,v 6.22 1998/11/10 04:11:42 mcooper Exp $";
+ 
+--- rdist-6.1.5/src/signal.c.cleanup	1998-11-10 05:16:13.000000000 +0100
++++ rdist-6.1.5/src/signal.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: signal.c,v 6.2 1998/11/10 04:16:13 mcooper Exp $";
+ 
+--- rdist-6.1.5/src/rshrcmd.c.cleanup	1998-11-10 05:15:07.000000000 +0100
++++ rdist-6.1.5/src/rshrcmd.c	2003-12-17 11:38:16.000000000 +0100
+@@ -10,7 +10,7 @@
+  * Chris Siebenmann <cks@utcc.utoronto.ca>.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: rshrcmd.c,v 1.9 1998/11/10 04:15:07 mcooper Exp $";
+ 
+@@ -34,6 +34,7 @@
+  * program in place of a direct rcmd() function call so as to
+  * avoid having to be root.
+  */
++int
+ rshrcmd(ahost, port, luser, ruser, cmd, fd2p)
+ 	char  	**ahost;
+ 	u_short	port;
+@@ -108,6 +109,7 @@
+ 		(void) wait(0);
+ 		return sp[0];
+ 	}
++	return -1;
+ 	/*NOTREACHED*/
+ }
+ 
+--- rdist-6.1.5/src/common.c.cleanup	1998-11-10 05:09:01.000000000 +0100
++++ rdist-6.1.5/src/common.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: common.c,v 6.84 1998/11/10 04:09:01 mcooper Exp $";
+ 
+@@ -87,14 +87,14 @@
+ /* 
+  * Front end to write() that handles partial write() requests.
+  */
+-extern WRITE_RETURN_T xwrite(fd, buf, len)
++WRITE_RETURN_T xwrite(fd, buf, len)
+ 	int fd;
+ 	void *buf;
+ 	WRITE_AMT_T len;
+ {
+     	WRITE_AMT_T nleft = len;
+ 	WRITE_RETURN_T nwritten;
+-	register char *ptr = buf;
++	char *ptr = buf;
+          
+ 	while (nleft > 0) {
+ 	    	if ((nwritten = write(fd, ptr, nleft)) <= 0) {
+@@ -110,14 +110,14 @@
+ /*
+  * Set program name
+  */
+-extern void setprogname(argv)
++void setprogname(argv)
+ 	char **argv;
+ {
+-	register char *cp;
++	char *cp;
+ 
+ 	if (!progname) {
+ 		progname = strdup(argv[0]);
+-		if (cp = strrchr(progname, '/'))
++		if ((cp = strrchr(progname, '/')))
+ 			progname = cp + 1;
+ 	}
+ }
+@@ -125,14 +125,14 @@
+ /*
+  * Do run-time initialization
+  */
+-extern int init(argc, argv, envp)
++int init(argc, argv, envp)
+ 	/*ARGSUSED*/
+ 	int argc;
+ 	char **argv;
+ 	char **envp;
+ {
+-	register int i;
+-	register char *cp;
++	int i;
++	char *cp;
+ 
+ 	if (!isserver)
+ 		(void) signal(SIGSEGV, sighandler);
+@@ -182,7 +182,7 @@
+ /*
+  * Finish things up before ending.
+  */
+-extern void finish()
++void finish()
+ {
+ 	extern jmp_buf finish_jmpbuf;
+ 
+@@ -216,7 +216,7 @@
+ /*
+  * Handle lost connections
+  */
+-extern void lostconn()
++void lostconn()
+ {
+ 	/* Prevent looping */
+ 	(void) signal(SIGPIPE, SIG_IGN);
+@@ -232,7 +232,7 @@
+ /*
+  * Do a core dump
+  */
+-extern void coredump()
++void coredump()
+ {
+ 	error("Segmentation violation - dumping core [PID = %d, %s]",
+ 	      getpid(), 
+@@ -245,7 +245,7 @@
+ /*
+  * General signal handler
+  */
+-extern void sighandler(sig)
++void sighandler(sig)
+ 	int sig;
+ {
+ 	debugmsg(DM_CALL, "sighandler() received signal %d\n", sig);
+@@ -325,7 +325,7 @@
+ /*
+  * Stdarg frontend to sendcmdmsg()
+  */
+-extern int sendcmd(char cmd, char *fmt, ...)
++int sendcmd(char cmd, char *fmt, ...)
+ {
+ 	static char buf[BUFSIZ];
+ 	va_list args;
+@@ -345,7 +345,7 @@
+ /*
+  * Varargs frontend to sendcmdmsg()
+  */
+-extern int sendcmd(va_alist)
++int sendcmd(va_alist)
+ 	va_dcl
+ {
+ 	static char buf[BUFSIZ];
+@@ -372,7 +372,7 @@
+  * Stupid frontend to sendcmdmsg()
+  */
+ /*VARARGS2*/
+-extern int sendcmd(cmd, fmt, a1, a2, a3, a4, a5, a6, a7, a8)
++int sendcmd(cmd, fmt, a1, a2, a3, a4, a5, a6, a7, a8)
+ 	char cmd;
+ 	char *fmt;
+ {
+@@ -433,13 +433,13 @@
+  * errors, call cleanup() or lostconn().  In other words, unless
+  * the third argument is nonzero, this routine never returns failure.
+  */
+-extern int remline(buffer, space, doclean)
+-	register u_char *buffer;
++int remline(buffer, space, doclean)
++	u_char *buffer;
+ 	int space;
+ 	int doclean;
+ {
+-	register int c, left = space;
+-	register u_char *p = buffer;
++	int c, left = space;
++	u_char *p = buffer;
+ 
+ 	if (rem_r < 0) {
+ 		error("Cannot read remote input: Remote descriptor not open.");
+@@ -494,9 +494,9 @@
+ /*
+  * Non-line-oriented remote read.
+  */
+-readrem(p, space)
++int readrem(p, space)
+ 	char *p;
+-	register int space;
++	int space;
+ {
+ 	if (remleft <= 0) {
+ 		/*
+@@ -527,7 +527,7 @@
+ /*
+  * Get the user name for the uid.
+  */
+-extern char *getusername(uid, file, opts)
++char *getusername(uid, file, opts)
+ 	UID_T uid;
+ 	char *file;
+ 	opt_t opts;
+@@ -566,7 +566,7 @@
+ /*
+  * Get the group name for the gid.
+  */
+-extern char *getgroupname(gid, file, opts)
++char *getgroupname(gid, file, opts)
+ 	GID_T gid;
+ 	char *file;
+ 	opt_t opts;
+@@ -604,7 +604,7 @@
+ /*
+  * Read a response from the remote host.
+  */
+-extern int response()
++int response()
+ {
+ 	static u_char resp[BUFSIZ];
+ 	u_char *s;
+@@ -646,6 +646,7 @@
+ 			message(MT_FERROR, "%s", s);
+ 		finish();
+ 	}
++	return -1;
+ 	/*NOTREACHED*/
+ }
+ 
+@@ -657,11 +658,11 @@
+  * user's home directory path name. Return a pointer in buf to the
+  * part corresponding to `file'.
+  */
+-extern char *exptilde(ebuf, file)
++char *exptilde(ebuf, file)
+ 	char *ebuf;
+-	register char *file;
++	char *file;
+ {
+-	register char *s1, *s2, *s3;
++	char *s1, *s2, *s3;
+ 	extern char *homedir;
+ 
+ 	if (*file != '~') {
+@@ -694,12 +695,12 @@
+ 			*s3 = '/';
+ 		s2 = pw->pw_dir;
+ 	}
+-	for (s1 = ebuf; *s1++ = *s2++; )
++	for (s1 = ebuf; (*s1++ = *s2++); )
+ 		;
+ 	s2 = --s1;
+ 	if (s3 != NULL) {
+ 		s2++;
+-		while (*s1++ = *s3++)
++		while ((*s1++ = *s3++))
+ 			;
+ 	}
+ 	return(s2);
+@@ -710,7 +711,7 @@
+  * Set our effective user id to the user running us.
+  * This should be the uid we do most of our work as.
+  */
+-extern int becomeuser()
++int becomeuser()
+ {
+ 	int r = 0;
+ 
+@@ -732,7 +733,7 @@
+ /*
+  * Set our effective user id to "root" (uid = 0)
+  */
+-extern int becomeroot()
++int becomeroot()
+ {
+ 	int r = 0;
+ 
+@@ -753,7 +754,7 @@
+ /*
+  * Set access and modify times of a given file
+  */
+-extern int setfiletime(file, atime, mtime)
++int setfiletime(file, atime, mtime)
+ 	char *file;
+ 	time_t atime;
+ 	time_t mtime;
+@@ -790,7 +791,7 @@
+ /*
+  * Get version info
+  */
+-extern char *getversion()
++char *getversion()
+ {
+ 	static char buff[BUFSIZ];
+ 
+@@ -811,7 +812,7 @@
+ {
+ 	int fd[2], pid, i;
+ 	int status;
+-	register char *cp, *s;
++	char *cp, *s;
+ 	char sbuf[BUFSIZ], buf[BUFSIZ];
+ 
+ 	if (pipe(fd) < 0) {
+@@ -933,12 +934,12 @@
+ /*
+  * Private version of basename()
+  */
+-extern char *xbasename(path)
++char *xbasename(path)
+ 	char *path;
+ {
+-	register char *cp;
++	char *cp;
+  
+-	if (cp = strrchr(path, '/'))
++	if ((cp = strrchr(path, '/')))
+ 		return(cp+1);
+ 	else
+ 		return(path);
+@@ -949,11 +950,11 @@
+  * search until a component of that path is found and
+  * return the found file name.
+  */
+-extern char *searchpath(path)
++char *searchpath(path)
+ 	char *path;
+ {
+-	register char *cp;
+-	register char *file;
++	char *cp;
++	char *file;
+ 	struct stat statbuf;
+ 
+ 	for (; ;) {
+@@ -977,8 +978,7 @@
+ /*
+  * Set line buffering.
+  */
+-extern void
+-mysetlinebuf(fp)
++void mysetlinebuf(fp)
+ 	FILE *fp;
+ {
+ #if	SETBUF_TYPE == SETBUF_SETLINEBUF
+@@ -995,8 +995,7 @@
+ /*
+  * Our interface to system call to get a socket pair.
+  */
+-int
+-getsocketpair(domain, type, protocol, sv)
++int getsocketpair(domain, type, protocol, sv)
+ 	int domain;
+ 	int type;
+ 	int protocol;
+--- rdist-6.1.5/src/message.c.cleanup	1998-11-10 05:13:30.000000000 +0100
++++ rdist-6.1.5/src/message.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: message.c,v 6.25 1998/11/10 04:13:30 mcooper Exp $";
+ 
+@@ -97,7 +97,7 @@
+  */
+ extern void msgprusage()
+ {
+-	register int i, x;
++	int i, x;
+ 
+ 	(void) fprintf(stderr, "\nWhere <msgopt> is of form\n");
+ 	(void) fprintf(stderr, 
+@@ -120,7 +120,7 @@
+  */
+ extern void msgprconfig()
+ {
+-	register int i, x;
++	int i, x;
+ 	static char buf[MSGBUFSIZ];
+ 
+ 	debugmsg(DM_MISC, "Current message logging config:");
+@@ -145,7 +145,7 @@
+ static MSGFACILITY *getmsgfac(name)
+ 	char *name;
+ {
+-	register int i;
++	int i;
+ 
+ 	for (i = 0; msgfacility[i].mf_name; ++i)
+ 		if (strcasecmp(name, msgfacility[i].mf_name) == 0)
+@@ -160,7 +160,7 @@
+ static MSGTYPE *getmsgtype(name)
+ 	char *name;
+ {
+-	register int i;
++	int i;
+ 
+ 	for (i = 0; msgtypes[i].mt_name; ++i)
+ 		if (strcasecmp(name, msgtypes[i].mt_name) == 0)
+@@ -178,9 +178,9 @@
+ 	char *str;
+ {
+ 	static char ebuf[BUFSIZ];
+-	register char *cp;
+-	register char *strptr, *word;
+-	register MSGTYPE *mtp;
++	char *cp;
++	char *strptr, *word;
++	MSGTYPE *mtp;
+ 
+ 	/*
+ 	 * MF_SYSLOG is the only supported message facility for the server
+@@ -240,11 +240,11 @@
+ 	msgfac->mf_msgtypes = 0;	/* Start from scratch */
+ 	while (strptr) {
+ 		word = strptr;
+-		if (cp = strchr(strptr, ','))
++		if ((cp = strchr(strptr, ',')))
+ 			*cp++ = CNULL;
+ 		strptr = cp;
+ 
+-		if (mtp = getmsgtype(word)) {
++		if ((mtp = getmsgtype(word))) {
+ 			msgfac->mf_msgtypes |= mtp->mt_type;
+ 			/*
+ 			 * XXX This is really a kludge until we add real
+@@ -272,8 +272,8 @@
+ 	int doset;
+ {
+ 	static char ebuf[BUFSIZ], msgbuf[MSGBUFSIZ];
+-	register char *cp, *optstr;
+-	register char *word;
++	char *cp, *optstr;
++	char *word;
+ 	MSGFACILITY *msgfac;
+ 
+ 	if (msgstr == NULL)
+@@ -308,7 +308,7 @@
+ 		if (doset) {
+ 			char *mcp;
+ 
+-			if (mcp = setmsgtypes(msgfac, cp))
++			if ((mcp = setmsgtypes(msgfac, cp)))
+ 				return(mcp);
+ 		}
+ 	}
+@@ -462,8 +462,9 @@
+ 		return;
+ 
+ 	if (!msgfac->mf_fptr) {
+-		register char *cp;
++		char *cp;
+ 		char *getenv();
++		int fd;
+ 
+ 		/*
+ 		 * Create and open a new temporary file
+@@ -475,7 +476,10 @@
+ 		(void) sprintf(tempfile, "%s/%s", cp, _RDIST_TMP);
+ 
+ 		msgfac->mf_filename = tempfile;
+-		(void) mktemp(msgfac->mf_filename);
++		fd = mkstemp(msgfac->mf_filename);
++			if (fd < 0)
++				fatalerr("Cannot open notify file for writing: %s: %s.", msgfac->mf_filename, SYSERR);
++		close(fd);
+ 		if ((msgfac->mf_fptr = fopen(msgfac->mf_filename, "w"))==NULL)
+ 			fatalerr("Cannot open notify file for writing: %s: %s.",
+ 			      msgfac->mf_filename, SYSERR);
+@@ -515,15 +519,15 @@
+ 	int flags;
+ 	char *msgbuf;
+ {
+-	register int i, x;
+-	register char *cp;
++	int i, x;
++	char *cp;
+ 	static char mbuf[2048];
+ 
+ 	if (msgbuf && *msgbuf) {
+ 		/*
+ 		 * Ensure no stray newlines are present
+ 		 */
+-		if (cp = strchr(msgbuf, '\n'))
++		if ((cp = strchr(msgbuf, '\n')))
+ 			*cp = CNULL;
+ 
+ 		checkhostname();
+@@ -863,7 +867,7 @@
+  */
+ extern char *getnotifyfile()
+ {
+-	register int i;
++	int i;
+ 
+ 	for (i = 0; msgfacility[i].mf_name; i++)
+ 		if (msgfacility[i].mf_msgfac == MF_NOTIFY &&
+--- rdist-6.1.5/src/setargs.c.cleanup	2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/setargs.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: setargs.c,v 6.5 1998/11/10 04:15:56 mcooper Exp $";
+ 
+@@ -66,12 +66,12 @@
+ /*
+  * Settup things for using setproctitle()
+  */
+-setargs_settup(argc, argv, envp)
++void setargs_settup(argc, argv, envp)
+ 	int			argc;
+ 	char		      **argv;
+ 	char		      **envp;
+ {
+-	register int 		i;
++	int 		i;
+ 	extern char 	      **environ;
+ 
+   	/* Remember the User Environment */
+@@ -92,10 +92,10 @@
+ /*
+  * Set process title
+  */
+-extern void _setproctitle(msg)
++void _setproctitle(msg)
+         char *msg;
+ {
+-	register int i;
++	int i;
+ 	char *p;
+ 	
+ 	p = Argv[0];
+@@ -119,7 +119,7 @@
+ /*
+  * Varargs front-end to _setproctitle()
+  */
+-extern void setproctitle(va_alist)
++void setproctitle(va_alist)
+ 	va_dcl
+ {
+ 	static char buf[BUFSIZ];
+@@ -138,7 +138,7 @@
+ /*
+  * Stdarg front-end to _setproctitle()
+  */
+-extern void setproctitle(char *fmt, ...)
++void setproctitle(char *fmt, ...)
+ {
+ 	static char buf[BUFSIZ];
+ 	va_list args;
+@@ -155,7 +155,7 @@
+  * Non-Varargs front-end to _setproctitle()
+  */
+ /*VARARGS1*/
+-extern void setproctitle(fmt, a1, a2, a3, a4, a5, a6)
++void setproctitle(fmt, a1, a2, a3, a4, a5, a6)
+ 	char *fmt;
+ {
+ 	static char buf[BUFSIZ];
+--- rdist-6.1.5/src/rdistd.c.cleanup	1998-11-10 05:14:06.000000000 +0100
++++ rdist-6.1.5/src/rdistd.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: rdistd.c,v 6.23 1998/11/10 04:14:06 mcooper Exp $";
+ 
+@@ -53,21 +53,12 @@
+ 
+ #include "defs.h"
+ 
+-/*
+- * Print usage message
+- */
+-static void usage()
+-{
+-	fprintf(stderr, "usage: %s -S [ -DV ]\n", progname);
+-	exit(1);
+-}
+-
+ char	localmsglist[] = "syslog=ferror";
+ 
+ /*
+  * The Beginning
+  */
+-main(argc, argv, envp)
++int main(argc, argv, envp)
+ 	int argc;
+ 	char **argv;
+ 	char **envp;
+@@ -95,7 +86,8 @@
+ 		case '?':
+ 		default:
+ 			error("Bad command line option.");
+-			usage();
++			fprintf(stderr, "usage: %s -S [ -DV ]\n", progname);
++			exit(1);
+ 		}
+ 
+ 	if (!isserver) {
+@@ -108,7 +100,7 @@
+ 	rem_w = fileno(stdout);
+ 
+ 	/* Set logging */
+-	if (cp = msgparseopts(localmsglist, TRUE))
++	if ((cp = msgparseopts(localmsglist, TRUE)))
+ 		fatalerr("Bad message logging option (%s): %s", 
+ 			 localmsglist, cp);
+ 
+--- rdist-6.1.5/src/server.c.cleanup	2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/server.c	2003-12-17 11:38:16.000000000 +0100
+@@ -37,7 +37,7 @@
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  */
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: server.c,v 6.86 1998/11/10 04:15:31 mcooper Exp $";
+ 
+@@ -197,7 +197,7 @@
+ 	static UID_T last_uid = (UID_T)-2;
+ 	static GID_T last_primegid;
+ 	extern char *locuser;
+-	register int i;
++	int i;
+ 	UID_T uid;
+ 	GID_T gid;
+ 	GID_T primegid = (GID_T)-2;
+@@ -252,7 +252,7 @@
+ 	        /*
+ 		 * Invalid cached values so we need to do a new lookup.
+ 		 */
+-		if (gr = mygetgroup(group)) {
++		if ((gr = mygetgroup(group))) {
+ 			last_gid = gid = gr->gr_gid;
+ 			strcpy(last_group, gr->gr_name);
+ 		} else {
+@@ -325,7 +325,7 @@
+ {
+ 	DIR *d;
+ 	static DIRENTRY *dp;
+-	register char *cp;
++	char *cp;
+ 	struct stat stb;
+ 	char *optarget;
+ 	int len, failures = 0;
+@@ -362,7 +362,7 @@
+ 
+ 	optarget = ptarget;
+ 	len = ptarget - target;
+-	while (dp = readdir(d)) {
++	while ((dp = readdir(d))) {
+ 		if ((D_NAMLEN(dp) == 1 && dp->d_name[0] == '.') ||
+ 		    (D_NAMLEN(dp) == 2 && dp->d_name[0] == '.' &&
+ 		     dp->d_name[1] == '.'))
+@@ -376,7 +376,7 @@
+ 		ptarget = optarget;
+ 		*ptarget++ = '/';
+ 		cp = dp->d_name;;
+-		while (*ptarget++ = *cp++)
++		while ((*ptarget++ = *cp++))
+ 			;
+ 		ptarget--;
+ 		if (lstat(target, &stb) < 0) {
+@@ -414,10 +414,10 @@
+  * for extraneous files and remove them.
+  */
+ static void doclean(cp)
+-	register char *cp;
++	char *cp;
+ {
+ 	DIR *d;
+-	register DIRENTRY *dp;
++	DIRENTRY *dp;
+ 	struct stat stb;
+ 	char *optarget, *ep;
+ 	int len;
+@@ -436,7 +436,7 @@
+ 
+ 	optarget = ptarget;
+ 	len = ptarget - target;
+-	while (dp = readdir(d)) {
++	while ((dp = readdir(d))) {
+ 		if ((D_NAMLEN(dp) == 1 && dp->d_name[0] == '.') ||
+ 		    (D_NAMLEN(dp) == 2 && dp->d_name[0] == '.' &&
+ 		     dp->d_name[1] == '.'))
+@@ -450,7 +450,7 @@
+ 		ptarget = optarget;
+ 		*ptarget++ = '/';
+ 		cp = dp->d_name;;
+-		while (*ptarget++ = *cp++)
++		while ((*ptarget++ = *cp++))
+ 			;
+ 		ptarget--;
+ 		if (lstat(target, &stb) < 0) {
+@@ -481,7 +481,7 @@
+  * Frontend to doclean().
+  */
+ static void clean(cp)
+-	register char *cp;
++	char *cp;
+ {
+ 	doclean(cp);
+ 	(void) sendcmd(CC_END, NULL);
+@@ -509,7 +509,7 @@
+  */
+ static void docmdspecial()
+ {
+-	register char *cp;
++	char *cp;
+ 	char *cmd, *env = NULL;
+ 	int n;
+ 	int len;
+@@ -667,7 +667,7 @@
+ 	char *name;
+ 	opt_t opts;
+ {
+-	register char *cp;
++	char *cp;
+ 	struct stat stb;
+ 	int r = -1;
+ 
+@@ -760,7 +760,7 @@
+ {
+ 	int f, wrerr, olderrno, lastwashole = 0, wassparse = 0;
+ 	off_t i;
+-	register char *cp;
++	char *cp;
+ 	char *savefile = NULL;
+ 	static struct stat statbuff;
+ 
+@@ -987,7 +987,7 @@
+ 	char *owner, *group;
+ {
+ 	static char lowner[100], lgroup[100];
+-	register char *cp;
++	char *cp;
+ 	struct stat stb;
+ 	int s;
+ 
+@@ -1044,7 +1044,7 @@
+ 
+ 				o = (owner[0] == ':') ? opts & DO_NUMCHKOWNER :
+ 					opts;
+-				if (cp = getusername(stb.st_uid, target, o))
++				if ((cp = getusername(stb.st_uid, target, o)))
+ 					if (strcmp(owner, cp))
+ 						(void) strcpy(lowner, cp);
+ 			}
+@@ -1053,7 +1053,7 @@
+ 
+ 				o = (group[0] == ':') ? opts & DO_NUMCHKGROUP :
+ 					opts;
+-				if (cp = getgroupname(stb.st_gid, target, o))
++				if ((cp = getgroupname(stb.st_gid, target, o)))
+ 					if (strcmp(group, cp))
+ 						(void) strcpy(lgroup, cp);
+ 			}
+@@ -1107,8 +1107,8 @@
+ 	if (s < 0) {
+ 		if (errno == ENOENT) {
+ 			if (mkdir(target, mode) == 0 ||
+-			    chkparent(target, opts) == 0 && 
+-			    mkdir(target, mode) == 0) {
++			    (chkparent(target, opts) == 0 && 
++			     mkdir(target, mode) == 0)) {
+ 				message(MT_NOTICE, "%s: mkdir", target);
+ 				(void) fchog(-1, target, owner, group, mode);
+ 				ack();
+@@ -1304,7 +1304,7 @@
+ static void setconfig(cmd)
+ 	char *cmd;
+ {
+-	register char *cp = cmd;
++	char *cp = cmd;
+ 	char *estr;
+ 
+ 	switch (*cp++) {
+@@ -1338,7 +1338,7 @@
+ 		break;
+ 
+ 	case SC_LOGGING:	/* Logging options */
+-		if (estr = msgparseopts(cp, TRUE)) {
++		if ((estr = msgparseopts(cp, TRUE))) {
+ 			fatalerr("Bad message option string (%s): %s", 
+ 				 cp, estr);
+ 			return;
+@@ -1455,7 +1455,7 @@
+ 		sptarget[catname] = ptarget;
+ 		if (catname++) {
+ 			*ptarget++ = '/';
+-			while (*ptarget++ = *file++)
++			while ((*ptarget++ = *file++))
+ 			    ;
+ 			ptarget--;
+ 		}
+@@ -1463,6 +1463,7 @@
+ 		/*
+ 		 * Create name of temporary file
+ 		 */
++		int fd;
+ 		if (catname && cattarget(file) < 0) {
+ 			error("Cannot set file name.");
+ 			return;
+@@ -1477,7 +1478,12 @@
+ 			(void) sprintf(new, "%s/%s", target, tempname);
+ 			*file = '/';
+ 		}
+-		(void) mktemp(new);
++		fd = mkstemp(new);
++		if (fd < 0) {
++			error("Cannot set file name.");
++			return;
++		}
++		close(fd);
+ 	}
+ 
+ 	/*
+@@ -1581,8 +1587,8 @@
+ extern void server()
+ {
+ 	static char cmdbuf[BUFSIZ];
+-	register char *cp;
+-	register int n;
++	char *cp;
++	int n;
+ 	extern jmp_buf finish_jmpbuf;
+ 
+ 	if (setjmp(finish_jmpbuf)) {
+--- rdist-6.1.5/src/filesys.c.cleanup	1998-11-10 05:10:18.000000000 +0100
++++ rdist-6.1.5/src/filesys.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: filesys.c,v 6.25 1998/11/10 04:10:17 mcooper Exp $";
+ 
+@@ -72,7 +72,7 @@
+ 	static char last_pathname[MAXPATHLEN];
+ 	static char file[MAXPATHLEN + 3];
+ 	static struct stat filestat;
+-	register char *p;
++	char *p;
+ 
+ 	/*
+ 	 * Mark the statbuf as invalid to start with.
+@@ -125,7 +125,7 @@
+ 			 * Normally we want to change /dir1/dir2/file
+ 			 * into "/dir1/dir2/."
+ 			 */
+-			if (p = (char *) strrchr(file, '/')) {
++			if ((p = (char *) strrchr(file, '/'))) {
+ 				*++p = '.';
+ 				*++p = CNULL;
+ 			} else {
+@@ -183,7 +183,7 @@
+ 	struct stat *filest;
+ 	struct mntinfo *mntinfo;
+ {
+-	register struct mntinfo *mi;
++	struct mntinfo *mi;
+ 
+ 	for (mi = mntinfo; mi; mi = mi->mi_nxt) {
+ 		if (mi->mi_mnt->me_flags & MEFLAG_IGNORE)
+@@ -202,7 +202,7 @@
+ 	mntent_t *mnt;
+ 	struct mntinfo *mntinfo;
+ {
+-	register struct mntinfo *m;
++	struct mntinfo *m;
+ 
+ 	for (m = mntinfo; m; m = m->mi_nxt)
+ 		if (strcmp(m->mi_mnt->me_path, mnt->me_path) == 0)
+@@ -247,7 +247,7 @@
+ 	}
+ 
+ 	mntinfo = mi;
+-	while (mnt = getmountent(mfp)) {
++	while ((mnt = getmountent(mfp))) {
+ 		debugmsg(DM_MISC, "mountent = '%s' (%s)", 
+ 			 mnt->me_path, mnt->me_type);
+ 
+@@ -308,7 +308,7 @@
+ 	static struct stat filestat;
+ 	struct stat *pstat;
+ 	struct mntinfo *tmpmi;
+-	register mntent_t *mnt;
++	mntent_t *mnt;
+ 
+ 	/*
+ 	 * Use the supplied stat buffer if not NULL or our own.
+@@ -330,16 +330,16 @@
+ 	/*
+ 	 * Find the mnt that pathname is on.
+ 	 */
+-	if (mnt = findmnt(pstat, mntinfo))
++	if ((mnt = findmnt(pstat, mntinfo)))
+ 		return(mnt);
+ 
+ 	/*
+ 	 * We failed to find correct mnt, so maybe it's a newly
+ 	 * mounted filesystem.  We rebuild mntinfo and try again.
+ 	 */
+-	if (tmpmi = makemntinfo(mntinfo)) {
++	if ((tmpmi = makemntinfo(mntinfo))) {
+ 		mntinfo = tmpmi;
+-		if (mnt = findmnt(pstat, mntinfo))
++		if ((mnt = findmnt(pstat, mntinfo)))
+ 			return(mnt);
+ 	}
+ 
+--- rdist-6.1.5/src/filesys-os.c.cleanup	1998-11-10 05:09:59.000000000 +0100
++++ rdist-6.1.5/src/filesys-os.c	2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#ifndef lint
++#if 0
+ static char RCSid[] = 
+ "$Id: filesys-os.c,v 6.18 1998/11/10 04:09:58 mcooper Exp $";
+ 
+@@ -314,7 +314,7 @@
+ 
+ 	bzero((char *)&me, sizeof(mntent_t));
+ 
+-	if (mntent = getmntent(fptr)) {
++	if ((mntent = getmntent(fptr))) {
+ 		me.me_path = mntent->mnt_dir;
+ 		me.me_type = mntent->mnt_type;
+ 		if (mntent->mnt_opts && hasmntopt(mntent, MNTOPT_RO))
+--- rdist-6.1.5/src/strcasecmp.c.cleanup	1998-11-10 05:16:52.000000000 +0100
++++ rdist-6.1.5/src/strcasecmp.c	2003-12-17 11:38:16.000000000 +0100
+@@ -51,9 +51,9 @@
+ };
+ 
+ strcasecmp(s1, s2)
+-	register char *s1, *s2;
++	char *s1, *s2;
+ {
+-	register char *cm = charmap;
++	char *cm = charmap;
+ 
+ 	while (cm[*s1] == cm[*s2++])
+ 		if (*s1++ == '\0')
+@@ -62,10 +62,10 @@
+ }
+ 
+ strncasecmp(s1, s2, n)
+-	register char *s1, *s2;
+-	register int n;
++	char *s1, *s2;
++	int n;
+ {
+-	register char *cm = charmap;
++	char *cm = charmap;
+ 
+ 	while (--n >= 0 && cm[*s1] == cm[*s2++])
+ 		if (*s1++ == '\0')
+--- rdist-6.1.5/src/strtol.c.cleanup	1994-03-17 00:25:50.000000000 +0100
++++ rdist-6.1.5/src/strtol.c	2003-12-17 11:38:16.000000000 +0100
+@@ -54,13 +54,13 @@
+ strtol(nptr, endptr, base)
+ 	char *nptr;
+ 	char **endptr;
+-	register int base;
++	int base;
+ {
+-	register char *s = nptr;
+-	register unsigned long acc;
+-	register int c;
+-	register unsigned long cutoff;
+-	register int neg = 0, any, cutlim;
++	char *s = nptr;
++	unsigned long acc;
++	int c;
++	unsigned long cutoff;
++	int neg = 0, any, cutlim;
+ 
+ 	/*
+ 	 * Skip white space and pick up leading +/- sign if any.
+--- rdist-6.1.5/src/regex.c.cleanup	1998-11-10 05:14:28.000000000 +0100
++++ rdist-6.1.5/src/regex.c	2003-12-17 11:39:14.000000000 +0100
+@@ -142,10 +142,8 @@
+  */
+ char *
+ re_comp(sp)
+-	register char	*sp;
+ {
+-	register int	c;
+-	register char	*ep = expbuf;
++	char	*ep = expbuf;
+ 	int	cclcnt, numbra = 0;
+ 	char	*lastep = 0;
+ 	char	bracket[NBRA];
+@@ -266,10 +264,10 @@
+  */
+ int
+ re_exec(p1)
+-	register char	*p1;
++	char	*p1;
+ {
+-	register char	*p2 = expbuf;
+-	register int	c;
++	char	*p2 = expbuf;
++	int	c;
+ 	int	rv;
+ 
+ 	for (c = 0; c < NBRA; c++) {
+@@ -306,9 +304,9 @@
+  */
+ static	int
+ advance(lp, ep)
+-	register char	*lp, *ep;
++	char	*lp, *ep;
+ {
+-	register char	*curlp;
++	char	*curlp;
+ 	int	ct, i;
+ 	int	rv;
+ 
+@@ -413,10 +411,10 @@
+ }
+ 
+ backref(i, lp)
+-	register int	i;
+-	register char	*lp;
++	int	i;
++	char	*lp;
+ {
+-	register char	*bp;
++	char	*bp;
+ 
+ 	bp = braslist[i];
+ 	while (*bp++ == *lp++)
+@@ -427,10 +425,10 @@
+ 
+ int
+ cclass(set, c, af)
+-	register char	*set, c;
++	char	*set, c;
+ 	int	af;
+ {
+-	register int	n;
++	int	n;
+ 
+ 	if (c == 0)
+ 		return(0);
+--- rdist-6.1.5/include/defs.h.cleanup	2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/include/defs.h	2003-12-17 11:38:16.000000000 +0100
+@@ -30,11 +30,13 @@
+ #include <grp.h>
+ #include <syslog.h>
+ #include <setjmp.h>
++#include <time.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/file.h>
+-#include <sys/time.h>
+ #include <sys/stat.h>
++#include <sys/wait.h>
++#include <sys/socket.h>
+ 
+ #include "version.h"
+ #include "config-def.h"
+@@ -48,6 +50,9 @@
+ #endif	/* yacc */
+ 
+ #include <signal.h>
++#define _REGEX_RE_COMP
++#include <regex.h>
++
+ 
+ /*
+  * This belongs in os-svr4.h but many SVR4 OS's
+@@ -321,12 +326,11 @@
+ /*
+  * Our own declarations.
+  */
+-char			       *exptilde();
+ char			       *makestr();
+ char	       		       *xcalloc();
+ char	       		       *xmalloc();
+ char	       		       *xrealloc();
+-extern char		       *xbasename();
++extern char		       *exptilde();
+ extern char		       *getdistoptlist();
+ extern char		       *getgroupname();
+ extern char		       *getnlstr();
+@@ -336,44 +340,75 @@
+ extern char		       *getversion();
+ extern char		       *msgparseopts();
+ extern char		       *searchpath();
++extern char		       *xbasename();
++extern int			amatch();
+ extern int			any();
++extern int			becomeroot();
++extern int			becomeuser();
++extern int			except();
++extern int			execbrc();
++extern int			getfilesysinfo();
++extern int			getsocketpair();
+ extern int			init();
+ extern int			install();
+ extern int			isexec();
++extern int			is_nfs_mounted();
++extern int			is_ro_mounted();
++extern int			is_symlinked();
++extern int			match();
++extern int			okname();
+ extern int			parsedistopts();
++extern int			readrem();
+ extern int			remline();
++extern int			response();
++extern int			rshrcmd();
+ extern int			setfiletime();
++extern int			setnonblocking();
+ extern int			spawn();
++extern int			yylex();
++extern int			yyparse();
+ extern struct subcmd 	       *makesubcmd();
++extern void			append();
+ extern void			checkhostname();
+ extern void			cleanup();
+ extern void			complain();
++extern void			coredump();
++extern void			define();
++extern void			docmdargs();
+ extern void			docmds();
+ extern void			finish();
+-extern void			log();
++extern void			freelinkinfo();
++extern void			insert();
+ extern void			logmsg();
+ extern void			lostconn();
+ extern void			markassigned();
++extern void			msgprconfig();
+ extern void			msgprusage();
++extern void			mysetlinebuf();
+ extern void			note();
+ extern void			runcmdspecial();
+ extern void			runcommand();
+ extern void			server();
++extern void			setargs_settup();
+ extern void			setprogname();
+ extern void			sighandler();
++extern void			usage();
+ extern void			waitup();
++extern void			yyerror();
++extern WRITE_RETURN_T		xwrite();
+ struct namelist		       *expand();
+ struct namelist		       *lookup();
+ struct namelist		       *makenl();
+-extern WRITE_RETURN_T		xwrite();
+ 
+ #if	defined(ARG_TYPE) && ARG_TYPE == ARG_STDARG
++extern int			sendcmd(char cmd, char *fmt, ...);
+ extern void			debugmsg(int, char *, ...);
+ extern void			error(char *, ...);
+ extern void			fatalerr(char *, ...);
+ extern void			message(int, char *, ...);
+ extern void			setproctitle(char *fmt, ...);
+ #else
++extern int			sendcmd(va_alist);
+ extern void			debugmsg();
+ extern void			error();
+ extern void			fatalerr();
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch
new file mode 100644
index 0000000..d183d91
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/message.c.thestokes	2006-04-19 17:30:39.000000000 -0400
++++ rdist-6.1.5/src/message.c	2006-04-19 17:36:37.000000000 -0400
+@@ -793,15 +793,20 @@
+ 	char *msg;
+ {
+ 	static char buf[MSGBUFSIZ];
+-
+-	++nerrs;
+-
+-	if (isserver)
+-		(void) sprintf(buf, "REMOTE ERROR: %s", msg);
+-	else
+-		(void) sprintf(buf, "LOCAL ERROR: %s", msg);
+-
+-	_message(MT_FERROR, buf);
++	/* Don't reenter this function. There is a nasty infinite recursion
++	   case that pops up when msgsndnotify tries to exit. */
++	static int inside=0; 
++
++	if(inside==0){
++	        ++nerrs;
++		inside=1;
++
++	        if (isserver)
++		        (void) sprintf(buf, "REMOTE ERROR: %s", msg);
++	        else
++		        (void) sprintf(buf, "LOCAL ERROR: %s", msg);
++		_message(MT_FERROR, buf);
++	}
+ 
+ 	exit(nerrs);
+ }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch
new file mode 100644
index 0000000..baf8e30
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/client.c.hardlink	Thu Jun  3 13:56:31 1999
++++ rdist-6.1.5/src/client.c	Thu Jun  3 14:00:06 1999
+@@ -348,7 +348,7 @@
+ 		lp->target = strdup(Tdest);
+ 	else
+ 		lp->target = NULL;
+-	if (!lp->pathname || !lp->src || !(Tdest && lp->target))
++	if (!lp->pathname || !lp->src || (Tdest && !lp->target))
+ 		fatalerr("Cannot malloc memory in linkinfo.");
+ 
+ 	return((struct linkbuf *) NULL);
+@@ -370,7 +370,7 @@
+ 	       "sendhardlink: rname='%s' pathname='%s' src='%s' target='%s'\n",
+ 		 rname, lp->pathname, lp->src, lp->target);
+ 		 
+-	if (*lp->target == CNULL)
++	if (lp->target == NULL || *lp->target == CNULL)
+ 		(void) sendcmd(C_RECVHARDLINK, "%o %s %s", 
+ 			       opts, lp->pathname, rname);
+ 	else {
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch
new file mode 100644
index 0000000..3fa8db8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch
@@ -0,0 +1,142 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/client.c.lfs	2003-12-16 23:43:56.000000000 +0100
++++ rdist-6.1.5/src/client.c	2003-12-16 23:46:56.000000000 +0100
+@@ -414,9 +414,9 @@
+ 	/*
+ 	 * Send file info
+ 	 */
+-	(void) sendcmd(C_RECVREG, "%o %04o %ld %ld %ld %s %s %s", 
++	(void) sendcmd(C_RECVREG, "%o %04o %lld %ld %ld %s %s %s", 
+ 		       opts, stb->st_mode & 07777, 
+-		       (long) stb->st_size, 
++		       (off_t) stb->st_size, 
+ 		       stb->st_mtime, stb->st_atime,
+ 		       user, group, rname);
+ 	if (response() < 0) {
+@@ -424,8 +424,8 @@
+ 		return(-1);
+ 	}
+ 
+-	debugmsg(DM_MISC, "Send file '%s' %d bytes\n", 
+-		 rname, (long) stb->st_size);
++	debugmsg(DM_MISC, "Send file '%s' %lld bytes\n", 
++		 rname, (off_t) stb->st_size);
+ 
+ 	/*
+ 	 * Set remote time out alarm handler.
+@@ -676,9 +676,9 @@
+ 	/*
+ 	 * Gather and send basic link info
+ 	 */
+-	(void) sendcmd(C_RECVSYMLINK, "%o %04o %ld %ld %ld %s %s %s", 
++	(void) sendcmd(C_RECVSYMLINK, "%o %04o %lld %ld %ld %s %s %s", 
+ 		       opts, stb->st_mode & 07777, 
+-		       (long) stb->st_size, 
++		       (off_t) stb->st_size, 
+ 		       stb->st_mtime, stb->st_atime,
+ 		       user, group, rname);
+ 	if (response() < 0)
+@@ -858,7 +858,7 @@
+ 	/*
+ 	 * Parse size
+ 	 */
+-	size = strtol(cp, &cp, 10);
++	size = strtoll(cp, &cp, 10);
+ 	if (*cp++ != ' ') {
+ 		error("update: size not delimited");
+ 		return(US_NOTHING);
+@@ -910,8 +910,8 @@
+ 
+ 	debugmsg(DM_MISC, "update(%s,) local mode %04o remote mode %04o\n", 
+ 		 rname, lmode, rmode);
+-	debugmsg(DM_MISC, "update(%s,) size %d mtime %d owner '%s' grp '%s'\n",
+-		 rname, (int) size, mtime, owner, group);
++	debugmsg(DM_MISC, "update(%s,) size %lld mtime %d owner '%s' grp '%s'\n",
++		 rname, (off_t) size, mtime, owner, group);
+ 
+ 	if (statp->st_mtime != mtime) {
+ 		if (statp->st_mtime < mtime && IS_ON(opts, DO_YOUNGER)) {
+@@ -937,8 +937,8 @@
+ 	}
+ 
+ 	if (statp->st_size != size) {
+-		debugmsg(DM_MISC, "size does not match (%d != %d).\n",
+-			 (int) statp->st_size, size);
++		debugmsg(DM_MISC, "size does not match (%lld != %lld).\n",
++			 statp->st_size, size);
+ 		return(US_OUTDATE);
+ 	} 
+ 
+--- rdist-6.1.5/src/server.c.lfs	1998-11-10 05:15:31.000000000 +0100
++++ rdist-6.1.5/src/server.c	2003-12-16 23:50:19.000000000 +0100
+@@ -645,8 +645,8 @@
+ 	case S_IFLNK:
+ 	case S_IFDIR:
+ 	case S_IFREG:
+-		(void) sendcmd(QC_YES, "%ld %ld %o %s %s",
+-			       (long) stb.st_size, 
++		(void) sendcmd(QC_YES, "%lld %ld %o %s %s",
++			       (off_t) stb.st_size, 
+ 			       stb.st_mtime, 
+ 			       stb.st_mode & 07777,
+ 			       getusername(stb.st_uid, target, options), 
+@@ -1388,7 +1388,7 @@
+ 	/*
+ 	 * Get file size
+ 	 */
+-	size = strtol(cp, &cp, 10);
++	size = strtoll(cp, &cp, 10);
+ 	if (*cp++ != ' ') {
+ 		error("recvit: size not delimited");
+ 		return;
+@@ -1441,7 +1441,7 @@
+ 	}
+ 
+ 	debugmsg(DM_MISC,
+-		 "recvit: opts = %04o mode = %04o size = %d mtime = %d",
++		 "recvit: opts = %04o mode = %04o size = %lld mtime = %d",
+ 		 opts, mode, size, mtime);
+ 	debugmsg(DM_MISC,
+        "recvit: owner = '%s' group = '%s' file = '%s' catname = %d isdir = %d",
+--- rdist-6.1.5/include/defs.h.lfs	2003-12-16 23:43:56.000000000 +0100
++++ rdist-6.1.5/include/defs.h	2003-12-16 23:43:56.000000000 +0100
+@@ -22,6 +22,8 @@
+ #include <stdlib.h>
+ #endif	/* _POSIX_SOURCE */
+ #include <stdio.h>
++#include <string.h>
++#include <mntent.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <pwd.h>
+@@ -317,15 +319,6 @@
+ #endif /* USE_STATDB */
+ 
+ /*
+- * System function declarations
+- */
+-char 			       *hasmntopt();
+-char			       *strchr();
+-char		 	       *strdup();
+-char		 	       *strrchr();
+-char 			       *strtok();
+-
+-/*
+  * Our own declarations.
+  */
+ char			       *exptilde();
+--- rdist-6.1.5/Makefile.local.lfs	1998-11-10 04:36:31.000000000 +0100
++++ rdist-6.1.5/Makefile.local	2003-12-16 23:43:56.000000000 +0100
+@@ -20,7 +20,7 @@
+ # Add any local definitions you want pass to the compiler to DEFS_LOCAL
+ # below.  This includes those items found in "config/config.h".
+ #
+-#DEFS_LOCAL	= -DDIRECT_RCMD
++DEFS_LOCAL	= -O2 -g -pipe -Wall -D_POSIX_SOURCE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ 
+ #
+ # Add any local libraries that your system might need to LIBS_LOCAL below.
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch
new file mode 100644
index 0000000..e9994f2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch
@@ -0,0 +1,79 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/client.c.links	Wed Feb 17 17:46:09 1999
++++ rdist-6.1.5/src/client.c	Wed Feb 17 17:51:15 1999
+@@ -309,6 +309,18 @@
+ 	return(0);
+ }
+ 
++void freelinkinfo(lp)
++	struct linkbuf *lp;
++{
++	if (lp->pathname)
++		free(lp->pathname);
++	if (lp->src)
++		free(lp->src);
++	if (lp->target)
++		free(lp->target);
++	free(lp);
++}
++
+ /*
+  * Save and retrieve hard link info
+  */
+@@ -317,6 +329,7 @@
+ {
+ 	struct linkbuf *lp;
+ 
++	/* xxx: linear search doesn't scale with many links */
+ 	for (lp = ihead; lp != NULL; lp = lp->nextp)
+ 		if (lp->inum == statp->st_ino && lp->devnum == statp->st_dev) {
+ 			lp->count--;
+@@ -329,12 +342,14 @@
+ 	lp->inum = statp->st_ino;
+ 	lp->devnum = statp->st_dev;
+ 	lp->count = statp->st_nlink - 1;
+-	(void) strcpy(lp->pathname, target);
+-	(void) strcpy(lp->src, source);
++	lp->pathname = strdup(target);
++	lp->src = strdup(source);
+ 	if (Tdest)
+-		(void) strcpy(lp->target, Tdest);
++		lp->target = strdup(Tdest);
+ 	else
+-		*lp->target = CNULL;
++		lp->target = NULL;
++	if (!lp->pathname || !lp->src || !(Tdest && lp->target))
++		fatalerr("Cannot malloc memory in linkinfo.");
+ 
+ 	return((struct linkbuf *) NULL);
+ }
+--- rdist-6.1.5/src/docmd.c.links	Wed Feb 17 17:51:23 1999
++++ rdist-6.1.5/src/docmd.c	Wed Feb 17 17:52:44 1999
+@@ -586,7 +586,7 @@
+ 	if (!nflag) {
+ 		register struct linkbuf *nextl, *l;
+ 
+-		for (l = ihead; l != NULL; free((char *)l), l = nextl) {
++		for (l = ihead; l != NULL; freelinkinfo(l), l = nextl) {
+ 			nextl = l->nextp;
+ 			if (contimedout || IS_ON(opts, DO_IGNLNKS) || 
+ 			    l->count == 0)
+--- rdist-6.1.5/include/defs.h.links	Wed Feb 17 17:52:58 1999
++++ rdist-6.1.5/include/defs.h	Wed Feb 17 17:53:47 1999
+@@ -276,9 +276,9 @@
+ 	ino_t	inum;
+ 	dev_t	devnum;
+ 	int	count;
+-	char	pathname[BUFSIZ];
+-	char	src[BUFSIZ];
+-	char	target[BUFSIZ];
++	char	*pathname;
++	char	*src;
++	char	*target;
+ 	struct	linkbuf *nextp;
+ };
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch
new file mode 100644
index 0000000..b56fd38
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+diff: rdist-6.1.5/config/mf: No such file or directory
+--- rdist-6.1.5/config/os-linux.h.linux	Mon Nov  9 22:59:59 1998
++++ rdist-6.1.5/config/os-linux.h	Thu Nov 12 14:50:35 1998
+@@ -58,7 +58,7 @@
+ /*
+  * Select the type of executable file format.
+  */
+-#define EXE_TYPE	EXE_AOUT
++#define EXE_TYPE	EXE_ELF
+ 
+ /*
+  * Select the type of statfs() system call (if any).
+--- rdist-6.1.5/mf/Makefile.var.linux	Tue Nov 10 00:02:11 1998
++++ rdist-6.1.5/mf/Makefile.var	Thu Nov 12 14:50:35 1998
+@@ -67,7 +67,7 @@
+ #
+ # Name of YACC.
+ #
+-#YACC 		= bison -y
++YACC 		= bison -y
+ 
+ OPT		= -g
+ RM		= rm
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch
new file mode 100644
index 0000000..cc82e16
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch
@@ -0,0 +1,23 @@
+Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable.
+
+Upstream-Status: Inappropriate [no upstream]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/src/Makefile.real b/src/Makefile.real
+index 02179e4..9070974 100644
+--- a/src/Makefile.real
++++ b/src/Makefile.real
+@@ -36,10 +36,10 @@ all: src
+ src: $(CLIENT_BIN) $(SERVER_BIN)
+ 
+ $(SERVER_BIN): $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS)
+-	$(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS)
++	$(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS)
+ 
+ $(CLIENT_BIN): $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS)
+-	$(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS)
++	$(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS)
+ 
+ $(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch
new file mode 100644
index 0000000..e816394
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:rdist
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/setargs.c.maxargs	1998-11-10 05:15:56.000000000 +0100
++++ rdist-6.1.5/src/setargs.c	2003-09-04 14:39:03.000000000 +0200
+@@ -58,7 +58,7 @@
+  * Set process argument functions
+  */
+ 
+-#define MAXUSERENVIRON 		40
++#define MAXUSERENVIRON 		1024
+ char 			      **Argv = NULL;
+ char 			       *LastArgv = NULL;
+ char 			       *UserEnviron[MAXUSERENVIRON+1];
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
new file mode 100644
index 0000000..e49e3e4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/server.c.mkstemp	2004-05-25 14:29:37.279312752 +0200
++++ rdist-6.1.5/src/server.c	2004-05-25 14:31:27.050744340 +0200
+@@ -1479,11 +1479,18 @@
+ 			*file = '/';
+ 		}
+ 		fd = mkstemp(new);
+-		if (fd < 0) {
++		/* 
++		 * Don't consider it a fatal error if mkstemp() fails
++		 * because parent directory didn't exist. (Missing 
++		 * parents are created later (in recvfile())
++		 */
++		if ((fd < 0) && (errno != ENOENT)) {
+ 			error("Cannot set file name.");
+ 			return;
++		} else if (fd >= 0) {
++			close(fd);
++			unlink(new); /* Or symlink() will fail */
+ 		}
+-		close(fd);
+ 	}
+ 
+ 	/*
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch
new file mode 100644
index 0000000..493b183
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch
@@ -0,0 +1,59 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/config/config.h.oldpath	Tue Nov 10 04:59:48 1998
++++ rdist-6.1.5/config/config.h	Thu Jan 31 17:33:21 2002
+@@ -39,7 +39,7 @@
+  * don't have the old rdist, then uncomment the "#undef" line.
+  */
+ #ifndef _PATH_OLDRDIST
+-#define _PATH_OLDRDIST	"/usr/ucb/oldrdist"	/* Enable compat */
++#define _PATH_OLDRDIST	"/usr/bin/oldrdist"	/* Enable compat */
+ #endif
+ /*#undef  _PATH_OLDRDIST*/				/* Disable compat */
+ 
+--- rdist-6.1.5/doc/rdist.man.oldpath	Tue Nov 10 06:38:53 1998
++++ rdist-6.1.5/doc/rdist.man	Thu Jan 31 17:36:57 2002
+@@ -170,10 +170,9 @@
+ This option will only work if 
+ .I rdist
+ was compiled with the location of the old rdist
+-(usually either
+-.I /usr/ucb/oldrdist
+-or
+-.I /usr/old/rdist)
++(the path
++.I /usr/bin/oldrdist
++is used on Red Hat linux)
+ and that program is available at run time.
+ .PP
+ .I Rdist
+@@ -558,7 +557,7 @@
+ should be of form
+ .sp
+ .RS
+-\fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes...
++\fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes...\fR
+ .RE
+ .sp
+ The valid facility names are:
+--- rdist-6.1.5/README.oldpath	Fri Jul 19 19:24:09 1996
++++ rdist-6.1.5/README	Thu Jan 31 17:33:21 2002
+@@ -65,12 +65,12 @@
+ 
+ The way the old rdist started a server rdist is to run "rdist
+ -Server".  If the new rdist is run with the "-Server" option, then it
+-will exec a copy of the old rdist (usually /usr/old/rdist or
+-/usr/ucb/oldrdist).  In this way, you get compatibility with hosts
++will exec a copy of the old rdist (the path /usr/bin/oldrdist in Red
++Hat linux).  In this way, you get compatibility with hosts
+ running the old rdist attempting to rdist to a machine running new
+ rdist.  If your host running new rdist wants to rdist to a host
+ running the old rdist, then it must run the old rdist program
+-(/usr/old/rdist or /usr/ucb/oldrdist).
++(/usr/bin/oldrdist in Red Hat linux).
+ 
+ The definition _PATH_OLDRDIST in "config/config.h" controls the
+ location of the old rdist.  If this is not defined, or the defined
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch
new file mode 100644
index 0000000..d3982cf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/rshrcmd.c.dist	Tue Dec 12 08:20:56 1995
++++ rdist-6.1.5/src/rshrcmd.c	Wed Dec 11 07:14:13 1996
+@@ -64,5 +64,5 @@
+ 		   sp[0]. */
+ 		(void) close(sp[0]);
+-		if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0 || dup2(0, 2) < 0) {
++		if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0) {
+ 			error("dup2 failed: %s.", SYSERR);
+ 			_exit(255);
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch
new file mode 100644
index 0000000..b20953e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch
@@ -0,0 +1,85 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/filesys.c.stat64	2005-05-04 14:11:03.000000000 +0200
++++ rdist-6.1.5/src/filesys.c	2005-05-04 14:11:10.000000000 +0200
+@@ -430,8 +430,8 @@
+  */
+ int getfilesysinfo(file, freespace, freefiles)
+ 	char *file;
+-	long *freespace;
+-	long *freefiles;
++	fsblkcnt_t *freespace;
++	fsfilcnt_t *freefiles;
+ {
+ #if	defined(STATFS_TYPE)
+ 	static statfs_t statfsbuf;
+--- rdist-6.1.5/src/server.c.stat64	2005-05-04 14:11:23.000000000 +0200
++++ rdist-6.1.5/src/server.c	2005-05-04 14:20:34.000000000 +0200
+@@ -62,8 +62,8 @@
+ int	catname = 0;		/* cat name to target name */
+ char	*sptarget[32];		/* stack of saved ptarget's for directories */
+ char   *fromhost = NULL;	/* Client hostname */
+-static long min_freespace = 0;	/* Minimium free space on a filesystem */
+-static long min_freefiles = 0;	/* Minimium free # files on a filesystem */
++static fsblkcnt_t min_freespace = 0; /* Minimium free space on a filesystem */
++static fsfilcnt_t min_freefiles = 0; /* Minimium free # files on a filesystem */
+ int	oumask;			/* Old umask */
+ 
+ /*
+@@ -1326,7 +1326,7 @@
+ 			fatalerr("Expected digit, got '%s'.", cp);
+ 			return;
+ 		}
+-		min_freespace = (unsigned long) atoi(cp);
++		min_freespace = (fsblkcnt_t) atoll(cp);
+ 		break;
+ 
+ 	case SC_FREEFILES: 	/* Minimium free files */
+@@ -1334,7 +1334,7 @@
+ 			fatalerr("Expected digit, got '%s'.", cp);
+ 			return;
+ 		}
+-		min_freefiles = (unsigned long) atoi(cp);
++		min_freefiles = (fsfilcnt_t) atoll(cp);
+ 		break;
+ 
+ 	case SC_LOGGING:	/* Logging options */
+@@ -1364,7 +1364,8 @@
+ 	time_t mtime, atime;
+ 	char *owner, *group, *file;
+ 	char new[MAXPATHLEN];
+-	long freespace = -1, freefiles = -1;
++	fsfilcnt_t freefiles = -1;
++	fsblkcnt_t freespace = -1;
+ 	char *cp = cmd;
+ 
+ 	/*
+@@ -1499,7 +1500,7 @@
+ 	 */
+ 	if (min_freespace || min_freefiles) {
+ 		/* Convert file size to kilobytes */
+-		long fsize = (long) (size / 1024);
++		fsblkcnt_t fsize = (fsblkcnt_t) (size / 1024);
+ 
+ 		if (getfilesysinfo(target, &freespace, &freefiles) != 0)
+ 			return;
+@@ -1511,14 +1512,14 @@
+ 		if (min_freespace && (freespace >= 0) && 
+ 		    (freespace - fsize < min_freespace)) {
+ 			error(
+-		     "%s: Not enough free space on filesystem: min %d free %d",
++		     "%s: Not enough free space on filesystem: min %lld free %lld",
+ 			      target, min_freespace, freespace);
+ 			return;
+ 		}
+ 		if (min_freefiles && (freefiles >= 0) &&
+ 		    (freefiles - 1 < min_freefiles)) {
+ 			error(
+-		     "%s: Not enough free files on filesystem: min %d free %d",
++		     "%s: Not enough free files on filesystem: min %lld free %lld",
+ 			      target, min_freefiles, freefiles);
+ 			return;
+ 		}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch
new file mode 100644
index 0000000..bf73b71
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/build/os-type.svr4	2003-12-17 12:44:18.000000000 +0100
++++ rdist-6.1.5/build/os-type	2003-12-17 12:44:29.000000000 +0100
+@@ -83,7 +83,6 @@
+ if [ -z "${OS}" -a ! -z "${uname}" ]; then
+ 	case "`$uname -a | tr '[A-Z]' '[a-z]'`" in
+ 		    osf1*)	OS=break;;
+-		*"4.0"*)	OS=svr4;;	# There has to be a better way
+ 		*" dcosx "*)	OS=dcosx;;
+ 		*"cx/ux"*)	OS=cxux;;
+ 		*"hp-ux"*)	# HP-UX 9.x
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch
new file mode 100644
index 0000000..e6edbc4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/config/os-linux.h.varargs	2003-06-17 17:52:33.000000000 +0200
++++ rdist-6.1.5/config/os-linux.h	2003-06-17 17:53:07.000000000 +0200
+@@ -68,7 +68,7 @@
+ /*
+  * Type of arg functions we have.
+  */
+-#define ARG_TYPE	ARG_VARARGS
++#define ARG_TYPE	ARG_STDARG
+ 
+ /*
+  * Do we have select()?
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb
new file mode 100644
index 0000000..cea1f08
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Remote file distribution client and server"
+DESCRIPTION = "\
+Rdist is a program to maintain identical copies of files over multiple \
+hosts. It preserves the owner, group, mode, and mtime of files if \
+possible and can update programs that are executing. \
+"
+SECTION = "console/network"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://Copyright;md5=3f47ec9f64b11c8192ee05a66b5c2755"
+
+SRC_URI = "http://www.magnicomp.com/download/${BPN}/${BP}.tar.gz"
+SRC_URI[md5sum] = "546779700af70aa5f9103e08782cdcac"
+SRC_URI[sha256sum] = "2bb0d0f5904eadc9e7fe3d60c15389d6897fcf884211070e289a6c710ff37f96"
+
+SRC_URI += "file://rdist-6.1.5-linux.patch \
+            file://rdist-6.1.5-links.patch \
+            file://rdist-6.1.5-oldpath.patch \
+            file://rdist-6.1.5-hardlink.patch \
+            file://rdist-6.1.5-bison.patch \
+            file://rdist-6.1.5-varargs.patch \
+            file://rdist-6.1.5-maxargs.patch \
+            file://rdist-6.1.5-lfs.patch \
+            file://rdist-6.1.5-cleanup.patch \
+            file://rdist-6.1.5-svr4.patch \
+            file://rdist-6.1.5-ssh.patch \
+            file://rdist-6.1.5-mkstemp.patch \
+            file://rdist-6.1.5-stat64.patch \
+            file://rdist-6.1.5-fix-msgsndnotify-loop.patch \
+            file://rdist-6.1.5-bb-build.patch \
+            file://rdist-6.1.5-makefile-add-ldflags.patch \
+"
+
+DEPENDS = "bison-native"
+
+inherit autotools-brokensep
+
+EXTRA_OEMAKE = "BIN_GROUP=root MAN_GROUP=root RDIST_MODE=755 RDISTD_MODE=755 MAN_MODE=644"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
new file mode 100644
index 0000000..eaaf304
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
@@ -0,0 +1,34 @@
+From 2fa326b26dc479942367dc4283e2f87372403988 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 09:32:04 -0700
+Subject: [PATCH] rtnl_flush: Error on failed write()
+
+Fixes
+route.c:45:2: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
+|   write(fd, "-1", 2);
+|   ^~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ route.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/route.c b/route.c
+index c552d1f..fc5c31e 100644
+--- a/route.c
++++ b/route.c
+@@ -42,7 +42,8 @@ static void rtnl_flush(void)
+ 	if (fd < 0)
+ 		return;
+ 
+-	write(fd, "-1", 2);
++	if (write(fd, "-1", 2) < 0 )
++		perror("write");
+ 	close(fd);
+ }
+ 
+-- 
+2.13.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
index 50297f3..98dc41a 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
@@ -5,9 +5,11 @@
 
 DEPENDS = "libubox"
 
-SRC_URI = "git://nbd.name/relayd.git"
+SRC_URI = "git://git.openwrt.org/project/relayd.git \
+           file://0001-rtnl_flush-Error-on-failed-write.patch \
+"
 
-SRCREV = "2970ff60bac6b70ecb682779d5c776dc559dc0b9"
+SRCREV = "ad0b25ad74345d367c62311e14b279f5ccb8ef13"
 PV = "0.0.1+git${SRCPV}"
 
 S = "${WORKDIR}/git"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/00-fix-typos-in-man-pages.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/00-fix-typos-in-man-pages.patch
deleted file mode 100644
index c94bc31..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/00-fix-typos-in-man-pages.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 1573638212a9733a44939a4d38a226f38dca36f1 Mon Sep 17 00:00:00 2001
-From: Michele Baldessari <michele@acksyn.org>
-Date: Tue, 9 Jul 2013 23:23:33 +0200
-Subject: [PATCH] Fix typos in man-pages
-
-Fix some typos in the man-pages.
-
-Signed-off-by: Michele Baldessari <michele@acksyn.org>
-Reviewed-by: Simo Sorce <idra@samba.org>
-
-Autobuild-User(master): Simo Sorce <idra@samba.org>
-Autobuild-Date(master): Wed Jul 10 16:45:07 CEST 2013 on sn-devel-104
----
- docs-xml/manpages/dbwrap_tool.1.xml              | 2 +-
- docs-xml/manpages/idmap_autorid.8.xml            | 2 +-
- docs-xml/manpages/net.8.xml                      | 2 +-
- docs-xml/manpages/pdbedit.8.xml                  | 2 +-
- docs-xml/manpages/samba.7.xml                    | 2 +-
- docs-xml/manpages/smbclient.1.xml                | 2 +-
- docs-xml/manpages/smbpasswd.5.xml                | 2 +-
- docs-xml/manpages/vfs_smb_traffic_analyzer.8.xml | 2 +-
- 8 files changed, 8 insertions(+), 8 deletions(-)
-
-Index: samba-4.1.11/docs-xml/manpages/smbstatus.1.xml
-===================================================================
---- samba-4.1.11.orig/docs-xml/manpages/smbstatus.1.xml
-+++ samba-4.1.11/docs-xml/manpages/smbstatus.1.xml
-@@ -137,6 +137,13 @@
- 		</listitem>
- 		</varlistentry>
- 
-+		<varlistentry>
-+		<term>-n|--numeric</term>
-+		<listitem><para>causes smbstatus to display numeric UIDs and GIDs instead of
-+				resolving them to names.</para>
-+		</listitem>
-+		</varlistentry>
-+
- 	</variablelist>
- </refsect1>
- 
-Index: samba-4.1.11/docs-xml/manpages/sharesec.1.xml
-===================================================================
---- samba-4.1.11.orig/docs-xml/manpages/sharesec.1.xml
-+++ samba-4.1.11/docs-xml/manpages/sharesec.1.xml
-@@ -129,6 +129,13 @@
- 		</para></listitem>
- 		</varlistentry>
- 
-+		<varlistentry>
-+		<term>-S|--setsddl=STRING</term>
-+		<listitem><para>
-+		Set security descriptor by providing ACL in SDDL format.
-+		</para></listitem>
-+		</varlistentry>
-+
- 		&stdarg.help;
- 		&stdarg.server.debug;
- 		&popt.common.samba;
-Index: samba-4.1.11/docs-xml/build/DTD/samba.entities
-===================================================================
---- samba-4.1.11.orig/docs-xml/build/DTD/samba.entities
-+++ samba-4.1.11/docs-xml/build/DTD/samba.entities
-@@ -270,6 +270,44 @@ file.
- &popt.common.samba;
- '>
- 
-+<!ENTITY stdarg.signing '
-+<varlistentry>
-+<term>-S|--signing on|off|required</term>
-+<listitem><para>Set the client signing state.
-+</para></listitem>
-+</varlistentry>
-+'>
-+
-+<!ENTITY stdarg.machinepass '
-+<varlistentry>
-+<term>-P|--machine-pass</term>
-+<listitem><para>Use stored machine account password.
-+</para></listitem>
-+</varlistentry>
-+'>
-+
-+<!ENTITY stdarg.encrypt '
-+<varlistentry>
-+<term>-e|--encrypt</term>
-+<listitem><para>
-+This command line parameter requires the remote
-+server support the UNIX extensions or that the SMB3 protocol has been selected.
-+Requests that the connection be encrypted. Negotiates SMB encryption using either
-+SMB3 or POSIX extensions via GSSAPI. Uses the given credentials for
-+the encryption negotiation (either kerberos or NTLMv1/v2 if given
-+domain/username/password triple. Fails the connection if encryption
-+cannot be negotiated.
-+</para></listitem>
-+</varlistentry>
-+'>
-+
-+<!ENTITY stdarg.pwnthash '
-+<varlistentry>
-+<term>--pw-nt-hash</term>
-+<listitem><para>The supplied password is the NT hash.
-+</para></listitem>
-+</varlistentry>
-+'>
- 
- <!ENTITY stdarg.resolve.order '
- <varlistentry>
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.2.bb
deleted file mode 100644
index 7574aef..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.2.bb
+++ /dev/null
@@ -1,254 +0,0 @@
-SECTION = "console/network"
-
-LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
-                    file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 "
-
-SAMBA_MIRROR = "http://samba.org/samba/ftp"
-MIRRORS += "\
-${SAMBA_MIRROR}    http://mirror.internode.on.net/pub/samba \n \
-${SAMBA_MIRROR}    http://www.mirrorservice.org/sites/ftp.samba.org \n \
-"
-
-SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
-           file://00-fix-typos-in-man-pages.patch \
-           file://16-do-not-check-xsltproc-manpages.patch \
-           file://20-do-not-import-target-module-while-cross-compile.patch \
-           file://21-add-config-option-without-valgrind.patch \
-           file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \
-           file://0006-avoid-using-colon-in-the-checking-msg.patch \
-           file://netdb_defines.patch \
-           file://glibc_only.patch \
-           file://volatiles.03_samba \
-          "
-SRC_URI_append_libc-musl = " \
-           file://samba-4.2.7-pam.patch \
-           file://samba-4.3.9-remove-getpwent_r.patch \
-          "
-SRC_URI[md5sum] = "461def8190ffc651fd8458b24ca2a622"
-SRC_URI[sha256sum] = "927afcc16e444718985e3952de92d34e7b776b9ca0238179d866da18a6441c35"
-
-inherit systemd waf-samba cpan-base perlnative update-rc.d
-# remove default added RDEPENDS on perl
-RDEPENDS_${PN}_remove = "perl"
-
-DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb krb5 libbsd libaio libpam"
-DEPENDS_append_libc-musl = " libtirpc"
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
-LDFLAGS_append_libc-musl = " -ltirpc"
-
-LSB = ""
-LSB_linuxstdbase = "lsb"
-
-INITSCRIPT_NAME = "samba"
-INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
-
-SYSTEMD_PACKAGES = "${PN}-base winbind"
-SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service"
-SYSTEMD_SERVICE_winbind = "winbind.service"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
-                   acl cups ldap \
-"
-
-RDEPENDS_${PN}-base += "${LSB}"
-RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt"
-
-PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
-PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
-PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[sasl] = ",,cyrus-sasl"
-PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
-PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
-PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
-PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind,"
-PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust"
-PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive"
-
-
-SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
-SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
-SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
-SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
-
-SAMBA4_LIBS="heimdal,!zlib,!popt,!talloc,!pytalloc,!pytalloc-util,!tevent,!pytevent,!tdb,!pytdb,!ldb,!pyldb"
-
-EXTRA_OECONF += "--enable-fhs \
-                 --with-piddir=/run \
-                 --with-sockets-dir=/run/samba \
-                 --with-modulesdir=${libdir}/samba \
-                 --with-lockdir=${localstatedir}/lib/samba \
-                 --with-cachedir=${localstatedir}/lib/samba \
-                 --disable-gnutls \
-                 --disable-rpath-install \
-                 --with-shared-modules=${SAMBA4_MODULES} \
-                 --bundled-libraries=${SAMBA4_LIBS} \
-                 --with-system-mitkrb5 \
-                 --without-ad-dc \
-                 ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
-                 --with-cluster-support \
-                 --with-profiling-data \
-                 --with-libiconv=${STAGING_DIR_HOST}${prefix} \
-                 --with-pam --with-pammodulesdir=${base_libdir}/security \
-                "
-
-LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
-
-do_install_append() {
-    for section in 1 5 7; do
-        install -d ${D}${mandir}/man$section
-        install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section
-    done
-    for section in 1 5 7 8; do
-        install -d ${D}${mandir}/man$section
-        install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section
-    done
-
-    install -d ${D}${systemd_system_unitdir}
-    install -m 0644 packaging/systemd/*.service ${D}${systemd_system_unitdir}
-    sed -e 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' \
-        -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \
-        -i ${D}${systemd_system_unitdir}/*.service
-
-    install -d ${D}${sysconfdir}/tmpfiles.d
-    install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
-    echo "d ${localstatedir}/log/samba 0755 root root -" \
-        >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
-    if [ "${LSB}" = "lsb" ]; then
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d/samba
-    else
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
-        sed -e 's,/opt/samba/bin,${sbindir},g' \
-            -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
-            -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
-            -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \
-            -e 's,/usr/bin,${base_bindir},g' \
-            -i ${D}${sysconfdir}/init.d/samba
-    fi
-
-    install -d ${D}${sysconfdir}/samba
-    echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
-    install -m644 packaging/LSB/smb.conf ${D}${sysconfdir}/samba/smb.conf
-    install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba
-
-    install -d ${D}${sysconfdir}/default
-    install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba
-
-    # install ctdb config file and test cases
-    install -D -m 0644 ${S}/ctdb/tests/onnode/nodes ${D}${sysconfdir}/ctdb/nodes
-    # the items are from ctdb/tests/run_tests.sh
-    for d in onnode takeover tool eventscripts cunit simple complex; do
-        testdir=${D}${datadir}/ctdb-tests/$d
-        install -d $testdir
-        cp ${S}/ctdb/tests/$d/*.sh $testdir
-        cp -r ${S}/ctdb/tests/$d/scripts ${S}/ctdb/tests/$d/stubs $testdir || true
-    done
-
-    # fix file-rdeps qa warning
-    if [ -f ${D}${bindir}/onnode ]; then
-        sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode
-    fi
-
-    chmod 0750 ${D}${sysconfdir}/sudoers.d
-    rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
-}
-
-PACKAGES =+ "${PN}-python ${PN}-pidl \
-             ${PN}-dsdb-modules ${PN}-testsuite registry-tools \
-             winbind \
-             ${PN}-common ${PN}-base ${PN}-ctdb-tests \
-             smbclient"
-
-python samba_populate_packages() {
-    def module_hook(file, pkg, pattern, format, basename):
-        pn = d.getVar('PN', True)
-        d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg)
-
-    mlprefix = d.getVar('MLPREFIX', True) or ''
-    pam_libdir = d.expand('${base_libdir}/security')
-    pam_pkgname = mlprefix + 'pam-plugin%s'
-    do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True)
-
-    libdir = d.getVar('libdir', True)
-    do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True)
-    pkglibdir = '%s/samba' % libdir
-    do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True)
-    moduledir = '%s/samba/auth' % libdir
-    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True)
-    moduledir = '%s/samba/pdb' % libdir
-    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True)
-}
-
-PACKAGESPLITFUNCS_prepend = "samba_populate_packages "
-
-RDEPENDS_${PN} += "${PN}-base"
-
-FILES_${PN}-base = "${sbindir}/nmbd \
-                    ${sbindir}/smbd \
-                    ${sysconfdir}/init.d \
-                    ${localstatedir}/lib/samba \
-                    ${localstatedir}/nmbd \
-                    ${localstatedir}/spool/samba \
-                    ${systemd_system_unitdir}/nmb.service \
-                    ${systemd_system_unitdir}/samba.service \
-                    ${systemd_system_unitdir}/smb.service"
-
-FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
-                          ${bindir}/ctdb_run_cluster_tests \
-                          ${sysconfdir}/ctdb/nodes \
-                          ${datadir}/ctdb-tests \
-                          ${datadir}/ctdb/tests \
-                         "
-
-FILES_${BPN}-common = "${sysconfdir}/default \
-                       ${sysconfdir}/samba \
-                       ${sysconfdir}/tmpfiles.d \
-"
-
-FILES_${PN} += "${libdir}/vfs/*.so \
-                ${libdir}/charset/*.so \
-                ${libdir}/*.dat \
-                ${libdir}/auth/*.so \
-"
-
-FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb"
-
-FILES_${PN}-testsuite = "${bindir}/gentest \
-                         ${bindir}/locktest \
-                         ${bindir}/masktest \
-                         ${bindir}/ndrdump \
-                         ${bindir}/smbtorture"
-
-FILES_registry-tools = "${bindir}/regdiff \
-                        ${bindir}/regpatch \
-                        ${bindir}/regshell \
-                        ${bindir}/regtree"
-
-FILES_winbind = "${sbindir}/winbindd \
-                 ${bindir}/wbinfo \
-                 ${bindir}/ntlm_auth \
-                 ${libdir}/samba/idmap \
-                 ${libdir}/samba/nss_info \
-                 ${libdir}/winbind_krb5_locator.so \
-                 ${sysconfdir}/init.d/winbind \
-                 ${systemd_system_unitdir}/winbind.service"
-
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
-
-FILES_smbclient = "${bindir}/cifsdd \
-                   ${bindir}/rpcclient \
-                   ${bindir}/smbcacls \
-                   ${bindir}/smbclient \
-                   ${bindir}/smbcquotas \
-                   ${bindir}/smbget \
-                   ${bindir}/smbspool \
-                   ${bindir}/smbtar \
-                   ${bindir}/smbtree \
-                   ${libdir}/samba/smbspool_krb5_wrapper"
-
-RDEPENDS_${PN}-pidl_append = " perl"
-FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.7.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.7.bb
new file mode 100644
index 0000000..2b227c9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.7.bb
@@ -0,0 +1,256 @@
+HOMEPAGE = "https://www.samba.org/"
+SECTION = "console/network"
+
+LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
+                    file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 "
+
+SAMBA_MIRROR = "http://samba.org/samba/ftp"
+MIRRORS += "\
+${SAMBA_MIRROR}    http://mirror.internode.on.net/pub/samba \n \
+${SAMBA_MIRROR}    http://www.mirrorservice.org/sites/ftp.samba.org \n \
+"
+
+SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
+           file://16-do-not-check-xsltproc-manpages.patch \
+           file://20-do-not-import-target-module-while-cross-compile.patch \
+           file://21-add-config-option-without-valgrind.patch \
+           file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \
+           file://0006-avoid-using-colon-in-the-checking-msg.patch \
+           file://netdb_defines.patch \
+           file://glibc_only.patch \
+           file://volatiles.03_samba \
+          "
+SRC_URI_append_libc-musl = " \
+           file://samba-4.2.7-pam.patch \
+           file://samba-4.3.9-remove-getpwent_r.patch \
+          "
+
+SRC_URI[md5sum] = "c6ee5c766016d59908c8fb672fbbd445"
+SRC_URI[sha256sum] = "9ef24393de08390f236cabccd6a420b5cea304e959cbf1a99ff317325db3ddfa"
+
+inherit systemd waf-samba cpan-base perlnative update-rc.d
+# remove default added RDEPENDS on perl
+RDEPENDS_${PN}_remove = "perl"
+
+DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb krb5 libbsd libaio libpam"
+DEPENDS_append_libc-musl = " libtirpc"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS_append_libc-musl = " -ltirpc"
+
+LSB = ""
+LSB_linuxstdbase = "lsb"
+
+INITSCRIPT_NAME = "samba"
+INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
+
+SYSTEMD_PACKAGES = "${PN}-base winbind"
+SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service"
+SYSTEMD_SERVICE_winbind = "winbind.service"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
+                   acl cups ldap \
+"
+
+RDEPENDS_${PN}-base += "${LSB}"
+RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt"
+
+PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
+PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
+PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[sasl] = ",,cyrus-sasl"
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
+PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
+PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
+PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind,"
+PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust"
+PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive"
+
+
+SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
+SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
+SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
+SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
+
+SAMBA4_LIBS="heimdal,!zlib,!popt,!talloc,!pytalloc,!pytalloc-util,!tevent,!pytevent,!tdb,!pytdb,!ldb,!pyldb"
+
+EXTRA_OECONF += "--enable-fhs \
+                 --with-piddir=/run \
+                 --with-sockets-dir=/run/samba \
+                 --with-modulesdir=${libdir}/samba \
+                 --with-lockdir=${localstatedir}/lib/samba \
+                 --with-cachedir=${localstatedir}/lib/samba \
+                 --disable-gnutls \
+                 --disable-rpath-install \
+                 --with-shared-modules=${SAMBA4_MODULES} \
+                 --bundled-libraries=${SAMBA4_LIBS} \
+                 --with-system-mitkrb5 \
+                 --without-ad-dc \
+                 ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
+                 --with-cluster-support \
+                 --with-profiling-data \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix} \
+                 --with-pam --with-pammodulesdir=${base_libdir}/security \
+                "
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
+do_install_append() {
+    for section in 1 5 7; do
+        install -d ${D}${mandir}/man$section
+        install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section
+    done
+    for section in 1 5 7 8; do
+        install -d ${D}${mandir}/man$section
+        install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section
+    done
+
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 packaging/systemd/*.service ${D}${systemd_system_unitdir}
+    sed -e 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' \
+        -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \
+        -i ${D}${systemd_system_unitdir}/*.service
+
+    install -d ${D}${sysconfdir}/tmpfiles.d
+    install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
+    echo "d ${localstatedir}/log/samba 0755 root root -" \
+        >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
+    if [ "${LSB}" = "lsb" ]; then
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d/samba
+    else
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
+        sed -e 's,/opt/samba/bin,${sbindir},g' \
+            -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
+            -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
+            -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \
+            -e 's,/usr/bin,${base_bindir},g' \
+            -i ${D}${sysconfdir}/init.d/samba
+    fi
+
+    install -d ${D}${sysconfdir}/samba
+    echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
+    install -m644 packaging/LSB/smb.conf ${D}${sysconfdir}/samba/smb.conf
+    install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba
+
+    install -d ${D}${sysconfdir}/default
+    install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba
+
+    # install ctdb config file and test cases
+    install -D -m 0644 ${S}/ctdb/tests/onnode/nodes ${D}${sysconfdir}/ctdb/nodes
+    # the items are from ctdb/tests/run_tests.sh
+    for d in onnode takeover tool eventscripts cunit simple complex; do
+        testdir=${D}${datadir}/ctdb-tests/$d
+        install -d $testdir
+        cp ${S}/ctdb/tests/$d/*.sh $testdir
+        cp -r ${S}/ctdb/tests/$d/scripts ${S}/ctdb/tests/$d/stubs $testdir || true
+    done
+
+    # fix file-rdeps qa warning
+    if [ -f ${D}${bindir}/onnode ]; then
+        sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode
+    fi
+
+    chmod 0750 ${D}${sysconfdir}/sudoers.d
+    rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
+}
+
+PACKAGES =+ "${PN}-python ${PN}-pidl \
+             ${PN}-dsdb-modules ${PN}-testsuite registry-tools \
+             winbind \
+             ${PN}-common ${PN}-base ${PN}-ctdb-tests \
+             smbclient"
+
+python samba_populate_packages() {
+    def module_hook(file, pkg, pattern, format, basename):
+        pn = d.getVar('PN', True)
+        d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg)
+
+    mlprefix = d.getVar('MLPREFIX', True) or ''
+    pam_libdir = d.expand('${base_libdir}/security')
+    pam_pkgname = mlprefix + 'pam-plugin%s'
+    do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True)
+
+    libdir = d.getVar('libdir', True)
+    do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True)
+    pkglibdir = '%s/samba' % libdir
+    do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True)
+    moduledir = '%s/samba/auth' % libdir
+    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True)
+    moduledir = '%s/samba/pdb' % libdir
+    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True)
+}
+
+PACKAGESPLITFUNCS_prepend = "samba_populate_packages "
+
+RDEPENDS_${PN} += "${PN}-base ${PN}-python ${PN}-dsdb-modules"
+RDEPENDS_${PN}-python += "pytalloc python-tdb"
+
+FILES_${PN}-base = "${sbindir}/nmbd \
+                    ${sbindir}/smbd \
+                    ${sysconfdir}/init.d \
+                    ${localstatedir}/lib/samba \
+                    ${localstatedir}/nmbd \
+                    ${localstatedir}/spool/samba \
+                    ${systemd_system_unitdir}/nmb.service \
+                    ${systemd_system_unitdir}/samba.service \
+                    ${systemd_system_unitdir}/smb.service"
+
+FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
+                          ${bindir}/ctdb_run_cluster_tests \
+                          ${sysconfdir}/ctdb/nodes \
+                          ${datadir}/ctdb-tests \
+                          ${datadir}/ctdb/tests \
+                         "
+
+FILES_${BPN}-common = "${sysconfdir}/default \
+                       ${sysconfdir}/samba \
+                       ${sysconfdir}/tmpfiles.d \
+"
+
+FILES_${PN} += "${libdir}/vfs/*.so \
+                ${libdir}/charset/*.so \
+                ${libdir}/*.dat \
+                ${libdir}/auth/*.so \
+"
+
+FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb"
+
+FILES_${PN}-testsuite = "${bindir}/gentest \
+                         ${bindir}/locktest \
+                         ${bindir}/masktest \
+                         ${bindir}/ndrdump \
+                         ${bindir}/smbtorture"
+
+FILES_registry-tools = "${bindir}/regdiff \
+                        ${bindir}/regpatch \
+                        ${bindir}/regshell \
+                        ${bindir}/regtree"
+
+FILES_winbind = "${sbindir}/winbindd \
+                 ${bindir}/wbinfo \
+                 ${bindir}/ntlm_auth \
+                 ${libdir}/samba/idmap \
+                 ${libdir}/samba/nss_info \
+                 ${libdir}/winbind_krb5_locator.so \
+                 ${sysconfdir}/init.d/winbind \
+                 ${systemd_system_unitdir}/winbind.service"
+
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+FILES_smbclient = "${bindir}/cifsdd \
+                   ${bindir}/rpcclient \
+                   ${bindir}/smbcacls \
+                   ${bindir}/smbclient \
+                   ${bindir}/smbcquotas \
+                   ${bindir}/smbget \
+                   ${bindir}/smbspool \
+                   ${bindir}/smbtar \
+                   ${bindir}/smbtree \
+                   ${libdir}/samba/smbspool_krb5_wrapper"
+
+RDEPENDS_${PN}-pidl_append = " perl"
+FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch
new file mode 100644
index 0000000..2becc06
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+When enable static daq for snort, it calls to daq-modules-config to get link
+library and library path. Library path is useless for oe and cause host
+contamination issue. So filter it.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/configure.in b/configure.in
+index fded45b..a247bb9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -658,7 +658,7 @@ fi
+ 
+ if test "x$enable_static_daq" = "xyes"; then
+     LDAQ=""
+-    LIBS="${LIBS} `daq-modules-config --static --libs`"
++    LIBS="${LIBS} `daq-modules-config --static --libs | sed 's#-L[^ ]*##g'`"
+     AC_CHECK_LIB([daq_static], [daq_load_modules],
+         [LIBS="-ldaq_static ${LIBS}"], [LDAQ="no"], [ ])
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
index dfd6ba9..2034b85 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
@@ -4,7 +4,7 @@
 LICENSE = "GPL-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5"
 
-DEPENDS = "xz libpcap libpcre daq libdnet util-linux"
+DEPENDS = "xz libpcap libpcre daq libdnet util-linux daq-native"
 DEPENDS_append_libc-musl = " libtirpc"
 
 SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \
@@ -15,6 +15,7 @@
     file://disable-daq-verdict-retry.patch \
     file://0001-libpcap-search-sysroot-for-headers.patch \
     file://0001-fix-do_package-failed-since-snort-2.9.7.0.patch \
+    file://fix-host-contamination-when-enable-static-daq.patch \
 "
 
 SRC_URI[tarball.md5sum] = "fd271788c0f8876be87a858a9142f202"
@@ -31,7 +32,7 @@
     --enable-reload \
     --enable-reload-error-restart \
     --enable-targetbased \
-    --disable-static-daq \
+    --enable-static-daq \
     --with-dnet-includes=${STAGING_INCDIR} \
     --with-dnet-libraries=${STAGING_LIBDIR} \
     --with-libpcre-includes=${STAGING_INCDIR} \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
index 3f688b3..bd55efc 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
@@ -1,4 +1,5 @@
 SUMMARY = "VLAN provides vconfig utility"
+HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html"
 SECTION = "misc"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://vconfig.c;beginline=1;endline=19;md5=094ca47de36c20c598b15b32c270ce0a"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch
new file mode 100644
index 0000000..2bed550
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch
@@ -0,0 +1,42 @@
+From 39925f090c21ab571ebc6ec250696f7f7093a2a6 Mon Sep 17 00:00:00 2001
+From: Will Page <Will.Page@ni.com>
+Date: Wed, 30 Aug 2017 18:14:00 -0700
+Subject: [PATCH 1/1] Reduce lifetime value to widely-compatible value
+
+Current proposed lifetime value (2147483 seconds, which equates to
+MAXINT ms, or ~25 days) is rejected by Fortigate vpn devices because
+"peer SA proposal does not match local policy".  It seems default
+policy for these devices constrains lifetime where similar VPN devices
+don't.
+
+Reducing the lifetime from its current value to 28800 (exactly 8 hours)
+causes it to start working with fortigate devices.
+---
+ vpnc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vpnc.c b/vpnc.c
+index 36dd0f3..3e0fcba 100644
+--- a/vpnc.c
++++ b/vpnc.c
+@@ -1135,7 +1135,7 @@ static struct isakmp_attribute *make_transform_ike(int dh_group, int crypt, int
+ 	a->af = isakmp_attr_lots;
+ 	a->u.lots.length = 4;
+ 	a->u.lots.data = xallocc(a->u.lots.length);
+-	*((uint32_t *) a->u.lots.data) = htonl(2147483);
++	*((uint32_t *) a->u.lots.data) = htonl(28800);
+ 	a = new_isakmp_attribute_16(IKE_ATTRIB_LIFE_TYPE, IKE_LIFE_TYPE_SECONDS, a);
+ 	a = new_isakmp_attribute_16(IKE_ATTRIB_AUTH_METHOD, auth, a);
+ 	a = new_isakmp_attribute_16(IKE_ATTRIB_GROUP_DESC, dh_group, a);
+@@ -2561,7 +2561,7 @@ static struct isakmp_attribute *make_transform_ipsec(struct sa_block *s, int dh_
+ 	a->af = isakmp_attr_lots;
+ 	a->u.lots.length = 4;
+ 	a->u.lots.data = xallocc(a->u.lots.length);
+-	*((uint32_t *) a->u.lots.data) = htonl(2147483);
++	*((uint32_t *) a->u.lots.data) = htonl(28800);
+ 	a = new_isakmp_attribute_16(ISAKMP_IPSEC_ATTRIB_SA_LIFE_TYPE, IPSEC_LIFE_SECONDS, a);
+ 
+ 	if (dh_group)
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
index 6f92acd..ea21799 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
@@ -20,6 +20,7 @@
            file://0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch \
            file://0007-add-error-API-when-error.h-is-not-on-platform.patch \
            file://0008-include-sysdep.h-before-net-if_tun.h.patch \
+           file://0009-reduce-lifetime-value.patch \
            "
 
 PACKAGECONFIG ?= "gnutls"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch
new file mode 100644
index 0000000..f304d93
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch
@@ -0,0 +1,27 @@
+From fb490136cf8f2456cfe13b0b4f796e6c155e75dc Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 30 Aug 2017 03:02:32 -0400
+Subject: [PATCH] fix no rule to make cyassl/options.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 395d75d..d4a3880 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3684,6 +3684,7 @@ AC_CONFIG_FILES([wolfssl/options.h])
+ #fi
+ AC_CONFIG_FILES([support/wolfssl.pc])
+ AC_CONFIG_FILES([rpm/spec])
++AC_CONFIG_FILES([cyassl/options.h])
+ 
+ AX_CREATE_GENERIC_CONFIG
+ AX_AM_JOBSERVER([yes])
+-- 
+2.8.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb
new file mode 100644
index 0000000..5126190
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb
@@ -0,0 +1,27 @@
+SUMMARY = "wolfSSL Lightweight, Embedded SSL Library"
+DESCRIPTION = "wolfSSL, formerly CyaSSL, is a lightweight SSL library written in C and \
+               optimized for embedded and RTOS environments. It can be \
+               Up to 20 times smaller than OpenSSL while still supporting \
+               a full TLS 1.2 client and server."
+HOMEPAGE = "http://www.wolfssl.com/yaSSL/Products-wolfssl.html"
+BUGTRACKER = "http://github.com/wolfssl/wolfssl/issues"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PROVIDES += "cyassl"
+RPROVIDES_${PN} = "cyassl"
+
+SRC_URI = "https://github.com/wolfSSL/wolfssl/archive/v${PV}-stable.zip \
+           file://0001-fix-no-rule-to-make-cyassl-options.h.patch \
+          "
+
+SRC_URI[md5sum] = "f9caf558169ab650dc8200708799ebeb"
+SRC_URI[sha256sum] = "b6d87d3e2c8757177d69aff373c91cf162f4a3944fae90fa10d086fd5f9542e7"
+
+S = "${WORKDIR}/wolfssl-${PV}-stable"
+
+inherit autotools
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.9.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.9.0.bb
deleted file mode 100644
index afae3c8..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.9.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "wolfSSL Lightweight, Embedded SSL Library"
-DESCRIPTION = "wolfSSL, formerly CyaSSL, is a lightweight SSL library written in C and \
-               optimized for embedded and RTOS environments. It can be \
-               Up to 20 times smaller than OpenSSL while still supporting \
-               a full TLS 1.2 client and server."
-HOMEPAGE = "http://www.wolfssl.com/yaSSL/Products-wolfssl.html"
-BUGTRACKER = "http://github.com/wolfssl/wolfssl/issues"
-SECTION = "libs"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-PROVIDES += "cyassl"
-RPROVIDES_${PN} = "cyassl"
-
-SRC_URI = "http://www.wolfssl.com/${BP}.zip"
-
-SRC_URI[md5sum] = "f3396726a9befd61443c2cce216e39ba"
-SRC_URI[sha256sum] = "98f50244f7b43f8683bd0cf5c599849d330e75e6cf077e96f14e83bda8b03ca3"
-
-inherit autotools
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch
new file mode 100644
index 0000000..7ac1456
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch
@@ -0,0 +1,29 @@
+From e4ee00e08acd7c0912a3264ad32e4de861c7416f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Sep 2017 22:22:31 -0700
+Subject: [PATCH] modules/lookup_multi.c: Replace __S_IEXEC with S_IEXEC
+
+__S_IEXEC is internal to libc and may not be available on
+all libc e.g. musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ modules/lookup_multi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c
+index 3ecda6d..cf109de 100644
+--- a/modules/lookup_multi.c
++++ b/modules/lookup_multi.c
+@@ -452,7 +452,7 @@ int lookup_reinit(const char *my_mapfmt,
+ 					continue;
+ 				}
+ 
+-				if (st.st_mode & __S_IEXEC)
++				if (st.st_mode & S_IEXEC)
+ 					type = src_prog;
+ 				else
+ 					type = src_file;
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb
index eea7c4b..68c64fd 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb
@@ -3,7 +3,7 @@
 LICENSE = "GPL-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
 
-DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl"
+DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2"
 
 CFLAGS += "-I${STAGING_INCDIR}/tirpc"
 
@@ -26,6 +26,7 @@
            file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \
            file://autofs-5.1.2-libtirpc-as-need.patch \
            file://pkgconfig-libnsl.patch \
+           file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \
            "
 SRC_URI[md5sum] = "28cf88f99eff553a8500659ba5d45a76"
 SRC_URI[sha256sum] = "0d57e4138c2ec8058ca92164d035546f68ce4af93acb893369993d67c7056a10"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
index 61b7ad4..eaa453d 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
@@ -1,5 +1,6 @@
 SUMMARY = "Generic client/server library for SASL authentication"
 SECTION = "libs"
+HOMEPAGE = "http://asg.web.cmu.edu/sasl/"
 DEPENDS = "openssl virtual/db"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb
deleted file mode 100644
index 2da29d9..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "A caching, forwarding DNS proxy server"
-DESCRIPTION = "\
-dnrd is a proxying nameserver. It forwards DNS queries to the appropriate \
-nameserver, but can also act as the primary nameserver for a subnet behind \
-a firewall. It also has features such as caching DNS requests, support for \
-DNS servers, cache poisoning prevention, TCP support, etc.."
-HOMEPAGE = "http://dnrd.sourceforge.net/"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0be67017f1c770313ad7b40e18d568f1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
-           file://dnrd.service \
-           file://dnrd.conf.sample \
-           file://dnrd.init"
-SRC_URI[md5sum] = "41c9b070aae8ed403fc8c2aac7ab157c"
-SRC_URI[sha256sum] = "aa46e7f8736b88c1d752cf606b3990041221ce91d014e955c6b02eb2167db015"
-
-PNBLACKLIST[dnrd] ?= "BROKEN: dnrd-2.20.3-r0 do_package: QA Issue: dnrd: Files/directories were installed but not shipped in any package: - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-SYSTEMD_SERVICE_${PN} = "dnrd.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-inherit autotools
-inherit ${@bb.utils.filter('VIRTUAL-RUNTIME_init_manager', 'systemd', d)}
-
-do_install() {
-    oe_runmake install DESTDIR=${D} INSTALL="install -p"
-
-    sed -i -e 's:/etc/rc.d/init.d/functions:/etc/init.d/functions:g' \
-        ${WORKDIR}/dnrd.init
-    install -d -m 0755 ${D}${sysconfdir}/init.d
-    install -d -m 0755 ${D}${sysconfdir}/dnrd
-    install -p -m 0644 ${WORKDIR}/dnrd.conf.sample ${D}${sysconfdir}/dnrd/dnrd.conf
-    install -p -m 0755 ${WORKDIR}/dnrd.init ${D}${sysconfdir}/init.d/dnrd
-
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d -m 0755 ${D}${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/dnrd.service ${D}${systemd_unitdir}/system
-    fi
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch
new file mode 100644
index 0000000..82cdc36
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch
@@ -0,0 +1,25 @@
+From a557651a08e21e3c7c7f5eca9f5405f86624903f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 22:42:51 -0700
+Subject: [PATCH] src/igmpproxy.h: Include sys/types.h for u_short/u_init
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/igmpproxy.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/igmpproxy.h b/src/igmpproxy.h
+index 4dabd1c..4454729 100644
+--- a/src/igmpproxy.h
++++ b/src/igmpproxy.h
+@@ -46,6 +46,7 @@
+ #include <stdbool.h>
+ 
+ #include <sys/socket.h>
++#include <sys/types.h>
+ #include <sys/un.h>
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb
index c3d2f1a..5424dc4 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb
@@ -5,9 +5,12 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=1e995e2799bb0d27d63069b97f805420"
 
 SRC_URI = "http://sourceforge.net/projects/igmpproxy/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
-    "
+           file://0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch \
+           "
 
 SRC_URI[md5sum] = "c56f41ec195bc1fe016369bf74efc5a1"
 SRC_URI[sha256sum] = "ee18ff3d8c3ae3a29dccb7e5eedf332337330020168bd95a11cece8d7d7ee6ae"
 
 inherit autotools pkgconfig
+
+CFLAGS += "-D_GNU_SOURCE"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch
new file mode 100644
index 0000000..e967621
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch
@@ -0,0 +1,56 @@
+From 4848b9e4d516a9203c08432901a7b40419e8f43c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Jul 2017 15:54:35 -0700
+Subject: [PATCH 1/3] Respect flags from env
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile      | 4 ++--
+ cli/Makefile  | 2 +-
+ pppd/Makefile | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a05a000..439a978 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,8 +81,8 @@ LIBS.dmalloc=		-ldmalloc
+ export USE_DMALLOC
+ endif
+ 
+-CPPFLAGS=		$(CPPFLAGS.ippooltest)
+-CFLAGS=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
++CPPFLAGS+=		$(CPPFLAGS.ippooltest)
++CFLAGS+=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+ LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
+ LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
+ 
+diff --git a/cli/Makefile b/cli/Makefile
+index 4b5dd59..56fbf2f 100644
+--- a/cli/Makefile
++++ b/cli/Makefile
+@@ -7,7 +7,7 @@ CLI_SRCS_TEST.o=	$(CLI_SRCS_TEST.c:%.c=%.o)
+ 
+ LDFLAGS.cli_test=	-L.. -L. $(READLINE_LDFLAGS) -lcli -lusl -lreadline -lcurses -lc
+ 
+-CFLAGS=			$(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS)
++CFLAGS=			$(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS) $(CPPFLAGS)
+ 
+ .PHONY:			all test clean
+ 
+diff --git a/pppd/Makefile b/pppd/Makefile
+index 106deca..7fd815f 100644
+--- a/pppd/Makefile
++++ b/pppd/Makefile
+@@ -10,7 +10,7 @@ endif
+ 
+ # END CONFIGURABLE SETTINGS
+ 
+-CFLAGS	+= -g -I.. -I/usr/include/pppd $(CFLAGS.pppd) -fPIC
++CFLAGS	+= -g -I.. -I=/usr/include/pppd $(CFLAGS.pppd) -fPIC
+ LDFLAGS	+= -shared
+ 
+ all:	ippool.so
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch
new file mode 100644
index 0000000..7d3f9ac
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch
@@ -0,0 +1,31 @@
+From e4e0aae139b6489dc582fd14e54e562126482ce2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 07:23:53 -0700
+Subject: [PATCH 1/3] read() returns ssize_t
+
+Fixes
+usl_fd.c:284:10: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
+                if (nb < 0) {
+                    ~~ ^ ~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usl/usl_fd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usl/usl_fd.c b/usl/usl_fd.c
+index 3b7a813..04ba48c 100644
+--- a/usl/usl_fd.c
++++ b/usl/usl_fd.c
+@@ -280,7 +280,7 @@ size_t usl_fd_read(int fd, void *buf, size_t count)
+ 	char *ptr = buf;
+ 
+ 	for (chars_read = 0; chars_read < count; ) {
+-		size_t nb = read(fd, ptr, count - chars_read);
++		ssize_t nb = read(fd, ptr, count - chars_read);
+ 		if (nb < 0) {
+ 			if (errno == EINTR)
+ 				continue;
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
new file mode 100644
index 0000000..6fb7cc5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
@@ -0,0 +1,28 @@
+From 5d7f20c045b3c74dad2c53d65e30bd4840250082 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 15:17:19 -0700
+Subject: [PATCH] usl_timer: Check for return value of write() API
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usl/usl_timer.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/usl/usl_timer.c b/usl/usl_timer.c
+index fda752b..d8414a6 100644
+--- a/usl/usl_timer.c
++++ b/usl/usl_timer.c
+@@ -94,7 +94,9 @@ void usl_timer_tick(void)
+ 
+ 	if (!usl_tick_pending) {
+ 		usl_tick_pending = 1;
+-		write(usl_tick_pipe[1], &msg, sizeof(msg));
++		if (write(usl_tick_pipe[1], &msg, sizeof(msg)) != sizeof(msg)) {
++			fprintf(stderr, "write to fd %i failed: %s\n", usl_tick_pipe[1], strerror(errno));
++		}
+ 	}
+ }
+ 
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch
new file mode 100644
index 0000000..6e2bd52
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch
@@ -0,0 +1,31 @@
+From cf25576428903168cd41b183fb1ca9c2b7e2666e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 07:28:10 -0700
+Subject: [PATCH 2/3] Mark first element of a string as null
+
+Fixes
+cli_lib.c:427:20: error: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Werror,-Wnon-literal-null-conversion]
+                                        values[arg] = '\0';
+                                                      ^~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli/cli_lib.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cli/cli_lib.c b/cli/cli_lib.c
+index 41a0b06..e4d2fd5 100644
+--- a/cli/cli_lib.c
++++ b/cli/cli_lib.c
+@@ -424,7 +424,7 @@ int cli_find_args(int argc, char *argv[], struct cli_node *cmd, struct cli_node
+ 			if (arg_string[1] == '\0') {
+ 				/* no arg value - only allowed for string args */
+ 				if (node->arg->parser == cli_arg_parse_string) {
+-					values[arg] = '\0';
++					*values[arg] = '\0';
+ 				} else {
+ 					result = -EINVAL;
+ 					break;
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch
new file mode 100644
index 0000000..d80f7b4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch
@@ -0,0 +1,30 @@
+From 47aef26198431f7ad568c2277dded158bda3e36f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Jul 2017 16:00:35 -0700
+Subject: [PATCH 2/3] link with libtirpc
+
+musl needs it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 439a978..ea821eb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -83,8 +83,8 @@ endif
+ 
+ CPPFLAGS+=		$(CPPFLAGS.ippooltest)
+ CFLAGS+=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+-LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
+-LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
++LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc -ltirpc
++LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses $(LIBS.dmalloc) -lc -ltirpc
+ 
+ OPT_CFLAGS?=		-O
+ 
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch
new file mode 100644
index 0000000..3854b11
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch
@@ -0,0 +1,58 @@
+From 994d9575374d3cdb34b1b0f70c3c53ae76fe578e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 07:41:05 -0700
+Subject: [PATCH 3/3] cli: Mark return of strtol as long int
+
+strtol does not return unsigned long
+
+error: taking the absolute value of unsigned type 'unsigned long' has no effect [-Werror,-Wabsolute-value]
+        if ((*endp == '\0') && (labs(tmp) < 32768)) {
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli/cli_lib.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/cli/cli_lib.c b/cli/cli_lib.c
+index e4d2fd5..5f487dc 100644
+--- a/cli/cli_lib.c
++++ b/cli/cli_lib.c
+@@ -522,7 +522,7 @@ int cli_arg_parse_int32(struct cli_node *arg, const char *val, void *result)
+ int cli_arg_parse_int16(struct cli_node *arg, const char *val, void *result)
+ {
+ 	int16_t *intval = result;
+-	unsigned long tmp;
++	long tmp;
+ 	char *endp;
+ 	int ret = 0;
+ 
+@@ -539,7 +539,7 @@ int cli_arg_parse_int16(struct cli_node *arg, const char *val, void *result)
+ int cli_arg_parse_int8(struct cli_node *arg, const char *val, void *result)
+ {
+ 	int8_t *intval = result;
+-	unsigned long tmp;
++	long tmp;
+ 	char *endp;
+ 	int ret = 0;
+ 
+@@ -573,7 +573,7 @@ int cli_arg_parse_uint32(struct cli_node *arg, const char *val, void *result)
+ int cli_arg_parse_uint16(struct cli_node *arg, const char *val, void *result)
+ {
+ 	uint16_t *intval = result;
+-	unsigned long tmp;
++	long tmp;
+ 	char *endp;
+ 	int ret = 0;
+ 
+@@ -590,7 +590,7 @@ int cli_arg_parse_uint16(struct cli_node *arg, const char *val, void *result)
+ int cli_arg_parse_uint8(struct cli_node *arg, const char *val, void *result)
+ {
+ 	uint8_t *intval = result;
+-	unsigned long tmp;
++	long tmp;
+ 	char *endp;
+ 	int ret = 0;
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
new file mode 100644
index 0000000..3cd5259
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
@@ -0,0 +1,283 @@
+From eb345047decba665e3f39908336a83f039e1ece2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Jul 2017 16:01:32 -0700
+Subject: [PATCH 3/3] musl fixes
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli/cli_readline.c |   7 +-
+ ippool_api.c       |   9 ++-
+ net/ppp_defs.h     | 194 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ usl/usl.h          |   4 ++
+ 4 files changed, 208 insertions(+), 6 deletions(-)
+ create mode 100644 net/ppp_defs.h
+
+diff --git a/cli/cli_readline.c b/cli/cli_readline.c
+index 2812e6e..542935c 100644
+--- a/cli/cli_readline.c
++++ b/cli/cli_readline.c
+@@ -17,13 +17,14 @@
+  *  Boston, MA 02110-1301 USA
+  *
+  *****************************************************************************/
+-
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/file.h>
+ #include <sys/stat.h>
+-#include <sys/errno.h>
++#include <fcntl.h>
++#include <errno.h>
+ #include <signal.h>
+ 
+ #include <readline/readline.h>
+@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_handlers(void)
+ 
+ static int cli_rl_install_signal_handlers(void)
+ {
+-	__sighandler_t handler;
++	sighandler_t handler;
+ 
+ 	rl_catch_signals = 0;
+ 	rl_clear_signals();
+diff --git a/ippool_api.c b/ippool_api.c
+index 2c10c47..d1127a9 100644
+--- a/ippool_api.c
++++ b/ippool_api.c
+@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT *xprt)
+ 	 * non-loopback interface, reject the request.
+ 	 */
+ 	if ((!ippool_opt_remote_rpc) &&
+-	    ((xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) &&
+-	     (xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_ANY)))) {
++	    ((xprt->xp_raddr.sin6_addr.s6_addr != htonl(INADDR_LOOPBACK)) &&
++	     (xprt->xp_raddr.sin6_addr.s6_addr != htonl(INADDR_ANY)))) {
++		char straddr[INET6_ADDRSTRLEN];
++		inet_ntop(AF_INET6, &xprt->xp_raddr.sin6_addr, straddr, sizeof(straddr));
++
+ 		if (ippool_opt_debug) {
+-			ippool_log(LOG_ERR, "Rejecting RPC request from %s", inet_ntoa(xprt->xp_raddr.sin_addr));
++			ippool_log(LOG_ERR, "Rejecting RPC request from %s", straddr);
+ 		}
+ 		svcerr_auth(xprt, AUTH_TOOWEAK);
+ 		return -EPERM;
+diff --git a/net/ppp_defs.h b/net/ppp_defs.h
+new file mode 100644
+index 0000000..b06eda5
+--- /dev/null
++++ b/net/ppp_defs.h
+@@ -0,0 +1,194 @@
++/*	$Id: ppp_defs.h,v 1.17 2002/12/06 09:49:15 paulus Exp $	*/
++
++/*
++ * ppp_defs.h - PPP definitions.
++ *
++ * Copyright (c) 1984 Paul Mackerras. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ *
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ *
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in
++ *    the documentation and/or other materials provided with the
++ *    distribution.
++ *
++ * 3. The name(s) of the authors of this software must not be used to
++ *    endorse or promote products derived from this software without
++ *    prior written permission.
++ *
++ * 4. Redistributions of any form whatsoever must retain the following
++ *    acknowledgment:
++ *    "This product includes software developed by Paul Mackerras
++ *     <paulus@samba.org>".
++ *
++ * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
++ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
++ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
++ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#ifndef _PPP_DEFS_H_
++#define _PPP_DEFS_H_
++
++/*
++ * The basic PPP frame.
++ */
++#define PPP_HDRLEN	4	/* octets for standard ppp header */
++#define PPP_FCSLEN	2	/* octets for FCS */
++
++/*
++ * Packet sizes
++ *
++ * Note - lcp shouldn't be allowed to negotiate stuff outside these
++ *	  limits.  See lcp.h in the pppd directory.
++ * (XXX - these constants should simply be shared by lcp.c instead
++ *	  of living in lcp.h)
++ */
++#define	PPP_MTU		1500	/* Default MTU (size of Info field) */
++#define PPP_MAXMTU	65535 - (PPP_HDRLEN + PPP_FCSLEN)
++#define PPP_MINMTU	64
++#define PPP_MRU		1500	/* default MRU = max length of info field */
++#define PPP_MAXMRU	65000	/* Largest MRU we allow */
++#define PPP_MINMRU	128
++
++#define PPP_ADDRESS(p)	(((u_char *)(p))[0])
++#define PPP_CONTROL(p)	(((u_char *)(p))[1])
++#define PPP_PROTOCOL(p)	((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3])
++
++/*
++ * Significant octet values.
++ */
++#define	PPP_ALLSTATIONS	0xff	/* All-Stations broadcast address */
++#define	PPP_UI		0x03	/* Unnumbered Information */
++#define	PPP_FLAG	0x7e	/* Flag Sequence */
++#define	PPP_ESCAPE	0x7d	/* Asynchronous Control Escape */
++#define	PPP_TRANS	0x20	/* Asynchronous transparency modifier */
++
++/*
++ * Protocol field values.
++ */
++#define PPP_IP		0x21	/* Internet Protocol */
++#define PPP_AT		0x29	/* AppleTalk Protocol */
++#define PPP_IPX		0x2b	/* IPX protocol */
++#define	PPP_VJC_COMP	0x2d	/* VJ compressed TCP */
++#define	PPP_VJC_UNCOMP	0x2f	/* VJ uncompressed TCP */
++#define PPP_IPV6	0x57	/* Internet Protocol Version 6 */
++#define PPP_COMP	0xfd	/* compressed packet */
++#define PPP_IPCP	0x8021	/* IP Control Protocol */
++#define PPP_ATCP	0x8029	/* AppleTalk Control Protocol */
++#define PPP_IPXCP	0x802b	/* IPX Control Protocol */
++#define PPP_IPV6CP	0x8057	/* IPv6 Control Protocol */
++#define PPP_CCP		0x80fd	/* Compression Control Protocol */
++#define PPP_ECP		0x8053	/* Encryption Control Protocol */
++#define PPP_LCP		0xc021	/* Link Control Protocol */
++#define PPP_PAP		0xc023	/* Password Authentication Protocol */
++#define PPP_LQR		0xc025	/* Link Quality Report protocol */
++#define PPP_CHAP	0xc223	/* Cryptographic Handshake Auth. Protocol */
++#define PPP_CBCP	0xc029	/* Callback Control Protocol */
++#define PPP_EAP		0xc227	/* Extensible Authentication Protocol */
++
++/*
++ * Values for FCS calculations.
++ */
++#define PPP_INITFCS	0xffff	/* Initial FCS value */
++#define PPP_GOODFCS	0xf0b8	/* Good final FCS value */
++#define PPP_FCS(fcs, c)	(((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
++
++/*
++ * A 32-bit unsigned integral type.
++ */
++
++#if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES) \
++ && !defined(__FreeBSD__) && (NS_TARGET < 40)
++#ifdef	UINT32_T
++typedef UINT32_T	u_int32_t;
++#else
++typedef unsigned int	u_int32_t;
++typedef unsigned short  u_int16_t;
++#endif
++#endif
++
++/*
++ * Extended asyncmap - allows any character to be escaped.
++ */
++typedef u_int32_t	ext_accm[8];
++
++/*
++ * What to do with network protocol (NP) packets.
++ */
++enum NPmode {
++    NPMODE_PASS,		/* pass the packet through */
++    NPMODE_DROP,		/* silently drop the packet */
++    NPMODE_ERROR,		/* return an error */
++    NPMODE_QUEUE		/* save it up for later. */
++};
++
++/*
++ * Statistics.
++ */
++struct pppstat	{
++    unsigned int ppp_ibytes;	/* bytes received */
++    unsigned int ppp_ipackets;	/* packets received */
++    unsigned int ppp_ierrors;	/* receive errors */
++    unsigned int ppp_obytes;	/* bytes sent */
++    unsigned int ppp_opackets;	/* packets sent */
++    unsigned int ppp_oerrors;	/* transmit errors */
++};
++
++struct vjstat {
++    unsigned int vjs_packets;	/* outbound packets */
++    unsigned int vjs_compressed; /* outbound compressed packets */
++    unsigned int vjs_searches;	/* searches for connection state */
++    unsigned int vjs_misses;	/* times couldn't find conn. state */
++    unsigned int vjs_uncompressedin; /* inbound uncompressed packets */
++    unsigned int vjs_compressedin; /* inbound compressed packets */
++    unsigned int vjs_errorin;	/* inbound unknown type packets */
++    unsigned int vjs_tossed;	/* inbound packets tossed because of error */
++};
++
++struct ppp_stats {
++    struct pppstat p;		/* basic PPP statistics */
++    struct vjstat vj;		/* VJ header compression statistics */
++};
++
++struct compstat {
++    unsigned int unc_bytes;	/* total uncompressed bytes */
++    unsigned int unc_packets;	/* total uncompressed packets */
++    unsigned int comp_bytes;	/* compressed bytes */
++    unsigned int comp_packets;	/* compressed packets */
++    unsigned int inc_bytes;	/* incompressible bytes */
++    unsigned int inc_packets;	/* incompressible packets */
++    unsigned int ratio;		/* recent compression ratio << 8 */
++};
++
++struct ppp_comp_stats {
++    struct compstat c;		/* packet compression statistics */
++    struct compstat d;		/* packet decompression statistics */
++};
++
++/*
++ * The following structure records the time in seconds since
++ * the last NP packet was sent or received.
++ */
++struct ppp_idle {
++    time_t xmit_idle;		/* time since last NP packet sent */
++    time_t recv_idle;		/* time since last NP packet received */
++};
++
++#ifndef __P
++#ifdef __STDC__
++#define __P(x)	x
++#else
++#define __P(x)	()
++#endif
++#endif
++
++#endif /* _PPP_DEFS_H_ */
+diff --git a/usl/usl.h b/usl/usl.h
+index cdc16db..88d2714 100644
+--- a/usl/usl.h
++++ b/usl/usl.h
+@@ -38,6 +38,10 @@
+ #include "usl_fsm.h"
+ #include "usl_list.h"
+ 
++#ifndef WAIT_ANY
++#define WAIT_ANY (-1)
++#endif
++
+ #define USL_VERSION	"0.6"
+ 
+ #ifdef DEBUG
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/always_syslog.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/always_syslog.patch
new file mode 100644
index 0000000..e475276
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/always_syslog.patch
@@ -0,0 +1,22 @@
+ippool: always log to syslog
+
+Even when running in the foreground, send log messages to syslog.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+
+--- a/ippool_main.c
++++ b/ippool_main.c
+@@ -251,9 +251,8 @@ void ippool_vlog(int level, const char *
+ 	if (ippool_opt_nodaemon) {
+ 		vprintf(fmt, ap);
+ 		printf("\n");
+-	} else {
+-		vsyslog(level, fmt, ap);
+ 	}
++	vsyslog(level, fmt, ap);
+ 	DMALLOC_VMESSAGE(fmt, ap);
+ }
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service
new file mode 100644
index 0000000..e5917fc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=ip address pool allocator
+Requires=rpcbind.service
+After=rpcbind.service
+
+[Service]
+Type=simple
+# Start ippoold in the foreground!
+ExecStart=@SBINDIR@/ippoold -f
+# Normal output will go to syslog, so suppress stdout.
+StandardOutput=null
+StandardError=syslog
+# ExecStop is not needed. systemd will send SIGTERM
+# and ippoold will exit status 1.
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch
new file mode 100644
index 0000000..14a768d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch
@@ -0,0 +1,65 @@
+Fix start error if lsb init-functions doesn't exist
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/debian/init.d b/debian/init.d
+index 363ba89..0327fec 100644
+--- a/debian/init.d
++++ b/debian/init.d
+@@ -10,6 +10,9 @@
+ # Description:       Start ippool daemon
+ ### END INIT INFO
+ 
++# Source function library.
++. /etc/init.d/functions
++
+ DAEMON=/usr/sbin/ippoold
+ NAME=ippoold
+ MODULE=pppol2tp
+@@ -18,7 +21,23 @@ MODULE=pppol2tp
+ test -x $DAEMON || exit 0
+ 
+ # Get lsb functions
+-. /lib/lsb/init-functions
++if [ -f /lib/lsb/init-functions ]
++then
++  . /lib/lsb/init-functions
++else
++  log_begin_msg() {
++    echo -n $*
++  }
++
++  log_end_msg() {
++    if [ $1 -eq 0 ]; then
++      echo "done"
++    else
++      echo "failed"
++    fi
++  }
++fi
++
+ . /etc/default/rcS
+ 
+ case "$1" in
+@@ -35,6 +54,10 @@ case "$1" in
+     fi
+     log_end_msg $?
+     ;;
++  status)
++    status /usr/sbin/ippoold;
++    exit $?
++    ;;
+   restart)
+     $0 stop
+     sleep 1
+@@ -46,7 +69,7 @@ case "$1" in
+     log_end_msg $?
+     ;;
+   *)
+-    log_success_msg "Usage: /etc/init.d/ippoold {start|stop|restart|reload|force-reload}"
++    log_success_msg "Usage: /etc/init.d/ippoold {start|stop|status|restart|reload|force-reload}"
+     exit 1
+ esac
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_parallel_make_and_pic.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_parallel_make_and_pic.patch
new file mode 100644
index 0000000..1ebd95e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_parallel_make_and_pic.patch
@@ -0,0 +1,89 @@
+1)add -fPIC for $(IPPOOL_RPC_STEM)_xdr.o, $(IPPOOL_RPC_STEM)_client.o
+2)add sub target for subdirs-all, and those dependencies below
+  pppd plugin directory build depends on $(IPPOOL_RPC_STEM)_xdr.o 
+$(IPPOOL_RPC_STEM)_client.o ippool_rpc.h
+
+  ippoold depends on libusl
+  ippoolconfig depends on libcli
+
+  $(IPPOOL_RPC_STEM)_xdr.o, $(IPPOOL_RPC_STEM)_client.o 
+$(IPPOOL_RPC_STEM)_server.o *.o in main directory depends on ippool_rpc.h
+as those all directly or indirectly include ippool_rpc.h which is 
+dynamically generated by rpcgen
+
+to make parallel make working.
+3)include dependency files for pppd.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/Makefile b/Makefile
+index 73aa72f..4f7af1d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -106,14 +106,14 @@ all:			generated-files $(IPPOOL_RPC_STEM)_xdr.o $(IPPOOL_RPC_STEM)_client.o \
+ 			subdirs-all $(PROGS.sbin) $(PROGS.bin)
+ 
+ # Compile without -Wall because rpcgen-generated code is full of warnings
+-$(IPPOOL_RPC_STEM)_xdr.o:	$(IPPOOL_RPC_STEM)_xdr.c
+-			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $<
++$(IPPOOL_RPC_STEM)_xdr.o:	$(IPPOOL_RPC_STEM)_xdr.c $(IPPOOL_RPC_STEM).h
++			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $< -fPIC
+ 
+-$(IPPOOL_RPC_STEM)_client.o:	$(IPPOOL_RPC_STEM)_client.c
+-			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $<
++$(IPPOOL_RPC_STEM)_client.o:	$(IPPOOL_RPC_STEM)_client.c $(IPPOOL_RPC_STEM).h
++			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $< -fPIC
+ 
+-$(IPPOOL_RPC_STEM)_server.o:	$(IPPOOL_RPC_STEM)_server.c
+-			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $<
++$(IPPOOL_RPC_STEM)_server.o:	$(IPPOOL_RPC_STEM)_server.c $(IPPOOL_RPC_STEM).h
++			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $< -fPIC
+ 
+ $(IPPOOL_RPC_STEM)_xdr.c:	$(IPPOOL_RPC_STEM).x
+ 			-$(RM) $@
+@@ -136,8 +136,12 @@ $(IPPOOL_RPC_STEM).h:	$(IPPOOL_RPC_STEM).x
+ 
+ generated-files:	$(RPC_FILES)
+ 
+-subdirs-all:
+-			@for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)" all; if [ $$? -ne 0 ]; then exit 1; fi; done
++subdirs-all:	$(patsubst %,%-dir, $(SUBDIRS))
++
++pppd-dir: $(IPPOOL_RPC_STEM)_xdr.o $(IPPOOL_RPC_STEM)_client.o $(IPPOOL_RPC_STEM).h
++
++$(patsubst %,%-dir,$(SUBDIRS)):
++			@for d in $(patsubst %-dir,%,$@); do $(MAKE) -C $$d $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)" all; if [ $$? -ne 0 ]; then exit 1; fi; done
+ 
+ clean:
+ 			@for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; if [ $$? -ne 0 ]; then exit 1; fi; done
+@@ -151,13 +155,13 @@ TAGS:
+ 			@for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; done
+ 			etags -t $(wildcard *.c) $(wildcard *.h)
+ 
+-ippoold:		$(IPPOOLD_SRCS.o)
+-			$(CC) -o $@ $^ $(LDFLAGS.ippoold)
++ippoold:		$(IPPOOLD_SRCS.o) usl-dir
++			$(CC) -o $@ $(IPPOOLD_SRCS.o) $(LDFLAGS.ippoold)
+ 
+-ippoolconfig:		$(IPPOOLCONFIG_SRCS.o)
+-			$(CC) -o $@ $^ $(LDFLAGS.ippoolconfig)
++ippoolconfig:		$(IPPOOLCONFIG_SRCS.o) cli-dir
++			$(CC) -o $@ $(IPPOOLCONFIG_SRCS.o) $(LDFLAGS.ippoolconfig)
+ 
+-%.o:	%.c
++%.o:	%.c $(IPPOOL_RPC_STEM).h
+ 			$(CC) -c $(CFLAGS) $< -o $@
+ 
+ install:		all
+diff --git a/pppd/Makefile b/pppd/Makefile
+index 78d9b33..106deca 100644
+--- a/pppd/Makefile
++++ b/pppd/Makefile
+@@ -24,3 +24,5 @@ install: ippool.so
+ 
+ clean:
+ 	-rm -rf *.o *.so
++
++include $(wildcard *.d /dev/null)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_usl_timer.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_usl_timer.patch
new file mode 100644
index 0000000..ca0e332
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_usl_timer.patch
@@ -0,0 +1,49 @@
+include limits.h to avoid UINT_MAX undefined compiling error.
+remove the unused assign which caused compiling error with -Werror.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+
+diff --git a/usl/usl_timer.c b/usl/usl_timer.c
+index 734b820..fda752b 100644
+--- a/usl/usl_timer.c
++++ b/usl/usl_timer.c
+@@ -42,6 +42,7 @@
+ #include <signal.h>
+ #include <string.h>
+ #include <sys/time.h>
++#include <limits.h>
+ 
+ #include "usl.h"
+ 
+@@ -87,14 +88,13 @@ void (*usl_timer_tick_hook)(void);
+  */
+ void usl_timer_tick(void)
+ {
+-	int result;
+ 	char msg = '\0';
+ 
+ 	usl_tick++;
+ 
+ 	if (!usl_tick_pending) {
+ 		usl_tick_pending = 1;
+-		result = write(usl_tick_pipe[1], &msg, sizeof(msg));
++		write(usl_tick_pipe[1], &msg, sizeof(msg));
+ 	}
+ }
+ 
+@@ -111,11 +111,10 @@ static void usl_timer_tick_handler(int fd, void *arg)
+ 	struct usl_ord_list_head *tmp;
+ 	struct usl_list_head *iwalk;
+ 	struct usl_list_head *itmp;
+-	int result;
+ 	char msg;
+ 	USL_LIST_HEAD(expire_list);
+ 
+-	result = usl_fd_read(usl_tick_pipe[0], &msg, sizeof(msg));
++	usl_fd_read(usl_tick_pipe[0], &msg, sizeof(msg));
+ 	usl_tick_pending = 0;
+ 
+ 	usl_list_for_each(walk, tmp, &usl_timer_list) {
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/makefile-add-ldflags.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/makefile-add-ldflags.patch
new file mode 100644
index 0000000..7d5b715
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/makefile-add-ldflags.patch
@@ -0,0 +1,21 @@
+Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 4f7af1d..a05a000 100644
+--- a/Makefile
++++ b/Makefile
+@@ -83,8 +83,8 @@ endif
+ 
+ CPPFLAGS=		$(CPPFLAGS.ippooltest)
+ CFLAGS=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+-LDFLAGS.ippoold=	-Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
+-LDFLAGS.ippoolconfig=	-Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
++LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
++LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
+ 
+ OPT_CFLAGS?=		-O
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/runtest.sh b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/runtest.sh
new file mode 100644
index 0000000..f91f582
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/runtest.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+BANNER="----------------------------------------------------------------------------"
+TCLSH="tclsh all.tcl -preservecore 3 -verbose bps -tmpdir ./results -outfile test-ippool.result"
+
+test_setup() {
+        if [ -d ./results ]; then rm -fr ./results; fi
+        mkdir ./results
+}
+
+test_ippool() {
+        echo "${BANNER}"
+        eval $TCLSH -constraints "ipPool"
+}
+test_postprocess() {
+        echo "${BANNER}"
+        (failed=`grep FAILED results/*.result | wc -l`; \
+        let failed2=failed/2 ;\
+        passed=`grep PASSED results/*.result | wc -l`; \
+        echo "TEST SUMMARY: $passed tests PASSED, $failed2 tests FAILED" ;\
+        exit $failed2)
+}
+
+test_setup
+test_ippool
+test_postprocess
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
new file mode 100644
index 0000000..6e47483
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
@@ -0,0 +1,113 @@
+SUMMARY = "An IP address pool manager"
+DESCRIPTION = "IpPool is implemented as a separate server daemon \
+to allow any application to use its address pools. This makes it possible \
+to define address pools that are shared by PPP, L2TP, PPTP etc. It may be \
+useful in some VPN server setups. IpPool comes with a command line \
+management application, ippoolconfig to manage and query address pool \
+status. A pppd plugin is supplied which allows pppd to request IP \
+addresses from ippoold. \
+"
+HOMEPAGE = "http://www.openl2tp.org/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+
+SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
+           file://runtest.sh \
+           file://ippool.service \
+           file://ippool_usl_timer.patch \
+           file://ippool_parallel_make_and_pic.patch \
+           file://ippool_init.d.patch \
+           file://always_syslog.patch \
+           file://makefile-add-ldflags.patch \
+           file://0001-usl_timer-Check-for-return-value-of-write-API.patch \
+           file://0001-Respect-flags-from-env.patch \
+           file://0001-read-returns-ssize_t.patch \
+           file://0002-Mark-first-element-of-a-string-as-null.patch \
+           file://0003-cli-Mark-return-of-strtol-as-long-int.patch \
+           "
+SRC_URI_append_libc-musl = "\
+           file://0002-link-with-libtirpc.patch \
+           file://0003-musl-fixes.patch \
+           "
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f"
+SRC_URI[md5sum] = "e2401e65db26a3764585b97212888fae"
+SRC_URI[sha256sum] = "d3eab7d6cad5da8ccc9d1e31d5303e27a39622c07bdb8fa3618eea314412075b"
+
+inherit systemd
+
+DEPENDS = "readline ppp ncurses gzip-native"
+DEPENDS_append_libc-musl = " libtirpc"
+RDEPENDS_${PN} = "rpcbind"
+
+EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'"
+EXTRA_OEMAKE += "PPPD_VERSION=${PPPD_VERSION} SYS_LIBDIR=${libdir}"
+# enable self tests
+EXTRA_OEMAKE += "IPPOOL_TEST=y"
+
+CPPFLAGS += "${SELECTED_OPTIMIZATION}"
+CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+
+SYSTEMD_SERVICE_${PN} = "ippool.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+
+do_compile_prepend() {
+    # fix the CFLAGS= and CPPFLAGS= in main Makefile, to have the extra CFLAGS in env
+    sed -i -e "s/^CFLAGS=/CFLAGS+=/" ${S}/Makefile
+    sed -i -e "s/^CPPFLAGS=/CPPFLAGS+=/" ${S}/Makefile
+
+    sed -i -e "s:-I/usr/include/pppd:-I=/usr/include/pppd:" ${S}/pppd/Makefile
+
+}
+
+
+do_install() {
+    oe_runmake DESTDIR=${D} install
+
+    install -D -m 0755 ${S}/debian/init.d ${D}${sysconfdir}/init.d/ippoold
+    install -D -m 0644 ${WORKDIR}/ippool.service ${D}${systemd_system_unitdir}/ippool.service
+    sed -i -e 's:@SBINDIR@:${sbindir}:g' ${D}${systemd_system_unitdir}/ippool.service
+
+    # install self test
+    install -d ${D}/opt/${BPN}
+    install ${S}/test/all.tcl  ${S}/test/ippool.test \
+        ${S}/test/test_procs.tcl ${D}/opt/${BPN}
+    install ${WORKDIR}/runtest.sh ${D}/opt/${BPN}
+    # fix the ../ippoolconfig in test_procs.tcl
+    sed -i -e "s:../ippoolconfig:ippoolconfig:" \
+        ${D}/opt/${BPN}/test_procs.tcl
+}
+
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN} += "${libdir}/pppd/${PPPD_VERSION}/ippool.so"
+FILES_${PN}-dbg += "${libdir}/pppd/${PPPD_VERSION}/.debug/ippool.so"
+FILES_${PN}-test = "/opt/${BPN}"
+
+# needs tcl to run tests
+RDEPENDS_${PN}-test += "tcl ${BPN}"
+
+PPPD_VERSION="${@get_ppp_version(d)}"
+
+def get_ppp_version(d):
+    import re
+
+    pppd_plugin = d.expand('${STAGING_LIBDIR}/pppd')
+    if not os.path.isdir(pppd_plugin):
+        return None
+
+    bb.debug(1, "pppd plugin dir %s" % pppd_plugin)
+    r = re.compile("\d*\.\d*\.\d*")
+    for f in os.listdir(pppd_plugin):
+        if os.path.isdir(os.path.join(pppd_plugin, f)):
+            ma = r.match(f)
+            if ma:
+                bb.debug(1, "pppd version dir %s" % f)
+                return f
+            else:
+                bb.debug(1, "under pppd plugin dir %s" % f)
+
+    return None
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.3.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.3.5.bb
new file mode 100644
index 0000000..5e7e6e4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.3.5.bb
@@ -0,0 +1,49 @@
+SUMMARY = "High Availability monitor built upon LVS, VRRP and service pollers"
+DESCRIPTION = "Keepalived is a routing software written in C. The main goal \
+of this project is to provide simple and robust facilities for loadbalancing \
+and high-availability to Linux system and Linux based infrastructures. \
+Loadbalancing framework relies on well-known and widely used Linux Virtual \
+Server (IPVS) kernel module providing Layer4 loadbalancing \
+"
+HOMEPAGE = "http://www.keepalived.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "9964d295ec9d34ed3408b57d28847b68"
+SRC_URI[sha256sum] = "c0114d86ea4c896557beb0d9367819a423ffba772bc5d7c548dc455e6b3bd048"
+
+DEPENDS = "libnfnetlink openssl"
+
+inherit autotools pkgconfig systemd update-rc.d
+
+PACKAGECONFIG ??= "libnl snmp \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+"
+PACKAGECONFIG[libnl] = "--enable-libnl,--disable-libnl,libnl"
+PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
+PACKAGECONFIG[systemd] = "--with-init=systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--with-init=SYSV,systemd"
+
+EXTRA_OECONF = "--disable-libiptc"
+EXTRA_OEMAKE = "initdir=${sysconfdir}/init.d"
+
+do_install_append() {
+    if [ -f ${D}${sysconfdir}/init.d/${BPN} ]; then
+        chmod 0755 ${D}${sysconfdir}/init.d/${BPN}
+        sed -i 's#rc.d/##' ${D}${sysconfdir}/init.d/${BPN}
+    fi
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0644 ${B}/${BPN}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
+    fi
+}
+
+FILES_${PN} += "${datadir}/snmp/mibs/KEEPALIVED-MIB.txt"
+
+INITSCRIPT_NAME = "keepalived"
+INITSCRIPT_PARAMS = "remove"
+
+SYSTEMD_SERVICE_${PN} = "keepalived.service"
+SYSTEMD_AUTO_ENABLE ?= "disable"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch
new file mode 100644
index 0000000..4876e17
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch
@@ -0,0 +1,32 @@
+From f9f3e4dd31588cce5f655730da7b5c3f56a9bdc1 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Tue, 26 Sep 2017 09:19:51 -0300
+Subject: [PATCH] src/daemon/lldpd.service.in: Use fixed path for mkdir command
+Organization: O.S. Systems Software LTDA.
+
+@mkdir_p@ is expanded to host tools path ../build/tmp/hosttools/mkdir that
+doesn't exist on target. Remove @mkdir_p@ and use /bin/mkdir -p to
+create /var/run/lldpd directory.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+---
+ src/daemon/lldpd.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon/lldpd.service.in b/src/daemon/lldpd.service.in
+index fdb7338..4291830 100644
+--- a/src/daemon/lldpd.service.in
++++ b/src/daemon/lldpd.service.in
+@@ -9,7 +9,7 @@ Type=notify
+ NotifyAccess=main
+ EnvironmentFile=-/etc/default/lldpd
+ EnvironmentFile=-/etc/sysconfig/lldpd
+-ExecStartPre=@mkdir_p@ @PRIVSEP_CHROOT@
++ExecStartPre=/bin/mkdir -p @PRIVSEP_CHROOT@
+ ExecStart=@sbindir@/lldpd $DAEMON_ARGS $LLDPD_OPTIONS
+ Restart=on-failure
+ PrivateTmp=yes
+-- 
+2.14.2
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.6.bb
deleted file mode 100644
index 0cd0637..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.6.bb
+++ /dev/null
@@ -1,65 +0,0 @@
-SUMMARY = "A 802.1ab implementation (LLDP) to help you locate neighbors of all your equipments"
-SECTION = "net/misc"
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d"
-
-DEPENDS = "libbsd libevent"
-
-SRC_URI = "\
-    http://media.luffy.cx/files/${BPN}/${BPN}-${PV}.tar.gz \
-    file://lldpd.init.d \
-    file://lldpd.default \
-    "
-
-SRC_URI[md5sum] = "0dcdee7c1b3c62362d73f6508c11edae"
-SRC_URI[sha256sum] = "e74e2dd7e2a233ca1ff385c925ddae2a916d302819d1433741407d2f8fb0ddd8"
-
-inherit autotools update-rc.d useradd systemd pkgconfig bash-completion
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system -g lldpd --shell /bin/false lldpd"
-GROUPADD_PARAM_${PN} = "--system lldpd"
-
-EXTRA_OECONF += "--without-embedded-libevent \
-                 --disable-oldies \
-                 --with-privsep-user=lldpd \
-                 --with-privsep-group=lldpd \
-                 --with-systemdsystemunitdir=${systemd_system_unitdir} \
-                 --without-sysusersdir \
-"
-
-PACKAGECONFIG ??= "cdp fdp edp sonmp lldpmed dot1 dot3"
-PACKAGECONFIG[json] = "--with-json,--without-json,jansson"
-PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxm2"
-PACKAGECONFIG[snmp] = "--with-snmp,--without-snmp,net-snmp"
-PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
-PACKAGECONFIG[seccomp] = "--with-seccomp,--without-seccomp,libseccomp"
-PACKAGECONFIG[cdp] = "--enable-cdp,--disable-cdp"
-PACKAGECONFIG[fdp] = "--enable-fdp,--disable-fdp"
-PACKAGECONFIG[edp] = "--enable-edp,--disable-edp"
-PACKAGECONFIG[sonmp] = "--enable-sonmp,--disable-sonmp"
-PACKAGECONFIG[lldpmed] = "--enable-lldpmed,--disable-lldpmed"
-PACKAGECONFIG[dot1] = "--enable-dot1,--disable-dot1"
-PACKAGECONFIG[dot3] = "--enable-dot3,--disable-dot3"
-PACKAGECONFIG[custom] = "--enable-custom,--disable-custom"
-
-INITSCRIPT_NAME = "lldpd"
-INITSCRIPT_PARAMS = "defaults"
-
-SYSTEMD_SERVICE_${PN} = "lldpd.service"
-
-do_install_append() {
-    install -Dm 0755 ${WORKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd
-    install -Dm 0644 ${WORKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd
-    # Make an empty configuration file
-    touch ${D}${sysconfdir}/lldpd.conf
-}
-
-PACKAGES =+ "${PN}-zsh-completion"
-
-FILES_${PN} += "${libdir}/sysusers.d"
-RDEPENDS_${PN} += "os-release"
-
-FILES_${PN}-zsh-completion += "${datadir}/zsh/"
-# FIXME: zsh is broken in meta-oe so this cannot be enabled for now
-#RDEPENDS_${PN}-zsh-completion += "zsh"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.8.bb
new file mode 100644
index 0000000..dbd84cf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.8.bb
@@ -0,0 +1,65 @@
+SUMMARY = "A 802.1ab implementation (LLDP) to help you locate neighbors of all your equipments"
+SECTION = "net/misc"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d"
+
+DEPENDS = "libbsd libevent"
+
+SRC_URI = "\
+    http://media.luffy.cx/files/${BPN}/${BPN}-${PV}.tar.gz \
+    file://lldpd.init.d \
+    file://lldpd.default \
+    file://src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch \
+    "
+
+SRC_URI[md5sum] = "8809600492f6b73149eb19158e819c1f"
+SRC_URI[sha256sum] = "9ee494e91bc33938575b2c09b26188c486ef8eac6e2155d250c189cc4e988c4f"
+
+inherit autotools update-rc.d useradd systemd pkgconfig bash-completion
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system -g lldpd --shell /bin/false lldpd"
+GROUPADD_PARAM_${PN} = "--system lldpd"
+
+EXTRA_OECONF += "--without-embedded-libevent \
+                 --disable-oldies \
+                 --with-privsep-user=lldpd \
+                 --with-privsep-group=lldpd \
+                 --with-systemdsystemunitdir=${systemd_system_unitdir} \
+                 --without-sysusersdir \
+"
+
+PACKAGECONFIG ??= "cdp fdp edp sonmp lldpmed dot1 dot3"
+PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxm2"
+PACKAGECONFIG[snmp] = "--with-snmp,--without-snmp,net-snmp"
+PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
+PACKAGECONFIG[seccomp] = "--with-seccomp,--without-seccomp,libseccomp"
+PACKAGECONFIG[cdp] = "--enable-cdp,--disable-cdp"
+PACKAGECONFIG[fdp] = "--enable-fdp,--disable-fdp"
+PACKAGECONFIG[edp] = "--enable-edp,--disable-edp"
+PACKAGECONFIG[sonmp] = "--enable-sonmp,--disable-sonmp"
+PACKAGECONFIG[lldpmed] = "--enable-lldpmed,--disable-lldpmed"
+PACKAGECONFIG[dot1] = "--enable-dot1,--disable-dot1"
+PACKAGECONFIG[dot3] = "--enable-dot3,--disable-dot3"
+PACKAGECONFIG[custom] = "--enable-custom,--disable-custom"
+
+INITSCRIPT_NAME = "lldpd"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "lldpd.service"
+
+do_install_append() {
+    install -Dm 0755 ${WORKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd
+    install -Dm 0644 ${WORKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd
+    # Make an empty configuration file
+    touch ${D}${sysconfdir}/lldpd.conf
+}
+
+PACKAGES =+ "${PN}-zsh-completion"
+
+FILES_${PN} += "${libdir}/sysusers.d"
+RDEPENDS_${PN} += "os-release"
+
+FILES_${PN}-zsh-completion += "${datadir}/zsh/"
+# FIXME: zsh is broken in meta-oe so this cannot be enabled for now
+#RDEPENDS_${PN}-zsh-completion += "zsh"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch
new file mode 100644
index 0000000..1c8146e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch
@@ -0,0 +1,32 @@
+This patch is needed to avoid double definitions of functions
+especially when building with security flags turned on. The double
+definitions causes the sed.sh script in configure to fail since it
+starts to spit out double outputs e.g.
+
+wi_cv_gethostname_size_t size_t size_t
+
+which then caused almost all subsequent compile time tests to fail since
+this gets into confdefs.h file
+
+removing this include causes only one definitions to be emitted into
+the genrated protos.h file and thus avoiding the above failure.
+
+Other solution would to fix sed.sh to ignore double definitions
+
+Upstream-Status: Pending
+
+Signed-of-by: Khem Raj <raj.khem@gmail.com>
+
+
+Index: ncftp-3.2.6/configure
+===================================================================
+--- ncftp-3.2.6.orig/configure
++++ ncftp-3.2.6/configure
+@@ -7859,7 +7859,6 @@ chmod 755 "$wi_tmpdir/prpp.pl"
+ cat << 'EOF' > "$wi_tmpdir/unistd.c"
+ #include <confdefs.h>
+ 
+-#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb
deleted file mode 100644
index 893eacb..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-DESCRIPTION = "A sophisticated console ftp client"
-HOMEPAGE = "http://ncftp.com/"
-SECTION = "net"
-LICENSE = "ClArtistic"
-LIC_FILES_CHKSUM = "file://ncftp/cmds.c;beginline=3;endline=4;md5=9de76faeaedc4f908082e3f8142715f4"
-DEPENDS = "ncurses"
-
-SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz \
-           file://ncftp-configure-use-BUILD_CC-for-ccdv.patch \
-"
-SRC_URI[md5sum] = "685e45f60ac11c89442c572c28af4228"
-SRC_URI[sha256sum] = "ac111b71112382853b2835c42ebe7bd59acb7f85dd00d44b2c19fbd074a436c4"
-
-inherit autotools-brokensep pkgconfig
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[ccdv] = "--enable-ccdv,--disable-ccdv,,"
-
-do_configure() {
-    oe_runconf
-}
-do_install () {
-    install -d ${D}${bindir} ${D}${sysconfdir} ${D}${mandir}
-    oe_runmake 'prefix=${D}${prefix}' 'BINDIR=${D}${bindir}' \
-        'SYSCONFDIR=${D}${sysconfdir}' 'mandir=${D}${mandir}' \
-        install
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb
new file mode 100644
index 0000000..5f92f27
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "A sophisticated console ftp client"
+HOMEPAGE = "http://ncftp.com/"
+SECTION = "net"
+LICENSE = "ClArtistic"
+LIC_FILES_CHKSUM = "file://ncftp/cmds.c;beginline=3;endline=4;md5=9c2390809f71465aa7ff76e03dc14d91"
+DEPENDS = "ncurses"
+
+SRC_URI = "ftp://ftp.ncftp.com/${BPN}/${BP}-src.tar.xz \
+           file://ncftp-configure-use-BUILD_CC-for-ccdv.patch \
+           file://unistd.patch \
+"
+SRC_URI[md5sum] = "42d0f896d69a4d603ec097546444245f"
+SRC_URI[sha256sum] = "5f200687c05d0807690d9fb770327b226f02dd86155b49e750853fce4e31098d"
+
+inherit autotools-brokensep pkgconfig
+
+CFLAGS += "-DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -Wall"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[ccdv] = "--enable-ccdv,--disable-ccdv,,"
+
+EXTRA_OECONF = "--disable-precomp"
+TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"
+
+do_configure() {
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+    oe_runconf
+}
+do_install () {
+    install -d ${D}${bindir} ${D}${sysconfdir} ${D}${mandir}
+    oe_runmake 'prefix=${D}${prefix}' 'BINDIR=${D}${bindir}' \
+        'SYSCONFDIR=${D}${sysconfdir}' 'mandir=${D}${mandir}' \
+        install
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch
new file mode 100644
index 0000000..4f493f7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch
@@ -0,0 +1,49 @@
+From 398c6db66c643ed6133cc2b028ab1e27a17c5295 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 1 May 2017 19:10:09 +0000
+Subject: [PATCH] Fix build failures with gcc7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/ipmidirect/ipmi_mc_vendor.cpp | 2 +-
+ plugins/ipmidirect/ipmi_resource.cpp  | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/ipmidirect/ipmi_mc_vendor.cpp b/plugins/ipmidirect/ipmi_mc_vendor.cpp
+index 2c6c090..557771c 100644
+--- a/plugins/ipmidirect/ipmi_mc_vendor.cpp
++++ b/plugins/ipmidirect/ipmi_mc_vendor.cpp
+@@ -322,7 +322,7 @@ cIpmiMcVendor::CreateResources( cIpmiDomain *domain, cIpmiMc *source_mc, cIpmiSd
+       if ( addr.m_channel != source_mc->GetChannel() ) 
+           stdlog << "WARNING : SDR channel " << addr.m_channel << " NOT equal to MC channel " << source_mc->GetChannel() << "\n";
+ 
+-       if ( FindOrCreateResource( domain, source_mc, fru_id, sdr, sdrs ) == false ) {
++       if ( !FindOrCreateResource( domain, source_mc, fru_id, sdr, sdrs ) ) {
+ 	    return false;
+ 	}
+      }
+diff --git a/plugins/ipmidirect/ipmi_resource.cpp b/plugins/ipmidirect/ipmi_resource.cpp
+index c438e74..2552673 100644
+--- a/plugins/ipmidirect/ipmi_resource.cpp
++++ b/plugins/ipmidirect/ipmi_resource.cpp
+@@ -73,7 +73,7 @@ cIpmiResource::SendCommandReadLock( const cIpmiMsg &msg, cIpmiMsg &rsp,
+ 
+   domain->ReadLock();
+ 
+-  if ( domain->VerifyResource( resource ) == false )
++  if ( !domain->VerifyResource( resource ) )
+        return SA_ERR_HPI_NOT_PRESENT;
+ 
+   return rv;
+@@ -91,7 +91,7 @@ cIpmiResource::SendCommandReadLock( cIpmiRdr *rdr, const cIpmiMsg &msg, cIpmiMsg
+   
+   domain->ReadLock();
+   
+-  if ( domain->VerifyRdr( rdr ) == false )
++  if ( !domain->VerifyRdr( rdr ) )
+        return SA_ERR_HPI_NOT_PRESENT;
+ 
+   return rv;
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch
new file mode 100644
index 0000000..4d56f65
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch
@@ -0,0 +1,31 @@
+From be40b3f11460cf495bbbef45692e7763afda0c2b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 17:56:31 -0700
+Subject: [PATCH] ipmidirect: Replace __STRING
+
+__STRING is not universally available e.g.
+musl does not define it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ plugins/ipmidirect/t/test.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/ipmidirect/t/test.h b/plugins/ipmidirect/t/test.h
+index 8d71381..978d5ff 100644
+--- a/plugins/ipmidirect/t/test.h
++++ b/plugins/ipmidirect/t/test.h
+@@ -22,7 +22,7 @@ TestFunction( const char *str, const char *file, int line, bool expr )
+ }
+ 
+ 
+-#define Test(expr) TestFunction( __STRING(expr), __FILE__, __LINE__, expr )
++#define Test(expr) TestFunction( #expr, __FILE__, __LINE__, expr )
+ 
+ 
+ static int
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch
new file mode 100644
index 0000000..0f033ac
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch
@@ -0,0 +1,47 @@
+From be665d9513cca7e8b64c79ae424cf44ac166b052 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 17:07:58 -0700
+Subject: [PATCH] plugins: Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+ before use
+
+musl does not define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+so we can not assume that all Linux systems support PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+its a glibc specific define so check for it being defined before using it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ plugins/dynamic_simulator/thread.cpp | 2 +-
+ plugins/ipmidirect/thread.cpp        | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp
+index d663be0..9210fd7 100644
+--- a/plugins/dynamic_simulator/thread.cpp
++++ b/plugins/dynamic_simulator/thread.cpp
+@@ -229,7 +229,7 @@ cThread::Exit( void *rv )
+ /**
+  * Constructor
+  **/
+-#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__)
++#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+ cThreadLock::cThreadLock()
+ {
+   pthread_mutexattr_t attr;
+diff --git a/plugins/ipmidirect/thread.cpp b/plugins/ipmidirect/thread.cpp
+index 5c52557..48e83fa 100644
+--- a/plugins/ipmidirect/thread.cpp
++++ b/plugins/ipmidirect/thread.cpp
+@@ -167,7 +167,7 @@ cThread::Exit( void *rv )
+ //                  cThreadLock
+ //////////////////////////////////////////////////
+ 
+-#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__)
++#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+ cThreadLock::cThreadLock()
+ {
+   pthread_mutexattr_t attr;
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch
new file mode 100644
index 0000000..0549d59
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch
@@ -0,0 +1,12 @@
+Index: openhpi-3.6.1/configure.ac
+===================================================================
+--- openhpi-3.6.1.orig/configure.ac
++++ openhpi-3.6.1/configure.ac
+@@ -44,6 +44,7 @@ AC_PROG_CPP
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
++AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
+ 
+ enabled_non32bit="no"
+ AC_ARG_ENABLE([non32bit-int],
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch
new file mode 100644
index 0000000..9b35a0c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch
@@ -0,0 +1,1288 @@
+Index: openhpi-3.6.1/plugins/dynamic_simulator/new_sim.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/dynamic_simulator/new_sim.cpp
++++ openhpi-3.6.1/plugins/dynamic_simulator/new_sim.cpp
+@@ -415,7 +415,7 @@ extern "C" {
+ /**
+  * Alias for @ref öh_open(), implemented by @ref NewSimulatorOpen().
+  **/
+-static void * NewSimulatorOpen( GHashTable *, unsigned int, oh_evt_queue * ) __attribute__((used));
++static void * NewSimulatorOpen( GHashTable *, unsigned int, oh_evt_queue * ) __asm__("NewSimulatorOpen") __attribute__((used));
+ 
+ /**
+  * @fn NewSimulatorOpen( GHashTable *handler_config, unsigned int hid, 
+@@ -530,7 +530,7 @@ static void * NewSimulatorOpen( GHashTab
+ /**
+  * Alias for @ref öh_close(), implemented by @ref NewSimulatorClose().
+  **/
+-static void NewSimulatorClose( void * ) __attribute__((used));
++static void NewSimulatorClose( void * ) __asm__("NewSimulatorClose") __attribute__((used));
+ 
+ /**
+  * @relate NewSimulatorClose
+@@ -585,7 +585,7 @@ static void NewSimulatorClose( void *hnd
+  * 
+  * @return HPI error code
+  **/
+-static SaErrorT NewSimulatorGetEvent( void * ) __attribute__((used));
++static SaErrorT NewSimulatorGetEvent( void * ) __asm__("NewSimulatorGetEvent") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetEvent( void *hnd ) {
+    dbg( "NewSimulatorGetEvent" );
+@@ -613,7 +613,7 @@ static SaErrorT NewSimulatorGetEvent( vo
+  * 
+  * @return HPI error code
+  **/
+-static SaErrorT NewSimulatorDiscoverResources( void * ) __attribute__((used));
++static SaErrorT NewSimulatorDiscoverResources( void * ) __asm__("NewSimulatorDiscoverResources") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorDiscoverResources( void *hnd ) {
+    dbg( "NewSimulatorDiscoverResources" );
+@@ -641,7 +641,7 @@ static SaErrorT NewSimulatorDiscoverReso
+  * 
+  * @return HPI error code
+  **/
+-static SaErrorT NewSimulatorSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __attribute__((used));
++static SaErrorT NewSimulatorSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __asm__("NewSimulatorSetResourceTag") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetResourceTag( void *hnd, SaHpiResourceIdT id, 
+                                              SaHpiTextBufferT *tag ) {
+@@ -669,7 +669,7 @@ static SaErrorT NewSimulatorSetResourceT
+  * 
+  * @return HPI error code
+  **/
+-static SaErrorT NewSimulatorSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __attribute__((used));
++static SaErrorT NewSimulatorSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __asm__("NewSimulatorSetResourceSeverity") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetResourceSeverity( void *hnd, SaHpiResourceIdT id, 
+                                                   SaHpiSeverityT sev ) {
+@@ -703,7 +703,7 @@ static SaErrorT NewSimulatorGetSensorRea
+                                                SaHpiResourceIdT id,
+                                                SaHpiSensorNumT num,
+                                                SaHpiSensorReadingT *data,
+-                                               SaHpiEventStateT *state ) __attribute__((used));
++                                               SaHpiEventStateT *state ) __asm__("NewSimulatorGetSensorReading") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorReading( void *hnd,
+                                                SaHpiResourceIdT id,
+@@ -738,7 +738,7 @@ static SaErrorT NewSimulatorGetSensorRea
+ static SaErrorT NewSimulatorGetSensorThresholds( void *hnd,
+                                           SaHpiResourceIdT,
+                                           SaHpiSensorNumT,
+-                                          SaHpiSensorThresholdsT * ) __attribute__((used));
++                                          SaHpiSensorThresholdsT * ) __asm__("NewSimulatorGetSensorThresholds") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorThresholds( void *hnd,
+                                                   SaHpiResourceIdT id,
+@@ -777,7 +777,7 @@ static SaErrorT NewSimulatorGetSensorThr
+ static SaErrorT NewSimulatorSetSensorThresholds( void *,
+                                                   SaHpiResourceIdT,
+                                                   SaHpiSensorNumT,
+-                                                  const SaHpiSensorThresholdsT * ) __attribute__((used));
++                                                  const SaHpiSensorThresholdsT * ) __asm__("NewSimulatorSetSensorThresholds") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSensorThresholds( void *hnd,
+                                                   SaHpiResourceIdT id,
+@@ -815,7 +815,7 @@ static SaErrorT NewSimulatorSetSensorThr
+ static SaErrorT NewSimulatorGetSensorEnable( void *,
+                                               SaHpiResourceIdT,
+                                               SaHpiSensorNumT,
+-                                              SaHpiBoolT * ) __attribute__((used));
++                                              SaHpiBoolT * ) __asm__("NewSimulatorGetSensorEnable") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorEnable( void *hnd,
+                                               SaHpiResourceIdT id,
+@@ -849,7 +849,7 @@ static SaErrorT NewSimulatorGetSensorEna
+ static SaErrorT NewSimulatorSetSensorEnable( void *,
+                                               SaHpiResourceIdT,
+                                               SaHpiSensorNumT,
+-                                              SaHpiBoolT ) __attribute__((used));
++                                              SaHpiBoolT ) __asm__("NewSimulatorSetSensorEnable") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSensorEnable( void *hnd,
+                                               SaHpiResourceIdT id,
+@@ -883,7 +883,7 @@ static SaErrorT NewSimulatorSetSensorEna
+ static SaErrorT NewSimulatorGetSensorEventEnables( void *,
+                                                     SaHpiResourceIdT,
+                                                     SaHpiSensorNumT,
+-                                                    SaHpiBoolT * ) __attribute__((used));
++                                                    SaHpiBoolT * ) __asm__("NewSimulatorGetSensorEventEnables") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorEventEnables( void *hnd,
+                                                     SaHpiResourceIdT id,
+@@ -916,7 +916,7 @@ static SaErrorT NewSimulatorGetSensorEve
+ static SaErrorT NewSimulatorSetSensorEventEnables( void *,
+                                                     SaHpiResourceIdT,
+                                                     SaHpiSensorNumT,
+-                                                    SaHpiBoolT ) __attribute__((used));
++                                                    SaHpiBoolT ) __asm__("NewSimulatorSetSensorEventEnables") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSensorEventEnables( void *hnd,
+                                                     SaHpiResourceIdT id,
+@@ -952,7 +952,7 @@ static SaErrorT NewSimulatorGetSensorEve
+                                                   SaHpiResourceIdT,
+                                                   SaHpiSensorNumT,
+                                                   SaHpiEventStateT *,
+-                                                  SaHpiEventStateT * ) __attribute__((used));
++                                                  SaHpiEventStateT * ) __asm__("NewSimulatorGetSensorEventMasks") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorEventMasks( void *hnd,
+                                                   SaHpiResourceIdT id,
+@@ -990,7 +990,7 @@ static SaErrorT NewSimulatorSetSensorEve
+                                                   SaHpiSensorNumT,
+                                                   SaHpiSensorEventMaskActionT,
+                                                   SaHpiEventStateT,
+-                                                  SaHpiEventStateT ) __attribute__((used));
++                                                  SaHpiEventStateT ) __asm__("NewSimulatorSetSensorEventMasks") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSensorEventMasks( void *hnd,
+                                                   SaHpiResourceIdT id,
+@@ -1026,7 +1026,7 @@ static SaErrorT NewSimulatorSetSensorEve
+ static SaErrorT NewSimulatorGetControlState( void *, SaHpiResourceIdT,
+                                               SaHpiCtrlNumT,
+                                               SaHpiCtrlModeT *,
+-                                              SaHpiCtrlStateT * ) __attribute__((used));
++                                              SaHpiCtrlStateT * ) __asm__("NewSimulatorGetControlState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetControlState( void *hnd, SaHpiResourceIdT id,
+                                               SaHpiCtrlNumT num,
+@@ -1061,7 +1061,7 @@ static SaErrorT NewSimulatorGetControlSt
+ static SaErrorT NewSimulatorSetControlState( void *, SaHpiResourceIdT,
+                                               SaHpiCtrlNumT,
+                                               SaHpiCtrlModeT,
+-                                              SaHpiCtrlStateT * ) __attribute__((used));
++                                              SaHpiCtrlStateT * ) __asm__("NewSimulatorSetControlState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetControlState( void *hnd, SaHpiResourceIdT id,
+                                               SaHpiCtrlNumT num,
+@@ -1099,7 +1099,7 @@ static SaErrorT NewSimulatorGetNextAnnou
+                                        SaHpiAnnunciatorNumT, 
+                                        SaHpiSeverityT, 
+                                        SaHpiBoolT, 
+-                                       SaHpiAnnouncementT *) __attribute__((used));
++                                       SaHpiAnnouncementT *) __asm__("NewSimulatorGetNextAnnouncement") __attribute__((used));
+  
+ static SaErrorT NewSimulatorGetNextAnnouncement(void *hnd, SaHpiResourceIdT id,
+                                        SaHpiAnnunciatorNumT num,
+@@ -1135,7 +1135,7 @@ static SaErrorT NewSimulatorGetNextAnnou
+ static SaErrorT NewSimulatorGetAnnouncement(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT, 
+                                        SaHpiEntryIdT, 
+-                                       SaHpiAnnouncementT *) __attribute__((used));
++                                       SaHpiAnnouncementT *) __asm__("NewSimulatorGetAnnouncement") __attribute__((used));
+  
+ static SaErrorT NewSimulatorGetAnnouncement(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1171,7 +1171,7 @@ static SaErrorT NewSimulatorGetAnnouncem
+ static SaErrorT NewSimulatorAckAnnouncement(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT, 
+                                        SaHpiEntryIdT, 
+-                                       SaHpiSeverityT) __attribute__((used));
++                                       SaHpiSeverityT) __asm__("NewSimulatorAckAnnouncement") __attribute__((used));
+  
+ static SaErrorT NewSimulatorAckAnnouncement(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1205,7 +1205,7 @@ static SaErrorT NewSimulatorAckAnnouncem
+  **/
+ static SaErrorT NewSimulatorAddAnnouncement(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT, 
+-                                       SaHpiAnnouncementT *) __attribute__((used));
++                                       SaHpiAnnouncementT *) __asm__("NewSimulatorAddAnnouncement") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddAnnouncement(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1239,7 +1239,7 @@ static SaErrorT NewSimulatorAddAnnouncem
+ static SaErrorT NewSimulatorDelAnnouncement(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT, 
+                                        SaHpiEntryIdT, 
+-                                       SaHpiSeverityT) __attribute__((used));
++                                       SaHpiSeverityT) __asm__("NewSimulatorDelAnnouncement") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorDelAnnouncement(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1273,7 +1273,7 @@ static SaErrorT NewSimulatorDelAnnouncem
+  **/
+ static SaErrorT NewSimulatorGetAnnMode(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT,
+-                                       SaHpiAnnunciatorModeT *) __attribute__((used));
++                                       SaHpiAnnunciatorModeT *) __asm__("NewSimulatorGetAnnMode") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetAnnMode(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1306,7 +1306,7 @@ static SaErrorT NewSimulatorGetAnnMode(v
+  **/
+ static SaErrorT NewSimulatorSetAnnMode(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT,
+-                                       SaHpiAnnunciatorModeT) __attribute__((used));
++                                       SaHpiAnnunciatorModeT) __asm__("NewSimulatorSetAnnMode") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetAnnMode(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num,
+@@ -1340,7 +1340,7 @@ static SaErrorT NewSimulatorSetAnnMode(v
+ static SaErrorT NewSimulatorGetIdrInfo( void *,
+                                          SaHpiResourceIdT,
+                                          SaHpiIdrIdT,
+-                                         SaHpiIdrInfoT * ) __attribute__((used));
++                                         SaHpiIdrInfoT * ) __asm__("NewSimulatorGetIdrInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetIdrInfo( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1380,7 +1380,7 @@ static SaErrorT NewSimulatorGetIdrAreaHe
+                                                SaHpiIdrAreaTypeT,
+                                                SaHpiEntryIdT,
+                                                SaHpiEntryIdT *,
+-                                               SaHpiIdrAreaHeaderT * ) __attribute__((used));
++                                               SaHpiIdrAreaHeaderT * ) __asm__("NewSimulatorGetIdrAreaHeader") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetIdrAreaHeader( void *hnd,
+                                                SaHpiResourceIdT id,
+@@ -1419,7 +1419,7 @@ static SaErrorT NewSimulatorAddIdrArea(
+                                          SaHpiResourceIdT,
+                                          SaHpiIdrIdT,
+                                          SaHpiIdrAreaTypeT,
+-                                         SaHpiEntryIdT * ) __attribute__((used));
++                                         SaHpiEntryIdT * ) __asm__("NewSimulatorAddIdrArea") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddIdrArea( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1456,7 +1456,7 @@ static SaErrorT NewSimulatorAddIdrAreaBy
+                                          SaHpiResourceIdT,
+                                          SaHpiIdrIdT,
+                                          SaHpiIdrAreaTypeT,
+-                                         SaHpiEntryIdT ) __attribute__((used));
++                                         SaHpiEntryIdT ) __asm__("NewSimulatorAddIdrAreaById") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddIdrAreaById( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1490,7 +1490,7 @@ static SaErrorT NewSimulatorAddIdrAreaBy
+ static SaErrorT NewSimulatorDelIdrArea( void *,
+                                          SaHpiResourceIdT,
+                                          SaHpiIdrIdT,
+-                                         SaHpiEntryIdT ) __attribute__((used));
++                                         SaHpiEntryIdT ) __asm__("NewSimulatorDelIdrArea") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorDelIdrArea( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1532,7 +1532,7 @@ static SaErrorT NewSimulatorGetIdrField(
+                                           SaHpiIdrFieldTypeT,
+                                           SaHpiEntryIdT,
+                                           SaHpiEntryIdT *,
+-                                          SaHpiIdrFieldT * ) __attribute__((used));
++                                          SaHpiIdrFieldT * ) __asm__("NewSimulatorGetIdrField") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetIdrField( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1570,7 +1570,7 @@ static SaErrorT NewSimulatorGetIdrField(
+ static SaErrorT NewSimulatorAddIdrField( void *,
+                                           SaHpiResourceIdT,
+                                           SaHpiIdrIdT,
+-                                          SaHpiIdrFieldT * ) __attribute__((used));
++                                          SaHpiIdrFieldT * ) __asm__("NewSimulatorAddIdrField") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddIdrField( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1604,7 +1604,7 @@ static SaErrorT NewSimulatorAddIdrField(
+ static SaErrorT NewSimulatorAddIdrFieldById( void *,
+                                           SaHpiResourceIdT,
+                                           SaHpiIdrIdT,
+-                                          SaHpiIdrFieldT * ) __attribute__((used));
++                                          SaHpiIdrFieldT * ) __asm__("NewSimulatorAddIdrFieldById") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddIdrFieldById( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1637,7 +1637,7 @@ static SaErrorT NewSimulatorAddIdrFieldB
+ static SaErrorT NewSimulatorSetIdrField( void *,
+                                           SaHpiResourceIdT,
+                                           SaHpiIdrIdT,
+-                                          SaHpiIdrFieldT * ) __attribute__((used));
++                                          SaHpiIdrFieldT * ) __asm__("NewSimulatorSetIdrField") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetIdrField( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1672,7 +1672,7 @@ static SaErrorT NewSimulatorDelIdrField(
+                                           SaHpiResourceIdT,
+                                           SaHpiIdrIdT,
+                                           SaHpiEntryIdT,
+-                                          SaHpiEntryIdT ) __attribute__((used));
++                                          SaHpiEntryIdT ) __asm__("NewSimulatorDelIdrField") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorDelIdrField( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1704,7 +1704,7 @@ static SaErrorT NewSimulatorDelIdrField(
+  **/ 
+ static SaErrorT NewSimulatorGetSelInfo( void *,
+                                          SaHpiResourceIdT,
+-                                         SaHpiEventLogInfoT * ) __attribute__((used));
++                                         SaHpiEventLogInfoT * ) __asm__("NewSimulatorGetSelInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSelInfo( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1736,7 +1736,7 @@ static SaErrorT NewSimulatorGetSelInfo(
+  * 
+  * @return HPI error code
+  **/ 
+-static SaErrorT NewSimulatorSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __attribute__((used));
++static SaErrorT NewSimulatorSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __asm__("NewSimulatorSetSelTime") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSelTime( void *hnd, SaHpiResourceIdT id, SaHpiTimeT t ) {
+    SaErrorT rv = SA_ERR_HPI_INTERNAL_ERROR;
+@@ -1766,7 +1766,7 @@ static SaErrorT NewSimulatorSetSelTime(
+  * 
+  * @return HPI error code
+  **/ 
+-static SaErrorT NewSimulatorAddSelEntry( void *, SaHpiResourceIdT, const SaHpiEventT * ) __attribute__((used));
++static SaErrorT NewSimulatorAddSelEntry( void *, SaHpiResourceIdT, const SaHpiEventT * ) __asm__("NewSimulatorAddSelEntry") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddSelEntry( void *hnd, SaHpiResourceIdT id,
+                                           const SaHpiEventT *Event ) {
+@@ -1809,7 +1809,7 @@ static SaErrorT NewSimulatorGetSelEntry(
+                                           SaHpiEventLogEntryIdT *,
+                                           SaHpiEventLogEntryT *,
+                                           SaHpiRdrT *,
+-                                          SaHpiRptEntryT * ) __attribute__((used));
++                                          SaHpiRptEntryT * ) __asm__("NewSimulatorGetSelEntry") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSelEntry( void *hnd, SaHpiResourceIdT id,
+                                           SaHpiEventLogEntryIdT current,
+@@ -1844,7 +1844,7 @@ static SaErrorT NewSimulatorGetSelEntry(
+  * 
+  * @return HPI error code
+  **/ 
+-static SaErrorT NewSimulatorClearSel( void *, SaHpiResourceIdT ) __attribute__((used));
++static SaErrorT NewSimulatorClearSel( void *, SaHpiResourceIdT ) __asm__("NewSimulatorClearSel") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorClearSel( void *hnd, SaHpiResourceIdT id ) {
+    SaErrorT rv = SA_ERR_HPI_INTERNAL_ERROR;
+@@ -1875,7 +1875,7 @@ static SaErrorT NewSimulatorClearSel( vo
+  * @return HPI error code
+  **/ 
+ static SaErrorT NewSimulatorSetSelState(void *, SaHpiResourceIdT, 
+-                                         SaHpiBoolT) __attribute__((used));
++                                         SaHpiBoolT) __asm__("NewSimulatorSetSelState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSelState( void *hnd, SaHpiResourceIdT id,
+                                           SaHpiBoolT state ) {
+@@ -1907,7 +1907,7 @@ static SaErrorT NewSimulatorSetSelState(
+  * @return HPI error code
+  **/ 
+ static SaErrorT NewSimulatorGetSelState(void *, SaHpiResourceIdT, 
+-                                         SaHpiBoolT *) __attribute__((used));
++                                         SaHpiBoolT *) __asm__("NewSimulatorGetSelState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSelState( void *hnd, SaHpiResourceIdT id,
+                                           SaHpiBoolT *state ) {
+@@ -1939,7 +1939,7 @@ static SaErrorT NewSimulatorGetSelState(
+  * @return HPI error code
+  **/ 
+ static SaErrorT NewSimulatorGetSelCapability(void *, SaHpiResourceIdT, 
+-                             SaHpiEventLogCapabilitiesT *) __attribute__((used));
++                             SaHpiEventLogCapabilitiesT *) __asm__("NewSimulatorGetSelCapability") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSelCapability( void *hnd, SaHpiResourceIdT id,
+                                           SaHpiEventLogCapabilitiesT *caps ) {
+@@ -1970,7 +1970,7 @@ static SaErrorT NewSimulatorGetSelCapabi
+  * @return HPI error code
+  **/ 
+ static SaErrorT NewSimulatorResetSelOverflow(void *, SaHpiResourceIdT) 
+-                                                           __attribute__((used));
++                                                           __asm__("NewSimulatorResetSelOverflow") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorResetSelOverflow( void *hnd, SaHpiResourceIdT id ) {
+ 
+@@ -2002,7 +2002,7 @@ static SaErrorT NewSimulatorResetSelOver
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorHotswapPolicyCancel( void *, SaHpiResourceIdT,
+-                                                  SaHpiTimeoutT ) __attribute__((used));
++                                                  SaHpiTimeoutT ) __asm__("NewSimulatorHotswapPolicyCancel") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorHotswapPolicyCancel( void *hnd, SaHpiResourceIdT id,
+                                                   SaHpiTimeoutT timeout) {
+@@ -2032,7 +2032,7 @@ static SaErrorT NewSimulatorHotswapPolic
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetHotswapState( void *, SaHpiResourceIdT ,
+-                                              SaHpiHsStateT * ) __attribute__((used));
++                                              SaHpiHsStateT * ) __asm__("NewSimulatorGetHotswapState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetHotswapState( void *hnd, SaHpiResourceIdT id,
+                                               SaHpiHsStateT *state ) {
+@@ -2063,7 +2063,7 @@ static SaErrorT NewSimulatorGetHotswapSt
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetHotswapState( void *, SaHpiResourceIdT,
+-                                              SaHpiHsStateT ) __attribute__((used));
++                                              SaHpiHsStateT ) __asm__("NewSimulatorSetHotswapState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetHotswapState( void *hnd, SaHpiResourceIdT id,
+                                               SaHpiHsStateT state ) {
+@@ -2105,7 +2105,7 @@ static SaErrorT NewSimulatorSetHotswapSt
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorRequestHotswapAction( void *, SaHpiResourceIdT,
+-                                                   SaHpiHsActionT ) __attribute__((used));
++                                                   SaHpiHsActionT ) __asm__("NewSimulatorRequestHotswapAction") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorRequestHotswapAction( void *hnd, SaHpiResourceIdT id,
+                                                    SaHpiHsActionT act ) {
+@@ -2139,7 +2139,7 @@ static SaErrorT NewSimulatorRequestHotsw
+ static SaErrorT NewSimulatorGetWatchdogInfo(void *,
+                                              SaHpiResourceIdT,
+                                              SaHpiWatchdogNumT,
+-                                             SaHpiWatchdogT *) __attribute__((used));
++                                             SaHpiWatchdogT *) __asm__("NewSimulatorGetWatchdogInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetWatchdogInfo(void *hnd,
+                                              SaHpiResourceIdT  id,
+@@ -2170,7 +2170,7 @@ static SaErrorT NewSimulatorGetWatchdogI
+ static SaErrorT NewSimulatorSetWatchdogInfo(void *,
+                                              SaHpiResourceIdT,
+                                              SaHpiWatchdogNumT,
+-                                             SaHpiWatchdogT *) __attribute__((used));
++                                             SaHpiWatchdogT *) __asm__("NewSimulatorSetWatchdogInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetWatchdogInfo(void *hnd,
+                                              SaHpiResourceIdT  id,
+@@ -2199,7 +2199,7 @@ static SaErrorT NewSimulatorSetWatchdogI
+  **/
+ static SaErrorT NewSimulatorResetWatchdog(void *,
+                                            SaHpiResourceIdT,
+-                                           SaHpiWatchdogNumT) __attribute__((used));
++                                           SaHpiWatchdogNumT) __asm__("NewSimulatorResetWatchdog") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorResetWatchdog(void *hnd,
+                                            SaHpiResourceIdT  id,
+@@ -2229,7 +2229,7 @@ static SaErrorT NewSimulatorResetWatchdo
+ static SaErrorT NewSimulatorGetFumiSpec(void *, 
+                                          SaHpiResourceIdT, 
+                                          SaHpiFumiNumT, 
+-                                         SaHpiFumiSpecInfoT *) __attribute__((used));
++                                         SaHpiFumiSpecInfoT *) __asm__("NewSimulatorGetFumiSpec") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiSpec(void *hnd, 
+                                          SaHpiResourceIdT    id, 
+@@ -2260,7 +2260,7 @@ static SaErrorT NewSimulatorGetFumiSpec(
+ static SaErrorT NewSimulatorGetFumiServImpact(void *, 
+                                                SaHpiResourceIdT, 
+                                                SaHpiFumiNumT, 
+-                                               SaHpiFumiServiceImpactDataT *) __attribute__((used));
++                                               SaHpiFumiServiceImpactDataT *) __asm__("NewSimulatorGetFumiServImpact") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiServImpact(void *hnd, 
+                                                SaHpiResourceIdT            id, 
+@@ -2294,7 +2294,7 @@ static SaErrorT NewSimulatorSetFumiSourc
+                                            SaHpiResourceIdT, 
+                                            SaHpiFumiNumT, 
+                                            SaHpiBankNumT, 
+-                                           SaHpiTextBufferT *) __attribute__((used));
++                                           SaHpiTextBufferT *) __asm__("NewSimulatorSetFumiSource") __attribute__((used));
+                                            
+ static SaErrorT NewSimulatorSetFumiSource(void             *hnd, 
+                                            SaHpiResourceIdT  id, 
+@@ -2327,7 +2327,7 @@ static SaErrorT NewSimulatorSetFumiSourc
+ static SaErrorT NewSimulatorValidateFumiSource(void *, 
+                                                 SaHpiResourceIdT, 
+                                                 SaHpiFumiNumT, 
+-                                                SaHpiBankNumT) __attribute__((used));
++                                                SaHpiBankNumT) __asm__("NewSimulatorValidateFumiSource") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorValidateFumiSource(void            *hnd, 
+                                                 SaHpiResourceIdT id, 
+@@ -2361,7 +2361,7 @@ static SaErrorT NewSimulatorGetFumiSourc
+                                            SaHpiResourceIdT, 
+                                            SaHpiFumiNumT, 
+                                            SaHpiBankNumT, 
+-                                           SaHpiFumiSourceInfoT *) __attribute__((used));
++                                           SaHpiFumiSourceInfoT *) __asm__("NewSimulatorGetFumiSource") __attribute__((used));
+                                            
+ static SaErrorT NewSimulatorGetFumiSource(void                *hnd, 
+                                            SaHpiResourceIdT     id, 
+@@ -2400,7 +2400,7 @@ static SaErrorT NewSimulatorGetFumiSourc
+                              SaHpiBankNumT, 
+                              SaHpiEntryIdT, 
+                              SaHpiEntryIdT *, 
+-                             SaHpiFumiComponentInfoT *) __attribute__((used));
++                             SaHpiFumiComponentInfoT *) __asm__("NewSimulatorGetFumiSourceComponent") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiSourceComponent(void            *hnd, 
+                                                     SaHpiResourceIdT id, 
+@@ -2437,7 +2437,7 @@ static SaErrorT NewSimulatorGetFumiTarge
+                                            SaHpiResourceIdT, 
+                                            SaHpiFumiNumT, 
+                                            SaHpiBankNumT, 
+-                                           SaHpiFumiBankInfoT *) __attribute__((used));
++                                           SaHpiFumiBankInfoT *) __asm__("NewSimulatorGetFumiTarget") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiTarget(void              *hnd, 
+                                            SaHpiResourceIdT   id, 
+@@ -2476,7 +2476,7 @@ static SaErrorT NewSimulatorGetFumiTarge
+                                                     SaHpiBankNumT, 
+                                                     SaHpiEntryIdT, 
+                                                     SaHpiEntryIdT *, 
+-                                                    SaHpiFumiComponentInfoT *) __attribute__((used));
++                                                    SaHpiFumiComponentInfoT *) __asm__("NewSimulatorGetFumiTargetComponent") __attribute__((used));
+                                                     
+  static SaErrorT NewSimulatorGetFumiTargetComponent(void                  *hnd, 
+                                                     SaHpiResourceIdT        id, 
+@@ -2511,7 +2511,7 @@ static SaErrorT NewSimulatorGetFumiTarge
+ static SaErrorT NewSimulatorGetFumiLogicalTarget(void *, 
+                                                   SaHpiResourceIdT, 
+                                                   SaHpiFumiNumT, 
+-                                                  SaHpiFumiLogicalBankInfoT *) __attribute__((used));
++                                                  SaHpiFumiLogicalBankInfoT *) __asm__("NewSimulatorGetFumiLogicalTarget") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiLogicalTarget(void            *hnd, 
+                                                   SaHpiResourceIdT id,
+@@ -2547,7 +2547,7 @@ static SaErrorT NewSimulatorGetFumiLogic
+                       SaHpiFumiNumT, 
+                       SaHpiEntryIdT, 
+                       SaHpiEntryIdT *, 
+-                      SaHpiFumiLogicalComponentInfoT *) __attribute__((used));
++                      SaHpiFumiLogicalComponentInfoT *) __asm__("NewSimulatorGetFumiLogicalTargetComponent") __attribute__((used));
+                                                            
+ static SaErrorT NewSimulatorGetFumiLogicalTargetComponent(void         *hnd, 
+                                                          SaHpiResourceIdT id, 
+@@ -2579,7 +2579,7 @@ static SaErrorT NewSimulatorGetFumiLogic
+  **/                  
+ static SaErrorT NewSimulatorStartFumiBackup(void *, 
+                                              SaHpiResourceIdT, 
+-                                             SaHpiFumiNumT) __attribute__((used));
++                                             SaHpiFumiNumT) __asm__("NewSimulatorStartFumiBackup") __attribute__((used));
+                                              
+ static SaErrorT NewSimulatorStartFumiBackup(void            *hnd, 
+                                              SaHpiResourceIdT id, 
+@@ -2612,7 +2612,7 @@ static SaErrorT NewSimulatorSetFumiBankO
+                                               SaHpiResourceIdT, 
+                                               SaHpiFumiNumT, 
+                                               SaHpiBankNumT, 
+-                                              SaHpiUint32T) __attribute__((used));
++                                              SaHpiUint32T) __asm__("NewSimulatorSetFumiBankOrder") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetFumiBankOrder(void            *hnd, 
+                                               SaHpiResourceIdT id, 
+@@ -2647,7 +2647,7 @@ static SaErrorT NewSimulatorStartFumiBan
+                                                SaHpiResourceIdT, 
+                                                SaHpiFumiNumT, 
+                                                SaHpiBankNumT, 
+-                                               SaHpiBankNumT) __attribute__((used));
++                                               SaHpiBankNumT) __asm__("NewSimulatorStartFumiBankCopy") __attribute__((used));
+                                                
+ static SaErrorT NewSimulatorStartFumiBankCopy(void             *hnd, 
+                                                SaHpiResourceIdT  id, 
+@@ -2680,7 +2680,7 @@ static SaErrorT NewSimulatorStartFumiBan
+ static SaErrorT NewSimulatorStartFumiInstall(void *, 
+                                               SaHpiResourceIdT, 
+                                               SaHpiFumiNumT, 
+-                                              SaHpiBankNumT) __attribute__((used));
++                                              SaHpiBankNumT) __asm__("NewSimulatorStartFumiInstall") __attribute__((used));
+                                               
+ static SaErrorT NewSimulatorStartFumiInstall(void             *hnd, 
+                                               SaHpiResourceIdT  id, 
+@@ -2714,7 +2714,7 @@ static SaErrorT NewSimulatorGetFumiStatu
+                                            SaHpiResourceIdT, 
+                                            SaHpiFumiNumT, 
+                                            SaHpiBankNumT, 
+-                                           SaHpiFumiUpgradeStatusT *) __attribute__((used));
++                                           SaHpiFumiUpgradeStatusT *) __asm__("NewSimulatorGetFumiStatus") __attribute__((used));
+                                            
+ static SaErrorT NewSimulatorGetFumiStatus(void                   *hnd, 
+                                            SaHpiResourceIdT        id, 
+@@ -2747,7 +2747,7 @@ static SaErrorT NewSimulatorGetFumiStatu
+ static SaErrorT NewSimulatorStartFumiVerification(void *, 
+                                                    SaHpiResourceIdT, 
+                                                    SaHpiFumiNumT, 
+-                                                   SaHpiBankNumT) __attribute__((used));
++                                                   SaHpiBankNumT) __asm__("NewSimulatorStartFumiVerification") __attribute__((used));
+                                                    
+ static SaErrorT NewSimulatorStartFumiVerification(void            *hnd, 
+                                                    SaHpiResourceIdT id, 
+@@ -2776,7 +2776,7 @@ static SaErrorT NewSimulatorStartFumiVer
+  **/                             
+ static SaErrorT NewSimulatorStartFumiVerificationMain(void *, 
+                                                        SaHpiResourceIdT, 
+-                                                       SaHpiFumiNumT) __attribute__((used));
++                                                       SaHpiFumiNumT) __asm__("NewSimulatorStartFumiVerificationMain") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorStartFumiVerificationMain(void            *hnd, 
+                                                        SaHpiResourceIdT id, 
+@@ -2807,7 +2807,7 @@ static SaErrorT NewSimulatorStartFumiVer
+ static SaErrorT NewSimulatorCancelFumiUpgrade(void *, 
+                                                SaHpiResourceIdT, 
+                                                SaHpiFumiNumT, 
+-                                               SaHpiBankNumT) __attribute__((used));
++                                               SaHpiBankNumT) __asm__("NewSimulatorCancelFumiUpgrade") __attribute__((used));
+                                                
+ static SaErrorT NewSimulatorCancelFumiUpgrade(void            *hnd, 
+                                                SaHpiResourceIdT id, 
+@@ -2838,7 +2838,7 @@ static SaErrorT NewSimulatorCancelFumiUp
+ static SaErrorT NewSimulatorGetFumiRollback(void *, 
+                                              SaHpiResourceIdT, 
+                                              SaHpiFumiNumT, 
+-                                             SaHpiBoolT *) __attribute__((used));
++                                             SaHpiBoolT *) __asm__("NewSimulatorGetFumiRollback") __attribute__((used));
+                                              
+ static SaErrorT NewSimulatorGetFumiRollback(void            *hnd, 
+                                              SaHpiResourceIdT id, 
+@@ -2870,7 +2870,7 @@ static SaErrorT NewSimulatorGetFumiRollb
+ static SaErrorT NewSimulatorSetFumiRollback(void *, 
+                                              SaHpiResourceIdT, 
+                                              SaHpiFumiNumT, 
+-                                             SaHpiBoolT) __attribute__((used));
++                                             SaHpiBoolT) __asm__("NewSimulatorSetFumiRollback") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetFumiRollback(void            *hnd, 
+                                              SaHpiResourceIdT id, 
+@@ -2900,7 +2900,7 @@ static SaErrorT NewSimulatorSetFumiRollb
+  **/                          
+ static SaErrorT NewSimulatorStartFumiRollback(void *, 
+                                                SaHpiResourceIdT, 
+-                                               SaHpiFumiNumT) __attribute__((used));
++                                               SaHpiFumiNumT) __asm__("NewSimulatorStartFumiRollback") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorStartFumiRollback(void            *hnd, 
+                                              SaHpiResourceIdT id, 
+@@ -2929,7 +2929,7 @@ static SaErrorT NewSimulatorStartFumiRol
+  **/                         
+ static SaErrorT NewSimulatorActivateFumi(void *, 
+                                           SaHpiResourceIdT, 
+-                                          SaHpiFumiNumT) __attribute__((used));
++                                          SaHpiFumiNumT) __asm__("NewSimulatorActivateFumi") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorActivateFumi(void            *hnd, 
+                                           SaHpiResourceIdT id, 
+@@ -2960,7 +2960,7 @@ static SaErrorT NewSimulatorActivateFumi
+ static SaErrorT NewSimulatorStartFumiActivation(void *, 
+                                                  SaHpiResourceIdT, 
+                                                  SaHpiFumiNumT, 
+-                                                 SaHpiBoolT) __attribute__((used));
++                                                 SaHpiBoolT) __asm__("NewSimulatorStartFumiActivation") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorStartFumiActivation(void            *hnd, 
+                                                  SaHpiResourceIdT id, 
+@@ -2992,7 +2992,7 @@ static SaErrorT NewSimulatorStartFumiAct
+ static SaErrorT NewSimulatorCleanupFumi(void *, 
+                                          SaHpiResourceIdT, 
+                                          SaHpiFumiNumT, 
+-                                         SaHpiBankNumT) __attribute__((used));
++                                         SaHpiBankNumT) __asm__("NewSimulatorCleanupFumi") __attribute__((used));
+                                          
+ static SaErrorT NewSimulatorCleanupFumi(void            *hnd, 
+                                          SaHpiResourceIdT id, 
+@@ -3023,7 +3023,7 @@ static SaErrorT NewSimulatorCleanupFumi(
+ static SaErrorT NewSimulatorGetDimiInfo( void *, 
+                                           SaHpiResourceIdT, 
+                                           SaHpiDimiNumT, 
+-                                          SaHpiDimiInfoT *)  __attribute__((used));
++                                          SaHpiDimiInfoT *)  __asm__("NewSimulatorGetDimiInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetDimiInfo( void            *hnd, 
+                                           SaHpiResourceIdT id, 
+@@ -3057,7 +3057,7 @@ static SaErrorT NewSimulatorGetDimiTestI
+                                       SaHpiResourceIdT, 
+                                       SaHpiDimiNumT,
+                                       SaHpiDimiTestNumT, 
+-                                      SaHpiDimiTestT *)  __attribute__((used));
++                                      SaHpiDimiTestT *)  __asm__("NewSimulatorGetDimiTestInfo") __attribute__((used));
+                                       
+ static SaErrorT NewSimulatorGetDimiTestInfo( void     *hnd, 
+                                       SaHpiResourceIdT  id, 
+@@ -3092,7 +3092,7 @@ static SaErrorT NewSimulatorGetDimiTestR
+                                      SaHpiResourceIdT, 
+                                      SaHpiDimiNumT,
+                                      SaHpiDimiTestNumT, 
+-                                     SaHpiDimiReadyT *)  __attribute__((used));
++                                     SaHpiDimiReadyT *)  __asm__("NewSimulatorGetDimiTestReadiness") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetDimiTestReadiness( void *hnd, 
+                                      SaHpiResourceIdT    id, 
+@@ -3129,7 +3129,7 @@ static SaErrorT NewSimulatorStartDimiTes
+                         SaHpiDimiNumT, 
+                         SaHpiDimiTestNumT,
+                         SaHpiUint8T, 
+-                        SaHpiDimiTestVariableParamsT *)  __attribute__((used));
++                        SaHpiDimiTestVariableParamsT *)  __asm__("NewSimulatorStartDimiTest") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorStartDimiTest( void    *hnd, 
+                         SaHpiResourceIdT             id, 
+@@ -3163,7 +3163,7 @@ static SaErrorT NewSimulatorStartDimiTes
+ static SaErrorT NewSimulatorCancelDimiTest( void *, 
+                                       SaHpiResourceIdT, 
+                                       SaHpiDimiNumT, 
+-                                      SaHpiDimiTestNumT) __attribute__((used));
++                                      SaHpiDimiTestNumT) __asm__("NewSimulatorCancelDimiTest") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorCancelDimiTest( void      *hnd, 
+                                       SaHpiResourceIdT  id, 
+@@ -3199,7 +3199,7 @@ static SaErrorT NewSimulatorGetDimiTestS
+                               SaHpiDimiNumT, 
+                               SaHpiDimiTestNumT, 
+                               SaHpiDimiTestPercentCompletedT *,
+-                              SaHpiDimiTestRunStatusT *) __attribute__((used));
++                              SaHpiDimiTestRunStatusT *) __asm__("NewSimulatorGetDimiTestStatus") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetDimiTestStatus( void        *hnd, 
+                               SaHpiResourceIdT               id, 
+@@ -3234,7 +3234,7 @@ static SaErrorT NewSimulatorGetDimiTestR
+                                 SaHpiResourceIdT, 
+                                 SaHpiDimiNumT, 
+                                 SaHpiDimiTestNumT, 
+-                                SaHpiDimiTestResultsT *) __attribute__((used));
++                                SaHpiDimiTestResultsT *) __asm__("NewSimulatorGetDimiTestResults") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetDimiTestResults( void *hnd, 
+                                 SaHpiResourceIdT       id, 
+@@ -3263,7 +3263,7 @@ static SaErrorT NewSimulatorGetDimiTestR
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetAutoInsertTimeout( void *, 
+-                                         SaHpiTimeoutT ) __attribute__((used));
++                                         SaHpiTimeoutT ) __asm__("NewSimulatorSetAutoInsertTimeout") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetAutoInsertTimeout( void *hnd, SaHpiTimeoutT  timeout) {
+    NewSimulator *newsim = VerifyNewSimulator( hnd );
+@@ -3289,7 +3289,7 @@ static SaErrorT NewSimulatorSetAutoInser
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetAutoExtractTimeout( void *, SaHpiResourceIdT,
+-                                                    SaHpiTimeoutT * ) __attribute__((used));
++                                                    SaHpiTimeoutT * ) __asm__("NewSimulatorGetAutoExtractTimeout") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id,
+                                                     SaHpiTimeoutT *timeout ) {
+@@ -3319,7 +3319,7 @@ static SaErrorT NewSimulatorGetAutoExtra
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetAutoExtractTimeout( void *, SaHpiResourceIdT,
+-                                                    SaHpiTimeoutT ) __attribute__((used));
++                                                    SaHpiTimeoutT ) __asm__("NewSimulatorSetAutoExtractTimeout") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id,
+                                                     SaHpiTimeoutT timeout ) {
+@@ -3350,7 +3350,7 @@ static SaErrorT NewSimulatorSetAutoExtra
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetPowerState( void *, SaHpiResourceIdT,
+-                                            SaHpiPowerStateT * ) __attribute__((used));
++                                            SaHpiPowerStateT * ) __asm__("NewSimulatorGetPowerState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetPowerState( void *hnd, SaHpiResourceIdT id,
+                                             SaHpiPowerStateT *state ) {
+@@ -3382,7 +3382,7 @@ static SaErrorT NewSimulatorGetPowerStat
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetPowerState( void *, SaHpiResourceIdT,
+-                                            SaHpiPowerStateT ) __attribute__((used));
++                                            SaHpiPowerStateT ) __asm__("NewSimulatorSetPowerState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetPowerState( void *hnd, SaHpiResourceIdT id,
+                                             SaHpiPowerStateT state ) {
+@@ -3414,7 +3414,7 @@ static SaErrorT NewSimulatorSetPowerStat
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetIndicatorState( void *, SaHpiResourceIdT,
+-                                                SaHpiHsIndicatorStateT * ) __attribute__((used));
++                                                SaHpiHsIndicatorStateT * ) __asm__("NewSimulatorGetIndicatorState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetIndicatorState( void *hnd, SaHpiResourceIdT id,
+                                                 SaHpiHsIndicatorStateT *state ) {
+@@ -3446,7 +3446,7 @@ static SaErrorT NewSimulatorGetIndicator
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetIndicatorState( void *, SaHpiResourceIdT,
+-                                                SaHpiHsIndicatorStateT ) __attribute__((used));
++                                                SaHpiHsIndicatorStateT ) __asm__("NewSimulatorSetIndicatorState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetIndicatorState( void *hnd, SaHpiResourceIdT id,
+                                                 SaHpiHsIndicatorStateT state ) {
+@@ -3479,7 +3479,7 @@ static SaErrorT NewSimulatorSetIndicator
+  **/
+ static SaErrorT NewSimulatorControlParm( void *,
+                                           SaHpiResourceIdT,
+-                                          SaHpiParmActionT ) __attribute__((used));
++                                          SaHpiParmActionT ) __asm__("NewSimulatorControlParm") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorControlParm( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -3512,7 +3512,7 @@ static SaErrorT NewSimulatorControlParm(
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetResetState( void *, SaHpiResourceIdT,
+-                                            SaHpiResetActionT * ) __attribute__((used));
++                                            SaHpiResetActionT * ) __asm__("NewSimulatorGetResetState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetResetState( void *hnd, SaHpiResourceIdT id,
+                                             SaHpiResetActionT *act ) {
+@@ -3545,7 +3545,7 @@ static SaErrorT NewSimulatorGetResetStat
+  **/
+ static SaErrorT NewSimulatorSetResetState( void *,
+                                             SaHpiResourceIdT,
+-                                            SaHpiResetActionT ) __attribute__((used));
++                                            SaHpiResetActionT ) __asm__("NewSimulatorSetResetState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetResetState( void *hnd,
+                                             SaHpiResourceIdT id,
+Index: openhpi-3.6.1/plugins/dynamic_simulator/new_sim_file.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/dynamic_simulator/new_sim_file.cpp
++++ openhpi-3.6.1/plugins/dynamic_simulator/new_sim_file.cpp
+@@ -44,9 +44,9 @@
+ ///< Global skip characters for oh_scanner_config
+ static gchar skip_characters[] = " \t\n";  
+ ///< Global identifier_first for oh_scanner_config
+-static gchar identifier_first[] = G_CSET_a_2_z"_/."G_CSET_A_2_Z; 
++static gchar identifier_first[] = G_CSET_a_2_z "_/." G_CSET_A_2_Z;
+ ///< Global identifier_nth for oh_scanner_config
+-static gchar identifier_nth[] = G_CSET_a_2_z"_-0123456789/."G_CSET_A_2_Z;
++static gchar identifier_nth[] = G_CSET_a_2_z "_-0123456789/." G_CSET_A_2_Z;
+ ///< Global comment signs for oh_scanner_config
+ static gchar comment_single[] = "#\n";
+ 
+Index: openhpi-3.6.1/plugins/ipmidirect/ipmi.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/ipmidirect/ipmi.cpp
++++ openhpi-3.6.1/plugins/ipmidirect/ipmi.cpp
+@@ -279,7 +279,7 @@ extern "C" {
+ // ABI Interface functions
+ 
+ static void *
+-IpmiOpen( GHashTable *, unsigned int, oh_evt_queue * ) __attribute__((used));
++IpmiOpen( GHashTable *, unsigned int, oh_evt_queue * )  __asm__("IpmiOpen") __attribute__((used));
+ 
+ static void *
+ IpmiOpen( GHashTable *handler_config, unsigned int hid, oh_evt_queue *eventq )
+@@ -388,7 +388,7 @@ IpmiOpen( GHashTable *handler_config, un
+ 
+ 
+ static void
+-IpmiClose( void * ) __attribute__((used));
++IpmiClose( void * ) __asm__("IpmiClose") __attribute__((used));
+ 
+ static void
+ IpmiClose( void *hnd )
+@@ -436,7 +436,7 @@ IpmiClose( void *hnd )
+ 
+ 
+ static SaErrorT
+-IpmiGetEvent( void * ) __attribute__((used));
++IpmiGetEvent( void * ) __asm__("IpmiGetEvent") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetEvent( void *hnd )
+@@ -458,7 +458,7 @@ IpmiGetEvent( void *hnd )
+ 
+ 
+ static SaErrorT
+-IpmiDiscoverResources( void * ) __attribute__((used));
++IpmiDiscoverResources( void * ) __asm__("IpmiDiscoverResources") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiDiscoverResources( void *hnd )
+@@ -479,7 +479,7 @@ IpmiDiscoverResources( void *hnd )
+ 
+ 
+ static SaErrorT
+-IpmiSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __attribute__((used));
++IpmiSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __asm__("IpmiSetResourceTag") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetResourceTag( void *hnd, SaHpiResourceIdT id, SaHpiTextBufferT *tag )
+@@ -499,7 +499,7 @@ IpmiSetResourceTag( void *hnd, SaHpiReso
+ 
+ 
+ static SaErrorT
+-IpmiSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __attribute__((used));
++IpmiSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __asm__("IpmiSetResourceSeverity") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetResourceSeverity( void *hnd, SaHpiResourceIdT id, SaHpiSeverityT sev )
+@@ -523,7 +523,7 @@ IpmiGetSensorReading( void *,
+                    SaHpiResourceIdT id,
+                    SaHpiSensorNumT num,
+                    SaHpiSensorReadingT *data,
+-                   SaHpiEventStateT *state ) __attribute__((used));
++                   SaHpiEventStateT *state ) __asm__("IpmiGetSensorReading") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorReading( void *hnd,
+@@ -550,7 +550,7 @@ static SaErrorT
+ IpmiGetSensorThresholds( void *hnd,
+                          SaHpiResourceIdT,
+                          SaHpiSensorNumT,
+-                         SaHpiSensorThresholdsT * ) __attribute__((used));
++                         SaHpiSensorThresholdsT * ) __asm__("IpmiGetSensorThresholds") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorThresholds( void                   *hnd,
+@@ -581,7 +581,7 @@ static SaErrorT
+ IpmiSetSensorThresholds( void *,
+                          SaHpiResourceIdT,
+                          SaHpiSensorNumT,
+-                         const SaHpiSensorThresholdsT * ) __attribute__((used));
++                         const SaHpiSensorThresholdsT * ) __asm__("IpmiSetSensorThresholds") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSensorThresholds( void *hnd,
+@@ -612,7 +612,7 @@ static SaErrorT
+ IpmiGetSensorEnable( void *,
+                      SaHpiResourceIdT,
+                      SaHpiSensorNumT,
+-                     SaHpiBoolT * ) __attribute__((used));
++                     SaHpiBoolT * ) __asm__("IpmiGetSensorEnable") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorEnable( void *hnd,
+@@ -638,7 +638,7 @@ static SaErrorT
+ IpmiSetSensorEnable( void *,
+                      SaHpiResourceIdT,
+                      SaHpiSensorNumT,
+-                     SaHpiBoolT ) __attribute__((used));
++                     SaHpiBoolT ) __asm__("IpmiSetSensorEnable") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSensorEnable( void *hnd,
+@@ -664,7 +664,7 @@ static SaErrorT
+ IpmiGetSensorEventEnables( void *,
+                            SaHpiResourceIdT,
+                            SaHpiSensorNumT,
+-                           SaHpiBoolT * ) __attribute__((used));
++                           SaHpiBoolT * ) __asm__("IpmiGetSensorEventEnables") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorEventEnables( void *hnd,
+@@ -690,7 +690,7 @@ static SaErrorT
+ IpmiSetSensorEventEnables( void *,
+                            SaHpiResourceIdT,
+                            SaHpiSensorNumT,
+-                           SaHpiBoolT ) __attribute__((used));
++                           SaHpiBoolT ) __asm__("IpmiSetSensorEventEnables") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSensorEventEnables( void *hnd,
+@@ -717,7 +717,7 @@ IpmiGetSensorEventMasks( void *,
+                            SaHpiResourceIdT,
+                            SaHpiSensorNumT,
+                            SaHpiEventStateT *,
+-                           SaHpiEventStateT * ) __attribute__((used));
++                           SaHpiEventStateT * ) __asm__("IpmiGetSensorEventMasks") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorEventMasks( void *hnd,
+@@ -747,7 +747,7 @@ IpmiSetSensorEventMasks( void *,
+                            SaHpiSensorNumT,
+                            SaHpiSensorEventMaskActionT,
+                            SaHpiEventStateT,
+-                           SaHpiEventStateT ) __attribute__((used));
++                           SaHpiEventStateT ) __asm__("IpmiSetSensorEventMasks") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSensorEventMasks( void *hnd,
+@@ -776,7 +776,7 @@ static SaErrorT
+ IpmiGetControlState( void *, SaHpiResourceIdT,
+                      SaHpiCtrlNumT,
+                      SaHpiCtrlModeT *,
+-                     SaHpiCtrlStateT * ) __attribute__((used));
++                     SaHpiCtrlStateT * ) __asm__("IpmiGetControlState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetControlState( void *hnd, SaHpiResourceIdT id,
+@@ -802,7 +802,7 @@ static SaErrorT
+ IpmiSetControlState( void *, SaHpiResourceIdT,
+                      SaHpiCtrlNumT,
+                      SaHpiCtrlModeT,
+-                     SaHpiCtrlStateT * ) __attribute__((used));
++                     SaHpiCtrlStateT * ) __asm__("IpmiSetControlState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetControlState( void *hnd, SaHpiResourceIdT id,
+@@ -828,7 +828,7 @@ static SaErrorT
+ IpmiGetIdrInfo( void *,
+                 SaHpiResourceIdT,
+                 SaHpiIdrIdT,
+-                SaHpiIdrInfoT * ) __attribute__((used));
++                SaHpiIdrInfoT * ) __asm__("IpmiGetIdrInfo") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetIdrInfo( void *hnd,
+@@ -857,7 +857,7 @@ IpmiGetIdrAreaHeader( void *,
+                       SaHpiIdrAreaTypeT,
+                                   SaHpiEntryIdT,
+                       SaHpiEntryIdT *,
+-                      SaHpiIdrAreaHeaderT * ) __attribute__((used));
++                      SaHpiIdrAreaHeaderT * ) __asm__("IpmiGetIdrAreaHeader") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetIdrAreaHeader( void *hnd,
+@@ -887,7 +887,7 @@ IpmiAddIdrArea( void *,
+                 SaHpiResourceIdT,
+                 SaHpiIdrIdT,
+                 SaHpiIdrAreaTypeT,
+-                            SaHpiEntryIdT * ) __attribute__((used));
++                            SaHpiEntryIdT * ) __asm__("IpmiAddIdrArea") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiAddIdrArea( void *hnd,
+@@ -914,7 +914,7 @@ static SaErrorT
+ IpmiDelIdrArea( void *,
+                 SaHpiResourceIdT,
+                 SaHpiIdrIdT,
+-                            SaHpiEntryIdT ) __attribute__((used));
++                            SaHpiEntryIdT ) __asm__("IpmiDelIdrArea") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiDelIdrArea( void *hnd,
+@@ -944,7 +944,7 @@ IpmiGetIdrField( void *,
+                  SaHpiIdrFieldTypeT,
+                  SaHpiEntryIdT,
+                              SaHpiEntryIdT *,
+-                 SaHpiIdrFieldT * ) __attribute__((used));
++                 SaHpiIdrFieldT * ) __asm__("IpmiGetIdrField") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetIdrField( void *hnd,
+@@ -974,7 +974,7 @@ static SaErrorT
+ IpmiAddIdrField( void *,
+                  SaHpiResourceIdT,
+                  SaHpiIdrIdT,
+-                 SaHpiIdrFieldT * ) __attribute__((used));
++                 SaHpiIdrFieldT * ) __asm__("IpmiAddIdrField") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiAddIdrField( void *hnd,
+@@ -1000,7 +1000,7 @@ static SaErrorT
+ IpmiSetIdrField( void *,
+                  SaHpiResourceIdT,
+                  SaHpiIdrIdT,
+-                 SaHpiIdrFieldT * ) __attribute__((used));
++                 SaHpiIdrFieldT * ) __asm__("IpmiSetIdrField") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetIdrField( void *hnd,
+@@ -1027,7 +1027,7 @@ IpmiDelIdrField( void *,
+                  SaHpiResourceIdT,
+                  SaHpiIdrIdT,
+                  SaHpiEntryIdT,
+-                 SaHpiEntryIdT ) __attribute__((used));
++                 SaHpiEntryIdT ) __asm__("IpmiDelIdrField") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiDelIdrField( void *hnd,
+@@ -1053,7 +1053,7 @@ IpmiDelIdrField( void *hnd,
+ static SaErrorT
+ IpmiGetSelInfo( void *,
+                 SaHpiResourceIdT,
+-                SaHpiEventLogInfoT * ) __attribute__((used));
++                SaHpiEventLogInfoT * ) __asm__("IpmiGetSelInfo") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSelInfo( void *hnd,
+@@ -1075,7 +1075,7 @@ IpmiGetSelInfo( void *hnd,
+ 
+ 
+ static SaErrorT
+-IpmiSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __attribute__((used));
++IpmiSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __asm__("IpmiSetSelTime") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSelTime( void *hnd, SaHpiResourceIdT id, SaHpiTimeT t )
+@@ -1096,7 +1096,7 @@ IpmiSetSelTime( void *hnd, SaHpiResource
+ 
+ static SaErrorT
+ IpmiAddSelEntry( void *, SaHpiResourceIdT,
+-                 const SaHpiEventT * ) __attribute__((used));
++                 const SaHpiEventT * ) __asm__("IpmiAddSelEntry") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiAddSelEntry( void *hnd, SaHpiResourceIdT id,
+@@ -1118,7 +1118,7 @@ IpmiAddSelEntry( void *hnd, SaHpiResourc
+ #ifdef NOTUSED
+ static SaErrorT
+ IpmiDelSelEntry( void *, SaHpiResourceIdT,
+-                 SaHpiEventLogEntryIdT ) __attribute__((used));
++                 SaHpiEventLogEntryIdT ) __asm__("IpmiDelSelEntry") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiDelSelEntry( void *hnd, SaHpiResourceIdT id,
+@@ -1145,7 +1145,7 @@ IpmiGetSelEntry( void *hnd, SaHpiResourc
+                  SaHpiEventLogEntryIdT *, SaHpiEventLogEntryIdT *,
+                  SaHpiEventLogEntryT *,
+                  SaHpiRdrT *,
+-                 SaHpiRptEntryT * ) __attribute__((used));
++                 SaHpiRptEntryT * ) __asm__("IpmiGetSelEntry") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSelEntry( void *hnd, SaHpiResourceIdT id,
+@@ -1170,7 +1170,7 @@ IpmiGetSelEntry( void *hnd, SaHpiResourc
+ 
+ 
+ static SaErrorT
+-IpmiClearSel( void *, SaHpiResourceIdT ) __attribute__((used));
++IpmiClearSel( void *, SaHpiResourceIdT ) __asm__("IpmiClearSel") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiClearSel( void *hnd, SaHpiResourceIdT id )
+@@ -1190,7 +1190,7 @@ IpmiClearSel( void *hnd, SaHpiResourceId
+ 
+ static SaErrorT
+ IpmiHotswapPolicyCancel( void *, SaHpiResourceIdT,
+-                         SaHpiTimeoutT ) __attribute__((used));
++                         SaHpiTimeoutT ) __asm__("IpmiHotswapPolicyCancel") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiHotswapPolicyCancel( void *hnd, SaHpiResourceIdT id,
+@@ -1210,7 +1210,7 @@ IpmiHotswapPolicyCancel( void *hnd, SaHp
+ }
+ 
+ static SaErrorT
+-IpmiSetAutoInsertTimeout( void *, SaHpiTimeoutT ) __attribute__((used));
++IpmiSetAutoInsertTimeout( void *, SaHpiTimeoutT ) __asm__("IpmiSetAutoInsertTimeout") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetAutoInsertTimeout( void *hnd, SaHpiTimeoutT  timeout)
+@@ -1229,7 +1229,7 @@ IpmiSetAutoInsertTimeout( void *hnd, SaH
+ 
+ static SaErrorT
+ IpmiGetAutoExtractTimeout( void *, SaHpiResourceIdT,
+-                           SaHpiTimeoutT * ) __attribute__((used));
++                           SaHpiTimeoutT * ) __asm__("IpmiGetAutoExtractTimeout") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id,
+@@ -1250,7 +1250,7 @@ IpmiGetAutoExtractTimeout( void *hnd, Sa
+ 
+ static SaErrorT
+ IpmiSetAutoExtractTimeout( void *, SaHpiResourceIdT,
+-                           SaHpiTimeoutT ) __attribute__((used));
++                           SaHpiTimeoutT ) __asm__("IpmiSetAutoExtractTimeout") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id,
+@@ -1271,7 +1271,7 @@ IpmiSetAutoExtractTimeout( void *hnd, Sa
+ 
+ static SaErrorT
+ IpmiGetHotswapState( void *, SaHpiResourceIdT ,
+-                     SaHpiHsStateT * ) __attribute__((used));
++                     SaHpiHsStateT * ) __asm__("IpmiGetHotswapState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetHotswapState( void *hnd, SaHpiResourceIdT id,
+@@ -1293,7 +1293,7 @@ IpmiGetHotswapState( void *hnd, SaHpiRes
+ 
+ static SaErrorT
+ IpmiSetHotswapState( void *, SaHpiResourceIdT,
+-                     SaHpiHsStateT ) __attribute__((used));
++                     SaHpiHsStateT ) __asm__("IpmiSetHotswapState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetHotswapState( void *hnd, SaHpiResourceIdT id,
+@@ -1315,7 +1315,7 @@ IpmiSetHotswapState( void *hnd, SaHpiRes
+ 
+ static SaErrorT
+ IpmiRequestHotswapAction( void *, SaHpiResourceIdT,
+-                          SaHpiHsActionT ) __attribute__((used));
++                          SaHpiHsActionT ) __asm__("IpmiRequestHotswapAction") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiRequestHotswapAction( void *hnd, SaHpiResourceIdT id,
+@@ -1337,7 +1337,7 @@ IpmiRequestHotswapAction( void *hnd, SaH
+ 
+ static SaErrorT
+ IpmiGetPowerState( void *, SaHpiResourceIdT,
+-                   SaHpiPowerStateT * ) __attribute__((used));
++                   SaHpiPowerStateT * ) __asm__("IpmiGetPowerState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetPowerState( void *hnd, SaHpiResourceIdT id,
+@@ -1359,7 +1359,7 @@ IpmiGetPowerState( void *hnd, SaHpiResou
+ 
+ static SaErrorT
+ IpmiSetPowerState( void *, SaHpiResourceIdT,
+-                   SaHpiPowerStateT ) __attribute__((used));
++                   SaHpiPowerStateT ) __asm__("IpmiSetPowerState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetPowerState( void *hnd, SaHpiResourceIdT id,
+@@ -1381,7 +1381,7 @@ IpmiSetPowerState( void *hnd, SaHpiResou
+ 
+ static SaErrorT
+ IpmiGetIndicatorState( void *, SaHpiResourceIdT,
+-                       SaHpiHsIndicatorStateT * ) __attribute__((used));
++                       SaHpiHsIndicatorStateT * ) __asm__("IpmiGetIndicatorState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetIndicatorState( void *hnd, SaHpiResourceIdT id,
+@@ -1403,7 +1403,7 @@ IpmiGetIndicatorState( void *hnd, SaHpiR
+ 
+ static SaErrorT
+ IpmiSetIndicatorState( void *, SaHpiResourceIdT,
+-                       SaHpiHsIndicatorStateT ) __attribute__((used));
++                       SaHpiHsIndicatorStateT ) __asm__("IpmiSetIndicatorState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetIndicatorState( void *hnd, SaHpiResourceIdT id,
+@@ -1426,7 +1426,7 @@ IpmiSetIndicatorState( void *hnd, SaHpiR
+ static SaErrorT
+ IpmiControlParm( void *,
+                  SaHpiResourceIdT,
+-                 SaHpiParmActionT ) __attribute__((used));
++                 SaHpiParmActionT ) __asm__("IpmiControlParm") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiControlParm( void *hnd,
+@@ -1449,7 +1449,7 @@ IpmiControlParm( void *hnd,
+ 
+ static SaErrorT
+ IpmiGetResetState( void *, SaHpiResourceIdT,
+-                   SaHpiResetActionT * ) __attribute__((used));
++                   SaHpiResetActionT * ) __asm__("IpmiGetResetState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetResetState( void *hnd, SaHpiResourceIdT id,
+@@ -1472,7 +1472,7 @@ IpmiGetResetState( void *hnd, SaHpiResou
+ static SaErrorT
+ IpmiSetResetState( void *,
+                    SaHpiResourceIdT,
+-                   SaHpiResetActionT ) __attribute__((used));
++                   SaHpiResetActionT ) __asm__("IpmiSetResetState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetResetState( void *hnd,
+@@ -1496,7 +1496,7 @@ static SaErrorT
+ IpmiGetWatchdogInfo(void *,
+                     SaHpiResourceIdT,
+                     SaHpiWatchdogNumT,
+-                    SaHpiWatchdogT *) __attribute__((used));
++                    SaHpiWatchdogT *) __asm__("IpmiGetWatchdogInfo") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetWatchdogInfo(void *hnd,
+@@ -1517,7 +1517,7 @@ static SaErrorT
+ IpmiSetWatchdogInfo(void *,
+                     SaHpiResourceIdT,
+                     SaHpiWatchdogNumT,
+-                    SaHpiWatchdogT *) __attribute__((used));
++                    SaHpiWatchdogT *) __asm__("IpmiSetWatchdogInfo") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetWatchdogInfo(void *hnd,
+@@ -1537,7 +1537,7 @@ IpmiSetWatchdogInfo(void *hnd,
+ static SaErrorT
+ IpmiResetWatchdog(void *,
+                   SaHpiResourceIdT,
+-                  SaHpiWatchdogNumT) __attribute__((used));
++                  SaHpiWatchdogNumT) __asm__("IpmiResetWatchdog") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiResetWatchdog(void *hnd,
+Index: openhpi-3.6.1/plugins/ipmidirect/ipmi_auth.h
+===================================================================
+--- openhpi-3.6.1.orig/plugins/ipmidirect/ipmi_auth.h
++++ openhpi-3.6.1/plugins/ipmidirect/ipmi_auth.h
+@@ -32,7 +32,7 @@ class cIpmiAuthSg
+ {
+ public:
+   void *data; /* NULL to terminate. */
+-  int   len;
++  unsigned int   len;
+ };
+ 
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch
new file mode 100644
index 0000000..4c54570
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch
@@ -0,0 +1,20 @@
+Fix
+
+sensor_factors_000.cpp:66:5: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing]
+((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/ipmidirect/t/sensor_factors_000.cpp
++++ openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
+@@ -63,7 +63,7 @@ static cIpmiSdr sdr =
+     dB & 0xff,
+     ((dB >> 2) & 0xc0) | (dAccuracy & 0x3f),
+     ((dAccuracy >> 2) & 0xf0) | ((dAccuracyExp << 2) & 0x0c),
+-    ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),
++    (unsigned char)(((dRExp << 4) & 0xf0) | (dBExp & 0x0f )),
+     0,
+     0,
+   }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
index b9b0437..ecf71d7 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
@@ -20,9 +20,12 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4"
 
-DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs"
+DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs autoconf-archive-native"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
+           file://openhpi.init \
+           file://openhpid.service \
+           file://run-ptest \
            file://openhpi-netsnmp-cross-compile.patch \
            file://openhpi-sysfs-cross-compile.patch \
            file://openhpi-libxml2-cross-compile.patch \
@@ -35,11 +38,13 @@
            file://openhpi-invalide-session.patch \
            file://openhpi-use-serial-tests-config-needed-by-ptest.patch \
            file://openhpi-fix-alignment-issue.patch \
-           \
-           file://openhpi.init \
-           file://openhpid.service \
-           file://run-ptest \
-"
+           file://0001-Fix-build-failures-with-gcc7.patch \
+           file://c++11.patch \
+           file://clang-c++11.patch \
+           file://fix-narrowing-warning.patch \
+           file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \
+           file://0001-ipmidirect-Replace-__STRING.patch \
+           "
 
 SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23"
 SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc"
@@ -53,9 +58,10 @@
 INSANE_SKIP_${PN}-libs = "dev-so"
 RDEPENDS_${PN} += "${PN}-libs"
 
-PACKAGECONFIG ??= "libgcrypt"
+PACKAGECONFIG ??= "libgcrypt non32bit"
 PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils,"
 PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt,"
+PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,,"
 
 do_install_append () {
     install -m 0755 -d ${D}${sysconfdir}/${BPN}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Remove-unused-variables.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Remove-unused-variables.patch
deleted file mode 100644
index 1c88b81..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Remove-unused-variables.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From a441a75fbb8451268a8a57616c7158cddc1823aa Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 22 Apr 2017 12:40:19 -0700
-Subject: [PATCH] Remove unused variables
-
-Fixes build errors with gcc7 e.g.
-
-../opensaf-5.2.0/src/amf/amfd/imm.cc: In member function 'bool ImmObjCreate::immobj_update_required()':
-../opensaf-5.2.0/src/amf/amfd/imm.cc:2174:28: error: unused variable 'pos' [-Werror=unused-variable]
-     std::string::size_type pos;
-                            ^~~
-../opensaf-5.2.0/src/amf/amfd/imm.cc:2215:28: error: unused variable 'pos' [-Werror=unused-variable]
-     std::string::size_type pos;
-                            ^~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/amf/amfd/imm.cc | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/amf/amfd/imm.cc b/src/amf/amfd/imm.cc
-index 7932364..4f47b65 100644
---- a/src/amf/amfd/imm.cc
-+++ b/src/amf/amfd/imm.cc
-@@ -2171,7 +2171,6 @@ bool ImmObjCreate::immobj_update_required() {
-   if (class_type == AVSV_SA_AMF_SI_ASSIGNMENT) {
-     std::string su_name;
-     std::string sisu_name;
--    std::string::size_type pos;
-     while ((attribute = attrValues_[i++]) != nullptr) {
-       if (!strcmp(attribute->attrName, "safSISU")) {
-         sisu_name = Amf::to_string(
-@@ -2212,7 +2211,6 @@ bool ImmObjCreate::immobj_update_required() {
-   } else if (class_type == AVSV_SA_AMF_CSI_ASSIGNMENT) {
-     std::string comp_name;
-     std::string csicomp_name;
--    std::string::size_type pos;
-     AVD_CSI *csi = nullptr;
-     AVD_COMP *comp = nullptr;
-     AVD_COMP_CSI_REL *compcsi = nullptr;
--- 
-2.12.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch
new file mode 100644
index 0000000..76c47c6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch
@@ -0,0 +1,34 @@
+From 508ea7c0d67243feb1684eaa83569cb687561d64 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Sep 2017 10:09:03 -0700
+Subject: [PATCH] immpbe_dump.cc: Use sys/wait.h instead of wait.h
+
+Fixes
+redirecting incorrect #include <wait.h> to <sys/wait.h>
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/imm/common/immpbe_dump.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/imm/common/immpbe_dump.cc b/src/imm/common/immpbe_dump.cc
+index 100222f37..33e47ce3c 100644
+--- a/src/imm/common/immpbe_dump.cc
++++ b/src/imm/common/immpbe_dump.cc
+@@ -26,12 +26,12 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <time.h>
+-#include <wait.h>
+ #include <unistd.h>
+ #include <iostream>
+ #include <sstream>
+ #include <stdint.h>
+ #include <sys/stat.h>
++#include <sys/wait.h>
+ #include <libgen.h>
+ 
+ #include <saAis.h>
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch
new file mode 100644
index 0000000..4a2a825
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch
@@ -0,0 +1,122 @@
+From 6442b57a855e273aa5a3d93e8596783cea128073 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Sep 2017 09:39:40 -0700
+Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX
+
+Use _GNU_SOURCE instead of libc internal __USE_GNU
+Do not use the deprecated headers under include/sys
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/base/os_defs.h        | 5 +++--
+ src/mds/mds_dt_tcp.c      | 1 -
+ src/mds/mds_dt_tcp_disc.h | 2 +-
+ src/mds/mds_dt_tipc.c     | 1 -
+ src/mds/mds_dt_tipc.h     | 2 +-
+ src/mds/mds_dt_trans.c    | 1 -
+ src/ntf/ntfd/NtfLogger.cc | 2 +-
+ 7 files changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/src/base/os_defs.h b/src/base/os_defs.h
+index 50a9bf5fc..af6842863 100644
+--- a/src/base/os_defs.h
++++ b/src/base/os_defs.h
+@@ -47,17 +47,18 @@
+ #include <sys/stat.h>
+ #include <sys/msg.h> /* Added for message-queues : PM : 28/10/03 */
+ #include <syslog.h>
+-#ifndef __USE_GNU
++#include <limits.h>
++#ifndef _GNU_SOURCE
+ struct msgbuf {
+   long int mtype;
+   char mtext[1];
+ };
+ #endif /* else defined in <sys/msg.h> */
+ #include <sys/time.h>
+-#include <sys/fcntl.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ 
++#include <fcntl.h>
+ #include <signal.h>
+ #include <pthread.h>
+ 
+diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c
+index 1407eb1ab..a87c22faa 100644
+--- a/src/mds/mds_dt_tcp.c
++++ b/src/mds/mds_dt_tcp.c
+@@ -27,7 +27,6 @@
+ 
+ #include <stdlib.h>
+ #include <sched.h>
+-#include <sys/poll.h>
+ #include <poll.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h
+index a6249d73e..574f52681 100644
+--- a/src/mds/mds_dt_tcp_disc.h
++++ b/src/mds/mds_dt_tcp_disc.h
+@@ -24,7 +24,7 @@
+ #include "base/ncssysf_tsk.h"
+ #include "base/ncssysf_mem.h"
+ #include "mds_dt_tcp_disc.h"
+-#include "sys/poll.h"
++#include <poll.h>
+ 
+ /*  mds_indentifire + mds_version   + msg_type + scope_type + server_type +
+    server_instance_lower + server_instance_upper + sub_ref_val + sub_ref_val  +
+diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c
+index 37745e7f0..9b3255567 100644
+--- a/src/mds/mds_dt_tipc.c
++++ b/src/mds/mds_dt_tipc.c
+@@ -35,7 +35,6 @@
+ #include <stdbool.h>
+ #include <stdlib.h>
+ #include <sched.h>
+-#include <sys/poll.h>
+ #include <poll.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h
+index e73a11b09..401d208c2 100644
+--- a/src/mds/mds_dt_tipc.h
++++ b/src/mds/mds_dt_tipc.h
+@@ -32,7 +32,7 @@
+ #include <assert.h>
+ #include <string.h>
+ #include <sys/param.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <netdb.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c
+index 6f621e04e..5aacbd33e 100644
+--- a/src/mds/mds_dt_trans.c
++++ b/src/mds/mds_dt_trans.c
+@@ -26,7 +26,6 @@
+ #include "mds_core.h"
+ #include "base/osaf_utility.h"
+ 
+-#include <sys/poll.h>
+ #include <poll.h>
+ 
+ #define MDS_PROT_TCP 0xA0
+diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc
+index 84014b578..31b1ccc6c 100644
+--- a/src/ntf/ntfd/NtfLogger.cc
++++ b/src/ntf/ntfd/NtfLogger.cc
+@@ -20,7 +20,7 @@
+  *   INCLUDE FILES
+  * ========================================================================
+  */
+-#include <sys/poll.h>
++#include <poll.h>
+ 
+ #include "base/osaf_utility.h"
+ #include <saAis.h>
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb
new file mode 100644
index 0000000..74483d7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb
@@ -0,0 +1,67 @@
+SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
+DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
+middleware consistent with Service Availability Forum (SA Forum) \
+specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
+established by leading Communications and Enterprise Computing Companies to \
+facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
+code base in commercial products. \
+The OpenSAF project was launched in mid 2007 and has been under development by \
+an informal group of supporters of the OpenSAF initiative. The OpenSAF \
+Foundation was founded on January 22nd 2008 with Emerson Network Power, \
+Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
+HOMEPAGE = "http://www.opensaf.org"
+SECTION = "admin"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
+
+DEPENDS = "libxml2 python"
+TOOLCHAIN = "gcc"
+
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
+           file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
+           file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
+           file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
+           file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
+"
+SRC_URI[md5sum] = "125bcd9aabd7412aedcbfbf73f4e6196"
+SRC_URI[sha256sum] = "3fb2239bb2c9328c8b45368ff8d8de979ea286a27edc9871d218200e88bb91cc"
+
+inherit autotools useradd systemd pkgconfig
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-f -r opensaf"
+USERADD_PARAM_${PN} =  "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
+
+SYSTEMD_SERVICE_${PN} += "opensafd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+PACKAGECONFIG[systemd] = ",,systemd"
+PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
+
+PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
+
+PKGLIBDIR="${libdir}"
+
+LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
+
+do_install_append() {
+    cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir}
+    rm -fr "${D}${localstatedir}/lock"
+    rm -fr "${D}${localstatedir}/run"
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+    rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
+    if [ ! -d "${D}${sysconfdir}/init.d" ]; then
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
+    fi
+}
+
+FILES_${PN} += "${systemd_unitdir}/system/*.service"
+FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
+
+INSANE_SKIP_${PN} = "dev-so"
+
+RDEPENDS_${PN} += "bash python"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb
deleted file mode 100644
index be79ba8..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb
+++ /dev/null
@@ -1,66 +0,0 @@
-SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
-DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
-middleware consistent with Service Availability Forum (SA Forum) \
-specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
-established by leading Communications and Enterprise Computing Companies to \
-facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
-code base in commercial products. \
-The OpenSAF project was launched in mid 2007 and has been under development by \
-an informal group of supporters of the OpenSAF initiative. The OpenSAF \
-Foundation was founded on January 22nd 2008 with Emerson Network Power, \
-Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
-HOMEPAGE = "http://www.opensaf.org"
-SECTION = "admin"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
-
-DEPENDS = "libxml2 python"
-TOOLCHAIN = "gcc"
-
-SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
-           file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
-           file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
-           file://0001-Remove-unused-variables.patch \
-"
-SRC_URI[md5sum] = "08991fd467ae9dcea3c8747be8e3981e"
-SRC_URI[sha256sum] = "903478244afe37e329be93050f1d48fa18c84ea17862134c4217b920e267a04a"
-
-inherit autotools useradd systemd pkgconfig
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "-f -r opensaf"
-USERADD_PARAM_${PN} =  "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
-
-SYSTEMD_SERVICE_${PN} += "opensafd.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-PACKAGECONFIG[systemd] = ",,systemd"
-PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
-
-PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
-
-PKGLIBDIR="${libdir}"
-
-LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
-
-do_install_append() {
-    cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir}
-    rm -fr "${D}${localstatedir}/lock"
-    rm -fr "${D}${localstatedir}/run"
-    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
-    rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
-    if [ ! -d "${D}${sysconfdir}/init.d" ]; then
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
-    fi
-}
-
-FILES_${PN} += "${systemd_unitdir}/system/*.service"
-FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
-
-INSANE_SKIP_${PN} = "dev-so"
-
-RDEPENDS_${PN} += "bash python"
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch
new file mode 100644
index 0000000..6b86e39
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch
@@ -0,0 +1,26 @@
+From 63619acf25151d4dade6d65732722ec4a710a5ac Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 09:54:25 -0700
+Subject: [PATCH] Check for glibc before setting CANT_USE_SEND_RECV_MSG
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/util/sys_defs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
+index f720e2a..7314c63 100644
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -813,7 +813,7 @@ extern int initgroups(const char *, int);
+ #define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1)
+ #endif
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \
+-	|| (__GLIBC__ < 2)
++	|| (defined(__GLIBC__) && (__GLIBC__ < 2))
+ #define CANT_USE_SEND_RECV_MSG
+ #define DEF_SMTP_CACHE_DEMAND	0
+ #else
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch
new file mode 100644
index 0000000..763a4a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch
@@ -0,0 +1,64 @@
+From a0d0de10e4c5ab55bc2fa48798079e2876b1211d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 10:29:37 -0700
+Subject: [PATCH] makedefs: Use native compiler to build makedefs.test
+
+Its a binary used during build
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ makedefs | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/makedefs b/makedefs
+index 9fd4bc2..5ee7747 100644
+--- a/makedefs
++++ b/makedefs
+@@ -526,7 +526,7 @@ int     main(int argc, char **argv)
+     exit(0);
+ }
+ EOF
+-			   ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
++			   ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c || exit 1
+ 			   rm -f makedefs.test makedefs.test.[co]
+ 		       fi;;
+ 		esac
+@@ -762,7 +762,7 @@ int     main(int argc, char **argv)
+     exit(0);
+ }
+ EOF
+-		   ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
++		   ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c || exit 1
+ 		   ./makedefs.test 2>/dev/null ||
+ 			CCARGS="$CCARGS -DNO_SIGSETJMP"
+ 		   rm -f makedefs.test makedefs.test.[co]
+@@ -796,7 +796,7 @@ int main(int argc, char **argv)
+ 				  &error) != 14);
+ }
+ EOF
+-		    ${CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
++		    ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
+ 			$icu_ldflags >/dev/null 2>&1
+ 		    if ./makedefs.test 2>/dev/null ; then
+ 			CCARGS="$CCARGS $icu_cppflags"
+@@ -911,7 +911,7 @@ int     main(void)
+     exit(ferror(stdout) ? 1 : 0);
+ }
+ EOF
+-    eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
++    eval ${BUILD_CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
+     ./makedefs.test || exit 1
+     rm -f makedefs.test makedefs.test.[co]
+ }
+@@ -1067,7 +1067,7 @@ int     main(void)
+     exit(ferror(stdout) ? 1 : 0);
+ }
+ EOF
+-	eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
++	eval ${BUILD_CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
+ 	parm_val=`./makedefs.test` || exit 1
+ 	rm -f makedefs.test makedefs.test.[co]
+ 	eval ${parm_name}=\""\$parm_val"\"
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/icu-config.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/icu-config.patch
new file mode 100644
index 0000000..9bd9c2f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/icu-config.patch
@@ -0,0 +1,21 @@
+do not entertain cppflags from icu, this is because
+icu-config feeds the -I path without sysroot which
+caused native headers to be included and build is
+corrupted in any case its just adding -I/usr/include
+to the CCARGS which we loose nothing if its not
+entertained.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: postfix-3.2.2/makedefs
+===================================================================
+--- postfix-3.2.2.orig/makedefs
++++ postfix-3.2.2/makedefs
+@@ -799,7 +799,6 @@ EOF
+ 		    ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
+ 			$icu_ldflags >/dev/null 2>&1
+ 		    if ./makedefs.test 2>/dev/null ; then
+-			CCARGS="$CCARGS $icu_cppflags"
+ 			SYSLIBS="$SYSLIBS $icu_ldflags"
+ 		    else
+ 			CCARGS="$CCARGS -DNO_EAI"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix-install.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix-install.patch
new file mode 100644
index 0000000..45479bd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix-install.patch
@@ -0,0 +1,26 @@
+Index: postfix-3.2.2/postfix-install
+===================================================================
+--- postfix-3.2.2.orig/postfix-install
++++ postfix-3.2.2/postfix-install
+@@ -843,7 +843,7 @@ IFS="$BACKUP_IFS"
+ # the wrong place when Postfix is being upgraded.
+ 
+ case "$mail_version" in
+-"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
++"") mail_version="`$POSTCONF -c $CONFIG_DIRECTORY -dhx mail_version`" || exit 1
+ esac
+ 
+ # Undo MAIL_VERSION expansion at the end of a parameter value. If
+Index: postfix-3.2.2/Makefile.in
+===================================================================
+--- postfix-3.2.2.orig/Makefile.in
++++ postfix-3.2.2/Makefile.in
+@@ -20,7 +20,7 @@ META	= meta/main.cf.proto meta/master.cf
+ EXPAND	= sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \
+ 	    -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);"
+ SHLIB_DIR_OVERRIDE = \
+-	$${shlib_directory:-`$(SHLIB_ENV) bin/postconf -dhx shlib_directory`}
++	$${shlib_directory:-`$(SHLIB_ENV) $(POSTCONF) -dhx shlib_directory`}
+ 
+ default: update
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
index 4c794ff..a588bd3 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -60,20 +60,24 @@
 export CCARGS-ldap_class-native = ""
 export AUXLIBS-ldap_class-native = ""
 
+export CCARGS-nonis_libc-musl = "-DNO_NIS"
+export CCARGS-nonis = ""
+
 # SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH
 # current openldap didn't enable SASL
 export CCARGS-sasl  = "\
-    ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I=/usr/include/sasl', '', d)}"
+    ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${STAGING_INCDIR}/sasl', '', d)}"
 export AUXLIBS-sasl = "\
     ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}"
 export CCARGS-sasl_class-native = ""
 export AUXLIBS-sasl_class-native = ""
 
 # PCRE, TLS support default
-export CCARGS  = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl}"
+export CCARGS  = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}"
 export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
 export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
 
+export CCARGS-nonis_libc-musl = "-DNO_NIS"
 # OPT,DEBUG is aready in CFLAGS
 # ignore the OPTS="CC=$CC" in Makefile it will not use the CC=$CC $CCARGS
 EXTRA_OEMAKE += "OPT= DEBUG= OPTS= "
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.1.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.1.1.bb
deleted file mode 100644
index dbbe24c..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.1.1.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require postfix.inc
-
-SRC_URI[md5sum] = "40d72ea143af7ab0038c2cee1f483707"
-SRC_URI[sha256sum] = "3deda4c34631970490b1b5fbb559905f93531bf1c7eb00e38b0d0deb1dba9982"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
new file mode 100644
index 0000000..439ede9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
@@ -0,0 +1,18 @@
+require postfix.inc
+
+SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
+           file://makedefs.patch \
+           file://install.patch \
+           file://main.cf_2.0 \
+           file://postfix \
+           file://internal_recipient \
+           file://postfix.service \
+           file://aliasesdb \
+           file://check_hostname.sh \
+           file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \
+           file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
+           file://postfix-install.patch \
+           file://icu-config.patch \
+           "
+SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0"
+SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch
index 19617a6..9816d4d 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch
@@ -9,11 +9,11 @@
 Signed-off-By: Armin Kuster <akuster808@gmail.com>
 
 
-Index: proftpd-1.3.5/Make.rules.in
+Index: proftpd-1.3.6/Make.rules.in
 ===================================================================
---- proftpd-1.3.5.orig/Make.rules.in
-+++ proftpd-1.3.5/Make.rules.in
-@@ -29,9 +29,9 @@ INSTALL=@INSTALL@
+--- proftpd-1.3.6.orig/Make.rules.in
++++ proftpd-1.3.6/Make.rules.in
+@@ -30,9 +30,9 @@ INSTALL=@INSTALL@
  INSTALL_STRIP=@INSTALL_STRIP@
  INSTALL_USER=@install_user@
  INSTALL_GROUP=@install_group@
@@ -26,10 +26,10 @@
  
  RM=rm -f
  SHELL=@CONFIG_SHELL@
-Index: proftpd-1.3.5/Makefile.in
+Index: proftpd-1.3.6/Makefile.in
 ===================================================================
---- proftpd-1.3.5.orig/Makefile.in
-+++ proftpd-1.3.5/Makefile.in
+--- proftpd-1.3.6.orig/Makefile.in
++++ proftpd-1.3.6/Makefile.in
 @@ -105,7 +105,6 @@ check: proftpd$(EXEEXT)
  $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8:
  	@if [ ! -d $@ ]; then \
@@ -60,11 +60,11 @@
  		           $(top_srcdir)/sample-configurations/basic.conf \
  	       	           $(DESTDIR)$(sysconfdir)/proftpd.conf ; \
  	fi
-Index: proftpd-1.3.5/configure
+Index: proftpd-1.3.6/configure
 ===================================================================
---- proftpd-1.3.5.orig/configure
-+++ proftpd-1.3.5/configure
-@@ -38255,7 +38255,7 @@ _ACEOF
+--- proftpd-1.3.6.orig/configure
++++ proftpd-1.3.6/configure
+@@ -41777,7 +41777,7 @@ _ACEOF
  
  
  cat >>confdefs.h <<_ACEOF
@@ -72,9 +72,9 @@
 +#define PR_RUN_DIR "`eval echo "${localstatedir}"/run/`"
  _ACEOF
  
- cat >>confdefs.h <<_ACEOF
-@@ -38263,7 +38263,7 @@ cat >>confdefs.h <<_ACEOF
- _ACEOF
+ 
+@@ -41787,7 +41787,7 @@ _ACEOF
+ 
  
  cat >>confdefs.h <<_ACEOF
 -#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/proftpd.pid"`"
@@ -82,25 +82,25 @@
  _ACEOF
  
  
-Index: proftpd-1.3.5/configure.in
+Index: proftpd-1.3.6/configure.in
 ===================================================================
---- proftpd-1.3.5.orig/configure.in
-+++ proftpd-1.3.5/configure.in
-@@ -2971,8 +2971,8 @@ locale_dir="`eval echo ${locale_dir}`"
- AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`")
+--- proftpd-1.3.6.orig/configure.in
++++ proftpd-1.3.6/configure.in
+@@ -3833,8 +3833,8 @@ locale_dir="`eval echo ${locale_dir}`"
+ AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`", [Define the locale directory])
  
- AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`")
--AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`")
--AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/proftpd.pid"`")
-+AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/run/proftpd.conf"`")
-+AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/run/proftpd.pid"`")
+ AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`", [Define the run directory])
+-AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`", [Define the configuration file path])
+-AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/proftpd.pid"`", [Define the PID file path])
++AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/run/proftpd.conf"`", [Define the configuration file path])
++AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/run/proftpd.pid"`", [Define the PID file path])
  
  prefix="$pr_saved_prefix"
  exec_prefix="$pr_saved_exec_prefix"
-Index: proftpd-1.3.5/lib/libcap/Makefile
+Index: proftpd-1.3.6/lib/libcap/Makefile
 ===================================================================
---- proftpd-1.3.5.orig/lib/libcap/Makefile
-+++ proftpd-1.3.5/lib/libcap/Makefile
+--- proftpd-1.3.6.orig/lib/libcap/Makefile
++++ proftpd-1.3.6/lib/libcap/Makefile
 @@ -26,7 +26,7 @@ OBJS=$(addsuffix .o, $(FILES))
  all: $(LIBNAME)
  
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb
deleted file mode 100644
index 73efac2..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb
+++ /dev/null
@@ -1,137 +0,0 @@
-SUMMARY = "Secure and configurable FTP server"
-SECTION = "net"
-HOMEPAGE = "http://www.proftpd.org"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184"
-
-SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \
-           file://basic.conf.patch \
-           file://proftpd-basic.init \
-           file://default \
-           file://close-RequireValidShell-check.patch \
-           file://contrib.patch  \
-           file://build_fixup.patch \
-           file://proftpd.service \
-           "
-
-SRC_URI[md5sum] = "f7b8e3a383b34a894c2502db74ccccde"
-SRC_URI[sha256sum] = "afc1789f2478acf88dfdc7d70da90a4fa2786d628218e9574273295d044b4fc8"
-
-inherit autotools-brokensep useradd update-rc.d systemd
-
-PACKAGECONFIG ??= "shadow \
-                   ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \
-                  "
-
-PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses"
-PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl"
-PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam"
-PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6"
-PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow"
-PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre "
-
-# enable POSIX.1e capabilities
-PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap"
-
-#enable support for POSIX ACLs
-PACKAGECONFIG[acl] = "--enable-facl, --disable-facl"
-
-#enable proftpd controls via ftpdct
-PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls"
-
-#prevent proftpd from using its bundled getopt implementation.
-PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt"
-
-#do not strip debugging symbols from installed code
-PACKAGECONFIG[strip] = "--enable-strip, --disable-strip"
-
-#enable SIA authentication support (Tru64)
-PACKAGECONFIG[sia] = "--enable-sia, --disable-sia"
-PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile"
-
-#enable Native Language Support (NLS)
-PACKAGECONFIG[nls] = "--enable-nls, --disable-nls"
-
-#add mod_dso to core modules
-PACKAGECONFIG[dso] = "--enable-dso, --disable-dso"
-PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile"
-
-#omit mod_auth_file from core modules
-PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file"
-
-
-# proftpd uses libltdl which currently makes configuring using
-# autotools.bbclass a pain...
-do_configure () {
-    oe_runconf
-    cp ${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool ${S}/libtool
-}
-
-FTPUSER = "ftp"
-FTPGROUP = "ftp"
-
-do_install () {
-    oe_runmake DESTDIR=${D} install
-    rmdir ${D}${libdir}/proftpd ${D}${datadir}/locale
-    [ -d ${D}${libexecdir} ] && rmdir ${D}${libexecdir}
-    sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf
-    sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf
-    install -d ${D}${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd
-    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd
-    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd
-    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd
-    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd
-
-    install -d ${D}${sysconfdir}/default
-    install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/proftpd
-
-    # create the pub directory
-    mkdir -p ${D}/home/${FTPUSER}/pub/
-    chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
-        # install proftpd pam configuration
-        install -d ${D}${sysconfdir}/pam.d
-        install -m 644 ${S}/contrib/dist/rpm/ftp.pamd ${D}${sysconfdir}/pam.d/proftpd
-        sed -i '/ftpusers/d' ${D}${sysconfdir}/pam.d/proftpd
-        # specify the user Authentication config
-        sed -i '/^MaxInstances/a\AuthPAM                         on\nAuthPAMConfig                   proftpd' \
-            ${D}${sysconfdir}/proftpd.conf
-    fi
-
-    install -d ${D}/${systemd_unitdir}/system
-    install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system
-    sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
-        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
-        -e 's,@SBINDIR@,${sbindir},g' \
-        -i ${D}${systemd_unitdir}/system/*.service
-
-    sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \
-        -e 's|${STAGING_DIR_NATIVE}||g' \
-        -e 's|-fdebug-prefix-map=[^ ]*||g' \
-        -i ${D}/${bindir}/prxs
-
-    # ftpmail perl script, which reads the proftpd log file and sends
-    # automatic email notifications once an upload finishs,
-    # depends on an old perl Mail::Sendmail
-    # The Mail::Sendmail has not been maintained for almost 10 years
-    # Other distribution not ship with ftpmail, so do the same to
-    # avoid confusion about having it fails to run
-    rm -rf ${D}${bindir}/ftpmail
-    rm -rf ${D}${mandir}/man1/ftpmail.1
-}
-
-INITSCRIPT_NAME = "proftpd"
-INITSCRIPT_PARAM = "defaults 85 15"
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "proftpd.service"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
-USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \
-                       --shell /bin/false ${FTPUSER}"
-
-FILES_${PN} += "/home/${FTPUSER}"
-
-RDEPENDS_${PN} += "perl"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb
new file mode 100644
index 0000000..4099472
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb
@@ -0,0 +1,138 @@
+SUMMARY = "Secure and configurable FTP server"
+SECTION = "net"
+HOMEPAGE = "http://www.proftpd.org"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184"
+
+SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \
+           file://basic.conf.patch \
+           file://proftpd-basic.init \
+           file://default \
+           file://close-RequireValidShell-check.patch \
+           file://contrib.patch  \
+           file://build_fixup.patch \
+           file://proftpd.service \
+           "
+iSRC_URI[md5sum] = "13270911c42aac842435f18205546a1b"
+SRC_URI[sha256sum] = "91ef74b143495d5ff97c4d4770c6804072a8c8eb1ad1ecc8cc541b40e152ecaf"
+
+inherit autotools-brokensep useradd update-rc.d systemd
+
+PACKAGECONFIG ??= "shadow \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \
+                  "
+
+PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses"
+PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl"
+PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam"
+PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6"
+PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow"
+PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre "
+
+# enable POSIX.1e capabilities
+PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap"
+
+#enable support for POSIX ACLs
+PACKAGECONFIG[acl] = "--enable-facl, --disable-facl"
+
+#enable proftpd controls via ftpdct
+PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls"
+
+#prevent proftpd from using its bundled getopt implementation.
+PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt"
+
+#do not strip debugging symbols from installed code
+PACKAGECONFIG[strip] = "--enable-strip, --disable-strip"
+
+#enable SIA authentication support (Tru64)
+PACKAGECONFIG[sia] = "--enable-sia, --disable-sia"
+PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile"
+
+#enable Native Language Support (NLS)
+PACKAGECONFIG[nls] = "--enable-nls, --disable-nls"
+
+#add mod_dso to core modules
+PACKAGECONFIG[dso] = "--enable-dso, --disable-dso"
+PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile"
+
+#omit mod_auth_file from core modules
+PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file"
+
+
+# proftpd uses libltdl which currently makes configuring using
+# autotools.bbclass a pain...
+do_configure () {
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+    oe_runconf
+    cp ${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool ${S}/libtool
+}
+
+FTPUSER = "ftp"
+FTPGROUP = "ftp"
+
+do_install () {
+    oe_runmake DESTDIR=${D} install
+    rmdir ${D}${libdir}/proftpd ${D}${datadir}/locale
+    [ -d ${D}${libexecdir} ] && rmdir ${D}${libexecdir}
+    sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf
+    sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd
+    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd
+
+    install -d ${D}${sysconfdir}/default
+    install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/proftpd
+
+    # create the pub directory
+    mkdir -p ${D}/home/${FTPUSER}/pub/
+    chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
+        # install proftpd pam configuration
+        install -d ${D}${sysconfdir}/pam.d
+        install -m 644 ${S}/contrib/dist/rpm/ftp.pamd ${D}${sysconfdir}/pam.d/proftpd
+        sed -i '/ftpusers/d' ${D}${sysconfdir}/pam.d/proftpd
+        # specify the user Authentication config
+        sed -i '/^MaxInstances/a\AuthPAM                         on\nAuthPAMConfig                   proftpd' \
+            ${D}${sysconfdir}/proftpd.conf
+    fi
+
+    install -d ${D}/${systemd_unitdir}/system
+    install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system
+    sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+        -e 's,@SBINDIR@,${sbindir},g' \
+        -i ${D}${systemd_unitdir}/system/*.service
+
+    sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \
+        -e 's|${STAGING_DIR_NATIVE}||g' \
+        -e 's|-fdebug-prefix-map=[^ ]*||g' \
+        -i ${D}/${bindir}/prxs
+
+    # ftpmail perl script, which reads the proftpd log file and sends
+    # automatic email notifications once an upload finishs,
+    # depends on an old perl Mail::Sendmail
+    # The Mail::Sendmail has not been maintained for almost 10 years
+    # Other distribution not ship with ftpmail, so do the same to
+    # avoid confusion about having it fails to run
+    rm -rf ${D}${bindir}/ftpmail
+    rm -rf ${D}${mandir}/man1/ftpmail.1
+}
+
+INITSCRIPT_NAME = "proftpd"
+INITSCRIPT_PARAM = "defaults 85 15"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "proftpd.service"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
+USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \
+                       --shell /bin/false ${FTPUSER}"
+
+FILES_${PN} += "/home/${FTPUSER}"
+
+RDEPENDS_${PN} += "perl"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.14.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.14.bb
deleted file mode 100644
index 2525249..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.14.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-
-require radvd.inc
-
-SRC_URI[md5sum] = "acd3883dece2c7888d15596b05c9fae4"
-SRC_URI[sha256sum] = "46d31c05daea11c3d1e3dc092997d3631b3bc72b20a4f279b05304b83dbd7aa8"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.17.bb
new file mode 100644
index 0000000..4baea01
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.17.bb
@@ -0,0 +1,5 @@
+
+require radvd.inc
+
+SRC_URI[md5sum] = "64ee3fdb5544bcddef1c6cd80d77fa0a"
+SRC_URI[sha256sum] = "53757e7f2164899e1145482f1ae91829600a6e2f6fec29cfb3b350a3bb45bd5d"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch
new file mode 100644
index 0000000..0c0a3aa
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch
@@ -0,0 +1,116 @@
+From 14d469bc82c758116aef7d549abd49c131b4170f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Apr 2017 11:54:57 -0700
+Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler
+ option
+
+If this option is supported by compiler then disable it ( gcc7+)
+Fixes
+client.c:834:23: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1010 [-Werror=format-truncation=]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac                |  3 +-
+ m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 76 insertions(+), 1 deletion(-)
+ create mode 100644 m4/ax_check_compile_flag.m4
+
+Index: squid-3.5.26/configure.ac
+===================================================================
+--- squid-3.5.26.orig/configure.ac
++++ squid-3.5.26/configure.ac
+@@ -26,6 +26,7 @@ m4_include([acinclude/pkg.m4])
+ m4_include([acinclude/lib-checks.m4])
+ m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4])
+ m4_include([acinclude/ax_cxx_0x_types.m4])
++m4_include([acinclude/ax_check_compile_flag.m4])
+ 
+ HOSTCXX="$BUILD_CXX"
+ PRESET_CFLAGS="$CFLAGS"
+@@ -44,6 +45,7 @@ AC_PROG_CXX
+ AC_LANG([C++])
+ AC_CANONICAL_HOST
+ 
++AX_CHECK_COMPILE_FLAG([-Werror=format-truncation],[CFLAGS="$CFLAGS -Wno-error=format-truncation" CXXFLAGS="$CXXFLAGS -Wno-error=format-truncation"])
+ # Clang 3.2 on some CPUs requires -march-native to detect correctly.
+ # GCC 4.3+ can also produce faster executables when its used.
+ # But building inside a virtual machine environment has been found to
+Index: squid-3.5.26/acinclude/ax_check_compile_flag.m4
+===================================================================
+--- /dev/null
++++ squid-3.5.26/acinclude/ax_check_compile_flag.m4
+@@ -0,0 +1,74 @@
++# ===========================================================================
++#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
++#
++# DESCRIPTION
++#
++#   Check whether the given FLAG works with the current language's compiler
++#   or gives an error.  (Warnings, however, are ignored)
++#
++#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
++#   success/failure.
++#
++#   If EXTRA-FLAGS is defined, it is added to the current language's default
++#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
++#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
++#   force the compiler to issue an error when a bad flag is given.
++#
++#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
++#
++#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
++#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
++#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
++#
++#   This program is free software: you can redistribute it and/or modify it
++#   under the terms of the GNU General Public License as published by the
++#   Free Software Foundation, either version 3 of the License, or (at your
++#   option) any later version.
++#
++#   This program is distributed in the hope that it will be useful, but
++#   WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++#   Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with this program. If not, see <https://www.gnu.org/licenses/>.
++#
++#   As a special exception, the respective Autoconf Macro's copyright owner
++#   gives unlimited permission to copy, distribute and modify the configure
++#   scripts that are the output of Autoconf when processing the Macro. You
++#   need not follow the terms of the GNU General Public License when using
++#   or distributing such scripts, even though portions of the text of the
++#   Macro appear in them. The GNU General Public License (GPL) does govern
++#   all other use of the material that constitutes the Autoconf Macro.
++#
++#   This special exception to the GPL applies to versions of the Autoconf
++#   Macro released by the Autoconf Archive. When you make and distribute a
++#   modified version of the Autoconf Macro, you may extend this special
++#   exception to the GPL to apply to your modified version as well.
++
++#serial 5
++
++AC_DEFUN([AX_CHECK_COMPILE_FLAG],
++[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
++  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
++  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
++  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
++    [AS_VAR_SET(CACHEVAR,[yes])],
++    [AS_VAR_SET(CACHEVAR,[no])])
++  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
++AS_VAR_IF(CACHEVAR,yes,
++  [m4_default([$2], :)],
++  [m4_default([$3], :)])
++AS_VAR_POPDEF([CACHEVAR])dnl
++])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch
new file mode 100644
index 0000000..082a111
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch
@@ -0,0 +1,36 @@
+From a78f2f0feda8f92cb59afe8236bd90726908768f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 25 Jun 2017 00:59:24 -0700
+Subject: [PATCH] tools.cc: fixed unused-result warning
+
+fix
+| ../../squid-3.5.26/src/tools.cc: In function 'void enter_suid()':
+| ../../squid-3.5.26/src/tools.cc:616:11: error: ignoring return value of 'int setuid(__uid_t)', declared with attribute warn_unused_result [-Werror=unused-result]
+|      setuid(0);
+|      ~~~~~~^~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ src/tools.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/tools.cc b/src/tools.cc
+index 8137a03..843e266 100644
+--- a/src/tools.cc
++++ b/src/tools.cc
+@@ -612,8 +612,8 @@ enter_suid(void)
+     if (setresuid((uid_t)-1, 0, (uid_t)-1) < 0)
+         debugs (21, 3, "enter_suid: setresuid failed: " << xstrerror ());
+ #else
+-
+-    setuid(0);
++    if (setuid(0) < 0)
++        debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerror());
+ #endif
+ #if HAVE_PRCTL && defined(PR_SET_DUMPABLE)
+     /* Set Linux DUMPABLE flag */
+-- 
+2.13.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch
new file mode 100644
index 0000000..cc1ea78
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch
@@ -0,0 +1,17 @@
+../../squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc: In function 'void squidaio_init()':                                                              ../../squid-3.5.26/src/DiskIO/DiskThreads/DiskThreads.h:30:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]      #define NUMTHREADS (Config.cacheSwap.n_configured*16)
+
+
+Upstream-Status: Backport
+Index: squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc
+===================================================================
+--- squid-3.5.26.orig/src/DiskIO/DiskThreads/aiops.cc
++++ squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc
+@@ -290,7 +290,7 @@ squidaio_init(void)
+     /* Create threads and get them to sit in their wait loop */
+     squidaio_thread_pool = memPoolCreate("aio_thread", sizeof(squidaio_thread_t));
+ 
+-    assert(NUMTHREADS);
++    assert(NUMTHREADS != 0);
+ 
+     for (i = 0; i < NUMTHREADS; ++i) {
+         threadp = (squidaio_thread_t *)squidaio_thread_pool->alloc();
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.25.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.25.bb
deleted file mode 100644
index 5116383..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.25.bb
+++ /dev/null
@@ -1,106 +0,0 @@
-SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux"
-DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \
-Squid offers a rich access control, authorization and logging environment to \
-develop web proxy and content serving applications. \
-Squid offers a rich set of traffic optimization options, most of which are \
-enabled by default for simpler installation and high performance. \
-"
-HOMEPAGE = "http://www.squid-cache.org"
-SECTION = "web"
-LICENSE = "GPLv2+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
-MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${PV}.tar.bz2 \
-           file://Set-up-for-cross-compilation.patch \
-           file://Skip-AC_RUN_IFELSE-tests.patch \
-           file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \
-           file://squid-use-serial-tests-config-needed-by-ptest.patch \
-           file://run-ptest \
-           file://volatiles.03_squid \
-           file://set_sysroot_patch.patch \
-           file://squid-don-t-do-squid-conf-tests-at-build-time.patch \
-           file://0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch \
-           "
-SRC_URI[md5sum] = "c34b228129a755f363367c45c46287ba"
-SRC_URI[sha256sum] = "0bfd6182154b7f29574d71c659f1cfd1b7d9be9356895dac70dc0f3696a0639b"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \
-                    file://errors/COPYRIGHT;md5=8861130fae91400bcf99b66f133172b3 \
-                   "
-DEPENDS = "libtool krb5 openldap db cyrus-sasl"
-
-inherit autotools useradd ptest
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('TARGET_ARCH', 'powerpc', 'noatomics', '', d)} \
-                   ${@bb.utils.contains('TARGET_ARCH', 'mips', 'noatomics', '', d)} \
-                   ${@bb.utils.contains('TARGET_ARCH', 'mipsel', 'noatomics', '', d)} \
-                   ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
-                  "
-PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack"
-PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,,"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-BASIC_AUTH = "DB SASL LDAP"
-BASIC_AUTH_append_libc-glibc = " NIS"
-
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}"
-
-EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}' --sysconfdir=${sysconfdir}/${BPN} --with-logdir=${localstatedir}/log/${BPN}"
-
-export BUILDCXXFLAGS="${BUILD_CXXFLAGS}"
-
-TESTDIR = "test-suite"
-
-do_configure_prepend() {
-    export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
-}
-
-do_compile_ptest() {
-    oe_runmake -C ${TESTDIR} buildtest-TESTS
-}
-
-do_install_ptest() {
-    cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
-    cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}
-
-    # do NOT need to rebuild Makefile itself
-    sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
-
-    # Add squid-conf-tests for runtime tests
-    sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \
-        -e "s/\(list=' \$(TESTS)\)/\1 squid-conf-tests/" \
-        -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile
-
-    # Ensure the path for command true is correct
-    sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
-}
-
-do_install_append() {
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -d ${D}${sysconfdir}/tmpfiles.d
-        echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
-        echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
-    fi
-
-    install -d ${D}${sysconfdir}/default/volatiles
-    install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid
-
-    rmdir "${D}${localstatedir}/run/${BPN}"
-    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run"
-
-    rmdir "${D}${localstatedir}/log/${BPN}"
-    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log"
-}
-
-FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons"
-FILES_${PN}-dbg += "/usr/src/debug"
-FILES_${PN}-doc += "${datadir}/*.txt"
-
-RDEPENDS_${PN} += "perl"
-RDEPENDS_${PN}-ptest += "make"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.26.bb
new file mode 100644
index 0000000..3ee96ab
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.26.bb
@@ -0,0 +1,114 @@
+SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux"
+DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \
+Squid offers a rich access control, authorization and logging environment to \
+develop web proxy and content serving applications. \
+Squid offers a rich set of traffic optimization options, most of which are \
+enabled by default for simpler installation and high performance. \
+"
+HOMEPAGE = "http://www.squid-cache.org"
+SECTION = "web"
+LICENSE = "GPLv2+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
+MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${PV}.tar.bz2 \
+           file://Set-up-for-cross-compilation.patch \
+           file://Skip-AC_RUN_IFELSE-tests.patch \
+           file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \
+           file://squid-use-serial-tests-config-needed-by-ptest.patch \
+           file://run-ptest \
+           file://volatiles.03_squid \
+           file://set_sysroot_patch.patch \
+           file://squid-don-t-do-squid-conf-tests-at-build-time.patch \
+           file://0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch \
+           file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
+           file://gcc7-fixes.patch \
+           file://0001-tools.cc-fixed-unused-result-warning.patch \
+           "
+
+SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch"
+
+SRC_URI[md5sum] = "dc1830cd361e077814aa39bcc3691d8b"
+SRC_URI[sha256sum] = "41d8845863dcd026c856508cd1599d417c8947ffd96e86e24085f9893cb8b8c2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \
+                    file://errors/COPYRIGHT;md5=8861130fae91400bcf99b66f133172b3 \
+                   "
+DEPENDS = "libtool krb5 openldap db cyrus-sasl openssl expat libxml2"
+
+inherit autotools pkgconfig useradd ptest perlnative
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('TARGET_ARCH', 'powerpc', 'noatomics', '', d)} \
+                   ${@bb.utils.contains('TARGET_ARCH', 'mips', 'noatomics', '', d)} \
+                   ${@bb.utils.contains('TARGET_ARCH', 'mipsel', 'noatomics', '', d)} \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+                  "
+PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack"
+PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+BASIC_AUTH = "DB SASL LDAP"
+
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}"
+
+EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}' \
+                 --sysconfdir=${sysconfdir}/${BPN} \
+                 --with-logdir=${localstatedir}/log/${BPN} \
+                 'PERL=${USRBINPATH}/env perl'"
+
+export BUILDCXXFLAGS="${BUILD_CXXFLAGS}"
+
+TESTDIR = "test-suite"
+
+do_configure_prepend() {
+    export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
+}
+
+do_compile_ptest() {
+    oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+    cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
+    cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}
+
+    # do NOT need to rebuild Makefile itself
+    sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+
+    # Add squid-conf-tests for runtime tests
+    sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \
+        -e "s/\(list=' \$(TESTS)\)/\1 squid-conf-tests/" \
+        -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+
+    # Ensure the path for command true is correct
+    sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+}
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+        echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+    fi
+
+    install -d ${D}${sysconfdir}/default/volatiles
+    install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid
+
+    rmdir "${D}${localstatedir}/run/${BPN}"
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run"
+
+    rmdir "${D}${localstatedir}/log/${BPN}"
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log"
+}
+
+FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons"
+FILES_${PN}-dbg += "/usr/src/debug"
+FILES_${PN}-doc += "${datadir}/*.txt"
+
+RDEPENDS_${PN} += "perl"
+RDEPENDS_${PN}-ptest += "make"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch
new file mode 100644
index 0000000..cead977
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch
@@ -0,0 +1,62 @@
+From 941038fc05be21202cab7a7a9434097fb55ecbe0 Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <tg@mirbsd.de>
+Date: Thu, 31 Jul 2014 16:29:41 +0930
+Subject: [PATCH] __progname[] is provided by libc
+
+Rename local variable to tftpd_progname to avoid a clash with glibc
+global symbols and work around Debian bug #519006 (Closes: #564052).
+
+[ hpa: specifically, double-underscore symbols in C are reserved for
+  the implementation, i.e. compiler/libc. ]
+
+Signed-off-by: Ron Lee <ron@debian.org>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+---
+ tftpd/tftpd.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
+index e247b97..5fec7bf 100644
+--- a/tftpd/tftpd.c
++++ b/tftpd/tftpd.c
+@@ -76,7 +76,7 @@ static int ai_fam = AF_INET;
+ #define TRIES   6               /* Number of attempts to send each packet */
+ #define TIMEOUT_LIMIT ((1 << TRIES)-1)
+ 
+-const char *__progname;
++const char *tftpd_progname;
+ static int peer;
+ static unsigned long timeout  = TIMEOUT;        /* Current timeout value */
+ static unsigned long rexmtval = TIMEOUT;       /* Basic timeout value */
+@@ -395,9 +395,9 @@ int main(int argc, char **argv)
+     /* basename() is way too much of a pain from a portability standpoint */
+ 
+     p = strrchr(argv[0], '/');
+-    __progname = (p && p[1]) ? p + 1 : argv[0];
++    tftpd_progname = (p && p[1]) ? p + 1 : argv[0];
+ 
+-    openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
++    openlog(tftpd_progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
+ 
+     srand(time(NULL) ^ getpid());
+ 
+@@ -946,14 +946,14 @@ int main(int argc, char **argv)
+        syslog daemon gets restarted by the time we get here. */
+     if (secure && standalone) {
+         closelog();
+-        openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
++        openlog(tftpd_progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
+     }
+ 
+ #ifdef HAVE_TCPWRAPPERS
+     /* Verify if this was a legal request for us.  This has to be
+        done before the chroot, while /etc is still accessible. */
+     request_init(&wrap_request,
+-                 RQ_DAEMON, __progname,
++                 RQ_DAEMON, tftpd_progname,
+                  RQ_FILE, fd,
+                  RQ_CLIENT_SIN, &from, RQ_SERVER_SIN, &myaddr, 0);
+     sock_methods(&wrap_request);
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.service
new file mode 100644
index 0000000..97d5658
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tftp Server
+Requires=tftpd-hpa.socket
+
+[Service]
+ExecStart=@SBINDIR@/in.tftpd-hpa -s /var/lib/tftpboot
+StandardInput=socket
+
+[Install]
+Also=tftpd-hpa.socket
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.socket b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.socket
new file mode 100644
index 0000000..8764c1d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Tftp Server Activation Socket
+
+[Socket]
+ListenDatagram=69
+
+[Install]
+WantedBy=sockets.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
index 7f56713..132972b 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
@@ -7,6 +7,7 @@
 and should not be enabled unless it is expressly needed."
 DEPENDS = "tcp-wrappers readline"
 SECTION = "net"
+HOMEPAGE = "http://freecode.com/projects/tftp-hpa"
 LICENSE = "BSD-4-Clause"
 LIC_FILES_CHKSUM = "file://MCONFIG.in;beginline=1;endline=9;md5=c28ba5adb43041fae4629db05c83cbdd \
                     file://tftp/tftp.c;beginline=1;endline=32;md5=988c1cba99d70858a26cd877209857f4"
@@ -26,12 +27,15 @@
            file://add-error-check-for-disk-filled-up.patch \
            file://tftp-hpa-bug-fix-on-separated-CR-and-LF.patch \
            file://fix-writing-emtpy-file.patch \
+           file://0001-__progname-is-provided-by-libc.patch \
+           file://tftpd-hpa.socket \
+           file://tftpd-hpa.service \
 "
 
 SRC_URI[md5sum] = "46c9bd20bbffa62f79c958c7b99aac21"
 SRC_URI[sha256sum] = "0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269"
 
-inherit autotools-brokensep update-rc.d update-alternatives
+inherit autotools-brokensep update-rc.d update-alternatives systemd
 
 export AR = "${HOST_PREFIX}ar cq"
 
@@ -60,6 +64,11 @@
 
     install -d ${D}${sysconfdir}/default
     install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system
+    sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tftpd-hpa.service
 }
 
 FILES_${PN} = "${bindir}"
@@ -77,3 +86,6 @@
 ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa"
 ALTERNATIVE_PRIORITY = "60"
 
+SYSTEMD_PACKAGES = "tftp-hpa-server"
+SYSTEMD_SERVICE_tftp-hpa-server = "tftpd-hpa.socket tftpd-hpa.service"
+SYSTEMD_AUTO_ENABLE_tftp-hpa-server = "enable"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.conf b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.conf
new file mode 100644
index 0000000..e8b93ec
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.conf
@@ -0,0 +1,2 @@
+# network_device shelf slot file/disk/partition mac[,mac[,mac]]
+#eth0 0 0 /dev/sdb 00:11:22:33:44:55
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.init b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.init
new file mode 100644
index 0000000..0298c80
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.init
@@ -0,0 +1,193 @@
+#!/bin/sh
+# 
+# Init script for vblade (ATA over Ethernet daemon)
+# 
+# chkconfig: - 30 70
+# description: vblade AoE daemon
+# 
+# processname: vblade
+# config: /etc/vblade.conf
+# 
+# Shamelessly hacked together from other init scripts (sshd, mostly)
+# integrate vblade.init from Fedora's vblade-14-6.fc12.src.rpm
+# 
+
+RETVAL=0
+prog=vblade
+
+spawn_vblade() {
+  ALLOWMACS=""
+  [ -n "$5" ] && ALLOWMACS="-m $5"
+  ID="$1-e$2.$3"
+  if [ ! -d "/var/run/$prog" ]; then
+    mkdir /var/run/$prog
+  fi
+  PID_FILE=/var/run/$prog/${ID}.pid
+  $prog $ALLOWMACS $2 $3 $1 $4 >> /var/log/$prog.log 2>&1 &
+  pid=$!
+  RETVAL=$?
+  echo $pid > $PID_FILE
+  echo -n $"$4 (e$2.$3@$1) [pid $pid]"
+  [ "$RETVAL" = 0 ] && echo "success" || echo "failure"
+  echo
+}
+
+start() {
+  local ret
+
+  echo $"Starting up $prog: "
+  
+  #/var/lock/subsys/$prog exists?
+  status $prog 2>&1 > /dev/null
+  ret=$?
+
+  if [ "$ret" = "2" ]; then
+    echo "$prog dead but subsys locked"
+    echo
+    return 2
+  else 
+    if [ "$ret" = "0" ]; then
+      #is running
+      echo "already running"
+      return 0
+    fi
+  fi
+
+  if [ 0 -ne `grep -vc '^#\|^$' /etc/$prog.conf` ]
+  then
+    grep -v '^#' /etc/$prog.conf | sed -e 's/	/ /g' -e 's/  / /g' | while read line
+    do
+      spawn_vblade $line
+    done
+    touch /var/lock/subsys/$prog
+  else
+    echo -n "empty $prog.conf?"
+    echo " passed"
+    echo
+  fi
+}
+
+stop() {
+  echo -n $"Shutting down $prog: "
+  for pidfile in `ls /var/run/$prog/*.pid 2>/dev/null`
+  do
+    kill -TERM `cat $pidfile`
+    rm -f $pidfile
+  done
+  echo "success"
+  echo
+  rm -f /var/lock/subsys/$prog
+}
+
+__pids_var_run() {
+        local base=${1##*/}
+        local pid_file=${2:-/var/run/$base.pid}
+
+        pid=
+        if [ -f "$pid_file" ] ; then
+                local line p
+
+                while : ; do
+                        read line
+                        [ -z "$line" ] && break
+                        for p in $line ; do
+                                [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p"
+                        done
+                done < "$pid_file"
+
+                if [ -n "$pid" ]; then
+                        return 0
+                fi
+                return 1 # "Program is dead and /var/run pid file exists"
+        fi
+        return 3 # "Program is not running"
+}
+
+__pids_pidof() {
+        pidof "$1" || pidof "${1##*/}"
+}
+
+status() {
+        local base pid lock_file= pid_file=
+
+        # Test syntax.
+        if [ "$#" = 0 ] ; then
+                echo $"Usage: status [-p pidfile] {program}"
+                return 1
+        fi
+        if [ "$1" = "-p" ]; then
+                pid_file=$2
+                shift 2
+        fi
+        if [ "$1" = "-l" ]; then
+                lock_file=$2
+                shift 2
+        fi
+        base=${1##*/}
+
+        # First try "pidof"
+        __pids_var_run "$1" "$pid_file"
+        RC=$?
+        if [ -z "$pid_file" -a -z "$pid" ]; then
+                pid="$(__pids_pidof "$1")"
+        fi
+        if [ -n "$pid" ]; then
+                echo $"${base} (pid $pid) is running..."
+                return 0
+        fi
+
+        case "$RC" in
+                0)
+                        echo $"${base} (pid $pid) is running..."
+                        return 0
+                        ;;
+                1)
+                        echo $"${base} dead but pid file exists"
+                        return 1
+                        ;;
+        esac
+        if [ -z "${lock_file}" ]; then
+                lock_file=${base}
+        fi
+        # See if /var/lock/subsys/${lock_file} exists
+        if [ -f /var/lock/subsys/${lock_file} ]; then
+                echo $"${base} dead but subsys locked"
+                return 2
+        fi
+        echo $"${base} is stopped"
+        return 3
+}
+
+case "$1" in
+	start)
+		start
+		;;
+	stop)
+		stop
+		;;
+	restart)
+		stop
+		start
+		;;
+	reload)
+		# yes, this sucks, but the vblade processes die on SIGHUP
+		stop
+		start
+		;;
+	condrestart)
+		if [ -f /var/lock/subsys/$prog ]; then
+			stop
+			# avoid race
+			sleep 3
+			start
+		fi
+		;;
+	status)
+		status $prog
+		RETVAL=$?
+		;;
+	*)
+		echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
+		RETVAL=1
+esac
+exit $RETVAL
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.service
new file mode 100644
index 0000000..83a4d5d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Virtual EtherDrive blade AoE target
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=@BINDIR@/vblade.init start
+ExecStop=@BINDIR@/vblade.init stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/volatiles.99_vblade b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/volatiles.99_vblade
new file mode 100644
index 0000000..64a5881
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/volatiles.99_vblade
@@ -0,0 +1 @@
+d root root 0755 /var/run/vblade none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_20.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_20.bb
deleted file mode 100644
index 344c746..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_20.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Virtual EtherDrive blade AoE target"
-SECTION = "admin"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BPN}-${PV}.tgz \
-           file://cross.patch \
-           file://makefile-add-ldflags.patch \
-          "
-
-SRC_URI[md5sum] = "3c80e4a6bc7d66ae0c235b88cb44bd59"
-SRC_URI[sha256sum] = "c8fe2fc4f2fba8e07e5cfdf17335982584eef2cd5c78bf8b1db93f2b56e7121d"
-
-inherit autotools-brokensep
-
-do_install() {
-    install -D -m 0755 ${S}/vblade ${D}/${sbindir}/vblade
-    install -D -m 0755 ${S}/vbladed ${D}/${sbindir}/vbladed
-    install -D -m 0644 ${S}/vblade.8 ${D}/${mandir}/man8/vblade.8
-}
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb
new file mode 100644
index 0000000..d7b1dfa
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Virtual EtherDrive blade AoE target"
+SECTION = "admin"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BP}.tar.gz \
+           file://cross.patch \
+           file://makefile-add-ldflags.patch \
+           file://${BPN}.conf \
+           file://${BPN}.init \
+           file://${BPN}.service \
+           file://volatiles.99_vblade \
+          "
+
+SRC_URI[md5sum] = "510d98ba0f231284a5fbe2da11cb2d6e"
+SRC_URI[sha256sum] = "a990378f273f10eb431e42954a871aed52714035bbab28c54cef600c458356bb"
+
+inherit autotools-brokensep update-rc.d systemd
+
+do_install() {
+    install -D -m 0755 ${S}/vblade ${D}/${sbindir}/vblade
+    install -D -m 0755 ${S}/vbladed ${D}/${sbindir}/vbladed
+    install -D -m 0644 ${S}/vblade.8 ${D}/${mandir}/man8/vblade.8
+
+    install -D -m 0644 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}.conf
+    install -D -m 0755 ${WORKDIR}/${BPN}.init ${D}/${sysconfdir}/init.d/${BPN}
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+        install -d ${D}/${sysconfdir}/default/volatiles
+        install -m 0755 ${WORKDIR}/volatiles.99_vblade ${D}/${sysconfdir}/default/volatiles/99_vblade
+    fi
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}/${bindir}
+        install -m 0755 ${WORKDIR}/${BPN}.init ${D}/${bindir}/
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d /var/run/${BPN} 0755 root root -" > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${WORKDIR}/vblade.service ${D}${systemd_system_unitdir}
+        sed -e 's,@BINDIR@,${bindir},g' -i ${D}${systemd_system_unitdir}/*.service
+    fi
+
+}
+
+INITSCRIPT_NAME = "vblade"
+INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "vblade.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
index e524614..7a20356 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
@@ -37,6 +37,7 @@
 DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-listfile', '', d)}"
 PAMLIB = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -lpam', '', d)}"
+WRAPLIB = "${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '-lwrap', '', d)}"
 NOPAM_SRC ="${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}"
 
 inherit update-rc.d useradd systemd
@@ -54,7 +55,7 @@
 }
 
 do_compile() {
-   oe_runmake "LIBS=-L${STAGING_LIBDIR} -lcrypt -lcap ${PAMLIB} -lwrap"
+   oe_runmake "LIBS=-L${STAGING_LIBDIR} -lcrypt -lcap ${PAMLIB} ${WRAPLIB}"
 }
 
 do_install() {
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
similarity index 100%
rename from import-layers/meta-openembedded/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest
rename to import-layers/meta-openembedded/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch b/import-layers/meta-openembedded/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libauthen/libauthen-radius-perl_0.22.bb b/import-layers/meta-openembedded/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl_0.22.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-perl/recipes-perl/libauthen/libauthen-radius-perl_0.22.bb
rename to import-layers/meta-openembedded/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl_0.22.bb
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-devtools/python/python-ldap_2.4.41.bb b/import-layers/meta-openembedded/meta-networking/recipes-devtools/python/python-ldap_2.4.41.bb
new file mode 100644
index 0000000..3dbc8b1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-devtools/python/python-ldap_2.4.41.bb
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2012 Wind River Systems, Inc.
+#
+SUMMARY = "Provides a wrapper in Python to LDAP"
+DESCRIPTION = "This module provides access to the LDAP \
+(Lightweight Directory Access Protocol) through Python operations \
+instead of C API. The module mainly acts as a wrapper for the \
+OpenLDAP 2.x libraries. Errors will appear as exceptions."
+
+LICENSE = "PSF"
+HOMEPAGE = "http://www.python-ldap.org/"
+DEPENDS = "python openldap cyrus-sasl"
+
+PYPI_PACKAGE = "python-ldap"
+inherit pypi setuptools
+
+LIC_FILES_CHKSUM = "file://LICENCE;md5=a41c82edffa04912007cae1d20cac555"
+SRC_URI[md5sum] = "18db2d009150ec1864710fea3ed76173"
+SRC_URI[sha256sum] = "6d430ecf040f2fc704ee316d3390cb1f5419c191371e1e131baef54a0e42cef0"
+
+do_configure_prepend() {
+    sed -i -e 's:^library_dirs =.*::' setup.cfg
+    sed -i -e 's:^include_dirs =.*:include_dirs = =/usr/include/sasl/:' setup.cfg
+}
+
+RDEPENDS_${PN} = " \
+    ${PYTHON_PN}-pprint \
+    ${PYTHON_PN}-threading \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch b/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb
new file mode 100644
index 0000000..33e74e2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb
@@ -0,0 +1,80 @@
+SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces"
+DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \
+APIs and libraries, default configuration files, and an init script."
+HOMEPAGE = "http://corosync.github.io/corosync/"
+
+SECTION = "base"
+
+inherit autotools pkgconfig systemd useradd
+
+SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz \
+           file://0001-Include-fcntl.h-for-F_-and-O_-defines.patch \
+          "
+SRC_URI[md5sum] = "547fa78704da53aa35912be58d31035f"
+SRC_URI[sha256sum] = "f26e3011309fe4bcce94b1dc20ea8c462f19483a73f3ca62f13b925d011a4ba9"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d"
+
+DEPENDS = "groff-native nss libqb"
+
+SYSTEMD_SERVICE_${PN} = "corosync.service corosync-notifyd.service \
+                         ${@bb.utils.contains('PACKAGECONFIG', 'qdevice', 'corosync-qdevice.service', '', d)} \
+                         ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'corosync-qnetd.service', '', d)} \
+"
+SYSTEMD_AUTO_ENABLE = "enable"
+
+INITSCRIPT_NAME = "corosync-daemon"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+                   dbus qdevice qnetd snmp \
+"
+
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[qdevice] = "--enable-qdevices,--disable-qdevices"
+PACKAGECONFIG[qnetd] = "--enable-qnetd,--disable-qnetd"
+PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
+PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd"
+
+EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash"
+EXTRA_OEMAKE = "tmpfilesdir_DATA="
+
+do_configure_prepend() {
+    ( cd ${S}
+    ${S}/autogen.sh )
+}
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/sysconfig/
+    install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync
+    install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd
+
+    rm -rf "${D}${localstatedir}/run"
+
+    install -d ${D}${sysconfdir}/default/volatiles
+    echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync
+
+    if ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'true', 'false', d)}; then
+        chown -R coroqnetd:coroqnetd ${D}${sysconfdir}/${BPN}/qnetd
+        echo "d coroqnetd coroqnetd 0770 /var/run/corosync-qnetd none" >> ${D}${sysconfdir}/default/volatiles/05_corosync
+    fi
+
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf
+
+        if ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'true', 'false', d)}; then
+            install -m 0644 ${S}/conf/tmpfiles.d/corosync-qnetd.conf ${D}${sysconfdir}/tmpfiles.d
+        fi
+    fi
+}
+
+RDEPENDS_${PN} += "bash"
+
+FILES_${PN}-dbg += "${libexecdir}/lcrso/.debug"
+FILES_${PN}-doc += "${datadir}/snmp/mibs/COROSYNC-MIB.txt"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system coroqnetd"
+USERADD_PARAM_${PN} = "--system -d / -M -s /bin/nologin -c 'User for corosync-qnetd' -g coroqnetd coroqnetd"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/dlm/dlm/respect-ldflags-also-from-bin_ldflags.patch b/import-layers/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/respect-ldflags-also-from-bin_ldflags.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/dlm/dlm/respect-ldflags-also-from-bin_ldflags.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/respect-ldflags-also-from-bin_ldflags.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/dlm/dlm_4.0.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.0.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/dlm/dlm_4.0.2.bb
rename to import-layers/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.0.2.bb
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/0001-kernel-event-netlink_ack-now-requires-4-arguments.patch b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/0001-kernel-event-netlink_ack-now-requires-4-arguments.patch
new file mode 100644
index 0000000..4426d35
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/0001-kernel-event-netlink_ack-now-requires-4-arguments.patch
@@ -0,0 +1,40 @@
+From cbc5f8151017f45231b75a826f18354a81c287c4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 07:52:59 -0700
+Subject: [PATCH] kernel/event: netlink_ack() now requires 4 arguments
+
+see https://patchwork.kernel.org/patch/9670181/
+
+event.c:32:4: error: too few arguments to function 'netlink_ack'
+|     netlink_ack(skb, nlh, 0);
+|     ^~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ kernel/event.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: iscsitarget-1.4.20.3+svn502/kernel/event.c
+===================================================================
+--- iscsitarget-1.4.20.3+svn502.orig/kernel/event.c
++++ iscsitarget-1.4.20.3+svn502/kernel/event.c
+@@ -6,6 +6,7 @@
+  * Some functions are based on audit code.
+  */
+ 
++#include <linux/version.h>
+ #include <linux/module.h>
+ #include <net/tcp.h>
+ #include "iet_u.h"
+@@ -29,7 +30,11 @@ static void event_recv_skb(struct sk_buf
+ 		ietd_pid = NETLINK_CB(skb).portid;
+ 		WARN_ON(ietd_pid == 0);
+ 		if (nlh->nlmsg_flags & NLM_F_ACK)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++			netlink_ack(skb, nlh, 0, NULL);
++#else
+ 			netlink_ack(skb, nlh, 0);
++#endif
+ 		skb_pull(skb, rlen);
+ 	}
+ }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
index 5c1e38e..6593661 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
@@ -14,7 +14,9 @@
            file://access-sk_v6_daddr-iff-IPV6-defined.patch \
            file://build_with_updated_bio_struct_of_linux_v4.3_and_above.patch \
            file://build_with_updated_interfaces_of_linux_v4.8_and_above.patch \
-           file://fix-call-trace-of-ahash-API-calling.patch"
+           file://fix-call-trace-of-ahash-API-calling.patch \
+           file://0001-kernel-event-netlink_ack-now-requires-4-arguments.patch \
+           "
 
 SRC_URI[md5sum] = "ef9bc823bbabd3c772208c00d5f2d089"
 SRC_URI[sha256sum] = "d3196ccb78a43266dce28587bfe30d8ab4db7566d7bce96057dfbb84100babb5"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables-save b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables-save
new file mode 100755
index 0000000..2d7fc4e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables-save
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+EBTABLES="/sbin/ebtables"
+
+[ -x "$EBTABLES" ] || exit 1
+
+echo "# Generated by ebtables-save v1.0 on $(date)"
+
+cnt=""
+[ "x$EBTABLES_SAVE_COUNTER" = "xyes" ] && cnt="--Lc"
+
+for table_name in $(grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//); do
+    table=$($EBTABLES -t $table_name -L $cnt)
+    [ $? -eq 0 ] || { echo "$table"; exit -1; }
+
+    chain=""
+    rules=""
+    while read line; do
+	[ -z "$line" ] && continue
+
+	case "$line" in 
+	    Bridge\ table:\ *)
+		echo "*${line:14}"
+		;;
+	    Bridge\ chain:\ *)
+		chain="${line:14}"
+		chain="${chain%%,*}"
+		policy="${line##*policy: }"
+		echo ":$chain $policy"
+		;;
+	    *)
+		if [ "$cnt" = "--Lc" ]; then
+		    line=${line/, pcnt \=/ -c}
+		    line=${line/-- bcnt \=/}
+		fi
+		rules="$rules-A $chain $line\n"
+		;;
+	esac
+    done <<EOF
+$table
+EOF
+    echo -e $rules
+done
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
index 375423d..d5e7341 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
@@ -1,17 +1,19 @@
 SUMMARY = "Filtering tool for a Linux-based bridging firewall"
+HOMEPAGE = "http://sourceforge.net/projects/ebtables/"
 DESCRIPTION = "Utility for basic Ethernet frame filtering on a Linux bridge, \
                advanced logging, MAC DNAT/SNAT and brouting."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=53b4a999993871a28ab1488fdbd2e73e"
 SECTION = "net"
-PR = "r3"
+PR = "r4"
 
-RDEPENDS_${PN} += "perl"
+RDEPENDS_${PN} += "bash"
 
 RRECOMMENDS_${PN} += "kernel-module-ebtables \
     "
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/ebtables/ebtables-v${PV}.tar.gz \
+           file://ebtables-save \
            file://installnonroot.patch \
            file://01debian_defaultconfig.patch \
            file://ebtables.init \
@@ -78,12 +80,10 @@
     mv ${D}${sysconfdir}/default/ebtables-config ${D}${sysconfdir}/default/ebtables
     sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ebtables
 
-    # The script ebtables-save refernces perl in exec_prefix, so
-    # move it to sbindir to avoid QA issue
-    if ${base_sbindir} != ${sbindir} ; then
-       install -d ${D}/${sbindir}
-       mv ${D}/${base_sbindir}/ebtables-save ${D}/${sbindir}
-    fi
+    # Replace upstream ebtables-save perl script with Fedora bash based rewrite
+    # http://pkgs.fedoraproject.org/cgit/rpms/ebtables.git/tree/ebtables-save
+    install -m 0755 ${WORKDIR}/ebtables-save ${D}${base_sbindir}/ebtables-save
+    sed -i 's!/sbin/!${base_sbindir}/!g' ${D}${base_sbindir}/ebtables-save
 
     # Install systemd service files
     install -d ${D}${systemd_unitdir}/system
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl/snprintf_shadow.patch b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl/snprintf_shadow.patch
deleted file mode 100644
index 0453b1b..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl/snprintf_shadow.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-Taken from 
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755956
-
---- ./src/expr_ops.h	2014-06-24 17:07:05.574784704 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr_ops.h	2014-07-25 00:19:28.367694613 +0400
-@@ -28,7 +28,7 @@
- 	const void *(*get)(const struct nft_rule_expr *e, uint16_t type, uint32_t *data_len);
- 	int 	(*parse)(struct nft_rule_expr *e, struct nlattr *attr);
- 	void	(*build)(struct nlmsghdr *nlh, struct nft_rule_expr *e);
--	int	(*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, struct nft_rule_expr *e);
-+    int	(*snprintf_)(char *buf, size_t len, uint32_t type, uint32_t flags, struct nft_rule_expr *e);
- 	int	(*xml_parse)(struct nft_rule_expr *e, mxml_node_t *tree,
- 			     struct nft_parse_err *err);
- 	int	(*json_parse)(struct nft_rule_expr *e, json_t *data,
---- ./src/rule.c	2014-06-24 17:07:05.574784704 +0400
-+++ ../libnftnl-1.0.2-my/./src/rule.c	2014-07-25 00:19:28.355694880 +0400
-@@ -813,7 +813,7 @@
- 			       "{\"type\":\"%s\",", expr->ops->name);
- 		SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
- 
--		ret = expr->ops->snprintf(buf+offset, len, type, flags, expr);
-+        ret = expr->ops->snprintf_(buf+offset, len, type, flags, expr);
- 		SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
- 
- 		/*
---- ./src/expr.c	2014-06-24 17:07:05.574784704 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr.c	2014-07-25 00:19:27.367716863 +0400
-@@ -227,7 +227,7 @@
- 	int ret;
- 	unsigned int offset = 0, len = size;
- 
--	ret = expr->ops->snprintf(buf+offset, len, type, flags, expr);
-+	ret = expr->ops->snprintf_(buf+offset, len, type, flags, expr);
- 	SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
- 
- 	return offset;
---- ./src/expr/exthdr.c	2014-06-25 18:34:08.174284719 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/exthdr.c	2014-07-25 00:21:48.192583628 +0400
-@@ -362,7 +362,7 @@
- 	.get		= nft_rule_expr_exthdr_get,
- 	.parse		= nft_rule_expr_exthdr_parse,
- 	.build		= nft_rule_expr_exthdr_build,
--	.snprintf	= nft_rule_expr_exthdr_snprintf,
-+	.snprintf_	= nft_rule_expr_exthdr_snprintf,
- 	.xml_parse	= nft_rule_expr_exthdr_xml_parse,
- 	.json_parse	= nft_rule_expr_exthdr_json_parse,
- };
---- ./src/expr/log.c	2014-06-25 18:34:08.178284810 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/log.c	2014-07-25 00:21:48.160584340 +0400
-@@ -332,7 +332,7 @@
- 	.get		= nft_rule_expr_log_get,
- 	.parse		= nft_rule_expr_log_parse,
- 	.build		= nft_rule_expr_log_build,
--	.snprintf	= nft_rule_expr_log_snprintf,
-+	.snprintf_	= nft_rule_expr_log_snprintf,
- 	.xml_parse	= nft_rule_expr_log_xml_parse,
- 	.json_parse	= nft_rule_expr_log_json_parse,
- };
---- ./src/expr/limit.c	2014-06-25 18:34:08.178284810 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/limit.c	2014-07-25 00:21:48.108585496 +0400
-@@ -250,7 +250,7 @@
- 	.get		= nft_rule_expr_limit_get,
- 	.parse		= nft_rule_expr_limit_parse,
- 	.build		= nft_rule_expr_limit_build,
--	.snprintf	= nft_rule_expr_limit_snprintf,
-+	.snprintf_	= nft_rule_expr_limit_snprintf,
- 	.xml_parse	= nft_rule_expr_limit_xml_parse,
- 	.json_parse	= nft_rule_expr_limit_json_parse,
- };
---- ./src/expr/cmp.c	2014-06-25 18:34:08.174284719 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/cmp.c	2014-07-25 00:21:48.172584073 +0400
-@@ -331,7 +331,7 @@
- 	.get		= nft_rule_expr_cmp_get,
- 	.parse		= nft_rule_expr_cmp_parse,
- 	.build		= nft_rule_expr_cmp_build,
--	.snprintf	= nft_rule_expr_cmp_snprintf,
-+	.snprintf_	= nft_rule_expr_cmp_snprintf,
- 	.xml_parse	= nft_rule_expr_cmp_xml_parse,
- 	.json_parse	= nft_rule_expr_cmp_json_parse,
- };
---- ./src/expr/target.c	2014-06-25 18:34:08.182284901 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/target.c	2014-07-25 00:21:48.184583806 +0400
-@@ -274,7 +274,7 @@
- 	.get		= nft_rule_expr_target_get,
- 	.parse		= nft_rule_expr_target_parse,
- 	.build		= nft_rule_expr_target_build,
--	.snprintf	= nft_rule_expr_target_snprintf,
-+	.snprintf_	= nft_rule_expr_target_snprintf,
- 	.xml_parse	= nft_rule_expr_target_xml_parse,
- 	.json_parse	= nft_rule_expr_target_json_parse,
- };
---- ./src/expr/byteorder.c	2014-06-25 18:34:08.158284356 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/byteorder.c	2014-07-25 00:21:48.148584607 +0400
-@@ -384,7 +384,7 @@
- 	.get		= nft_rule_expr_byteorder_get,
- 	.parse		= nft_rule_expr_byteorder_parse,
- 	.build		= nft_rule_expr_byteorder_build,
--	.snprintf	= nft_rule_expr_byteorder_snprintf,
-+	.snprintf_	= nft_rule_expr_byteorder_snprintf,
- 	.xml_parse	= nft_rule_expr_byteorder_xml_parse,
- 	.json_parse	= nft_rule_expr_byteorder_json_parse,
- };
---- ./src/expr/lookup.c	2014-06-25 18:34:08.178284810 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/lookup.c	2014-07-25 00:21:48.136584874 +0400
-@@ -305,7 +305,7 @@
- 	.get		= nft_rule_expr_lookup_get,
- 	.parse		= nft_rule_expr_lookup_parse,
- 	.build		= nft_rule_expr_lookup_build,
--	.snprintf	= nft_rule_expr_lookup_snprintf,
-+	.snprintf_	= nft_rule_expr_lookup_snprintf,
- 	.xml_parse	= nft_rule_expr_lookup_xml_parse,
- 	.json_parse	= nft_rule_expr_lookup_json_parse,
- };
---- ./src/expr/immediate.c	2014-06-25 18:34:08.178284810 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/immediate.c	2014-07-25 00:21:48.124585141 +0400
-@@ -365,7 +365,7 @@
- 	.get		= nft_rule_expr_immediate_get,
- 	.parse		= nft_rule_expr_immediate_parse,
- 	.build		= nft_rule_expr_immediate_build,
--	.snprintf	= nft_rule_expr_immediate_snprintf,
-+	.snprintf_	= nft_rule_expr_immediate_snprintf,
- 	.xml_parse	= nft_rule_expr_immediate_xml_parse,
- 	.json_parse	= nft_rule_expr_immediate_json_parse,
- };
---- ./src/expr/meta.c	2014-06-25 18:34:08.178284810 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/meta.c	2014-07-25 00:21:48.040587008 +0400
-@@ -340,7 +340,7 @@
- 	.get		= nft_rule_expr_meta_get,
- 	.parse		= nft_rule_expr_meta_parse,
- 	.build		= nft_rule_expr_meta_build,
--	.snprintf	= nft_rule_expr_meta_snprintf,
-+	.snprintf_	= nft_rule_expr_meta_snprintf,
- 	.xml_parse 	= nft_rule_expr_meta_xml_parse,
- 	.json_parse 	= nft_rule_expr_meta_json_parse,
- };
---- ./src/expr/queue.c	2014-06-25 18:34:08.182284901 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/queue.c	2014-07-25 00:21:48.208583272 +0400
-@@ -294,7 +294,7 @@
- 	.get		= nft_rule_expr_queue_get,
- 	.parse		= nft_rule_expr_queue_parse,
- 	.build		= nft_rule_expr_queue_build,
--	.snprintf	= nft_rule_expr_queue_snprintf,
-+	.snprintf_	= nft_rule_expr_queue_snprintf,
- 	.xml_parse	= nft_rule_expr_queue_xml_parse,
- 	.json_parse	= nft_rule_expr_queue_json_parse,
- };
---- ./src/expr/nat.c	2014-06-25 18:34:08.182284901 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/nat.c	2014-07-25 00:21:48.084586030 +0400
-@@ -430,7 +430,7 @@
- 	.get		= nft_rule_expr_nat_get,
- 	.parse		= nft_rule_expr_nat_parse,
- 	.build		= nft_rule_expr_nat_build,
--	.snprintf	= nft_rule_expr_nat_snprintf,
-+	.snprintf_	= nft_rule_expr_nat_snprintf,
- 	.xml_parse	= nft_rule_expr_nat_xml_parse,
- 	.json_parse	= nft_rule_expr_nat_json_parse,
- };
---- ./src/expr/payload.c	2014-06-25 18:34:08.182284901 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/payload.c	2014-07-25 00:21:48.200583450 +0400
-@@ -337,7 +337,7 @@
- 	.get		= nft_rule_expr_payload_get,
- 	.parse		= nft_rule_expr_payload_parse,
- 	.build		= nft_rule_expr_payload_build,
--	.snprintf	= nft_rule_expr_payload_snprintf,
-+	.snprintf_	= nft_rule_expr_payload_snprintf,
- 	.xml_parse	= nft_rule_expr_payload_xml_parse,
- 	.json_parse	= nft_rule_expr_payload_json_parse,
- };
---- ./src/expr/reject.c	2014-06-25 18:34:08.182284901 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/reject.c	2014-07-25 00:21:48.096585762 +0400
-@@ -242,7 +242,7 @@
- 	.get		= nft_rule_expr_reject_get,
- 	.parse		= nft_rule_expr_reject_parse,
- 	.build		= nft_rule_expr_reject_build,
--	.snprintf	= nft_rule_expr_reject_snprintf,
-+	.snprintf_	= nft_rule_expr_reject_snprintf,
- 	.xml_parse	= nft_rule_expr_reject_xml_parse,
- 	.json_parse	= nft_rule_expr_reject_json_parse,
- };
---- ./src/expr/counter.c	2014-06-25 18:34:08.174284719 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/counter.c	2014-07-25 00:21:48.056586652 +0400
-@@ -236,7 +236,7 @@
- 	.get		= nft_rule_expr_counter_get,
- 	.parse		= nft_rule_expr_counter_parse,
- 	.build		= nft_rule_expr_counter_build,
--	.snprintf	= nft_rule_expr_counter_snprintf,
-+	.snprintf_	= nft_rule_expr_counter_snprintf,
- 	.xml_parse	= nft_rule_expr_counter_xml_parse,
- 	.json_parse	= nft_rule_expr_counter_json_parse,
- };
---- ./src/expr/ct.c	2014-06-25 18:34:08.174284719 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/ct.c	2014-07-25 00:21:48.068586385 +0400
-@@ -428,7 +428,7 @@
- 	.get		= nft_rule_expr_ct_get,
- 	.parse		= nft_rule_expr_ct_parse,
- 	.build		= nft_rule_expr_ct_build,
--	.snprintf	= nft_rule_expr_ct_snprintf,
-+	.snprintf_	= nft_rule_expr_ct_snprintf,
- 	.xml_parse	= nft_rule_expr_ct_xml_parse,
- 	.json_parse	= nft_rule_expr_ct_json_parse,
- };
---- ./src/expr/bitwise.c	2014-06-25 18:34:08.158284356 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/bitwise.c	2014-07-25 00:21:49.272559599 +0400
-@@ -403,7 +403,7 @@
- 	.get		= nft_rule_expr_bitwise_get,
- 	.parse		= nft_rule_expr_bitwise_parse,
- 	.build		= nft_rule_expr_bitwise_build,
--	.snprintf	= nft_rule_expr_bitwise_snprintf,
-+    .snprintf_	= nft_rule_expr_bitwise_snprintf,
- 	.xml_parse	= nft_rule_expr_bitwise_xml_parse,
- 	.json_parse	= nft_rule_expr_bitwise_json_parse,
- };
---- ./src/expr/match.c	2014-06-25 18:34:08.178284810 +0400
-+++ ../libnftnl-1.0.2-my/./src/expr/match.c	2014-07-25 00:21:48.032587186 +0400
-@@ -273,7 +273,7 @@
- 	.get		= nft_rule_expr_match_get,
- 	.parse		= nft_rule_expr_match_parse,
- 	.build		= nft_rule_expr_match_build,
--	.snprintf	= nft_rule_expr_match_snprintf,
-+	.snprintf_	= nft_rule_expr_match_snprintf,
- 	.xml_parse 	= nft_rule_expr_match_xml_parse,
- 	.json_parse 	= nft_rule_expr_match_json_parse,
- };
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/0001-testmmap-fix-compile-issue-with-gcc-5.x.patch b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/0001-testmmap-fix-compile-issue-with-gcc-5.x.patch
deleted file mode 100644
index ea36b1c..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/0001-testmmap-fix-compile-issue-with-gcc-5.x.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Pending
-
-From c81bf54d6eb870286662a11d3b4a994717c47696 Mon Sep 17 00:00:00 2001
-From: Armin Kuster <akuster808@gmail.com>
-Date: Tue, 8 Sep 2015 05:36:27 -0700
-Subject: [PATCH] testmmap: fix compile issue with gcc 5.x
-
-this fixes:
-examples/testmmap.c:540:10: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka const int}' [-Werror=format=]
-|    printf("ring_ofs[%d] %ld\n", i, nifp->ring_ofs[i]);
-|           ^
-
-Signed-off-by: Armin Kuster <akuster808@gmail.com>
----
- examples/testmmap.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/examples/testmmap.c b/examples/testmmap.c
-index d7f6acc..934489a 100644
---- a/examples/testmmap.c
-+++ b/examples/testmmap.c
-@@ -537,7 +537,7 @@ do_if()
- 	for (i = 0; i < 5; i++)
- 		printf("spare1[%d]  %u\n", i, nifp->ni_spare1[i]);
- 	for (i = 0; i < (nifp->ni_tx_rings + nifp->ni_rx_rings + 2); i++)
--		printf("ring_ofs[%d] %ld\n", i, nifp->ring_ofs[i]);
-+		printf("ring_ofs[%d] %zd\n", i, nifp->ring_ofs[i]);
- }
- 
- struct netmap_ring *
--- 
-2.3.5
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch
deleted file mode 100644
index b050bf0..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-The makefile assumes building locally.
-
-Upstream Status: Inappropriate [Native]
-
-The configure is not auto-make based
-
-Signed-of-by: Armin Kuster <akuster@mvista.com>
-
-Index: LINUX/netmap.mak.in
-===================================================================
---- a/LINUX/netmap.mak.in
-+++ b/LINUX/netmap.mak.in
-@@ -12,10 +12,9 @@ SRCDIR:=@SRCDIR@
- # The following commands are needed to build the modules as out-of-tree,
- # in fact the kernel sources path must be specified.
- 
--PWD ?= $(CURDIR)
- 
- # Additional compile flags (e.g. header location)
--EXTRA_CFLAGS := -I$(PWD) -I$(SRCDIR) -I$(SRCDIR)/../sys -I$(SRCDIR)/../sys/dev -DCONFIG_NETMAP
-+EXTRA_CFLAGS := -I$(SRCDIR) -I$(SRCDIR)/../sys -I$(SRCDIR)/../sys/dev -DCONFIG_NETMAP
- EXTRA_CFLAGS += -Wno-unused-but-set-variable
- EXTRA_CFLAGS += $(foreach s,$(SUBSYS),-DCONFIG_NETMAP_$(shell echo $s|tr a-z- A-Z_))
- 
-Index: LINUX/configure
-===================================================================
---- a/LINUX/configure
-+++ b/LINUX/configure
-@@ -349,52 +349,6 @@ reset_tests() {
- 	EOF
- }
- 
--# run_tests: run all accumulated tests and exec the pertinent
--#   success/failure actions for each one.
--run_tests() {
--	local t= 	# prevent -EOF to eat the make TAB
--	cat > $TMPDIR/Makefile <<-EOF
--		ifneq (\$(KERNELRELEASE),)
--		obj-m := $TESTOBJS
--		else
--		S_DRIVERS := $(drv print)
--		all: \$(S_DRIVERS:%=get-%)
--		$t	\$(MAKE) -C $ksrc M=\$\$PWD $kopts
--
--		-include $TOPDIR/drivers.mak
--	EOF
--	for d in $(drv print); do
--		cat >> $TMPDIR/Makefile <<-EOF
--			get-$d:
--			$t	[ -z "\$($d-src)" ] || cp -Rp \$($d-src) \$(if \$($d-dst),\$($d-dst),.)
--			$t	touch get-$d
--		EOF
--	done
--	echo endif >> $TMPDIR/Makefile
--	{
--		cat <<-EOF
--##############################################################################
--## BEGIN RUNNING TESTS: $(date)
--##############################################################################
--## Makefile:
--		EOF
--		cat $TMPDIR/Makefile
--		cat <<-EOF
--##############################################################################
--		EOF
--	} >> config.log
--	(
--		cd $TMPDIR
--		make -k -j $(grep -c processor /proc/cpuinfo)
--	) >> config.log
--	eval "$TESTPOSTPROC"
--	cat >> config.log <<-EOF
--##############################################################################
--## END RUNNING TESTS: $(date)
--##############################################################################
--	EOF
--}
--
- configh=netmap_linux_config.h
- # succes/failure actions are expected to write some macros
- # in netma_linux_config.h. The following functions can be
-@@ -619,7 +573,6 @@ configuration. Please check 'config.log'
- reset_tests
- rm -f drivers.mak
- add_test true broken_buildsystem < /dev/null
--run_tests
- 
- drvname2config() {
- 	local name=$1
-@@ -1280,7 +1233,6 @@ cat > $configh <<-EOF
- EOF
- 
- # the TESTPOSTPROC script will add macros to $configh
--run_tests
- 
- define DRIVER_SUFFIX \"$drvsuffix\"
- 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
deleted file mode 100644
index 192ece0..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
+++ /dev/null
@@ -1,92 +0,0 @@
-require netmap.inc
-
-DEPENDS = "virtual/kernel"
-do_configure[depends] += "virtual/kernel:do_shared_workdir"
-
-inherit module
-
-CLEANBROKEN = "1"
-
-export INSTALL_MOD_DIR="kernel/netmap-modules"
-
-EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \
-                --kernel-sources=${STAGING_KERNEL_DIR} \
-                --install-mod-path=${D} \
-                --driver-suffix="-netmap" \
-                "
-
-# The driver builds are optional, but for deterministic builds,
-# we should be able to explicitly enable/disable the builds
-# for them in a proper place (maybe in BSP).
-# But we can't use PACKAGECONFIG since there is no option for
-# each driver, and the options are:
-#  --no-drivers    do not compile any driver
-#  --no-drivers=   do not compile the given drivers (comma sep.)
-#  --drivers=      only compile the given drivers (comma sep.)
-#
-# So use NETMAP_DRIVERS and the following python code to add proper
-# configs to EXTRA_OECONF.
-#
-# The default is no-drivers, and all supported drivers are listed
-# in NETMAP_ALL_DRIVERS.
-NETMAP_DRIVERS ??= ""
-NETMAP_ALL_DRIVERS = "ixgbe igb e1000e e1000 veth.c forcedeth.c virtio_net.c r8169.c"
-
-python __anonymous () {
-    drivers_list = d.getVar("NETMAP_DRIVERS").split()
-    all_drivers_list = d.getVar("NETMAP_ALL_DRIVERS").split()
-    config_drivers = "--drivers=" + ",".join(drivers_list)
-
-    extra_oeconf_drivers = bb.utils.contains_any('NETMAP_DRIVERS', all_drivers_list, config_drivers, '--no-drivers', d)
-    d.appendVar("EXTRA_OECONF", extra_oeconf_drivers)
-}
-
-LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,-O1', '')}"
-LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,--as-needed', '')}"
-
-do_configure () {
-    cd ${S}/LINUX
-    ./configure ${EXTRA_OECONF}
-}
-
-do_configure_append () {
-    cat >>  ${S}/LINUX/netmap_linux_config.h <<EOF
-#define NETMAP_LINUX_HAVE_HRTIMER_MODE_REL
-#define NETMAP_LINUX_HAVE_HRTIMER_FORWARD_NOW
-#define NETMAP_LINUX_HAVE_PHYS_ADDR_T
-#define NETMAP_LINUX_HAVE_ACCESS_ONCE
-#define NETMAP_LINUX_HAVE_NETDEV_OPS
-#define NETMAP_LINUX_HAVE_INIT_NET
-#define NETMAP_LINUX_HAVE_LIVE_ADDR_CHANGE
-#define NETMAP_LINUX_HAVE_TX_SKB_SHARING
-#define NETMAP_LINUX_HAVE_UNLOCKED_IOCTL
-#define NETMAP_LINUX_HAVE_PERNET_OPS_ID
-#define NETMAP_LINUX_VIRTIO_FUNCTIONS
-#define NETMAP_LINUX_VIRTIO_FREE_PAGES
-#define NETMAP_LINUX_VIRTIO_GET_VRSIZE
-#define NETMAP_LINUX_TIMER_RTYPE enum hrtimer_restart
-#define NETMAP_LINUX_VIRTIO_MULTI_QUEUE
-#define NETMAP_LINUX_HAVE_E1000E_EXT_RXDESC
-#define NETMAP_LINUX_HAVE_E1000E_DOWN2
-EOF
-
-if ${@ 'false' if (bb.utils.vercmp_string(d.getVar('KERNEL_VERSION') or "0", '3.17') < 0) else 'true' } ; then
-    echo OK
-    cat >>  ${S}/LINUX/netmap_linux_config.h <<EOF
-#define NETMAP_LINUX_ALLOC_NETDEV_4ARGS
-EOF
-fi
-}
-
-do_compile () {
-    cd ${S}/LINUX
-    oe_runmake
-}
-
-do_install () {
-    cd ${S}/LINUX
-    oe_runmake install
-}
-
-# http://errors.yoctoproject.org/Errors/Details/83335/
-PNBLACKLIST[netmap-modules] ?= "BROKEN: not compatible with default kernel version 4.8 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap.inc b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap.inc
deleted file mode 100644
index ab33e76..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "netmap and VALE - very fast packet I/O from userspace (FreeBSD/Linux)"
-DESCRIPTION= "NETMAP is a framework for very fast packet I/O from userspace.  VALE is an equally fast in-kernel software switch using the netmap API.  Both are implemented as a single kernel module for FreeBSD and Linux, and can deal with line rate on real or emulated 10 Gbit ports."
-SECTION = "networking"
-HOMEPAGE = "http://code.google.com/p/netmap/"
-LICENSE = "GPLv2+"
-
-LIC_FILES_CHKSUM = "file://README;beginline=13;endline=14;md5=56ae0b9c7ba0476ab9098de94c2714d6"
-
-SRCREV = "da9e19e69b84e4f6f8ae125f8d01b42a4abade6a"
-PV = "master+git${SRCPV}"
-
-SRC_URI = "git://github.com/luigirizzo/netmap.git"
-SRC_URI += "file://makefile_fixup.patch"
-
-S = "${WORKDIR}/git"
-
-COMPATIBLE_HOST = '(x86_64|i.86|mips|arm).*-linux'
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap_git.bb
deleted file mode 100644
index 2d8509c..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap_git.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-require netmap.inc
-
-DEPENDS = "netmap-modules"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \
-                --kernel-sources=${STAGING_KERNEL_DIR} \
-                --no-drivers \
-                --disable-generic \
-                --prefix=${prefix} \
-                --destdir=${D} \
-                --cc='${CC}' \
-                --ld='${LD}' \
-                "
-SRC_URI += "file://0001-testmmap-fix-compile-issue-with-gcc-5.x.patch"
-
-do_configure () {
-    cd ${S}/LINUX
-    ./configure ${EXTRA_OECONF}
-}
-
-do_compile () {
-    cd ${S}/LINUX
-    make apps
-}
-
-do_install () {
-    cd ${S}/LINUX
-    make install-apps DESTDIR=${D}
-}
-
-FILES_${PN} += "${bindir}"
-RDEPENDS_${PN} = "kernel-module-netmap"
-RRECOMMENDS_${PN} = "kernel-module-netmap"
-
-# http://errors.yoctoproject.org/Errors/Details/69733/
-PNBLACKLIST[netmap] ?= "BROKEN: Tries to build kernel module and fails, either it should be disabled or there should be dependency on kernel like in netmap-modules - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170421.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170810.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170421.bb
rename to import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170810.bb
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170421.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170421.bb
deleted file mode 100644
index 79d420f..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170421.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-require wireguard.inc
-
-inherit bash-completion systemd pkgconfig
-
-DEPENDS = "wireguard-module libmnl"
-
-do_compile_prepend () {
-    cd ${S}/tools
-}
-
-do_install () {
-    cd ${S}/tools
-    oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
-        SYSTEMDUNITDIR="${systemd_unitdir}" \
-        WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
-        WITH_BASHCOMPLETION=yes \
-        WITH_WGQUICK=yes \
-        install
-}
-
-FILES_${PN} = " \
-    ${sysconfdir} \
-    ${systemd_unitdir} \
-    ${bindir} \
-"
-
-RDEPENDS_${PN} = "wireguard-module"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170810.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170810.bb
new file mode 100644
index 0000000..c4ddbcb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170810.bb
@@ -0,0 +1,27 @@
+require wireguard.inc
+
+inherit bash-completion systemd pkgconfig
+
+DEPENDS = "wireguard-module libmnl"
+
+do_compile_prepend () {
+    cd ${S}/tools
+}
+
+do_install () {
+    cd ${S}/tools
+    oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
+        SYSTEMDUNITDIR="${systemd_unitdir}" \
+        WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
+        WITH_BASHCOMPLETION=yes \
+        WITH_WGQUICK=yes \
+        install
+}
+
+FILES_${PN} = " \
+    ${sysconfdir} \
+    ${systemd_unitdir} \
+    ${bindir} \
+"
+
+RDEPENDS_${PN} = "wireguard-module bash"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc
index 46a9971..f37d52b 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc
@@ -11,8 +11,7 @@
 LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "8e559f4fd672b15c38a15eb4d88cc84d"
-SRC_URI[sha256sum] = "03c82af774224cd171d000ee4a519b5e474cc6842ac04967773cf77b26750000"
+SRC_URI[md5sum] = "8dd3e080407b8295c25565a847a4ca27"
+SRC_URI[sha256sum] = "ab96230390625aad6f4816fa23aef6e9f7fee130f083d838919129ff12089bf7"
 
 S = "${WORKDIR}/WireGuard-${PV}/src/"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
index d61636e..3990f7b 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
@@ -70,7 +70,7 @@
         install -m 0644 debian/hosts.equiv ${D}/${sysconfdir}
         install -m 0644 ${WORKDIR}/rexec.pam ${D}/${sysconfdir}/pam.d/rexec
         install -m 0644 ${WORKDIR}/rlogin.pam ${D}/${sysconfdir}/pam.d/rlogin
-        install -m 0664 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh
+        install -m 0644 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh
     fi
     cp ${WORKDIR}/rexec.xinetd.netkit  ${D}/${sysconfdir}/xinetd.d/rexec
     cp ${WORKDIR}/rlogin.xinetd.netkit  ${D}/${sysconfdir}/xinetd.d/rlogin
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
index 54a58c8..807b566 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
@@ -1,4 +1,5 @@
 DESCRIPTION = "netkit-telnet includes the telnet daemon and client."
+HOMEPAGE = "http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
 SECTION = "net"
 DEPENDS = "ncurses"
 LICENSE = "BSD"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb
deleted file mode 100644
index 0a86504..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "ACCEL-PPP is a high performance VPN server application for linux"
-HOMEPAGE = "http://sourceforge.net/apps/trac/accel-ppp/wiki"
-SECTION = "net"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-
-DEPENDS = "openssl libpcre"
-
-inherit cmake
-
-PR = "r1"
-PV = "1.7.3+git"
-
-SRCREV = "4acfa46c321a344b9a6ce4128e72d1e02828d8a0"
-SRC_URI = "git://accel-ppp.git.sourceforge.net/gitroot/accel-ppp/accel-ppp;branch=1.7"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECMAKE = " \
-                 -DBUILD_DRIVER=FALSE \
-                 -DCMAKE_INSTALL_PREFIX=${prefix} \
-                 -DCMAKE_BUILD_TYPE=Release \
-                 -DLOG_PGSQL=FALSE \
-                 -DRADIUS=FALSE \
-                 -DNETSNMP=FALSE \
-"
-FILES_${PN}-dbg += "/usr/lib/${BPN}/.debug/*"
-
-PACKAGES =+ "${PN}-libs"
-FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"
-INSANE_SKIP_${PN}-libs = "dev-so"
-RDEPENDS_${PN} += "${PN}-libs"
-
-do_install_prepend() {
-    cmlist=`find ${S} -name CMakeLists.txt`
-    for file in $cmlist; do
-        sed -i -e "s:LIBRARY DESTINATION lib/accel-ppp:LIBRARY DESTINATION ${baselib}/accel-ppp:g" \
-               -e "s:\${CMAKE_INSTALL_PREFIX}/lib/accel-ppp:\${CMAKE_INSTALL_PREFIX}/${baselib}/accel-ppp:g" \
-               $cmlist
-    done
-}
-
-# http://errors.yoctoproject.org/Errors/Details/81003/
-PNBLACKLIST[accel-ppp] ?= "BROKEN: fails to build with new binutils-2.27 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch
new file mode 100644
index 0000000..4ab9d23
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch
@@ -0,0 +1,167 @@
+From 43b6e98c9c37afd0d914949dcff4eab81f5a995f Mon Sep 17 00:00:00 2001
+From: Brendan Le Foll <brendan.le.foll@intel.com>
+Date: Tue, 3 Mar 2015 11:42:57 +0000
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ mDNSPosix/Makefile | 54 +++++++++++++++++++++++++-----------------------------
+ 1 file changed, 25 insertions(+), 29 deletions(-)
+
+diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile
+index 4f98e90..8ac97ad 100755
+--- a/mDNSPosix/Makefile
++++ b/mDNSPosix/Makefile
+@@ -50,6 +50,7 @@
+ 
+ LIBVERS = 1
+ 
++POSIXDIR = ../mDNSPosix
+ COREDIR = ../mDNSCore
+ SHAREDDIR ?= ../mDNSShared
+ JDK = /usr/jdk
+@@ -58,11 +59,11 @@ CC = @cc
+ BISON = @bison
+ FLEX = @flex
+ ST = @strip
+-LD = ld -shared
++LD =@LD
+ CP = cp
+ RM = rm
+ LN = ln -s -f
+-CFLAGS_COMMON = -I$(COREDIR) -I$(SHAREDDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\"
++CFLAGS_COMMON = -I$(POSIXDIR) -I$(COREDIR) -I$(SHAREDDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\"
+ CFLAGS_PTHREAD =
+ LINKOPTS =
+ LINKOPTS_PTHREAD = -lpthread
+@@ -70,7 +71,7 @@ LDSUFFIX = so
+ JAVACFLAGS_OS = -fPIC -shared -ldns_sd
+ 
+ # Set up diverging paths for debug vs. prod builds
+-DEBUG=0
++DEBUG?=1
+ ifeq ($(DEBUG),1)
+ CFLAGS_DEBUG = -g -DMDNS_DEBUGMSGS=2
+ OBJDIR = objects/debug
+@@ -213,7 +214,7 @@ endif
+ endif
+ endif
+ 
+-CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG)
++CFLAGS_BUILD = $(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG)
+ 
+ #############################################################################
+ 
+@@ -249,8 +250,7 @@ Daemon: setup $(BUILDDIR)/mdnsd
+ 	@echo "Responder daemon done"
+ 
+ $(BUILDDIR)/mdnsd: $(DAEMONOBJS)
+-	$(CC) -o $@ $+ $(LINKOPTS)
+-	@$(STRIP) $@
++	$(CC) -o $@ $+
+ 
+ # libdns_sd target builds the client library
+ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
+@@ -259,22 +259,18 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
+ CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o
+ 
+ $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
+-	@$(LD) $(LINKOPTS) -o $@ $+
+-	@$(STRIP) $@
++	$(LD) -shared $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+
+ 
+-Clients: setup libdns_sd ../Clients/build/dns-sd
++Clients: setup libdns_sd
++	@$(MAKE) -C ../Clients DEBUG=${DEBUG}
+ 	@echo "Clients done"
+ 
+-../Clients/build/dns-sd:
+-	@$(MAKE) -C ../Clients
+-
+ # nss_mdns target builds the Name Service Switch module
+ nss_mdns: setup $(BUILDDIR)/$(NSSLIBFILE)
+ 	@echo "Name Service Switch module done"
+ 
+ $(BUILDDIR)/$(NSSLIBFILE): $(CLIENTLIBOBJS) $(OBJDIR)/nss_mdns.c.so.o
+-	@$(LD) $(LINKOPTS) -o $@ $+
+-	@$(STRIP) $@
++	$(LD) -shared $(LINKOPTS) -o $@ $+
+ 
+ #############################################################################
+ 
+@@ -470,55 +466,55 @@ dnsextd: setup $(BUILDDIR)/dnsextd
+ 	@echo "dnsextd done"
+ 
+ $(BUILDDIR)/mDNSClientPosix:         $(APPOBJ)     $(OBJDIR)/Client.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(BUILDDIR)/mDNSResponderPosix:      $(COMMONOBJ)  $(OBJDIR)/Responder.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(BUILDDIR)/mDNSProxyResponderPosix: $(COMMONOBJ)  $(OBJDIR)/ProxyResponder.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(BUILDDIR)/mDNSIdentify:            $(SPECIALOBJ) $(OBJDIR)/Identify.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(OBJDIR)/Identify.c.o:              $(COREDIR)/mDNS.c # Note: Identify.c textually imports mDNS.c
+ 
+ $(BUILDDIR)/mDNSNetMonitor:          $(SPECIALOBJ) $(OBJDIR)/NetMonitor.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(OBJDIR)/NetMonitor.c.o:            $(COREDIR)/mDNS.c # Note: NetMonitor.c textually imports mDNS.c
+ 
+ $(BUILDDIR)/dnsextd:                 $(DNSEXTDOBJ) $(OBJDIR)/dnsextd.c.threadsafe.o
+-	$(CC) $+ -o $@ $(LINKOPTS) $(LINKOPTS_PTHREAD)
++	$(CC) $+ -o $@ $(LINKOPTS_PTHREAD)
+ 
+ #############################################################################
+ 
+ # Implicit rules
+ $(OBJDIR)/%.c.o:	%.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.o:	$(COREDIR)/%.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.o:	$(SHAREDDIR)/%.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.threadsafe.o:	%.c
+-	$(CC) $(CFLAGS) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.threadsafe.o:	$(SHAREDDIR)/%.c
+-	$(CC) $(CFLAGS) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.so.o:	%.c
+-	$(CC) $(CFLAGS) -c -fPIC -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -fPIC -o $@ $<
+ 
+ $(OBJDIR)/%.c.so.o:	$(SHAREDDIR)/%.c
+-	$(CC) $(CFLAGS) -c -fPIC -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -fPIC -o $@ $<
+ 
+ $(OBJDIR)/%.y.o: $(SHAREDDIR)/%.y
+ 	$(BISON)              -o $(OBJDIR)/$*.c -d $<
+-	$(CC) $(CFLAGS) -c -o $@ $(OBJDIR)/$*.c
++	$(CC) $(CFLAGS_BUILD) -c -o $@ $(OBJDIR)/$*.c
+ 
+ $(OBJDIR)/%.l.o: $(SHAREDDIR)/%.l
+ 	$(FLEX) $(FLEXFLAGS_OS) -i             -o$(OBJDIR)/$*.l.c $<
+-	$(CC) $(CFLAGS) -Wno-error -c -o $@ $(OBJDIR)/$*.l.c
++	$(CC) $(CFLAGS_BUILD) -Wno-error -c -o $@ $(OBJDIR)/$*.l.c
+-- 
+2.9.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service
new file mode 100644
index 0000000..531d142
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Zero-configuration networking
+After=network.target
+
+[Service]
+Type=forking
+ExecStartPre=/bin/rm -f /var/run/mdnsd.pid
+ExecStart=/usr/sbin/mdnsd
+ExecReload=/bin/kill -HUP $MAINPID
+PIDFile=/var/run/mdnsd.pid
+Restart=always
+RestartSec=10s
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb
new file mode 100644
index 0000000..1a80f7a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb
@@ -0,0 +1,89 @@
+SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol"
+DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks."
+HOMEPAGE = "http://developer.apple.com/networking/bonjour/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf"
+
+RPROVIDES_${PN} += "libdns_sd.so"
+
+SRC_URI = "http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \
+           file://build.patch;patchdir=.. \
+           file://mdns.service \
+           "
+
+SRC_URI[md5sum] = "4a6bc1628851002634ea3833a4dca317"
+SRC_URI[sha256sum] = "de61dd0034357aa50c60806726fb1f70fa8e953ff9cb62eccfb73efad10dba0a"
+
+PARALLEL_MAKE = ""
+
+S = "${WORKDIR}/mDNSResponder-${PV}/mDNSPosix"
+
+EXTRA_OEMAKE += "os=linux DEBUG=0 'CC=${CC}' 'LD=${CCLD} ${LDFLAGS}'"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_install () {
+    install -d ${D}${sbindir}
+    install -m 0755 build/prod/mdnsd ${D}${sbindir}
+
+    install -d ${D}${libdir}
+    cp build/prod/libdns_sd.so ${D}${libdir}/libdns_sd.so.1
+    chmod 0644 ${D}${libdir}/libdns_sd.so.1
+    ln -s libdns_sd.so.1 ${D}${libdir}/libdns_sd.so
+
+    install -d ${D}${includedir}
+    install -m 0644 ../mDNSShared/dns_sd.h ${D}${includedir}
+
+    install -d ${D}${mandir}/man8
+    install -m 0644 ../mDNSShared/mDNSResponder.8 ${D}${mandir}/man8/mdnsd.8
+
+    install -d ${D}${bindir}
+    install -m 0755 ../Clients/build/dns-sd ${D}${bindir}
+
+    install -d ${D}${libdir}
+    oe_libinstall -C build/prod -so libnss_mdns-0.2 ${D}${libdir}
+    ln -s libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2
+
+    install -d ${D}${sysconfdir}
+    install -m 0644 nss_mdns.conf ${D}${sysconfdir}
+
+    install -d ${D}${mandir}/man5
+    install -m 0644 nss_mdns.conf.5 ${D}${mandir}/man5
+
+    install -d ${D}${mandir}/man8
+    install -m 0644 libnss_mdns.8 ${D}${mandir}/man8
+
+    install -d ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/mdns.service ${D}${systemd_unitdir}/system/
+}
+
+pkg_postinst_${PN} () {
+    sed -e '/^hosts:/s/\s*\<mdns\>//' \
+        -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \
+        -i $D/etc/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+    sed -e '/^hosts:/s/\s*\<mdns\>//' \
+        -e '/^hosts:/s/\s*mdns//' \
+        -i $D/etc/nsswitch.conf
+}
+
+inherit systemd
+
+SYSTEMD_SERVICE_${PN} = "mdns.service"
+
+FILES_${PN} += "${systemd_unitdir}/system/mdns.service"
+FILES_${PN} += "${libdir}/libdns_sd.so.1 \
+                ${bindir}/dns-sd \
+                ${libdir}/libnss_mdns-0.2.so \
+                ${sysconfdir}/nss_mdns.conf"
+
+FILES_${PN}-dev += "${libdir}/libdns_sd.so \
+                    ${includedir}/dns_sd.h "
+
+FILES_${PN}-man += "${mandir}/man8/mdnsd.8 \
+                    ${mandir}/man5/nss_mdns.conf.5 \
+                    ${mandir}/man8/libnss_mdns.8"
+
+PACKAGES = "${PN} ${PN}-dev ${PN}-man ${PN}-dbg"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init
index 2b8fe18..4799546 100755
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init
@@ -3,9 +3,6 @@
 
 . /etc/init.d/functions
 
-test -x /usr/sbin/snmpd || exit 0
-test -x /usr/sbin/snmptrapd || exit 0
-
 # Defaults
 export MIBDIRS=/usr/share/snmp/mibs
 SNMPDRUN=yes
@@ -18,6 +15,9 @@
 # Reads config file if exists (will override defaults above)
 [ -r /etc/default/snmpd ] && . /etc/default/snmpd
 
+[ "$SNMPDRUN" = "yes" ] && { test -x /usr/sbin/snmpd || exit 0; }
+[ "$TRAPDRUN" = "yes" ] && { test -x /usr/sbin/snmptrapd || exit 0; }
+
 case "$1" in
   start)
     echo -n "Starting network management services:"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch
new file mode 100644
index 0000000..efe8038
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch
@@ -0,0 +1,45 @@
+From e47c60dc7f649959f63e56bc62355de4bdfd73f4 Mon Sep 17 00:00:00 2001
+From: Marian Florea <marian.florea@windriver.com>
+Date: Thu, 20 Jul 2017 16:55:24 +0800
+Subject: [PATCH] net snmp: fix engineBoots value on SIGHUP
+
+Upstream-Status: Pending
+
+Signed-off-by: Marian Florea <marian.florea@windriver.com>
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ agent/snmpd.c    | 1 +
+ snmplib/snmpv3.c | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/agent/snmpd.c b/agent/snmpd.c
+index 056048a..12a7ea1 100644
+--- a/agent/snmpd.c
++++ b/agent/snmpd.c
+@@ -1246,6 +1246,7 @@ receive(void)
+ 	    snmp_log(LOG_INFO, "NET-SNMP version %s restarted\n",
+ 		     netsnmp_get_version());
+             update_config();
++            snmp_store(app_name);
+             send_easy_trap(SNMP_TRAP_ENTERPRISESPECIFIC, 3);
+ #if HAVE_SIGHOLD
+             sigrelse(SIGHUP);
+diff --git a/snmplib/snmpv3.c b/snmplib/snmpv3.c
+index 435cafd..6ad8208 100644
+--- a/snmplib/snmpv3.c
++++ b/snmplib/snmpv3.c
+@@ -984,9 +984,9 @@ init_snmpv3_post_config(int majorid, int minorid, void *serverarg,
+     /*
+      * if our engineID has changed at all, the boots record must be set to 1 
+      */
+-    if (engineIDLen != oldEngineIDLength ||
++    if (oldEngineIDLength != (size_t)0 && (engineIDLen != oldEngineIDLength ||
+         oldEngineID == NULL || c_engineID == NULL ||
+-        memcmp(oldEngineID, c_engineID, engineIDLen) != 0) {
++        memcmp(oldEngineID, c_engineID, engineIDLen) != 0)) {
+         engineBoots = 1;
+     }
+ 
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-fix-for-disable-des.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-fix-for-disable-des.patch
new file mode 100644
index 0000000..25eb9c9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-fix-for-disable-des.patch
@@ -0,0 +1,32 @@
+From 270e952f58a7e5ddeabe5a15e3ddaaadf40017d0 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 22 Jun 2017 10:25:08 +0800
+Subject: [PATCH] net-snmp: fix for --disable-des
+
+Include des.h only if it's found in openssl so that
+the --disable-des works correctly.
+
+Upstream-Status: Submitted [net-snmp-coders@lists.sourceforge.net]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ snmplib/scapi.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/snmplib/scapi.c b/snmplib/scapi.c
+index 16ac829..271684b 100644
+--- a/snmplib/scapi.c
++++ b/snmplib/scapi.c
+@@ -79,7 +79,9 @@ netsnmp_feature_child_of(usm_scapi, usm_support)
+ #include <openssl/hmac.h>
+ #include <openssl/evp.h>
+ #include <openssl/rand.h>
++#ifdef HAVE_OPENSSL_DES_H
+ #include <openssl/des.h>
++#endif
+ #ifdef HAVE_AES
+ #include <openssl/aes.h>
+ #endif
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
index 2d6887e..849ae07 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
@@ -30,6 +30,8 @@
            file://0002-configure-fix-a-cc-check-issue.patch \
            file://0003-CHANGES-BUG-2712-Fix-Perl-module-compilation.patch \
            file://0004-configure-fix-incorrect-variable.patch \
+           file://net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch \
+           file://net-snmp-fix-for-disable-des.patch \
            "
 SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee"
 SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e"
@@ -58,7 +60,8 @@
                 --with-defaults \
                 --with-install-prefix=${D} \
                 --with-persistent-directory=${localstatedir}/lib/net-snmp \
-                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
+                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \
+"
 
 # net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
 EXTRA_OECONF += "--with-mib-modules=smux"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api.c-include-rpc-clnt.h-for-resultproc_t.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api.c-include-rpc-clnt.h-for-resultproc_t.patch
new file mode 100644
index 0000000..a11a97e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api.c-include-rpc-clnt.h-for-resultproc_t.patch
@@ -0,0 +1,31 @@
+From 8f299df4dd1ca857e34859c377a29b183c630961 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Sep 2017 13:05:03 -0700
+Subject: [PATCH] l2tp_api.c: include rpc/clnt.h for 'resultproc_t'
+
+Fixes
+
+| /mnt/a/oe/build/tmp/work/mips32r2-bec-linux-musl/openl2tp/1.8-r0/recipe-sysroot/usr/include/tirpc/rpc/pmap_clnt.h:81:12: error: unknown type name 'resultproc_t'; did you mean 'rpcproc_t'?                                                 |             resultproc_t);                                                                                                                                                                                                                  |             ^~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ l2tp_api.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/l2tp_api.c b/l2tp_api.c
+index f0946fd..f77881c 100644
+--- a/l2tp_api.c
++++ b/l2tp_api.c
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
++#include <rpc/clnt.h>
+ #include <rpc/pmap_clnt.h>
+ //#include <netinet/in.h>
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
new file mode 100644
index 0000000..3119425
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
@@ -0,0 +1,35 @@
+commit 6ea3125e2bec15004f312814022335d94cdf7e94
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date:   Wed Sep 19 11:34:48 2012 -0400
+
+    Fix openl2tp config script location
+    
+    Correct the location of the sysconfig
+    script. Use /etc/default/ instead of
+    /etc/sysconfig/
+    
+    Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+    Upstream-Status: Inappropriate [configuration]
+
+    Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
+index 7f27bb7..4194f63 100755
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -8,12 +8,12 @@
+ #              can be used to implement L2TP VPNs. As a server, it can handle
+ #              hundreds of tunnels and sessions.
+ # processname: openl2tpd
+-# config: /etc/sysconfig/openl2tpd
++# config: /etc/default/openl2tpd
+ # pidfile: /var/run/openl2tpd.pid
+ 
+ # Source function library.
+ . /etc/init.d/functions
+-. /etc/sysconfig/openl2tpd
++. /etc/default/openl2tpd
+  
+ # See how we were called.
+   
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
new file mode 100644
index 0000000..15a8c5b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
@@ -0,0 +1,32 @@
+openl2tp: eliminate warning from modprobe
+
+modprobe will emit alarming warnings if it cannot
+find a module, but we only care that it find one
+of two possible modules when we start openl2tpd.
+
+Suppress messages from modprobe.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -29,7 +29,7 @@ start() {
+ 		return 1
+ 	    fi
+ 	fi
+-	modprobe -s pppol2tp || modprobe -s l2tp_ppp
++	modprobe -sq pppol2tp || modprobe -sq l2tp_ppp
+ 	RETVAL=$?
+ 	if [ $RETVAL -eq 0 ]; then
+ 	    start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
+@@ -57,7 +57,7 @@ stop() {
+ 	    return 1;
+ 	fi
+ 	killproc openl2tpd
+-	modprobe -s -r pppol2tp || modprobe -s -r l2tp_ppp
++	modprobe -srq pppol2tp || modprobe -srq l2tp_ppp
+ 	echo
+ 	rm -f /var/run/openl2tpd.pid
+         rm -f /var/lock/subsys/openl2tpd
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
new file mode 100644
index 0000000..9ecd4b0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
@@ -0,0 +1,49 @@
+commit 7c58a1e244ea83a9e7bbd51a6d354cee25cdbd33
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date:   Wed Sep 12 23:35:40 2012 -0400
+
+    Fix openl2tpd initscript
+    
+    - Correct the location of the retval statement.
+    - use start-stop-daemon instead of daemon.
+    
+    Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+    Upstream-Status: Inappropriate [OE specific]
+
+    Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
+index ce21b50..7f27bb7 100755
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -24,7 +24,7 @@ start() {
+         if [ -e /var/lock/subsys/openl2tpd ]; then
+ 	    if [ -e /var/run/openl2tpd.pid ] && [ -e /proc/`cat /var/run/openl2tpd.pid` ]; then
+ 		echo -n $"cannot start openl2tpd: openl2tpd is already running.";
+-		failure $"cannot start openl2tpd: openl2tpd already running.";
++		#failure $"cannot start openl2tpd: openl2tpd already running.";
+ 		echo
+ 		return 1
+ 	    fi
+@@ -32,9 +32,9 @@ start() {
+ 	modprobe -s pppol2tp || modprobe -s l2tp_ppp
+ 	RETVAL=$?
+ 	if [ $RETVAL -eq 0 ]; then
+-	    daemon openl2tpd $OPENL2TPDARGS
++	    start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
++        RETVAL=$?
+ 	fi
+-	RETVAL=$?
+ 	echo
+ 	if [ $RETVAL -eq 0 ]; then
+ 	    touch /var/lock/subsys/openl2tpd
+@@ -52,7 +52,7 @@ stop() {
+ 	echo -n $"Stopping $prog: "
+         if [ ! -e /var/lock/subsys/openl2tpd ]; then
+ 	    echo -n $"cannot stop openl2tpd: openl2tpd is not running."
+-	    failure $"cannot stop openl2tpd: openl2tpd is not running."
++	    #failure $"cannot stop openl2tpd: openl2tpd is not running."
+ 	    echo
+ 	    return 1;
+ 	fi
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service
new file mode 100644
index 0000000..7b3faf6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=The open L2TP implementation
+After=network.target remote-fs.target nss-lookup.target rpcbind.target
+Requires=rpcbind.service
+
+[Service]
+Type=forking
+PIDFile=@STATEDIR@/run/openl2tpd.pid
+EnvironmentFile=@SYSCONFDIR@/default/openl2tpd
+ExecStartPre=@BASE_BINDIR@/sh -c "@BASE_SBINDIR@/modprobe -sq l2tp_ppp || @BASE_SBINDIR@/modprobe -sq pppol2tp"
+ExecStart=@SBINDIR@/openl2tpd $OPENL2TPDARGS
+ExecStartPost=@BASE_BINDIR@/sh -c 'if [ -n "$OPENL2TPD_CONFIG_FILE" ]; then sleep 1; @BINDIR@/l2tpconfig config restore file=$OPENL2TPD_CONFIG_FILE; fi'
+ExecStopPost=@BASE_BINDIR@/sh -c "@BASE_SBINDIR@/modprobe -rsq l2tp_ppp || @BASE_SBINDIR@/modprobe -rsq pppol2tp"
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
index e1670b3..bbde8a3 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
@@ -7,8 +7,15 @@
 L2TP services and by corporations to implement L2TP VPNs."
 HOMEPAGE = "http://www.openl2tp.org/"
 SECTION = "net"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585"
+
+# cli and usl use license LGPL-2.1
+LICENSE = "GPL-2.0 & LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585 \
+                    file://LICENSE;md5=f8970abd5ea9be701a0deedf5afd77a5 \
+                    file://cli/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \
+                    file://usl/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \
+                    "
+
 DEPENDS = "popt flex readline"
 
 SRC_URI = "ftp://ftp.openl2tp.org/releases/${BP}/${BP}.tar.gz \
@@ -20,16 +27,24 @@
            file://0002-cli-include-fcntl.h-for-O_CREAT-define.patch \
            file://0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch \
            file://0001-l2tp_api-Included-needed-headers.patch \
+           file://openl2tpd-initscript-fix.patch \
+           file://openl2tpd-initscript-fix-sysconfig.patch \
+           file://openl2tpd-initscript-fix-warning.patch \
+           file://openl2tpd.service \
            "
 
 SRC_URI_append_libc-musl = "\
            file://0004-Adjust-for-linux-kernel-headers-assumptions-on-glibc.patch \
            file://0002-user-ipv6-structures.patch \
+           file://0001-l2tp_api.c-include-rpc-clnt.h-for-resultproc_t.patch \
            "
 SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
 SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
 
-inherit autotools-brokensep pkgconfig
+inherit autotools-brokensep pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "openl2tpd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
 
 DEPENDS_append_libc-musl = " libtirpc"
 CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
@@ -51,3 +66,23 @@
         -e 's:CPPFLAGS-y:CPPFLAGS:g' \
         ${S}/Makefile
 }
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/default
+    install -m 0755 ${S}/etc/rc.d/init.d/openl2tpd ${D}${sysconfdir}/init.d/openl2tpd
+    install -m 0755 ${S}/etc/sysconfig/openl2tpd ${D}${sysconfdir}/default/openl2tpd
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0644 ${WORKDIR}/openl2tpd.service ${D}${systemd_system_unitdir}/openl2tpd.service
+        sed -i -e 's,@STATEDIR@,${localstatedir},g' \
+               -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+               -e 's,@SBINDIR@,${sbindir},g' \
+               -e 's,@BINDIR@,${bindir},g' \
+               -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+               -e 's,@BASE_BINDIR@,${base_bindir},g' \
+               ${D}${systemd_system_unitdir}/openl2tpd.service
+    fi
+}
+
+RDEPENDS_${PN} = "ppp ppp-l2tp bash"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux/0001-include-missing-sys-types.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux/0001-include-missing-sys-types.h.patch
new file mode 100644
index 0000000..804bf12
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux/0001-include-missing-sys-types.h.patch
@@ -0,0 +1,28 @@
+From f6c4d2468ae0dadd2f35680d61b98b2a59077328 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 7 Jul 2017 10:31:03 -0700
+Subject: [PATCH] include missing sys/types.h
+
+Fixes errors seen on musl
+pqueue.h:21:3: error: unknown type name 'u_int32_t'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ pqueue.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pqueue.h b/pqueue.h
+index c37ba7b..ae4cc6a 100644
+--- a/pqueue.h
++++ b/pqueue.h
+@@ -3,6 +3,7 @@
+ 
+ #include <time.h>
+ #include <sys/time.h>
++#include <sys/types.h>
+ 
+ /* wait this many seconds for missing packets before forgetting about them */
+ #define DEFAULT_PACKET_TIMEOUT 0.3
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux-1.8.0/options.pptp b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux/options.pptp
similarity index 100%
rename from import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux-1.8.0/options.pptp
rename to import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux/options.pptp
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.8.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.8.0.bb
deleted file mode 100644
index bc8b2cb..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.8.0.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Client for Microsoft PPTP VPNs"
-DESCRIPTION = "PPTP Client is a Linux, FreeBSD, NetBSD \
-    and OpenBSD client for the proprietary Microsoft Point-to-Point \
-    Tunneling Protocol, PPTP. Allows connection to a PPTP based \
-    Virtual Private Network (VPN) as used by employers and some \
-    cable and ADSL internet service providers."
-HOMEPAGE = "http://pptpclient.sourceforge.net"
-SECTION = "net"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/sourceforge/pptpclient/pptp-${PV}.tar.gz \
-           file://options.pptp \
-"
-
-SRC_URI[md5sum] = "4efce9f263e2c3f38d79d9df222476de"
-SRC_URI[sha256sum] = "e39c42d933242a8a6dd8600a0fa7f0a5ec8f066d10c4149d8e81a5c68fe4bbda"
-
-S = "${WORKDIR}/pptp-${PV}"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_install() {
-    install -d ${D}${sbindir} ${D}${sysconfdir}/ppp ${D}${mandir}/man8
-    install -m 555 pptp ${D}${sbindir}
-    install -m 644 pptp.8 ${D}${mandir}/man8
-    install -m 644 ${WORKDIR}/options.pptp ${D}${sysconfdir}/ppp
-}
-
-RDEPENDS_${PN} = "ppp"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.9.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.9.0.bb
new file mode 100644
index 0000000..10c9170
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.9.0.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Client for Microsoft PPTP VPNs"
+DESCRIPTION = "PPTP Client is a Linux, FreeBSD, NetBSD \
+    and OpenBSD client for the proprietary Microsoft Point-to-Point \
+    Tunneling Protocol, PPTP. Allows connection to a PPTP based \
+    Virtual Private Network (VPN) as used by employers and some \
+    cable and ADSL internet service providers."
+HOMEPAGE = "http://pptpclient.sourceforge.net"
+SECTION = "net"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/sourceforge/pptpclient/pptp-${PV}.tar.gz \
+           file://options.pptp \
+           file://0001-include-missing-sys-types.h.patch \
+           "
+
+SRC_URI[md5sum] = "b2117b377f65294a9786f80f0235d308"
+SRC_URI[sha256sum] = "0b1e8cbfc578d3f5ab12ee87c5c2c60419abfe9cc445690a8a19c320b11c9201"
+
+S = "${WORKDIR}/pptp-${PV}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_install() {
+    install -d ${D}${sbindir} ${D}${sysconfdir}/ppp ${D}${mandir}/man8
+    install -m 555 pptp ${D}${sbindir}
+    install -m 644 pptp.8 ${D}${mandir}/man8
+    install -m 644 ${WORKDIR}/options.pptp ${D}${sysconfdir}/ppp
+}
+
+RDEPENDS_${PN} = "ppp"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc
index 4fb6723..dfd6aa7 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -7,21 +7,20 @@
 around Quagga than the current centralised model of GNU Zebra."
 HOMEPAGE = "http://www.nongnu.org/quagga/"
 SECTION = "net"
-LICENSE = "GPL-2.0 & LGPL-2.0"
-DEPENDS = "readline ncurses perl-native"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'snmp', 'net-snmp', '', d)}"
-SNMP_CONF="${@bb.utils.contains('DISTRO_FEATURES', 'snmp', '--enable-snmp', '', d)}"
 
+
+LICENSE = "GPL-2.0 & LGPL-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=81bcece21748c91ba9992349a91ec11d \
                     file://COPYING.LIB;md5=01ef24401ded36cd8e5d18bfe947240c"
 
+DEPENDS = "readline ncurses perl-native c-ares"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'snmp', 'net-snmp', '', d)}"
+SNMP_CONF="${@bb.utils.contains('DISTRO_FEATURES', 'snmp', '--enable-snmp', '', d)}"
+
 # the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
 RDEPENDS_${PN} += "iproute2"
 
-QUAGGASUBDIR = ""
-# ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old
-# versions and leave it empty for recent versions.
-SRC_URI = "${SAVANNAH_GNU_MIRROR}/quagga${QUAGGASUBDIR}/quagga-${PV}.tar.gz; \
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/quagga/quagga-${PV}.tar.gz; \
            file://quagga.init \
            file://quagga.default \
            file://watchquagga.init \
@@ -35,7 +34,7 @@
            file://ripd.service \
            file://ripngd.service \
            file://zebra.service \
-"
+          "
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
 PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
@@ -108,10 +107,6 @@
     sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
     sed -i 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/*
 
-    # Remove generated info dir file, it doesn't belong in the generated
-    # package.
-    rm -f ${D}${infodir}/dir
-
     # For PAM
     for feature in ${DISTRO_FEATURES}; do
         if [ "$feature" = "pam" ]; then
@@ -188,9 +183,6 @@
 DEBIAN_NOAUTONAME_${PN}-ospfd = "1"
 DEBIAN_NOAUTONAME_${PN}-ospfclient = "1"
 
-# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
-RDEPENDS_${PN}          += "iproute2"
-
 # Main init script starts all deamons
 # Seperate init script for watchquagga
 INITSCRIPT_PACKAGES                     = "${PN} ${PN}-watchquagga"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.1.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.1.0.bb
deleted file mode 100644
index 1b5c34c..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.1.0.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require quagga.inc
-
-SRC_URI[md5sum] = "daa303871e07ea5856aae6fd79e89722"
-SRC_URI[sha256sum] = "f7a43a9c59bfd3722002210530b2553c8d5cc05bfea5acd56d4f102b9f55dc63"
-
-QUAGGASUBDIR = ""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.1.bb
new file mode 100644
index 0000000..4d43d7b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.1.bb
@@ -0,0 +1,4 @@
+require quagga.inc
+
+SRC_URI[md5sum] = "b1546de89062f7070d56e780b30be4b1"
+SRC_URI[sha256sum] = "aaddba5d4f41ed8e4c2f155f4584c993465d122c9096b5b52ada3fc75266fbcd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
index 6f7f693..d037c7c 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
@@ -6,12 +6,9 @@
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-INC_PR = "r0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "git://github.com/xelerance/xl2tpd.git \
-    file://fix-inline-functions-errors-with-gcc-5.x.patch \
 "
 
 S = "${WORKDIR}/git"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch
deleted file mode 100644
index b75c912..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-Upstream-Status: Backport
-
-Backport from https://github.com/xelerance/xl2tpd/commit/9098f64950eb22cf049058d40f647bafdb822174
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From 9098f64950eb22cf049058d40f647bafdb822174 Mon Sep 17 00:00:00 2001
-From: Kai Kang <kai.kang@windriver.com>
-Date: Wed, 23 Sep 2015 10:41:05 +0800
-Subject: [PATCH] Fix build errors caused by inline function with gcc 5
-
-GCC 5 defaults to -std=gnu11 instead of -std=gnu89. And -std=gnu89
-employs the GNU89 inline semantics, -std=gnu11 uses the C99 inline
-semantics.
-
-For 'inline' fuction, it is NOT exported by C99. So error messages such as:
-
-| control.c:1717: undefined reference to `check_control'
-
-For these functions which is not referred by other compile units, make
-them 'static inline'.
-
-For 'extern inline' function, it fails such as:
-
-| misc.h:68:20: warning: inline function 'swaps' declared but never defined
-|  extern inline void swaps (void *, int);
-|                      ^
-
-Because function swaps() is referred by other compile units, it must be
-exported. The semantics of 'extern inline' are not same between GNU89
-and C99, so remove 'inline' attribute for compatible with GNU89.
-
-Ref:
-https://gcc.gnu.org/gcc-5/porting_to.html
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- control.c | 8 ++++----
- misc.c    | 2 +-
- misc.h    | 2 +-
- network.c | 4 ++--
- 4 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/control.c b/control.c
-index b2891a9..c4a39b5 100644
---- a/control.c
-+++ b/control.c
-@@ -1140,7 +1140,7 @@ int control_finish (struct tunnel *t, struct call *c)
-     return 0;
- }
- 
--inline int check_control (const struct buffer *buf, struct tunnel *t,
-+static inline int check_control (const struct buffer *buf, struct tunnel *t,
-                           struct call *c)
- {
-     /*
-@@ -1276,7 +1276,7 @@ inline int check_control (const struct buffer *buf, struct tunnel *t,
-     return 0;
- }
- 
--inline int check_payload (struct buffer *buf, struct tunnel *t,
-+static inline int check_payload (struct buffer *buf, struct tunnel *t,
-                           struct call *c)
- {
-     /*
-@@ -1382,7 +1382,7 @@ inline int check_payload (struct buffer *buf, struct tunnel *t,
- #endif
-     return 0;
- }
--inline int expand_payload (struct buffer *buf, struct tunnel *t,
-+static inline int expand_payload (struct buffer *buf, struct tunnel *t,
-                            struct call *c)
- {
-     /*
-@@ -1562,7 +1562,7 @@ void send_zlb (void *data)
-     toss (buf);
- }
- 
--inline int write_packet (struct buffer *buf, struct tunnel *t, struct call *c,
-+static inline int write_packet (struct buffer *buf, struct tunnel *t, struct call *c,
-                          int convert)
- {
-     /*
-diff --git a/misc.c b/misc.c
-index 3092401..af90dbf 100644
---- a/misc.c
-+++ b/misc.c
-@@ -170,7 +170,7 @@ void do_packet_dump (struct buffer *buf)
-     printf ("}\n");
- }
- 
--inline void swaps (void *buf_v, int len)
-+void swaps (void *buf_v, int len)
- {
- #ifdef __alpha
-     /* Reverse byte order alpha is little endian so lest save a step.
-diff --git a/misc.h b/misc.h
-index aafdc62..caab7a1 100644
---- a/misc.h
-+++ b/misc.h
-@@ -65,7 +65,7 @@ extern void l2tp_log (int level, const char *fmt, ...);
- extern struct buffer *new_buf (int);
- extern void udppush_handler (int);
- extern int addfcs (struct buffer *buf);
--extern inline void swaps (void *, int);
-+extern void swaps (void *, int);
- extern void do_packet_dump (struct buffer *);
- extern void status (const char *fmt, ...);
- extern void status_handler (int signal);
-diff --git a/network.c b/network.c
-index b1268c6..d324a71 100644
---- a/network.c
-+++ b/network.c
-@@ -135,7 +135,7 @@ int init_network (void)
-     return 0;
- }
- 
--inline void extract (void *buf, int *tunnel, int *call)
-+static inline void extract (void *buf, int *tunnel, int *call)
- {
-     /*
-      * Extract the tunnel and call #'s, and fix the order of the 
-@@ -155,7 +155,7 @@ inline void extract (void *buf, int *tunnel, int *call)
-     }
- }
- 
--inline void fix_hdr (void *buf)
-+static inline void fix_hdr (void *buf)
- {
-     /*
-      * Fix the byte order of the header
--- 
-2.6.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb
index 42bc398..88ae5d6 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb
@@ -2,7 +2,7 @@
 
 # This is v1.3.6 plus some commits.  There is no tag for this commit.
 #
-PV = "1.3.6+git${SRCPV}"
+PV = "1.3.9+git${SRCPV}"
 
-SRCREV = "a96b345962622ea58490924130675df6db062d11"
+SRCREV = "f114c10ac532051badeca0132b144a2f1596f047"
 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb
index 274a55d..cec1d1f 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb
@@ -23,7 +23,8 @@
 
 EXTRA_OEMAKE = "'BINDIR=${sbindir}' 'MANDIR=${mandir}'"
 
-do_install_append() {
+do_install() {
+    oe_runmake install DESTDIR=${D}
     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
         install -d ${D}${systemd_unitdir}/system
         install -m 644 ${WORKDIR}/arptables.service ${D}${systemd_unitdir}/system
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch
deleted file mode 100644
index 10fad4e..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 2a7236d2a7bb9c3d3c3f44ebf59404bf7134fcb3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Tue, 12 Apr 2016 11:37:28 +0100
-Subject: [PATCH] configure.ac: don't override passed cflags
-
-We are controlling debug and optimiser flags from OE
----
- configure.ac | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5c02450..3cf9fcd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -147,8 +147,6 @@ dnl **********************************************************************
- 
- CARES_CHECK_COMPILER
- CARES_SET_COMPILER_BASIC_OPTS
--CARES_SET_COMPILER_DEBUG_OPTS
--CARES_SET_COMPILER_OPTIMIZE_OPTS
- CARES_SET_COMPILER_WARNING_OPTS
- 
- if test "$compiler_id" = "INTEL_UNIX_C"; then
--- 
-2.8.0.rc3
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
new file mode 100644
index 0000000..5dd4c7d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
@@ -0,0 +1,105 @@
+From 7e1ae687916fd5878ee755afbdea6b10494e0b92 Mon Sep 17 00:00:00 2001
+From: Alexey Firago <alexey_firago@mentor.com>
+Date: Wed, 26 Jul 2017 23:21:25 +0300
+Subject: [PATCH] cmake: Install libcares.pc
+
+Prepare and install libcares.pc file during cmake build, so libraries
+using pkg-config to find libcares will not fail.
+
+Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
+---
+ CMakeLists.txt      | 21 +++++++++++++++++++++
+ libcares.pc.cmakein | 20 ++++++++++++++++++++
+ 2 files changed, 41 insertions(+)
+ create mode 100644 libcares.pc.cmakein
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 364b6c7..0016b67 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -173,21 +173,29 @@ ADD_DEFINITIONS(${SYSFLAGS})
+ 
+ 
+ # Tell C-Ares about libraries to depend on
++# Also pass these libraries to pkg-config file
++SET(CARES_PRIVATE_LIBS_LIST)
+ IF (HAVE_LIBRESOLV)
+ 	LIST (APPEND CARES_DEPENDENT_LIBS resolv)
++	LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lresolv")
+ ENDIF ()
+ IF (HAVE_LIBNSL)
+ 	LIST (APPEND CARES_DEPENDENT_LIBS nsl)
++	LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lnsl")
+ ENDIF ()
+ IF (HAVE_LIBSOCKET)
+ 	LIST (APPEND CARES_DEPENDENT_LIBS socket)
++	LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lsocket")
+ ENDIF ()
+ IF (HAVE_LIBRT)
+ 	LIST (APPEND CARES_DEPENDENT_LIBS rt)
++	LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lrt")
+ ENDIF ()
+ IF (WIN32)
+ 	LIST (APPEND CARES_DEPENDENT_LIBS ws2_32)
++	LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lws2_32")
+ ENDIF ()
++string (REPLACE ";" " " CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS_LIST}")
+ 
+ 
+ # When checking for symbols, we need to make sure we set the proper
+@@ -489,6 +497,13 @@ CONFIGURE_FILE (ares_build.h.cmake ${PROJECT_BINARY_DIR}/ares_build.h)
+ # Write ares_config.h configuration file.  This is used only for the build.
+ CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h)
+ 
++# Pass required CFLAGS to pkg-config in case of static library
++IF (CARES_STATIC)
++	SET (CPPFLAG_CARES_STATICLIB "-DCARES_STATICLIB")
++ENDIF()
++
++# Write ares_config.h configuration file.  This is used only for the build.
++CONFIGURE_FILE (libcares.pc.cmakein ${PROJECT_BINARY_DIR}/libcares.pc @ONLY)
+ 
+ # TRANSFORM_MAKEFILE_INC
+ #
+@@ -625,6 +640,12 @@ IF (CARES_INSTALL)
+ 	INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" DESTINATION ${CMAKECONFIG_INSTALL_DIR})
+ ENDIF ()
+ 
++# pkg-config file
++IF (CARES_INSTALL)
++	SET (PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
++	INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION ${PKGCONFIG_INSTALL_DIR})
++ENDIF ()
++
+ # Legacy chain-building variables (provided for compatibility with old code).
+ # Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares).
+ SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND")
+diff --git a/libcares.pc.cmakein b/libcares.pc.cmakein
+new file mode 100644
+index 0000000..f29fede
+--- /dev/null
++++ b/libcares.pc.cmakein
+@@ -0,0 +1,20 @@
++#***************************************************************************
++# Project        ___       __ _ _ __ ___  ___ 
++#               / __|____ / _` | '__/ _ \/ __|
++#              | (_|_____| (_| | | |  __/\__ \
++#               \___|     \__,_|_|  \___||___/
++#
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++
++Name: c-ares
++URL: http://daniel.haxx.se/projects/c-ares/
++Description: asynchronous DNS lookup library
++Version: @VERSION@
++Requires: 
++Requires.private: 
++Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@
++Libs: -L${libdir} -lcares
++Libs.private: @CARES_PRIVATE_LIBS@
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb
deleted file mode 100644
index 4e28d6a..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (c) 2012-2014 LG Electronics, Inc.
-
-SUMMARY = "c-ares is a C library that resolves names asynchronously."
-HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f4b026880834eb01c035c5e5cb47ccac"
-
-SRC_URI = "http://c-ares.haxx.se/download/${BP}.tar.gz \
-           file://0001-configure.ac-don-t-override-passed-cflags.patch \
-"
-SRC_URI[md5sum] = "2ca44be1715cd2c5666a165d35788424"
-SRC_URI[sha256sum] = "8692f9403cdcdf936130e045c84021665118ee9bfea905d1a76f04d4e6f365fb"
-
-inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb
new file mode 100644
index 0000000..70e497f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb
@@ -0,0 +1,24 @@
+# Copyright (c) 2012-2014 LG Electronics, Inc.
+SUMMARY = "c-ares is a C library that resolves names asynchronously."
+HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f4b026880834eb01c035c5e5cb47ccac"
+SRCREV = "3be1924221e1326df520f8498d704a5c4c8d0cce"
+PV = "1.13.0+gitr${SRCPV}"
+
+SRC_URI = "\
+    git://github.com/c-ares/c-ares.git \
+    file://cmake-install-libcares.pc.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+PACKAGES =+ "${PN}-utils"
+
+FILES_${PN}-dev += "${libdir}/cmake"
+FILES_${PN}-utils = "${bindir}"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
index efda707..3ca5b78 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
@@ -4,12 +4,13 @@
 LICENSE = "GPLv3 & LGPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-PV = "6.6"
+PV = "6.7"
 
-SRCREV = "7926aaea98cdc96b6544b8e21fb5b0b4422c340d"
+SRCREV = "8101a07871f185c7044fa2ca221b282ab4607c8b"
 SRC_URI = "git://git.samba.org/cifs-utils.git"
 
 S = "${WORKDIR}/git"
+DEPENDS += "libtalloc"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
deleted file mode 100644
index dae583d..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-example21.cpp: remove deprecated code
-
-The deprecated code was no longer used, so remove it to avoid
-compiling failure with -Werror=unused-function
-...
-| example21.cpp:51:8: error: 'size_t {anonymous}::readData(char*,
-size_t, size_t)' defined but not used [-Werror=unused-function]
-|  size_t readData(char *buffer, size_t size, size_t nitems)
-...
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- examples/example21.cpp | 17 -----------------
- 1 file changed, 17 deletions(-)
-
-diff --git a/examples/example21.cpp b/examples/example21.cpp
---- a/examples/example21.cpp
-+++ b/examples/example21.cpp
-@@ -39,23 +39,6 @@
- #include <curlpp/Options.hpp>
- #include <curlpp/Exception.hpp>
-  
--/*
--   anonymous namespace to prevent name clash in case other examples using the same global entities
--   would be compiled in the same project
--*/
--namespace
--{
--
--char *data = NULL;
--
--size_t readData(char *buffer, size_t size, size_t nitems)
--{
--  strncpy(buffer, data, size * nitems);
--  return size * nitems;
--}
--
--} // namespace
--
- int main(int argc, char *argv[])
- {
-   if(argc != 3) {
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
index ef79c5f..4f4bbf1 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
@@ -6,8 +6,8 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                     file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504"
 
-#at least versions 2.15 and prior are moved to the archive folder on the server
-SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV').split('.')[1]) > 15]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \
+#at least versions 2.69 and prior are moved to the archive folder on the server
+SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV').split('.')[1]) > 69]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \
            file://init \
            file://dnsmasq.conf \
            file://dnsmasq-resolvconf.service \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
index 918c0b6..0991dd8 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
@@ -1,29 +1,30 @@
-From 1e5be0a0bcf85913d63408030dec038d360a5fa6 Mon Sep 17 00:00:00 2001
+From be1b3d2d0f1608cba5efee73d6aac5ad0709041b Mon Sep 17 00:00:00 2001
 From: Joe MacDonald <joe_macdonald@mentor.com>
 Date: Tue, 9 Sep 2014 10:24:58 -0400
 Subject: [PATCH] Upstream-status: Inappropriate [OE specific]
 
 Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 
 ---
- Makefile |    4 ++--
+ Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index fc38393..a79f8bf 100644
+index 73ea23e..ed3eeb9 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -57,8 +57,8 @@ idn_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) -
- idn_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn` 
+@@ -59,8 +59,8 @@ idn2_cflags =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFI
+ idn2_libs =     `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFIG) --libs libidn2`
  ct_cflags =     `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack`
  ct_libs =       `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack`
--lua_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.1` 
--lua_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1` 
+-lua_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.2` 
+-lua_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.2` 
 +lua_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua`
 +lua_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua`
  nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
  nettle_libs =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
- gmp_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --copy -lgmp`
+ gmp_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
 -- 
-1.7.9.5
+2.9.5
 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.76.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.76.bb
deleted file mode 100644
index 41573d9..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.76.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require dnsmasq.inc
-
-SRC_URI += "\
-    file://lua.patch \
-"
-
-SRC_URI[dnsmasq-2.76.md5sum] = "6610f8233ca89b15a1bb47c788ffb84f"
-SRC_URI[dnsmasq-2.76.sha256sum] = "777c4762d2fee3738a0380401f2d087b47faa41db2317c60660d69ad10a76c32"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.78.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.78.bb
new file mode 100644
index 0000000..4d1dc6e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.78.bb
@@ -0,0 +1,8 @@
+require dnsmasq.inc
+
+SRC_URI += "\
+    file://lua.patch \
+"
+
+SRC_URI[dnsmasq-2.78.md5sum] = "3bb97f264c73853f802bf70610150788"
+SRC_URI[dnsmasq-2.78.sha256sum] = "c92e5d78aa6353354d02aabf74590d08980bb1385d8a00b80ef9bc80430aa1dc"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
new file mode 100644
index 0000000..65ae9bf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
@@ -0,0 +1,38 @@
+From be9b3809b86fe593dbb16f0b981b3d315a27b799 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 22 Oct 2017 22:10:41 -0700
+Subject: [PATCH] doveadm: Fix parallel build
+
+Sometimes dovetail build fails with errors like
+
+doveadm-util.o: file not recognized: File truncated
+collect2: error: ld returned 1 exit status
+make[4]: *** [Makefile:812: test-doveadm-util] Error 1
+
+This is partial backport from
+
+https://github.com/dovecot/core/commit/b200bc3875fa06d42c8619865cc306c3297fcacc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/doveadm/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/doveadm/Makefile.am b/src/doveadm/Makefile.am
+index c644646..6ae9144 100644
+--- a/src/doveadm/Makefile.am
++++ b/src/doveadm/Makefile.am
+@@ -180,8 +180,8 @@ test_libs = \
+ 	../lib/liblib.la
+ test_deps = $(noinst_LTLIBRARIES) $(test_libs)
+ 
+-test_doveadm_util_SOURCES = test-doveadm-util.c
+-test_doveadm_util_LDADD = doveadm-util.o $(test_libs) $(MODULE_LIBS)
++test_doveadm_util_SOURCES = doveadm-util.c test-doveadm-util.c
++test_doveadm_util_LDADD = $(test_libs) $(MODULE_LIBS)
+ test_doveadm_util_DEPENDENCIES = $(test_deps)
+ 
+ check: check-am check-test
+-- 
+2.14.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.29.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.29.bb
index b2a3de3..1663408 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.29.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.29.bb
@@ -1,4 +1,5 @@
 SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
+HOMEPAGE = "https://www.dovecot.org/"
 DESCRIPTION = "Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory."
 SECTION = "mail"
 LICENSE = "LGPLv2.1 & MIT"
@@ -7,7 +8,9 @@
 SRC_URI = "http://dovecot.org/releases/2.2/dovecot-${PV}.tar.gz \
            file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \
            file://dovecot.service \
-           file://dovecot.socket"
+           file://dovecot.socket \
+           file://0001-doveadm-Fix-parallel-build.patch \
+           "
 
 SRC_URI[md5sum] = "ff95486a5c43025a2c3f5a712e7962b9"
 SRC_URI[sha256sum] = "d939ea99126eb8a8c6955390b422b6e27ec0fa43a3b59b2b3218cb5ad67139a6"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch
new file mode 100644
index 0000000..6414f73
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch
@@ -0,0 +1,24 @@
+If CONFIG_BLK_DEV_DRBD kernel config is enabled, then DRBD
+does not build drbd.ko here. Under this circumstance do_install
+task is going to fail with a below error:
+-- snip --
+| install: cannot stat ‘drbd.ko’: No such file or directory
+| make[1]: *** [install] Error 1
+-- snip --
+
+So, check for kernel module existence before installing.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+--- drbd-9.0.1-1/drbd/Makefile	2016-07-03 06:54:19.421538690 -0700
++++ drbd-9.0.1-1/drbd/Makefile_mod	2016-07-03 06:53:18.938801628 -0700
+@@ -158,7 +158,7 @@ else
+ 	fi
+ 	install -d $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+ 	set -e ; for ko in $(MODOBJS); do \
+-		install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
++		[ -e $$ko ] && install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
+ 	done
+     ifeq ($(DESTDIR),/)
+       ifeq ($(shell uname -r),$(KERNELRELEASE))
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb
new file mode 100644
index 0000000..e943f24
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Distributed block device driver for Linux"
+DESCRIPTION = "DRBD is a block device which is designed to build high \
+               availability clusters. This is done by mirroring a whole \
+               block device via (a dedicated) network. You could see \
+               it as a network raid-1."
+HOMEPAGE = "http://oss.linbit.com/drbd/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+DEPENDS = "virtual/kernel"
+
+SRC_URI = "http://www.linbit.com/downloads/drbd/9.0/drbd-${PV}.tar.gz \
+           file://check_existence_of_modules_before_installing.patch"
+
+SRC_URI[md5sum] = "c1dd58043f46e9926b579aa65d4ea980"
+SRC_URI[sha256sum] = "87f72d46db9bad926415b3ab9f5f1397de8c581d2e2ec1addbdd5ce2604e6123"
+inherit module
+
+EXTRA_OEMAKE += "KDIR='${STAGING_KERNEL_DIR}'"
+
+do_install () {
+    oe_runmake install DESTDIR="${D}"
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb
index 359911e..1d78288 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb
@@ -1,4 +1,5 @@
 SUMMARY = "Fetchmail retrieves mail from remote mail servers and forwards it via SMTP"
+HOMEPAGE = "http://www.fetchmail.info/"
 DESCRIPTION = "Fetchmail is a full-featured, robust, well-documented remote-mail retrieval and forwarding utility intended to be used over on-demand TCP/IP links (such as SLIP or PPP connections). It supports every remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP, KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 and IPSEC."
 SECTION = "mail"
 LICENSE = "GPLv2 & MIT"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.2/GeoIP.conf b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.4.0/GeoIP.conf
similarity index 100%
rename from import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.2/GeoIP.conf
rename to import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.4.0/GeoIP.conf
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.2/geoipupdate.cron b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.4.0/geoipupdate.cron
similarity index 100%
rename from import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.2/geoipupdate.cron
rename to import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.4.0/geoipupdate.cron
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.2.2.bb
deleted file mode 100644
index 3bc936a..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.2.2.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
-DESCRIPTION = "update databases for GeoIP"
-
-HOMEPAGE = "http://dev.maxmind.com/geoip/"
-SECTION = "net"
-
-DEPENDS = "zlib curl"
-
-SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.2.2/geoipupdate-2.2.2.tar.gz \
-           file://GeoIP.conf \
-           file://geoipupdate.cron \
-          "
-
-SRC_URI[md5sum] = "06284bd7bcb298d078d794eb630dae55"
-SRC_URI[sha256sum] = "156ab7604255a9c62c4a442c76d48d024ac813c6542639bffa93b28e2a781621"
-
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "\
-file://ChangeLog.md;md5=8ebf6f27a39125c3d600c90914b4034a \
-"
-
-inherit autotools
-
-do_install_append() {
-    install -d ${D}/${sysconfdir}
-    install -d ${D}/${sysconfdir}/cron.d
-    install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/
-    install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.4.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.4.0.bb
new file mode 100644
index 0000000..3e045bb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.4.0.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
+DESCRIPTION = "update databases for GeoIP"
+
+HOMEPAGE = "http://dev.maxmind.com/geoip/"
+SECTION = "net"
+
+DEPENDS = "zlib curl"
+
+SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.4.0/geoipupdate-2.4.0.tar.gz \
+           file://GeoIP.conf \
+           file://geoipupdate.cron \
+          "
+SRC_URI[md5sum] = "02f9712fb80e8e979d3d54cda7f7704f"
+SRC_URI[sha256sum] = "8b4e88ce8d84e9c75bc681704d19ec5c63c54f01e945f7669f97fb0df7e13952"
+
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "\
+file://ChangeLog.md;md5=334337b6ecbb65093bae66b3ae21c8c2 \
+"
+FILES_${PN} = "/usr/share/GeoIP \
+              /etc/GeoIP.conf \
+             /etc/cron.d/geoipupdate.cron \
+             /usr/bin/geoipupdate \
+"
+inherit autotools
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}
+    install -d ${D}/${sysconfdir}/cron.d
+    install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/
+    install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.7.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.7.bb
deleted file mode 100644
index 5028921..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.7.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Configure network interfaces for parallel routing"
-HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding"
-SECTION = "net"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=6807ba81c0744ab50d735c94628c3f64"
-
-SRCREV = "400c490d52acb31f1064e1bf4fc9fcaf3791888f"
-SRC_URI = "git://anonscm.debian.org/collab-maint/ifenslave.git"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-    install -d ${D}${sbindir}
-    install -m 0755 ${S}/ifenslave ${D}${sbindir}/
-
-    install -m 0755 -D ${S}/debian/ifenslave.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/ifenslave
-    install -m 0755 -D ${S}/debian/ifenslave.if-post-down ${D}${sysconfdir}/network/if-post-down.d/ifenslave
-    install -m 0755 -D ${S}/debian/ifenslave.if-up ${D}${sysconfdir}/network/if-up.d/ifenslave
-    install -m 0644 -D ${S}/debian/ifenslave.8 ${D}${mandir}/man8/ifenslave.8
-}
-
-FILES_${PN}-doc_remove = "${mandir}"
-FILES_${PN} += "${mandir}/man8/ifenslave.8"
-
-RDEPENDS_${PN} = "man"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
new file mode 100644
index 0000000..ea28b34
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Configure network interfaces for parallel routing"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding"
+SECTION = "net"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=acc89812938cf9ad6b1debc37cea0253"
+
+
+SRCREV = "42bfbb9beb924672ca86b86e9679ac3d6b87d992"
+SRC_URI = "git://anonscm.debian.org/collab-maint/ifenslave.git"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+    install -d ${D}${sbindir}
+    install -m 0755 ${S}/ifenslave ${D}${sbindir}/
+
+    install -m 0755 -D ${S}/debian/ifenslave.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/ifenslave
+    install -m 0755 -D ${S}/debian/ifenslave.if-post-down ${D}${sysconfdir}/network/if-post-down.d/ifenslave
+    install -m 0755 -D ${S}/debian/ifenslave.if-up ${D}${sysconfdir}/network/if-up.d/ifenslave
+    install -m 0644 -D ${S}/debian/ifenslave.8 ${D}${mandir}/man8/ifenslave.8
+}
+
+FILES_${PN}-doc_remove = "${mandir}"
+FILES_${PN} += "${mandir}/man8/ifenslave.8"
+
+RDEPENDS_${PN} = "man"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2016-10396.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2016-10396.patch
new file mode 100644
index 0000000..bd07965
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2016-10396.patch
@@ -0,0 +1,207 @@
+Upstream-Status: Backport [https://anonscm.debian.org/cgit/pkg-ipsec-tools/pkg-ipsec-tools.git/plain/debian/patches/CVE-2016-10396.patch?id=62ac12648a4eb7c5ba5dba0f81998d1acf310d8b]
+
+Fix CVE-2016-10396.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+Description: Fix remotely exploitable DoS. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10396
+Source: vendor; https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51682
+Bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867986
+
+Index: pkg-ipsec-tools/src/racoon/isakmp_frag.c
+===================================================================
+--- pkg-ipsec-tools.orig/src/racoon/isakmp_frag.c
++++ pkg-ipsec-tools/src/racoon/isakmp_frag.c
+@@ -1,4 +1,4 @@
+-/*	$NetBSD: isakmp_frag.c,v 1.5 2009/04/22 11:24:20 tteras Exp $	*/
++/*	$NetBSD: isakmp_frag.c,v 1.5.36.1 2017/04/21 16:50:42 bouyer Exp $	*/
+ 
+ /* Id: isakmp_frag.c,v 1.4 2004/11/13 17:31:36 manubsd Exp */
+ 
+@@ -173,6 +173,43 @@ vendorid_frag_cap(gen)
+ 	return ntohl(hp[MD5_DIGEST_LENGTH / sizeof(*hp)]);
+ }
+ 
++static int 
++isakmp_frag_insert(struct ph1handle *iph1, struct isakmp_frag_item *item)
++{
++	struct isakmp_frag_item *pitem = NULL;
++	struct isakmp_frag_item *citem = iph1->frag_chain;
++
++	/* no frag yet, just insert at beginning of list */
++	if (iph1->frag_chain == NULL) {
++		iph1->frag_chain = item;
++		return 0;
++	}
++
++	do {
++		/* duplicate fragment number, abort (CVE-2016-10396) */
++		if (citem->frag_num == item->frag_num)
++			return -1;
++
++		/* need to insert before current item */
++		if (citem->frag_num > item->frag_num) {
++			if (pitem != NULL)
++				pitem->frag_next = item;
++			else
++				/* insert at the beginning of the list  */
++				iph1->frag_chain = item;
++			item->frag_next = citem;
++			return 0;
++		}
++
++		pitem = citem;
++		citem = citem->frag_next;
++	} while (citem != NULL);
++
++	/* we reached the end of the list, insert */
++	pitem->frag_next = item;
++	return 0;
++}
++
+ int 
+ isakmp_frag_extract(iph1, msg)
+ 	struct ph1handle *iph1;
+@@ -224,39 +261,43 @@ isakmp_frag_extract(iph1, msg)
+ 	item->frag_next = NULL;
+ 	item->frag_packet = buf;
+ 
+-	/* Look for the last frag while inserting the new item in the chain */
+-	if (item->frag_last)
+-		last_frag = item->frag_num;
++	/* Check for the last frag before inserting the new item in the chain */
++	if (item->frag_last) {
++		/* if we have the last fragment, indices must match */
++		if (iph1->frag_last_index != 0 &&
++		    item->frag_last != iph1->frag_last_index) {
++			plog(LLV_ERROR, LOCATION, NULL,
++			     "Repeated last fragment index mismatch\n");
++			racoon_free(item);
++			vfree(buf);
++			return -1;
++		}
+ 
+-	if (iph1->frag_chain == NULL) {
+-		iph1->frag_chain = item;
+-	} else {
+-		struct isakmp_frag_item *current;
++		last_frag = iph1->frag_last_index = item->frag_num;
++	}
+ 
+-		current = iph1->frag_chain;
+-		while (current->frag_next) {
+-			if (current->frag_last)
+-				last_frag = item->frag_num;
+-			current = current->frag_next;
+-		}
+-		current->frag_next = item;
++	/* insert fragment into chain */
++	if (isakmp_frag_insert(iph1, item) == -1) {
++		plog(LLV_ERROR, LOCATION, NULL,
++		    "Repeated fragment index mismatch\n");
++		racoon_free(item);
++		vfree(buf);
++		return -1;
+ 	}
+ 
+-	/* If we saw the last frag, check if the chain is complete */
++	/* If we saw the last frag, check if the chain is complete
++	 * we have a sorted list now, so just walk through */
+ 	if (last_frag != 0) {
++		item = iph1->frag_chain;
+ 		for (i = 1; i <= last_frag; i++) {
+-			item = iph1->frag_chain;
+-			do {
+-				if (item->frag_num == i)
+-					break;
+-				item = item->frag_next;
+-			} while (item != NULL);
+-
++			if (item->frag_num != i)
++				break;
++			item = item->frag_next;
+ 			if (item == NULL) /* Not found */
+ 				break;
+ 		}
+ 
+-		if (item != NULL) /* It is complete */
++		if (i > last_frag) /* It is complete */
+ 			return 1;
+ 	}
+ 		
+@@ -291,15 +332,9 @@ isakmp_frag_reassembly(iph1)
+ 	}
+ 	data = buf->v;
+ 
++	item = iph1->frag_chain;
+ 	for (i = 1; i <= frag_count; i++) {
+-		item = iph1->frag_chain;
+-		do {
+-			if (item->frag_num == i)
+-				break;
+-			item = item->frag_next;
+-		} while (item != NULL);
+-
+-		if (item == NULL) {
++		if (item->frag_num != i) {
+ 			plog(LLV_ERROR, LOCATION, NULL, 
+ 			    "Missing fragment #%d\n", i);
+ 			vfree(buf);
+@@ -308,6 +343,7 @@ isakmp_frag_reassembly(iph1)
+ 		}
+ 		memcpy(data, item->frag_packet->v, item->frag_packet->l);
+ 		data += item->frag_packet->l;
++		item = item->frag_next;
+ 	}
+ 
+ out:
+Index: pkg-ipsec-tools/src/racoon/isakmp_inf.c
+===================================================================
+--- pkg-ipsec-tools.orig/src/racoon/isakmp_inf.c
++++ pkg-ipsec-tools/src/racoon/isakmp_inf.c
+@@ -720,6 +720,7 @@ isakmp_info_send_nx(isakmp, remote, loca
+ #endif
+ #ifdef ENABLE_FRAG
+ 	iph1->frag = 0;
++	iph1->frag_last_index = 0;
+ 	iph1->frag_chain = NULL;
+ #endif
+ 
+Index: pkg-ipsec-tools/src/racoon/isakmp.c
+===================================================================
+--- pkg-ipsec-tools.orig/src/racoon/isakmp.c
++++ pkg-ipsec-tools/src/racoon/isakmp.c
+@@ -1072,6 +1072,7 @@ isakmp_ph1begin_i(rmconf, remote, local)
+ 		iph1->frag = 1;
+ 	else
+ 		iph1->frag = 0;
++	iph1->frag_last_index = 0;
+ 	iph1->frag_chain = NULL;
+ #endif
+ 	iph1->approval = NULL;
+@@ -1176,6 +1177,7 @@ isakmp_ph1begin_r(msg, remote, local, et
+ #endif
+ #ifdef ENABLE_FRAG
+ 	iph1->frag = 0;
++	iph1->frag_last_index = 0;
+ 	iph1->frag_chain = NULL;
+ #endif
+ 	iph1->approval = NULL;
+Index: pkg-ipsec-tools/src/racoon/handler.h
+===================================================================
+--- pkg-ipsec-tools.orig/src/racoon/handler.h
++++ pkg-ipsec-tools/src/racoon/handler.h
+@@ -1,4 +1,4 @@
+-/*	$NetBSD: handler.h,v 1.25 2010/11/17 10:40:41 tteras Exp $	*/
++/*	$NetBSD: handler.h,v 1.26 2017/01/24 19:23:56 christos Exp $	*/
+ 
+ /* Id: handler.h,v 1.19 2006/02/25 08:25:12 manubsd Exp */
+ 
+@@ -141,6 +141,7 @@ struct ph1handle {
+ #endif
+ #ifdef ENABLE_FRAG
+ 	int frag;			/* IKE phase 1 fragmentation */
++	int frag_last_index;
+ 	struct isakmp_frag_item *frag_chain;	/* Received fragments */
+ #endif
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
index d7e8b25..5cbeb15 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
@@ -24,6 +24,7 @@
            file://0001-Fix-build-with-clang.patch \
            file://0001-Fix-header-issues-found-with-musl-libc.patch \
            file://0002-cfparse-clear-memory-equal-to-size-of-array.patch \
+           file://fix-CVE-2016-10396.patch \
            "
 SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
 SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb
index 8d1b3f0..b35a9f4 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb
@@ -1,4 +1,5 @@
 SUMMARY = "Linux Virtual Server administration Utility"
+HOMEPAGE = "http://www.linux-vs.org/software/index.html"
 DESCRIPTION = "Ipvsadm  is  used  to set up, maintain or inspect the virtual server \
 table in the Linux kernel. The Linux Virtual  Server  can  be  used  to \
 build  scalable  network  services  based  on  a cluster of two or more nodes. \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch
new file mode 100644
index 0000000..d0d203e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch
@@ -0,0 +1,19 @@
+Use HAVE_WORKING_SNPRINTF to check for snprintf()
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libesmtp-1.0.6/missing.h
+===================================================================
+--- libesmtp-1.0.6.orig/missing.h
++++ libesmtp-1.0.6/missing.h
+@@ -43,7 +43,7 @@ int strncasecmp (const char *a, const ch
+ void *memrchr (const void *a, int c, size_t len);
+ #endif
+ 
+-#ifndef HAVE_SNPRINTF
++#ifndef HAVE_WORKING_SNPRINTF
+ #include <sys/types.h>
+ int snprintf(char *s, size_t n, const char *format, ...);
+ #endif
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
index 7ddf591..71c5d94 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
@@ -9,7 +9,9 @@
 DEPENDS = "openssl"
 
 SRC_URI = "http://www.stafford.uklinux.net/libesmtp/libesmtp-${PV}.tar.bz2 \
-           file://include-topdir.patch"
+           file://include-topdir.patch \
+           file://snprintf.patch \
+          "
 SRC_URI[md5sum] = "bf3915e627fd8f35524a8fdfeed979c8"
 SRC_URI[sha256sum] = "d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b"
 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch
index 4000557..272921e 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch
@@ -1,7 +1,10 @@
-From 10ac5e5fdda44adcc2a159b6f9a2d51a51361057 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Wed, 21 Sep 2016 10:46:19 +0800
-Subject: [PATCH] tdb: Add configure options for packages
+From 24911f36bcb00412e5dc4cd11fda139e09d58798 Mon Sep 17 00:00:00 2001
+From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+Date: Tue, 1 Aug 2017 03:12:09 +0900
+Subject: [PATCH] From 10ac5e5fdda44adcc2a159b6f9a2d51a51361057 Mon Sep 17
+ 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> Date: Wed, 21
+ Sep 2016 10:46:19 +0800 Subject: [PATCH] tdb: Add configure options for
+ packages
 
 Add configure options for the following packages:
  - acl
@@ -14,6 +17,10 @@
 Upstream-Status: Inappropriate [oe deterministic build specific]
 
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Update for libtdb_1.3.14.
+
+Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
 ---
  lib/replace/system/wscript_configure |  6 ++-
  lib/replace/wscript                  | 85 ++++++++++++++++++++++++++++--------
@@ -37,7 +44,7 @@
  
  # solaris varients of getXXent_r
 diff --git a/lib/replace/wscript b/lib/replace/wscript
-index 145300d..310048c 100644
+index 7c50e1d..15df5c3 100644
 --- a/lib/replace/wscript
 +++ b/lib/replace/wscript
 @@ -23,6 +23,41 @@ def set_options(opt):
@@ -124,7 +131,7 @@
      conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
      conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
      conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
-@@ -248,17 +298,18 @@ def configure(conf):
+@@ -251,17 +301,18 @@ def configure(conf):
  
      conf.CHECK_FUNCS('prctl dirname basename')
  
@@ -155,23 +162,23 @@
      conf.CHECK_CODE('''
                  struct ucred cred;
 diff --git a/wscript b/wscript
-index 50b2286..748eef1 100644
+index 1c9655a..8c20d3b 100644
 --- a/wscript
 +++ b/wscript
-@@ -64,7 +64,12 @@ def set_options(opt):
-         opt.add_option('--disable-python',
-                        help=("disable the pytdb module"),
-                        action="store_true", dest='disable_python', default=False)
+@@ -62,7 +62,12 @@ def set_options(opt):
+                    help=("Disable the use of pthread robust mutexes"),
+                    action="store_true", dest='disable_tdb_mutex_locking',
+                    default=False)
 -
-+        opt.add_option('--with-valgrind',
-+                       help=("enable use of valgrind"),
-+                       action="store_true", dest='enable_valgrind')
-+        opt.add_option('--without-valgrind',
-+                       help=("disable use of valgrind"),
-+                       action="store_false", dest='enable_valgrind', default=False)
++    opt.add_option('--with-valgrind',
++                   help=("enable use of valgrind"),
++                   action="store_true", dest='enable_valgrind')
++    opt.add_option('--without-valgrind',
++                   help=("disable use of valgrind"),
++                   action="store_false", dest='enable_valgrind', default=False)
  
  def configure(conf):
      conf.env.disable_tdb_mutex_locking = getattr(Options.options,
 -- 
-2.8.3
+2.7.4
 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.12.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.12.bb
deleted file mode 100644
index e256ac9..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.12.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "The tdb library"
-SECTION = "libs"
-LICENSE = "LGPL-3.0+ & GPL-3.0+"
-
-LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c98f48018c4 \
-                    file://include/tdb.h;endline=27;md5=f5bb544641d3081821bcc1dd58310be6"
-
-SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \
-           file://do-not-check-xsltproc-manpages.patch \
-           file://tdb-Add-configure-options-for-packages.patch \
-"
-
-SRC_URI[md5sum] = "d9627e7aacd535a8251401f914bb6924"
-SRC_URI[sha256sum] = "60134e32253cac8e2efe5e0185d20123c208bcf6ad15edf2f50d80daadf8c348"
-
-PACKAGECONFIG ??= "\
-    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
-"
-PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
-PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
-PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
-PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
-PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
-PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
-
-S = "${WORKDIR}/tdb-${PV}"
-
-inherit waf-samba
-
-EXTRA_OECONF += "--disable-rpath \
-                 --bundled-libraries=NONE \
-                 --builtin-libraries=replace \
-                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
-                "
-
-PACKAGES += "tdb-tools python-tdb python-tdb-dbg"
-
-FILES_${PN} = "${libdir}/*.so.*"
-FILES_tdb-tools = "${bindir}/*"
-FILES_python-tdb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
-FILES_python-tdb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
-RDEPENDS_python-tdb = "python"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.14.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.14.bb
new file mode 100644
index 0000000..3122b93
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.14.bb
@@ -0,0 +1,44 @@
+SUMMARY = "The tdb library"
+HOMEPAGE = "http://tdb.samba.org/"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+
+LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c98f48018c4 \
+                    file://include/tdb.h;endline=27;md5=f5bb544641d3081821bcc1dd58310be6"
+
+SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \
+           file://do-not-check-xsltproc-manpages.patch \
+           file://tdb-Add-configure-options-for-packages.patch \
+"
+
+SRC_URI[md5sum] = "dd23f2ba8ca2bfdcb833bc79d5b5ac6f"
+SRC_URI[sha256sum] = "3a7d4bb79229460df530c7e1c7067ba9fb9d370aa61fff537fdc2bdf918acbe9"
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+S = "${WORKDIR}/tdb-${PV}"
+
+inherit waf-samba
+
+EXTRA_OECONF += "--disable-rpath \
+                 --bundled-libraries=NONE \
+                 --builtin-libraries=replace \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                "
+
+PACKAGES += "tdb-tools python-tdb python-tdb-dbg"
+
+FILES_${PN} = "${libdir}/*.so.*"
+FILES_tdb-tools = "${bindir}/*"
+FILES_python-tdb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_python-tdb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
+RDEPENDS_python-tdb = "python"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/do-not-check-xsltproc-manpages.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/do-not-check-xsltproc-manpages.patch
deleted file mode 100644
index 1ce4dda..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/do-not-check-xsltproc-manpages.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Don't check manpages for xsltproc.
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
-diff -Nurp tevent-0.9.21.orig/lib/talloc/wscript tevent-0.9.21/lib/talloc/wscript
---- tevent-0.9.21.orig/lib/talloc/wscript	2013-09-08 21:24:14.000000000 +0900
-+++ tevent-0.9.21/lib/talloc/wscript	2015-04-24 16:28:04.085000230 +0900
-@@ -55,7 +55,7 @@ def configure(conf):
-     if conf.env.standalone_talloc:
-         conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
- 
--    conf.CHECK_XSLTPROC_MANPAGES()
-+    conf.find_program('xsltproc', var='XSLTPROC')
- 
-     if not conf.env.disable_python:
-         # also disable if we don't have the python libs installed
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.4.36.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.4.36.bb
deleted file mode 100644
index 48c3c9e..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.4.36.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "A high-performance memory object caching system"
-DESCRIPTION = "\
- memcached optimizes specific high-load serving applications that are designed \
- to take advantage of its versatile no-locking memory access system. Clients \
- are available in several different programming languages, to suit the needs \
- of the specific application. Traditionally this has been used in mod_perl \
- apps to avoid storing large chunks of data in Apache memory, and to share \
- this burden across several machines."
-SECTION = "web"
-HOMEPAGE = "http://memcached.org/"
-LICENSE = "BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff"
-
-inherit autotools
-
-DEPENDS += "libevent"
-RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \
-    perl-module-tie-hash bash \
-    "
-
-SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
-           file://memcached-add-hugetlbfs-check.patch \
-           "
-SRC_URI[md5sum] = "1e028fbab7288911fcaa5ed2a21817fe"
-SRC_URI[sha256sum] = "773b6bb20bf80223ca6a15d75f570fbab346ad11ec98595e5af5e33f54bd82d8"
-
-# set the same COMPATIBLE_HOST as libhugetlbfs
-COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux'
-
-python __anonymous () {
-    endianness = d.getVar('SITEINFO_ENDIANNESS')
-    if endianness == 'le':
-        d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=little")
-    else:
-        d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big")
-}
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs"
-
-inherit update-rc.d
-
-INITSCRIPT_NAME = "memcached"
-INITSCRIPT_PARAMS = "defaults"
-
-do_install_append() {
-    install -D -m 755 ${S}/scripts/memcached-init ${D}${sysconfdir}/init.d/memcached
-    mkdir -p ${D}/usr/share/memcached/scripts
-    install -m 755 ${S}/scripts/memcached-tool ${D}/usr/share/memcached/scripts
-    install -m 755 ${S}/scripts/start-memcached ${D}/usr/share/memcached/scripts
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.0.bb
new file mode 100644
index 0000000..fd3d171
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.0.bb
@@ -0,0 +1,52 @@
+SUMMARY = "A high-performance memory object caching system"
+DESCRIPTION = "\
+ memcached optimizes specific high-load serving applications that are designed \
+ to take advantage of its versatile no-locking memory access system. Clients \
+ are available in several different programming languages, to suit the needs \
+ of the specific application. Traditionally this has been used in mod_perl \
+ apps to avoid storing large chunks of data in Apache memory, and to share \
+ this burden across several machines."
+SECTION = "web"
+HOMEPAGE = "http://memcached.org/"
+LICENSE = "BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff"
+
+inherit autotools
+
+DEPENDS += "libevent"
+RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \
+    perl-module-tie-hash bash \
+    "
+
+SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
+           file://memcached-add-hugetlbfs-check.patch \
+           "
+SRC_URI[md5sum] = "81326513f60d7ba482f8131975cd55ae"
+SRC_URI[sha256sum] = "c001f812024bb461b5e4d7d0506daab63dff9614eea26f46536c3b7e1e601c32"
+
+# set the same COMPATIBLE_HOST as libhugetlbfs
+COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux'
+
+python __anonymous () {
+    endianness = d.getVar('SITEINFO_ENDIANNESS')
+    if endianness == 'le':
+        d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=little")
+    else:
+        d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big")
+}
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "memcached"
+INITSCRIPT_PARAMS = "defaults"
+
+do_install_append() {
+    install -D -m 755 ${S}/scripts/memcached-init ${D}${sysconfdir}/init.d/memcached
+    mkdir -p ${D}/usr/share/memcached/scripts
+    install -m 755 ${S}/scripts/memcached-tool ${D}/usr/share/memcached/scripts
+    install -m 755 ${S}/scripts/start-memcached ${D}/usr/share/memcached/scripts
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch
new file mode 100644
index 0000000..eeae532
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch
@@ -0,0 +1,34 @@
+From 1ee2c998933c4a3d7e7b386352cbdb12f270774c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Sep 2017 20:50:48 -0700
+Subject: [PATCH] autogen: Do not symlink gettext.h from build host
+
+This will create a dependency on build host having gettext
+installed which may not always be the case.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [Cross-compile specific]
+ autogen.sh | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 3371011..bbc7add 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -25,12 +25,6 @@ echo "Running autoreconf ..."
+ autoreconf -sfi
+ unlink po/Makevars.template
+ 
+-for d in /usr /usr/local /opt/gettext /usr/pkg $HOME ; do
+-	if test -f $d/share/gettext/gettext.h ; then
+-		ln -sf $d/share/gettext/gettext.h include/gettext.h
+-	fi
+-done
+-
+ test -f "include/gettext.h" || {
+ echo "Error: can't find <gettext.h> convenience C header."
+ echo "Please put a link to it by hand as include/gettext.h"
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch
new file mode 100644
index 0000000..dc58b5b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch
@@ -0,0 +1,124 @@
+From 3a7d5396e633e6c02a4583be7faf3d79d0d33748 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Aug 2017 11:14:41 -0700
+Subject: [PATCH 1/2] replace VLAIS with malloc/free pair
+
+Makes it compatible with non-gnu compilers
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/trace-icmp.c |  7 +++++--
+ src/trace-tcp.c  | 14 ++++++++++----
+ src/trace-udp.c  |  7 +++++--
+ 3 files changed, 20 insertions(+), 8 deletions(-)
+
+diff --git a/src/trace-icmp.c b/src/trace-icmp.c
+index 842938e..c76cb54 100644
+--- a/src/trace-icmp.c
++++ b/src/trace-icmp.c
+@@ -43,16 +43,19 @@ send_echo_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	struct
+ 	{
+ 		struct icmp6_hdr ih;
+-		uint8_t payload[plen - sizeof (struct icmp6_hdr)];
++		uint8_t *payload;
+ 	} packet;
+ 	memset (&packet, 0, plen);
++	packet.payload = malloc(plen - sizeof (struct icmp6_hdr));
+ 
+ 	packet.ih.icmp6_type = ICMP6_ECHO_REQUEST;
+ 	packet.ih.icmp6_id = htons (getpid ());
+ 	packet.ih.icmp6_seq = htons ((ttl << 8) | (n & 0xff));
+ 	(void)port;
+ 
+-	return send_payload (fd, &packet.ih, plen, ttl);
++	ssize_t ret = send_payload (fd, &packet.ih, plen, ttl);
++	free(packet.payload);
++	return ret;
+ }
+ 
+ 
+diff --git a/src/trace-tcp.c b/src/trace-tcp.c
+index 940f918..62d22ff 100644
+--- a/src/trace-tcp.c
++++ b/src/trace-tcp.c
+@@ -54,10 +54,11 @@ send_syn_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	struct
+ 	{
+ 		struct tcphdr th;
+-		uint8_t payload[plen - sizeof (struct tcphdr)];
++		uint8_t *payload;
+ 	} packet;
+ 
+ 	memset (&packet, 0, sizeof (packet));
++	packet.payload = malloc(plen - sizeof (struct tcphdr));
+ 	packet.th.th_sport = sport;
+ 	packet.th.th_dport = port;
+ 	packet.th.th_seq = htonl ((ttl << 24) | (n << 16) | (uint16_t)getpid ());
+@@ -65,7 +66,9 @@ send_syn_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	packet.th.th_flags = TH_SYN | (ecn ? (TH_ECE | TH_CWR) : 0);
+ 	packet.th.th_win = htons (TCP_WINDOW);
+ 
+-	return send_payload (fd, &packet, plen, ttl);
++	ssize_t ret = send_payload (fd, &packet, plen, ttl);
++	free(packet.payload);
++	return ret;
+ }
+ 
+ 
+@@ -131,10 +134,11 @@ send_ack_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	struct
+ 	{
+ 		struct tcphdr th;
+-		uint8_t payload[plen - sizeof (struct tcphdr)];
++		uint8_t *payload;
+ 	} packet;
+ 
+ 	memset (&packet, 0, sizeof (packet));
++	packet.payload = malloc(plen - sizeof (struct tcphdr));
+ 	packet.th.th_sport = sport;
+ 	packet.th.th_dport = port;
+ 	packet.th.th_ack = htonl ((ttl << 24) | (n << 16) | (uint16_t)getpid ());
+@@ -142,7 +146,9 @@ send_ack_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	packet.th.th_flags = TH_ACK;
+ 	packet.th.th_win = htons (TCP_WINDOW);
+ 
+-	return send_payload (fd, &packet, plen, ttl);
++	ssize_t ret = send_payload (fd, &packet, plen, ttl);
++	free(packet.payload);
++	return ret;
+ }
+ 
+ 
+diff --git a/src/trace-udp.c b/src/trace-udp.c
+index 4adde6b..a6cbb07 100644
+--- a/src/trace-udp.c
++++ b/src/trace-udp.c
+@@ -46,9 +46,10 @@ send_udp_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	struct
+ 	{
+ 		struct udphdr uh;
+-		uint8_t payload[plen - sizeof (struct udphdr)];
++		uint8_t *payload;
+ 	} packet;
+ 	memset (&packet, 0, plen);
++	packet.payload = malloc(plen - sizeof (struct udphdr));
+ 
+ 	(void)n;
+ 	packet.uh.uh_sport = sport;
+@@ -61,7 +62,9 @@ send_udp_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	/*if (plen > sizeof (struct udphdr))
+ 		packet.payload[0] = (uint8_t)ttl;*/
+ 
+-	return send_payload (fd, &packet, plen, ttl);
++	ssize_t ret = send_payload (fd, &packet, plen, ttl);
++	free(packet.payload);
++	return ret;
+ }
+ 
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch
new file mode 100644
index 0000000..3cc2ba8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch
@@ -0,0 +1,30 @@
+From 2a50154fbce38fd36be7e14f5cd4a8b03c65c72f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Aug 2017 11:15:37 -0700
+Subject: [PATCH 2/2] Do not undef _GNU_SOURCE
+
+There are functions from tcp.h which are under _GNU_SOURCE
+in musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/trace-tcp.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/trace-tcp.c b/src/trace-tcp.c
+index 62d22ff..380008e 100644
+--- a/src/trace-tcp.c
++++ b/src/trace-tcp.c
+@@ -21,7 +21,6 @@
+ # include <config.h>
+ #endif
+ 
+-#undef _GNU_SOURCE
+ #define _DEFAULT_SOURCE 1
+ 
+ #include <string.h>
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb
deleted file mode 100644
index bea5e13..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-DESCRIPTION = "This package includes some useful diagnostics tools for \
-IPv6 networks, including ndisc6, rdisc6, tcptraceroute6 and traceroute6."
-SECTION = "net"
-HOMEPAGE = "http://www.remlab.net/ndisc6/"
-LICENSE = "GPL-2.0"
-
-# The tcptraceroute6 and tracert6 commands depend on rltraceroute6 to
-# perform the actual trace operation.
-RDEPENDS_${PN}-tcptraceroute6 = "${PN}-rltraceroute6"
-RDEPENDS_${PN}-tracert6 = "${PN}-rltraceroute6"
-RDEPENDS_${PN}-misc += "perl"
-
-SRC_URI = "http://www.remlab.net/files/ndisc6/ndisc6-${PV}.tar.bz2 \
-"
-SRC_URI[md5sum] = "50cb4c19606cf6ff2b7388e71832f579"
-SRC_URI[sha256sum] = "6acec8a0cb9efa3ac98456f46c3016aeec0598b0c7557c95242b5228ad62ca7a"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-inherit autotools gettext
-
-ALLOW_EMPTY_${PN} = "1"
-
-# Split into seperate packages since we normal don't want them all
-# The main package is left empty and therefore not created.
-PACKAGES += "${PN}-ndisc6 ${PN}-tcpspray6 ${PN}-rdisc6 \
-    ${PN}-tcptraceroute6 ${PN}-rltraceroute6 \
-    ${PN}-tracert6 ${PN}-rdnssd ${PN}-misc"
-FILES_${PN}            = ""
-FILES_${PN}-ndisc6        = "${bindir}/ndisc6"
-FILES_${PN}-tcpspray6         = "${bindir}/tcpspray6"
-FILES_${PN}-rdisc6        = "${bindir}/rdisc6"
-FILES_${PN}-tcptraceroute6    = "${bindir}/tcptraceroute6"
-FILES_${PN}-rltraceroute6    = "${bindir}/rltraceroute6"
-FILES_${PN}-tracert6        = "${bindir}/tracert6"
-FILES_${PN}-rdnssd        = "${sbindir}/rdnssd ${sysconfdir}/rdnssd"
-FILES_${PN}-misc                = "${bindir}/dnssort ${bindir}/name2addr ${bindir}/tcpspray ${bindir}/addr2name"
-
-DESCRIPTION_${PN}-ndisc6    = "ICMPv6 Neighbor Discovery tool. \
-Performs IPv6 neighbor discovery in userland. Replaces arping from the \
-IPv4 world."
-DESCRIPTION_${PN}-rdisc6    = "ICMPv6 Router Discovery tool. \
-Queries IPv6 routers on the network for advertised prefixes. Can be used \
-to detect rogue IPv6 routers, monitor legitimate IPv6 routers."
-DESCRITPION_${PN}-tcpspray6    = "Performs bandwidth measurements of TCP \
-sessions between the local system and a remote echo server in either IPv6 \
-or IPv4."
-
-DESCRITPION_${PN}-rdnssd       = "Daemon to autoconfigure the list of DNS \
-servers through slateless IPv6 autoconfiguration."
-
-do_install_append () {
-    rm -rf ${D}${localstatedir}
-    # Enable SUID bit for applications that need it
-    chmod 4555 ${D}${bindir}/rltraceroute6
-    chmod 4555 ${D}${bindir}/ndisc6
-    chmod 4555 ${D}${bindir}/rdisc6
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
new file mode 100644
index 0000000..48a83b8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
@@ -0,0 +1,72 @@
+DESCRIPTION = "This package includes some useful diagnostics tools for \
+IPv6 networks, including ndisc6, rdisc6, tcptraceroute6 and traceroute6."
+SECTION = "net"
+HOMEPAGE = "http://www.remlab.net/ndisc6/"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+PV = "1.0.4+git${SRCPV}"
+SRCREV = "4c794b5512d23c649def1f94a684225dcbb6ac3e"
+SRC_URI = "git://git.remlab.net/git/ndisc6.git;protocol=http \
+           file://0001-replace-VLAIS-with-malloc-free-pair.patch \
+           file://0002-Do-not-undef-_GNU_SOURCE.patch \
+           file://0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools gettext
+
+EXTRA_OECONF += "PERL=${USRBINPATH}/perl"
+
+LDFLAGS += "-fuse-ld=gold"
+TOOLCHAIN = "gcc"
+
+do_configure_prepend() {
+    cp ${STAGING_DATADIR_NATIVE}/gettext/gettext.h ${S}/include
+    ${S}/autogen.sh
+}
+
+do_install_append () {
+    rm -rf ${D}${localstatedir}
+    # Enable SUID bit for applications that need it
+    chmod 4555 ${D}${bindir}/rltraceroute6
+    chmod 4555 ${D}${bindir}/ndisc6
+    chmod 4555 ${D}${bindir}/rdisc6
+}
+ALLOW_EMPTY_${PN} = "1"
+
+# Split into seperate packages since we normal don't want them all
+# The main package is left empty and therefore not created.
+PACKAGES += "${PN}-ndisc6 ${PN}-tcpspray6 ${PN}-rdisc6 \
+    ${PN}-tcptraceroute6 ${PN}-rltraceroute6 \
+    ${PN}-tracert6 ${PN}-rdnssd ${PN}-misc"
+FILES_${PN}            = ""
+FILES_${PN}-ndisc6        = "${bindir}/ndisc6"
+FILES_${PN}-tcpspray6         = "${bindir}/tcpspray6"
+FILES_${PN}-rdisc6        = "${bindir}/rdisc6"
+FILES_${PN}-tcptraceroute6    = "${bindir}/tcptraceroute6"
+FILES_${PN}-rltraceroute6    = "${bindir}/rltraceroute6"
+FILES_${PN}-tracert6        = "${bindir}/tracert6"
+FILES_${PN}-rdnssd        = "${sbindir}/rdnssd ${sysconfdir}/rdnssd"
+FILES_${PN}-misc                = "${bindir}/dnssort ${bindir}/name2addr ${bindir}/tcpspray ${bindir}/addr2name"
+
+DESCRIPTION_${PN}-ndisc6    = "ICMPv6 Neighbor Discovery tool. \
+Performs IPv6 neighbor discovery in userland. Replaces arping from the \
+IPv4 world."
+DESCRIPTION_${PN}-rdisc6    = "ICMPv6 Router Discovery tool. \
+Queries IPv6 routers on the network for advertised prefixes. Can be used \
+to detect rogue IPv6 routers, monitor legitimate IPv6 routers."
+DESCRITPION_${PN}-tcpspray6    = "Performs bandwidth measurements of TCP \
+sessions between the local system and a remote echo server in either IPv6 \
+or IPv4."
+
+DESCRITPION_${PN}-rdnssd       = "Daemon to autoconfigure the list of DNS \
+servers through slateless IPv6 autoconfiguration."
+
+# The tcptraceroute6 and tracert6 commands depend on rltraceroute6 to
+# perform the actual trace operation.
+RDEPENDS_${PN}-tcptraceroute6 = "${PN}-rltraceroute6"
+RDEPENDS_${PN}-tracert6 = "${PN}-rltraceroute6"
+RDEPENDS_${PN}-misc += "perl"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
new file mode 100644
index 0000000..9a6f60e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
@@ -0,0 +1,71 @@
+SUMMARY = "netcf"
+DESCRIPTION = "netcf is a cross-platform network configuration library."
+HOMEPAGE = "https://pagure.io/netcf"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
+
+SRCREV = "2c5d4255857531bc09d91dcd02e86545f29004d4"
+PV .= "+git${SRCPV}"
+
+SRC_URI = "git://pagure.io/netcf.git;protocol=https \
+"
+
+DEPENDS += "augeas libnl libxslt libxml2 gnulib"
+
+S = "${WORKDIR}/git"
+
+inherit gettext autotools pkgconfig systemd
+
+EXTRA_OECONF_append_class-target = " --with-driver=redhat"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
+
+EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
+
+do_configure_prepend() {
+    currdir=`pwd`
+    cd ${S}
+
+    # avoid bootstrap cloning gnulib on every configure
+    # the dir starts out empty from the pkg, but unconditionally blow it
+    # away so if we reconfigure due to gnulib sysroot sig changes, we will
+    # get the newer gnulib content into the build here.
+    rm -rf ${S}/.gnulib
+    cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib
+
+    # --force to avoid errors on reconfigure e.g if recipes changed we depend on
+    # | bootstrap: running: libtoolize --quiet
+    # | libtoolize:   error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
+    # | ...
+    ./bootstrap --force --no-git --gnulib-srcdir=.gnulib
+
+    cd $currdir
+}
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+       install -d ${D}${systemd_unitdir}/system
+       if [ -d "${D}${libdir}/systemd/system" ]; then
+           if [ "${systemd_unitdir}" != "${libdir}/systemd" ] ; then 
+               mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+               rm -rf ${D}${libdir}/systemd/
+	   fi
+       elif [ "${systemd_unitdir}" != "${nonarch_libdir}/systemd" ] ; then 
+           mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${nonarch_libdir}/systemd/
+       fi
+    else
+       mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
+       rm -rf ${D}${sysconfdir}/rc.d/
+    fi
+}
+
+FILES_${PN} += " \
+        ${libdir} \
+        ${nonarch_libdir} \
+        "
+
+SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_git.bb
deleted file mode 100644
index a7a5000..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_git.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-SUMMARY = "netcf"
-DESCRIPTION = "netcf is a cross-platform network configuration library."
-HOMEPAGE = "https://fedorahosted.org/netcf/"
-SECTION = "libs"
-LICENSE = "LGPLv2.1"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
-
-SRCREV = "9158278ad35b46ce9a49b2e887483c6d8c287994"
-PV = "0.2.8+git${SRCPV}"
-
-SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git \
-"
-
-DEPENDS += "augeas libnl libxslt libxml2 gnulib"
-
-S = "${WORKDIR}/git"
-
-inherit gettext autotools pkgconfig systemd
-
-EXTRA_OECONF_append_class-target = " --with-driver=redhat"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
-
-do_configure_prepend() {
-    currdir=`pwd`
-    cd ${S}
-
-    # avoid bootstrap cloning gnulib on every configure
-    # the dir starts out empty from the pkg, but unconditionally blow it
-    # away so if we reconfigure due to gnulib sysroot sig changes, we will
-    # get the newer gnulib content into the build here.
-    rm -rf ${S}/.gnulib
-    cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib
-
-    # --force to avoid errors on reconfigure e.g if recipes changed we depend on
-    # | bootstrap: running: libtoolize --quiet
-    # | libtoolize:   error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
-    # | ...
-    ./bootstrap --force --no-git --gnulib-srcdir=.gnulib
-
-    cd $currdir
-}
-
-do_install_append() {
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-       install -d ${D}${systemd_unitdir}/system
-       if [ -d "${D}${libdir}/systemd/system" ]; then
-           if [ "${systemd_unitdir}" != "${libdir}/systemd" ] ; then 
-               mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
-               rm -rf ${D}${libdir}/systemd/
-	   fi
-       elif [ "${systemd_unitdir}" != "${nonarch_libdir}/systemd" ] ; then 
-           mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
-           rm -rf ${D}${nonarch_libdir}/systemd/
-       fi
-    else
-       mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
-       rm -rf ${D}${sysconfdir}/rc.d/
-    fi
-}
-
-FILES_${PN} += " \
-        ${libdir} \
-        ${nonarch_libdir} \
-        "
-
-SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_2.6.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_2.6.0.bb
deleted file mode 100644
index 650fdae..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_2.6.0.bb
+++ /dev/null
@@ -1,66 +0,0 @@
-SUMMARY = "A networking benchmarking tool"
-DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more."
-SECTION = "net"
-HOMEPAGE = "http://www.netperf.org/"
-LICENSE = "netperf"
-LICENSE_FLAGS = "non-commercial"
-
-
-SRC_URI="ftp://ftp.netperf.org/netperf/archive/netperf-${PV}.tar.bz2 \
-         file://cpu_set.patch \
-         file://vfork.patch \
-         file://init"
-SRC_URI[md5sum] = "9654ffdfd4c4f2c93ce3733cd9ed9236"
-SRC_URI[sha256sum] = "cd8dac710d4273d29f70e8dbd09353a6362ac58a11926e0822233c0cb230323a"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6"
-
-inherit update-rc.d autotools
-
-S = "${WORKDIR}/netperf-${PV}"
-
-# cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros
-CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
-
-# set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files
-# larger than 2GB
-CFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', \
-    ' -D_FILE_OFFSET_BITS=64', '', d)}"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools,"
-
-# autotools.bbclass attends to include m4 files with path depth <= 2 by
-# "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4.
-do_configure_prepend() {
-    test -d ${S}/m4/m4 && mv -f ${S}/m4/m4 ${S}/m4-files
-}
-
-do_install() {
-    sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init
-
-    install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d
-    install -m 4755 src/netperf ${D}${bindir}
-    install -m 4755 src/netserver ${D}${sbindir}
-    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf
-
-    # man
-    install -d ${D}${mandir}/man1/
-    install -m 0644 ${S}/doc/netserver.man ${D}${mandir}/man1/netserver.1
-    install -m 0644 ${S}/doc/netperf.man ${D}${mandir}/man1/netperf.1
-
-    # move scripts to examples directory
-    install -d ${D}${docdir}/netperf/examples
-    install -m 0644 ${S}/doc/examples/*_script ${D}${docdir}/netperf/examples/
-
-    # docs ..
-    install -m 0644 ${S}/COPYING ${D}${docdir}/netperf
-    install -m 0644 ${S}/Release_Notes ${D}${docdir}/netperf
-    install -m 0644 ${S}/README ${D}${docdir}/netperf
-    install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf
-}
-
-RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}"
-
-INITSCRIPT_NAME="netperf"
-INITSCRIPT_PARAMS="defaults"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb
new file mode 100644
index 0000000..f0e0f9c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb
@@ -0,0 +1,66 @@
+SUMMARY = "A networking benchmarking tool"
+DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more."
+SECTION = "net"
+HOMEPAGE = "http://www.netperf.org/"
+LICENSE = "netperf"
+LICENSE_FLAGS = "non-commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6"
+
+PV = "2.7.0+git${SRCPV}"
+
+SRC_URI="git://github.com/HewlettPackard/netperf.git \
+         file://cpu_set.patch \
+         file://vfork.patch \
+         file://init"
+
+SRCREV = "f482bab49fcedee46fc5b755da127f608325cd13"
+
+S = "${WORKDIR}/git"
+
+inherit update-rc.d autotools
+
+# cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros
+CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
+
+# set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files
+# larger than 2GB
+CFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', \
+    ' -D_FILE_OFFSET_BITS=64', '', d)}"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools,"
+
+# autotools.bbclass attends to include m4 files with path depth <= 2 by
+# "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4.
+do_configure_prepend() {
+    test -d ${S}/m4/m4 && mv -f ${S}/m4/m4 ${S}/m4-files
+}
+
+do_install() {
+    sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init
+
+    install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d
+    install -m 4755 src/netperf ${D}${bindir}
+    install -m 4755 src/netserver ${D}${sbindir}
+    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf
+
+    # man
+    install -d ${D}${mandir}/man1/
+    install -m 0644 ${S}/doc/netserver.man ${D}${mandir}/man1/netserver.1
+    install -m 0644 ${S}/doc/netperf.man ${D}${mandir}/man1/netperf.1
+
+    # move scripts to examples directory
+    install -d ${D}${docdir}/netperf/examples
+    install -m 0644 ${S}/doc/examples/*_script ${D}${docdir}/netperf/examples/
+
+    # docs ..
+    install -m 0644 ${S}/COPYING ${D}${docdir}/netperf
+    install -m 0644 ${S}/Release_Notes ${D}${docdir}/netperf
+    install -m 0644 ${S}/README ${D}${docdir}/netperf
+    install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf
+}
+
+RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}"
+
+INITSCRIPT_NAME="netperf"
+INITSCRIPT_PARAMS="defaults"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch
deleted file mode 100644
index d1d5f9c..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 71fdfdfcea2bfa5f522512366bfcdf95f861ecc6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 23 Apr 2017 23:44:37 -0700
-Subject: [PATCH] lib/yp_all_host.c: Fix build with gcc 7
-
-fixes
-
-| ../../../../../../../workspace/sources/yp-tools/lib/yp_all_host.c: In function 'yp_all_host':
-| ../../../../../../../workspace/sources/yp-tools/lib/yp_all_host.c:109:30: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
-|        inmap == NULL || inmap == '\0')
-|                               ^~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/yp_all_host.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/yp_all_host.c b/lib/yp_all_host.c
-index 59cf236..4a07a7e 100644
---- a/lib/yp_all_host.c
-+++ b/lib/yp_all_host.c
-@@ -106,7 +106,7 @@ yp_all_host (const char *indomain, const char *inmap,
- 
-   if (hostname == NULL || hostname[0] == '\0' ||
-       indomain == NULL || indomain[0] == '\0' ||
--      inmap == NULL || inmap == '\0')
-+      inmap == NULL || inmap[0] == '\0')
-     return YPERR_BADARGS;
- 
-   res = YPERR_YPERR;
--- 
-2.12.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch
new file mode 100644
index 0000000..3d4d4f2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch
@@ -0,0 +1,28 @@
+From 420cb6927553bbca5b49b7681cf208e6df6e4d7c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Sep 2017 08:42:45 -0700
+Subject: [PATCH 1/2] ypbind3_binding_dup.c: Include string.h for strdup
+ declaration
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ lib/ypbind3_binding_dup.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/ypbind3_binding_dup.c b/lib/ypbind3_binding_dup.c
+index ce4aadf..8199c0b 100644
+--- a/lib/ypbind3_binding_dup.c
++++ b/lib/ypbind3_binding_dup.c
+@@ -19,6 +19,7 @@
+ 
+ #if defined(HAVE_YPBIND3)
+ 
++#include <string.h>
+ #include <rpcsvc/yp_prot.h>
+ #include "internal.h"
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch
new file mode 100644
index 0000000..0562e58
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch
@@ -0,0 +1,30 @@
+From 03ccabb6264c008430c4b1739351df5a63829f8e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Sep 2017 08:52:32 -0700
+Subject: [PATCH 2/2] yp_dump_bindings.c: Include string.h for memset
+
+Fixes
+error: implicitly declaring library function 'memset'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ src/yp_dump_binding.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/yp_dump_binding.c b/src/yp_dump_binding.c
+index a5ab920..d75e2c2 100644
+--- a/src/yp_dump_binding.c
++++ b/src/yp_dump_binding.c
+@@ -26,6 +26,7 @@
+ #include <libintl.h>
+ #include <locale.h>
+ #include <getopt.h>
++#include <string.h>
+ #include <sys/stat.h>
+ #include <arpa/inet.h>
+ #include <rpcsvc/ypclnt.h>
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch
deleted file mode 100644
index be9b62b..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-yp-tools: avoid fatal cast warning
-
-The way casting is done, we will get a fatal alignment warning on some
-architectures.  This patch cheats our way around this.
-
-We also eliminate an unused constant which causes a fatal warning.
-
-Upstream-status: Inappropriate [code does not exist in version 4.x]
-
-Signed-off-by: Joe Slater <jslater@windriver.com>
-
---- a/lib/do_ypcall.c
-+++ b/lib/do_ypcall.c
-@@ -44,7 +44,6 @@ struct dom_binding
- typedef struct dom_binding dom_binding;
- 
- static const struct timeval RPCTIMEOUT = {25, 0};
--static const struct timeval UDPTIMEOUT = {5, 0};
- static int const MAXTRIES = 2;
- static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
- static dom_binding *ypbindlist = NULL;
-@@ -381,7 +380,7 @@ __ypclnt_call (u_long prog, xdrproc_t xa
- 
- int
- do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
--	   caddr_t req, xdrproc_t xres, caddr_t resp)
-+	   caddr_t req, xdrproc_t xres, void *resp)
- {
-   dom_binding *ydb;
-   int status;
-@@ -450,7 +449,7 @@ do_ypcall (const char *domain, u_long pr
- /* Like do_ypcall, but translate the status value if necessary.  */
- int
- do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
--	      caddr_t req, xdrproc_t xres, caddr_t resp)
-+	      caddr_t req, xdrproc_t xres, void *resp)
- {
-   int status = do_ypcall (domain, prog, xargs, req, xres, resp);
-   if (status == YPERR_SUCCESS)
---- a/lib/internal.h
-+++ b/lib/internal.h
-@@ -17,8 +17,8 @@
- #define _INTERNAL_H_
- 
- extern int do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
--		      caddr_t req, xdrproc_t xres, caddr_t resp);
-+		      caddr_t req, xdrproc_t xres, void *resp);
- extern int do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
--			 caddr_t req, xdrproc_t xres, caddr_t resp);
-+			 caddr_t req, xdrproc_t xres, void *resp);
- extern int yp_maplist (const char *, struct ypmaplist **);
- #endif
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
deleted file mode 100644
index 9ef569f..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From a1ef10d63b0ea34c788d5432e94c72b00ae55e04 Mon Sep 17 00:00:00 2001
-From: Joe MacDonald <joe_macdonald@mentor.com>
-Date: Fri, 27 Feb 2015 12:04:10 -0500
-Subject: [PATCH] ipv4/ipv6: Provide an in-place version of mapv4v6addr.h
-
-mapv4v6addr.h isn't always available, depending on your build, but
-nis-hosts.c only needs it for a single, inline function.  So drop a copy
-here rather than playing games with the include path that would
-potentially lead to cross-compilation issues.
-
-Upstream-status: Inappropriate [embedded specific]
-
-Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
----
- nss_nis6/mapv4v6addr.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++
- nss_nis6/nis-hosts.c   |  2 +-
- 2 files changed, 70 insertions(+), 1 deletion(-)
- create mode 100644 nss_nis6/mapv4v6addr.h
-
-diff --git a/nss_nis6/mapv4v6addr.h b/nss_nis6/mapv4v6addr.h
-new file mode 100644
-index 0000000..7f85f7d
---- /dev/null
-+++ b/nss_nis6/mapv4v6addr.h
-@@ -0,0 +1,69 @@
-+/*
-+ * ++Copyright++ 1985, 1988, 1993
-+ * -
-+ * Copyright (c) 1985, 1988, 1993
-+ *    The Regents of the University of California.  All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ *    notice, this list of conditions and the following disclaimer in the
-+ *    documentation and/or other materials provided with the distribution.
-+ * 4. Neither the name of the University nor the names of its contributors
-+ *    may be used to endorse or promote products derived from this software
-+ *    without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-+ * SUCH DAMAGE.
-+ * -
-+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies, and that
-+ * the name of Digital Equipment Corporation not be used in advertising or
-+ * publicity pertaining to distribution of the document or software without
-+ * specific, written prior permission.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
-+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
-+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+ * SOFTWARE.
-+ * -
-+ * --Copyright--
-+ */
-+
-+#include <string.h>
-+#include <arpa/nameser.h>
-+
-+static void
-+map_v4v6_address (const char *src, char *dst)
-+{
-+  u_char *p = (u_char *) dst;
-+  int i;
-+
-+  /* Move the IPv4 part to the right position.  */
-+  memcpy (dst + 12, src, INADDRSZ);
-+
-+  /* Mark this ipv6 addr as a mapped ipv4. */
-+  for (i = 0; i < 10; i++)
-+    *p++ = 0x00;
-+  *p++ = 0xff;
-+  *p = 0xff;
-+}
-diff --git a/nss_nis6/nis-hosts.c b/nss_nis6/nis-hosts.c
-index af99c74..96d8fa1 100644
---- a/nss_nis6/nis-hosts.c
-+++ b/nss_nis6/nis-hosts.c
-@@ -36,7 +36,7 @@
- #include "nss-nis6.h"
- 
- /* Get implementation for some internal functions. */
--#include <resolv/mapv4v6addr.h>
-+#include "mapv4v6addr.h"
- 
- #define ENTNAME         hostent
- #define DATABASE        "hosts"
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb
deleted file mode 100644
index 7bd4630..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-# This package builds tools to manage NIS
-# The source package is utils/net/NIS/yp-tools
-#
-require nis.inc
-
-SUMMARY = "NIS client programs"
-DESCRIPTION = " \
-Network Information Service tools.  \
-This package contains ypcat, ypmatch, ypset, \
-ypwhich, yppasswd, domainname, nisdomainname \
-and ypdomainname. \
-"
-
-SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
-           file://domainname.service \
-           file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \
-           file://alignment-cheat.patch \
-           file://0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch \
-           "
-SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
-SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50"
-
-DEPENDS = "libtirpc"
-
-inherit autotools systemd
-SYSTEMD_SERVICE_${PN} = "domainname.service"
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-
-CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
-
-EXTRA_OECONF = " \
-                --disable-rpath \
-                --libdir=${libdir}/yp-nis/ \
-                --includedir=${includedir}/yp-nis/ \
-               "
-
-FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
-FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"
-FILES_${PN}-dev += " ${libdir}/yp-nis/*.so ${libdir}/yp-nis/*.so.[12] ${libdir}/yp-nis/*.la"
-FILES_${PN}-staticdev += " ${libdir}/yp-nis/*.a"
-
-do_install_append() {
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.2.bb
new file mode 100644
index 0000000..9ac9738
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.2.bb
@@ -0,0 +1,46 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+require nis.inc
+
+SUMMARY = "NIS client programs"
+DESCRIPTION = " \
+Network Information Service tools.  \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname. \
+"
+
+SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
+           file://domainname.service \
+           file://0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch \
+           file://0002-yp_dump_bindings.c-Include-string.h-for-memset.patch \
+           "
+SRC_URI[md5sum] = "fb4a8bffb44ae5d3390351d67f320ef3"
+SRC_URI[sha256sum] = "137f19a986382b275bf4a2b1a69eb26689d6f4ac056ddaa21784d6b80eb98faa"
+
+DEPENDS = "libtirpc libnsl2"
+
+inherit autotools systemd
+SYSTEMD_SERVICE_${PN} = "domainname.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
+
+EXTRA_OECONF = " \
+                --disable-rpath --disable-domainname \
+               "
+CFLAGS_append_libc-musl = " -Wno-error=cpp"
+
+FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
+FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"
+FILES_${PN}-dev += " ${libdir}/yp-nis/*.so ${libdir}/yp-nis/*.so.[12] ${libdir}/yp-nis/*.la"
+FILES_${PN}-staticdev += " ${libdir}/yp-nis/*.a"
+
+do_install_append() {
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch
new file mode 100644
index 0000000..643b0a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch
@@ -0,0 +1,67 @@
+From 5452961750275b1e3f7c95e9528338f0ee0357ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 09:17:35 -0700
+Subject: [PATCH] dns_hosts: Fix build with musl
+
+Add NETDB_* defines which are not available in musl
+remove need for sys/cdefs.h by remove __P
+Add _GNU_SOURCE for missing u_char definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ lib/Makefile.am | 2 +-
+ lib/dns_hosts.c | 9 ++++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 977a8db..35cb5b3 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -8,7 +8,7 @@
+ noinst_LIBRARIES = libcompat.a
+ noinst_HEADERS = ypbind3_binding.h
+ 
+-AM_CFLAGS = -D_REENTRANT=1 @WARNFLAGS@
++AM_CFLAGS = -D_GNU_SOURCE -D_REENTRANT=1 @WARNFLAGS@
+ AM_CPPFLAGS = -I$(srcdir) @TIRPC_CFLAGS@ @NSL_CFLAGS@ -DLOCALEDIR=\"$(localedir)\"
+ 
+ libcompat_a_SOURCES = dns_hosts.c res_options.h ypbind3_binding_dup.c \
+diff --git a/lib/dns_hosts.c b/lib/dns_hosts.c
+index fd421fd..6067879 100644
+--- a/lib/dns_hosts.c
++++ b/lib/dns_hosts.c
+@@ -64,6 +64,7 @@
+ 
+ #include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <arpa/nameser.h>
+@@ -84,6 +85,12 @@ extern struct hostent *_gethtbyaddr(const char *, int, int);
+ #ifndef LOG_AUTH
+ # define LOG_AUTH 0
+ #endif
++#ifndef NETDB_SUCCESS
++# define NETDB_SUCCESS 0
++#endif
++#ifndef NETDB_INTERNAL
++# define NETDB_INTERNAL -1
++#endif
+ 
+ #define MULTI_PTRS_ARE_ALIASES 1	/* XXX - experimental */
+ 
+@@ -101,7 +108,7 @@ static char hostbuf[8*1024];
+ static struct in_addr host_addr;
+ 
+ #ifdef RESOLVSORT
+-static void addrsort __P((char **, int));
++static void addrsort (char **, int);
+ #endif
+ 
+ #if PACKETSZ > 1024
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb
deleted file mode 100644
index b9c0aa7..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-# This package builds the NIS ypbind daemon
-# The source package is utils/net/NIS/ypbind-mt
-#
-require nis.inc
-
-DESCRIPTION = " \
-Multithreaded NIS bind service (ypbind-mt).  \
-ypbind-mt is a complete new implementation of a NIS \
-binding daemon for Linux. It has the following \
-features.  Supports ypbind protocol V1 and V2.  \
-Uses threads for better response.  Supports multiple \
-domain bindings.  Supports /var/yp/binding/* file \
-for Linux libc 4/5 and glibc 2.x.  Supports a list \
-of known secure NIS server (/etc/yp.conf) Binds to \
-the server which answered as first. \
-\
-This is the final IPv4-only version of ypbind-mt. \
-"
-HOMEPAGE = "http://www.linux-nis.org/nis/ypbind-mt/index.html"
-DEPENDS = " \
-           yp-tools \
-           ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
-          "
-RDEPENDS_${PN} += "yp-tools"
-
-# ypbind-mt now provides all the functionality of ypbind
-# and is used in place of it.
-PROVIDES += "ypbind"
-
-SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind.init \
-           file://ypbind.service \
-"
-SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1"
-SRC_URI[sha256sum] = "1930ce19f6ccfe10400f3497b31867f71690d2bcd3f5b575199fa915559b7746"
-
-inherit systemd update-rc.d
-
-SYSTEMD_SERVICE_${PN} = "ypbind.service"
-INITSCRIPT_NAME = "ypbind"
-INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
-
-CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
-
-do_install_append () {
-    install -d ${D}${sysconfdir}/init.d
-    install -d ${D}${sysconfdir}/rcS.d
-
-    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
-}
-
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb
deleted file mode 100644
index 0b7e504..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-# This package builds the NIS ypbind daemon
-# The source package is utils/net/NIS/ypbind-mt
-#
-require nis.inc
-
-DESCRIPTION = " \
-Multithreaded NIS bind service (ypbind-mt).  \
-ypbind-mt is a complete new implementation of a NIS \
-binding daemon for Linux. It has the following \
-features.  Supports ypbind protocol V1 and V2.  \
-Uses threads for better response.  Supports multiple \
-domain bindings.  Supports /var/yp/binding/* file \
-for Linux libc 4/5 and glibc 2.x.  Supports a list \
-of known secure NIS server (/etc/yp.conf) Binds to \
-the server which answered as first. \
-"
-HOMEPAGE = "http://www.linux-nis.org/nis/ypbind-mt/index.html"
-DEPENDS = "yp-tools ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-PROVIDES += "ypbind"
-
-PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
-           file://ypbind.init \
-           file://ypbind.service \
-"
-SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8"
-SRC_URI[sha256sum] = "dc2f7d97c94dcab0acfdcd115cd8b464eb8c427e4bb0fe68404ae7465f517cd3"
-
-inherit systemd update-rc.d
-
-SYSTEMD_SERVICE_${PN} = "ypbind.service"
-INITSCRIPT_NAME = "ypbind"
-INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
-
-CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
-
-EXTRA_OECONF = "PKG_CONFIG_PATH='${STAGING_LIBDIR}/yp-nis/pkgconfig/'"
-
-do_install_append () {
-    install -d ${D}${sysconfdir}/init.d
-    install -d ${D}${sysconfdir}/rcS.d
-
-    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
-}
-
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb
new file mode 100644
index 0000000..9822f45
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb
@@ -0,0 +1,62 @@
+# This package builds the NIS ypbind daemon
+# The source package is utils/net/NIS/ypbind-mt
+#
+require nis.inc
+
+DESCRIPTION = " \
+Multithreaded NIS bind service (ypbind-mt).  \
+ypbind-mt is a complete new implementation of a NIS \
+binding daemon for Linux. It has the following \
+features.  Supports ypbind protocol V1 and V2.  \
+Uses threads for better response.  Supports multiple \
+domain bindings.  Supports /var/yp/binding/* file \
+for Linux libc 4/5 and glibc 2.x.  Supports a list \
+of known secure NIS server (/etc/yp.conf) Binds to \
+the server which answered as first. \
+\
+This is the final IPv4-only version of ypbind-mt. \
+"
+HOMEPAGE = "http://www.linux-nis.org/nis/ypbind-mt/index.html"
+DEPENDS = " \
+           yp-tools \
+           ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+          "
+DEPENDS_append_libc-musl = " bsd-headers nss"
+RDEPENDS_${PN} += "yp-tools"
+
+# ypbind-mt now provides all the functionality of ypbind
+# and is used in place of it.
+PROVIDES += "ypbind"
+
+SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
+           file://ypbind.init \
+           file://ypbind.service \
+           file://0001-dns_hosts-Fix-build-with-musl.patch \
+           "
+SRC_URI[md5sum] = "1aeccd0d11c064d5d59c56941bca682b"
+SRC_URI[sha256sum] = "a2e1fa8fc992a12b289c229e00e38c20d59070c3bcf08babf40c692515c340e0"
+
+inherit systemd update-rc.d
+
+SYSTEMD_SERVICE_${PN} = "ypbind.service"
+INITSCRIPT_NAME = "ypbind"
+INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
+
+CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
+
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/nss3"
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/rcS.d
+
+    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
+}
+
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
new file mode 100644
index 0000000..81ffeec
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
@@ -0,0 +1,26 @@
+From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 13:56:24 -0700
+Subject: [PATCH] nDPI: Include sys/types.h
+
+Needed for uint_t types
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ nDPI/src/include/ipq_api.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
+===================================================================
+--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
+@@ -24,6 +24,7 @@
+ #ifndef __IPOQUE_API_INCLUDE_FILE__

+ #define __IPOQUE_API_INCLUDE_FILE__

+ 

++#include <sys/types.h>

+ 

+ #if defined(HAVE_NTOP) && defined(WIN32)

+ #include <winsock2.h>

diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service
new file mode 100644
index 0000000..1ead2a0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=A network traffic probe similar to the UNIX top command
+Requires=network.target
+
+ConditionPathExists=@SYSCONFDIR@/ntop.conf
+After=syslog.target network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/ntop-helper start
+ExecStop=@LIBEXECDIR@/ntop-helper stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch
new file mode 100644
index 0000000..392cb08
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch
@@ -0,0 +1,164 @@
+1)add --with-pcap-config option to use libpcap's pcap-config
+2)add AC_CHECK_LIB if user didn't specify PCAP_ROOT and pcap-config
+  put it before host check to make cross-compiling easier.
+  pcap doesn't need extra include and libs so it is fine.
+3)remove old rrd configure code but use pkg-config to config rrd
+  rrdtool should have the pkg-config file installed.
+4)fix python-config
+5)change AC_TRY_RUN to AC_COMPILE_IFELSE for pthread_rwlock_t checking
+6)fix a net-snmp-config bug
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/configure.in b/configure.in
+index 0c7c0a5..cad40be 100644
+--- a/configure.in
++++ b/configure.in
+@@ -230,14 +230,14 @@ dnl>
+ AC_ARG_WITH(void,
+               [  +-External-source-locations:-------------------------------------------------+])
+ 
+-AC_ARG_WITH(  rrd-home,
+-              [  --with-rrd-home=DIR        Usually /usr/local/rrdtool-1.2.x],
+-              RRD_HOME="$withval",
+-              RRD_HOME=/usr/local/rrdtool-1.2.19)
+ AC_ARG_WITH(  pcap-root,
+               [  --with-pcap-root=DIR        LBNL pcap located in DIR],
+               PCAP_ROOT="$withval",
+               PCAP_ROOT=)
++AC_ARG_WITH(  pcap-config,
++              [  --with-pcap-config=path/pcap-config where to find pcap-config],
++              PCAP_CONFIG="$withval",
++              PCAP_CONFIG=)
+ AC_ARG_WITH(  gdbm-root,
+               [  --with-gdbm-root=DIR        gdbm located in DIR],
+               GDBM_DIRECTORY="$withval",
+@@ -556,6 +556,7 @@ if test ".${PCAPRING_DIR}" != .; then
+ else
+ 
+ TMP_ROOT=${HOME}/PF_RING/userland/libpcap/
++FOUND_PCAP=1
+ if test ".${PCAP_ROOT}" == . &&
+    test -d ${TMP_ROOT} &&
+    test -r ${TMP_ROOT}/libpcap.a; then
+@@ -563,6 +564,18 @@ if test ".${PCAP_ROOT}" == . &&
+        CORELIBS="${CORELIBS} -L${TMP_ROOT} -L${HOME}/PF_RING/userland/lib -lpfring -lpcap "
+        INCS="${INCS} -I ${PCAP_ROOT}"
+        AC_MSG_RESULT([found in $PCAP_ROOT])
++elif test -n "${PCAP_CONFIG}" && test -x "${PCAP_CONFIG}"; then
++       CORELIBS="${CORELIBS} $(${PCAP_CONFIG} --libs)" 
++       INCS="${INCS} $(${PCAP_CONFIG} --cflags)"
++       AC_DEFINE_UNQUOTED(HAVE_LIBPCAP, 1, [have libpcap ])
++       AC_MSG_RESULT([found pcap-config: $PCAP_CONFIG, libs:$(${PCAP_CONFIG} --libs) cflags:$(${PCAP_CONFIG} --cflags)])
++else
++     AC_CHECK_LIB(pcap, pcap_lookupdev, ,
++        [FOUND_PCAP=])
++fi
++
++if test -n "$FOUND_PCAP"; then
++	:
+ elif test ".${PCAP_ROOT}" != .; then
+   if test -d $PCAP_ROOT &&
+      test -r $PCAP_ROOT/lib/libpcap.a &&
+@@ -880,44 +893,11 @@ AC_CHECK_LIB([z], [zlibVersion], [], [
+         exit -1
+         ])
+ 
+-# RRD
+-if test -d "$RRD_HOME"; then
+-   AC_MSG_RESULT(checking for RRD home... yes)
+-else
+-   RRD_HOME=/usr/local/rrdtool
+-   if test -d "$RRD_HOME"; then
+-      AC_MSG_RESULT(Checking rrdtool in $RRD_HOME)
+-   else
+-      RRD_HOME=/usr/local
+-   fi
+-fi
+-
+-RRD_LIB="-L${RRD_HOME}/lib -lrrd_th"
+-
+-if test -f "$RRD_HOME/lib/librrd_th.so"; then
+-   AC_MSG_RESULT(checking for rrdtool... yes)
+-else
+-  if test -f "$RRD_HOME/lib/librrd_th.dylib"; then # OSX
+-     AC_MSG_RESULT(checking for rrdtool... yes)
+-  else
+-     if test -f "$RRD_HOME/lib/librrd_th.a"; then
+-       AC_MSG_RESULT(checking for rrdtool... yes)
+-     else
+-       AC_CHECK_LIB([rrd_th], [main])
+-       if test ".${ac_cv_lib_rrd_th_main}" != ".yes"; then
+-         AC_MSG_ERROR(Unable to find RRD at $RRD_HOME: please use --with-rrd-home=DIR);
+-	 AC_MSG_ERROR(RRD source can be downloaded from http://www.rrdtool.org/);
+-       else
+-         RRD_LIB=
+-       fi
+-     fi
+-  fi
+-fi
+-
+-RRD_INC=
+-if test -d "${RRD_HOME}/include"; then
+-  RRD_INC="-I${RRD_HOME}/include"
+-fi
++PKG_CHECK_MODULES( [RRD], [librrd] )
++AC_SUBST(RRD_CFLAGS)
++AC_SUBST(RRD_LIBS)
++RRD_INC=$RRD_FLAGS
++RRD_LIB=$RRD_LIBS
+ 
+ dnl> The failed recheck stuff below is courtesy of Chris Turbeville [turbo@verio.net]
+ dnl> Chris developed this for Solaris 9, confirming work I had done earlier for FreeBSD
+@@ -1041,7 +1021,7 @@ AC_CHECK_HEADERS([sched.h sys/sched.h])
+ AC_CHECK_HEADERS([pthread.h])
+ 
+ AC_MSG_CHECKING([if r/w locks are supported])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <pthread.h>
+ 
+ int main()
+@@ -1443,15 +1423,15 @@ dnl> NET-SNMP
+ dnl>
+ if test ".${ac_disable_snmp}" != ".yes"; then
+   AC_CHECK_TOOL(NETSNMP, net-snmp-config)
+-  if test "x$ac_cv_prog_ac_ct_NETSNMP" = "xnet-snmp-config"; then
++  if test -n "$NETSNMP"; then
+     AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported])
+-    SNMPLIBS="`net-snmp-config --libs`"
++    SNMPLIBS="`$NETSNMP --libs`"
+     SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`"
+     echo "net-snmp libs: ${SNMPLIBS}"
+     LIBS="${LIBS} ${SNMPLIBS}"
+ dnl remove unecessary path
+     LIBS=`echo ${LIBS}|sed -e s,'-R../lib',,g`
+-    INCS="${INCS} `net-snmp-config --cflags`"
++    INCS="${INCS} `$NETSNMP --cflags`"
+   else
+     AC_MSG_RESULT(NETSNMP is not present: SNMP support is disabled)
+   fi
+@@ -1464,10 +1444,9 @@ SAVED_LIBS=$LIBS
+ dnl>
+ dnl> PYTHON
+ dnl>
+-  AC_CHECK_TOOL(PYTHON, python-config)
+-  PYTHON_CONFIG=""
++  AC_CHECK_TOOL(PYTHON_CONFIG, python-config)
+ 
+-  if test "x$ac_cv_prog_ac_ct_PYTHON" != "xpython-config"; then   
++  if test -z "$PYTHON_CONFIG"; then   
+        if test -f "/etc/debian_version"; then
+        	   AC_MSG_RESULT(Please install python-dev and rerun configure)
+ 	   exit 1
+@@ -1481,8 +1460,6 @@ dnl>
+           PYTHON_CONFIG="python-config"
+         fi
+      fi
+-  else
+-     PYTHON_CONFIG="python-config"
+   fi
+ 
+   if test "x$PYTHON_CONFIG" != "x"; then
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch
new file mode 100644
index 0000000..269138d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch
@@ -0,0 +1,21 @@
+Check net-snmp-config's existence in case user specified the
+ac_cv_prog_NETSNMP to avoid HAVE_SNMP defined if the specified
+net-snmp-config doesn't exist.
+
+Upstream-Status: Inappropriate [Embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/configure.in b/configure.in
+index 6f3e88f..8ddf017 100755
+--- a/configure.in
++++ b/configure.in
+@@ -1423,7 +1423,7 @@ dnl> NET-SNMP
+ dnl>
+ if test ".${ac_disable_snmp}" != ".yes"; then
+   AC_CHECK_TOOL(NETSNMP, net-snmp-config)
+-  if test -n "$NETSNMP"; then
++  if test -n "$NETSNMP" -a -e "$NETSNMP"; then
+     AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported])
+     SNMPLIBS="`$NETSNMP --libs`"
+     SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch
new file mode 100644
index 0000000..e7684c1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch
@@ -0,0 +1,228 @@
+Modify ntop.init to WRLinux 5.0 style.
+
+Fix a small problem that when ntop not running,
+/etc/init.d/ntop stop will return 1
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+ packages/RedHat/ntop.init |  102 +++++++++-----------------------------------
+ 1 files changed, 21 insertions(+), 81 deletions(-)
+
+diff --git a/packages/RedHat/ntop.init b/packages/RedHat/ntop.init
+index 40d49f1..a189c59 100755
+--- a/packages/RedHat/ntop.init
++++ b/packages/RedHat/ntop.init
+@@ -10,19 +10,9 @@
+ #           You have set the admin password - read docs/1STRUN.txt
+ #           You have created /etc/ntop.conf with appropriate parameters.
+ 
+-#  To identify an interface to ntop, use the following flags 
+-#  in /etc/sysconfig/network-scripts/ifcfg-ethx
+-
+-#   NTOP="yes"      <--- means for ntop to use this interface
+-#   NTOPCONFIG="yes"  <--- means for ntop to configure this interface
+-
+ # Note that if you give a -i parameter in either /etc/ntop.conf or
+ # the command line, the scan is NOT performed.  
+ 
+-# However, when it comes to the configuration step, with NTOPCONFIG="yes"
+-# the interface is configured regardless of how the interface list was
+-# specified.
+-
+ #
+ #  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ # 
+@@ -107,11 +97,7 @@ ntopusesyslog="local3"
+ invoked=$0
+ 
+ # Source function library.
+-. /etc/rc.d/init.d/functions
+-
+-# Source networking configuration.
+-. /etc/sysconfig/network
+-
++. /etc/init.d/functions
+ 
+ # Basic sanity checks...
+ if ! [ -x $prog ]; then
+@@ -124,16 +110,6 @@ if ! [ -x $prog ]; then
+   exit 1
+ fi
+ 
+-if [ ${NETWORKING} = "no" ]; then
+-  echo ""
+-  echo "ERROR -"
+-  echo "        Networking is not up!"
+-  echo ""
+-  echo "Aborting..."
+-  echo ""
+-  exit 1
+-fi
+-
+ if ! [ -f ${conf} ]; then
+   echo ""
+   echo "ERROR -"
+@@ -180,8 +156,8 @@ fi
+ if [ "${debug}" = "y" ]; then echo "DEBUG: parm file temp is ${parmfile}"; fi
+  
+ cmd=`echo \
+-    @${conf} \
+     -i tbd \
++    @${conf} \
+     $extra $@`
+ 
+ echo ${cmd} | awk ' \
+@@ -305,42 +281,6 @@ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD -      Configuration
+ 
+ # Build list of interfaces, e.g  eth0 eth1 eth1:1
+ # (Yeah, we'll have to convert that to eth0,eth1,eth1:1 later
+-if [ ".${ntopinterface}" = ".tbd" ]; then
+-
+-    ntopinterface=""
+-    iflist=`ip link show | \
+-        awk '/^[0-9]*:\ eth/ { printf("%s ", substr($2, 1, length($2)-1)) }'`
+-    logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Scanning all interfaces $iflist"
+-    if [ "${debug}" = "y" ]; then echo "DEBUG: Interface candidates are ${iflist}"; fi
+-
+-    for eth in $iflist; do
+-
+-       if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp]=['\"]?[Yy][Ee][Ss]['\"]?" \
+-                /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+-            logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntop=yes, skipping"
+-            if [ "${debug}" = "y" ]; then echo "DEBUG: $eth not ntop=yes"; fi
+-            continue
+-       fi
+-
+-       ntopinterface="${ntopinterface} $eth"
+-  
+-       ip=`ip addr show $eth | \
+-           awk '/inet/ { printf("%s", substr($2, 1, index($2, "/")-1)) }'`
+-
+-       if [ ".$ip" = "." ]; then
+-           is="is unnumbered interface"
+-       else
+-           is="has IP address $ip"
+-       fi
+-       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is ntop=yes, ${is}"
+-       if [ "${debug}" = "y" ]; then echo "DEBUG: $eth ntop=yes, ${is}"; fi
+-
+-    done
+-
+-else
+-    logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Skipping interface scan - list in parms"
+-fi
+-
+ if [ "x${ntopinterface}" = "x" ]; then
+   ntopinterface="none"
+ fi
+@@ -462,12 +402,6 @@ config_interfaces () {
+           if="${if},${eth}"
+       fi
+ 
+-       if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp][Cc].*=['\"]?[Yy][Ee][Ss]['\"]?" \
+-                /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+-            logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntopconfigure=yes, skipping"
+-            continue
+-       fi
+-
+       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Configuring $eth"
+       if [ "${debug}" = "y" ]; then echo "DEBUG: Configuring $eth"; fi
+ 
+@@ -527,7 +461,7 @@ start () {
+   show_extra
+   config_interfaces
+ 
+-  cmd=`echo $prog \
++  cmd=`echo \
+                @${conf} \
+                -i $if \
+                $extra $@`
+@@ -541,7 +475,7 @@ start () {
+   if [ ".${ldlibpath}" != "." ]; then
+     export LD_LIBRARY_PATH="${ldlibpath}"
+   fi
+-  daemon ${cmd}
++  start-stop-daemon --start --quiet --exec $prog -- ${cmd}
+   RETVAL=$?
+ 
+   [ $RETVAL = 0 ] && touch /var/lock/subsys/${name}${instance}
+@@ -551,6 +485,7 @@ start () {
+ stop () {
+   # stop daemon
+ 
++  NOT_RUNNING=1
+   RETVAL=1
+   echo -n $"Stopping ${name}${instance}: "
+   logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Stopping: ${name}${instance}"
+@@ -563,13 +498,14 @@ stop () {
+     if [ $rc = 0 ]; then
+       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Sending SIGTERM to ${pid}"
+       if [ "${debug}" = "y" ]; then echo "Sending SIGTERM to ${pid}"; fi
+-      kill -s SIGTERM ${pid}
++      kill -TERM ${pid} 2>&1 > /dev/null
+       RETVAL=$?
+       rm -f ${ntopdbfilepath}/ntop.pid
+     else 
+       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unable to find process ${pid} ... will kill by name"
+       if [ "${debug}" = "y" ]; then echo "Unable to find process ${pid} ... will kill by name"; fi
+     fi
++    NOT_RUNNING=0
+   else
+ 
+     logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unable to find ${ntopdbfilepath}/ntop.pid file ... will kill by name"
+@@ -577,15 +513,16 @@ stop () {
+ 
+   fi
+ 
+-  echo 
+-
+   if [ $RETVAL != 0 ]; then
+     pids=`ps axf | grep '\/usr\/bin\/ntop' | awk '{ printf(" %s", $1) }; END { print "" }'`
+-    if [ "${pids}" != " " ]; then
++    if [ "${pids}" != "" ]; then
+       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Sending SIGTERM to ${prog}...${pids}"
+       if [ "${debug}" = "y" ]; then echo "Sending SIGTERM to ${prog}...${pids}"; fi
+-      kill -INT ${pids}
++      kill -TERM ${pids} > /dev/null 2>&1
+       RETVAL=$?
++      NOT_RUNNING=0
++    else
++      NOT_RUNNING=1
+     fi
+   fi
+ 
+@@ -597,13 +534,9 @@ stop () {
+       if [ "${debug}" = "y" ]; then echo "DEBUG: Unconfiguring interfaces"; fi
+ 
+       for eth in ${ntopinterface}; do
+-          if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp][Cc].*=['\"]?[Yy][Ee][Ss]['\"]?" \
+-                   /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+-              logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntopconfigure=yes, skipping"
+-              if [ "${debug}" = "y" ]; then echo "DEBUG: $eth is not ntopconfigure=yes"; fi
+-              continue
++          if [ "$eth" = "none" ]; then
++               continue
+           fi
+-
+           logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unconfiguring $eth"
+           if [ "${debug}" = "y" ]; then echo "DEBUG: Unconfiguring $eth"; fi
+     
+@@ -623,6 +556,13 @@ stop () {
+       if [ "${debug}" = "y" ]; then echo "DEBUG: Interfaces are unconfigured"; fi
+   fi
+ 
++  if [ $NOT_RUNNING -eq 1 -o $RETVAL -eq 0 ]; then
++    echo " [ OK ]"
++    RETVAL=0
++  else
++    echo " [ FAILED ]"
++  fi
++
+   return $RETVAL
+ }
+ 
+-- 
+1.7.5.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch
new file mode 100644
index 0000000..9f57ca4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch
@@ -0,0 +1,19 @@
+change osName to version as it prints out "ntop Version".
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/webInterface.c b/webInterface.c
+index 5622e69..8cb7a67 100644
+--- a/webInterface.c
++++ b/webInterface.c
+@@ -5816,7 +5816,7 @@ static void printNtopConfigInfoData(int textPrintFlag, UserPref *pref) {
+   printInfoSectionTitle(textPrintFlag, "Basic Information");
+ 
+   safe_snprintf(__FILE__, __LINE__, formatBuf, sizeof(formatBuf), "%s (%d bit)",
+-		osName, sizeof(long) == 8 ? 64 : 32);
++		version, sizeof(long) == 8 ? 64 : 32);
+   printFeatureConfigInfo(textPrintFlag, "ntop Version", formatBuf);
+ 
+ #ifndef WIN32
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch
new file mode 100644
index 0000000..2b001c1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch
@@ -0,0 +1,32 @@
+[PATCH] replace 'inline' with 'static inline' for gcc 5.x
+
+gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which change
+the semantics for inline functions and the standalone 'inline'
+causes error with "gcc5 -g -o0"
+ 
+Replace inline with static inline to be compatible with both gcc 4
+and 5.
+
+Upstream-status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ nDPI/src/lib/protocols/ssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nDPI/src/lib/protocols/ssl.c b/nDPI/src/lib/protocols/ssl.c
+index 245b8c3..72beda9 100644
+--- a/nDPI/src/lib/protocols/ssl.c
++++ b/nDPI/src/lib/protocols/ssl.c
+@@ -39,7 +39,7 @@ static void ipoque_int_ssl_add_connection(struct ipoque_detection_module_struct
+ 
+ #ifdef HAVE_NTOP
+ #ifndef WIN32
+-inline int min(int a, int b) { return(a < b ? a : b); }
++static inline int min(int a, int b) { return(a < b ? a : b); }
+ #endif
+ 
+ static void stripCertificateTrailer(char *buffer, int buffer_len) {
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
new file mode 100644
index 0000000..298fbec
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
@@ -0,0 +1,137 @@
+SUMMARY = "ntop is network top"
+DESCRIPTION = "ntop is a network traffic probe that shows the network usage, \
+similar to what the popular top Unix command does."
+
+SECTION = "console/network"
+
+LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
+                   "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
+           file://ntop_configure_in.patch \
+           file://ntop_init.patch \
+           file://ntop_webInterface.patch \
+           file://ntop_configure_in_net_snmp_config_exist.patch \
+           file://ntop.service \
+           file://use-static-inline.patch \
+           file://0001-nDPI-Include-sys-types.h.patch \
+          "
+SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
+SRC_URI[sha256sum] = "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
+
+inherit autotools-brokensep useradd pythonnative pkgconfig systemd
+
+DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
+
+PACKAGECONFIG ??= "openssl snmp plugins"
+PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
+PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
+--disable-snmp,net-snmp,"
+PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
+
+EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
+
+do_configure() {
+    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/nDPI
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/nDPI
+    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
+    cp 3rd_party/* ./
+
+    # config nDPI
+    cd nDPI
+    ./configure ${CONFIGUREOPTS} --with-pic
+    cd ..
+
+    sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:' ${S}/configure.in
+
+    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
+    sed -i \
+        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
+        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
+        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":' \
+        ${S}/configure.in
+
+    # replace the DISTRO RELEASE in configure.in which are host's
+    # with our release, although those doesn't affect functionality
+    sed -i -e \
+        '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
+        ${S}/configure.in
+
+    # osName in original configure.in should be ${TARGET_SYS}
+    # which will show in ntop's "show configuration"
+    sed -i -e \
+        's:^osName=.*:osName=${TARGET_SYS}:' \
+        ${S}/configure.in
+
+    # rename configureextra to configureextra_rename to avoid
+    # configure.in to guess host OS and pull in more configure, non needed
+    # which will cause some cross-compiling failure on specific host
+    # e.g. SUSE(SLED...)
+    test ! -f configureextra || mv -f configureextra configureextra_rename
+
+    # make sure configure finds python includdirs/libs with these envs
+    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+        STAGING_INCDIR=${STAGING_INCDIR} \
+        STAGING_LIBDIR=${STAGING_LIBDIR}
+
+    autotools_do_configure
+}
+
+do_compile_prepend() {
+    cd nDPI
+    oe_runmake
+    cd ..
+}
+
+do_install_append() {
+    # remove the empty dirs
+    rm -rf ${D}${libdir}/plugins
+
+    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
+        ${D}${sysconfdir}/init.d/ntop
+    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
+        ${D}${sysconfdir}/ntop.conf
+
+    # change ntop dir in ntop.conf
+    # don't use the -P as the ntop.init didn't support it
+    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path /var/lib/ntop:" \
+        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
+        ${D}${sysconfdir}/ntop.conf
+
+    # For systemd
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0755 ${S}/packages/RedHat/ntop.init ${D}${libexecdir}/ntop-helper
+        install -D -m 0644 ${WORKDIR}/ntop.service ${D}${systemd_system_unitdir}/ntop.service
+        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
+            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+            ${D}${systemd_system_unitdir}/ntop.service
+    fi
+
+    # Fix host-user-contaminated issue
+    chown -R root:root ${D}
+
+    chown -R ntop.ntop ${D}${datadir}/ntop
+    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
+-s /usr/sbin/nologin -c 'ntop' ntop"
+GROUPADD_PARAM_${PN} = "-r ntop"
+
+SYSTEMD_SERVICE_${PN} = "ntop.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
+                      ${libdir}/libntopreport-*.so ${libdir}/lib*-${PV}.so"
+FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
+                   ${libdir}/libntopreport.so \
+                   ${libdir}/libnetflowPlugin.so ${libdir}/libsflowPlugin.so \
+                   ${libdir}/librrdPlugin.so \
+                   ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch
new file mode 100644
index 0000000..825e2bf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch
@@ -0,0 +1,38 @@
+From e0d86318227a23f00cf0f6639a6685bb9f5771a1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 12 Dec 2017 09:42:19 -0800
+Subject: [PATCH] util.h: endian.h is available on musl on linux
+
+just checking for glibc alone is not enough since
+it excludes musl, therefore check for platform
+being linux as well
+
+Fixes build issues
+
+include/libisns/util.h:114:12: fatal error: sys/endian.h: No such file or directory
+ #  include <sys/endian.h>
+            ^~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ include/libisns/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/libisns/util.h b/include/libisns/util.h
+index 9a2bd13..6cc1a1b 100644
+--- a/include/libisns/util.h
++++ b/include/libisns/util.h
+@@ -100,7 +100,7 @@ enum {
+  * There's no htonll yet
+  */
+ #ifndef htonll
+-# ifdef __GLIBC__
++# if defined(__GLIBC__) || defined(__linux__)
+ #  include <endian.h>
+ #  include <byteswap.h>
+ #  if __BYTE_ORDER == __BIG_ENDIAN
+-- 
+2.15.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb
index 420ef5b..cc2959e 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb
@@ -13,9 +13,9 @@
 
 DEPENDS = "openssl systemd"
 
-SRC_URI = " \
-    git://github.com/open-iscsi/open-isns \
-"
+SRC_URI = "git://github.com/open-iscsi/open-isns \
+           file://0001-util.h-endian.h-is-available-on-musl-on-linux.patch \
+           "
 
 SRCREV ?= "09954404e948e41eb0fce8e28836018b4ce3d20d"
 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch
new file mode 100644
index 0000000..25057fb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch
@@ -0,0 +1,618 @@
+From 8b51a6bf5a4829d8add535a098c0c06a049a9958 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 22:50:57 -0700
+Subject: [PATCH] lanserv: Rename struct parameter printf for namespace
+ collision
+
+This comes to fore when we use hardening flags where printf
+is treated as macro and gets replaced with printf_chk
+
+Fixes errors like
+
+error: no member named '__printf_chk' in 'struct emu_out_s'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lanserv/OpenIPMI/serv.h |   2 +-
+ lanserv/emu_cmd.c       | 132 ++++++++++++++++++++++++------------------------
+ lanserv/ipmi_sim.c      |  10 ++--
+ 3 files changed, 72 insertions(+), 72 deletions(-)
+
+diff --git a/lanserv/OpenIPMI/serv.h b/lanserv/OpenIPMI/serv.h
+index d12d63a..8555c85 100644
+--- a/lanserv/OpenIPMI/serv.h
++++ b/lanserv/OpenIPMI/serv.h
+@@ -522,7 +522,7 @@ uint8_t ipmb_checksum(uint8_t *data, int size, uint8_t start);
+ typedef struct emu_data_s emu_data_t;
+ typedef struct emu_out_s
+ {
+-    void (*printf)(struct emu_out_s *out, char *format, ...);
++    void (*eprintf)(struct emu_out_s *out, char *format, ...);
+     void *data;
+ } emu_out_t;
+ 
+diff --git a/lanserv/emu_cmd.c b/lanserv/emu_cmd.c
+index ca44032..54b6f7b 100644
+--- a/lanserv/emu_cmd.c
++++ b/lanserv/emu_cmd.c
+@@ -76,7 +76,7 @@ emu_get_uchar(emu_out_t *out, char **toks, unsigned char *val, char *errstr,
+ 	if (empty_ok)
+ 	    return ENOSPC;
+ 	if (errstr)
+-	    out->printf(out, "**No %s given\n", errstr);
++	    out->eprintf(out, "**No %s given\n", errstr);
+ 	return EINVAL;
+     }
+     if (str[0] == '\'') {
+@@ -86,7 +86,7 @@ emu_get_uchar(emu_out_t *out, char **toks, unsigned char *val, char *errstr,
+     *val = strtoul(str, &tmpstr, 0);
+     if (*tmpstr != '\0') {
+ 	if (errstr)
+-	    out->printf(out, "**Invalid %s given\n", errstr);
++	    out->eprintf(out, "**Invalid %s given\n", errstr);
+ 	return EINVAL;
+     }
+ 
+@@ -108,7 +108,7 @@ emu_get_uchar_with_vals(emu_out_t *out, char **toks,
+ 	if (empty_ok)
+ 	    return ENOSPC;
+ 	if (errstr)
+-	    out->printf(out, "**No %s given\n", errstr);
++	    out->eprintf(out, "**No %s given\n", errstr);
+ 	return EINVAL;
+     }
+     if (str[0] == '\'') {
+@@ -131,7 +131,7 @@ emu_get_uchar_with_vals(emu_out_t *out, char **toks,
+     *val = strtoul(str, &tmpstr, 0);
+     if (*tmpstr != '\0') {
+ 	if (errstr)
+-	    out->printf(out, "**Invalid %s given\n", errstr);
++	    out->eprintf(out, "**Invalid %s given\n", errstr);
+ 	return EINVAL;
+     }
+  out:
+@@ -150,12 +150,12 @@ emu_get_bitmask(emu_out_t *out, char **toks, uint16_t *val, char *errstr,
+ 	if (empty_ok)
+ 	    return ENOSPC;
+ 	if (errstr)
+-	    out->printf(out, "**No %s given\n", errstr);
++	    out->eprintf(out, "**No %s given\n", errstr);
+ 	return EINVAL;
+     }
+     if (strlen(str) != size) {
+ 	if (errstr)
+-	    out->printf(out, "**invalid number of bits in %s\n", errstr);
++	    out->eprintf(out, "**invalid number of bits in %s\n", errstr);
+ 	return EINVAL;
+     }
+     *val = 0;
+@@ -166,7 +166,7 @@ emu_get_bitmask(emu_out_t *out, char **toks, uint16_t *val, char *errstr,
+ 	    *val |= 1 << i;
+ 	} else {
+ 	    if (errstr)
+-		out->printf(out, "**Invalid bit value '%c' in %s\n", str[j],
++		out->eprintf(out, "**Invalid bit value '%c' in %s\n", str[j],
+ 			    errstr);
+ 	    return EINVAL;
+ 	}
+@@ -184,13 +184,13 @@ emu_get_uint(emu_out_t *out, char **toks, unsigned int *val, char *errstr)
+     str = mystrtok(NULL, " \t\n", toks);
+     if (!str) {
+ 	if (errstr)
+-	    out->printf(out, "**No %s given\n", errstr);
++	    out->eprintf(out, "**No %s given\n", errstr);
+ 	return EINVAL;
+     }
+     *val = strtoul(str, &tmpstr, 0);
+     if (*tmpstr != '\0') {
+ 	if (errstr)
+-	    out->printf(out, "**Invalid %s given\n", errstr);
++	    out->eprintf(out, "**Invalid %s given\n", errstr);
+ 	return EINVAL;
+     }
+ 
+@@ -206,7 +206,7 @@ emu_get_bytes(emu_out_t *out, char **tokptr, unsigned char *data, char *errstr,
+ 
+     if (!tok) {
+ 	if (errstr)
+-	    out->printf(out, "**No %s given\n", errstr);
++	    out->eprintf(out, "**No %s given\n", errstr);
+ 	return EINVAL;
+     }
+     if (*tok == '"') {
+@@ -215,7 +215,7 @@ emu_get_bytes(emu_out_t *out, char **tokptr, unsigned char *data, char *errstr,
+ 	tok++;
+ 	end = strlen(tok) - 1;
+ 	if (tok[end] != '"') {
+-	  out->printf(out, "**ASCII %s doesn't end in '\"'", errstr);
++	  out->eprintf(out, "**ASCII %s doesn't end in '\"'", errstr);
+ 	    return EINVAL;
+ 	}
+ 	if (end > (len - 1))
+@@ -228,7 +228,7 @@ emu_get_bytes(emu_out_t *out, char **tokptr, unsigned char *data, char *errstr,
+ 	char         c[3];
+ 	/* HEX pw */
+ 	if (strlen(tok) != 32) {
+-	    out->printf(out, "**HEX %s not 32 HEX characters long", errstr);
++	    out->eprintf(out, "**HEX %s not 32 HEX characters long", errstr);
+ 	    return EINVAL;
+ 	}
+ 	c[2] = '\0';
+@@ -239,7 +239,7 @@ emu_get_bytes(emu_out_t *out, char **tokptr, unsigned char *data, char *errstr,
+ 	    tok++;
+ 	    data[i] = strtoul(c, &end, 16);
+ 	    if (*end != '\0') {
+-		out->printf(out, "**Invalid HEX character in %s", errstr);
++		out->eprintf(out, "**Invalid HEX character in %s", errstr);
+ 		return -1;
+ 	    }
+ 	}
+@@ -263,12 +263,12 @@ read_command_file(emu_out_t *out, emu_data_t *emu, const char *command_file)
+ 
+ 	buffer = malloc(INPUT_BUFFER_SIZE);
+ 	if (!buffer) {
+-	    out->printf(out, "Could not allocate buffer memory\n");
++	    out->eprintf(out, "Could not allocate buffer memory\n");
+ 	    rv = ENOMEM;
+ 	    goto out;
+ 	}
+ 	while (fgets(buffer+pos, INPUT_BUFFER_SIZE-pos, f)) {
+-	    out->printf(out, "%s", buffer+pos);
++	    out->eprintf(out, "%s", buffer+pos);
+ 	    if (buffer[pos] == '#')
+ 		continue;
+ 	    pos = strlen(buffer);
+@@ -318,7 +318,7 @@ sel_enable(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_mc_enable_sel(mc, max_records, flags);
+     if (rv)
+-	out->printf(out, "**Unable to enable sel, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to enable sel, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -343,9 +343,9 @@ sel_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_mc_add_to_sel(mc, record_type, data, &r);
+     if (rv)
+-	out->printf(out, "**Unable to add to sel, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to add to sel, error 0x%x\n", rv);
+     else
+-	out->printf(out, "Added record %d\n", r);
++	out->eprintf(out, "Added record %d\n", r);
+     return rv;
+ }
+ 
+@@ -361,14 +361,14 @@ main_sdr_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	if (rv == ENOSPC)
+ 	    break;
+ 	if (rv) {
+-	    out->printf(out, "**Error 0x%x in data byte %d\n", rv, i);
++	    out->eprintf(out, "**Error 0x%x in data byte %d\n", rv, i);
+ 	    return rv;
+ 	}
+     }
+ 
+     rv = ipmi_mc_add_main_sdr(mc, data, i);
+     if (rv)
+-	out->printf(out, "**Unable to add to sdr, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to add to sdr, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -389,14 +389,14 @@ device_sdr_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	if (rv == ENOSPC)
+ 	    break;
+ 	if (rv) {
+-	    out->printf(out, "**Error 0x%x in data byte %d\n", rv, i);
++	    out->eprintf(out, "**Error 0x%x in data byte %d\n", rv, i);
+ 	    return rv;
+ 	}
+     }
+ 
+     rv = ipmi_mc_add_device_sdr(mc, lun, data, i);
+     if (rv)
+-	out->printf(out, "**Unable to add to sdr, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to add to sdr, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -439,7 +439,7 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+     while (tok) {
+ 	if (strcmp(tok, "poll") == 0) {
+ 	    if (handler) {
+-		out->printf(out, "**poll given twice in sensor\n", tok);
++		out->eprintf(out, "**poll given twice in sensor\n", tok);
+ 		return -1;
+ 	    }
+ 
+@@ -449,27 +449,27 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+ 	    tok = mystrtok(NULL, " \t\n", toks);
+ 	    if (!tok) {
+-		out->printf(out, "**No polled sensor handler given\n", tok);
++		out->eprintf(out, "**No polled sensor handler given\n", tok);
+ 		return -1;
+ 	    }
+ 
+ 	    handler = ipmi_sensor_find_handler(tok);
+ 	    if (!handler) {
+-		out->printf(out, "**Invalid sensor handler: %s\n", tok);
++		out->eprintf(out, "**Invalid sensor handler: %s\n", tok);
+ 		return -1;
+ 	    }
+ 
+ 	    rv = handler->init(mc, lun, num, toks, handler->cb_data, &rcb_data,
+ 			       &errstr);
+ 	    if (rv) {
+-		out->printf(out, "**Error initializing sensor handler: %s\n", 
++		out->eprintf(out, "**Error initializing sensor handler: %s\n", 
+ 			    errstr);
+ 		return rv;
+ 	    }
+ 	} else if (strcmp(tok, "event-only") == 0) {
+ 	    event_only = 1;
+ 	} else {
+-	    out->printf(out, "**Unknown sensor option: %s\n", tok);
++	    out->eprintf(out, "**Unknown sensor option: %s\n", tok);
+ 	    return -1;
+ 	}
+ 
+@@ -477,7 +477,7 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+     }
+ 
+     if (handler && event_only) {
+-	out->printf(out, "**An event-only sensor cannot be polled\n");
++	out->eprintf(out, "**An event-only sensor cannot be polled\n");
+ 	return -1;
+     }
+ 
+@@ -488,7 +488,7 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	if (!rv && handler->postinit) {
+ 	    rv = handler->postinit(rcb_data, &errstr);
+ 	    if (rv) {
+-		out->printf(out, "**Error in sensor handler postinit: %s\n", 
++		out->eprintf(out, "**Error in sensor handler postinit: %s\n", 
+ 			    errstr);
+ 	    }
+ 	}
+@@ -496,7 +496,7 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	rv = ipmi_mc_add_sensor(mc, lun, num, type, code, event_only);
+     }
+     if (rv)
+-	out->printf(out, "**Unable to add to sensor, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to add to sensor, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -532,7 +532,7 @@ sensor_set_bit(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_mc_sensor_set_bit(mc, lun, num, bit, value, gen_event);
+     if (rv)
+-	out->printf(out, "**Unable to set sensor bit, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set sensor bit, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -563,7 +563,7 @@ sensor_set_bit_clr_rest(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **
+ 
+     rv = ipmi_mc_sensor_set_bit_clr_rest(mc, lun, num, bit, gen_event);
+     if (rv)
+-	out->printf(out, "**Unable to set sensor bit, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set sensor bit, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -594,7 +594,7 @@ sensor_set_value(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_mc_sensor_set_value(mc, lun, num, value, gen_event);
+     if (rv)
+-	out->printf(out, "**Unable to set sensor value, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set sensor value, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -637,7 +637,7 @@ sensor_set_hysteresis(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **to
+     rv = ipmi_mc_sensor_set_hysteresis(mc, lun, num, support, positive,
+ 				       negative);
+     if (rv)
+-	out->printf(out, "**Unable to set sensor hysteresis, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set sensor hysteresis, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -682,7 +682,7 @@ sensor_set_threshold(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **tok
+     rv = ipmi_mc_sensor_set_threshold(mc, lun, num, support,
+ 				      enabled, 1, thresholds);
+     if (rv)
+-	out->printf(out, "**Unable to set sensor thresholds, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set sensor thresholds, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -759,7 +759,7 @@ sensor_set_event_support(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char *
+ 					  assert_support, deassert_support,
+ 					  assert_enabled, deassert_enabled);
+     if (rv)
+-	out->printf(out, "**Unable to set sensor thresholds, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set sensor thresholds, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -819,7 +819,7 @@ mc_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	else if (strcmp("persist_sdr", tok) == 0)
+ 	    flags |= IPMI_MC_PERSIST_SDR;
+ 	else {
+-	    out->printf(out, "**Invalid MC flag: %s\n", tok);
++	    out->eprintf(out, "**Invalid MC flag: %s\n", tok);
+ 	    return -1;
+ 	}
+     }
+@@ -833,7 +833,7 @@ mc_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 			 device_revision, major_fw_rev, minor_fw_rev,
+ 			 device_support, mfg_id, product_id, flags);
+     if (rv)
+-	out->printf(out, "**Unable to add the MC, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to add the MC, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -890,7 +890,7 @@ mc_set_power(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_mc_set_power(mc, power, gen_int);
+     if (rv)
+-	out->printf(out, "**Unable to set power, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set power, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -916,7 +916,7 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     tok = mystrtok(NULL, " \t\n", toks);
+     if (!tok) {
+-	out->printf(out, "**No FRU data type given");
++	out->eprintf(out, "**No FRU data type given");
+ 	return -1;
+     }
+     if (strcmp(tok, "file") == 0) {
+@@ -929,13 +929,13 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+ 	rv = get_delim_str(toks, &frufn, &errstr);
+ 	if (rv) {
+-	    out->printf(out, "**Error with FRU filename: %d", strerror(rv));
++	    out->eprintf(out, "**Error with FRU filename: %d", strerror(rv));
+ 	    return rv;
+ 	}
+ 	rv = ipmi_mc_add_fru_file(mc, devid, length, file_offset,
+ 				  (void *) frufn);
+ 	if (rv)
+-	    out->printf(out, "**Unable to add FRU file, error 0x%x\n", rv);
++	    out->eprintf(out, "**Unable to add FRU file, error 0x%x\n", rv);
+ 	
+     } else if (strcmp(tok, "data") == 0) {
+ 	for (i=0; i<length; i++) {
+@@ -943,14 +943,14 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	    if (rv == ENOSPC)
+ 		break;
+ 	    if (rv) {
+-		out->printf(out, "**Error 0x%x in data byte %d\n", rv, i);
++		out->eprintf(out, "**Error 0x%x in data byte %d\n", rv, i);
+ 		return rv;
+ 	    }
+ 	}
+ 
+ 	rv = emu_get_uchar(out, toks, &data[i], "data byte", 1);
+ 	if (rv != ENOSPC) {
+-	    out->printf(out, "**Error: input data too long for FRU\n", rv, i);
++	    out->eprintf(out, "**Error: input data too long for FRU\n", rv, i);
+ 	    return EINVAL;
+ 	}
+ 
+@@ -958,9 +958,9 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+ 	rv = ipmi_mc_add_fru_data(mc, devid, length, NULL, data);
+ 	if (rv)
+-	    out->printf(out, "**Unable to add FRU data, error 0x%x\n", rv);
++	    out->eprintf(out, "**Unable to add FRU data, error 0x%x\n", rv);
+     } else {
+-	out->printf(out, "**FRU type not given, need file or data\n");
++	out->eprintf(out, "**FRU type not given, need file or data\n");
+ 	rv = EINVAL;
+     }
+     return rv;
+@@ -981,28 +981,28 @@ mc_dump_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_mc_get_fru_data_len(mc, devid, &length);
+     if (rv) {
+-	out->printf(out, "**Unable to dump FRU data, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to dump FRU data, error 0x%x\n", rv);
+ 	goto out;
+     }
+ 
+     data = malloc(length);
+     if (!data) {
+-	out->printf(out, "**Unable to dump FRU data, out of memory\n", rv);
++	out->eprintf(out, "**Unable to dump FRU data, out of memory\n", rv);
+ 	goto out;
+     }
+ 
+     rv = ipmi_mc_get_fru_data(mc, devid, length, data);
+     if (rv) {
+-	out->printf(out, "**Unable to dump FRU data, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to dump FRU data, error 0x%x\n", rv);
+ 	goto out;
+     }
+ 
+     for (i=0; i<length; i++) {
+ 	if ((i > 0) && ((i % 8) == 0))
+-	    out->printf(out, "\n");
+-	out->printf(out, " 0x%2.2x", data[i]);
++	    out->eprintf(out, "\n");
++	out->eprintf(out, " 0x%2.2x", data[i]);
+     }
+-    out->printf(out, "\n");
++    out->eprintf(out, "\n");
+ 
+  out:
+     if (data)
+@@ -1021,7 +1021,7 @@ mc_setbmc(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	return rv;
+     rv = ipmi_emu_set_bmc_mc(emu, ipmb);
+     if (rv)
+-	out->printf(out, "**Invalid IPMB address\n");
++	out->eprintf(out, "**Invalid IPMB address\n");
+     return rv;
+ }
+ 
+@@ -1032,7 +1032,7 @@ atca_enable(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_emu_atca_enable(emu);
+     if (rv)
+-	out->printf(out, "**Unable to enable ATCA mode, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to enable ATCA mode, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -1056,7 +1056,7 @@ atca_set_site(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_emu_atca_set_site(emu, hw_address, site_type, site_number);
+     if (rv)
+-	out->printf(out, "**Unable to set site type, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set site type, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -1072,7 +1072,7 @@ mc_set_num_leds(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     rv = ipmi_mc_set_num_leds(mc, count);
+     if (rv)
+-	out->printf(out, "**Unable to set number of LEDs, error 0x%x\n", rv);
++	out->eprintf(out, "**Unable to set number of LEDs, error 0x%x\n", rv);
+     return rv;
+ }
+ 
+@@ -1085,7 +1085,7 @@ read_cmds(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     err = get_delim_str(toks, &filename, &errstr);
+     if (err) {
+-	out->printf(out, "Could not get include filename: %s\n", errstr);
++	out->eprintf(out, "Could not get include filename: %s\n", errstr);
+ 	return err;
+     }
+ 
+@@ -1097,7 +1097,7 @@ read_cmds(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+     {
+ 	char *nf = malloc(strlen(BASE_CONF_STR) + strlen(filename) + 2);
+ 	if (!nf) {
+-	    out->printf(out, "Out of memory in include\n", errstr);
++	    out->eprintf(out, "Out of memory in include\n", errstr);
+ 	    goto out_err;
+ 	}
+ 	strcpy(nf, BASE_CONF_STR);
+@@ -1107,7 +1107,7 @@ read_cmds(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	filename = nf;
+ 	err = read_command_file(out, emu, filename);
+ 	if (err) {
+-	    out->printf(out, "Could not read include file %s\n", filename);
++	    out->eprintf(out, "Could not read include file %s\n", filename);
+ 	}
+     }
+ 
+@@ -1147,7 +1147,7 @@ debug_cmd(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	} else if (strcmp(tok, "sol") == 0) {
+ 	    level |= DEBUG_SOL;
+ 	} else {
+-	    out->printf(out, "Invalid debug level '%s', options are 'raw' and 'msg'\n",
++	    out->eprintf(out, "Invalid debug level '%s', options are 'raw' and 'msg'\n",
+ 		   tok);
+ 	    return EINVAL;
+ 	}
+@@ -1168,7 +1168,7 @@ persist_cmd(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 	} else if (strcmp(tok, "off") == 0) {
+ 	    persist_enable = 0;
+ 	} else {
+-	    out->printf(out, "Invalid persist vale '%s', options are 'on' and 'off'\n",
++	    out->eprintf(out, "Invalid persist vale '%s', options are 'on' and 'off'\n",
+ 		   tok);
+ 	    return EINVAL;
+ 	}
+@@ -1194,18 +1194,18 @@ do_define(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ 
+     name = mystrtok(NULL, " \t\n", toks);
+     if (!name) {
+-	out->printf(out, "No variable name given for define\n");
++	out->eprintf(out, "No variable name given for define\n");
+ 	return EINVAL;
+     }
+     err = get_delim_str(toks, &value, &errstr);
+     if (err) {
+-	out->printf(out, "Could not get variable %s value: %s\n", name, errstr);
++	out->eprintf(out, "Could not get variable %s value: %s\n", name, errstr);
+ 	return err;
+     }
+     err = add_variable(name, value);
+     if (err) {
+ 	free(value);
+-	out->printf(out, "Out of memory setting variable %s\n", name);
++	out->eprintf(out, "Out of memory setting variable %s\n", name);
+ 	return err;
+     }
+     return 0;
+@@ -1301,7 +1301,7 @@ ipmi_emu_cmd(emu_out_t *out, emu_data_t *emu, char *cmd_str)
+ 		    return rv;
+ 		rv = ipmi_emu_get_mc_by_addr(emu, ipmb, &mc);
+ 		if (rv) {
+-		    out->printf(out, "**Invalid MC address\n");
++		    out->eprintf(out, "**Invalid MC address\n");
+ 		    return rv;
+ 		}
+ 	    }
+@@ -1312,7 +1312,7 @@ ipmi_emu_cmd(emu_out_t *out, emu_data_t *emu, char *cmd_str)
+ 	}
+     }
+ 
+-    out->printf(out, "**Unknown command: %s\n", cmd);
++    out->eprintf(out, "**Unknown command: %s\n", cmd);
+ 
+  out:
+     return rv;
+diff --git a/lanserv/ipmi_sim.c b/lanserv/ipmi_sim.c
+index 9472cce..30c4f27 100644
+--- a/lanserv/ipmi_sim.c
++++ b/lanserv/ipmi_sim.c
+@@ -607,8 +607,8 @@ isim_log(sys_data_t *sys, int logtype, msg_t *msg, const char *format,
+ 
+     con = data->consoles;
+     while (con) {
+-	con->out.printf(&con->out, "%s", str);
+-	con->out.printf(&con->out, "\n");
++	con->out.eprintf(&con->out, "%s", str);
++	con->out.eprintf(&con->out, "\n");
+ 	con = con->next;
+     }
+ #if HAVE_SYSLOG
+@@ -956,7 +956,7 @@ console_bind_ready(int fd, void *cb_data, os_hnd_fd_id_t *id)
+     newcon->shutdown_on_close = 0;
+     newcon->telnet = 1;
+     newcon->tn_pos = 0;
+-    newcon->out.printf = emu_printf;
++    newcon->out.eprintf = emu_printf;
+     newcon->out.data = newcon;
+ 
+     setsockopt(rv, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val));
+@@ -1463,10 +1463,10 @@ main(int argc, const char *argv[])
+     stdio_console.telnet = 0;
+     stdio_console.tn_pos = 0;
+     if (nostdio) {
+-	stdio_console.out.printf = dummy_printf;
++	stdio_console.out.eprintf = dummy_printf;
+ 	stdio_console.out.data = &stdio_console;
+     } else {
+-	stdio_console.out.printf = emu_printf;
++	stdio_console.out.eprintf = emu_printf;
+ 	stdio_console.out.data = &stdio_console;
+     }
+     stdio_console.next = NULL;
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/include_sys_types.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/include_sys_types.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/ipmi.service b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/ipmi.service
rename to import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/openipmi-helper b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/openipmi-helper
rename to import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
rename to import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
new file mode 100644
index 0000000..83485a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
@@ -0,0 +1,50 @@
+From aa0dc0783a6ff5fb56c914b640836223e3c192bb Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 29 Dec 2014 18:16:04 +0800
+Subject: [PATCH] remove host path from la_LDFLAGS
+
+Upstream-Status: Inappropriate [ cross compile specific ]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ cmdlang/Makefile.am |    2 +-
+ glib/Makefile.am    |    4 ++--
+ tcl/Makefile.am     |    2 +-
+ unix/Makefile.am    |    4 ++--
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+Index: OpenIPMI-2.0.24/cmdlang/Makefile.am
+===================================================================
+--- OpenIPMI-2.0.24.orig/cmdlang/Makefile.am
++++ OpenIPMI-2.0.24/cmdlang/Makefile.am
+@@ -15,8 +15,7 @@ libOpenIPMIcmdlang_la_SOURCES = cmdlang.
+ libOpenIPMIcmdlang_la_LIBADD = -lm \
+ 	$(top_builddir)/utils/libOpenIPMIutils.la \
+ 	$(top_builddir)/lib/libOpenIPMI.la
+-libOpenIPMIcmdlang_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+-	-L$(libdir)
++libOpenIPMIcmdlang_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+ 
+ bin_PROGRAMS = openipmish
+ 
+Index: OpenIPMI-2.0.24/unix/Makefile.am
+===================================================================
+--- OpenIPMI-2.0.24.orig/unix/Makefile.am
++++ OpenIPMI-2.0.24/unix/Makefile.am
+@@ -10,14 +10,12 @@ lib_LTLIBRARIES = libOpenIPMIposix.la li
+ libOpenIPMIpthread_la_SOURCES = posix_thread_os_hnd.c selector.c
+ libOpenIPMIpthread_la_LIBADD = -lpthread $(GDBM_LIB) \
+ 	$(top_builddir)/utils/libOpenIPMIutils.la $(RT_LIB)
+-libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+-	-L$(libdir)
++libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+ 
+ libOpenIPMIposix_la_SOURCES = posix_os_hnd.c selector.c
+ libOpenIPMIposix_la_LIBADD = $(top_builddir)/utils/libOpenIPMIutils.la \
+ 	$(GDBM_LIB) $(RT_LIB)
+-libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+-	-L$(libdir)
++libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+ 
+ noinst_HEADERS = heap.h
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.24.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.24.bb
new file mode 100644
index 0000000..a4f63c5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.24.bb
@@ -0,0 +1,110 @@
+SUMMARY = "IPMI (Intelligent Platform Management Interface) library and tools"
+DESCRIPTION = "OpenIPMI is an effort to create a full-function IPMI system, \
+to allow full access to all IPMI information on a server \
+and to abstract it to a level that will make it easy to use"
+
+HOMEPAGE = "http://openipmi.sourceforge.net"
+
+DEPENDS = " \
+    glib-2.0 \
+    ncurses \
+    net-snmp \
+    openssl \
+    popt \
+    python \
+    swig-native \
+    "
+
+LICENSE = "GPLv2 & LGPLv2.1 & BSD"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
+                    file://COPYING.BSD;md5=4b318d4160eb69c8ee53452feb1b4cdf \
+                    "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \
+           file://fix-symlink-install-error-in-cmdlang.patch \
+           file://openipmi-no-openipmigui-man.patch \
+           file://openipmi-remove-host-path-from-la_LDFLAGS.patch \
+           file://ipmi-init-fix-the-arguments.patch \
+           file://do-not-install-pyc-and-pyo.patch \
+           file://include_sys_types.patch \
+           file://openipmi-helper \
+           file://ipmi.service \
+           file://0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch \
+           "
+
+S = "${WORKDIR}/OpenIPMI-${PV}"
+SRC_URI[md5sum] = "58f9542cbfcb5fe250b77cf88345e1ec"
+SRC_URI[sha256sum] = "bca39a27071278a8b74610181ede8df51e155e5e9031bc8eaa3699d1720292b4"
+
+inherit autotools-brokensep pkgconfig pythonnative perlnative update-rc.d systemd
+
+EXTRA_OECONF = "--disable-static \
+                --with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \
+                --with-python='${STAGING_BINDIR_NATIVE}/python-native/python' \
+                --with-pythoninstall='${PYTHON_SITEPACKAGES_DIR}' \
+                --with-glibver=2.0"
+
+PACKAGECONFIG ??= "gdbm"
+PACKAGECONFIG[gdbm] = "ac_cv_header_gdbm_h=yes,ac_cv_header_gdbm_h=no,gdbm,"
+
+PACKAGES += "${PN}-perl ${PN}-python"
+
+FILES_${PN}-perl = " \
+    ${libdir}/perl/vendor_perl/*/OpenIPMI.pm \
+    ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/OpenIPMI.so \
+    "
+
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+FILES_${PN}-dbg += " \
+    ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/.debug \
+    ${PYTHON_SITEPACKAGES_DIR}/.debug \
+    "
+
+do_configure () {
+
+    # Let's perform regular configuration first then handle perl issues.
+    autotools_do_configure
+
+    perl_ver=`perl -V:version | cut -d\' -f 2`
+    
+    # Force openipmi perl bindings to be compiled using perl-native instead of
+    # the host's perl. Set the proper install directory for the resulting
+    # openipmi.pm and openipmi.so
+    for i in ${S}/swig/Makefile ${S}/swig/perl/Makefile; do
+        echo "SAL: i = $i"
+        echo "SAL: STAGING_INCDIR_NATIVE = $STAGING_INCDIR_NATIVE"
+        echo "SAL: libdir = $libdir"
+        sed -i -e "/^PERL_CFLAGS/s:-I/usr/local/include:-I${STAGING_INCDIR_NATIVE}:g" $i
+        sed -i -e "/^PERL_INSTALL_DIR/s:^PERL_INSTALL_DIR = .*:PERL_INSTALL_DIR = ${libdir}/perl/vendor_perl/$perl_ver:g" $i
+    done
+}
+
+do_install_append () {
+    echo "SAL: D = $D"
+    echo "SAL: libdir = $libdir"
+    install -m 0755 -d ${D}${sysconfdir}/sysconfig ${D}${sysconfdir}/init.d
+    install -m 0755 ${S}/ipmi.init ${D}${sysconfdir}/init.d/ipmi
+    install -m 0644 ${S}/ipmi.sysconf ${D}${sysconfdir}/sysconfig/ipmi
+    # SAL: mv: cannot stat `/localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/openipmi-2.0.19-r4/image/usr/lib64/perl5': No such file or directory
+    # SAL: real path to perl is /localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/perl-5.14.2-r8.3/package/usr/lib64/perl5 and it is a symlink to perl so no need to mv.
+    if [ -d ${D}${libdir}/perl5 ]
+    then
+        mv ${D}${libdir}/perl5 ${D}${libdir}/perl
+    fi
+ 
+    # for systemd
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0664 ${WORKDIR}/ipmi.service ${D}${systemd_unitdir}/system
+    sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/ipmi.service
+    install -d ${D}${libexecdir}
+    install -m 0755 ${WORKDIR}/openipmi-helper ${D}${libexecdir}
+}
+
+INITSCRIPT_NAME = "ipmi"
+INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "ipmi.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.3.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.3.9.bb
deleted file mode 100644
index db510de..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.3.9.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-SUMMARY = "A full-featured SSL VPN solution via tun device."
-HOMEPAGE = "http://openvpn.sourceforge.net"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5aac200199fde47501876cba7263cb0c"
-DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-inherit autotools systemd
-
-SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \
-           file://openvpn \
-           file://openvpn@.service \
-           file://openvpn-volatile.conf"
-
-SRC_URI[md5sum] = "265755044ae88f9249d509f6d061f7e5"
-SRC_URI[sha256sum] = "2c12fe9ea641ac1291e70322cc500641c84e5903dd4f40bf2eda7e9f209b2f9c"
-
-SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-CFLAGS += "-fno-inline"
-
-# I want openvpn to be able to read password from file (hrw)
-EXTRA_OECONF += "--enable-iproute2"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
-
-# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
-EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
-
-do_install_append() {
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
-
-    install -d ${D}/${sysconfdir}/openvpn
-    install -d ${D}/${sysconfdir}/openvpn/sample
-    install -m 755 ${S}/sample/sample-config-files/loopback-server  ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
-    install -m 755 ${S}/sample/sample-config-files/loopback-client  ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
-    install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
-    install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
-
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
-
-        install -d ${D}/${localstatedir}
-        install -d ${D}/${localstatedir}/lib
-        install -d -m 710 ${D}/${localstatedir}/lib/openvpn
-
-        install -d ${D}${sysconfdir}/tmpfiles.d
-        install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
-        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
-    fi
-}
-
-PACKAGES =+ " ${PN}-sample "
-
-RRECOMMENDS_${PN} = "kernel-module-tun"
-
-FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
-FILES_${PN} += "${systemd_unitdir}/system/openvpn@.service \
-                ${sysconfdir}/tmpfiles.d \
-               "
-FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
-                       ${systemd_unitdir}/system/openvpn@loopback-client.service \
-                       ${sysconfdir}/openvpn/sample/"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.3.bb
new file mode 100644
index 0000000..90097f3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.3.bb
@@ -0,0 +1,67 @@
+SUMMARY = "A full-featured SSL VPN solution via tun device."
+HOMEPAGE = "http://openvpn.sourceforge.net"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9b64491ec98eb6c6493ac5e4118f107"
+DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+inherit autotools systemd
+
+SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
+           file://openvpn \
+           file://openvpn@.service \
+           file://openvpn-volatile.conf"
+
+SRC_URI[md5sum] = "e1929f82aff40f3d105e5f72aacff9c1"
+SRC_URI[sha256sum] = "cee3d3ca462960a50a67c0ebd186e01b6d13db70275205663695152c9aca8579"
+
+SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+CFLAGS += "-fno-inline"
+
+# I want openvpn to be able to read password from file (hrw)
+EXTRA_OECONF += "--enable-iproute2"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
+
+# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
+EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
+
+    install -d ${D}/${sysconfdir}/openvpn
+    install -d ${D}/${sysconfdir}/openvpn/sample
+    install -m 755 ${S}/sample/sample-config-files/loopback-server  ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
+    install -m 755 ${S}/sample/sample-config-files/loopback-client  ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
+    install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
+    install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
+
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
+
+        install -d ${D}/${localstatedir}
+        install -d ${D}/${localstatedir}/lib
+        install -d -m 710 ${D}/${localstatedir}/lib/openvpn
+
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+    fi
+}
+
+PACKAGES =+ " ${PN}-sample "
+
+RRECOMMENDS_${PN} = "kernel-module-tun"
+
+FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
+FILES_${PN} += "${systemd_unitdir}/system/openvpn@.service \
+                ${sysconfdir}/tmpfiles.d \
+               "
+FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
+                       ${systemd_unitdir}/system/openvpn@loopback-client.service \
+                       ${sysconfdir}/openvpn/sample/"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch
new file mode 100644
index 0000000..eb549de
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch
@@ -0,0 +1,28 @@
+From f3e04281bad361249a8dad0cde150a801d720f67 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 18:46:52 -0700
+Subject: [PATCH] configure: Dont use uname to determine target OS
+
+Helps with cross-compiling
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 6c35a72..f9714e2 100755
+--- a/configure
++++ b/configure
+@@ -31,7 +31,7 @@
+ #DEFS += -DSCOPED_ACL
+ #
+ 
+-OS=`uname`
++OS="Linux"
+ CFG=config.mk
+ TMP=`mktemp /tmp/XXXXXX`
+ BUGREPORT_URL="https://github.com/troglobit/pimd/issues"
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.1.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.1.8.bb
deleted file mode 100644
index 7edb642..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.1.8.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "pimd is a lightweight stand-alone PIM-SM v2 multicast routing daemon."
-HOMEPAGE = "http://troglobit.com/pimd.html"
-SECTION = "net"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=94f108f91fab720d62425770b70dd790"
-
-SRC_URI = "ftp://ftp.troglobit.com/pimd/${BP}.tar.bz2"
-SRC_URI[md5sum] = "a12448bc7c9bfcebf51a13ebf1ffa962"
-SRC_URI[sha256sum] = "01016940543a0a6131d4e6c91b595d47e187012c59a298eec14c3dbc38564b3a"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-CFLAGS += "-I ${S}/include "
-
-do_install() {
-    unset datadir
-    unset mandir
-    oe_runmake 'DESTDIR=${D}' install
-}
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb
new file mode 100644
index 0000000..2faa7cb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb
@@ -0,0 +1,20 @@
+SUMMARY = "pimd is a lightweight stand-alone PIM-SM v2 multicast routing daemon."
+HOMEPAGE = "http://troglobit.com/pimd.html"
+SECTION = "net"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94f108f91fab720d62425770b70dd790"
+
+SRC_URI = "ftp://ftp.troglobit.com/pimd/${BP}.tar.gz \
+           file://0001-configure-Dont-use-uname-to-determine-target-OS.patch \
+           "
+SRC_URI[md5sum] = "a3c03e40540980b2c06e265a17988e60"
+SRC_URI[sha256sum] = "c77a9812751f114490a28a6839b16aac8b020c8d9fd6aa22bf3880c054e19f1d"
+
+EXTRA_OECONF_append_libc-musl = " --embedded-libc"
+
+inherit autotools-brokensep
+
+do_configure() {
+    oe_runconf
+}
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
new file mode 100644
index 0000000..7ebc398
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
@@ -0,0 +1,26 @@
+From 2a3ab04bbdc4624792886aa51579eadb427ef99e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 07:42:11 -0700
+Subject: [PATCH] memory.h: Include stdint.h for uintptr_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libstrongswan/utils/utils/memory.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libstrongswan/utils/utils/memory.h b/src/libstrongswan/utils/utils/memory.h
+index b978e7c..55aaaf5 100644
+--- a/src/libstrongswan/utils/utils/memory.h
++++ b/src/libstrongswan/utils/utils/memory.h
+@@ -22,6 +22,8 @@
+ #ifndef MEMORY_H_
+ #define MEMORY_H_
+ 
++#include <stdint.h>
++
+ /**
+  * Helper function that compares two binary blobs for equality
+  */
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.1.bb
deleted file mode 100644
index d63214b..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.1.bb
+++ /dev/null
@@ -1,130 +0,0 @@
-DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
-Linux operating system."
-SUMMARY = "strongSwan is an OpenSource IPsec implementation"
-HOMEPAGE = "http://www.strongswan.org"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "gmp openssl flex-native flex bison-native"
-
-SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
-        file://fix-funtion-parameter.patch \
-"
-
-SRC_URI[md5sum] = "4eba9474f7dc6c8c8d7037261358e68d"
-SRC_URI[sha256sum] = "720b301991f77bdedd8d551a956f52e2d11686a0ec18e832094f86cf2b842ab7"
-
-EXTRA_OECONF = " \
-        --without-lib-prefix \
-"
-
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
-
-
-PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \
-        ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \
-"
-PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
-PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
-PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
-PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
-PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
-PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
-PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
-PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
-PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
-PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
-
-# requires swanctl
-PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
-
-inherit autotools systemd pkgconfig
-
-RRECOMMENDS_${PN} = "kernel-module-ipsec"
-
-FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
-FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
-FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la"
-FILES_${PN}-staticdev += "${libdir}/ipsec/*.a"
-
-CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
-
-PACKAGES += "${PN}-plugins"
-ALLOW_EMPTY_${PN}-plugins = "1"
-
-PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
-NOAUTOPACKAGEDEBUG = "1"
-
-python split_strongswan_plugins () {
-    sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
-    libdir = d.expand('${libdir}/ipsec/plugins')
-    dbglibdir = os.path.join(libdir, '.debug')
-
-    def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
-        dvar = d.getVar('PKGD', True)
-        oldfiles = d.getVar('CONFFILES_' + pkg, True)
-        newfile = '/' + os.path.relpath(f, dvar)
-
-        if not oldfiles:
-            d.setVar('CONFFILES_' + pkg, newfile)
-        else:
-            d.setVar('CONFFILES_' + pkg, oldfiles + " " + newfile)
-
-    split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
-    do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
-
-    split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
-    split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
-    split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
-
-    if split_packages:
-        pn = d.getVar('PN', True)
-        d.setVar('RRECOMMENDS_' + pn + '-plugins', ' '.join(split_packages))
-        d.appendVar('RRECOMMENDS_' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
-        d.appendVar('RRECOMMENDS_' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
-        d.appendVar('RRECOMMENDS_' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
-}
-
-PACKAGESPLITFUNCS_prepend = "split_strongswan_plugins "
-
-# Install some default plugins based on default strongSwan ./configure options
-# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
-RDEPENDS_${PN} += "\
-    ${PN}-plugin-aes \
-    ${PN}-plugin-attr \
-    ${PN}-plugin-cmac \
-    ${PN}-plugin-constraints \
-    ${PN}-plugin-des \
-    ${PN}-plugin-dnskey \
-    ${PN}-plugin-hmac \
-    ${PN}-plugin-kernel-netlink \
-    ${PN}-plugin-md5 \
-    ${PN}-plugin-nonce \
-    ${PN}-plugin-pem \
-    ${PN}-plugin-pgp \
-    ${PN}-plugin-pkcs1 \
-    ${PN}-plugin-pkcs7 \
-    ${PN}-plugin-pkcs8 \
-    ${PN}-plugin-pkcs12 \
-    ${PN}-plugin-pubkey \
-    ${PN}-plugin-random \
-    ${PN}-plugin-rc2 \
-    ${PN}-plugin-resolve \
-    ${PN}-plugin-revocation \
-    ${PN}-plugin-sha1 \
-    ${PN}-plugin-sha2 \
-    ${PN}-plugin-socket-default \
-    ${PN}-plugin-sshkey \
-    ${PN}-plugin-updown \
-    ${PN}-plugin-vici \
-    ${PN}-plugin-x509 \
-    ${PN}-plugin-xauth-generic \
-    ${PN}-plugin-xcbc \
-    "
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}-swanctl.service', '${BPN}.service', d)}"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb
new file mode 100644
index 0000000..3fb56bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb
@@ -0,0 +1,131 @@
+DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
+Linux operating system."
+SUMMARY = "strongSwan is an OpenSource IPsec implementation"
+HOMEPAGE = "http://www.strongswan.org"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "gmp openssl flex-native flex bison-native"
+
+SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
+           file://fix-funtion-parameter.patch \
+           file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
+           "
+
+SRC_URI[md5sum] = "4afffe3c219bb2e04f09510905af836b"
+SRC_URI[sha256sum] = "c5ea54b199174708de11af9b8f4ecf28b5b0743d4bc0e380e741f25b28c0f8d4"
+
+EXTRA_OECONF = " \
+        --without-lib-prefix \
+"
+
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
+
+
+PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \
+        ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \
+"
+PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
+PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
+PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
+PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
+PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
+PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
+PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
+PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
+
+# requires swanctl
+PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
+
+inherit autotools systemd pkgconfig
+
+RRECOMMENDS_${PN} = "kernel-module-ipsec"
+
+FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
+FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
+FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la"
+FILES_${PN}-staticdev += "${libdir}/ipsec/*.a"
+
+CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
+
+PACKAGES += "${PN}-plugins"
+ALLOW_EMPTY_${PN}-plugins = "1"
+
+PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
+NOAUTOPACKAGEDEBUG = "1"
+
+python split_strongswan_plugins () {
+    sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
+    libdir = d.expand('${libdir}/ipsec/plugins')
+    dbglibdir = os.path.join(libdir, '.debug')
+
+    def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
+        dvar = d.getVar('PKGD', True)
+        oldfiles = d.getVar('CONFFILES_' + pkg, True)
+        newfile = '/' + os.path.relpath(f, dvar)
+
+        if not oldfiles:
+            d.setVar('CONFFILES_' + pkg, newfile)
+        else:
+            d.setVar('CONFFILES_' + pkg, oldfiles + " " + newfile)
+
+    split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
+    do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
+
+    split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
+    split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
+    split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
+
+    if split_packages:
+        pn = d.getVar('PN', True)
+        d.setVar('RRECOMMENDS_' + pn + '-plugins', ' '.join(split_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
+}
+
+PACKAGESPLITFUNCS_prepend = "split_strongswan_plugins "
+
+# Install some default plugins based on default strongSwan ./configure options
+# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
+RDEPENDS_${PN} += "\
+    ${PN}-plugin-aes \
+    ${PN}-plugin-attr \
+    ${PN}-plugin-cmac \
+    ${PN}-plugin-constraints \
+    ${PN}-plugin-des \
+    ${PN}-plugin-dnskey \
+    ${PN}-plugin-hmac \
+    ${PN}-plugin-kernel-netlink \
+    ${PN}-plugin-md5 \
+    ${PN}-plugin-nonce \
+    ${PN}-plugin-pem \
+    ${PN}-plugin-pgp \
+    ${PN}-plugin-pkcs1 \
+    ${PN}-plugin-pkcs7 \
+    ${PN}-plugin-pkcs8 \
+    ${PN}-plugin-pkcs12 \
+    ${PN}-plugin-pubkey \
+    ${PN}-plugin-random \
+    ${PN}-plugin-rc2 \
+    ${PN}-plugin-resolve \
+    ${PN}-plugin-revocation \
+    ${PN}-plugin-sha1 \
+    ${PN}-plugin-sha2 \
+    ${PN}-plugin-socket-default \
+    ${PN}-plugin-sshkey \
+    ${PN}-plugin-updown \
+    ${PN}-plugin-vici \
+    ${PN}-plugin-x509 \
+    ${PN}-plugin-xauth-generic \
+    ${PN}-plugin-xcbc \
+    "
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}-swanctl.service', '${BPN}.service', d)}"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
new file mode 100644
index 0000000..209b0dd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
@@ -0,0 +1,54 @@
+Upstream-Status: Pending
+
+When openssl disable des support with configure option 'no-des', it doesn't
+provide des related header file and functions. That causes stunnel compile
+failed. Fix it by checking macro OPENSSL_NO_DES to use openssl des related
+library conditionaly.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/src/common.h b/src/common.h
+index f7d38b0..bf485af 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -471,7 +471,9 @@ extern char *sys_errlist[];
+ #ifndef OPENSSL_NO_MD4
+ #include <openssl/md4.h>
+ #endif /* !defined(OPENSSL_NO_MD4) */
++#ifndef OPENSSL_NO_DES
+ #include <openssl/des.h>
++#endif
+ #ifndef OPENSSL_NO_DH
+ #include <openssl/dh.h>
+ #if OPENSSL_VERSION_NUMBER<0x10100000L
+diff --git a/src/protocol.c b/src/protocol.c
+index 587df09..8198eb6 100644
+--- a/src/protocol.c
++++ b/src/protocol.c
+@@ -66,7 +66,7 @@ NOEXPORT char *imap_server(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *nntp_client(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *connect_server(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *connect_client(CLI *, SERVICE_OPTIONS *, const PHASE);
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+ NOEXPORT void ntlm(CLI *, SERVICE_OPTIONS *);
+ NOEXPORT char *ntlm1();
+ NOEXPORT char *ntlm3(char *, char *, char *, char *);
+@@ -1175,7 +1175,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
+     fd_printf(c, c->remote_fd.fd, "Host: %s", opt->protocol_host);
+     if(opt->protocol_username && opt->protocol_password) {
+         if(!strcasecmp(opt->protocol_authentication, "ntlm")) {
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+             ntlm(c, opt);
+ #else
+             s_log(LOG_ERR, "NTLM authentication is not available");
+@@ -1216,7 +1216,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
+     return NULL;
+ }
+ 
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+ 
+ /*
+  * NTLM code is based on the following documentation:
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.35.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.35.bb
index 3e2e2c2..ec8478d 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.35.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.35.bb
@@ -1,4 +1,5 @@
 SUMMARY = "Program for providing universal TLS/SSL tunneling service"
+HOMEPAGE = "http://www.stunnel.org/"
 DESCRIPTION = "SSL encryption wrapper between remote client and local (inetd-startable) or remote server."
 SECTION = "net"
 LICENSE = "GPLv2"
@@ -7,7 +8,9 @@
 
 RDEPENDS_${PN} += "perl"
 
-SRC_URI = "ftp://ftp.stunnel.org/stunnel/archive/5.x/${BP}.tar.gz"
+SRC_URI = "ftp://ftp.stunnel.org/stunnel/archive/5.x/${BP}.tar.gz \
+           file://fix-openssl-no-des.patch \
+"
 
 SRC_URI[md5sum] = "9079f5fafbccaf88b7d92b227d78249a"
 SRC_URI[sha256sum] = "ffa386ae4c825f35f35157c285e7402a6d58779ad8c3822f74a9d355b54aba1d"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch
deleted file mode 100644
index 50e2d54..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-[PATCH] tcpdump: cross-compiling not check dlpi.
-
-For cross-compiling on Linux platforms, we do not need to check libdlpi 
-since it is only placed on Solaris.
-Also, checking libdlpi in native /lib would cause do_qa_configure fail.
-
-Upstream-Status: Pending.
-
-Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
----
- configure.in |    4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 7f9591c..ca277c0 100644
---- a/configure.in
-+++ b/configure.in
-@@ -716,7 +716,9 @@ don't.])
- fi
- 
- # libdlpi is needed for Solaris 11 and later.
--AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
-+if test "$cross_compiling" != yes; then
-+	AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
-+fi
- 
- dnl portability macros for getaddrinfo/getnameinfo
- dnl
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb
index 85db693..d38540e 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb
@@ -8,7 +8,6 @@
 SRC_URI = " \
     http://www.tcpdump.org/release/${BP}.tar.gz \
     file://unnecessary-to-check-libpcap.patch \
-    file://tcpdump-configure-dlpi.patch \
     file://add-ptest.patch \
     file://run-ptest \
 "
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.1.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.1.2.bb
deleted file mode 100644
index 6ee9d73..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.1.2.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Use previously captured traffic to test network devices"
-
-HOMEPAGE = "http://tcpreplay.synfin.net/"
-SECTION = "net"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=890b830b22fd632e9ffd996df20338f8"
-
-SRC_URI = "http://prdownloads.sourceforge.net/tcpreplay/${PV}/tcpreplay-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "3105b10b07dbc0b07ce2da07a2368359"
-SRC_URI[sha256sum] = "da483347e83a9b5df0e0dbb0f822a2d37236e79dda35f4bc4e6684fa827f25ea"
-
-DEPENDS = "libpcap"
-
-EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}/usr"
-
-inherit siteinfo autotools-brokensep
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.2.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.2.6.bb
new file mode 100644
index 0000000..681ef02
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.2.6.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Use previously captured traffic to test network devices"
+
+HOMEPAGE = "http://tcpreplay.synfin.net/"
+SECTION = "net"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=890b830b22fd632e9ffd996df20338f8"
+
+SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "3e65d5b872e441c6a0038191a3dc7ce9"
+SRC_URI[sha256sum] = "043756c532dab93e2be33a517ef46b1341f7239278a1045ae670041dd8a4531d"
+
+DEPENDS = "libpcap"
+
+EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}/usr"
+
+inherit siteinfo autotools-brokensep
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.10.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.10.bb
new file mode 100644
index 0000000..5358ba0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.10.bb
@@ -0,0 +1,71 @@
+DESCRIPTION = "wireshark - a popular network protocol analyzer"
+HOMEPAGE = "http://www.wireshark.org"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e271234ba1a13c6e512e76b94ac2f77"
+
+DEPENDS = "pcre expat glib-2.0 glib-2.0-native"
+
+SRC_URI = "https://2.na.dl.wireshark.org/src/all-versions/${BP}.tar.bz2"
+
+PE = "1"
+
+SRC_URI[md5sum] = "ae3a1a43a6e3687f44a738fd15d78021"
+SRC_URI[sha256sum] = "8574a5e1fdec7affae640924bd46c1aed1bd866e02632fa5625e1450e4a50707"
+
+inherit autotools pkgconfig perlnative
+
+ARM_INSTRUCTION_SET = "arm"
+
+PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc"
+PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk2 graphics", "", d)}"
+#PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gtk3", "", d)}"
+
+PACKAGECONFIG[libcap] = "--with-libcap=${STAGING_LIBDIR}, --with-libcap=no --enable-pcap-ng-default , libcap"
+PACKAGECONFIG[libpcap] = "--with-pcap=${STAGING_LIBDIR} --with-pcap-remote, --with-pcap=no --enable-pcap-ng-default  , libpcap"
+PACKAGECONFIG[libsmi] = "--with-libsmi=yes, --with-libsmi=no, libsmi"
+PACKAGECONFIG[libnl] = "--with-libnl=yes, --with-libnl=no, libnl"
+PACKAGECONFIG[portaudio] = "--with-portaudio=yes, --with-portaudio=no, portaudio-v19"
+PACKAGECONFIG[gtk2] = "--with-gtk=2, , gtk+"
+PACKAGECONFIG[gtk3] = "--with-gtk=3, , gtk+3"
+PACKAGECONFIG[graphics] = "--enable-wireshark, --with-gtk=no --disable-wireshark,"
+PACKAGECONFIG[gnutls] = "--with-gnutls=yes, --with-gnutls=no, gnutls"
+PACKAGECONFIG[gcrypt] = "--with-gcrypt=yes, --with-gcrypt=no, libgcrypt"
+PACKAGECONFIG[ssl] = "--with-ssl=yes, --with-ssl=no, openssl"
+PACKAGECONFIG[krb5] = "--with-krb5=yes, --with-krb5=no, krb5"
+PACKAGECONFIG[lua] = "--with-lua=yes, --with-lua=no, lua"
+PACKAGECONFIG[zlib] = "--with-zlib=yes, --with-zlib=no, zlib"
+PACKAGECONFIG[geoip] = "--with-geoip=yes, --with-geoip=no, geoip"
+PACKAGECONFIG[plugins] = "--with-plugins=yes, --with-plugins=no"
+PACKAGECONFIG[sbc] = "--with-sbc=yes, --with-sbc=no, sbc"
+
+PACKAGECONFIG[libssh] = "--with-ssh=yes, --with-ssh=no, libssh2"
+
+
+# these next two options require addional layers
+PACKAGECONFIG[c-ares] = "--with-c-ares=yes, --with-c-ares=no, c-ares"
+
+EXTRA_OECONF += "--with-qt=no --enable-tshark --enable-rawshark"
+
+# Currently wireshark does not install header files
+do_install_append () {
+
+	install -d ${D}/${includedir}/${BPN}
+	install -d ${D}/${includedir}/${BPN}/epan
+	install -d ${D}/${includedir}/${BPN}/epan/crypt
+	install -d ${D}/${includedir}/${BPN}/epan/dfilter
+	install -d ${D}/${includedir}/${BPN}/epan/dissectors
+	install -d ${D}/${includedir}/${BPN}/epan/ftypes
+	install -d ${D}/${includedir}/${BPN}/epan/wmem
+
+	install config.h ${D}/${includedir}/${BPN}
+	install ${S}/register.h ${D}/${includedir}/${BPN}
+	install -D ${S}/epan/*.h ${D}/${includedir}/${BPN}/epan
+	install -D ${S}/epan/crypt/*.h ${D}/${includedir}/${BPN}/epan/crypt
+	install -D ${S}/epan/dfilter/*.h ${D}/${includedir}/${BPN}/epan/dfilter
+	install -D ${S}/epan/dissectors/*.h ${D}/${includedir}/${BPN}/epan/dissectors
+	install -D ${S}/epan/ftypes/*.h ${D}/${includedir}/${BPN}/epan/ftypes
+	install -D ${S}/epan/wmem/*.h ${D}/${includedir}/${BPN}/epan/wmem
+}
+
+FILES_${PN} += "${datadir}*"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.9.bb
deleted file mode 100644
index 82c25ff..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.9.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-DESCRIPTION = "wireshark - a popular network protocol analyzer"
-HOMEPAGE = "http://www.wireshark.org"
-SECTION = "net"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6e271234ba1a13c6e512e76b94ac2f77"
-
-DEPENDS = "pcre expat glib-2.0 glib-2.0-native"
-
-SRC_URI = "https://2.na.dl.wireshark.org/src/all-versions/${BP}.tar.bz2"
-
-PE = "1"
-
-SRC_URI[md5sum] = "7d5e65efd0714bd6248aa5b36c28320d"
-SRC_URI[sha256sum] = "c8b32c0e7d44a277e737c53d9d142ad3fe4265338f25a7fd8c891f58a7633fc2"
-
-inherit autotools pkgconfig perlnative
-
-ARM_INSTRUCTION_SET = "arm"
-
-PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc"
-PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk2 graphics", "", d)}"
-#PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gtk3", "", d)}"
-
-PACKAGECONFIG[libcap] = "--with-libcap=${STAGING_LIBDIR}, --with-libcap=no --enable-pcap-ng-default , libcap"
-PACKAGECONFIG[libpcap] = "--with-pcap=${STAGING_LIBDIR} --with-pcap-remote, --with-pcap=no --enable-pcap-ng-default  , libpcap"
-PACKAGECONFIG[libsmi] = "--with-libsmi=yes, --with-libsmi=no, libsmi"
-PACKAGECONFIG[libnl] = "--with-libnl=yes, --with-libnl=no, libnl"
-PACKAGECONFIG[portaudio] = "--with-portaudio=yes, --with-portaudio=no, portaudio-v19"
-PACKAGECONFIG[gtk2] = "--with-gtk=2, , gtk+"
-PACKAGECONFIG[gtk3] = "--with-gtk=3, , gtk+3"
-PACKAGECONFIG[graphics] = "--enable-wireshark, --with-gtk=no --disable-wireshark,"
-PACKAGECONFIG[gnutls] = "--with-gnutls=yes, --with-gnutls=no, gnutls"
-PACKAGECONFIG[gcrypt] = "--with-gcrypt=yes, --with-gcrypt=no, libgcrypt"
-PACKAGECONFIG[ssl] = "--with-ssl=yes, --with-ssl=no, openssl"
-PACKAGECONFIG[krb5] = "--with-krb5=yes, --with-krb5=no, krb5"
-PACKAGECONFIG[lua] = "--with-lua=yes, --with-lua=no, lua"
-PACKAGECONFIG[zlib] = "--with-zlib=yes, --with-zlib=no, zlib"
-PACKAGECONFIG[geoip] = "--with-geoip=yes, --with-geoip=no, geoip"
-PACKAGECONFIG[plugins] = "--with-plugins=yes, --with-plugins=no"
-PACKAGECONFIG[sbc] = "--with-sbc=yes, --with-sbc=no, sbc"
-
-PACKAGECONFIG[libssh] = "--with-ssh=yes, --with-ssh=no, libssh2"
-
-
-# these next two options require addional layers
-PACKAGECONFIG[c-ares] = "--with-c-ares=yes, --with-c-ares=no, c-ares"
-
-EXTRA_OECONF += "--with-qt=no --enable-tshark --enable-rawshark"
-
-# Currently wireshark does not install header files
-do_install_append () {
-
-	install -d ${D}/${includedir}/${BPN}
-	install -d ${D}/${includedir}/${BPN}/epan
-	install -d ${D}/${includedir}/${BPN}/epan/crypt
-	install -d ${D}/${includedir}/${BPN}/epan/dfilter
-	install -d ${D}/${includedir}/${BPN}/epan/dissectors
-	install -d ${D}/${includedir}/${BPN}/epan/ftypes
-	install -d ${D}/${includedir}/${BPN}/epan/wmem
-
-	install config.h ${D}/${includedir}/${BPN}
-	install ${S}/register.h ${D}/${includedir}/${BPN}
-	install -D ${S}/epan/*.h ${D}/${includedir}/${BPN}/epan
-	install -D ${S}/epan/crypt/*.h ${D}/${includedir}/${BPN}/epan/crypt
-	install -D ${S}/epan/dfilter/*.h ${D}/${includedir}/${BPN}/epan/dfilter
-	install -D ${S}/epan/dissectors/*.h ${D}/${includedir}/${BPN}/epan/dissectors
-	install -D ${S}/epan/ftypes/*.h ${D}/${includedir}/${BPN}/epan/ftypes
-	install -D ${S}/epan/wmem/*.h ${D}/${includedir}/${BPN}/epan/wmem
-}
-
-FILES_${PN} += "${datadir}*"
diff --git a/import-layers/meta-openembedded/meta-oe/README b/import-layers/meta-openembedded/meta-oe/README
index fdc5640..dabed2f 100644
--- a/import-layers/meta-openembedded/meta-oe/README
+++ b/import-layers/meta-openembedded/meta-oe/README
@@ -1,15 +1,15 @@
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: pyro
+branch: rocko
 revision: HEAD
 
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-oe][pyro]' in the subject'
+Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-oe][rocko]' in the subject'
 
 When sending single patches, please use something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-oe][pyro][PATCH'
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-oe][rocko][PATCH'
 
 You are encouraged to fork the mirror on github https://github.com/openembedded/meta-oe/ to share your patches, this is preferred for patch sets consisting of more than one patch. Other services like gitorious, repo.or.cz or self hosted setups are of course accepted as well, 'git fetch <remote>' works the same on all of them. We recommend github because it is free, easy to use, has been proven to be reliable and has a really good web GUI.
 
-pyro Branch Maintainer:
+rocko Branch Maintainer:
 Armin Kuster <akuster808@gmail.com>
diff --git a/import-layers/meta-openembedded/meta-oe/classes/dos2unix.bbclass b/import-layers/meta-openembedded/meta-oe/classes/dos2unix.bbclass
new file mode 100644
index 0000000..1bad998
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/classes/dos2unix.bbclass
@@ -0,0 +1,14 @@
+# Class for use to convert all CRLF line terminators to LF
+# provided that some projects are being developed/maintained
+# on Windows so they have different line terminators(CRLF) vs
+# on Linux(LF), which can cause annoying patching errors during
+# git push/checkout processes.
+
+do_convert_crlf_to_lf[depends] += "dos2unix-native:do_populate_sysroot"
+
+# Convert CRLF line terminators to LF
+do_convert_crlf_to_lf () {
+    find ${S} -type f -exec dos2unix {} \;
+}
+
+addtask convert_crlf_to_lf after do_unpack before do_patch
diff --git a/import-layers/meta-openembedded/meta-oe/classes/meson.bbclass b/import-layers/meta-openembedded/meta-oe/classes/meson.bbclass
index c33174a..a09bc24 100644
--- a/import-layers/meta-openembedded/meta-oe/classes/meson.bbclass
+++ b/import-layers/meta-openembedded/meta-oe/classes/meson.bbclass
@@ -10,10 +10,15 @@
 MESON_SOURCEPATH = "${S}"
 
 # These variables in the environment override the *native* tools, not the cross.
+export CPPFLAGS = "${BUILD_CPPFLAGS}"
 export CC = "${BUILD_CC}"
+export CFLAGS = "${BUILD_CFLAGS}"
 export CXX = "${BUILD_CXX}"
+export CXXFLAGS = "${BUILD_CXXFLAGS}"
 export LD = "${BUILD_LD}"
+export LDFLAGS = "${BUILD_LDFLAGS}"
 export AR = "${BUILD_AR}"
+export PKG_CONFIG = "pkg-config-native"
 
 def noprefix(var, d):
     return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
@@ -27,12 +32,12 @@
               --includedir ${@noprefix('includedir', d)} \
               --mandir ${@noprefix('mandir', d)} \
               --infodir ${@noprefix('infodir', d)} \
-              --localedir ${@noprefix('localedir', d)} \
               --sysconfdir ${sysconfdir} \
               --localstatedir ${localstatedir} \
               --sharedstatedir ${sharedstatedir}"
 
-MESON_C_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
 
 MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be', 'big', 'little', d)}"
 MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big', 'little', d)}"
@@ -60,10 +65,11 @@
 pkgconfig = 'pkg-config'
 
 [properties]
+needs_exe_wrapper = true
 c_args = [${@meson_array('MESON_C_ARGS', d)}]
-cpp_args = [${@meson_array('TOOLCHAIN_OPTIONS', d)}]
-c_link_args = [${@meson_array('TOOLCHAIN_OPTIONS', d)}]
-cpp_link_args = [${@meson_array('TOOLCHAIN_OPTIONS', d)}]
+c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
+cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
+cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
 
 [host_machine]
 system = '${HOST_OS}'
diff --git a/import-layers/meta-openembedded/meta-oe/conf/distro/include/meta_oe_security_flags.inc b/import-layers/meta-openembedded/meta-oe/conf/distro/include/meta_oe_security_flags.inc
deleted file mode 100644
index 03868bf..0000000
--- a/import-layers/meta-openembedded/meta-oe/conf/distro/include/meta_oe_security_flags.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-# Build errors with the pie options enabled
-SECURITY_CFLAGS_pn-libdbus-c++ = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libdevmapper = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-lvm2 = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-rrdtool = "${SECURITY_NO_PIE_CFLAGS}"
-
-# This has text reloc errors with the pie options enabled
-SECURITY_CFLAGS_pn-llvm3.3 = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-mozjs = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-openldap = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-s3c64xx-gpio = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-s3c24xx-gpio = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-cpufrequtils = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libcec = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libmodplug = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libcdio = "${SECURITY_NO_PIE_CFLAGS}"
-
-#| /mnt/b/build/tmp-glibc/sysroots/intel-corei7-64/usr/lib/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init':
-#| /usr/src/debug/glibc/2.24-r0/git/csu/elf-init.c:86: undefined reference to `__init_array_start'
-
-SECURITY_CFLAGS_pn-libvdpau = "${SECURITY_NO_PIE_CFLAGS}"
-
-#| /mnt/a/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/6.2.0/ld: lj_err_dyn.o: relocation R_X86_64_TPOFF32 against `static_uex' can not be used when making a shared object; recompile with -fPIC
-#| /mnt/a/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/6.2.0/ld: final link failed: Nonrepresentable section on output
-#| collect2: error: ld returned 1 exit status
-#| make[1]: *** [Makefile:675: libluajit.so] Error 1
-SECURITY_CFLAGS_pn-luajit = "${SECURITY_NO_PIE_CFLAGS}"
-
diff --git a/import-layers/meta-openembedded/meta-oe/conf/layer.conf b/import-layers/meta-openembedded/meta-oe/conf/layer.conf
index 54425c6..d84bd09 100644
--- a/import-layers/meta-openembedded/meta-oe/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-oe/conf/layer.conf
@@ -41,6 +41,7 @@
 "
 
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
+  android-tools->android-tools-conf \
   usb-modeswitch-data->usb-modeswitch \
   lmsensors->lmsensors-config \
   phoronix-test-suite->bash \
@@ -74,10 +75,3 @@
   source-han-sans-kr-fonts->fontconfig \
   source-han-sans-tw-fonts->fontconfig \
 "
-
-FREESMARTPHONE_GIT = "git://git.freesmartphone.org"
-
-# Override security flags
-require conf/distro/include/meta_oe_security_flags.inc
-
-HOSTTOOLS += "id"
diff --git a/import-layers/meta-openembedded/meta-oe/licenses/FLTK b/import-layers/meta-openembedded/meta-oe/licenses/FLTK
new file mode 100644
index 0000000..9542075
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/licenses/FLTK
@@ -0,0 +1,530 @@
+                             FLTK License
+                           December 11, 2001
+
+The FLTK library and included programs are provided under the terms
+of the GNU Library General Public License (LGPL) with the following
+exceptions:
+
+    1. Modifications to the FLTK configure script, config
+       header file, and makefiles by themselves to support
+       a specific platform do not constitute a modified or
+       derivative work.
+
+      The authors do request that such modifications be
+      contributed to the FLTK project - send all contributions
+      through the "Software Trouble Report" on the following page:
+ 
+           http://www.fltk.org/str.php
+
+    2. Widgets that are subclassed from FLTK widgets do not
+       constitute a derivative work.
+
+    3. Static linking of applications and widgets to the
+       FLTK library does not constitute a derivative work
+       and does not require the author to provide source
+       code for the application or widget, use the shared
+       FLTK libraries, or link their applications or
+       widgets against a user-supplied version of FLTK.
+
+       If you link the application or widget to a modified
+       version of FLTK, then the changes to FLTK must be
+       provided under the terms of the LGPL in sections
+       1, 2, and 4.
+
+    4. You do not have to provide a copy of the FLTK license
+       with programs that are linked to the FLTK library, nor
+       do you have to identify the FLTK license in your
+       program or documentation as required by section 6
+       of the LGPL.
+
+       However, programs must still identify their use of FLTK.
+       The following example statement can be included in user
+       documentation to satisfy this requirement:
+
+           [program/widget] is based in part on the work of
+           the FLTK project (http://www.fltk.org).
+
+-----------------------------------------------------------------------
+
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+			 Version 2, June 1991
+
+	  Copyright (C) 1991 Free Software Foundation, Inc.
+       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+     Everyone is permitted to copy and distribute verbatim copies
+      of this license document, but changing it is not allowed.
+
+    [This is the first released version of the library GPL.  It is
+   numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+			       Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+     Appendix: How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the Free
+    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/import-layers/meta-openembedded/meta-oe/licenses/Intel b/import-layers/meta-openembedded/meta-oe/licenses/Intel
deleted file mode 100644
index eb81dd7..0000000
--- a/import-layers/meta-openembedded/meta-oe/licenses/Intel
+++ /dev/null
@@ -1,21 +0,0 @@
-License for Contributions to ACPICA
-
-Copyright (c) 2000 – 2015 Intel Corp.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINES
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/import-layers/meta-openembedded/meta-oe/licenses/UFL b/import-layers/meta-openembedded/meta-oe/licenses/UFL
new file mode 100644
index 0000000..e78ac4a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/licenses/UFL
@@ -0,0 +1,97 @@
+-------------------------------
+UBUNTU FONT LICENCE Version 1.0
+-------------------------------
+
+PREAMBLE
+This licence allows the licensed fonts to be used, studied, modified and
+redistributed freely. The fonts, including any derivative works, can be
+bundled, embedded, and redistributed provided the terms of this licence
+are met. The fonts and derivatives, however, cannot be released under
+any other licence. The requirement for fonts to remain under this
+licence does not require any document created using the fonts or their
+derivatives to be published under this licence, as long as the primary
+purpose of the document is not to be a vehicle for the distribution of
+the fonts.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this licence and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Original Version" refers to the collection of Font Software components
+as received under this licence.
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to
+a new environment.
+
+"Copyright Holder(s)" refers to all individuals and companies who have a
+copyright ownership of the Font Software.
+
+"Substantially Changed" refers to Modified Versions which can be easily
+identified as dissimilar to the Font Software by users of the Font
+Software comparing the Original Version with the Modified Version.
+
+To "Propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification and with or without charging
+a redistribution fee), making available to the public, and in some
+countries other activities as well.
+
+PERMISSION & CONDITIONS
+This licence does not grant any rights under trademark law and all such
+rights are reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of the Font Software, to propagate the Font Software, subject to
+the below conditions:
+
+1) Each copy of the Font Software must contain the above copyright
+notice and this licence. These can be included either as stand-alone
+text files, human-readable headers or in the appropriate machine-
+readable metadata fields within text or binary files as long as those
+fields can be easily viewed by the user.
+
+2) The font name complies with the following:
+(a) The Original Version must retain its name, unmodified.
+(b) Modified Versions which are Substantially Changed must be renamed to
+avoid use of the name of the Original Version or similar names entirely.
+(c) Modified Versions which are not Substantially Changed must be
+renamed to both (i) retain the name of the Original Version and (ii) add
+additional naming elements to distinguish the Modified Version from the
+Original Version. The name of such Modified Versions must be the name of
+the Original Version, with "derivative X" where X represents the name of
+the new work, appended to that name.
+
+3) The name(s) of the Copyright Holder(s) and any contributor to the
+Font Software shall not be used to promote, endorse or advertise any
+Modified Version, except (i) as required by this licence, (ii) to
+acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
+their explicit written permission.
+
+4) The Font Software, modified or unmodified, in part or in whole, must
+be distributed entirely under this licence, and must not be distributed
+under any other licence. The requirement for fonts to remain under this
+licence does not affect any document created using the Font Software,
+except any version of the Font Software extracted from a document
+created using the Font Software may only be distributed under this
+licence.
+
+TERMINATION
+This licence becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
+DEALINGS IN THE FONT SOFTWARE.
+
diff --git a/import-layers/meta-openembedded/meta-oe/licenses/X11 b/import-layers/meta-openembedded/meta-oe/licenses/X11
new file mode 100644
index 0000000..da3e406
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/licenses/X11
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2008 Alex Graveley
+ * Copyright (C) 2010 Ulrik Sverdrup <ulrik.sverdrup@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch
new file mode 100644
index 0000000..6a5350c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch
@@ -0,0 +1,81 @@
+dhrystone: fix compilation problems
+
+This patch fixes two compilation errors with original
+dhrystone sources:
+* Redefinition of times() with wrong return type
+  - Fixed by commenting out the unnecessary redefinition
+* Undefined identifier HZ
+  - Originally HZ was supposed to be the clock frequency
+    value for times()
+  - For Linux, the frequency should come from sysconf
+  - This patch defines global varible HZ and initializes
+    it from sysconf
+
+Additionally, this patch adds a simple Makefile.
+
+Upstream-status: Pending
+
+Sign-off-by: Kimmo Surakka <kimmo.surakka@ge.com>
+Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
+---
+
+diff -Naur dhry.orig/dhry_1.c dhry/dhry_1.c
+--- dhry.orig/dhry_1.c	2015-07-20 14:25:58.059945353 +0300
++++ dhry/dhry_1.c	2015-07-20 12:43:25.318945353 +0300
+@@ -45,11 +45,15 @@
+ 
+ #ifdef TIMES
+ struct tms      time_info;
+-extern  int     times ();
++/* extern  int     times (); */
+                 /* see library function "times" */
+ #define Too_Small_Time 120
+                 /* Measurements should last at least about 2 seconds */
+ #endif
++#ifndef HZ
++#include <unistd.h>  /* sysconf */
++   long HZ;
++#endif
+ #ifdef TIME
+ extern long     time();
+                 /* see library function "time"  */
+@@ -84,6 +88,9 @@
+ 
+   /* Initializations */
+ 
++#ifndef HZ
++  HZ = sysconf(_SC_CLK_TCK);
++#endif
+   Next_Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
+   Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
+ 
+diff -Naur dhry.orig/dhry.h dhry/dhry.h
+--- dhry.orig/dhry.h	2015-07-20 14:25:58.054945353 +0300
++++ dhry/dhry.h	2015-07-20 12:42:59.903945353 +0300
+@@ -420,4 +420,6 @@
+           } variant;
+       } Rec_Type, *Rec_Pointer;
+ 
+-
++#ifndef HZ
++   extern long HZ;
++#endif
+diff -Naur dhry.orig/Makefile dhry/Makefile
+--- dhry.orig/Makefile	1970-01-01 02:00:00.000000000 +0200
++++ dhry/Makefile	2015-07-20 14:10:45.832945353 +0300
+@@ -0,0 +1,15 @@
++CC=gcc
++
++all: dhry
++
++dhry: dhry_1.o dhry_2.o
++	$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
++
++dhry_1.o: dhry_1.c dhry.h
++
++dhry_2.o: dhry_2.c dhry.h
++
++clean:
++	rm -f *.o *~
++
++.PHONY: all clean
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb
new file mode 100644
index 0000000..17e8c70
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Dhrystone CPU benchmark"
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/PD;md5=b3597d12946881e13cb3b548d1173851"
+
+SRC_URI = "http://www.netlib.org/benchmark/dhry-c;downloadfilename=dhry-c.shar \
+           file://dhrystone.patch"
+SRC_URI[md5sum] = "75aa5909c174eed98c134be2f56307da"
+SRC_URI[sha256sum] = "038a7e9169787125c3451a6c941f3aca5db2d2f3863871afcdce154ef17f4e3e"
+
+# Need to override Makefile variables
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_unpack() {
+    [ -d ${S} ] || mkdir -p ${S}
+    cd ${S}
+    sh ${DL_DIR}/dhry-c.shar
+}
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/dhry ${D}${bindir}
+}
+
+# Prevent procedure merging as required by dhrystone.c:
+CFLAGS += "-fno-lto"
+
+LDFLAGS += "-fno-lto"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch
new file mode 100644
index 0000000..cdf09fa
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch
@@ -0,0 +1,31 @@
+From 35e9f80518d666db5f9c62e8072ffbc307b4af4f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 08:30:01 -0700
+Subject: [PATCH] Fix clang warnings
+
+../src/native-state-drm.cpp:334:20: error: cannot pass object of non-trivial type 'std::__cxx11::basic_string<char>' through variadic function; call will abort at runtime [-Wnon-pod-varargs]
+                   dev_path);
+                   ^
+1 error generated.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/native-state-drm.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp
+index dc2b323..62566ee 100644
+--- a/src/native-state-drm.cpp
++++ b/src/native-state-drm.cpp
+@@ -331,7 +331,7 @@ static int open_using_udev_scan()
+     if (!valid_fd(fd)) {
+         // %m is GLIBC specific... Maybe use strerror here...
+         Log::error("Tried to use '%s' but failed.\nReason : %m",
+-                   dev_path);
++                   dev_path.c_str());
+     }
+     else
+         Log::debug("Success!\n");
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-wl_surface-should-be-destoryed-after-the-wl_wind.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-wl_surface-should-be-destoryed-after-the-wl_wind.patch
deleted file mode 100644
index 4395081..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-wl_surface-should-be-destoryed-after-the-wl_wind.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 9c74ec83e2929b1d5ab65d5137b6ba42edeb332d Mon Sep 17 00:00:00 2001
-From: Yong Gan <b45748@freescale.com>
-Date: Tue, 27 Oct 2015 18:15:20 +0800
-Subject: [PATCH] Fix: wl_surface should be destoryed after the wl_window
- destroyed.
-
-Upstream-Status: Submitted [https://github.com/glmark2/glmark2/issues/12]
-
-Signed-off-by: Yong Gan <b45748@freescale.com>
-
----
- src/native-state-wayland.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/native-state-wayland.cpp b/src/native-state-wayland.cpp
-index 41fc743..cdcdf34 100644
---- a/src/native-state-wayland.cpp
-+++ b/src/native-state-wayland.cpp
-@@ -56,10 +56,10 @@ NativeStateWayland::~NativeStateWayland()
-             wl_shell_surface_destroy(window_->shell_surface);
-         if (window_->opaque_reqion)
-             wl_region_destroy(window_->opaque_reqion);
--        if (window_->surface)
--            wl_surface_destroy(window_->surface);
-         if (window_->native)
-             wl_egl_window_destroy(window_->native);
-+        if (window_->surface)
-+            wl_surface_destroy(window_->surface);
-         delete window_;
-     }
- 
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
index 26c5c04..b72ced0 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
@@ -8,21 +8,24 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
                     file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552"
 
-DEPENDS = "libpng12 jpeg"
+DEPENDS = "libpng jpeg udev"
 
-PV = "2014.03+${SRCPV}"
+PV = "2017.07+${SRCPV}"
 
-SRC_URI = " \
-    git://github.com/glmark2/glmark2.git;protocol=https \
-    file://build-Check-packages-to-be-used-by-the-enabled-flavo.patch \
-    file://0001-Fix-wl_surface-should-be-destoryed-after-the-wl_wind.patch \
-    file://Fix-configure-for-sqrt-check.patch \
-"
-SRCREV = "f413c5b423250b4fde8f95639ad368d5b02c5b9b"
+COMPATIBLE_HOST_rpi  = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '.*-linux*', 'null', d)}"
+
+SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https \
+           file://build-Check-packages-to-be-used-by-the-enabled-flavo.patch \
+           file://Fix-configure-for-sqrt-check.patch \
+           file://0001-Fix-clang-warnings.patch \
+           "
+SRCREV = "ed20c633f1926d1dd78e3e89043c85a81302cbe6"
 
 S = "${WORKDIR}/git"
 
-inherit waf pkgconfig
+inherit waf pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES += "opengl"
 
 PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gl x11-gles2', '', d)} \
                   ${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gl wayland-gles2', '', d)} \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.2.bb
new file mode 100644
index 0000000..4d1b0c4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.2.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Network benchmark tool"
+DESCRIPTION = "\
+iperf is a tool for active measurements of the maximum achievable bandwidth \
+on IP networks. It supports tuning of various parameters related to timing, \
+protocols, and buffers. For each test it reports the bandwidth, loss, and \
+other parameters."
+HOMEPAGE = "http://software.es.net/iperf/"
+SECTION = "console/network"
+BUGTRACKER = "https://github.com/esnet/iperf/issues"
+AUTHOR = "ESNET <info@es.net>, Lawrence Berkeley National Laboratory <websupport@lbl.gov>"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d098223e44bdd19585315ee75cd9d2d7"
+
+DEPENDS = "openssl"
+
+SRC_URI = "git://github.com/esnet/iperf.git \
+           file://automake-foreign.patch \
+           file://0001-include-stdint.h-for-various-std-c99-int-types.patch \
+           file://0002-Remove-pg-from-profile_CFLAGS.patch \
+           "
+
+SRCREV = "88d907f7fb58bfab5d086c5da60c922e1c582c92"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+EXTRA_OECONF = "--with-openssl=${RECIPE_SYSROOT}"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb
deleted file mode 100644
index 4a01896..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Network benchmark tool"
-DESCRIPTION = "\
-iperf is a tool for active measurements of the maximum achievable bandwidth \
-on IP networks. It supports tuning of various parameters related to timing, \
-protocols, and buffers. For each test it reports the bandwidth, loss, and \
-other parameters."
-HOMEPAGE = "http://software.es.net/iperf/"
-SECTION = "console/network"
-BUGTRACKER = "https://github.com/esnet/iperf/issues"
-AUTHOR = "ESNET <info@es.net>, Lawrence Berkeley National Laboratory <websupport@lbl.gov>"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3434c5a9a53c78c7739f0bc9e5adda"
-
-SRC_URI = "git://github.com/esnet/iperf.git \
-           file://automake-foreign.patch \
-           file://0001-include-stdint.h-for-various-std-c99-int-types.patch \
-           file://0002-Remove-pg-from-profile_CFLAGS.patch \
-           "
-
-PV = "3.1.3+gitr${SRCPV}"
-SRCREV = "099244ec686b620393e9845478a554b1c7ca5c8b"
-
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/fix-lib64-can-not-be-shiped-in-64bit-target.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/fix-lib64-can-not-be-shiped-in-64bit-target.patch
deleted file mode 100644
index 676fa8a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/fix-lib64-can-not-be-shiped-in-64bit-target.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Upstream-Status: Inappropriate [oe-core specific]
-
-
-fix the below error:
-  ERROR: QA Issue: libhugetlbfs: Files/directories were installed but not shipped
-  /usr/lib64
-  /usr/lib64/libhugetlbfs.so
-  /usr/lib64/libhugetlbfs.a
-  /usr/lib64/libhugetlbfs_privutils.so
-  /usr/lib64/perl5
-  /usr/lib64/perl5/TLBC
-  /usr/lib64/perl5/TLBC/PerfCollect.pm
-  /usr/lib64/perl5/TLBC/Report.pm
-  /usr/lib64/perl5/TLBC/DataCollect.pm
-  /usr/lib64/perl5/TLBC/OpCollect.pm
-$<50>ERROR: QA run found fatal errors. Please consider fixing them.
-
-
-Signed-off-by: Guo Chunrong <B40290@freescale.com>
-
---- a/Makefile	2013-09-23 02:28:57.340566998 -0500
-+++ b/Makefile	2013-09-23 02:31:05.344569896 -0500
-@@ -33,7 +33,6 @@
- CPPFLAGS += -D__LIBHUGETLBFS__ -DPPC_NO_SEGMENTS
- 
- ARCH = $(shell uname -m | sed -e s/i.86/i386/)
--CC = gcc
- 
- CUSTOM_LDSCRIPTS = yes
- 
-@@ -59,9 +58,9 @@
- CUSTOM_LDSCRIPTS = no
- else
- ifeq ($(ARCH),aarch64)
--CC64 = gcc
-+CC64 = $(CC)
- ELF64 = aarch64elf
--TMPLIB64 = lib64
-+TMPLIB64 = lib
- CUSTOM_LDSCRIPTS = no
- else
- ifeq ($(ARCH),i386)
-@@ -72,7 +71,7 @@
- ifeq ($(ARCH),x86_64)
- CC64 = $(CC) -m64
- ELF64 = elf_x86_64
--TMPLIB64 = lib64
-+TMPLIB64 = lib
- TMPLIB32 = lib
- ifneq ($(BUILDTYPE),NATIVEONLY)
- CC32 = $(CC) -m32
-@@ -172,11 +171,23 @@
- BINDIR = $(PREFIX)/share/libhugetlbfs
- EXEDIR = $(PREFIX)/bin
- DOCDIR = $(PREFIX)/share/doc/libhugetlbfs
-+
- ifdef CC32
- PMDIR = $(PREFIX)/lib/perl5/TLBC
-+endif
-+
-+ifdef CC64
-+ifeq ($(ARCH),x86_64)
-+PMDIR = $(PREFIX)/lib/perl5/TLBC
-+else
-+ifeq ($(ARCH),aarch64)
-+PMDIR = $(PREFIX)/lib/perl5/TLBC
- else
- PMDIR = $(PREFIX)/lib64/perl5/TLBC
- endif
-+endif
-+endif
-+
- MANDIR1 = $(PREFIX)/share/man/man1
- MANDIR3 = $(PREFIX)/share/man/man3
- MANDIR7 = $(PREFIX)/share/man/man7
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
index 823e07c..a63494a 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
@@ -33,6 +33,8 @@
 PARALLEL_MAKE = ""
 CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
 
+export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts"
+
 TARGET_CC_ARCH += "${LDFLAGS}"
 
 #The CUSTOM_LDSCRIPTS doesn't work with the gold linker
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte_2.2.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte_2.2.3.bb
index 56272d9..da2cb4b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte_2.2.3.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte_2.2.3.bb
@@ -1,3 +1,4 @@
+SUMMARY = "A CPU benchmark utility"
 DESCRIPTION = "BYTE Magazine's native benchmarks (also called BYTEmark) \
 designed to expose the capabilities of a system's CPU, FPU, \
 and memory system."
@@ -6,7 +7,7 @@
 LIC_FILES_CHKSUM = "file://README;beginline=57;endline=66;md5=020ef579f8fa5746b7e307a54707834f"
 SECTION = "console/utils"
 
-SRC_URI = "http://www.tux.org/~mayer/linux/${BP}.tar.gz \
+SRC_URI = "https://fossies.org/linux/misc/${BP}.tar.gz \
            file://nbench_32bits.patch \
            file://Makefile-add-more-dependencies-to-pointer.h.patch"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_6.6.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_6.6.1.bb
deleted file mode 100644
index b321779..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_6.6.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Phoronix Test Suite"
-DESCRIPTION = "The Phoronix Test Suite is designed to carry out both qualitative \
-and quantitative benchmarks in a clean, reproducible, and easy-to-use manner."
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-SECTION = "console/tests"
-
-SRC_URI = "http://www.phoronix-test-suite.com/releases/${BP}.tar.gz"
-SRC_URI[md5sum] = "5bcac5896a4a34fc6ae4ae94991e1637"
-SRC_URI[sha256sum] = "631ceb808d8bd6cebe69c8b711d55090d6880e906a65837f18fa8200fe7d2c4d"
-
-S = "${WORKDIR}/phoronix-test-suite"
-
-inherit systemd allarch
-
-do_install() {
-    DESTDIR=${D} ./install-sh ${exec_prefix}
-
-    if [ "${systemd_unitdir}" != "/usr/lib/systemd" ]; then
-        install -d ${D}/${systemd_unitdir}/system/
-        mv ${D}/usr/lib/systemd/system/* ${D}/${systemd_unitdir}/system/
-        rm -rf ${D}/usr/lib/
-    fi
-}
-
-SYSTEMD_SERVICE_${PN} = "phoromatic-client.service phoromatic-server.service"
-RDEPENDS_${PN} += "bash python php-cli"
-
-FILES_${PN} += " \
-    ${datadir}/phoronix-test-suite \
-    ${datadir}/appdata/phoronix-test-suite.appdata.xml \
-    ${datadir}/icons/hicolor/48x48/apps/phoronix-test-suite.png \
-    ${datadir}/icons/hicolor/64x64/mimetypes/application-x-openbenchmarking.png \
-    ${datadir}/mime/packages/openbenchmarking-mime.xml \
-    ${systemd_unitdir}/* \
-"
-
-PNBLACKLIST[phoronix-test-suite] ?= "Runtime depends on blacklisted php-cli - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.4.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.4.0.bb
new file mode 100644
index 0000000..3ccd5db
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.4.0.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Phoronix Test Suite"
+DESCRIPTION = "The Phoronix Test Suite is designed to carry out both qualitative \
+and quantitative benchmarks in a clean, reproducible, and easy-to-use manner."
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+SECTION = "console/tests"
+
+SRC_URI = "http://www.phoronix-test-suite.com/releases/${BP}.tar.gz"
+SRC_URI[md5sum] = "86fa3eede43ffff88992fe21368b11b7"
+SRC_URI[sha256sum] = "de9aec3ef4f980581756fd0bf7b30dd1ccb20e7aae637078a587606bf75a6b67"
+
+S = "${WORKDIR}/phoronix-test-suite"
+
+inherit systemd allarch
+
+do_install() {
+    DESTDIR=${D} ./install-sh ${exec_prefix}
+
+    if [ "${systemd_unitdir}" != "/usr/lib/systemd" ]; then
+        install -d ${D}/${systemd_unitdir}/system/
+        mv ${D}/usr/lib/systemd/system/* ${D}/${systemd_unitdir}/system/
+        rm -rf ${D}/usr/lib/
+    fi
+}
+
+SYSTEMD_SERVICE_${PN} = "phoromatic-client.service phoromatic-server.service"
+RDEPENDS_${PN} += "bash python php-cli"
+
+FILES_${PN} += " \
+    ${datadir}/phoronix-test-suite \
+    ${datadir}/appdata/phoronix-test-suite.appdata.xml \
+    ${datadir}/icons/hicolor/48x48/apps/phoronix-test-suite.png \
+    ${datadir}/icons/hicolor/64x64/mimetypes/application-x-openbenchmarking.png \
+    ${datadir}/mime/packages/openbenchmarking-mime.xml \
+    ${systemd_unitdir}/* \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/pmbw/pmbw_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/pmbw/pmbw_git.bb
deleted file mode 100644
index 8113da7..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/pmbw/pmbw_git.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMERY = "Parallel Memory Bandwidth Measurement / Benchmark"
-DESCRIPTION = "\
-The tool pmbw is a set of assembler routines to measure the parallel memory \
-(cache and RAM) bandwidth of modern multi-core machines."
-HOMEPAGE = "http://panthema.net/2013/pmbw/"
-SECTION = "benchmark/tests"
-AUTHOR = "Timo Bingmann"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "git://github.com/bingmann/pmbw;protocol=https"
-
-PV = "0.6.2+git${SRCPV}"
-SRCREV = "4a3b37728060a8aba06fc83f157a1965088d79d6"
-
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-# the hand coded asm uses r11, which therefore cannot be used for storing
-# the frame pointer when debugging on arm
-SELECTED_OPTIMIZATION_remove_arm = "-fno-omit-frame-pointer"
-
-PACKAGES =+ "${PN}-stats2gnuplot"
-
-FILES_${PN}-stats2gnuplot = "${bindir}/stats2gnuplot"
-
-RRECOMMENDS_${PN} = "${PN}-stats2gnuplot"
-
-PNBLACKLIST[pmbw] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130568/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch
new file mode 100644
index 0000000..cfd34f0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch
@@ -0,0 +1,49 @@
+From b08e61ef64eece23ce8ffa2784cd3c4f70b6169e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 08:08:56 -0700
+Subject: [PATCH] Specify printf formats
+
+Fixes
+tiotest.c:555:4: error: format not a string literal and no format arguments [-Werror=format-security]
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tiotest.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tiotest.c b/tiotest.c
+index 6b3d0c3..3e6166a 100644
+--- a/tiotest.c
++++ b/tiotest.c
+@@ -91,7 +91,7 @@ inline void checkIntZero(int value, char *mess)
+ {
+ 	if (value <= 0) 
+ 	{
+-		printf(mess);
++		printf("%s",mess);
+ 		printf("Try 'tiotest -h' for more information.\n");
+ 		exit(1);
+ 	}
+@@ -101,7 +101,7 @@ inline void checkLong(long value, char *mess)
+ {
+ 	if (value < 0) 
+ 	{
+-		printf(mess);
++		printf("%s", mess);
+ 		printf("Try 'tiotest -h' for more information\n");
+ 		exit(1);
+ 	}
+@@ -552,7 +552,7 @@ void do_test( ThreadTest *test, int testCase, int sequential,
+ 		if(args.debugLevel > 4)
+ 		{
+ 			printf("Created %d threads\n", i);
+-			fprintf(stderr, debugMessage);
++			fprintf(stderr, "%s",  debugMessage);
+ 			fflush(stderr);
+ 		}
+ 	
+-- 
+2.13.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb
index 35af35f..427ce67 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb
@@ -10,6 +10,7 @@
     file://tiobench-makefile.patch \
     file://avoid-glibc-clashes.patch \
     file://0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch \
+    file://0001-Specify-printf-formats.patch \
 "
 SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128"
 SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez-hcidump-2.5/obsolete_automake_macros.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez-hcidump-2.5/obsolete_automake_macros.patch
deleted file mode 100644
index 0c77f1a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez-hcidump-2.5/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Pending [package obsolete/not maintained by upstream]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd bluez-hcidump-2.5/configure.ac bluez-hcidump-2.5/configure.ac
---- bluez-hcidump-2.5/configure.ac	2012-11-30 10:29:41.000000000 +0200
-+++ bluez-hcidump-2.5/configure.ac	2013-01-12 10:02:10.609511463 +0200
-@@ -2,7 +2,7 @@
- AC_INIT(bluez-hcidump, 2.5)
-
- AM_INIT_AUTOMAKE([foreign subdir-objects])
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
-
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez-hcidump_2.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
deleted file mode 100644
index 3a15d64..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Linux Bluetooth Stack HCI Debugger Tool"
-DESCRIPTION = "The hcidump tool reads raw HCI data coming from and going to a Bluetooth device \
-and displays the commands, events and data in a human-readable form."
-
-SECTION = "console"
-# hcidump was integrated into bluez5
-DEPENDS = "bluez4"
-RCONFLICTS_${PN} = "bluez5"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
-                    file://src/hcidump.c;beginline=1;endline=23;md5=3bee3a162dff43a5be7470710b99fbcf"
-PR = "r1"
-
-PNBLACKLIST[bluez-hcidump] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
-
-SRC_URI = "http://www.kernel.org/pub/linux/bluetooth/bluez-hcidump-${PV}.tar.gz \
-           file://obsolete_automake_macros.patch \
-"
-
-SRC_URI[md5sum] = "2eab54bbd2b59a2ed4274ebb9390cf18"
-SRC_URI[sha256sum] = "9b7c52b375081883738cf049ecabc103b97d094b19c6544fb241267905d88881"
-S = "${WORKDIR}/bluez-hcidump-${PV}"
-
-inherit autotools
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/bluetooth.conf b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/bluetooth.conf
deleted file mode 100644
index ca5e9e4..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/bluetooth.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-<!-- This configuration file specifies the required security policies
-     for Bluetooth core daemon to work. -->
-
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-
-  <!-- ../system.conf have denied everything, so we just punch some holes -->
-
-  <policy context="default">
-    <allow own="org.bluez"/>
-    <allow send_destination="org.bluez"/>
-    <allow send_interface="org.bluez.Agent"/>
-  </policy>
-
-</busconfig>
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/fix-udev-paths.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/fix-udev-paths.patch
deleted file mode 100644
index 8089914..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/fix-udev-paths.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Add udevdir/udevrulesdir options
-
-Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: bluez-4.101/Makefile.am
-===================================================================
---- bluez-4.101.orig/Makefile.am
-+++ bluez-4.101/Makefile.am
-@@ -395,7 +395,7 @@ EXTRA_DIST += audio/bluetooth.conf
- include Makefile.tools
- 
- if DATAFILES
--rulesdir = @UDEV_DIR@/rules.d
-+rulesdir = @UDEV_RULES_DIR@
- 
- udev_files =
- 
-Index: bluez-4.101/configure.ac
-===================================================================
---- bluez-4.101.orig/configure.ac
-+++ bluez-4.101/configure.ac
-@@ -61,4 +61,14 @@ if (test -n "${path_systemdunit}"); then
- fi
- AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
- 
-+AC_ARG_WITH([udevdir],
-+    AS_HELP_STRING([--with-udevdir=DIR], [udev directory]),
-+    [], [with_udevdir=/lib/udev/])
-+AC_SUBST([UDEV_DIR], [$with_udevdir])
-+
-+AC_ARG_WITH([udevrulesdir],
-+    AS_HELP_STRING([--with-udevrulesdir=DIR], [udev rules directory]),
-+    [], [with_udevrulesdir=/lib/udev/rules.d])
-+AC_SUBST([UDEV_RULES_DIR], [$with_udevrulesdir])
-+
- AC_OUTPUT(Makefile doc/version.xml src/bluetoothd.8 src/bluetooth.service bluez.pc)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/fix_encrypt_collision.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/fix_encrypt_collision.patch
deleted file mode 100644
index 1bc390f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/fix_encrypt_collision.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-Avoid namepspace collision with encrypt function from libc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: bluez-4.101/test/l2test.c
-===================================================================
---- bluez-4.101.orig/test/l2test.c
-+++ bluez-4.101/test/l2test.c
-@@ -107,7 +107,7 @@ static char *filename = NULL;
- static int rfcmode = 0;
- static int master = 0;
- static int auth = 0;
--static int encrypt = 0;
-+static int encryption_request = 0;
- static int secure = 0;
- static int socktype = SOCK_SEQPACKET;
- static int linger = 0;
-@@ -340,7 +340,7 @@ static int do_connect(char *svr)
- 		opt |= L2CAP_LM_MASTER;
- 	if (auth)
- 		opt |= L2CAP_LM_AUTH;
--	if (encrypt)
-+	if (encryption_request)
- 		opt |= L2CAP_LM_ENCRYPT;
- 	if (secure)
- 		opt |= L2CAP_LM_SECURE;
-@@ -475,7 +475,7 @@ static void do_listen(void (*handler)(in
- 		opt |= L2CAP_LM_MASTER;
- 	if (auth)
- 		opt |= L2CAP_LM_AUTH;
--	if (encrypt)
-+	if (encryption_request)
- 		opt |= L2CAP_LM_ENCRYPT;
- 	if (secure)
- 		opt |= L2CAP_LM_SECURE;
-@@ -1407,7 +1407,7 @@ int main(int argc, char *argv[])
- 			break;
- 
- 		case 'E':
--			encrypt = 1;
-+			encryption_request = 1;
- 			break;
- 
- 		case 'S':
-Index: bluez-4.101/test/rctest.c
-===================================================================
---- bluez-4.101.orig/test/rctest.c
-+++ bluez-4.101/test/rctest.c
-@@ -79,7 +79,7 @@ static char *filename = NULL;
- 
- static int master = 0;
- static int auth = 0;
--static int encrypt = 0;
-+static int encryption_request = 0;
- static int secure = 0;
- static int socktype = SOCK_STREAM;
- static int linger = 0;
-@@ -200,7 +200,7 @@ static int do_connect(const char *svr)
- 		opt |= RFCOMM_LM_MASTER;
- 	if (auth)
- 		opt |= RFCOMM_LM_AUTH;
--	if (encrypt)
-+	if (encryption_request)
- 		opt |= RFCOMM_LM_ENCRYPT;
- 	if (secure)
- 		opt |= RFCOMM_LM_SECURE;
-@@ -291,7 +291,7 @@ static void do_listen(void (*handler)(in
- 		opt |= RFCOMM_LM_MASTER;
- 	if (auth)
- 		opt |= RFCOMM_LM_AUTH;
--	if (encrypt)
-+	if (encryption_request)
- 		opt |= RFCOMM_LM_ENCRYPT;
- 	if (secure)
- 		opt |= RFCOMM_LM_SECURE;
-@@ -701,7 +701,7 @@ int main(int argc, char *argv[])
- 			break;
- 
- 		case 'E':
--			encrypt = 1;
-+			encryption_request = 1;
- 			break;
- 
- 		case 'S':
-Index: bluez-4.101/src/textfile.h
-===================================================================
---- bluez-4.101.orig/src/textfile.h
-+++ bluez-4.101/src/textfile.h
-@@ -24,6 +24,8 @@
- #ifndef __TEXTFILE_H
- #define __TEXTFILE_H
- 
-+#include <sys/types.h>
-+
- int create_dirs(const char *filename, const mode_t mode);
- int create_file(const char *filename, const mode_t mode);
- int create_name(char *buf, size_t size, const char *path,
-Index: bluez-4.101/test/attest.c
-===================================================================
---- bluez-4.101.orig/test/attest.c
-+++ bluez-4.101/test/attest.c
-@@ -34,6 +34,7 @@
- #include <termios.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
-+#include <sys/select.h>
- 
- #include <bluetooth/bluetooth.h>
- #include <bluetooth/rfcomm.h>
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/install-test-script.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/install-test-script.patch
deleted file mode 100644
index 23f7d99..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/install-test-script.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Inappropriate
-
-Install the bluez's test scripts
-
-Signed-off-by: Zhong Hongbo <hongbo.zhong@windriver.com>
-diff -Nurd bluez-4.101.orig/Makefile.tools bluez-4.101/Makefile.tools
---- bluez-4.101.orig/Makefile.tools	2013-11-19 15:49:07.688838000 +0800
-+++ bluez-4.101/Makefile.tools	2013-11-19 15:50:09.256837848 +0800
-@@ -227,6 +227,17 @@
- 		test/service-spp.xml test/service-opp.xml test/service-ftp.xml \
- 		test/simple-player test/test-nap
- 
-+bluez4_testdir = $(libdir)/bluez4/test/
-+dist_bluez4_test_SCRIPTS = test/sap-client test/hsplay test/hsmicro \
-+		test/monitor-bluetooth test/list-devices \
-+		test/test-discovery test/test-manager test/test-adapter \
-+		test/test-device test/test-service test/test-serial \
-+		test/test-telephony test/test-network test/simple-agent \
-+		test/simple-service test/simple-endpoint test/test-audio \
-+		test/test-input test/test-sap-server test/test-oob \
-+		test/test-attrib test/test-proximity test/test-thermometer \
-+		test/test-serial-proxy test/test-health test/test-health-sink \
-+		test/simple-player test/test-nap
- if HIDD
- bin_PROGRAMS += compat/hidd
- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/network-fix-network-Connect-method-parameters.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/network-fix-network-Connect-method-parameters.patch
deleted file mode 100644
index 37f9199..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/network-fix-network-Connect-method-parameters.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
-
-From 57170b311f1468330f4a9961dc0b3ac45f97bc13 Mon Sep 17 00:00:00 2001
-From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-Date: Sat, 30 Jun 2012 00:39:05 -0300
-Subject: [PATCH] network: fix network Connect() method parameters
-
----
- network/connection.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/network/connection.c b/network/connection.c
-index 544ec3a..59423a9 100644
---- a/network/connection.c
-+++ b/network/connection.c
-@@ -554,7 +554,9 @@ static void path_unregister(void *data)
- 
- static const GDBusMethodTable connection_methods[] = {
- 	{ GDBUS_ASYNC_METHOD("Connect",
--			NULL, NULL, connection_connect) },
-+				GDBUS_ARGS({"uuid", "s"}),
-+				GDBUS_ARGS({"interface", "s"}),
-+				connection_connect) },
- 	{ GDBUS_METHOD("Disconnect",
- 			NULL, NULL, connection_disconnect) },
- 	{ GDBUS_METHOD("GetProperties",
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/obsolete_automake_macros.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/obsolete_automake_macros.patch
deleted file mode 100644
index 1068f24..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd bluez-4.101/configure.ac bluez-4.101/configure.ac
---- bluez-4.101/configure.ac	2012-06-22 19:36:49.000000000 +0300
-+++ bluez-4.101/configure.ac	2013-01-07 06:13:18.385888966 +0200
-@@ -2,7 +2,7 @@
- AC_INIT(bluez, 4.101)
-
- AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
-
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/sbc_mmx.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/sbc_mmx.patch
deleted file mode 100644
index 98fab45..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4-4.101/sbc_mmx.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-on x86 and x86_64 gcc 4.7 complains
-
-sbc/sbc_primitives_mmx.c: In function 'sbc_calc_scalefactors_mmx':
-sbc/sbc_primitives_mmx.c:294:4: warning: asm operand 2 probably doesn't match constraints [enabled by default]
-sbc/sbc_primitives_mmx.c:294:4: error: impossible constraint in 'asm'
-
-This patch is taken from https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/911871
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: bluez-4.98/sbc/sbc_primitives_mmx.c
-===================================================================
---- bluez-4.98.orig/sbc/sbc_primitives_mmx.c	2011-12-21 14:53:54.000000000 -0800
-+++ bluez-4.98/sbc/sbc_primitives_mmx.c	2012-02-24 10:07:03.422073800 -0800
-@@ -318,7 +318,7 @@
- 				"movl          %k0, 4(%3)\n"
- 			: "+r" (blk)
- 			: "r" (&sb_sample_f[0][ch][sb]),
--				"i" ((char *) &sb_sample_f[1][0][0] -
-+				"r" ((char *) &sb_sample_f[1][0][0] -
- 					(char *) &sb_sample_f[0][0][0]),
- 				"r" (&scale_factor[ch][sb]),
- 				"r" (&consts),
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4.inc b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4.inc
deleted file mode 100644
index 5240ccf..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4.inc
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "Linux Bluetooth Stack Userland V4"
-DESCRIPTION = "Linux Bluetooth stack V4 userland components.  These include a system configurations, daemons, tools and system libraries."
-HOMEPAGE = "http://www.bluez.org"
-SECTION = "libs"
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
-                    file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
-                    file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e \
-                    file://sbc/sbc.c;beginline=1;endline=25;md5=1a40781ed30d50d8639323a184aeb191"
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-
-DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline libsndfile1"
-RDEPENDS_${PN}-dev = "bluez-hcidump"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa pie systemd', d)}"
-PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
-PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,"
-PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
-
-ASNEEDED = ""
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.gz"
-S = "${WORKDIR}/bluez-${PV}"
-
-inherit autotools-brokensep pkgconfig systemd
-
-EXTRA_OECONF = "\
-    --disable-gstreamer \
-    --enable-usb \
-    --enable-tools \
-    --enable-bccmd \
-    --enable-hid2hci \
-    --enable-dfutool \
-    --disable-hidd \
-    --disable-pand \
-    --disable-dund \
-    --disable-cups \
-    --enable-test \
-    --enable-datafiles \
-    --with-udevdir=`pkg-config --variable=udevdir udev` \
-    --with-udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d \
-"
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4_4.101.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4_4.101.bb
deleted file mode 100644
index d6d16c0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/bluez4_4.101.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-require bluez4.inc
-
-PNBLACKLIST[bluez4] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
-
-PR = "r11"
-
-SRC_URI += "file://bluetooth.conf \
-            file://sbc_mmx.patch \
-            file://fix-udev-paths.patch \
-            file://obsolete_automake_macros.patch \
-            file://network-fix-network-Connect-method-parameters.patch \
-            file://install-test-script.patch \
-            file://fix_encrypt_collision.patch \
-"
-
-SRC_URI[md5sum] = "fb42cb7038c380eb0e2fa208987c96ad"
-SRC_URI[sha256sum] = "59738410ade9f0e61a13c0f77d9aaffaafe49ba9418107e4ad75fe52846f7487"
-
-RCONFLICTS_${PN} = "bluez5"
-
-do_install_append() {
-    install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
-    install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
-    install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
-    # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
-    install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
-}
-
-RDEPENDS_${PN}-dev = "bluez-hcidump"
-RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
-
-ALLOW_EMPTY_libasound-module-bluez = "1"
-PACKAGES =+ "libasound-module-bluez ${PN}-testtools"
-
-FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
-FILES_${PN} += "${libdir}/bluetooth/plugins ${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
-FILES_${PN}-dev += "\
-    ${libdir}/bluetooth/plugins/*.la \
-    ${libdir}/alsa-lib/*.la \
-"
-
-FILES_${PN}-testtools = "${libdir}/bluez4/test/*"
-
-FILES_${PN}-dbg += "\
-    ${libdir}/bluetooth/plugins/.debug \
-    ${libdir}/*/.debug \
-    */udev/.debug \
-"
-
-SYSTEMD_SERVICE_${PN} = "bluetooth.service"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
deleted file mode 100644
index 822aec4..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-require bluez4.inc
-require recipes-multimedia/gstreamer/gst-plugins-package.inc
-
-PNBLACKLIST[gst-plugin-bluetooth] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
-
-PR = "r1"
-
-SRC_URI[md5sum] = "fb42cb7038c380eb0e2fa208987c96ad"
-SRC_URI[sha256sum] = "59738410ade9f0e61a13c0f77d9aaffaafe49ba9418107e4ad75fe52846f7487"
-
-DEPENDS = "bluez4 gst-plugins-base"
-
-EXTRA_OECONF = "\
-    --enable-gstreamer \
-"
-
-# clean unwanted files
-do_install_append() {
-    rm -rf ${D}${bindir}
-    rm -rf ${D}${sbindir}
-    rm -f  ${D}${libdir}/lib*
-    rm -rf ${D}${libdir}/pkgconfig
-    rm -rf ${D}${sysconfdir}
-    rm -rf ${D}${base_libdir}
-    rm -rf ${D}${libdir}/bluetooth
-    rm -rf ${D}${localstatedir}
-    rm -rf ${D}${libdir}/alsa-lib
-    rm -rf ${D}${datadir}
-    rm -rf ${D}${includedir}
-    rm -rf ${D}${nonarch_base_libdir}
-}
-
-FILES_${PN} = "${libdir}/gstreamer-0.10/lib*.so"
-FILES_${PN}-dev += "\
-    ${libdir}/gstreamer-0.10/*.la \
-"
-
-FILES_${PN}-dbg += "\
-    ${libdir}/*/.debug \
-"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ell/ell_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ell/ell_git.bb
deleted file mode 100644
index d259f52..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ell/ell_git.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY  = "Embedded Linux Library"
-DESCRIPTION = "ELL is a DBUS library which provides DBUS bindings."
-LICENSE  = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
-SECTION = "libs"
-
-inherit autotools pkgconfig
-
-S = "${WORKDIR}/git"
-SRCREV = "399099946abaeb2f3718a0667cc11436a7c0be14"
-SRC_URI = "git://git.kernel.org/pub/scm/libs/ell/ell.git"
-
-do_configure_prepend () {
-    mkdir ${S}/build-aux
-}
-
-DEPENDS = "dbus"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/gnokii/gnokii_0.6.31.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/gnokii/gnokii_0.6.31.bb
deleted file mode 100644
index b6098d8..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/gnokii/gnokii_0.6.31.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Cellphone tools and driver software"
-SECTION = "console/network"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-SRC_URI = "http://www.gnokii.org/download/gnokii/gnokii-${PV}.tar.bz2"
-
-DEPENDS = "glib-2.0 intltool-native"
-X11DEPENDS = " libxpm gtk+"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
-PACKAGECONFIG[libical] = "--enable-libical,--disable-libical,libical"
-PACKAGECONFIG[pcsc-lite] = "--enable-libpcsclite,--disable-libpcsclite,pcsc-lite"
-PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
-PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0"
-PACKAGECONFIG[x11] = ",--without-x,${X11DEPENDS}"
-
-inherit autotools pkgconfig
-
-PACKAGES += "libgnokii libgnokii-dev"
-
-EXTRA_OECONF = "--disable-smsd"
-
-FILES_${PN} = "${bindir} ${sbindir}"
-FILES_libgnokii-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la \
-    ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig \
-    /lib/*.a /lib/*.o ${datadir}/aclocal \
-"
-FILES_${PN}-dev = ""
-FILES_libgnokii = "${libdir}/libgnokii.so.*"
-
-SRC_URI[md5sum] = "d9627f4a1152d3ea7806df4532850d5f"
-SRC_URI[sha256sum] = "8f5a083b05c1a66a3402ca5cd80084e14c2c0632c991bb53b03c78e9adb02501"
-
-PNBLACKLIST[gnokii] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130662/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.1.bb
deleted file mode 100644
index 041f5de..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.1.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-SUMMARY = "ncurses IRC client"
-DESCRIPTION = "Irssi is an ncurses IRC client"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55fdc1113306167d6ea2561404ce02f8"
-
-DEPENDS = "glib-2.0 ncurses openssl"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz"
-SRC_URI[md5sum] = "f6bed196cef63ea089f5cce089784445"
-SRC_URI[sha256sum] = "9428c51a3f3598ffaef438c351a8d609cf10db34f2435bdcb84456226c383ccf"
-
-inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb
new file mode 100644
index 0000000..10b04bb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb
@@ -0,0 +1,18 @@
+SUMMARY = "ncurses IRC client"
+DESCRIPTION = "Irssi is an ncurses IRC client"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55fdc1113306167d6ea2561404ce02f8"
+
+DEPENDS = "glib-2.0 ncurses openssl"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz"
+SRC_URI[md5sum] = "46d4ac2a7ab472e5dc800e5d7bd9a879"
+SRC_URI[sha256sum] = "b85c07dbafe178213eccdc69f5f8f0ac024dea01c67244668f91ec1c06b986ca"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "--with-textui \
+                 --with-proxy \
+                 --with-bot \
+                 --with-perl=no \
+                 --enable-true-color"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2017-11462.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2017-11462.patch
new file mode 100644
index 0000000..4b82f02
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2017-11462.patch
@@ -0,0 +1,419 @@
+From 56f7b1bc95a2a3eeb420e069e7655fb181ade5cf Mon Sep 17 00:00:00 2001
+From: Greg Hudson <ghudson@mit.edu>
+Date: Fri, 14 Jul 2017 13:02:46 -0400
+Subject: [PATCH] Preserve GSS context on init/accept failure
+
+After gss_init_sec_context() or gss_accept_sec_context() has created a
+context, don't delete the mechglue context on failures from subsequent
+calls, even if the mechanism deletes the mech-specific context (which
+is allowed by RFC 2744 but not preferred).  Check for union contexts
+with no mechanism context in each GSS function which accepts a
+gss_ctx_id_t.
+
+CVE-2017-11462:
+
+RFC 2744 permits a GSS-API implementation to delete an existing
+security context on a second or subsequent call to
+gss_init_sec_context() or gss_accept_sec_context() if the call results
+in an error.  This API behavior has been found to be dangerous,
+leading to the possibility of memory errors in some callers.  For
+safety, GSS-API implementations should instead preserve existing
+security contexts on error until the caller deletes them.
+
+All versions of MIT krb5 prior to this change may delete acceptor
+contexts on error.  Versions 1.13.4 through 1.13.7, 1.14.1 through
+1.14.5, and 1.15 through 1.15.1 may also delete initiator contexts on
+error.
+
+ticket: 8598 (new)
+target_version: 1.15-next
+target_version: 1.14-next
+tags: pullup
+
+Upstream-Status: Backport
+CVE: CVE-2017-11462
+
+Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+---
+ src/lib/gssapi/mechglue/g_accept_sec_context.c  | 22 +++++++++++++++-------
+ src/lib/gssapi/mechglue/g_complete_auth_token.c |  2 ++
+ src/lib/gssapi/mechglue/g_context_time.c        |  2 ++
+ src/lib/gssapi/mechglue/g_delete_sec_context.c  | 14 ++++++++------
+ src/lib/gssapi/mechglue/g_exp_sec_context.c     |  2 ++
+ src/lib/gssapi/mechglue/g_init_sec_context.c    | 19 +++++++++++--------
+ src/lib/gssapi/mechglue/g_inq_context.c         |  2 ++
+ src/lib/gssapi/mechglue/g_prf.c                 |  2 ++
+ src/lib/gssapi/mechglue/g_process_context.c     |  2 ++
+ src/lib/gssapi/mechglue/g_seal.c                |  4 ++++
+ src/lib/gssapi/mechglue/g_sign.c                |  2 ++
+ src/lib/gssapi/mechglue/g_unseal.c              |  2 ++
+ src/lib/gssapi/mechglue/g_unwrap_aead.c         |  2 ++
+ src/lib/gssapi/mechglue/g_unwrap_iov.c          |  4 ++++
+ src/lib/gssapi/mechglue/g_verify.c              |  2 ++
+ src/lib/gssapi/mechglue/g_wrap_aead.c           |  2 ++
+ src/lib/gssapi/mechglue/g_wrap_iov.c            |  8 ++++++++
+ 17 files changed, 72 insertions(+), 21 deletions(-)
+
+diff --git a/src/lib/gssapi/mechglue/g_accept_sec_context.c b/src/lib/gssapi/mechglue/g_accept_sec_context.c
+index ddaf874..f28e2b1 100644
+--- a/src/lib/gssapi/mechglue/g_accept_sec_context.c
++++ b/src/lib/gssapi/mechglue/g_accept_sec_context.c
+@@ -216,6 +216,8 @@ gss_cred_id_t *		d_cred;
+     } else {
+ 	union_ctx_id = (gss_union_ctx_id_t)*context_handle;
+ 	selected_mech = union_ctx_id->mech_type;
++	if (union_ctx_id->internal_ctx_id == GSS_C_NO_CONTEXT)
++	    return (GSS_S_NO_CONTEXT);
+     }
+ 
+     /* Now create a new context if we didn't get one. */
+@@ -234,9 +236,6 @@ gss_cred_id_t *		d_cred;
+ 	    free(union_ctx_id);
+ 	    return (status);
+ 	}
+-
+-	/* set the new context handle to caller's data */
+-	*context_handle = (gss_ctx_id_t)union_ctx_id;
+     }
+ 
+     /*
+@@ -277,8 +276,10 @@ gss_cred_id_t *		d_cred;
+ 					d_cred ? &tmp_d_cred : NULL);
+ 
+ 	    /* If there's more work to do, keep going... */
+-	    if (status == GSS_S_CONTINUE_NEEDED)
++	    if (status == GSS_S_CONTINUE_NEEDED) {
++		*context_handle = (gss_ctx_id_t)union_ctx_id;
+ 		return GSS_S_CONTINUE_NEEDED;
++	    }
+ 
+ 	    /* if the call failed, return with failure */
+ 	    if (status != GSS_S_COMPLETE) {
+@@ -364,14 +365,22 @@ gss_cred_id_t *		d_cred;
+ 		*mech_type = gssint_get_public_oid(actual_mech);
+ 	    if (ret_flags != NULL)
+ 		*ret_flags = temp_ret_flags;
+-	    return	(status);
++	    *context_handle = (gss_ctx_id_t)union_ctx_id;
++	    return GSS_S_COMPLETE;
+     } else {
+ 
+ 	status = GSS_S_BAD_MECH;
+     }
+ 
+ error_out:
+-    if (union_ctx_id) {
++	/*
++	 * RFC 2744 5.1 requires that we not create a context on a failed first
++	 * call to accept, and recommends that on a failed subsequent call we
++	 * make the caller responsible for calling gss_delete_sec_context.
++	 * Even if the mech deleted its context, keep the union context around
++	 * for the caller to delete.
++	 */
++    if (union_ctx_id && *context_handle == GSS_C_NO_CONTEXT) {
+ 	if (union_ctx_id->mech_type) {
+ 	    if (union_ctx_id->mech_type->elements)
+ 		free(union_ctx_id->mech_type->elements);
+@@ -384,7 +393,6 @@ error_out:
+ 					 GSS_C_NO_BUFFER);
+ 	}
+ 	free(union_ctx_id);
+-	*context_handle = GSS_C_NO_CONTEXT;
+     }
+ 
+     if (src_name)
+diff --git a/src/lib/gssapi/mechglue/g_complete_auth_token.c b/src/lib/gssapi/mechglue/g_complete_auth_token.c
+index 9181551..4bcb47e 100644
+--- a/src/lib/gssapi/mechglue/g_complete_auth_token.c
++++ b/src/lib/gssapi/mechglue/g_complete_auth_token.c
+@@ -52,6 +52,8 @@ gss_complete_auth_token (OM_uint32 *minor_status,
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return GSS_S_NO_CONTEXT;
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech != NULL) {
+diff --git a/src/lib/gssapi/mechglue/g_context_time.c b/src/lib/gssapi/mechglue/g_context_time.c
+index 2ff8d09..c947e76 100644
+--- a/src/lib/gssapi/mechglue/g_context_time.c
++++ b/src/lib/gssapi/mechglue/g_context_time.c
+@@ -58,6 +58,8 @@ OM_uint32 *		time_rec;
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+diff --git a/src/lib/gssapi/mechglue/g_delete_sec_context.c b/src/lib/gssapi/mechglue/g_delete_sec_context.c
+index 4bf0dec..574ff02 100644
+--- a/src/lib/gssapi/mechglue/g_delete_sec_context.c
++++ b/src/lib/gssapi/mechglue/g_delete_sec_context.c
+@@ -87,12 +87,14 @@ gss_buffer_t		output_token;
+     if (GSSINT_CHK_LOOP(ctx))
+ 	return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT);
+ 
+-    status = gssint_delete_internal_sec_context(minor_status,
+-						ctx->mech_type,
+-						&ctx->internal_ctx_id,
+-						output_token);
+-    if (status)
+-	return status;
++    if (ctx->internal_ctx_id != GSS_C_NO_CONTEXT) {
++	status = gssint_delete_internal_sec_context(minor_status,
++						    ctx->mech_type,
++						    &ctx->internal_ctx_id,
++						    output_token);
++	if (status)
++	    return status;
++    }
+ 
+     /* now free up the space for the union context structure */
+     free(ctx->mech_type->elements);
+diff --git a/src/lib/gssapi/mechglue/g_exp_sec_context.c b/src/lib/gssapi/mechglue/g_exp_sec_context.c
+index b637452..1d7990b 100644
+--- a/src/lib/gssapi/mechglue/g_exp_sec_context.c
++++ b/src/lib/gssapi/mechglue/g_exp_sec_context.c
+@@ -95,6 +95,8 @@ gss_buffer_t		interprocess_token;
+      */
+ 
+     ctx = (gss_union_ctx_id_t) *context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+     if (!mech)
+ 	return GSS_S_BAD_MECH;
+diff --git a/src/lib/gssapi/mechglue/g_init_sec_context.c b/src/lib/gssapi/mechglue/g_init_sec_context.c
+index 9f154b8..e2df1ce 100644
+--- a/src/lib/gssapi/mechglue/g_init_sec_context.c
++++ b/src/lib/gssapi/mechglue/g_init_sec_context.c
+@@ -192,8 +192,13 @@ OM_uint32 *		time_rec;
+ 
+ 	/* copy the supplied context handle */
+ 	union_ctx_id->internal_ctx_id = GSS_C_NO_CONTEXT;
+-    } else
++    } else {
+ 	union_ctx_id = (gss_union_ctx_id_t)*context_handle;
++	if (union_ctx_id->internal_ctx_id == GSS_C_NO_CONTEXT) {
++	    status = GSS_S_NO_CONTEXT;
++	    goto end;
++	}
++    }
+ 
+     /*
+      * get the appropriate cred handle from the union cred struct.
+@@ -224,15 +229,13 @@ OM_uint32 *		time_rec;
+ 
+     if (status != GSS_S_COMPLETE && status != GSS_S_CONTINUE_NEEDED) {
+ 	/*
+-	 * The spec says the preferred method is to delete all context info on
+-	 * the first call to init, and on all subsequent calls make the caller
+-	 * responsible for calling gss_delete_sec_context.  However, if the
+-	 * mechanism decided to delete the internal context, we should also
+-	 * delete the union context.
++	 * RFC 2744 5.19 requires that we not create a context on a failed
++	 * first call to init, and recommends that on a failed subsequent call
++	 * we make the caller responsible for calling gss_delete_sec_context.
++	 * Even if the mech deleted its context, keep the union context around
++	 * for the caller to delete.
+ 	 */
+ 	map_error(minor_status, mech);
+-	if (union_ctx_id->internal_ctx_id == GSS_C_NO_CONTEXT)
+-	    *context_handle = GSS_C_NO_CONTEXT;
+ 	if (*context_handle == GSS_C_NO_CONTEXT) {
+ 	    free(union_ctx_id->mech_type->elements);
+ 	    free(union_ctx_id->mech_type);
+diff --git a/src/lib/gssapi/mechglue/g_inq_context.c b/src/lib/gssapi/mechglue/g_inq_context.c
+index 6f1c71e..6c0d98d 100644
+--- a/src/lib/gssapi/mechglue/g_inq_context.c
++++ b/src/lib/gssapi/mechglue/g_inq_context.c
+@@ -104,6 +104,8 @@ gss_inquire_context(
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (!mech || !mech->gss_inquire_context || !mech->gss_display_name ||
+diff --git a/src/lib/gssapi/mechglue/g_prf.c b/src/lib/gssapi/mechglue/g_prf.c
+index fcca3e4..9e168ad 100644
+--- a/src/lib/gssapi/mechglue/g_prf.c
++++ b/src/lib/gssapi/mechglue/g_prf.c
+@@ -59,6 +59,8 @@ gss_pseudo_random (OM_uint32 *minor_status,
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return GSS_S_NO_CONTEXT;
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech != NULL) {
+diff --git a/src/lib/gssapi/mechglue/g_process_context.c b/src/lib/gssapi/mechglue/g_process_context.c
+index bc260ae..3968b5d 100644
+--- a/src/lib/gssapi/mechglue/g_process_context.c
++++ b/src/lib/gssapi/mechglue/g_process_context.c
+@@ -61,6 +61,8 @@ gss_buffer_t		token_buffer;
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+diff --git a/src/lib/gssapi/mechglue/g_seal.c b/src/lib/gssapi/mechglue/g_seal.c
+index f17241c..3db1ee0 100644
+--- a/src/lib/gssapi/mechglue/g_seal.c
++++ b/src/lib/gssapi/mechglue/g_seal.c
+@@ -92,6 +92,8 @@ gss_wrap( OM_uint32 *minor_status,
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++        return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+@@ -226,6 +228,8 @@ gss_wrap_size_limit(OM_uint32  *minor_status,
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++        return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (!mech)
+diff --git a/src/lib/gssapi/mechglue/g_sign.c b/src/lib/gssapi/mechglue/g_sign.c
+index 86d641a..03fbd8c 100644
+--- a/src/lib/gssapi/mechglue/g_sign.c
++++ b/src/lib/gssapi/mechglue/g_sign.c
+@@ -94,6 +94,8 @@ gss_buffer_t		msg_token;
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+diff --git a/src/lib/gssapi/mechglue/g_unseal.c b/src/lib/gssapi/mechglue/g_unseal.c
+index 3e8053c..c208635 100644
+--- a/src/lib/gssapi/mechglue/g_unseal.c
++++ b/src/lib/gssapi/mechglue/g_unseal.c
+@@ -76,6 +76,8 @@ gss_qop_t *		qop_state;
+      * call it.
+      */
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+diff --git a/src/lib/gssapi/mechglue/g_unwrap_aead.c b/src/lib/gssapi/mechglue/g_unwrap_aead.c
+index e78bff2..0682bd8 100644
+--- a/src/lib/gssapi/mechglue/g_unwrap_aead.c
++++ b/src/lib/gssapi/mechglue/g_unwrap_aead.c
+@@ -186,6 +186,8 @@ gss_qop_t		*qop_state;
+      * call it.
+      */
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (!mech)
+diff --git a/src/lib/gssapi/mechglue/g_unwrap_iov.c b/src/lib/gssapi/mechglue/g_unwrap_iov.c
+index c0dd314..599be2c 100644
+--- a/src/lib/gssapi/mechglue/g_unwrap_iov.c
++++ b/src/lib/gssapi/mechglue/g_unwrap_iov.c
+@@ -89,6 +89,8 @@ int			iov_count;
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+@@ -128,6 +130,8 @@ gss_verify_mic_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
+ 
+     /* Select the approprate underlying mechanism routine and call it. */
+     ctx = (gss_union_ctx_id_t)context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return GSS_S_NO_CONTEXT;
+     mech = gssint_get_mechanism(ctx->mech_type);
+     if (mech == NULL)
+ 	return GSS_S_BAD_MECH;
+diff --git a/src/lib/gssapi/mechglue/g_verify.c b/src/lib/gssapi/mechglue/g_verify.c
+index 1578ae1..8996fce 100644
+--- a/src/lib/gssapi/mechglue/g_verify.c
++++ b/src/lib/gssapi/mechglue/g_verify.c
+@@ -65,6 +65,8 @@ gss_qop_t *		qop_state;
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+diff --git a/src/lib/gssapi/mechglue/g_wrap_aead.c b/src/lib/gssapi/mechglue/g_wrap_aead.c
+index 96cdf3c..7fe3b7b 100644
+--- a/src/lib/gssapi/mechglue/g_wrap_aead.c
++++ b/src/lib/gssapi/mechglue/g_wrap_aead.c
+@@ -256,6 +256,8 @@ gss_buffer_t		output_message_buffer;
+      * call it.
+      */
+     ctx = (gss_union_ctx_id_t)context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+     if (!mech)
+ 	return (GSS_S_BAD_MECH);
+diff --git a/src/lib/gssapi/mechglue/g_wrap_iov.c b/src/lib/gssapi/mechglue/g_wrap_iov.c
+index 40cd98f..14447c4 100644
+--- a/src/lib/gssapi/mechglue/g_wrap_iov.c
++++ b/src/lib/gssapi/mechglue/g_wrap_iov.c
+@@ -93,6 +93,8 @@ int			iov_count;
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+@@ -151,6 +153,8 @@ int			iov_count;
+      */
+ 
+     ctx = (gss_union_ctx_id_t) context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return (GSS_S_NO_CONTEXT);
+     mech = gssint_get_mechanism (ctx->mech_type);
+ 
+     if (mech) {
+@@ -190,6 +194,8 @@ gss_get_mic_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
+ 
+     /* Select the approprate underlying mechanism routine and call it. */
+     ctx = (gss_union_ctx_id_t)context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return GSS_S_NO_CONTEXT;
+     mech = gssint_get_mechanism(ctx->mech_type);
+     if (mech == NULL)
+ 	return GSS_S_BAD_MECH;
+@@ -218,6 +224,8 @@ gss_get_mic_iov_length(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
+ 
+     /* Select the approprate underlying mechanism routine and call it. */
+     ctx = (gss_union_ctx_id_t)context_handle;
++    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
++	return GSS_S_NO_CONTEXT;
+     mech = gssint_get_mechanism(ctx->mech_type);
+     if (mech == NULL)
+ 	return GSS_S_BAD_MECH;
+-- 
+2.10.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.15.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.15.1.bb
index b515eb5..e75e861 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.15.1.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.15.1.bb
@@ -31,6 +31,7 @@
            file://krb5-kdc.service \
            file://krb5-admin-server.service \
            file://fix-CVE-2017-11368.patch;striplevel=2 \
+           file://CVE-2017-11462.patch;striplevel=2 \
 "
 SRC_URI[md5sum] = "8022f3a1cde8463e44fd35ef42731f85"
 SRC_URI[sha256sum] = "437c8831ddd5fde2a993fef425dedb48468109bb3d3261ef838295045a89eb45"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.5.bb
index c05ff4e..798b170 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.5.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.5.bb
@@ -45,10 +45,10 @@
 PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile"
 PACKAGECONFIG[mtpz] = "--enable-mtpz,--disable-mtpz,libgcrypt"
 
-PACKAGES =+ "libmtp-common libmtp-runtime mtp-tools"
+PACKAGES =+ "libmtp-common libmtp-runtime"
 
 RDEPENDS_${PN} += "libmtp-common"
-RRECOMMENDS_${PN} += "libmtp-runtime mtp-tools"
+RRECOMMENDS_${PN} += "libmtp-runtime ${PN}-bin"
 FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*"
 FILES_libmtp-common = "${nonarch_base_libdir}/udev/rules.d/*"
 SUMMARY_libmtp-common = "The udev rules file for MTP devices"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.6.bb
index 2cc345a..5148798 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.6.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.6.bb
@@ -1,5 +1,5 @@
 SUMMARY = "Library for IPv6 Neighbor Discovery Protocol"
-
+HOMEPAGE = "http://libndp.org/"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch
new file mode 100644
index 0000000..96163f6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch
@@ -0,0 +1,26 @@
+From b36cafdbcbe2193f5b669e703c608e19e23f80a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 11:16:42 -0700
+Subject: [PATCH 3/4] include missing time.h for time_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util.h b/util.h
+index e912f19..3c634c1 100644
+--- a/util.h
++++ b/util.h
+@@ -22,7 +22,7 @@
+ 
+ #include "ddt.h"
+ #include "ether.h"
+-
++#include <time.h>
+ /**
+  * Table of human readable strings, one for each port state.
+  */
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch
new file mode 100644
index 0000000..e699275
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch
@@ -0,0 +1,36 @@
+From 3cd28aa771934d9165ff0d7e19932cde65de3e52 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 11:16:57 -0700
+Subject: [PATCH 4/4] Adjust include header sequence to avoid duplicate
+ definitions on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ raw.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/raw.c b/raw.c
+index f51c829..494ea7f 100644
+--- a/raw.c
++++ b/raw.c
+@@ -18,8 +18,6 @@
+  */
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <linux/filter.h>
+-#include <linux/if_ether.h>
+ #include <net/ethernet.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+@@ -32,6 +30,8 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#include <linux/filter.h>
++#include <linux/if_ether.h>
+ #include <linux/errqueue.h>
+ #include <linux/net_tstamp.h>
+ #include <linux/sockios.h>
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.6.bb
deleted file mode 100644
index 2e28644..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.6.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \
-           file://build-Allow-CC-and-prefix-to-be-overriden.patch \
-           file://no-incdefs-using-host-headers.patch"
-
-SRC_URI[md5sum] = "6aa15d83f5a35f1fd076ba9adc4e7285"
-SRC_URI[sha256sum] = "e7fd16a9f235b059be527bd512e86f0c1d9f2e7c36736e6d6d9727a4427ac14c"
-
-EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \
-    EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'"
-
-do_install () {
-    install -d ${D}/${bindir}
-    install -p ${S}/ptp4l  ${D}/${bindir}
-    install -p ${S}/pmc  ${D}/${bindir}
-    install -p ${S}/phc2sys  ${D}/${bindir}
-    install -p ${S}/hwstamp_ctl  ${D}/${bindir}
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb
new file mode 100644
index 0000000..c7b8b29
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \
+           file://build-Allow-CC-and-prefix-to-be-overriden.patch \
+           file://no-incdefs-using-host-headers.patch \
+           file://0003-include-missing-time.h-for-time_t.patch \
+           file://0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch \
+           "
+
+SRC_URI[md5sum] = "5688cdfe57932273e1dbf35b3b97b9a0"
+SRC_URI[sha256sum] = "fa8e00f6ec73cefa7bb313dce7f60dfe5eb9e2bde3353594e9ac18edc93e5165"
+
+EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \
+    EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'"
+
+do_install () {
+    install -d ${D}/${bindir}
+    install -p ${S}/ptp4l  ${D}/${bindir}
+    install -p ${S}/pmc  ${D}/${bindir}
+    install -p ${S}/phc2sys  ${D}/${bindir}
+    install -p ${S}/hwstamp_ctl  ${D}/${bindir}
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/build.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/build.patch
new file mode 100644
index 0000000..0d0912b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/build.patch
@@ -0,0 +1,94 @@
+From ebd7c8e548e9b8e096ee4c390173db9a701f2604 Mon Sep 17 00:00:00 2001
+From: Bruno Bottazzini <bruno.bottazzini@intel.com>
+Date: Wed, 23 Mar 2016 11:18:26 -0300
+Subject: [PATCH] build
+
+Disable stripping and allow easily overriding prefix
+
+Upstream-Status: Pending
+
+Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
+---
+ client/Makefile  | 4 ++--
+ config.mk        | 2 +-
+ lib/Makefile     | 2 +-
+ lib/cpp/Makefile | 2 +-
+ src/Makefile     | 4 ++--
+ 5 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/client/Makefile b/client/Makefile
+index bd65355..4e5a640 100644
+--- a/client/Makefile
++++ b/client/Makefile
+@@ -24,8 +24,8 @@ client_shared.o : client_shared.c client
+ 
+ install : all
+ 	$(INSTALL) -d ${DESTDIR}$(prefix)/bin
+-	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub
+-	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub
++	$(INSTALL) mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub
++	$(INSTALL) mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub
+ 
+ uninstall :
+ 	-rm -f ${DESTDIR}${prefix}/bin/mosquitto_pub
+diff --git a/config.mk b/config.mk
+index c0f175f..3427b83 100644
+--- a/config.mk
++++ b/config.mk
+@@ -241,7 +241,7 @@ ifeq ($(WITH_DOCS),yes)
+ endif
+ 
+ INSTALL?=install
+-prefix=/usr/local
++prefix?=/usr
+ mandir=${prefix}/share/man
+ localedir=${prefix}/share/locale
+ STRIP?=strip
+diff --git a/lib/Makefile b/lib/Makefile
+index 825fcea..9b7c05c 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -25,7 +25,7 @@ all : libmosquitto.so.${SOVERSION} libmo
+ 
+ install : all
+ 	$(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/
+-	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
++	$(INSTALL) libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
+ 	ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so
+ 	$(INSTALL) -d ${DESTDIR}${prefix}/include/
+ 	$(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h
+diff --git a/lib/cpp/Makefile b/lib/cpp/Makefile
+index 8b627d3..cdb2923 100644
+--- a/lib/cpp/Makefile
++++ b/lib/cpp/Makefile
+@@ -10,7 +10,7 @@ all : libmosquittopp.so.${SOVERSION}
+ 
+ install : all
+ 	$(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/
+-	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION}
++	$(INSTALL) libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION}
+ 	ln -sf libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so
+ 	$(INSTALL) -d ${DESTDIR}${prefix}/include/
+ 	$(INSTALL) mosquittopp.h ${DESTDIR}${prefix}/include/mosquittopp.h
+diff --git a/src/Makefile b/src/Makefile
+index 2cfb7d4..9a97644 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -103,12 +103,12 @@ mosquitto_passwd.o : mosquitto_passwd.c
+ 
+ install : all
+ 	$(INSTALL) -d ${DESTDIR}$(prefix)/sbin
+-	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto ${DESTDIR}${prefix}/sbin/mosquitto
++	$(INSTALL) mosquitto ${DESTDIR}${prefix}/sbin/mosquitto
+	$(INSTALL) -d ${DESTDIR}$(prefix)/include
+ 	$(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h
+ ifeq ($(WITH_TLS),yes)
+	$(INSTALL) -d ${DESTDIR}$(prefix)/bin
+-	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd
++	$(INSTALL) mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd
+ endif
+ 
+ uninstall :
+-- 
+2.7.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.init b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.init
new file mode 100644
index 0000000..d2a27b2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.init
@@ -0,0 +1,89 @@
+#! /bin/sh
+
+# Based on the Debian initscript for mosquitto
+
+### BEGIN INIT INFO
+# Provides:         mosquitto
+# Required-Start:   $remote_fs $syslog
+# Required-Stop:    $remote_fs $syslog
+# Default-Start:    2 3 4 5
+# Default-Stop:     0 1 6
+# Short-Description:    mosquitto MQTT v3.1 message broker
+# Description: 
+#  This is a message broker that supports version 3.1 of the MQ Telemetry
+#  Transport (MQTT) protocol.
+#  
+#  MQTT provides a method of carrying out messaging using a publish/subscribe
+#  model. It is lightweight, both in terms of bandwidth usage and ease of
+#  implementation. This makes it particularly useful at the edge of the network
+#  where a sensor or other simple device may be implemented using an arduino for
+#  example.
+### END INIT INFO
+
+set -e
+
+PIDFILE=@LOCALSTATEDIR@/run/mosquitto.pid
+DAEMON=@SBINDIR@/mosquitto
+
+# start and stop the mosquitto MQTT message broker
+
+test -x ${DAEMON} || exit 0
+
+umask 022
+
+. @SYSCONFDIR@/init.d/functions
+
+export PATH="${PATH:+$PATH:}@SBINDIR@:@BASE_SBINDIR@"
+
+case "$1" in
+    start)
+        echo "Starting Mosquitto message broker" "mosquitto"
+        if start-stop-daemon --start --quiet --oknodo --background  --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} ; then
+            exit 0
+        else
+            exit 1
+        fi
+        ;;
+    stop)
+        echo "Stopping Mosquitto message broker" "mosquitto"
+        if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}; then
+            rm -f ${PIDFILE}
+            exit 0
+        else
+            exit 1
+        fi
+        ;;
+
+
+    reload|force-reload)
+        if [ -f ${PIDFILE} ] ; then
+            echo "Reloading configuration for mosquitto"
+            pid=`cat ${PIDFILE}`
+            kill -HUP $pid
+        else
+            echo "mosquitto does not seem to be running"
+        fi
+        ;;
+
+    restart)
+        echo "Restarting Mosquitto message broker" "mosquitto"
+        if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then
+            rm -f ${PIDFILE}
+        fi
+        if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; then
+            exit 0
+        else
+            exit 1
+        fi
+        ;;
+
+    status)
+        status ${DAEMON} && exit 0 || exit $?
+        ;;
+
+    *)
+        echo "Usage: $0 {start|stop|reload|force-reload|restart|status}"
+        exit 1
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.service b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.service
new file mode 100644
index 0000000..25f68fa
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Mosquitto - lightweight server implementation of the MQTT and MQTT-SN protocols
+ConditionPathExists=/etc/mosquitto/mosquitto.conf
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=/bin/rm -f /var/run/mosquitto.pid
+ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
+ExecReload=/bin/kill -HUP $MAINPID
+PIDFile=/var/run/mosquitto.pid
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb
new file mode 100644
index 0000000..7554248
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb
@@ -0,0 +1,80 @@
+SUMMARY = "Open source MQTT v3.1/3.1.1 implemention"
+DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker that implements the MQ Telemetry Transport protocol version 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. "
+HOMEPAGE = "http://mosquitto.org/"
+SECTION = "console/network"
+LICENSE = "EPL-1.0 | EDL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \
+                    file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \
+                    file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \
+                    file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \
+"
+
+SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \
+           file://build.patch \
+           file://mosquitto.service \
+           file://mosquitto.init \
+"
+
+SRC_URI[md5sum] = "6b0966e93f118bc71ad7b61600a6c2d3"
+SRC_URI[sha256sum] = "156b1fa731d12baad4b8b22f7b6a8af50ba881fc711b81e9919ec103cf2942d1"
+
+inherit systemd update-rc.d useradd
+
+PACKAGECONFIG ??= "ssl uuid"
+
+PACKAGECONFIG[dns-srv] = ",,c-ares"
+PACKAGECONFIG[ssl] = ",,openssl"
+PACKAGECONFIG[uuid] = ",,util-linux"
+EXTRA_OEMAKE = "${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \
+                WITH_DOCS=no \
+                ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \
+                ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)}"
+
+export LIB_SUFFIX="${@d.getVar('baselib', True).replace('lib', '')}"
+
+do_compile() {
+    oe_runmake PREFIX=${prefix}
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D}
+    install -d ${D}${libdir}
+    install -m 0644 lib/libmosquitto.a ${D}${libdir}/
+
+    install -d ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/mosquitto.service ${D}${systemd_unitdir}/system/
+
+    install -d ${D}${sysconfdir}/init.d/
+    install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto
+    sed -i -e 's,@SBINDIR@,${sbindir},g' \
+        -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+        -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
+        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+        ${D}${sysconfdir}/init.d/mosquitto
+}
+
+PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients"
+
+FILES_${PN} = "${sbindir}/mosquitto \
+               ${bindir}/mosquitto_passwd \
+               ${sysconfdir}/mosquitto \
+               ${sysconfdir}/init.d \
+               ${systemd_unitdir}/system/mosquitto.service \
+"
+
+FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1"
+
+FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1"
+
+FILES_${PN}-clients = "${bindir}/mosquitto_pub \
+                       ${bindir}/mosquitto_sub \
+"
+
+SYSTEMD_SERVICE_${PN} = "mosquitto.service"
+
+INITSCRIPT_NAME = "mosquitto"
+INITSCRIPT_PARAMS = "defaults 30"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false \
+                       --user-group mosquitto"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb
deleted file mode 100644
index 85098fe..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb
+++ /dev/null
@@ -1,128 +0,0 @@
-SUMMARY = "NetworkManager"
-SECTION = "net/misc"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \
-                    file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \
-                    file://docs/api/html/license.html;md5=8eb8e72bab097b9d11763002cb003697 \
-"
-
-DEPENDS = " \
-    intltool-native \
-    libnl \
-    dbus \
-    dbus-glib \
-    dbus-glib-native \
-    libgudev \
-    util-linux \
-    libndp \
-    libnewt \
-    polkit \
-    jansson \
-"
-
-inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection
-
-SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
-           file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
-           file://0002-Fix-nm-version-macro-includes.patch \
-           file://0001-adjust-net-headers-for-musl-compatibility.patch \
-           file://0002-socket-util.h-Include-linux-sockios.h-on-musl.patch \
-           file://0003-Define-ETH_ALEN.patch \
-           file://0004-Define-missing-features-to-cater-for-musl.patch \
-           file://0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \
-           file://0001-check-for-strndupa-before-using-it.patch \
-           "
-SRC_URI[md5sum] = "63f1e0d6d7e9099499d062c84c927a75"
-SRC_URI[sha256sum] = "829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309"
-
-S = "${WORKDIR}/NetworkManager-${PV}"
-
-EXTRA_OECONF = " \
-    --disable-ifcfg-rh \
-    --disable-ifnet \
-    --disable-ifcfg-suse \
-    --disable-more-warnings \
-    --with-iptables=${sbindir}/iptables \
-    --with-tests \
-    --with-nmtui=yes \
-"
-
-do_compile_prepend() {
-        export GIR_EXTRA_LIBS_PATH="${B}/libnm-util/.libs"
-}
-
-PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi', d)} \
-"
-PACKAGECONFIG[systemd] = " \
-    --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \
-    --without-systemdsystemunitdir, \
-    polkit \
-"
-PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
-# consolekit is not picked by shlibs, so add it to RDEPENDS too
-PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
-PACKAGECONFIG[concheck] = "--with-libsoup=yes,--with-libsoup=no,libsoup-2.4"
-PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
-PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
-# Use full featured dhcp client instead of internal one
-PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client"
-PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq"
-PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
-PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
-PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,wireless-tools,wpa-supplicant wireless-tools"
-PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
-PACKAGECONFIG[netconfig] = "--with-netconfig=yes,--with-netconfig=no"
-PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free"
-
-PACKAGES =+ "libnmutil libnmglib libnmglib-vpn \
-  ${PN}-nmtui ${PN}-nmtui-doc \
-  ${PN}-adsl \
-"
-
-FILES_libnmutil += "${libdir}/libnm-util.so.*"
-FILES_libnmglib += "${libdir}/libnm-glib.so.*"
-FILES_libnmglib-vpn += "${libdir}/libnm-glib-vpn.so.*"
-
-FILES_${PN}-adsl = "${libdir}/NetworkManager/libnm-device-plugin-adsl.so"
-
-FILES_${PN} += " \
-    ${libexecdir} \
-    ${libdir}/pppd/*/nm-pppd-plugin.so \
-    ${libdir}/NetworkManager/*.so \
-    ${datadir}/polkit-1 \
-    ${datadir}/dbus-1 \
-    ${base_libdir}/udev/* \
-    ${systemd_unitdir}/system \
-"
-
-RRECOMMENDS_${PN} += "iptables \
-    ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
-"
-RCONFLICTS_${PN} = "connman"
-
-FILES_${PN}-dev += " \
-    ${datadir}/NetworkManager/gdb-cmd \
-    ${libdir}/pppd/*/*.la \
-    ${libdir}/NetworkManager/*.la \
-"
-
-FILES_${PN}-nmtui = " \
-    ${bindir}/nmtui \
-    ${bindir}/nmtui-edit \
-    ${bindir}/nmtui-connect \
-    ${bindir}/nmtui-hostname \
-"
-
-FILES_${PN}-nmtui-doc = " \
-    ${mandir}/man1/nmtui* \
-"
-
-SYSTEMD_SERVICE_${PN} = "NetworkManager.service NetworkManager-dispatcher.service"
-
-do_install_append() {
-    rm -rf ${D}/run ${D}${localstatedir}/run
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb
index 053c80a..2db48f3 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb
@@ -21,6 +21,7 @@
 S = "${WORKDIR}/${BP}-Source"
 
 EXTRA_OECONF = " -DCMAKE_SKIP_RPATH=ON "
+EXTRA_OECMAKE += "-DBUILD_DOCUMENTATION=OFF"
 
 #--enable-apps --enable-syslog
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb
index 0ede5e5..f2a16dc 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb
@@ -2,7 +2,7 @@
 # Released under the MIT license (see COPYING.MIT for the terms)
 
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
 SUMMARY = "Set of Bluetooth related tools for inclusion in images"
@@ -15,13 +15,13 @@
 
 RDEPENDS_bluez4 = " \
     obexftp \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'libasound-module-bluez', '', d)} \
 "
 
 RDEPENDS_bluez5 = " \
     bluez5-noinst-tools \
     bluez5-obex \
     bluez5-testtools  \
-    libasound-module-bluez \
     ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', \
         'pulseaudio-module-bluetooth-discover \
          pulseaudio-module-bluetooth-policy \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch
new file mode 100644
index 0000000..a31bfaa
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch
@@ -0,0 +1,25 @@
+Disable building some things we don't need
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ Makefile |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 33bd2d0..84262bd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -115,7 +115,8 @@ LDFLAGS_AS = -shared -Wl,-soname,lib${MQTTLIB_AS}.so.${MAJOR_VERSION} -lpthread
+ 
+ all: build
+ 	
+-build: | mkdir ${MQTTLIB_C_TARGET} ${MQTTLIB_CS_TARGET} ${MQTTLIB_A_TARGET} ${MQTTLIB_AS_TARGET} ${MQTTVERSION_TARGET} ${SYNC_SAMPLES} ${ASYNC_SAMPLES} ${SYNC_TESTS} ${SYNC_SSL_TESTS} ${ASYNC_TESTS} ${ASYNC_SSL_TESTS}
++build: | mkdir ${MQTTLIB_C_TARGET} ${MQTTLIB_CS_TARGET} ${MQTTLIB_A_TARGET} ${MQTTLIB_AS_TARGET}
++#${MQTTVERSION_TARGET} ${SYNC_SAMPLES} ${ASYNC_SAMPLES} ${SYNC_TESTS} ${SYNC_SSL_TESTS} ${ASYNC_TESTS} ${ASYNC_SSL_TESTS}
+ 
+ clean:
+ 	rm -rf ${blddir}/*
+-- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.0.bb
new file mode 100644
index 0000000..fec380c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.0.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Paho MQTT - C libraries for the MQTT and MQTT-SN protocols"
+DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)."
+HOMEPAGE = "http://www.eclipse.org/paho/"
+SECTION = "console/network"
+LICENSE = "EPL-1.0 | EDL-1.0"
+
+LIC_FILES_CHKSUM = " \
+        file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \
+        file://epl-v10;md5=659c8e92a40b6df1d9e3dccf5ae45a08 \
+        file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \
+        file://about.html;md5=dcde438d73cf42393da9d40fabc0c9bc \
+"
+
+SRC_URI = "git://github.com/eclipse/paho.mqtt.c;protocol=http"
+
+SRCREV = "e8d34da24ad807f5e698b327d67591fd4b4bfa7e"
+
+DEPENDS = "openssl"
+
+S = "${WORKDIR}/git"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_install() {
+    install -d ${D}${libdir}
+    oe_libinstall -C build/output -so libpaho-mqtt3a ${D}${libdir}
+    oe_libinstall -C build/output -so libpaho-mqtt3as ${D}${libdir}
+    oe_libinstall -C build/output -so libpaho-mqtt3c  ${D}${libdir}
+    oe_libinstall -C build/output -so libpaho-mqtt3cs ${D}${libdir}
+    install -d ${D}${includedir}
+    install -m 644 src/MQTTAsync.h ${D}${includedir}
+    install -m 644 src/MQTTClient.h ${D}${includedir}
+    install -m 644 src/MQTTClientPersistence.h ${D}${includedir}
+}
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils/0001-Include-limits.h-for-PATH_MAX.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils/0001-Include-limits.h-for-PATH_MAX.patch
new file mode 100644
index 0000000..8bb7e5a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils/0001-Include-limits.h-for-PATH_MAX.patch
@@ -0,0 +1,25 @@
+From f7ad9a4471cee2324f216a0d82ba8097ec746c56 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 11:48:12 -0700
+Subject: [PATCH] Include limits.h for PATH_MAX
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/pnstat.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pnstat.c b/src/pnstat.c
+index 661a5bc..76068e6 100644
+--- a/src/pnstat.c
++++ b/src/pnstat.c
+@@ -35,6 +35,7 @@
+ #include <dirent.h>
+ #include <unistd.h>
+ #include <netinet/tcp.h>
++#include <limits.h>
+ 
+ struct fd
+ {
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb
index 5589963..3c59995 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb
@@ -2,7 +2,9 @@
 HOMEPAGE = ""
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-SRC_URI = "git://gitorious.org/meego-cellular/phonet-utils.git;branch=master"
+SRC_URI = "git://gitorious.org/meego-cellular/phonet-utils.git;branch=master \
+           file://0001-Include-limits.h-for-PATH_MAX.patch \
+           "
 PR = "r2"
 S = "${WORKDIR}/git"
 SRCREV = "4acfa720fd37d178a048fc2be17180137d4a70ea"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb
index af1c4d6..c731cf7 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb
@@ -14,6 +14,10 @@
 
 S = "${WORKDIR}/git"
 
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
 inherit autotools pkgconfig
 
 do_configure_prepend() {
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_2.9.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_2.9.1.bb
deleted file mode 100644
index 288c586..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_2.9.1.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "A serial to network proxy"
-SECTION = "console/network"
-HOMEPAGE = "http://sourceforge.net/projects/ser2net/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=bae3019b4c6dc4138c217864bd04331f"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/ser2net/ser2net/ser2net-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "80011ac0e60bbdcb65f1d7a86251e3f3"
-SRC_URI[sha256sum] = "fdee1e69903cf409bdc6f32403a566cbc6006aa9e2a4d6f8f12b90dfd5ca0d0e"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.4.bb
new file mode 100644
index 0000000..708650f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.4.bb
@@ -0,0 +1,15 @@
+SUMMARY = "A serial to network proxy"
+SECTION = "console/network"
+HOMEPAGE = "http://sourceforge.net/projects/ser2net/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bae3019b4c6dc4138c217864bd04331f"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/ser2net/ser2net/ser2net-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "562274d783534276a9feac913b7d8c4e"
+SRC_URI[sha256sum] = "d846066e27c3072565990745d030357aa0c278f96b7d1d4f59023347c1db8824"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/soft66/files/fix-ar.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/soft66/files/fix-ar.patch
deleted file mode 100644
index bf1ffdf..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/soft66/files/fix-ar.patch
+++ /dev/null
@@ -1,13 +0,0 @@
----
- configure.ac |    1 +
- 1 file changed, 1 insertion(+)
-
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -7,5 +7,6 @@ AC_PROG_CC
- AC_CONFIG_HEADERS([config.h])
- AC_CONFIG_FILES([Makefile lib/Makefile tools/Makefile])
- PKG_CHECK_MODULES([FTDI], [libftdi >= 0.13])
- AC_OUTPUT
- AM_PROG_CC_C_O
-+AM_PROG_AR
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/soft66/soft66_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/soft66/soft66_git.bb
deleted file mode 100644
index 816f583..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/soft66/soft66_git.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Library and tools for Soft66ADD and related SDR radio receivers"
-LICENSE = "GPLv3 & LGPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
-                    file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02 "
-
-PNBLACKLIST[soft66] ?= "BROKEN: depends on broken libftdi - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-DEPENDS = "libftdi"
-
-PV = "0.1.3+gitr${SRCPV}"
-PR = "r1"
-
-SRCREV = "a1dab25e73896c90c98227ac8055f227b830d512"
-SRC_URI = "git://home.horsten.com/soft66 \
-file://fix-ar.patch"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy/doublefix.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy/doublefix.patch
deleted file mode 100644
index a7737fb..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy/doublefix.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix double reference to this file to work with recent autoconf+automake
-
-RP 1/2/10
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: libtelepathy-0.3.3/src/Makefile.am
-===================================================================
---- libtelepathy-0.3.3.orig/src/Makefile.am	2010-02-01 13:13:50.869038984 +0000
-+++ libtelepathy-0.3.3/src/Makefile.am	2010-02-01 13:14:23.267789456 +0000
-@@ -27,7 +27,6 @@
-     tp-chan-type-text-gen.h \
-     tp-chan-type-tubes-gen.h \
-     tp-conn-iface-aliasing-gen.h \
--    tp-conn-iface-avatars-gen.h \
-     tp-conn-iface-capabilities-gen.h \
-     tp-conn-iface-contact-info-gen.h \
-     tp-conn-iface-forwarding-gen.h \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch
deleted file mode 100644
index 37679ab..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: libtelepathy-0.3.1/configure.ac
-===================================================================
---- libtelepathy-0.3.1.orig/configure.ac	2007-11-22 19:05:56.000000000 +0000
-+++ libtelepathy-0.3.1/configure.ac	2008-01-04 12:07:28.000000000 +0000
-@@ -51,7 +51,7 @@
-   AC_MSG_ERROR([xsltproc (from the libxslt source package) is required])
- fi
- 
--AC_CHECK_PROGS([PYTHON], [python2.3 python2.4 python2.5 python])
-+AC_CHECK_PROGS([PYTHON], [python2.5 python2.4 python2.3 python])
- if test -z "$PYTHON"; then
-   AC_MSG_ERROR([Python is required to compile this package])
- fi
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb
deleted file mode 100644
index 783bd5d..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Telepathy framework"
-DESCRIPTION = "Telepathy is a D-Bus framework for unifying real time \
-communication, including instant messaging, voice calls and video calls.  It \
-abstracts differences between protocols to provide a unified interface for \
-applications."
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-DEPENDS = "glib-2.0 dbus dbus-glib telepathy-glib libxslt-native"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-                    file://src/tp-conn.c;beginline=1;endline=19;md5=4c58069f77d601cc59200bce5396c7cb"
-PR = "r5"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/libtelepathy/libtelepathy-${PV}.tar.gz \
-    file://prefer_python_2.5.patch \
-    file://doublefix.patch \
-"
-
-SRC_URI[md5sum] = "490ca1a0c614d4466394b72d43bf7370"
-SRC_URI[sha256sum] = "e0d230be855125163579743418203c6f6be2f10f98c4f065735c1dc9ed115878"
-
-inherit autotools pkgconfig pythonnative
-
-FILES_${PN} += "${datadir}/telepathy \
-    ${datadir}/dbus-1"
-
-PNBLACKLIST[libtelepathy] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130609/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch
deleted file mode 100644
index ece1da6..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 22 Sep 2013 23:21:01 -0400
-Subject: [PATCH] src/Makefile.am: fix race issue for _gen/gtypes.h and _gen/gtypes-body.h
-
-There might be an error when parallel build:
-
-[snip]
-Traceback (most recent call last):
-  File "/path/to/tools/glib-gtypes-generator.py", line 304, in <module>
-    GTypesGenerator(dom, argv[1], argv[2])()
-  File "/path/to/tools/glib-gtypes-generator.py", line 295, in __call__
-    file_set_contents(self.output + '.h', ''.join(self.header))
-  File "/path/to/tools/libtpcodegen.py", line 42, in file_set_contents
-    os.rename(filename + '.tmp', filename)
-OSError: [Errno 2] No such file or directory
-[snip]
-
-This is a race issue, the _gen/gtypes.h and _gen/gtypes-body.h may
-write(remove/rename) _gen/gtypes.tmp at the same time, then there would
-be the error.
-
-There was a similar bug in telepathy-glib which was already fixed, we use the
-similar patch to fix it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- src/Makefile.am |   18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -288,7 +288,11 @@ _gen/interfaces-body.h: _gen/mcd.xml \
- 		$(tools_dir)/glib-interfaces-body-generator.xsl \
- 		$< > $@
- 
--_gen/gtypes.h _gen/gtypes-body.h: _gen/mcd.xml \
-+# do nothing, output as a side-effect
-+_gen/gtypes.h: _gen/gtypes-body.h
-+	@:
-+
-+_gen/gtypes-body.h: _gen/mcd.xml \
- 	$(top_srcdir)/tools/glib-gtypes-generator.py
- 	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
- 		$< _gen/gtypes mc
-@@ -309,7 +313,11 @@ _gen/%.xml: %.xml $(wildcard $(top_srcdir)/xml/*.xml) Makefile.am
- 	$(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
- 		$< > $@
- 
--_gen/cli-%-body.h _gen/cli-%.h: _gen/%.xml \
-+# do nothing, output as a side-effect
-+_gen/cli-%.h: _gen/cli-%-body.h
-+	@:
-+
-+_gen/cli-%-body.h: _gen/%.xml \
- 	$(tools_dir)/glib-client-gen.py Makefile.am
- 	$(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
- 		--group=`echo $* | tr x- x_` \
-@@ -317,7 +325,11 @@ _gen/cli-%-body.h _gen/cli-%.h: _gen/%.xml \
- 		--tp-proxy-api=0.7.6 \
- 		$< Mc_Cli _gen/cli-$*
- 
--_gen/svc-%.c _gen/svc-%.h: _gen/%.xml \
-+# do nothing, output as a side-effect
-+_gen/svc-%.h: _gen/svc-%.c
-+	@:
-+
-+_gen/svc-%.c: _gen/%.xml \
- 	$(tools_dir)/glib-ginterface-gen.py Makefile.am
- 	$(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
- 		--filename=_gen/svc-$* \
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb
deleted file mode 100644
index 6a4d5d0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Central control for Telepathy IM connection managers"
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/Mission_Control/"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
-                    file://src/request.h;beginline=1;endline=21;md5=f80534d9af1c33291b3b79609f196eb2"
-SECTION = "libs"
-DEPENDS = "libtelepathy dbus-glib gconf libxslt-native"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-mission-control/${BP}.tar.gz \
-           file://tmc-Makefile-fix-race.patch \
-          "
-SRC_URI[md5sum] = "421115a35b9e427807326877f86e7f43"
-SRC_URI[sha256sum] = "14ceb7d53535b43d44b8271ad11319d1d0fe6d193d154636b9e62b42799b9723"
-
-inherit autotools-brokensep pkgconfig pythonnative
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[upower] = "--enable-upower,--disable-upower,upower"
-
-# to select connman or nm you need to use "connectivity" and "connman" or "nm", default is to disable both
-PACKAGECONFIG[connectivity] = ",--with-connectivity=no"
-PACKAGECONFIG[connman] = "--with-connectivity=connman,,connman"
-PACKAGECONFIG[nm] = "--with-connectivity=nm,,networkmanager"
-
-PACKAGES =+ " \
-    libmissioncontrol \
-    libmissioncontrol-config \
-    libmissioncontrol-server \
-    libmissioncontrol-dev \
-    libmissioncontrol-config-dev \
-    libmissioncontrol-server-dev \
-    libmissioncontrol-dbg \
-    libmissioncontrol-config-dbg \
-    libmissioncontrol-server-dbg \
-"
-
-FILES_${PN} += "${datadir}/dbus* ${datadir}/glib-2.0/schemas"
-
-FILES_libmissioncontrol = "${libdir}/libmissioncontrol.so.*"
-FILES_libmissioncontrol-config = "${libdir}/libmissioncontrol-config.so.*"
-FILES_libmissioncontrol-server = "${libdir}/libmissioncontrol-server.so.*"
-
-FILES_libmissioncontrol-dev = "${libdir}/libmissioncontrol.* \
-                               ${includedir}/libmissioncontrol/ \
-                               ${libdir}/pkgconfig/libmissioncontrol.pc"
-FILES_libmissioncontrol-config-dev = "${libdir}/libmissioncontrol-config.*"
-FILES_libmissioncontrol-server-dev = "${libdir}/libmissioncontrol-server.*"
-
-FILES_libmissioncontrol-dbg = "${libdir}/.debug/libmissioncontrol.so.*"
-FILES_libmissioncontrol-config-dbg = "${libdir}/.debug/libmissioncontrol-config.so.*"
-FILES_libmissioncontrol-server-dbg = "${libdir}/.debug/libmissioncontrol-server.so.*"
-
-PNBLACKLIST[telepathy-mission-control] ?= "Depends on blacklisted libtelepathy - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb
index 9baeed1..aa93283 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb
@@ -41,11 +41,6 @@
     -DWITH_QT5=OFF \
 "
 
-EXTRA_OECMAKE_append_class-native = "\
-             -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DWITH_CPP=OFF"
-EXTRA_OECMAKE_append_class-nativesdk = "\
-             -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DWITH_PYTHON=OFF"
-
 PACKAGECONFIG ??= "libevent glib python"
 PACKAGECONFIG[libevent] = "-DWITH_LIBEVENT=ON,-DWITH_LIBEVENT=OFF,libevent,"
 PACKAGECONFIG[python] = "-DWITH_PYTHON=ON,-DWITH_PYTHON=OFF,python,"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb
index cbf3061..2129e37 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb
@@ -9,13 +9,13 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=073dc31ccb2ebed70db54f1e8aeb4c33"
 DEPENDS = "rpm indent-native"
 
-SRC_URI = "git://git.umip.org/umip.git \
+SRC_URI = "git://github.com/jlanza/umip \
            file://add-dependency-to-support-parallel-compilation.patch \
            file://mip6d \
            file://mip6d.service \
            file://0001-Add-format-string-to-fprintf-call.patch \
            "
-SRCREV = "428974c2d0d8e75a2750a3ab0488708c5dfdd8e3"
+SRCREV = "7d67209cd1bba2dd0e183a0fa07eeef07964dd14"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.8.bb
deleted file mode 100644
index 7e7d6de..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.8.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-SUMMARY = "Open-source monitoring solution for your IT infrastructure"
-DESCRIPTION = "\
-ZABBIX is software that monitors numerous parameters of a network and the \
-health and integrity of servers. ZABBIX uses a flexible notification \
-mechanism that allows users to configure e-mail based alerts for virtually \
-any event. This allows a fast reaction to server problems. ZABBIX offers \
-excellent reporting and data visualisation features based on the stored \
-data. This makes ZABBIX ideal for capacity planning. \
-\
-ZABBIX supports both polling and trapping. All ZABBIX reports and \
-statistics, as well as configuration parameters are accessed through a \
-web-based front end. A web-based front end ensures that the status of \
-your network and the health of your servers can be assessed from any \
-location. Properly configured, ZABBIX can play an important role in \
-monitoring IT infrastructure. This is equally true for small \
-organisations with a few servers and for large companies with a \
-multitude of servers."
-HOMEPAGE = "http://www.zabbix.com/"
-SECTION = "Applications/Internet"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=300e938ad303147fede2294ed78fe02e"
-DEPENDS  = "openldap virtual/libiconv"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-SRC_URI = "http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${PV}/${BPN}-${PV}.tar.gz \
-    file://0001-Fix-configure.ac.patch \
-    file://zabbix-agent.service \
-"
-
-SRC_URI[md5sum] = "f7f41850397d2078ccae4b7389f9a005"
-SRC_URI[sha256sum] = "1df3e106427ed21547b8119049a161092f597d04507f9eb535951a9ee887a476"
-
-inherit autotools-brokensep linux-kernel-base pkgconfig systemd useradd
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "zabbix-agent.service"
-SYSTEMD_AUTO_ENABLE = "enable"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "-r zabbix"
-USERADD_PARAM_${PN} = "-r -g zabbix -d /var/lib/zabbix \
-    -s /sbin/nologin -c \"Zabbix Monitoring System\" zabbix \
-"
-
-KERNEL_VERSION = "${@get_kernelversion_headers('${STAGING_KERNEL_DIR}')}"
-
-EXTRA_OECONF = " \
-    --enable-dependency-tracking \
-    --enable-agent \
-    --enable-ipv6 \
-    --with-net-snmp \
-    --with-ldap=${STAGING_EXECPREFIXDIR} \
-    --with-jabber \
-    --with-unixodbc \
-    --with-ssh2 \
-    --with-sqlite3 \
-"
-CFLAGS_append = " -lldap -llber"
-
-do_configure_prepend() {
-    export KERNEL_VERSION="${KERNEL_VERSION}"
-}
-
-do_install_append() {
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}${systemd_unitdir}/system
-        install -m 0644 ${WORKDIR}/zabbix-agent.service ${D}${systemd_unitdir}/system/
-        sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/zabbix-agent.service
-    fi
-}
-
-FILES_${PN} += "${libdir}"
-
-RDEPENDS_${PN} = "logrotate"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.9.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.9.bb
new file mode 100644
index 0000000..bab5a6a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.9.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Open-source monitoring solution for your IT infrastructure"
+DESCRIPTION = "\
+ZABBIX is software that monitors numerous parameters of a network and the \
+health and integrity of servers. ZABBIX uses a flexible notification \
+mechanism that allows users to configure e-mail based alerts for virtually \
+any event. This allows a fast reaction to server problems. ZABBIX offers \
+excellent reporting and data visualisation features based on the stored \
+data. This makes ZABBIX ideal for capacity planning. \
+\
+ZABBIX supports both polling and trapping. All ZABBIX reports and \
+statistics, as well as configuration parameters are accessed through a \
+web-based front end. A web-based front end ensures that the status of \
+your network and the health of your servers can be assessed from any \
+location. Properly configured, ZABBIX can play an important role in \
+monitoring IT infrastructure. This is equally true for small \
+organisations with a few servers and for large companies with a \
+multitude of servers."
+HOMEPAGE = "http://www.zabbix.com/"
+SECTION = "Applications/Internet"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=300e938ad303147fede2294ed78fe02e"
+DEPENDS  = "openldap virtual/libiconv"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = "http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${PV}/${BPN}-${PV}.tar.gz \
+    file://0001-Fix-configure.ac.patch \
+    file://zabbix-agent.service \
+"
+
+SRC_URI[md5sum] = "489d21b464277c0d412155c7e5611a8f"
+SRC_URI[sha256sum] = "4445f26c025009681c29c9b350aa6c4ee7b124ddcaf1609ae36c55997bcb8cf2"
+
+inherit autotools-brokensep linux-kernel-base pkgconfig systemd useradd
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "zabbix-agent.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r zabbix"
+USERADD_PARAM_${PN} = "-r -g zabbix -d /var/lib/zabbix \
+    -s /sbin/nologin -c \"Zabbix Monitoring System\" zabbix \
+"
+
+KERNEL_VERSION = "${@get_kernelversion_headers('${STAGING_KERNEL_DIR}')}"
+
+EXTRA_OECONF = " \
+    --enable-dependency-tracking \
+    --enable-agent \
+    --enable-ipv6 \
+    --with-net-snmp \
+    --with-ldap=${STAGING_EXECPREFIXDIR} \
+    --with-jabber \
+    --with-unixodbc \
+    --with-ssh2 \
+    --with-sqlite3 \
+"
+CFLAGS_append = " -lldap -llber"
+
+do_configure_prepend() {
+    export KERNEL_VERSION="${KERNEL_VERSION}"
+}
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/zabbix-agent.service ${D}${systemd_unitdir}/system/
+        sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/zabbix-agent.service
+    fi
+}
+
+FILES_${PN} += "${libdir}"
+
+RDEPENDS_${PN} = "logrotate"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeroc-ice/zeroc-ice-3.5.1/0002-Modify-Makefile-for-cross-compile.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeroc-ice/zeroc-ice-3.5.1/0002-Modify-Makefile-for-cross-compile.patch
deleted file mode 100644
index 43096d2..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeroc-ice/zeroc-ice-3.5.1/0002-Modify-Makefile-for-cross-compile.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-Upstream-Status: Inappropriate
-
-This patch lets you build Ice with OpenEmbedded. I doubt you could do
-a regular build after applying this patch.
-
-From bc622ce74fa03a935278d21736a5a251466e1798 Mon Sep 17 00:00:00 2001
-From: Tom Rondeau <tom@trondeau.com>
-Date: Wed, 16 Apr 2014 14:34:51 -0400
-Subject: [PATCH] Modify Makefiles for cross compile
-
----
- config/Make.common.rules           |   20 +++++++------
- cpp/Makefile                       |    9 +++---
- cpp/config/Make.rules              |   32 ++++++++++++--------
- cpp/config/Make.rules.Linux        |   18 ++---------
- cpp/src/IceStorm/FreezeDB/Makefile |    2 +-
- py/config/Make.rules               |   58 +++++++++++++++++++-----------------
- 6 files changed, 70 insertions(+), 69 deletions(-)
-
-diff --git a/config/Make.common.rules b/config/Make.common.rules
-index d7b1d59..a3fb17e 100644
---- a/config/Make.common.rules
-+++ b/config/Make.common.rules
-@@ -65,9 +65,9 @@ ifeq ($(UNAME),Linux)
-       #
-       # Some Linux distributions like Debian/Ubuntu don't use /usr/lib64.
-       #
--      ifeq ($(shell test -d /usr/lib64 && echo 0),0)
--          lp64suffix	= 64
--      endif
-+      #ifeq ($(shell test -d /usr/lib64 && echo 0),0)
-+      #    lp64suffix	= 64
-+      #endif
-       ifeq ($(LP64),)
-           LP64      	= yes
-       endif
-@@ -244,12 +244,13 @@ else
-     slicedir = $(ice_dir)/slice
- endif
- 
--ifeq ($(prefix), /usr)
--    install_slicedir = /usr/share/Ice-$(VERSION)/slice
--else
--    install_slicedir = $(prefix)/slice
--endif
-+#ifeq ($(prefix), /usr)
-+#    install_slicedir = /usr/share/Ice-$(VERSION)/slice
-+#else
-+#    install_slicedir = $(prefix)/slice
-+#endif
- 
-+install_slicedir = $(prefix)/slice
- #
- # Set environment variables for the Slice translator.
- #
-@@ -265,7 +266,8 @@ ifneq ($(ice_dir), /usr)
-     endif
- 
-     ifeq ($(UNAME),Linux)
--        export LD_LIBRARY_PATH := $(ice_lib_dir):$(LD_LIBRARY_PATH)
-+        #export LD_LIBRARY_PATH := $(ice_lib_dir):$(LD_LIBRARY_PATH)
-+        export LD_LIBRARY_PATH := $(ICE_HOME)/lib:$(LD_LIBRARY_PATH)
-     endif
- 
-     ifeq ($(UNAME),SunOS)
-diff --git a/cpp/Makefile b/cpp/Makefile
-index a68f113..1f44f57 100644
---- a/cpp/Makefile
-+++ b/cpp/Makefile
-@@ -11,11 +11,12 @@ top_srcdir	= .
- 
- include $(top_srcdir)/config/Make.rules
- 
--SUBDIRS		= config src include test
-+#SUBDIRS		= config src include test
-+SUBDIRS		= config src include
- 
--ifeq ($(shell uname | grep MINGW),)
--SUBDIRS		:= $(SUBDIRS) demo
--endif
-+#ifeq ($(shell uname | grep MINGW),)
-+#SUBDIRS		:= $(SUBDIRS) demo
-+#endif
- 
- INSTALL_SUBDIRS	= $(install_bindir) $(install_libdir) $(install_includedir) \
- 	$(install_configdir) $(install_mandir)
-diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules
-index 37461ae..197c5e8 100644
---- a/cpp/config/Make.rules
-+++ b/cpp/config/Make.rules
-@@ -175,11 +175,12 @@ headerdir		= $(top_srcdir)/include
- # includedir is not handled the same as bindir and libdir
- # because it is used in the .depend files
- #
--ifdef ice_src_dist
--    includedir		= $(top_srcdir)/include
--else
--    includedir		= $(ice_dir)/include
--endif
-+#ifdef ice_src_dist
-+#    includedir		= $(top_srcdir)/include
-+#else
-+#    includedir		= $(ice_dir)/include
-+#endif
-+includedir		= $(top_srcdir)/include
- 
- #
- # Platform specific definitions
-@@ -277,14 +278,17 @@ ICECPPFLAGS		= -I$(slicedir)
- SLICE2CPPFLAGS		= $(ICECPPFLAGS)
- 
- ifeq ($(ice_dir), /usr) 
--    LDFLAGS		= $(LDPLATFORMFLAGS) $(CXXFLAGS)
-+    LDFLAGS		+= $(LDPLATFORMFLAGS) $(CXXFLAGS)
- else
-     CPPFLAGS	+= -I$(includedir)
--    ifdef ice_src_dist
--	LDFLAGS	= $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
--    else
--	LDFLAGS	= $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir)$(cpp11suffix)
--    endif
-+# We must always build using the libraries in the source tree, the host's are obviously
-+# not what we want for the target
-+    LDFLAGS	+= $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir) $(call rpathlink,$(libdir))
-+#    ifdef ice_src_dist
-+#        LDFLAGS	= $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
-+#    else
-+#	LDFLAGS	= $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir)$(cpp11suffix)
-+#    endif
- endif
- 
- ifeq ($(FLEX_NOLINE),yes)
-@@ -313,8 +317,10 @@ endif
- 
- ifdef ice_src_dist
-     SLICEPARSERLIB	= $(libdir)/$(call mklibfilename,Slice,$(VERSION))
--    SLICE2CPP		= $(bindir)/slice2cpp
--    SLICE2FREEZE	= $(bindir)/slice2freeze
-+#    SLICE2CPP		= $(bindir)/slice2cpp
-+#    SLICE2FREEZE	= $(bindir)/slice2freeze
-+    SLICE2CPP		= $(ICE_HOME)/bin/slice2cpp
-+    SLICE2FREEZE	= $(ICE_HOME)/bin/slice2freeze
- else
-     SLICEPARSERLIB	= $(ice_dir)/$(libsubdir)$(cpp11suffix)/$(call mklibfilename,Slice,$(VERSION))
-     SLICE2CPP		= $(ice_dir)/$(binsubdir)$(cpp11suffix)/slice2cpp
-diff --git a/cpp/config/Make.rules.Linux b/cpp/config/Make.rules.Linux
-index 5d5717c..8363c6e 100644
---- a/cpp/config/Make.rules.Linux
-+++ b/cpp/config/Make.rules.Linux
-@@ -31,7 +31,7 @@ ifeq ($(CXX),c++)
-    CXX			= g++
- endif
- 
--ifeq ($(CXX),g++)
-+#ifeq ($(CXX),g++)
- 
-     ifneq ($(SUSE_i586),)
-         CXXARCHFLAGS	+= -march=i586
-@@ -71,14 +71,6 @@ ifeq ($(CXX),g++)
-       CXXARCHFLAGS	+= -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED
-    endif
- 
--   ifeq ($(MACHINE),x86_64)
--      ifeq ($(LP64),yes)
--         CXXARCHFLAGS	+= -m64
--      else
--         CXXARCHFLAGS	+= -m32
--      endif
--   endif
--
-    CXXFLAGS		= $(CXXARCHFLAGS) -Wall -Werror -pthread
- 
-    ifneq ($(GENPIC),no)
-@@ -102,15 +94,11 @@ ifeq ($(CXX),g++)
- 
-    rpathlink            = -Wl,-rpath-link,$(1) 
- 
--   ifneq ($(embedded_runpath_prefix),)
--      LDPLATFORMFLAGS      = -Wl,--enable-new-dtags -Wl,-rpath,$(runpath_libdir)
--   else
--      LDPLATFORMFLAGS      = -Wl,--enable-new-dtags
--   endif
-+   LDPLATFORMFLAGS      = -Wl,--enable-new-dtags -Wl,-rpath,../../../lib
- 
-    LDPLATFORMFLAGS	+= -rdynamic
- 
--endif
-+#endif
- 
- ifeq ($(CXX),icpc)
-    $(warning ===================================================================) 
-diff --git a/cpp/src/IceStorm/FreezeDB/Makefile b/cpp/src/IceStorm/FreezeDB/Makefile
-index 7c844b7..cf15cb1 100644
---- a/cpp/src/IceStorm/FreezeDB/Makefile
-+++ b/cpp/src/IceStorm/FreezeDB/Makefile
-@@ -66,7 +66,7 @@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME)
- 
- $(MIGRATE): $(MOBJS)
- 	rm -f $@
--	$(CXX) $(LDFLAGS) -o $@ $(MOBJS) $(DB_RPATH_LINK) -lIceStormService -lIceStorm -lFreeze $(LIBS)
-+	$(CXX) $(LDFLAGS) -o $@ $(MOBJS) $(DB_RPATH_LINK) -lIceStormService -lIceStorm -lFreeze $(LIBS) -ldb_cxx
- 
- # The slice2freeze rules are structured like this to avoid issues with
- # parallel make.
-diff --git a/py/config/Make.rules b/py/config/Make.rules
-index 43ce01b..1349342 100644
---- a/py/config/Make.rules
-+++ b/py/config/Make.rules
-@@ -92,21 +92,23 @@ ifeq ($(shell test -f $(top_srcdir)/config/Make.rules.$(UNAME) && echo 0),0)
-     include $(top_srcdir)/config/Make.rules.$(UNAME)
- else
-     include $(top_srcdir)/../cpp/config/Make.rules.$(UNAME)
--endif 
-+endif
- 
- libdir                  = $(top_srcdir)/python
--ifneq ($(prefix), /usr)
--install_pythondir       = $(prefix)/python
--install_libdir          = $(prefix)/python
--else
--    ifeq ($(shell test -d $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/dist-packages && echo 0),0)
--        install_pythondir       = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/dist-packages
--        install_libdir          = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/dist-packages
--    else
--        install_pythondir       = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/site-packages
--        install_libdir          = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/site-packages
--    endif
--endif
-+#ifneq ($(prefix), /usr)
-+#install_pythondir       = $(prefix)/python
-+#install_libdir          = $(prefix)/python
-+#else
-+#    ifeq ($(shell test -d $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/dist-packages && echo 0),0)
-+#        install_pythondir       = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/dist-packages
-+#        install_libdir          = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/dist-packages
-+#    else
-+#        install_pythondir       = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/site-packages
-+#        install_libdir          = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/site-packages
-+#    endif
-+#endif
-+install_pythondir       = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/site-packages
-+install_libdir          = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/site-packages
- 
- ifeq ($(UNAME),SunOS)
-    ifeq ($(LP64),yes)
-@@ -115,19 +117,21 @@ ifeq ($(UNAME),SunOS)
-    endif
- endif
- 
--ifdef ice_src_dist
--    ifeq ($(ice_cpp_dir), $(ice_dir)/cpp)
--        ICE_LIB_DIR = -L$(ice_cpp_dir)/lib
--    else
--        ICE_LIB_DIR = -L$(ice_cpp_dir)/$(libsubdir)
--    endif
--    ICE_LIB_DIR = -L$(ice_cpp_dir)/lib
--    ICE_FLAGS 	= -I$(ice_cpp_dir)/include
--endif
--ifdef ice_bin_dist
--    ICE_LIB_DIR = -L$(ice_dir)/$(libsubdir)
--    ICE_FLAGS	= -I$(ice_dir)/include
--endif
-+#ifdef ice_src_dist
-+#    ifeq ($(ice_cpp_dir), $(ice_dir)/cpp)
-+#        ICE_LIB_DIR = -L$(ice_cpp_dir)/lib
-+#    else
-+#        ICE_LIB_DIR = -L$(ice_cpp_dir)/$(libsubdir)
-+#    endif
-+#    ICE_LIB_DIR = -L$(ice_cpp_dir)/lib
-+#    ICE_FLAGS 	= -I$(ice_cpp_dir)/include
-+#endif
-+#ifdef ice_bin_dist
-+#    ICE_LIB_DIR = -L$(ice_dir)/$(libsubdir)
-+#    ICE_FLAGS	= -I$(ice_dir)/include
-+#endif
-+ICE_LIB_DIR = -L$(top_srcdir)/../cpp/lib
-+ICE_FLAGS = -I$(ice_cpp_dir)/include
- ICE_LIBS = $(ICE_LIB_DIR) -lIce -lSlice -lIceUtil
- 
- ifneq ($(embedded_runpath_prefix),)
-@@ -137,7 +141,7 @@ endif
- CPPFLAGS		=
- ICECPPFLAGS		= -I$(slicedir)
- SLICE2PYFLAGS		= $(ICECPPFLAGS)
--LDFLAGS			= $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
-+LDFLAGS			+= $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
- 
- ifdef ice_src_dist
-     ifeq ($(ice_cpp_dir), $(ice_dir)/cpp)
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeroc-ice/zeroc-ice_3.5.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeroc-ice/zeroc-ice_3.5.1.bb
deleted file mode 100644
index 7c833b0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeroc-ice/zeroc-ice_3.5.1.bb
+++ /dev/null
@@ -1,87 +0,0 @@
-DESCRIPTION = "The Internet Communications Engine"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://ICE_LICENSE;md5=3dc3037023cc2ae6b2c5b995da529515"
-DEPENDS = "bzip2 expat openssl python db mcpp"
-DEPENDS_prepend_class-target = "zeroc-ice-native "
-
-SRC_URI = "http://www.zeroc.com/download/Ice/3.5/Ice-${PV}.tar.gz \
-           file://0002-Modify-Makefile-for-cross-compile.patch \
-          "
-SRC_URI[md5sum] = "f00c59983cc904bca977133c0a9b3e80"
-SRC_URI[sha256sum] = "989e51194c6adadbd156da3288e37bad847b93b3b876502e83033b70493af392"
-
-#| MapDb.cpp: In constructor 'Freeze::MapDb::MapDb(const ConnectionIPtr&, const string&, const string&, const string&, const KeyCompareBasePtr&, const std::vector<IceUtil::Handle<Freeze::MapIndexBase> >&, bool)':
-#| MapDb.cpp:138:46: error: call of overloaded 'set_bt_compare(int (*)(DB*, const DBT*, const DBT*))' is ambiguous
-#| MapDb.cpp:138:46: note: candidates are:
-#| /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/db_cxx.h:272:14: note: virtual int Db::set_bt_compare(bt_compare_fcn_type) <near match>
-#| /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/db_cxx.h:272:14: note:   no known conversion for argument 1 from 'int (*)(DB*, const DBT*, const DBT*) {aka int (*)(__db*, const __db_dbt*, const __db_dbt*)}' to 'bt_compare_fcn_type {aka int (*)(__db*, const __db_dbt*, const __db_dbt*, long unsigned int*)}'
-#| /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/db_cxx.h:273:14: note: virtual int Db::set_bt_compare(int (*)(Db*, const Dbt*, const Dbt*, size_t*)) <near match>
-#| /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/db_cxx.h:273:14: note:   no known conversion for argument 1 from 'int (*)(DB*, const DBT*, const DBT*) {aka int (*)(__db*, const __db_dbt*, const __db_dbt*)}' to 'int (*)(Db*, const Dbt*, const Dbt*, size_t*) {aka int (*)(Db*, const Dbt*, const Dbt*, long unsigned int*)}'
-#| make[3]: *** [MapDb.o] Error 1
-PNBLACKLIST[zeroc-ice] ?= "BROKEN: not compatible with default db version - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-S = "${WORKDIR}/Ice-${PV}"
-
-inherit python-dir pkgconfig
-
-export PYTHON_VERSION = "python2.7"
-
-do_configure() {
-    :
-}
-
-do_compile_prepend_class-target () {
-    export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}"
-    export PYTHON_LIB_DIR="${STAGING_LIBDIR}/${PYTHON_DIR}"
-    export ICE_HOME="${STAGING_DIR_NATIVE}/usr"
-}
-
-do_compile_prepend_class-nativesdk () {
-    export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}"
-    export PYTHON_LIB_DIR="${STAGING_LIBDIR}/${PYTHON_DIR}"
-    export ICE_HOME="${STAGING_DIR_NATIVE}/usr"
-}
-
-do_compile_prepend_class-native () {
-    export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}"
-    export PYTHON_LIB_DIR="${STAGING_LIBDIR}/${PYTHON_DIR}"
-    export ICE_HOME="${S}/cpp"
-}
-
-do_compile() {
-    oe_runmake -C ${S} cpp
-    oe_runmake -C ${S} py
-}
-
-do_install_prepend_class-target () {
-    export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}"
-    export PYTHON_LIB_DIR="${STAGING_LIBDIR}/${PYTHON_DIR}"
-    export ICE_HOME="${STAGING_DIR_NATIVE}/usr"
-}
-
-do_install_prepend_class-nativesdk () {
-    export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}"
-    export PYTHON_LIB_DIR="${STAGING_LIBDIR}/${PYTHON_DIR}"
-    export ICE_HOME="${STAGING_DIR_NATIVE}/usr"
-}
-
-do_install_prepend_class-native () {
-    export ICE_HOME="${S}/cpp"
-}
-
-do_install() {
-    oe_runmake -C ${S}/cpp prefix=${D}${prefix} install install-common
-    oe_runmake -C ${S}/py prefix=${D}${prefix} install
-}
-
-PACKAGES += "${PN}-python ${PN}-python-dev ${PN}-python-dbg"
-
-FILES_${PN}-doc += "${prefix}/man/man1"
-FILES_${PN} += "${prefix}/*LICENSE ${libdir}/ImportKey.class ${prefix}/RELEASE_NOTES ${prefix}/CHANGES"
-FILES_${PN}-dev += "${includedir} ${prefix}/slice ${prefix}/config"
-FILES_${PN}-python-dev = "${PYTHON_SITEPACKAGES_DIR}/IcePy.so"
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.py ${PYTHON_SITEPACKAGES_DIR}/IcePy.so.* ${PYTHON_SITEPACKAGES_DIR}/Ice*/*.py"
-FILES_${PN}-python-dbg = "${PYTHON_SITEPACKAGES_DIR}/.debug"
-FILES_${PN}-dev += "${bindir}/slice* ${datadir}/Ice-${PV}/slice/*"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch
new file mode 100644
index 0000000..2c4ca05
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch
@@ -0,0 +1,30 @@
+From 8e6d1f590b1cb437dc67c51298ef1722a7266d35 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 25 Jul 2017 18:37:58 -0700
+Subject: [PATCH] dbus-daemon-proxy: Return DBUS_HANDLER_RESULT_NOT_YET_HANDLED
+ from master_filter_cb() if DBusConnection is null
+
+So it can be passed on to other handlers since this could
+not be handled here
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dbus-daemon-proxy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dbus-daemon-proxy.c b/dbus-daemon-proxy.c
+index 009e4fd..f3f0d80 100644
+--- a/dbus-daemon-proxy.c
++++ b/dbus-daemon-proxy.c
+@@ -115,7 +115,7 @@ master_filter_cb (DBusConnection *conn,
+   guint32 serial;
+ 
+   if (!dbus_conn)
+-    return;
++    DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ 
+   if (verbose)
+     g_print ("New message from server: type='%d' path='%s' iface='%s'"
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb
index a953ebc..42cd032 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb
@@ -4,21 +4,20 @@
 DEPENDS = "dbus dbus-glib"
 SRCREV = "1226a0a1374628ff191f6d8a56000be5e53e7608"
 PV = "0.0.0+gitr${SRCPV}"
-PR = "r1"
+PR = "r1.59"
 
-ASNEEDED_pn-dbus-daemon-proxy = ""
-
-SRC_URI = "git://git.collabora.co.uk/git/user/alban/dbus-daemon-proxy"
+SRC_URI = "git://github.com/alban/dbus-daemon-proxy \
+           file://0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch \
+           "
 S = "${WORKDIR}/git"
 
+inherit pkgconfig
+
 do_compile() {
-    ${CC} ${LDFLAGS} `pkg-config --cflags --libs dbus-glib-1` -o dbus-daemon-proxy dbus-daemon-proxy.c
+    ${CC} ${CFLAGS} -o dbus-daemon-proxy dbus-daemon-proxy.c `pkg-config --cflags --libs dbus-glib-1` ${LDFLAGS}
 }
 
 do_install() {
     install -d ${D}${bindir}
     install -m 0755 dbus-daemon-proxy ${D}${bindir}
 }
-
-
-PNBLACKLIST[dbus-daemon-proxy] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130613/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_git.bb
new file mode 100644
index 0000000..10df6e1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_git.bb
@@ -0,0 +1,17 @@
+SUMMARY  = "Embedded Linux Library"
+DESCRIPTION = "ELL is a DBUS library which provides DBUS bindings."
+LICENSE  = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
+SECTION = "libs"
+
+inherit autotools pkgconfig
+
+S = "${WORKDIR}/git"
+SRCREV = "7b7c15c2e5caff88fc45e7a8b874a47196a0eddd"
+SRC_URI = "git://git.kernel.org/pub/scm/libs/ell/ell.git"
+
+do_configure_prepend () {
+    mkdir ${S}/build-aux
+}
+
+DEPENDS = "dbus"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/fakeroot/fakeroot-native_1.18.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/fakeroot/fakeroot-native_1.18.4.bb
deleted file mode 100644
index 9d50ea4..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/fakeroot/fakeroot-native_1.18.4.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require fakeroot_${PV}.bb
-
-S = "${WORKDIR}/fakeroot-${PV}"
-
-inherit native
-
-EXTRA_OECONF = "--program-prefix="
-
-# Compatability for the rare systems not using or having SYSV
-python () {
-    if d.getVar('HOST_NONSYSV') and d.getVar('HOST_NONSYSV') != '0':
-        d.setVar('EXTRA_OECONF', ' --with-ipc=tcp --program-prefix= ')
-}
-
-RDEPENDS_${PN} = "util-linux-native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/fakeroot/fakeroot_1.18.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/fakeroot/fakeroot_1.18.4.bb
deleted file mode 100644
index 0a787e3..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/fakeroot/fakeroot_1.18.4.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Gives a fake root environment"
-HOMEPAGE = "http://fakeroot.alioth.debian.org"
-SECTION = "base"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-
-SRC_URI = "\
-    ${DEBIAN_MIRROR}/main/f/fakeroot/fakeroot_${PV}.orig.tar.bz2 \
-"
-
-inherit autotools
-
-do_configure_prepend() {
-    mkdir -p ${S}/build-aux
-}
-
-do_install_append() {
-    install -d ${D}${includedir}/fakeroot
-    install -m 644 *.h ${D}${includedir}/fakeroot
-}
-
-# fakeroot needs getopt which is provided by the util-linux package
-RDEPENDS_${PN} = "util-linux"
-
-
-SRC_URI[md5sum] = "706171d8d520b1ca1576ac73f2ceb4f3"
-SRC_URI[sha256sum] = "0a359efa3e9496c33234b3e9c89306a09bb4da9d33de43c261f1d8447e6ebea2"
-
-# http://errors.yoctoproject.org/Errors/Details/35143/
-PNBLACKLIST[fakeroot] ?= "BROKEN: QA Issue: -dev package contains non-symlink .so - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.50.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.50.1.bb
index 401b3b2..9cc558f 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.50.1.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.50.1.bb
@@ -23,6 +23,10 @@
 
     install -m 0644 glib/glibmmconfig.h ${D}${datadir}/glibmm-2.4/
     install -m 0644 scripts/glibmm_check_perl.m4 ${D}${datadir}/aclocal/ || true
+
+    for i in generate_wrap_init.pl gmmproc; do
+        sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/glibmm-2.4/proc/$i
+    done
 }
 
 FILES_${PN} = "${libdir}/lib*.so.*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm-common.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm-common.bb
deleted file mode 100644
index 618cc1e..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm-common.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Helper script for OE's llvm support"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
-"
-
-SRC_URI = "file://llvm-config"
-
-ALLOW_EMPTY_${PN} = "1"
-SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_common_sysroot_preprocess"
-
-llvm_common_sysroot_preprocess() {
-    install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-    install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-}
-
-do_install_class-native() {
-    install -d ${D}${bindir}
-    install -m 0755 ${WORKDIR}/llvm-config ${D}${bindir}
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm-common/llvm-config b/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm-common/llvm-config
deleted file mode 100644
index b0f33c8..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm-common/llvm-config
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# Wrapper script for real llvm-config. Simply calls
-
-if [ $WANT_LLVM_RELEASE ]; then
-	exec `dirname $0`/${TARGET_PREFIX}llvm-config$WANT_LLVM_RELEASE ${@}
-else
-	echo "To use llvm-common WANT_LLVM_RELEASE needs to be exported."
-	echo "For example if this is being called through a recipe:"
-	echo "export WANT_LLVM_RELEASE=\"3.3\""
-	exit 1
-fi
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm.inc b/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm.inc
deleted file mode 100644
index f27261f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm.inc
+++ /dev/null
@@ -1,162 +0,0 @@
-# LLVM does not provide ABI stability between different versions. For this
-# reason OE makes it possible to build and install different llvm versions
-# at the same time.
-#
-# This is true for the normal recipes as well as the native ones.
-#
-# All regular installation directories are prefixed with 'llvm${LLVM_RELEASE}'
-# e.g. "${STAGING_BINDIR}/llvm2.5" or "${STAGING_INCDIR}/llvm2.5"
-#
-# For your program or library that makes use of llvm you do should not need to
-# modify anything as long as it uses the results of various llvm-config
-# invocations. If you need customizations something is wrong and it needs to be
-# fixed (report bug).
-#
-# However the *recipe* for your program/library *must* declare
-# export WANT_LLVM_RELEASE = "<valid version number>"
-# The version number is picked up by a generic wrapper script which just calls
-# the variant of the specified version.
-
-DESCRIPTION = "The Low Level Virtual Machine"
-HOMEPAGE = "http://llvm.org"
-
-# 3-clause BSD-like
-# University of Illinois/NCSA Open Source License
-LICENSE = "NCSA"
-LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8"
-
-DEPENDS = "libffi libxml2-native llvm-common"
-
-inherit perlnative pythonnative autotools
-
-LLVM_RELEASE = "${PV}"
-LLVM_DIR = "llvm${LLVM_RELEASE}"
-
-SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.gz"
-S = "${WORKDIR}/llvm-${PV}.src"
-
-LLVM_BUILD_DIR = "${WORKDIR}/llvm-${PV}.build"
-LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
-
-EXTRA_OECONF += "--disable-assertions \
-                 --enable-debug-runtime \
-                 --disable-expensive-checks \
-                 --enable-bindings=none \
-                 --enable-keep-symbols \
-                 --enable-libffi \
-                 --enable-optimized \
-                 --enable-shared \
-                 --enable-targets=host-only"
-EXTRA_OEMAKE += "REQUIRES_RTTI=1 VERBOSE=1"
-
-do_configure_prepend() {
-    # Remove RPATHs
-    sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' ${S}/Makefile.rules
-
-    # Drop "svn" suffix from version string
-    sed -i 's/${PV}svn/${PV}/g' ${S}/configure
-
-    # Fix paths in llvm-config
-    sed -i "s|sys::path::parent_path(CurrentPath))\.str()|sys::path::parent_path(sys::path::parent_path(CurrentPath))).str()|g" ${S}/tools/llvm-config/llvm-config.cpp
-    sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" ${S}/tools/llvm-config/llvm-config.cpp
-
-    # Fix the hardcoded libdir in llvm-config
-    sed -i 's:/lib\>:/${baselib}:g' ${S}/tools/llvm-config/llvm-config.cpp
-
-    # Fails to build unless using separate directory from source
-    mkdir -p ${LLVM_BUILD_DIR}
-    cd ${LLVM_BUILD_DIR}
-}
-
-do_compile() {
-    cd ${LLVM_BUILD_DIR}
-
-    # Fix libdir for multilib
-    sed -i 's:(PROJ_prefix)/lib:(PROJ_prefix)/${baselib}:g' Makefile.config
-
-    oe_runmake \
-        AR="${BUILD_AR}" \
-        CC="${BUILD_CC}" \
-        CFLAGS="${BUILD_CFLAGS}" \
-        CXX="${BUILD_CXX}" \
-        CXXFLAGS="${BUILD_CXXFLAGS}" \
-        CPP="${BUILD_CPP}" \
-        CPPFLAGS="${BUILD_CPPFLAGS}" \
-        NM="${BUILD_NM}" \
-        RANLIB="${BUILD_RANLIB}" \
-        PATH="${STAGING_BINDIR_NATIVE}:$PATH" \
-        cross-compile-build-tools
-    oe_runmake
-}
-
-do_install() {
-    cd ${LLVM_BUILD_DIR}
-    oe_runmake DESTDIR=${LLVM_INSTALL_DIR} install
-
-    mv ${LLVM_INSTALL_DIR}${bindir}/${HOST_SYS}-llvm-config-host ${LLVM_INSTALL_DIR}/llvm-config-host
-
-    install -d ${D}${bindir}/${LLVM_DIR}
-    mv ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/
-
-    install -d ${D}${includedir}/${LLVM_DIR}
-    mv ${LLVM_INSTALL_DIR}${includedir}/* ${D}${includedir}/${LLVM_DIR}/
-
-    install -d ${D}${libdir}/${LLVM_DIR}
-    mv ${LLVM_INSTALL_DIR}${libdir}/* ${D}${libdir}/${LLVM_DIR}/
-    ln -s ${LLVM_DIR}/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so
-
-    install -d ${D}${docdir}/${LLVM_DIR}
-    mv ${LLVM_INSTALL_DIR}${prefix}/docs/llvm/* ${D}${docdir}/${LLVM_DIR}
-}
-
-SYSROOT_PREPROCESS_FUNCS += "llvm_sysroot_preprocess"
-
-llvm_sysroot_preprocess() {
-    install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
-    mv ${LLVM_INSTALL_DIR}/llvm-config-host ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
-}
-
-PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello"
-ALLOW_EMPTY_${PN} = "1"
-ALLOW_EMPTY_${PN}-staticdev = "1"
-FILES_${PN} = ""
-FILES_${PN}-staticdev = ""
-FILES_${PN}-dbg = " \
-    ${bindir}/${LLVM_DIR}/.debug \
-    ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \
-    ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \
-    /usr/src/debug \
-"
-
-FILES_${PN}-dev = " \
-    ${bindir}/${LLVM_DIR} \
-    ${includedir}/${LLVM_DIR} \
-"
-RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello"
-
-FILES_${PN}-bugpointpasses = "\
-    ${libdir}/${LLVM_DIR}/BugpointPasses.so \
-"
-FILES_${PN}-llvmhello = "\
-    ${libdir}/${LLVM_DIR}/LLVMHello.so \
-"
-
-PACKAGES_DYNAMIC = "^libllvm${LLVM_RELEASE}-.*$"
-NOAUTOPACKAGEDEBUG = "1"
-
-INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE} += "dev-so"
-
-python llvm_populate_packages() {
-    libdir = bb.data.expand('${libdir}', d)
-    libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d)
-    split_dbg_packages = do_split_packages(d, libllvm_libdir+'/.debug', '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s-dbg', 'Split debug package for %s', allow_dirs=True)
-    split_packages = do_split_packages(d, libdir, '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True, allow_links=True, recursive=True)
-    split_staticdev_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True)
-    if split_packages:
-        pn = d.getVar('PN')
-        d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages))
-        d.appendVar('RDEPENDS_' + pn + '-dbg', ' '+' '.join(split_dbg_packages))
-        d.appendVar('RDEPENDS_' + pn + '-staticdev', ' '+' '.join(split_staticdev_packages))
-}
-
-PACKAGESPLITFUNCS_prepend = "llvm_populate_packages "
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3/Remove-error-output-from-configure-if-CFLAGS-is-set-.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3/Remove-error-output-from-configure-if-CFLAGS-is-set-.patch
deleted file mode 100644
index 44387e8..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3/Remove-error-output-from-configure-if-CFLAGS-is-set-.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From d4bf7a3853dab12c11cbfc8088fd76f548a8d017 Mon Sep 17 00:00:00 2001
-From: Patrik Hagglund <patrik.h.hagglund@ericsson.com>
-Date: Tue, 24 Sep 2013 11:38:45 +0000
-Subject: [PATCH] Remove error output from configure if CFLAGS is set (r174313).
-
-This fixes PR16724.
-
-git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191289 91177308-0d34-0410-b5e6-96231b3b80d8
-
-https://github.com/llvm-mirror/llvm/commit/d4bf7a3853dab12c11cbfc8088fd76f548a8d017
-
-Upstream-Status: Backport
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- autoconf/configure.ac | 4 ++--
- configure             | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/autoconf/configure.ac b/autoconf/configure.ac
-index f9c365c..45f2fe4 100644
---- a/autoconf/configure.ac
-+++ b/autoconf/configure.ac
-@@ -61,8 +61,8 @@ fi
- 
- dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,
- dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc).
--${CFLAGS=}
--${CXXFLAGS=}
-+: ${CFLAGS=}
-+: ${CXXFLAGS=}
- 
- dnl We need to check for the compiler up here to avoid anything else
- dnl starting with a different one.
-diff --git a/configure b/configure
-index f3a6594..9090cda 100755
---- a/configure
-+++ b/configure
-@@ -1992,8 +1992,8 @@ echo "$as_me: error: Already configured in ${srcdir}" >&2;}
-   fi
- fi
- 
--${CFLAGS=}
--${CXXFLAGS=}
-+: ${CFLAGS=}
-+: ${CXXFLAGS=}
- 
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3/arm_fenv_uclibc.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3/arm_fenv_uclibc.patch
deleted file mode 100644
index c3ae494..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3/arm_fenv_uclibc.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: llvm-2.9/include/llvm/Support/FEnv.h
-===================================================================
---- llvm-2.9.orig/include/llvm/Support/FEnv.h	2010-11-29 20:44:50.000000000 +0100
-+++ llvm-2.9/include/llvm/Support/FEnv.h	2011-11-18 18:42:22.580161297 +0100
-@@ -17,6 +17,9 @@
- 
- #include "llvm/Config/config.h"
- #include <cerrno>
-+
-+#undef HAVE_FENV_H
-+
- #ifdef HAVE_FENV_H
- #include <fenv.h>
- #endif
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb
deleted file mode 100644
index 60a2221..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require llvm.inc
-
-DEPENDS += "zlib"
-EXTRA_OECONF += "--enable-zlib"
-
-SRC_URI += "file://Remove-error-output-from-configure-if-CFLAGS-is-set-.patch"
-
-SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch "
-
-SRC_URI[md5sum] = "40564e1dc390f9844f1711c08b08e391"
-SRC_URI[sha256sum] = "68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[r600] = "--enable-experimental-targets=R600,,,"
-
-# Fails to build with thumb-1 (qemuarm)
-# | {standard input}: Assembler messages:
-# | {standard input}:22: Error: selected processor does not support Thumb mode `stmdb sp!,{r0,r1,r2,r3,lr}'
-# | {standard input}:31: Error: lo register required -- `ldmia sp!,{r0,r1,r2,r3,lr}'
-# | {standard input}:32: Error: lo register required -- `ldr pc,[sp],#4'
-# | make[3]: *** [/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/llvm3.3/3.3-r0/llvm-3.3.build/lib/Target/ARM/Release/ARMJITInfo.o] Error 1
-ARM_INSTRUCTION_SET = "arm"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-basic.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-basic.bb
index a53fa69..b12183b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-basic.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-basic.bb
@@ -3,7 +3,7 @@
 
 SUMMARY = "Basic task to get a device online"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
 PR = "r13"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-boot.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-boot.bb
index a542ae4..3ae7a49 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-boot.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-boot.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Basic task to get a device booting"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
 PR = "r58"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-cli-tools.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-cli-tools.bb
deleted file mode 100644
index 697f9bf..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-cli-tools.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "A set of useful command line tools"
-SUMMARY_${PN}-debug = "A set of command line tools useful for debugging"
-SECTION = "console"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-PV = "1.0"
-PR = "r21"
-
-inherit packagegroup allarch
-
-PACKAGES += "${PN}-debug"
-
-RDEPENDS_${PN} = "\
-    dbus-daemon-proxy \
-    dosfstools \
-    htop \
-    iptables \
-    lsof \
-    mbuffer \
-    mtd-utils \
-    nano \
-    nfs-utils-client \
-    nmon \
-    powertop \
-    screen \
-    socat \
-    sysstat \
-"
-
-RDEPENDS_${PN}-debug = "\
-    evtest \
-    devmem2 \
-    i2c-tools \
-    gdb \
-    procps \
-    pxaregs \
-    s3c24xx-gpio \
-    s3c64xx-gpio \
-    serial-forward \
-    strace \
-"
-
-RRECOMMENDS_${PN}-debug = "\
-    ltrace \
-"
-
-PNBLACKLIST[packagegroup-cli-tools] ?= "Runtime depends on blacklisted dbus-daemon-proxy - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-
-PNBLACKLIST[packagegroup-cli-tools] ?= "Runtime depends on blacklisted packagegroup-cli-tools - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20100902/soname.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20100902/soname.patch
deleted file mode 100644
index 0df232d..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20100902/soname.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: proxy-libintl-20080418-r6/src/proxy-libintl/Makefile
-===================================================================
---- proxy-libintl-20080418-r6.orig/src/proxy-libintl/Makefile	2010-07-25 08:40:22.893620001 -0700
-+++ proxy-libintl-20080418-r6/src/proxy-libintl/Makefile	2010-07-25 10:51:29.573620000 -0700
-@@ -6,16 +6,13 @@ CFLAGS = -Wall -I ../../include
- 
- all : ../../lib/libintl.so ../../lib/intl.lib
- 
--../../lib/libintl.so : libintl.o
--	$(CC) -shared -o $@ libintl.o
-+../../lib/libintl.so : libintl.c
-+	$(CC) $(CFLAGS) -shared -Wl,-soname -Wl,libintl.so -o $@ $<
- 
- ../../lib/intl.lib : ../../lib/libintl.so
- 	cp ../../lib/libintl.so $@
- 	$(STRIP) --strip-unneeded $@
- 
--libintl.o : libintl.c
--	$(CC) $(CFLAGS) -c libintl.c
--
- clean :
- 	rm -f *.o ../../lib/libintl.so ../../$(ZIPFILE)
- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_0.7.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_0.7.3.bb
deleted file mode 100644
index 0cd44ff..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_0.7.3.bb
+++ /dev/null
@@ -1,74 +0,0 @@
-SUMMARY = "Toybox combines common utilities together into a single executable."
-HOMEPAGE = "http://www.landley.net/toybox/"
-DEPENDS = "attr"
-
-SRC_URI = " \
-    http://www.landley.net/toybox/downloads/${BPN}-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "6fa2a001402cb067ba541e0d8948da50"
-SRC_URI[sha256sum] = "e6469b508224e0d2e4564dda05c4bb47aef5c28bf29d6c983bcdc6e3a0cd29d6"
-
-LICENSE = "BSD-0-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f0b8b3dd6431bcaa245da0a08bd0d511"
-
-SECTION = "base"
-
-TOYBOX_BIN = "generated/unstripped/toybox"
-
-EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
-
-do_configure() {
-    oe_runmake defconfig
-
-    # Disable killall5 as it isn't managed by update-alternatives
-    sed -e 's/CONFIG_KILLALL5=y/# CONFIG_KILLALL5 is not set/' -i .config
-
-    # Disable swapon as it doesn't handle the '-a' argument used during boot
-    sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config
-}
-
-do_compile() {
-    oe_runmake ${TOYBOX_BIN}
-
-    # Create a list of links needed
-    ${BUILD_CC} -I . scripts/install.c -o generated/instlist
-    ./generated/instlist long | sed -e 's#^#/#' > toybox.links
-}
-
-do_install() {
-    # Install manually instead of using 'make install'
-    install -d ${D}${base_bindir}
-    if grep -q "CONFIG_TOYBOX_SUID=y" ${B}/.config; then
-        install -m 4755 ${B}/${TOYBOX_BIN} ${D}${base_bindir}/toybox
-    else
-        install -m 0755 ${B}/${TOYBOX_BIN} ${D}${base_bindir}/toybox
-    fi
-
-    install -d ${D}${sysconfdir}
-    install -m 0644 ${B}/toybox.links ${D}${sysconfdir}
-}
-
-inherit update-alternatives
-
-# If you've chosen to install toybox you probably want it to take precedence
-# over busybox where possible but not over other packages
-ALTERNATIVE_PRIORITY = "60"
-
-python do_package_prepend () {
-    # Read links from /etc/toybox.links and create appropriate
-    # update-alternatives variables
-
-    dvar = d.getVar('D')
-    pn = d.getVar('PN')
-    target = "/bin/toybox"
-
-    f = open('%s/etc/toybox.links' % (dvar), 'r')
-    for alt_link_name in f:
-        alt_link_name = alt_link_name.strip()
-        alt_name = os.path.basename(alt_link_name)
-        d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
-        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
-        d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target)
-    f.close()
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_git.bb
new file mode 100644
index 0000000..08f9715
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_git.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Toybox combines common utilities together into a single executable."
+HOMEPAGE = "http://www.landley.net/toybox/"
+DEPENDS = "attr"
+
+LICENSE = "BSD-0-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f0b8b3dd6431bcaa245da0a08bd0d511"
+
+PV = "0.7.4+git${SRCPV}"
+
+SRCREV = "78289203031afc23585035c362beec10db54958d"
+SRC_URI = "git://github.com/landley/toybox;protocol=https \
+"
+
+S = "${WORKDIR}/git"
+
+SECTION = "base"
+
+TOYBOX_BIN = "generated/unstripped/toybox"
+
+EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()}'
+
+do_configure() {
+    oe_runmake defconfig
+
+    # Disable killall5 as it isn't managed by update-alternatives
+    sed -e 's/CONFIG_KILLALL5=y/# CONFIG_KILLALL5 is not set/' -i .config
+
+    # Disable swapon as it doesn't handle the '-a' argument used during boot
+    sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config
+}
+
+do_compile() {
+    oe_runmake ${TOYBOX_BIN}
+
+    # Create a list of links needed
+    ${BUILD_CC} -I . scripts/install.c -o generated/instlist
+    ./generated/instlist long | sed -e 's#^#/#' > toybox.links
+}
+
+do_install() {
+    # Install manually instead of using 'make install'
+    install -d ${D}${base_bindir}
+    if grep -q "CONFIG_TOYBOX_SUID=y" ${B}/.config; then
+        install -m 4755 ${B}/${TOYBOX_BIN} ${D}${base_bindir}/toybox
+    else
+        install -m 0755 ${B}/${TOYBOX_BIN} ${D}${base_bindir}/toybox
+    fi
+
+    install -d ${D}${sysconfdir}
+    install -m 0644 ${B}/toybox.links ${D}${sysconfdir}
+}
+
+inherit update-alternatives
+
+# If you've chosen to install toybox you probably want it to take precedence
+# over busybox where possible but not over other packages
+ALTERNATIVE_PRIORITY = "60"
+
+python do_package_prepend () {
+    # Read links from /etc/toybox.links and create appropriate
+    # update-alternatives variables
+
+    dvar = d.getVar('D')
+    pn = d.getVar('PN')
+    target = "/bin/toybox"
+
+    f = open('%s/etc/toybox.links' % (dvar), 'r')
+    for alt_link_name in f:
+        alt_link_name = alt_link_name.strip()
+        alt_name = os.path.basename(alt_link_name)
+        d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
+        d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target)
+    f.close()
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/.gitignore b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/.gitignore
index b8a08f8..b034c10 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/.gitignore
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/.gitignore
@@ -3,6 +3,8 @@
 !*.indirectionsymlink
 !*.[ch]
 !*.mk
+!*.patch
+!*.service
 !NOTICE
 !MODULE_LICENSE_*
 !/system/
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/0001-add-base64-implementation.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/0001-add-base64-implementation.patch
new file mode 100644
index 0000000..680d21f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/0001-add-base64-implementation.patch
@@ -0,0 +1,351 @@
+From bbeb72f11c64f190b23abbed5f44311bd021bdc9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Sep 2017 15:46:38 -0700
+Subject: [PATCH 1/2] add base64 implementation
+
+musl needs it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ system/core/adb/adb_auth_client.c |   2 +-
+ system/core/adb/base64.c          | 315 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 316 insertions(+), 1 deletion(-)
+ create mode 100644 system/core/adb/base64.c
+
+diff --git a/system/core/adb/adb_auth_client.c b/system/core/adb/adb_auth_client.c
+index 55e9dca..104b413 100644
+--- a/system/core/adb/adb_auth_client.c
++++ b/system/core/adb/adb_auth_client.c
+@@ -75,7 +75,7 @@ static void read_keys(const char *file, struct listnode *list)
+         if (sep)
+             *sep = '\0';
+ 
+-        ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
++        ret = b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
+         if (ret != sizeof(key->key)) {
+             D("%s: Invalid base64 data ret=%d\n", file, ret);
+             free(key);
+diff --git a/system/core/adb/base64.c b/system/core/adb/base64.c
+new file mode 100644
+index 0000000..95da284
+--- /dev/null
++++ b/system/core/adb/base64.c
+@@ -0,0 +1,315 @@
++/*
++ * Copyright (c) 1996-1999 by Internet Software Consortium.
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
++ */
++
++/*
++ * Portions Copyright (c) 1995 by International Business Machines, Inc.
++ *
++ * International Business Machines, Inc. (hereinafter called IBM) grants
++ * permission under its copyrights to use, copy, modify, and distribute this
++ * Software with or without fee, provided that the above copyright notice and
++ * all paragraphs of this notice appear in all copies, and that the name of IBM
++ * not be used in connection with the marketing of any product incorporating
++ * the Software or modifications thereof, without specific, written prior
++ * permission.
++ *
++ * To the extent it has a right to do so, IBM grants an immunity from suit
++ * under its patents, if any, for the use, sale or manufacture of products to
++ * the extent that such products are used for performing Domain Name System
++ * dynamic updates in TCP/IP networks by means of the Software.  No immunity is
++ * granted for any product per se or for any other function of any product.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
++ * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
++ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
++ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
++ */
++
++#if !defined(LINT) && !defined(CODECENTER)
++static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $";
++#endif /* not lint */
++
++#include <sys/types.h>
++#include <sys/param.h>
++#include <sys/socket.h>
++
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <arpa/nameser.h>
++
++#include <ctype.h>
++#include <resolv.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <stdint.h>
++#include <string.h>
++
++#define Assert(Cond) if (!(Cond)) abort()
++
++static const char Base64[] =
++	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
++static const char Pad64 = '=';
++
++/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
++   The following encoding technique is taken from RFC 1521 by Borenstein
++   and Freed.  It is reproduced here in a slightly edited form for
++   convenience.
++
++   A 65-character subset of US-ASCII is used, enabling 6 bits to be
++   represented per printable character. (The extra 65th character, "=",
++   is used to signify a special processing function.)
++
++   The encoding process represents 24-bit groups of input bits as output
++   strings of 4 encoded characters. Proceeding from left to right, a
++   24-bit input group is formed by concatenating 3 8-bit input groups.
++   These 24 bits are then treated as 4 concatenated 6-bit groups, each
++   of which is translated into a single digit in the base64 alphabet.
++
++   Each 6-bit group is used as an index into an array of 64 printable
++   characters. The character referenced by the index is placed in the
++   output string.
++
++                         Table 1: The Base64 Alphabet
++
++      Value Encoding  Value Encoding  Value Encoding  Value Encoding
++          0 A            17 R            34 i            51 z
++          1 B            18 S            35 j            52 0
++          2 C            19 T            36 k            53 1
++          3 D            20 U            37 l            54 2
++          4 E            21 V            38 m            55 3
++          5 F            22 W            39 n            56 4
++          6 G            23 X            40 o            57 5
++          7 H            24 Y            41 p            58 6
++          8 I            25 Z            42 q            59 7
++          9 J            26 a            43 r            60 8
++         10 K            27 b            44 s            61 9
++         11 L            28 c            45 t            62 +
++         12 M            29 d            46 u            63 /
++         13 N            30 e            47 v
++         14 O            31 f            48 w         (pad) =
++         15 P            32 g            49 x
++         16 Q            33 h            50 y
++
++   Special processing is performed if fewer than 24 bits are available
++   at the end of the data being encoded.  A full encoding quantum is
++   always completed at the end of a quantity.  When fewer than 24 input
++   bits are available in an input group, zero bits are added (on the
++   right) to form an integral number of 6-bit groups.  Padding at the
++   end of the data is performed using the '=' character.
++
++   Since all base64 input is an integral number of octets, only the
++         -------------------------------------------------
++   following cases can arise:
++
++       (1) the final quantum of encoding input is an integral
++           multiple of 24 bits; here, the final unit of encoded
++	   output will be an integral multiple of 4 characters
++	   with no "=" padding,
++       (2) the final quantum of encoding input is exactly 8 bits;
++           here, the final unit of encoded output will be two
++	   characters followed by two "=" padding characters, or
++       (3) the final quantum of encoding input is exactly 16 bits;
++           here, the final unit of encoded output will be three
++	   characters followed by one "=" padding character.
++   */
++
++int
++b64_ntop(const uint8_t* src, size_t srclength, char* target, size_t targsize)
++{
++	size_t datalength = 0;
++	uint8_t input[3];
++	uint8_t output[4];
++	size_t i;
++
++	while (2 < srclength) {
++		input[0] = *src++;
++		input[1] = *src++;
++		input[2] = *src++;
++		srclength -= 3;
++
++		output[0] = input[0] >> 2;
++		output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
++		output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
++		output[3] = input[2] & 0x3f;
++		Assert(output[0] < 64);
++		Assert(output[1] < 64);
++		Assert(output[2] < 64);
++		Assert(output[3] < 64);
++
++		if (datalength + 4 > targsize)
++			return (-1);
++		target[datalength++] = Base64[output[0]];
++		target[datalength++] = Base64[output[1]];
++		target[datalength++] = Base64[output[2]];
++		target[datalength++] = Base64[output[3]];
++	}
++
++	/* Now we worry about padding. */
++	if (0 != srclength) {
++		/* Get what's left. */
++		input[0] = input[1] = input[2] = '\0';
++		for (i = 0; i < srclength; i++)
++			input[i] = *src++;
++
++		output[0] = input[0] >> 2;
++		output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
++		output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
++		Assert(output[0] < 64);
++		Assert(output[1] < 64);
++		Assert(output[2] < 64);
++
++		if (datalength + 4 > targsize)
++			return (-1);
++		target[datalength++] = Base64[output[0]];
++		target[datalength++] = Base64[output[1]];
++		if (srclength == 1)
++			target[datalength++] = Pad64;
++		else
++			target[datalength++] = Base64[output[2]];
++		target[datalength++] = Pad64;
++	}
++	if (datalength >= targsize)
++		return (-1);
++	target[datalength] = '\0';	/* Returned value doesn't count \0. */
++	return (datalength);
++}
++
++/* skips all whitespace anywhere.
++   converts characters, four at a time, starting at (or after)
++   src from base - 64 numbers into three 8 bit bytes in the target area.
++   it returns the number of data bytes stored at the target, or -1 on error.
++ */
++
++int b64_pton(const char* src, uint8_t* target, size_t targsize)
++{
++	int tarindex, state, ch;
++	char *pos;
++
++	state = 0;
++	tarindex = 0;
++
++	while ((ch = *src++) != '\0') {
++		if (isspace(ch))	/* Skip whitespace anywhere. */
++			continue;
++
++		if (ch == Pad64)
++			break;
++
++		pos = strchr(Base64, ch);
++		if (pos == 0) 		/* A non-base64 character. */
++			return (-1);
++
++		switch (state) {
++		case 0:
++			if (target) {
++				if ((size_t)tarindex >= targsize)
++					return (-1);
++				target[tarindex] = (pos - Base64) << 2;
++			}
++			state = 1;
++			break;
++		case 1:
++			if (target) {
++				if ((size_t)tarindex + 1 >= targsize)
++					return (-1);
++				target[tarindex]   |=  (pos - Base64) >> 4;
++				target[tarindex+1]  = ((pos - Base64) & 0x0f)
++							<< 4 ;
++			}
++			tarindex++;
++			state = 2;
++			break;
++		case 2:
++			if (target) {
++				if ((size_t)tarindex + 1 >= targsize)
++					return (-1);
++				target[tarindex]   |=  (pos - Base64) >> 2;
++				target[tarindex+1]  = ((pos - Base64) & 0x03)
++							<< 6;
++			}
++			tarindex++;
++			state = 3;
++			break;
++		case 3:
++			if (target) {
++				if ((size_t)tarindex >= targsize)
++					return (-1);
++				target[tarindex] |= (pos - Base64);
++			}
++			tarindex++;
++			state = 0;
++			break;
++		default:
++			abort();
++		}
++	}
++
++	/*
++	 * We are done decoding Base-64 chars.  Let's see if we ended
++	 * on a byte boundary, and/or with erroneous trailing characters.
++	 */
++
++	if (ch == Pad64) {		/* We got a pad char. */
++		ch = *src++;		/* Skip it, get next. */
++		switch (state) {
++		case 0:		/* Invalid = in first position */
++		case 1:		/* Invalid = in second position */
++			return (-1);
++
++		case 2:		/* Valid, means one byte of info */
++			/* Skip any number of spaces. */
++			for ((void)NULL; ch != '\0'; ch = *src++)
++				if (!isspace(ch))
++					break;
++			/* Make sure there is another trailing = sign. */
++			if (ch != Pad64)
++				return (-1);
++			ch = *src++;		/* Skip the = */
++			/* Fall through to "single trailing =" case. */
++			/* FALLTHROUGH */
++
++		case 3:		/* Valid, means two bytes of info */
++			/*
++			 * We know this char is an =.  Is there anything but
++			 * whitespace after it?
++			 */
++			for ((void)NULL; ch != '\0'; ch = *src++)
++				if (!isspace(ch))
++					return (-1);
++
++			/*
++			 * Now make sure for cases 2 and 3 that the "extra"
++			 * bits that slopped past the last full byte were
++			 * zeros.  If we don't check them, they become a
++			 * subliminal channel.
++			 */
++			if (target && target[tarindex] != 0)
++				return (-1);
++		}
++	} else {
++		/*
++		 * We ended by seeing the end of the string.  Make sure we
++		 * have no partial bytes lying around.
++		 */
++		if (state != 0)
++			return (-1);
++	}
++
++	return (tarindex);
++}
++
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/0002-adb-Musl-fixes.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/0002-adb-Musl-fixes.patch
new file mode 100644
index 0000000..c7aebb6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/0002-adb-Musl-fixes.patch
@@ -0,0 +1,134 @@
+From f8653ed0ede4aa781ab758fcd44fdc05ffbe0b0a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Sep 2017 15:50:57 -0700
+Subject: [PATCH 2/2] adb: Musl fixes
+
+__nonnull is gcc specific
+include sys/types.h for size_t
+Do not redefine close() and lseek()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ system/core/adb/adb.h                    |  2 ++
+ system/core/adb/disable_verity_service.c | 13 ++++++++-----
+ system/core/adb/framebuffer_service.c    |  7 ++++---
+ system/core/adb/sysdeps.h                | 12 ++++++------
+ 4 files changed, 20 insertions(+), 14 deletions(-)
+
+diff --git a/system/core/adb/adb.h b/system/core/adb/adb.h
+index 44e5981..bcdc49f 100644
+--- a/system/core/adb/adb.h
++++ b/system/core/adb/adb.h
+@@ -18,7 +18,9 @@
+ #define __ADB_H
+ 
+ #include <limits.h>
++#include <sys/types.h>
+ 
++#include "fdevent.h"
+ #include "adb_trace.h"
+ #include "transport.h"  /* readx(), writex() */
+ 
+diff --git a/system/core/adb/disable_verity_service.c b/system/core/adb/disable_verity_service.c
+index ed3da52..29fa3d6 100644
+--- a/system/core/adb/disable_verity_service.c
++++ b/system/core/adb/disable_verity_service.c
+@@ -14,25 +14,28 @@
+  * limitations under the License.
+  */
+ 
+-#include "sysdeps.h"
+ 
+ #define  TRACE_TAG  TRACE_ADB
+ #include "adb.h"
++#include "sysdeps.h"
++#include "cutils/properties.h"
++#include "ext4_sb.h"
++#include <fs_mgr.h>
+ 
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
++#include <unistd.h>
++#include <errno.h>
++#include <stdbool.h>
+ 
+-#include "cutils/properties.h"
+-#include "ext4_sb.h"
+-#include <fs_mgr.h>
+ 
+ #define FSTAB_PREFIX "/fstab."
+ struct fstab *fstab;
+ 
+-__attribute__((__format__(printf, 2, 3))) __nonnull((2))
++__attribute__((__format__(printf, 2, 3))) __attribute__((nonnull((2))))
+ static void write_console(int fd, const char* format, ...)
+ {
+     char buffer[256];
+diff --git a/system/core/adb/framebuffer_service.c b/system/core/adb/framebuffer_service.c
+index 8cbe840..8f0ccfb 100644
+--- a/system/core/adb/framebuffer_service.c
++++ b/system/core/adb/framebuffer_service.c
+@@ -14,6 +14,10 @@
+  * limitations under the License.
+  */
+ 
++#include "fdevent.h"
++#include "adb.h"
++#include "sysdeps.h"
++
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <unistd.h>
+@@ -23,9 +27,6 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ 
+-#include "fdevent.h"
+-#include "adb.h"
+-
+ #include <linux/fb.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+diff --git a/system/core/adb/sysdeps.h b/system/core/adb/sysdeps.h
+index cc1f839..ea39ac3 100644
+--- a/system/core/adb/sysdeps.h
++++ b/system/core/adb/sysdeps.h
+@@ -123,8 +123,8 @@ static __inline__ int  unix_close(int fd)
+ {
+     return close(fd);
+ }
+-#undef   close
+-#define  close   ____xxx_close
++//#undef   close
++//#define  close   ____xxx_close
+ 
+ static __inline__  int  unix_read(int  fd, void*  buf, size_t  len)
+ {
+@@ -369,8 +369,8 @@ static __inline__ int  adb_close(int fd)
+ {
+     return close(fd);
+ }
+-#undef   close
+-#define  close   ____xxx_close
++//#undef   close
++//#define  close   ____xxx_close
+ 
+ 
+ static __inline__  int  adb_read(int  fd, void*  buf, size_t  len)
+@@ -392,8 +392,8 @@ static __inline__ int   adb_lseek(int  fd, int  pos, int  where)
+ {
+     return lseek(fd, pos, where);
+ }
+-#undef   lseek
+-#define  lseek   ___xxx_lseek
++//#undef   lseek
++//#define  lseek   ___xxx_lseek
+ 
+ static __inline__  int    adb_unlink(const char*  path)
+ {
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/adbd.mk b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/adbd.mk
index 84cd06b..31452ae 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/adbd.mk
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/adbd.mk
@@ -16,6 +16,7 @@
 adbd_SRC_FILES += framebuffer_service.c
 adbd_SRC_FILES += remount_service.c
 adbd_SRC_FILES += disable_verity_service.c
+adbd_SRC_FILES += base64.c
 adbd_SRC_FILES += usb_linux_client.c
 adbd_OBJS := $(adbd_SRC_FILES:.c=.o)
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
index 34fddcb..d3ccd1d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
@@ -32,6 +32,8 @@
     file://define-shell-command.patch \
     file://implicit-declaration-function-strlcat-strlcopy.patch \
     file://fix-big-endian-build.patch \
+    file://0001-add-base64-implementation.patch \
+    file://0002-adb-Musl-fixes.patch \
     file://android-tools-adbd.service \
     file://.gitignore;subdir=git \
     file://adb.mk;subdir=${BPN} \
@@ -52,24 +54,6 @@
 
 SYSTEMD_SERVICE_${PN} = "android-tools-adbd.service"
 
-# Get rid of files uneeded to build Android tools
-do_unpack_extra() {
-    cd ${S}
-    rm -rf \
-      system/core/.git \
-      system/extras/.git \
-      hardware/libhardware/.git \
-      external/libselinux/.git \
-      build/.git
-    git init
-    git add .
-    git commit -m \
-      "Initial import - committed ${ANDROID_TAG}"
-    git clean -fdx
-}
-
-addtask unpack_extra after do_unpack before do_patch
-
 # Find libbsd headers during native builds
 CC_append_class-native = " -I${STAGING_INCDIR}"
 CC_append_class-nativesdk = " -I${STAGING_INCDIR}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive.inc b/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive.inc
deleted file mode 100644
index 9684d1f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-LICENSE = "GPLv3"
-HOMEPAGE = "http://www.gnu.org/software/autoconf-archive/"
-SECTION = "devel"
-
-DEPENDS += "m4-native"
-DEPENDS_class-native = "m4-native gnu-config-native"
-DEPENDS_class-nativesdk = "m4-nativesdk gnu-config-nativesdk"
-
-RDEPENDS_${PN} = "m4 gnu-config gnome-common"
-RDEPENDS_${PN}_class-native = "m4-native gnu-config-native"
-RDEPENDS_${PN}_class-nativesdk = "m4-nativesdk gnu-config-nativesdk"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-
-inherit autotools
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive/delete-some-m4-files.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive/delete-some-m4-files.patch
deleted file mode 100644
index 2aa788b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive/delete-some-m4-files.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Delete two m4files ax_code_coverage.m4 and ax_check_enable_debug.m4
-to avoid installing conflicts. These two files can be installed by
-gnome-common from oe-core, even if the files in gnmoe-common is
-copied from autoconf-archive(the reason is that the old version
-autoconf-archive don't provide the two files).
-After upgrading to the new version, we need to drop them in meta-oe
-and then set rdepends to gnome-common(oe-core)
-
-Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
-
-Index: a/configure.ac
-===================================================================
---- a/configure.ac     2016-09-16 06:00:00.000000000 +0800
-+++ b/configure.ac     2017-04-18 17:43:05.946290554 +0800
-@@ -19,7 +19,7 @@
- 
- AC_PROG_SED
- 
--M4FILES="m4_esyscmd([echo -n m4/*.m4])"
-+M4FILES="m4_esyscmd([echo -n m4/*.m4 | sed -e 's:m4/ax_code_coverage.m4 ::g'|sed -e 's:m4/ax_check_enable_debug.m4 ::g'])"
- AC_SUBST([M4FILES])
- 
- TEXIFILES="m4_esyscmd([cd m4 && echo -n *.m4 | sed -e 's/\.m4/.texi/g'])"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
deleted file mode 100644
index 561b57b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require autoconf-archive.inc
-
-
-PARALLEL_MAKE = ""
-
-LICENSE = "GPLv2 & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI[md5sum] = "bf19d4cddce260b3c3e1d51d42509071"
-SRC_URI[sha256sum] = "e8f2efd235f842bad2f6938bf4a72240a5e5fcd248e8444335e63beb60fabd82"
-
-SRC_URI += "\
-        file://delete-some-m4-files.patch \
-"
-
-EXTRA_OECONF += "ac_cv_path_M4=m4"
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-Replace-use-of-struct-ucontext-with-ucontext_t.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-Replace-use-of-struct-ucontext-with-ucontext_t.patch
new file mode 100644
index 0000000..07cb8a3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-Replace-use-of-struct-ucontext-with-ucontext_t.patch
@@ -0,0 +1,242 @@
+From b90c8f3b60bfe5dbed2823620242e9d30b9eb28f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 28 Jun 2017 19:01:18 -0700
+Subject: [PATCH] Replace use of struct ucontext with ucontext_t
+
+glibc 2.26 would not expose struct ucontext anymore
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ .../linux/dump_writer_common/ucontext_reader.cc    | 32 +++++++++++-----------
+ .../linux/dump_writer_common/ucontext_reader.h     | 14 +++++-----
+ src/client/linux/handler/exception_handler.cc      | 10 +++----
+ src/client/linux/handler/exception_handler.h       |  4 +--
+ .../linux/microdump_writer/microdump_writer.cc     |  2 +-
+ .../linux/minidump_writer/minidump_writer.cc       |  2 +-
+ 6 files changed, 32 insertions(+), 32 deletions(-)
+
+diff --git a/src/client/linux/dump_writer_common/ucontext_reader.cc b/src/client/linux/dump_writer_common/ucontext_reader.cc
+index c80724dd..052ce37c 100644
+--- a/src/client/linux/dump_writer_common/ucontext_reader.cc
++++ b/src/client/linux/dump_writer_common/ucontext_reader.cc
+@@ -36,19 +36,19 @@ namespace google_breakpad {
+ 
+ // Minidump defines register structures which are different from the raw
+ // structures which we get from the kernel. These are platform specific
+-// functions to juggle the ucontext and user structures into minidump format.
++// functions to juggle the ucontext_t and user structures into minidump format.
+ 
+ #if defined(__i386__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[REG_ESP];
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[REG_EIP];
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+                                     const struct _libc_fpstate* fp) {
+   const greg_t* regs = uc->uc_mcontext.gregs;
+ 
+@@ -88,15 +88,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+ 
+ #elif defined(__x86_64)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[REG_RSP];
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[REG_RIP];
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+                                     const struct _libc_fpstate* fpregs) {
+   const greg_t* regs = uc->uc_mcontext.gregs;
+ 
+@@ -145,15 +145,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+ 
+ #elif defined(__ARM_EABI__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.arm_sp;
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.arm_pc;
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
+   out->context_flags = MD_CONTEXT_ARM_FULL;
+ 
+   out->iregs[0] = uc->uc_mcontext.arm_r0;
+@@ -184,15 +184,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
+ 
+ #elif defined(__aarch64__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.sp;
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.pc;
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+                                     const struct fpsimd_context* fpregs) {
+   out->context_flags = MD_CONTEXT_ARM64_FULL;
+ 
+@@ -210,15 +210,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+ 
+ #elif defined(__mips__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP];
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.pc;
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
+ #if _MIPS_SIM == _ABI64
+   out->context_flags = MD_CONTEXT_MIPS64_FULL;
+ #elif _MIPS_SIM == _ABIO32
+diff --git a/src/client/linux/dump_writer_common/ucontext_reader.h b/src/client/linux/dump_writer_common/ucontext_reader.h
+index b6e77b4b..2de80b70 100644
+--- a/src/client/linux/dump_writer_common/ucontext_reader.h
++++ b/src/client/linux/dump_writer_common/ucontext_reader.h
+@@ -39,23 +39,23 @@
+ 
+ namespace google_breakpad {
+ 
+-// Wraps platform-dependent implementations of accessors to ucontext structs.
++// Wraps platform-dependent implementations of accessors to ucontext_t structs.
+ struct UContextReader {
+-  static uintptr_t GetStackPointer(const struct ucontext* uc);
++  static uintptr_t GetStackPointer(const ucontext_t* uc);
+ 
+-  static uintptr_t GetInstructionPointer(const struct ucontext* uc);
++  static uintptr_t GetInstructionPointer(const ucontext_t* uc);
+ 
+-  // Juggle a arch-specific ucontext into a minidump format
++  // Juggle a arch-specific ucontext_t into a minidump format
+   //   out: the minidump structure
+   //   info: the collection of register structures.
+ #if defined(__i386__) || defined(__x86_64)
+-  static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
++  static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+                              const struct _libc_fpstate* fp);
+ #elif defined(__aarch64__)
+-  static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
++  static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+                              const struct fpsimd_context* fpregs);
+ #else
+-  static void FillCPUContext(RawContextCPU *out, const ucontext *uc);
++  static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc);
+ #endif
+ };
+ 
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index 586d84e9..05936d28 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/src/client/linux/handler/exception_handler.cc
+@@ -457,9 +457,9 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) {
+   // Fill in all the holes in the struct to make Valgrind happy.
+   memset(&g_crash_context_, 0, sizeof(g_crash_context_));
+   memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t));
+-  memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext));
++  memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t));
+ #if defined(__aarch64__)
+-  struct ucontext* uc_ptr = (struct ucontext*)uc;
++  ucontext_t* uc_ptr = (ucontext_t*)uc;
+   struct fpsimd_context* fp_ptr =
+       (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved;
+   if (fp_ptr->head.magic == FPSIMD_MAGIC) {
+@@ -468,9 +468,9 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) {
+   }
+ #elif !defined(__ARM_EABI__) && !defined(__mips__)
+   // FP state is not part of user ABI on ARM Linux.
+-  // In case of MIPS Linux FP state is already part of struct ucontext
++  // In case of MIPS Linux FP state is already part of ucontext_t
+   // and 'float_state' is not a member of CrashContext.
+-  struct ucontext* uc_ptr = (struct ucontext*)uc;
++  ucontext_t* uc_ptr = (ucontext_t*)uc;
+   if (uc_ptr->uc_mcontext.fpregs) {
+     memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs,
+            sizeof(g_crash_context_.float_state));
+@@ -494,7 +494,7 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) {
+   // ExceptionHandler::HandleSignal().
+   siginfo.si_code = SI_USER;
+   siginfo.si_pid = getpid();
+-  struct ucontext context;
++  ucontext_t context;
+   getcontext(&context);
+   return HandleSignal(sig, &siginfo, &context);
+ }
+diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h
+index daba57e0..25598a29 100644
+--- a/src/client/linux/handler/exception_handler.h
++++ b/src/client/linux/handler/exception_handler.h
+@@ -191,11 +191,11 @@ class ExceptionHandler {
+   struct CrashContext {
+     siginfo_t siginfo;
+     pid_t tid;  // the crashing thread.
+-    struct ucontext context;
++    ucontext_t context;
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+     // #ifdef this out because FP state is not part of user ABI for Linux ARM.
+     // In case of MIPS Linux FP state is already part of struct
+-    // ucontext so 'float_state' is not required.
++    // ucontext_t so 'float_state' is not required.
+     fpstate_t float_state;
+ #endif
+   };
+diff --git a/src/client/linux/microdump_writer/microdump_writer.cc b/src/client/linux/microdump_writer/microdump_writer.cc
+index 3764eec2..80ad5c46 100644
+--- a/src/client/linux/microdump_writer/microdump_writer.cc
++++ b/src/client/linux/microdump_writer/microdump_writer.cc
+@@ -593,7 +593,7 @@ class MicrodumpWriter {
+ 
+   void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
+ 
+-  const struct ucontext* const ucontext_;
++  const ucontext_t* const ucontext_;
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+   const google_breakpad::fpstate_t* const float_state_;
+ #endif
+diff --git a/src/client/linux/minidump_writer/minidump_writer.cc b/src/client/linux/minidump_writer/minidump_writer.cc
+index d11ba6e5..c7161434 100644
+--- a/src/client/linux/minidump_writer/minidump_writer.cc
++++ b/src/client/linux/minidump_writer/minidump_writer.cc
+@@ -1323,7 +1323,7 @@ class MinidumpWriter {
+   const int fd_;  // File descriptor where the minidum should be written.
+   const char* path_;  // Path to the file where the minidum should be written.
+ 
+-  const struct ucontext* const ucontext_;  // also from the signal handler
++  const ucontext_t* const ucontext_;  // also from the signal handler
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+   const google_breakpad::fpstate_t* const float_state_;  // ditto
+ #endif
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch
new file mode 100644
index 0000000..33bae1a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch
@@ -0,0 +1,41 @@
+From ab8dcad25d0ac1f3a88814e78794e5d450de15ac Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 23:12:51 -0700
+Subject: [PATCH 1/5] Turn off sign-compare for musl-libc
+
+Fix
+
+../../../../../../../workspace/sources/breakpad/src/client/linux/crash_generation/crash_generation_server.cc:234:14: error:                 comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare]                                          hdr = CMSG_NXTHDR(&msg, hdr)) {                                                                                                             ^~~~~~~~~~~~~~~~~~~~~~
+/mnt/a/oe/build/tmp/work/cortexa7hf-neon-vfpv4-bec-linux-musleabi/breakpad/1_1.0+git999-r0/recipe-sysroot/usr/include/sys/socket.h:288:44: note:                                                                                                                                  expanded from macro 'CMSG_NXTHDR'                                                                                                       __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                       1 error generated.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/client/linux/crash_generation/crash_generation_server.cc | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc
+index 2596afde..2faeb9e5 100644
+--- a/src/client/linux/crash_generation/crash_generation_server.cc
++++ b/src/client/linux/crash_generation/crash_generation_server.cc
+@@ -230,8 +230,18 @@ CrashGenerationServer::ClientEvent(short revents)
+   // Walk the control payload and extract the file descriptor and validated pid.
+   pid_t crashing_pid = -1;
+   int signal_fd = -1;
++#ifndef __GLIBC__
++  // In musl-libc, CMSG_NXTHDR typecasts char* to cmsghdr* which causes
++  // clang to throw sign-compare warning. This is to suppress the warning
++  // inline.
++  #pragma clang diagnostic push
++  #pragma clang diagnostic ignored "-Wsign-compare"
++#endif
+   for (struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); hdr;
+        hdr = CMSG_NXTHDR(&msg, hdr)) {
++#ifndef __GLIBC__
++  #pragma clang diagnostic pop
++#endif
+     if (hdr->cmsg_level != SOL_SOCKET)
+       continue;
+     if (hdr->cmsg_type == SCM_RIGHTS) {
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch
new file mode 100644
index 0000000..4583d60
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch
@@ -0,0 +1,28 @@
+From 68580cb62f77117be3164c52abae68f75e8e59a1 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sun, 1 Feb 2015 14:26:52 +0100
+Subject: [PATCH 1/3] include <sys/reg.h> to get __WORDSIZE on musl libc
+
+---
+ src/common/linux/elf_core_dump.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: git/src/common/linux/elf_core_dump.h
+===================================================================
+--- git.orig/src/common/linux/elf_core_dump.h
++++ git/src/common/linux/elf_core_dump.h
+@@ -33,10 +33,13 @@
+ #ifndef COMMON_LINUX_ELF_CORE_DUMP_H_
+ #define COMMON_LINUX_ELF_CORE_DUMP_H_
+ 
++#include <config.h>
+ #include <elf.h>
+ #include <link.h>
+ #include <stddef.h>
+-
++#ifdef HAVE_SYS_REG_H
++#include <sys/reg.h>
++#endif
+ #include "common/memory_range.h"
+ 
+ namespace google_breakpad {
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch
new file mode 100644
index 0000000..2b892ad
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch
@@ -0,0 +1,45 @@
+From 5f7333e4f7b7485598bd71aa80967e1a16a7f901 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 22:57:52 -0700
+Subject: [PATCH] lss: Match syscalls to match musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ linux_syscall_support.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+Index: lss/linux_syscall_support.h
+===================================================================
+--- lss.orig/linux_syscall_support.h
++++ lss/linux_syscall_support.h
+@@ -793,6 +793,9 @@ struct kernel_statfs {
+ #define FUTEX_TRYLOCK_PI_PRIVATE  (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
+ #endif
+ 
++#ifndef __NR_fstatat
++#define __NR_fstatat __NR_fstatat64
++#endif
+ 
+ #if defined(__x86_64__)
+ #ifndef ARCH_SET_GS
+@@ -924,6 +927,7 @@ struct kernel_statfs {
+ #ifndef __NR_fallocate
+ #define __NR_fallocate          324
+ #endif
++
+ /* End of i386 definitions                                                   */
+ #elif defined(__ARM_ARCH_3__) || defined(__ARM_EABI__)
+ #ifndef __NR_setresuid
+@@ -1211,6 +1215,12 @@ struct kernel_statfs {
+ #ifndef __NR_fallocate
+ #define __NR_fallocate          285
+ #endif
++#ifndef __NR_pread
++#define __NR_pread __NR_pread64
++#endif
++#ifndef __NR_pwrite
++#define __NR_pwrite __NR_pwrite64
++#endif
+ /* End of x86-64 definitions                                                 */
+ #elif defined(__mips__)
+ #if _MIPS_SIM == _MIPS_SIM_ABI32
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-Avoid-using-basename.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-Avoid-using-basename.patch
new file mode 100644
index 0000000..bc62829
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-Avoid-using-basename.patch
@@ -0,0 +1,29 @@
+From 806964f852773e427fea82a7716d44ce3be4498c Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sun, 1 Feb 2015 14:27:32 +0100
+Subject: [PATCH 2/3] Avoid using basename
+
+---
+ src/common/linux/dump_symbols.cc | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc
+index d029ca14..6ac4a17b 100644
+--- a/src/common/linux/dump_symbols.cc
++++ b/src/common/linux/dump_symbols.cc
+@@ -881,9 +881,9 @@ const char* ElfArchitecture(const typename ElfClass::Ehdr* elf_header) {
+ // last slash, or the whole filename if there are no slashes.
+ string BaseFileName(const string &filename) {
+   // Lots of copies!  basename's behavior is less than ideal.
+-  char* c_filename = strdup(filename.c_str());
+-  string base = basename(c_filename);
+-  free(c_filename);
++  const char *c_filename = filename.c_str();
++  const char *p = strrchr(c_filename, '/');
++  string base = p ? p+1 : c_filename;
+   return base;
+ }
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch
new file mode 100644
index 0000000..6c097cd2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch
@@ -0,0 +1,60 @@
+From 0ba1b3e35e7c743b670bedc3e90001dfb868df10 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sun, 1 Feb 2015 13:45:51 +0100
+Subject: [PATCH 2/6] Use _fpstate instead of _libc_fpstate on linux
+
+glibc defines both. musl libc only the former.
+---
+ src/client/linux/dump_writer_common/ucontext_reader.cc | 4 ++--
+ src/client/linux/dump_writer_common/ucontext_reader.h  | 2 +-
+ src/client/linux/minidump_writer/minidump_writer.h     | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: git/src/client/linux/dump_writer_common/ucontext_reader.cc
+===================================================================
+--- git.orig/src/client/linux/dump_writer_common/ucontext_reader.cc
++++ git/src/client/linux/dump_writer_common/ucontext_reader.cc
+@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstruction
+ }
+ 
+ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+-                                    const struct _libc_fpstate* fp) {
++                                    const struct _fpstate* fp) {
+   const greg_t* regs = uc->uc_mcontext.gregs;
+ 
+   out->context_flags = MD_CONTEXT_X86_FULL |
+@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstruction
+ }
+ 
+ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+-                                    const struct _libc_fpstate* fpregs) {
++                                    const struct _fpstate* fpregs) {
+   const greg_t* regs = uc->uc_mcontext.gregs;
+ 
+   out->context_flags = MD_CONTEXT_AMD64_FULL;
+Index: git/src/client/linux/dump_writer_common/ucontext_reader.h
+===================================================================
+--- git.orig/src/client/linux/dump_writer_common/ucontext_reader.h
++++ git/src/client/linux/dump_writer_common/ucontext_reader.h
+@@ -50,7 +50,7 @@ struct UContextReader {
+   //   info: the collection of register structures.
+ #if defined(__i386__) || defined(__x86_64)
+   static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+-                             const struct _libc_fpstate* fp);
++                             const struct _fpstate* fp);
+ #elif defined(__aarch64__)
+   static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+                              const struct fpsimd_context* fpregs);
+Index: git/src/client/linux/minidump_writer/minidump_writer.h
+===================================================================
+--- git.orig/src/client/linux/minidump_writer/minidump_writer.h
++++ git/src/client/linux/minidump_writer/minidump_writer.h
+@@ -48,7 +48,7 @@ class ExceptionHandler;
+ #if defined(__aarch64__)
+ typedef struct fpsimd_context fpstate_t;
+ #elif !defined(__ARM_EABI__) && !defined(__mips__)
+-typedef struct _libc_fpstate fpstate_t;
++typedef struct _fpstate fpstate_t;
+ #endif
+ 
+ // These entries store a list of memory regions that the client wants included
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch
new file mode 100644
index 0000000..cfd9a9b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch
@@ -0,0 +1,26 @@
+From 15582e19c2545d5ffe8ff07f957d0ed602aeca74 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 23:15:09 -0700
+Subject: [PATCH 2/5] <sys/signal.h> is a nonportable alias for <signal.h>
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/client/linux/handler/exception_handler.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index 05936d28..cca023fd 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/src/client/linux/handler/exception_handler.cc
+@@ -78,7 +78,7 @@
+ #include <sys/wait.h>
+ #include <unistd.h>
+ 
+-#include <sys/signal.h>
++#include <signal.h>
+ #include <sys/ucontext.h>
+ #include <sys/user.h>
+ #include <ucontext.h>
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch
new file mode 100644
index 0000000..2593ea9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch
@@ -0,0 +1,88 @@
+From 569af712da94637091080943f6a0d69ccb35864e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 23:24:08 -0700
+Subject: [PATCH 3/5] Dont include stab.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/common/stabs_reader.cc          |  1 -
+ src/common/stabs_reader.h           | 12 +++++++++++-
+ src/common/stabs_reader_unittest.cc |  1 -
+ 3 files changed, 11 insertions(+), 3 deletions(-)
+
+Index: git/src/common/stabs_reader.cc
+===================================================================
+--- git.orig/src/common/stabs_reader.cc
++++ git/src/common/stabs_reader.cc
+@@ -34,7 +34,9 @@
+ #include "common/stabs_reader.h"
+ 
+ #include <assert.h>
++#ifdef HAVE_STAB_H
+ #include <stab.h>
++#endif
+ #include <string.h>
+ 
+ #include <string>
+Index: git/src/common/stabs_reader.h
+===================================================================
+--- git.orig/src/common/stabs_reader.h
++++ git/src/common/stabs_reader.h
+@@ -58,6 +58,30 @@
+ #elif defined(HAVE_A_OUT_H)
+ #include <a.out.h>
+ #endif
++// Definitions from <stab.h> and <a.out.h> for systems which
++// do not have them
++#ifndef HAVE_A_OUT_H
++#undef N_UNDF
++#define N_UNDF 0x0
++#ifndef N_FUN
++#define N_FUN 0x24
++#endif
++#ifndef N_SLINE
++#define N_SLINE 0x44
++#endif
++#ifndef N_SO
++#define N_SO 0x64
++#endif
++#ifndef N_LSYM
++#define N_LSYM 0x80
++#endif
++#ifndef N_BINCL
++#define N_BINCL 0x82
++#endif
++#ifndef N_SOL
++#define N_SOL 0x84
++#endif
++#endif
+ 
+ #include <string>
+ #include <vector>
+Index: git/src/common/stabs_reader_unittest.cc
+===================================================================
+--- git.orig/src/common/stabs_reader_unittest.cc
++++ git/src/common/stabs_reader_unittest.cc
+@@ -33,7 +33,9 @@
+ 
+ #include <assert.h>
+ #include <errno.h>
++#ifdef HAVE_STAB_H
+ #include <stab.h>
++#endif
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac
++++ git/configure.ac
+@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32,
+ AC_HEADER_STDC
+ AC_SYS_LARGEFILE
+ AX_PTHREAD
+-AC_CHECK_HEADERS([a.out.h sys/random.h])
++AC_CHECK_HEADERS([a.out.h stab.h sys/random.h])
+ AC_CHECK_FUNCS([arc4random getrandom])
+ 
+ AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch
new file mode 100644
index 0000000..8510047
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch
@@ -0,0 +1,35 @@
+From 7aa266545dabf9934ccd44d4fc836040497159be Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sun, 1 Feb 2015 13:41:08 +0100
+Subject: [PATCH 3/3] Fix conflict between musl libc <dirent.h> and lss
+
+Include <dirent.h> late to avoid the macro getdents64 in musl
+libc's <dirent.h> to conflict with linux_sycall_support.h.
+---
+ src/client/linux/crash_generation/crash_generation_server.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc
+index 26c50a5c..2596afde 100644
+--- a/src/client/linux/crash_generation/crash_generation_server.cc
++++ b/src/client/linux/crash_generation/crash_generation_server.cc
+@@ -28,7 +28,6 @@
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ 
+ #include <assert.h>
+-#include <dirent.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <poll.h>
+@@ -49,6 +48,8 @@
+ #include "common/linux/guid_creator.h"
+ #include "common/linux/safe_readlink.h"
+ 
++#include <dirent.h>
++
+ static const char kCommandQuit = 'x';
+ 
+ namespace google_breakpad {
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch
new file mode 100644
index 0000000..525a155
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch
@@ -0,0 +1,43 @@
+From 680f9590d19a6e35c7c5587e3f4d8194aab0fcd2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 23:28:36 -0700
+Subject: [PATCH 4/5] elf_reader.cc: include <sys/reg.h> to get __WORDSIZE on
+ musl libc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/common/dwarf/elf_reader.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: git/src/common/dwarf/elf_reader.cc
+===================================================================
+--- git.orig/src/common/dwarf/elf_reader.cc
++++ git/src/common/dwarf/elf_reader.cc
+@@ -29,10 +29,13 @@
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE  // needed for pread()
+ #endif
+-
++#include <config.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#ifdef HAVE_SYS_REG_H
++#include <sys/reg.h>
++#endif
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <string.h>
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac
++++ git/configure.ac
+@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32,
+ AC_HEADER_STDC
+ AC_SYS_LARGEFILE
+ AX_PTHREAD
+-AC_CHECK_HEADERS([a.out.h stab.h sys/random.h])
++AC_CHECK_HEADERS([a.out.h stab.h sys/random.h sys/reg.h])
+ AC_CHECK_FUNCS([arc4random getrandom])
+ 
+ AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch
new file mode 100644
index 0000000..80de8c6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch
@@ -0,0 +1,199 @@
+From fa7a3b7312307acad0045549d5f306e7fd117804 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sun, 1 Feb 2015 14:34:44 +0100
+Subject: [PATCH 5/6] Import necessary definitions from stab.h
+
+---
+ configure.ac                        |   1 -
+ src/common/android/include/stab.h   | 100 ------------------------------------
+ src/common/common.gyp               |   1 -
+ src/common/stabs_reader.cc          |   1 -
+ src/common/stabs_reader.h           |  13 +++--
+ src/common/stabs_reader_unittest.cc |   1 -
+ 6 files changed, 10 insertions(+), 107 deletions(-)
+ delete mode 100644 src/common/android/include/stab.h
+
+diff --git a/configure.ac b/configure.ac
+index 2223920..0e55cd9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -73,7 +73,6 @@ AC_HEADER_STDC
+ AC_SYS_LARGEFILE
+ m4_include(m4/ax_pthread.m4)
+ AX_PTHREAD
+-AC_CHECK_HEADERS([a.out.h])
+ 
+ # Only build Linux client libs when compiling for Linux
+ case $host in
+diff --git a/src/common/android/include/stab.h b/src/common/android/include/stab.h
+deleted file mode 100644
+index cd92902..0000000
+--- a/src/common/android/include/stab.h
++++ /dev/null
+@@ -1,100 +0,0 @@
+-// Copyright (c) 2012, Google Inc.
+-// All rights reserved.
+-//
+-// Redistribution and use in source and binary forms, with or without
+-// modification, are permitted provided that the following conditions are
+-// met:
+-//
+-//     * Redistributions of source code must retain the above copyright
+-// notice, this list of conditions and the following disclaimer.
+-//     * Redistributions in binary form must reproduce the above
+-// copyright notice, this list of conditions and the following disclaimer
+-// in the documentation and/or other materials provided with the
+-// distribution.
+-//     * Neither the name of Google Inc. nor the names of its
+-// contributors may be used to endorse or promote products derived from
+-// this software without specific prior written permission.
+-//
+-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-
+-#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
+-#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
+-
+-#include <sys/cdefs.h>
+-
+-#ifdef __BIONIC_HAVE_STAB_H
+-#include <stab.h>
+-#else
+-
+-#ifdef __cplusplus
+-extern "C" {
+-#endif  // __cplusplus
+-
+-#define _STAB_CODE_LIST       \
+-  _STAB_CODE_DEF(UNDF,0x00)   \
+-  _STAB_CODE_DEF(GSYM,0x20)   \
+-  _STAB_CODE_DEF(FNAME,0x22)  \
+-  _STAB_CODE_DEF(FUN,0x24)    \
+-  _STAB_CODE_DEF(STSYM,0x26)  \
+-  _STAB_CODE_DEF(LCSYM,0x28)  \
+-  _STAB_CODE_DEF(MAIN,0x2a)   \
+-  _STAB_CODE_DEF(PC,0x30)     \
+-  _STAB_CODE_DEF(NSYMS,0x32)  \
+-  _STAB_CODE_DEF(NOMAP,0x34)  \
+-  _STAB_CODE_DEF(OBJ,0x38)    \
+-  _STAB_CODE_DEF(OPT,0x3c)    \
+-  _STAB_CODE_DEF(RSYM,0x40)   \
+-  _STAB_CODE_DEF(M2C,0x42)    \
+-  _STAB_CODE_DEF(SLINE,0x44)  \
+-  _STAB_CODE_DEF(DSLINE,0x46) \
+-  _STAB_CODE_DEF(BSLINE,0x48) \
+-  _STAB_CODE_DEF(BROWS,0x48)  \
+-  _STAB_CODE_DEF(DEFD,0x4a)   \
+-  _STAB_CODE_DEF(EHDECL,0x50) \
+-  _STAB_CODE_DEF(MOD2,0x50)   \
+-  _STAB_CODE_DEF(CATCH,0x54)  \
+-  _STAB_CODE_DEF(SSYM,0x60)   \
+-  _STAB_CODE_DEF(SO,0x64)     \
+-  _STAB_CODE_DEF(LSYM,0x80)   \
+-  _STAB_CODE_DEF(BINCL,0x82)  \
+-  _STAB_CODE_DEF(SOL,0x84)    \
+-  _STAB_CODE_DEF(PSYM,0xa0)   \
+-  _STAB_CODE_DEF(EINCL,0xa2)  \
+-  _STAB_CODE_DEF(ENTRY,0xa4)  \
+-  _STAB_CODE_DEF(LBRAC,0xc0)  \
+-  _STAB_CODE_DEF(EXCL,0xc2)   \
+-  _STAB_CODE_DEF(SCOPE,0xc4)  \
+-  _STAB_CODE_DEF(RBRAC,0xe0)  \
+-  _STAB_CODE_DEF(BCOMM,0xe2)  \
+-  _STAB_CODE_DEF(ECOMM,0xe4)  \
+-  _STAB_CODE_DEF(ECOML,0xe8)  \
+-  _STAB_CODE_DEF(NBTEXT,0xf0) \
+-  _STAB_CODE_DEF(NBDATA,0xf2) \
+-  _STAB_CODE_DEF(NBBSS,0xf4)  \
+-  _STAB_CODE_DEF(NBSTS,0xf6)  \
+-  _STAB_CODE_DEF(NBLCS,0xf8)  \
+-  _STAB_CODE_DEF(LENG,0xfe)
+-
+-enum __stab_debug_code {
+-#define _STAB_CODE_DEF(x,y)  N_##x = y,
+-_STAB_CODE_LIST
+-#undef _STAB_CODE_DEF
+-};
+-
+-#ifdef __cplusplus
+-}  // extern "C"
+-#endif  // __cplusplus
+-
+-#endif  // __BIONIC_HAVE_STAB_H
+-
+-#endif  // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
+diff --git a/src/common/common.gyp b/src/common/common.gyp
+index f01ede5..c49ff85 100644
+--- a/src/common/common.gyp
++++ b/src/common/common.gyp
+@@ -46,7 +46,6 @@
+         'android/include/elf.h',
+         'android/include/link.h',
+         'android/include/sgidefs.h',
+-        'android/include/stab.h',
+         'android/include/sys/procfs.h',
+         'android/include/sys/signal.h',
+         'android/include/sys/user.h',
+diff --git a/src/common/stabs_reader.cc b/src/common/stabs_reader.cc
+index 6019fc7..9562caa 100644
+--- a/src/common/stabs_reader.cc
++++ b/src/common/stabs_reader.cc
+@@ -34,7 +34,6 @@
+ #include "common/stabs_reader.h"
+ 
+ #include <assert.h>
+-#include <stab.h>
+ #include <string.h>
+ 
+ #include <string>
+diff --git a/src/common/stabs_reader.h b/src/common/stabs_reader.h
+index d89afc0..591f007 100644
+--- a/src/common/stabs_reader.h
++++ b/src/common/stabs_reader.h
+@@ -53,12 +53,19 @@
+ #include <config.h>
+ #endif
+ 
+-#ifdef HAVE_A_OUT_H
+-#include <a.out.h>
+-#endif
+ #ifdef HAVE_MACH_O_NLIST_H
+ #include <mach-o/nlist.h>
+ #endif
++// Definitions from <stab.h> and <a.out.h> for systems which
++// do not have them
++#undef N_UNDF
++#define N_UNDF 0x0
++#define N_FUN 0x24
++#define N_SLINE 0x44
++#define N_SO 0x64
++#define N_LSYM 0x80
++#define N_BINCL 0x82
++#define N_SOL 0x84
+ 
+ #include <string>
+ #include <vector>
+diff --git a/src/common/stabs_reader_unittest.cc b/src/common/stabs_reader_unittest.cc
+index a84da1c..854ac42 100644
+--- a/src/common/stabs_reader_unittest.cc
++++ b/src/common/stabs_reader_unittest.cc
+@@ -33,7 +33,6 @@
+ 
+ #include <assert.h>
+ #include <errno.h>
+-#include <stab.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <string.h>
+-- 
+2.0.5
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch
new file mode 100644
index 0000000..852c1ed
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch
@@ -0,0 +1,38 @@
+From bbf2b5ed5d93b227df8aea5726727b48e29f6790 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 23:35:40 -0700
+Subject: [PATCH 5/5] md2core: Replace basename()
+
+musl does not provide it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/tools/linux/md2core/minidump-2-core.cc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc
+index 6a9e28eb..52b81c22 100644
+--- a/src/tools/linux/md2core/minidump-2-core.cc
++++ b/src/tools/linux/md2core/minidump-2-core.cc
+@@ -107,6 +107,9 @@ struct Options {
+ 
+ static void
+ Usage(int argc, const char* argv[]) {
++  const char *c_filename = argv[0];;
++  const char *p = strrchr(c_filename, '/');
++  const char *base = p ? p+1 : c_filename;
+   fprintf(stderr,
+           "Usage: %s [options] <minidump file>\n"
+           "\n"
+@@ -133,7 +136,7 @@ Usage(int argc, const char* argv[]) {
+           "             lookups to be done in this directory rather than the filesystem\n"
+           "             layout as it exists in the crashing image.  This path should end\n"
+           "             with a slash if it's a directory.  e.g. /var/lib/breakpad/\n"
+-          "", basename(argv[0]));
++          "", base);
+ }
+ 
+ static void
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch
new file mode 100644
index 0000000..42e073b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch
@@ -0,0 +1,77 @@
+map the mcontext_t structure for musl
+
+Upstream-Status: Inappropriate[need to consider Android]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: git/src/client/linux/dump_writer_common/thread_info.cc
+===================================================================
+--- git.orig/src/client/linux/dump_writer_common/thread_info.cc
++++ git/src/client/linux/dump_writer_common/thread_info.cc
+@@ -229,7 +229,6 @@ void ThreadInfo::FillCPUContext(RawConte
+ }
+ 
+ #elif defined(__mips__)
+-
+ uintptr_t ThreadInfo::GetInstructionPointer() const {
+   return mcontext.pc;
+ }
+@@ -263,8 +262,11 @@ void ThreadInfo::FillCPUContext(RawConte
+   out->cause = 0; // Not stored in mcontext
+ 
+   for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i)
++#ifdef __GLIBC__
+     out->float_save.regs[i] = mcontext.fpregs.fp_r.fp_fregs[i]._fp_fregs;
+-
++#else
++    out->float_save.regs[i] = mcontext.fpregs[i];
++#endif
+   out->float_save.fpcsr = mcontext.fpc_csr;
+ #if _MIPS_SIM == _ABIO32
+   out->float_save.fir = mcontext.fpc_eir;
+Index: git/src/client/linux/dump_writer_common/ucontext_reader.cc
+===================================================================
+--- git.orig/src/client/linux/dump_writer_common/ucontext_reader.cc
++++ git/src/client/linux/dump_writer_common/ucontext_reader.cc
+@@ -247,8 +247,11 @@ void UContextReader::FillCPUContext(RawC
+   out->cause = 0;  // Not reported in signal context.
+ 
+   for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i)
++#ifdef __GLIBC__
+     out->float_save.regs[i] = uc->uc_mcontext.fpregs.fp_r.fp_dregs[i];
+-
++#else
++    out->float_save.regs[i] = uc->uc_mcontext.fpregs[i];
++#endif
+   out->float_save.fpcsr = uc->uc_mcontext.fpc_csr;
+ #if _MIPS_SIM == _ABIO32
+   out->float_save.fir = uc->uc_mcontext.fpc_eir;  // Unused.
+Index: git/src/client/linux/minidump_writer/linux_core_dumper.cc
+===================================================================
+--- git.orig/src/client/linux/minidump_writer/linux_core_dumper.cc
++++ git/src/client/linux/minidump_writer/linux_core_dumper.cc
+@@ -196,7 +196,7 @@ bool LinuxCoreDumper::EnumerateThreads()
+         info.tgid = status->pr_pgrp;
+         info.ppid = status->pr_ppid;
+ #if defined(__mips__)
+-#if defined(__ANDROID__)
++#if defined(__ANDROID__) || !defined(__GLIBC__)
+         for (int i = EF_R0; i <= EF_R31; i++)
+           info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
+ #else  // __ANDROID__
+Index: git/src/tools/linux/md2core/minidump-2-core.cc
+===================================================================
+--- git.orig/src/tools/linux/md2core/minidump-2-core.cc
++++ git/src/tools/linux/md2core/minidump-2-core.cc
+@@ -516,8 +516,12 @@ ParseThreadRegisters(CrashedProcess::Thr
+   thread->mcontext.lo3 = rawregs->lo[2];
+ 
+   for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) {
++#ifdef __GLIBC__
+     thread->mcontext.fpregs.fp_r.fp_fregs[i]._fp_fregs =
+         rawregs->float_save.regs[i];
++#else
++    thread->mcontext.fpregs[i] = rawregs->float_save.regs[i];
++#endif
+   }
+ 
+   thread->mcontext.fpc_csr = rawregs->float_save.fpcsr;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch
new file mode 100644
index 0000000..19bb560
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch
@@ -0,0 +1,27 @@
+Index: lss/linux_syscall_support.h
+===================================================================
+--- lss.orig/linux_syscall_support.h
++++ lss/linux_syscall_support.h
+@@ -118,21 +118,13 @@ extern "C" {
+ #include <endian.h>
+ 
+ #ifdef __mips__
+-/* Include definitions of the ABI currently in use.                          */
+-#ifdef __ANDROID__
+-/* Android doesn't have sgidefs.h, but does have asm/sgidefs.h,
+- * which has the definitions we need.
+- */
+ #include <asm/sgidefs.h>
+-#else
+-#include <sgidefs.h>
+-#endif
+ #endif
+ #endif
+ 
+ /* The Android NDK's <sys/stat.h> #defines these macros as aliases
+  * to their non-64 counterparts. To avoid naming conflict, remove them. */
+-#ifdef __ANDROID__
++#if defined(__ANDROID__) || (defined(__linux__) && !defined(__glibc__))
+   /* These are restored by the corresponding #pragma pop_macro near
+    * the end of this file. */
+ # pragma push_macro("stat64")
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
index 36c2b63..5f6d82c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
@@ -17,24 +17,37 @@
 
 PV = "1.0+git${SRCPV}"
 
-SRCREV_FORMAT = "breakpad_glog_gmock_gtest_protobuf_lss"
+SRCREV_FORMAT = "breakpad_gtest_protobuf_lss_gyp"
 
-SRCREV_breakpad = "2f6cb866d615d6240a18c7535c994c6bb93b1ba5"
-SRCREV_glog = "d8cb47f77d1c31779f3ff890e1a5748483778d6a"
-SRCREV_gmock = "f7d03d2734759ee12b57d2dbcb695607d89e8e05"
+SRCREV_breakpad = "dea867e76f24e4a68395684b9d1cf24bcef82f20"
 SRCREV_gtest = "ec44c6c1675c25b9827aacd08c02433cccde7780"
 SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac"
-SRCREV_lss = "1549d20f6d3e7d66bb4e687c0ab9da42c2bff2ac"
+SRCREV_lss = "a91633d172407f6c83dd69af11510b37afebb7f9"
+SRCREV_gyp = "324dd166b7c0b39d513026fa52d6280ac6d56770"
 
 SRC_URI = "git://github.com/google/breakpad;name=breakpad \
-           git://github.com/google/glog.git;destsuffix=git/src/third_party/glog;name=glog \
-           git://github.com/google/googlemock.git;destsuffix=git/src/testing;name=gmock \
            git://github.com/google/googletest.git;destsuffix=git/src/testing/gtest;name=gtest \
            git://github.com/google/protobuf.git;destsuffix=git/src/third_party/protobuf/protobuf;name=protobuf \
            git://chromium.googlesource.com/linux-syscall-support;protocol=https;destsuffix=git/src/third_party/lss;name=lss \
+           git://chromium.googlesource.com/external/gyp;protocol=https;destsuffix=git/src/tools/gyp;name=gyp \
+           file://0001-Replace-use-of-struct-ucontext-with-ucontext_t.patch \
+           file://0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch \
+           file://0002-Avoid-using-basename.patch \
+           file://0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch \
+           file://0001-Turn-off-sign-compare-for-musl-libc.patch \
+           file://0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch \
+           file://0003-Dont-include-stab.h.patch \
+           file://0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch \
+           file://0005-md2core-Replace-basename.patch \
+           file://0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch \
+           file://mcontext.patch \
+           file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \
+           file://mips_asm_sgidefs.patch;patchdir=src/third_party/lss \
 "
 S = "${WORKDIR}/git"
 
+CXXFLAGS += "-D_GNU_SOURCE"
+
 COMPATIBLE_MACHINE_powerpc = "(!.*ppc).*"
 
 do_install_append() {
@@ -67,7 +80,7 @@
         install -m 0644 ${S}/src/google_breakpad/common/minidump_format.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_format.h
         install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_amd64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_amd64.h
         install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_arm.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_arm.h
-        install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_arm.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_arm64.h
+        install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_arm64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_arm64.h
         install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_mips.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_mips.h
         install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_ppc64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_ppc64.h
         install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_ppc.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_ppc.h
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_0.6.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_0.6.1.bb
new file mode 100644
index 0000000..ffbe73f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_0.6.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Cap'n Proto serialization/RPC system"
+DESCRIPTION = "Cap’n Proto is an insanely fast data interchange format and capability-based RPC system. "
+HOMEPAGE = "https://github.com/sandstorm-io/capnproto"
+SECTION = "console/tools"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=0a5b5b742baf10cc1c158579eba7fb1d"
+
+SRCREV = "c949a18da5f041a36cc218c5c4b79c7705999b4f"
+SRC_URI = "git://github.com/sandstorm-io/capnproto.git;branch=release-${PV}"
+
+EXTRA_OECMAKE += "\
+    -DBUILD_TESTING=OFF \
+"
+
+inherit cmake
+
+S = "${WORKDIR}/git/c++"
+
+PACKAGE_BEFORE_PN = "${PN}-compiler"
+RDEPENDS_${PN}-dev += "${PN}-compiler"
+
+FILES_${PN}-dev += "${libdir}/cmake"
+FILES_${PN}-compiler = "${bindir}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cloud9/cloud9/0001-ide-use-node-as-interpreter-for-sketches-instead-of-.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/cloud9/cloud9/0001-ide-use-node-as-interpreter-for-sketches-instead-of-.patch
deleted file mode 100644
index b32311a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cloud9/cloud9/0001-ide-use-node-as-interpreter-for-sketches-instead-of-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ac1953d04f3f26d6aa5d8f53a9397d3ba0e96fa3 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@circuitco.com>
-Date: Fri, 11 May 2012 15:23:02 +0000
-Subject: [PATCH] ide: use 'node' as interpreter for sketches instead of
- argv[0]
-
-This enables running scripts with node 0.6.x instead of 0.4.x
-
-Signed-off-by: root <root@beaglebone.(none)>
----
- server/cloud9/ide.js |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/server/cloud9/ide.js b/server/cloud9/ide.js
-index ce782f5..6c4e0f7 100644
---- a/server/cloud9/ide.js
-+++ b/server/cloud9/ide.js
-@@ -53,7 +53,7 @@ var Ide = module.exports = function(options, httpServer, exts, socket) {
-     };
- 
-     this.$users = {};
--    this.nodeCmd = process.argv[0];
-+    this.nodeCmd = "node";
- 
-     var davOptions = {
-         node: this.options.mountDir,
--- 
-1.7.7
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb
deleted file mode 100644
index c6d7890..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb
+++ /dev/null
@@ -1,118 +0,0 @@
-SUMMARY = "Meet Cloud9, development-as-a-service for Javascripters and other developers"
-HOMEPAGE = "http://c9.io"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4784c3bcff601fd8f9515f52a11e7018"
-
-PR = "r5"
-
-# Nodejs-native for node-waf, nodejs4-native for the headers
-DEPENDS = "libxml2 nodejs-native nodejs4-native"
-
-PNBLACKLIST[cloud9] ?= "Not comatible with current nodejs 0.12, but upstream is working on it for v3 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
-inherit systemd
-
-SRC_URI = "git://github.com/ajaxorg/cloud9.git;name=cloud9ide \
-           git://github.com/ajaxorg/o3;destsuffix=o3;name=o3 \
-           git://github.com/ajaxorg/ace.git;destsuffix=git/support/ace;name=ace \
-           git://github.com/ajaxorg/ace.wiki.git;destsuffix=git/support/ace/doc/wiki;name=acewiki \
-           git://github.com/ajaxorg/apf.git;destsuffix=git/support/apf;name=apf \
-           git://github.com/ajaxorg/async.js.git;destsuffix=git/support/asyncjs;name=asyncjs \
-           git://github.com/ajaxorg/connect.git;destsuffix=git/support/connect;name=connect;branch=ajaxorg \
-           git://github.com/jashkenas/coffee-script.git;destsuffix=git/support/connect/support/coffee-script;name=coffee-script \
-           git://github.com/visionmedia/expresso.git;destsuffix=git/support/connect/support/expresso;name=expresso \
-           git://github.com/visionmedia/node-jscoverage.git;destsuffix=git/support/connect/support/expresso/deps/jscoverage;name=jscoverage \
-           git://github.com/cloudhead/less.js.git;destsuffix=git/support/connect/support/less;name=less \
-           git://github.com/matehat/sass.js.git;destsuffix=git/support/connect/support/sass;name=sass \
-           git://github.com/ajaxorg/jsDAV.git;destsuffix=git/support/jsdav;name=jsdav \
-           git://github.com/fjakobs/async.js.git;destsuffix=git/support/jsdav/support/async.js;name=async-js \
-           git://github.com/felixge/node-formidable.git;destsuffix=git/support/jsdav/support/formidable;name=formidable \
-           git://github.com/ajaxorg/jsftp.git;destsuffix=git/support/jsdav/support/jsftp;name=jsftp \
-           git://github.com/Gozala/streamer.git;destsuffix=git/support/jsdav/support/jsftp/support/streamer;name=streamer \
-           git://github.com/ajaxorg/node-sftp.git;destsuffix=git/support/jsdav/support/node-sftp;name=sftp \
-           git://github.com/ajaxorg/lib-v8debug.git;destsuffix=git/support/lib-v8debug;name=lib-v8debug \
-           git://github.com/ajaxorg/socket.io.git;destsuffix=git/support/socket.io;name=socketio;branch=cadorn-upstream \
-           git://github.com/LearnBoost/socket.io-client.git;destsuffix=git/support/socket.io-client;name=socketio-client \
-           git://github.com/ajaxorg/treehugger.git;destsuffix=git/support/treehugger;name=treehugger \
-           git://github.com/ajaxorg/UglifyJS.git;destsuffix=git/support/uglify-js;name=uglify-js \
-           file://index.js \
-           file://cloud9-avahi.service \
-           file://cloud9.service \
-           file://0001-ide-use-node-as-interpreter-for-sketches-instead-of-.patch \
-"
-
-SRCREV_cloud9ide = "c4e2574896a22bb749f0500b25f41c888d346bed"
-SRCREV_o3 = "d66d4e3252e505f44ada6804c8cab39915ce8afd"
-SRCREV_ace = "0fc5392cbe46fb134052c3065a238ad8e3b31cfd"
-SRCREV_acewiki = "d2a65d0addc2e5ab922bbff9cb6022a4652b4f13"
-SRCREV_apf = "2560b762b2b0e5a8b46f8a4062f927a9a9d239f4"
-SRCREV_asyncjs = "d36ead408e2959b1e99572114ef3a1b6a48c1072"
-SRCREV_connect = "6bec95b51f2286b942bc7f340d62d816bcdc13d4"
-SRCREV_coffee-script = "a53c104db16d3ac9d13cf9f16834edec250b9749"
-SRCREV_expresso = "7f10ab7fa655299b4e2f519065b0495e6ac34ef2"
-SRCREV_jscoverage = "0d4608a6b4275b020ba665389aa75897d5d4a584"
-SRCREV_less = "a2807288008587b95c6c2f8ba5cac16f1bcab98f"
-SRCREV_sass = "4dfd4c699e7a8baf226215ab044854c4507f4420"
-SRCREV_jsdav = "f04ebf3d012cc8aeabfcfb2b8fab8966d52929e9"
-SRCREV_async-js = "92fb710a70efd3cdc2376ebfba71a7fb3a4f1651"
-SRCREV_formidable = "a37292d4b7d6d76a38909ed670334c9068d40871"
-SRCREV_jsftp = "e3f10c8927347c170cdd0150ef38e18272acf942"
-SRCREV_streamer = "1a7f75d4065819171ac91a09974199b932dbe17d"
-SRCREV_sftp = "a0539345134970d7535a19cb2608e3d1bc119d71"
-SRCREV_lib-v8debug = "7c11897f4bc77c7275c2b6dff5becc72ac018662"
-SRCREV_socketio = "735d5239b325df2ba67d2b9bb4ec32442283bc06"
-SRCREV_socketio-client = "4375ef1344ecb8ad75a3848a00af6b391822f86b"
-SRCREV_treehugger = "436d0d6dd0ce43782e6be08ad12c356730626996"
-SRCREV_uglify-js = "941c845c4a01e4e47a158458fe846eb36d0828ad"
-
-SRCREV_FORMAT = "cloud9ide"
-
-S = "${WORKDIR}/git"
-
-do_configure () {
-    cd ${WORKDIR}/o3
-    node-waf -vv configure
-}
-
-EXTRA_CXXFLAGS = "-Idefault/include -I../include -Idefault/hosts -I../hosts -Idefault/modules -I../modules -Idefault/deps -I../deps -I${STAGING_DIR_NATIVE}/usr/include/node4 -fPIC -DPIC"
-
-do_compile () {
-    cd ${WORKDIR}/o3
-    node4 tools/gluegen.js
-    cd hosts
-    ${CXX} ${TARGET_CXXFLAGS} ${EXTRA_CXXFLAGS} -c -o sh_node.o node-o3/sh_node.cc
-    ${CXX} ${TARGET_CXXFLAGS} ${EXTRA_CXXFLAGS} -c -o sh_node_libs.o node-o3/sh_node_libs.cc
-    cd ..
-    ${CXX} ${TARGET_LDFLAGS} hosts/sh_node.o hosts/sh_node_libs.o -o o3.node -shared -Wl,-Bdynamic -lxml2
-}
-
-do_install () {
-    install -m 0755 -d ${D}${datadir}/cloud9 ${D}${bindir} ${D}/var/lib/cloud9
-    rsync -r --exclude=".*" ${S}/* ${D}${datadir}/cloud9
-
-    touch ${D}${bindir}/cloud9
-    echo "#!/bin/sh" > ${D}${bindir}/cloud9
-    echo "node4 ${datadir}/cloud9/bin/cloud9.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000" >> ${D}${bindir}/cloud9
-    chmod 0755 ${D}${bindir}/cloud9
-
-    install -m 0755 -d ${D}${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml
-    install -m 0644 ${WORKDIR}/index.js ${D}${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/index.js
-    install -m 0644 ${WORKDIR}/o3/modules/o3.js ${D}${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/o3.js
-    install -m 0755 ${WORKDIR}/o3/o3.node ${D}${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/o3.node
-
-     install -m 0755 -d ${D}${sysconfdir}/avahi/services/
-     install -m 0644 ${WORKDIR}/cloud9-avahi.service ${D}${sysconfdir}/avahi/services/
-
-     install -d ${D}${systemd_unitdir}/system
-     install -m 0644 ${WORKDIR}/cloud9.service ${D}${systemd_unitdir}/system
-}
-
-FILES_${PN}-dbg += "${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/.debug \
-                    ${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/.debug \
-"
-
-RDEPENDS_${PN} = "nodejs4 nodejs gzip"
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "cloud9.service"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb
index 62b2796..8472aca 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Install a Debian system into a subdirectory"
 HOMEPAGE = "https://wiki.debian.org/Debootstrap"
 SECTION = "devel"
-LICENSE = "debootstrap-custom-license"
+LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://debian/copyright;md5=1e68ced6e1689d4cd9dac75ff5225608"
 
 inherit pkgconfig
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/Stop-using-relative-path-for-scsilib.c-link.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/Stop-using-relative-path-for-scsilib.c-link.patch
deleted file mode 100644
index ccb9a02..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/Stop-using-relative-path-for-scsilib.c-link.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 4cf7e16fe9b773e2e7763d4b773854eefe2aa9ab Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Tue, 12 Jan 2016 09:59:55 -0200
-Subject: [PATCH] Stop using relative path for scsilib.c link
-Organization: O.S. Systems Software LTDA.
-
-Upstream-Status: Pending
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
- Makefile.linux | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.linux b/Makefile.linux
-index 78333ff..e210564 100644
---- a/Makefile.linux
-+++ b/Makefile.linux
-@@ -129,7 +129,7 @@ scsilib.c:
- 	    echo "Please specify OS={aix,linux,hpux,solaris,windows}"; \
- 	    exit 1; \
- 	fi; \
--	ln -sf ../scsilib-$(OS).c scsilib.c
-+	ln -sf scsilib-$(OS).c scsilib.c
- 
- print:;
- 		@$(PRINTER) $(PRINTFLAGS) $(ALL_CFILES)
--- 
-2.1.4
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/Use-tcsh-shell.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/Use-tcsh-shell.patch
deleted file mode 100644
index 0c00fdf..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/Use-tcsh-shell.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From e3c6eb8776f659eb9e6eeccf90d785eff18ecf74 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Mon, 15 Feb 2016 18:00:05 -0200
-Subject: [PATCH] Use 'tcsh' shell
-Organization: O.S. Systems Software LTDA.
-
-Upstream-Status: Pending
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
- Scripts/dta | 2 +-
- Scripts/dtc | 2 +-
- Scripts/dtf | 2 +-
- Scripts/dtr | 2 +-
- Scripts/dts | 2 +-
- Scripts/dtt | 2 +-
- Scripts/dtw | 2 +-
- 7 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/Scripts/dta b/Scripts/dta
-index ebc7072..4f90247 100755
---- a/Scripts/dta
-+++ b/Scripts/dta
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/bin/tcsh
- #
- #	Script file to test asynchronous communication lines.
- #
-diff --git a/Scripts/dtc b/Scripts/dtc
-index da69c2e..89d48c2 100755
---- a/Scripts/dtc
-+++ b/Scripts/dtc
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/bin/tcsh
- #	%Z%%M% %I% %E%
- #
- #	Date:	August 7, 1990
-diff --git a/Scripts/dtf b/Scripts/dtf
-index 9f8cd87..321d261 100755
---- a/Scripts/dtf
-+++ b/Scripts/dtf
-@@ -1,4 +1,4 @@
--#! /bin/csh
-+#! /bin/tcsh
- #
- #	Script file to gather floppy disk performance data.
- #
-diff --git a/Scripts/dtr b/Scripts/dtr
-index ddb7947..1ff5a0b 100755
---- a/Scripts/dtr
-+++ b/Scripts/dtr
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/bin/tcsh
- #	%Z%%M% %I% %E%
- #
- #	Date:	August 21, 1990
-diff --git a/Scripts/dts b/Scripts/dts
-index 6b8a167..42d2312 100755
---- a/Scripts/dts
-+++ b/Scripts/dts
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/bin/tcsh
- #	%Z%%M% %I% %E%
- #
- #	Date:	August 7, 1990
-diff --git a/Scripts/dtt b/Scripts/dtt
-index 36cc6bd..df19d2f 100755
---- a/Scripts/dtt
-+++ b/Scripts/dtt
-@@ -1,4 +1,4 @@
--#! /bin/csh
-+#! /bin/tcsh
- #	%Z%%M% %I% %E%
- #
- #	Date:	August 7, 1990
-diff --git a/Scripts/dtw b/Scripts/dtw
-index 8a4ac39..c58e304 100755
---- a/Scripts/dtw
-+++ b/Scripts/dtw
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/bin/tcsh
- #	%Z%%M% %I% %E%
- #
- #	Date:	August 21, 1990
--- 
-2.1.4
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/dt-default-source-define.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/dt-default-source-define.patch
deleted file mode 100644
index 87016ed..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/dt-default-source-define.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Patch from http://pkgs.fedoraproject.org/git/rpms/dt.git
-
-Upstream-Status: Pending
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
-diff -rupN dt.v18.32.old/common.h dt.v18.32/common.h
---- dt.v18.32.old/common.h	2013-03-01 23:52:30.000000000 +0100
-+++ dt.v18.32/common.h	2014-09-24 17:41:40.777604710 +0200
-@@ -127,7 +127,7 @@ typedef volatile slarge_t	v_slarge;
- 
- #endif /* defined(_WIN64) */
- 
--#elif defined(__GNUC__) && defined(_BSD_SOURCE) || defined(SCO) || defined(__QNXNTO__) || defined(SOLARIS) || defined(HP_UX) || defined(AIX) || defined(_NT_SOURCE) 
-+#elif defined(__GNUC__) && defined(_BSD_SOURCE) || defined (_DEFAULT_SOURCE) ||  defined(SCO) || defined(__QNXNTO__) || defined(SOLARIS) || defined(HP_UX) || defined(AIX) || defined(_NT_SOURCE) 
- 
- #define QuadIsLongLong
- typedef unsigned long long int	large_t;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/dt-wformat-security.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/dt-wformat-security.patch
deleted file mode 100644
index b6780c1..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt/dt-wformat-security.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Patch from http://pkgs.fedoraproject.org/git/rpms/dt.git
-
-Upstream-Status: Pending
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
-diff -rupN dt.v18.32.old/dt.c dt.v18.32/dt.c
---- dt.v18.32.old/dt.c	2014-08-18 14:45:53.242351115 +0200
-+++ dt.v18.32/dt.c	2014-08-18 15:11:36.367719880 +0200
-@@ -4378,7 +4378,7 @@ report_error(
- 	    (void)sprintf(dip->di_msg_buffer, "(%d): '%s', errno = %d - %s\n",
- 			  dip->di_process_id, error_info, errno, emsg);
- 	}
--	syslog(LOG_ERR, dip->di_msg_buffer);
-+	syslog(LOG_ERR, "%s", dip->di_msg_buffer);
-     }
- #endif /* defined(SYSLOG) */
- 
-diff -rupN dt.v18.32.old/dtutil.c dt.v18.32/dtutil.c
---- dt.v18.32.old/dtutil.c	2014-08-18 14:45:53.354350779 +0200
-+++ dt.v18.32/dtutil.c	2014-08-18 15:13:53.835307311 +0200
-@@ -5180,7 +5180,7 @@ ReportDeviceInfo (
- 	    bp += Sprintf(bp,
- 			  "(%d) Device name: %s\n",
- 			   dip->di_process_id, dip->di_dname);
--	    syslog(LOG_ERR, dip->di_msg_buffer);
-+	    syslog(LOG_ERR, "%s", dip->di_msg_buffer);
- 	    bp = dip->di_msg_buffer;
- # if defined(SCSI)
- 	    if (dip->di_serial_number) {
-@@ -5193,7 +5193,7 @@ ReportDeviceInfo (
- 			      dip->di_process_id, dip->di_device_id);
- 	    }
- # endif /* defined(SCSI) */
--	    syslog(LOG_ERR, dip->di_msg_buffer);
-+	    syslog(LOG_ERR, "%s", dip->di_msg_buffer);
- 	    bp = dip->di_msg_buffer;
- 	    bp += Sprintf(bp,
- 		  "(%d) Relative block number where the error occurred is " LUF ","
-@@ -5203,7 +5203,7 @@ ReportDeviceInfo (
-   	    } else {
-                 bp += Sprintf(bp, "\n");
-             }
--	    syslog(LOG_ERR, dip->di_msg_buffer);
-+	    syslog(LOG_ERR, "%s", dip->di_msg_buffer);
- 	}
- #endif /* defined(SYSLOG) */
- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt_18.32.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt_18.32.bb
deleted file mode 100644
index 0234f76..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/dt/dt_18.32.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Generic data test program"
-DESCRIPTION = "The Data Test Program (dt) is a generic data test program used to verify proper \
-operation of peripherals, file systems, device drivers, or any data stream supported by the \
-operating system."
-HOMEPAGE = "http://www.scsifaq.org/RMiller_Tools/dt.html"
-
-SECTION = "console/tests"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=be8bb25bbcfaa0725710d188e5152668"
-
-# Source URI taken from Fedora RPM spec file at:
-#  http://pkgs.fedoraproject.org/git/rpms/dt.git
-SRC_URI = "http://dl.dropboxusercontent.com/u/32363629/Datatest/dt-source-v${PV}.tar.gz \
-           file://dt-default-source-define.patch \
-           file://dt-wformat-security.patch \
-           file://Stop-using-relative-path-for-scsilib.c-link.patch \
-           file://Use-tcsh-shell.patch \
-"
-
-SRC_URI[md5sum] = "3054aeaaba047a1dbe90c2132a382ee2"
-SRC_URI[sha256sum] = "10d164676e918a4d07f233bcd11e4cb6bfd1052c996182cd1827ccd0c063fcc6"
-
-S = "${WORKDIR}/dt.v${PV}"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-EXTRA_OEMAKE += "-f Makefile.linux \
-                 OS=linux \
-                 CFLAGS="-I.. -DAIO -DFIFO -DMMAP -D__linux__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DTHREADS -DSCSI""
-
-do_compile() {
-    oe_runmake
-}
-
-do_install() {
-    install -Dm755 dt ${D}${sbindir}/dt
-    install -Dm644 Documentation/dt.man ${D}${mandir}/man8/dt.8
-
-    install -d ${D}${datadir}/dt/
-    install -d ${D}${docdir}/dt/html/
-    install -m755 Scripts/dt? ${D}${datadir}/dt/
-    install -m644 data/pattern_* ${D}${datadir}/dt/
-    install -m644 html/* ${D}${docdir}/dt/html/
-}
-
-RDEPENDS_${PN} += "tcsh"
-
-PNBLACKLIST[dt] ?= "Rdepends on blacklisted tcsh - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-correct-version-for-so-lib.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-correct-version-for-so-lib.patch
new file mode 100644
index 0000000..a7a42f9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-correct-version-for-so-lib.patch
@@ -0,0 +1,26 @@
+From 8b44dc65d98d50b462843ac9dab6fe3fc25abe36 Mon Sep 17 00:00:00 2001
+From: Pascal Bach <pascal.bach@siemens.com>
+Date: Fri, 12 May 2017 13:54:49 +0200
+Subject: [PATCH] correct version for so lib
+
+Upstream-Status: Pending
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3670afe..f4fcd2c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -172,6 +172,7 @@ endif()
+ if(FLATBUFFERS_BUILD_SHAREDLIB)
+   add_library(flatbuffers_shared SHARED ${FlatBuffers_Library_SRCS})
+   set_target_properties(flatbuffers_shared PROPERTIES OUTPUT_NAME flatbuffers)
++  set_target_properties(flatbuffers_shared PROPERTIES VERSION "${PV}")
+ endif()
+ 
+ function(compile_flatbuffers_schema_to_cpp SRC_FBS)
+-- 
+2.1.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch
new file mode 100644
index 0000000..d736f01
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch
@@ -0,0 +1,113 @@
+From a614d8e20fa9e4fd16b699d581ddac2956c120f5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 19 Sep 2017 10:04:02 -0700
+Subject: [PATCH 1/2] flatbuffers: Move EndianSwap template to
+ flatbuffers/base.h
+
+Clang complains
+call to function 'EndianSwap' that is neither visible in the template definition nor found by argument-dependent lookup
+     return EndianSwap(t);
+
+This seems to be due to limitation of two-phase lookup of dependent names in template definitions
+
+Its not being found using associated namespaces therefore
+it has to be made visible at the template definition site as well
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ include/flatbuffers/base.h        | 33 +++++++++++++++++++++++++++++++++
+ include/flatbuffers/flatbuffers.h | 32 --------------------------------
+ 2 files changed, 33 insertions(+), 32 deletions(-)
+
+diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h
+index f051755..c73fb2d 100644
+--- a/include/flatbuffers/base.h
++++ b/include/flatbuffers/base.h
+@@ -150,6 +150,39 @@ typedef uintmax_t largest_scalar_t;
+ // We support aligning the contents of buffers up to this size.
+ #define FLATBUFFERS_MAX_ALIGNMENT 16
+ 
++template<typename T> T EndianSwap(T t) {
++  #if defined(_MSC_VER)
++    #define FLATBUFFERS_BYTESWAP16 _byteswap_ushort
++    #define FLATBUFFERS_BYTESWAP32 _byteswap_ulong
++    #define FLATBUFFERS_BYTESWAP64 _byteswap_uint64
++  #else
++    #if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ < 408
++      // __builtin_bswap16 was missing prior to GCC 4.8.
++      #define FLATBUFFERS_BYTESWAP16(x) \
++        static_cast<uint16_t>(__builtin_bswap32(static_cast<uint32_t>(x) << 16))
++    #else
++      #define FLATBUFFERS_BYTESWAP16 __builtin_bswap16
++    #endif
++    #define FLATBUFFERS_BYTESWAP32 __builtin_bswap32
++    #define FLATBUFFERS_BYTESWAP64 __builtin_bswap64
++  #endif
++  if (sizeof(T) == 1) {   // Compile-time if-then's.
++    return t;
++  } else if (sizeof(T) == 2) {
++    auto r = FLATBUFFERS_BYTESWAP16(*reinterpret_cast<uint16_t *>(&t));
++    return *reinterpret_cast<T *>(&r);
++  } else if (sizeof(T) == 4) {
++    auto r = FLATBUFFERS_BYTESWAP32(*reinterpret_cast<uint32_t *>(&t));
++    return *reinterpret_cast<T *>(&r);
++  } else if (sizeof(T) == 8) {
++    auto r = FLATBUFFERS_BYTESWAP64(*reinterpret_cast<uint64_t *>(&t));
++    return *reinterpret_cast<T *>(&r);
++  } else {
++    assert(0);
++  }
++}
++
++
+ template<typename T> T EndianScalar(T t) {
+   #if FLATBUFFERS_LITTLEENDIAN
+     return t;
+diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h
+index 9216cf4..f749dcb 100644
+--- a/include/flatbuffers/flatbuffers.h
++++ b/include/flatbuffers/flatbuffers.h
+@@ -37,38 +37,6 @@ inline void EndianCheck() {
+   (void)endiantest;
+ }
+ 
+-template<typename T> T EndianSwap(T t) {
+-  #if defined(_MSC_VER)
+-    #define FLATBUFFERS_BYTESWAP16 _byteswap_ushort
+-    #define FLATBUFFERS_BYTESWAP32 _byteswap_ulong
+-    #define FLATBUFFERS_BYTESWAP64 _byteswap_uint64
+-  #else
+-    #if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ < 408
+-      // __builtin_bswap16 was missing prior to GCC 4.8.
+-      #define FLATBUFFERS_BYTESWAP16(x) \
+-        static_cast<uint16_t>(__builtin_bswap32(static_cast<uint32_t>(x) << 16))
+-    #else
+-      #define FLATBUFFERS_BYTESWAP16 __builtin_bswap16
+-    #endif
+-    #define FLATBUFFERS_BYTESWAP32 __builtin_bswap32
+-    #define FLATBUFFERS_BYTESWAP64 __builtin_bswap64
+-  #endif
+-  if (sizeof(T) == 1) {   // Compile-time if-then's.
+-    return t;
+-  } else if (sizeof(T) == 2) {
+-    auto r = FLATBUFFERS_BYTESWAP16(*reinterpret_cast<uint16_t *>(&t));
+-    return *reinterpret_cast<T *>(&r);
+-  } else if (sizeof(T) == 4) {
+-    auto r = FLATBUFFERS_BYTESWAP32(*reinterpret_cast<uint32_t *>(&t));
+-    return *reinterpret_cast<T *>(&r);
+-  } else if (sizeof(T) == 8) {
+-    auto r = FLATBUFFERS_BYTESWAP64(*reinterpret_cast<uint64_t *>(&t));
+-    return *reinterpret_cast<T *>(&r);
+-  } else {
+-    assert(0);
+-  }
+-}
+-
+ template<typename T> FLATBUFFERS_CONSTEXPR size_t AlignOf() {
+   #ifdef _MSC_VER
+     return __alignof(T);
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0002-use-__builtin_bswap16-when-building-with-clang.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0002-use-__builtin_bswap16-when-building-with-clang.patch
new file mode 100644
index 0000000..460159f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/files/0002-use-__builtin_bswap16-when-building-with-clang.patch
@@ -0,0 +1,30 @@
+From 626fe5e043de25e970ebdf061b88c646fa689113 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 19 Sep 2017 10:09:31 -0700
+Subject: [PATCH 2/2] use __builtin_bswap16 when building with clang
+
+clang pretends to be gcc 4.2.0 and therefore the code does
+not use __builtin_bswap16 but tries to synthesize it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+ include/flatbuffers/base.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h
+index c73fb2d..13e8fac 100644
+--- a/include/flatbuffers/base.h
++++ b/include/flatbuffers/base.h
+@@ -156,7 +156,7 @@ template<typename T> T EndianSwap(T t) {
+     #define FLATBUFFERS_BYTESWAP32 _byteswap_ulong
+     #define FLATBUFFERS_BYTESWAP64 _byteswap_uint64
+   #else
+-    #if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ < 408
++    #if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ < 408 && !defined(__clang__)
+       // __builtin_bswap16 was missing prior to GCC 4.8.
+       #define FLATBUFFERS_BYTESWAP16(x) \
+         static_cast<uint16_t>(__builtin_bswap32(static_cast<uint32_t>(x) << 16))
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.7.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.7.1.bb
new file mode 100644
index 0000000..a8df444
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.7.1.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Memory Efficient Serialization Library"
+HOMEPAGE = "https://github.com/google/flatbuffers"
+SECTION = "console/tools"
+LICENSE = "Apache-2.0"
+
+PACKAGE_BEFORE_PN = "${PN}-compiler"
+
+RDEPENDS_${PN}-compiler = "${PN}"
+RDEPENDS_${PN}-dev += "${PN}-compiler"
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a873c5645c184d51e0f9b34e1d7cf559"
+
+SRCREV = "25a15950f5a24d7217689739ed8f6dac64912d62"
+
+SRC_URI = "git://github.com/google/flatbuffers.git \
+           file://0001-correct-version-for-so-lib.patch \
+           file://0001-flatbuffers-Move-EndianSwap-template-to-flatbuffers-.patch \
+           file://0002-use-__builtin_bswap16-when-building-with-clang.patch \
+           "
+
+# Make sure C++11 is used, required for example for GCC 4.9
+CXXFLAGS += "-std=c++11"
+BUILD_CXXFLAGS += "-std=c++11"
+
+EXTRA_OECMAKE += "\
+    -DFLATBUFFERS_BUILD_TESTS=OFF \
+    -DFLATBUFFERS_BUILD_SHAREDLIB=ON \
+    -DPV=${PV} \
+"
+
+inherit cmake
+
+S = "${WORKDIR}/git"
+
+FILES_${PN}-compiler = "${bindir}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.30.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.30.bb
deleted file mode 100644
index f01dda8..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.30.bb
+++ /dev/null
@@ -1,263 +0,0 @@
-DESCRIPTION = "A fast and lightweight IDE"
-HOMEPAGE = "http://plugins.geany.org/"
-
-LICENSE_DEFAULT = "GPLv2"
-LICENSE = "${LICENSE_DEFAULT} & BSD-2-Clause & GPLv3"
-
-python () {
-    for plugin in d.getVar('PLUGINS').split():
-        if 'LICENSE_%s' % plugin not in d:
-            d.setVar('LICENSE_' + plugin, '${LICENSE_DEFAULT}')
-}
-
-DEPENDS = " \
-    geany \
-    libxml2 \
-    libsoup-2.4 \
-    enchant \
-    intltool-native \
-    libassuan \
-    gpgme \
-    vte9 \
-    libgit2 \
-"
-
-inherit autotools pkgconfig gtk-icon-cache
-
-SRC_URI = "http://plugins.geany.org/${PN}/${PN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "13f8e5d900b4911059385649b8dde887"
-SRC_URI[sha256sum] = "8adb90645d273d9549e1fa99b69ea87dc1fd612f7467eb18eee11a6b30c9ba5b"
-
-do_configure_prepend() {
-    rm -f ${S}/build/cache/glib-gettext.m4
-}
-
-FILES_${PN} += "${datadir}/icons"
-FILES_${PN}-dev += "${libdir}/geany/*.la ${libdir}/${PN}/*/*.la"
-
-PLUGINS += "${PN}-addons"
-LIC_FILES_CHKSUM += "file://addons/COPYING;md5=4325afd396febcb659c36b49533135d4"
-FILES_${PN}-addons = "${libdir}/geany/addons.so"
-RDEPENDS_${PN}-addons = "${PN}"
-
-PLUGINS += "${PN}-autoclose"
-LIC_FILES_CHKSUM += "file://autoclose/COPYING;md5=751419260aa954499f7abaabaa882bbe"
-FILES_${PN}-autoclose = "${libdir}/geany/autoclose.so"
-RDEPENDS_${PN}-autoclose = "${PN}"
-
-PLUGINS += "${PN}-automark"
-LIC_FILES_CHKSUM += "file://automark/COPYING;md5=751419260aa954499f7abaabaa882bbe"
-FILES_${PN}-automark = "${libdir}/geany/automark.so"
-RDEPENDS_${PN}-automark = "${PN}"
-
-PLUGINS += "${PN}-codenav"
-LIC_FILES_CHKSUM += "file://codenav/COPYING;md5=751419260aa954499f7abaabaa882bbe"
-FILES_${PN}-codenav = "${libdir}/geany/codenav.so"
-RDEPENDS_${PN}-codenav = "${PN}"
-
-PLUGINS += "${PN}-commander"
-LIC_FILES_CHKSUM += "file://commander/COPYING;md5=d32239bcb673463ab874e80d47fae504"
-LICENSE_${PN}-commander = "GPLv3"
-FILES_${PN}-commander = "${libdir}/geany/commander.so"
-RDEPENDS_${PN}-commander = "${PN}"
-
-PLUGINS += "${PN}-debugger"
-LIC_FILES_CHKSUM += "file://debugger/COPYING;md5=4325afd396febcb659c36b49533135d4"
-FILES_${PN}-debugger = "${libdir}/geany/debugger.so ${datadir}/${PN}/debugger"
-RDEPENDS_${PN}-debugger = "${PN}"
-
-PLUGINS += "${PN}-defineformat"
-LIC_FILES_CHKSUM += "file://defineformat/COPYING;md5=751419260aa954499f7abaabaa882bbe"
-FILES_${PN}-defineformat = "${libdir}/geany/defineformat.so"
-RDEPENDS_${PN}-defineformat = "${PN}"
-
-# no gnome devhelp in some common layer
-EXTRA_OECONF += "--disable-devhelp"
-#PLUGINS += "${PN}-devhelp"
-#LIC_FILES_CHKSUM += "file://devhelp/COPYING;md5=d32239bcb673463ab874e80d47fae504"
-#LICENSE_${PN}-devhelp = "GPLv3"
-#FILES_${PN}-devhelp = "${libdir}/geany/devhelp.so"
-#RDEPENDS_${PN}-devhelp = "${PN}"
-
-PLUGINS += "${PN}-geanyctags"
-LIC_FILES_CHKSUM += "file://geanyctags/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-geanyctags = "${libdir}/geany/geanyctags.so"
-RDEPENDS_${PN}-geanyctags = "${PN}"
-
-PLUGINS += "${PN}-geanydoc"
-LIC_FILES_CHKSUM += "file://geanydoc/COPYING;md5=d32239bcb673463ab874e80d47fae504"
-LICENSE_${PN}-geanydoc = "GPLv3"
-FILES_${PN}-geanydoc = "${libdir}/geany/geanydoc.so"
-RDEPENDS_${PN}-geanydoc = "${PN}"
-
-PLUGINS += "${PN}-geanyextrasel"
-LIC_FILES_CHKSUM += "file://geanyextrasel/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-geanyextrasel = "${libdir}/geany/geanyextrasel.so"
-RDEPENDS_${PN}-geanyextrasel = "${PN}"
-
-PLUGINS += "${PN}-geanyinsertnum"
-LIC_FILES_CHKSUM += "file://geanyinsertnum/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-geanyinsertnum = "${libdir}/geany/geanyinsertnum.so"
-RDEPENDS_${PN}-geanyinsertnum = "${PN}"
-
-PLUGINS += "${PN}-geanylatex"
-LIC_FILES_CHKSUM += "file://geanylatex/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-geanylatex = "${libdir}/geany/geanylatex.so"
-RDEPENDS_${PN}-geanylatex = "${PN}"
-
-PLUGINS += "${PN}-geanylipsum"
-LIC_FILES_CHKSUM += "file://lipsum/COPYING;md5=4325afd396febcb659c36b49533135d4"
-FILES_${PN}-geanylipsum = "${libdir}/geany/lipsum.so"
-RDEPENDS_${PN}-geanylipsum = "${PN}"
-
-# no lua: max supported version is 5.2
-EXTRA_OECONF += "--disable-geanylua"
-#PLUGINS += "${PN}-geanylua"
-#LIC_FILES_CHKSUM += "file://geanylua/COPYING;md5=4325afd396febcb659c36b49533135d4"
-#FILES_${PN}-geanylua = "${libdir}/geany/geanylua.so ${libdir}/${PN}/geanylua/*.so"
-#RDEPENDS_${PN}-geanylua = "${PN}"
-
-PLUGINS += "${PN}-geanymacro"
-LIC_FILES_CHKSUM += "file://geanymacro/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-geanymacro = "${libdir}/geany/geanymacro.so"
-RDEPENDS_${PN}-geanymacro = "${PN}"
-
-PLUGINS += "${PN}-geanyminiscript"
-LIC_FILES_CHKSUM += "file://geanyminiscript/COPYING;md5=4325afd396febcb659c36b49533135d4"
-FILES_${PN}-geanyminiscript = "${libdir}/geany/geanyminiscript.so"
-RDEPENDS_${PN}-geanyminiscript = "${PN}"
-
-PLUGINS += "${PN}-geanynumberedbookmarks"
-LIC_FILES_CHKSUM += "file://geanynumberedbookmarks/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-geanynumberedbookmarks = "${libdir}/geany/geanynumberedbookmarks.so"
-RDEPENDS_${PN}-geanynumberedbookmarks = "${PN}"
-
-PLUGINS += "${PN}-geanypg"
-LIC_FILES_CHKSUM += "file://geanypg/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-FILES_${PN}-geanypg = "${libdir}/geany/geanypg.so"
-RDEPENDS_${PN}-geanypg = "${PN}"
-
-PLUGINS += "${PN}-geanyprj"
-LIC_FILES_CHKSUM += "file://geanyprj/COPYING;md5=d32239bcb673463ab874e80d47fae504"
-LICENSE_${PN}-geanyprj = "GPLv3"
-FILES_${PN}-geanyprj = "${libdir}/geany/geanyprj.so"
-RDEPENDS_${PN}-geanyprj = "${PN}"
-
-# no gnome pygtk
-EXTRA_OECONF += "--disable-geanypy"
-#PLUGINS += "${PN}-geanypy"
-#LIC_FILES_CHKSUM += "file://geanypy/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-#FILES_${PN}-geanypy = "${libdir}/geany/geanypy.so"
-#RDEPENDS_${PN}-geanypy = "${PN}"
-
-PLUGINS += "${PN}-geanyvc"
-LIC_FILES_CHKSUM += "file://geanyvc/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-geanyvc = "${libdir}/geany/geanyvc.so"
-RDEPENDS_${PN}-geanyvc = "${PN}"
-
-PLUGINS += "${PN}-geniuspaste"
-LIC_FILES_CHKSUM += "file://geniuspaste/COPYING;md5=bfc203269f8862ebfc1198cdc809a95a"
-FILES_${PN}-geniuspaste = "${libdir}/geany/geniuspaste.so ${datadir}/${PN}/geniuspaste"
-RDEPENDS_${PN}-geniuspaste = "${PN}"
-
-PLUGINS += "${PN}-git-changebar"
-LIC_FILES_CHKSUM += "file://git-changebar/COPYING;md5=d32239bcb673463ab874e80d47fae504"
-LICENSE_${PN}-git-changebar = "GPLv3"
-FILES_${PN}-git-changebar = "${libdir}/geany/git-changebar.so"
-RDEPENDS_${PN}-git-changebar = "${PN}"
-
-PLUGINS += "${PN}-lineoperations"
-LIC_FILES_CHKSUM += "file://lineoperations/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-lineoperations = "${libdir}/geany/lineoperations.so"
-RDEPENDS_${PN}-lineoperations = "${PN}"
-
-# no markdown - avoid floating dependencies
-EXTRA_OECONF += " --disable-peg-markdown"
-#PLUGINS += "${PN}-markdown"
-#LIC_FILES_CHKSUM += "file://markdown/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-#FILES_${PN}-markdown = "${libdir}/geany/markdown.so"
-#RDEPENDS_${PN}-markdown = "${PN}"
-
-PLUGINS += "${PN}-multiterm"
-LIC_FILES_CHKSUM += "file://multiterm/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-FILES_${PN}-multiterm = "${libdir}/geany/multiterm.so"
-RDEPENDS_${PN}-multiterm = "${PN}"
-
-PLUGINS += "${PN}-overview"
-LIC_FILES_CHKSUM += "file://overview/overview/overviewplugin.c;beginline=4;endline=20;md5=1aa33522916cdeb46cccac0c629da0d0"
-FILES_${PN}-overview = "${libdir}/geany/overview.so ${datadir}/${PN}/overview"
-RDEPENDS_${PN}-overview = "${PN}"
-
-PLUGINS += "${PN}-pairtaghighlighter"
-LICENSE_${PN}-pairtaghighlighter = "BSD-2-Clause"
-LIC_FILES_CHKSUM += "file://pairtaghighlighter/COPYING;md5=d6d927525a612b3a8dbebc4b2e9b47c1"
-FILES_${PN}-pairtaghighlighter = "${libdir}/geany/pairtaghighlighter.so"
-RDEPENDS_${PN}-pairtaghighlighter = "${PN}"
-
-PLUGINS += "${PN}-pohelper"
-LICENSE_${PN}-pohelper = "GPLv3"
-LIC_FILES_CHKSUM += "file://pohelper/COPYING;md5=d32239bcb673463ab874e80d47fae504"
-FILES_${PN}-pohelper = "${libdir}/geany/pohelper.so"
-RDEPENDS_${PN}-pohelper = "${PN}"
-
-PLUGINS += "${PN}-pretty-printer"
-LIC_FILES_CHKSUM += "file://pretty-printer/src/PrettyPrinter.c;beginline=1;endline=17;md5=1665115c2fadb17c1b53cdb4e43b2440"
-FILES_${PN}-pretty-printer = "${libdir}/geany/pretty-printer.so"
-RDEPENDS_${PN}-pretty-printer = "${PN}"
-
-PLUGINS += "${PN}-projectorganizer"
-LIC_FILES_CHKSUM += "file://projectorganizer/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-projectorganizer = "${libdir}/geany/projectorganizer.so"
-RDEPENDS_${PN}-projectorganizer = "${PN}"
-
-PLUGINS += "${PN}-scope"
-LIC_FILES_CHKSUM += "file://scope/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-scope = "${libdir}/geany/scope.so"
-RDEPENDS_${PN}-scope = "${PN}"
-
-PLUGINS += "${PN}-sendmail"
-LIC_FILES_CHKSUM += "file://sendmail/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
-FILES_${PN}-sendmail = "${libdir}/geany/sendmail.so"
-RDEPENDS_${PN}-sendmail = "${PN}"
-
-PLUGINS += "${PN}-shiftcolumn"
-LIC_FILES_CHKSUM += "file://shiftcolumn/COPYING;md5=751419260aa954499f7abaabaa882bbe"
-FILES_${PN}-shiftcolumn = "${libdir}/geany/shiftcolumn.so"
-RDEPENDS_${PN}-shiftcolumn = "${PN}"
-
-PLUGINS += "${PN}-spellcheck"
-LIC_FILES_CHKSUM += "file://spellcheck/COPYING;md5=4325afd396febcb659c36b49533135d4"
-FILES_${PN}-spellcheck = "${libdir}/geany/spellcheck.so"
-RDEPENDS_${PN}-spellcheck = "${PN}"
-
-PLUGINS += "${PN}-tableconvert"
-LIC_FILES_CHKSUM += "file://tableconvert/COPYING;md5=6753686878d090a1f3f9445661d3dfbc"
-FILES_${PN}-tableconvert = "${libdir}/geany/tableconvert.so"
-RDEPENDS_${PN}-tableconvert = "${PN}"
-
-PLUGINS += "${PN}-treebrowser"
-LIC_FILES_CHKSUM += "file://treebrowser/README;beginline=67;endline=67;md5=52f90857fd1a9672111e472dd056a0d8"
-FILES_${PN}-treebrowser = "${libdir}/geany/treebrowser.so"
-RDEPENDS_${PN}-treebrowser = "${PN}"
-
-PLUGINS += "${PN}-updatechecker"
-LIC_FILES_CHKSUM += "file://updatechecker/COPYING;md5=4325afd396febcb659c36b49533135d4"
-FILES_${PN}-updatechecker = "${libdir}/geany/updatechecker.so"
-RDEPENDS_${PN}-updatechecker = "${PN}"
-
-# no webkit - lasts ages and is not properly detected
-EXTRA_OECONF += " --disable-webhelper"
-#PLUGINS += "${PN}-webhelper"
-#LIC_FILES_CHKSUM += "file://webhelper/COPYING;md5=d32239bcb673463ab874e80d47fae504"
-#LICENSE_${PN}-webhelper = "GPLv3"
-#FILES_${PN}-webhelper = "${libdir}/geany/webhelper.so"
-#RDEPENDS_${PN}-webhelper = "${PN}"
-
-PLUGINS += "${PN}-xmlsnippets"
-LIC_FILES_CHKSUM += "file://xmlsnippets/COPYING;md5=4325afd396febcb659c36b49533135d4"
-FILES_${PN}-xmlsnippets = "${libdir}/geany/xmlsnippets.so"
-RDEPENDS_${PN}-xmlsnippets = "${PN}"
-
-PACKAGES =+ "${PLUGINS}"
-RDEPENDS_${PN} = "${PLUGINS}"
-ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.31.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.31.bb
new file mode 100644
index 0000000..27fe860
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.31.bb
@@ -0,0 +1,268 @@
+DESCRIPTION = "A fast and lightweight IDE"
+HOMEPAGE = "http://plugins.geany.org/"
+
+LICENSE_DEFAULT = "GPLv2"
+LICENSE = "${LICENSE_DEFAULT} & BSD-2-Clause & GPLv3"
+
+python () {
+    for plugin in d.getVar('PLUGINS').split():
+        if 'LICENSE_%s' % plugin not in d:
+            d.setVar('LICENSE_' + plugin, '${LICENSE_DEFAULT}')
+}
+
+DEPENDS = " \
+    geany \
+    libxml2 \
+    libsoup-2.4 \
+    enchant \
+    intltool-native \
+    libassuan \
+    gpgme \
+    vte9 \
+    libgit2 \
+"
+
+inherit autotools pkgconfig gtk-icon-cache
+
+SRC_URI = "http://plugins.geany.org/${PN}/${PN}-${PV}.tar.bz2"
+SRC_URI[md5sum] = "808f9048b77fd9704569ed2ba12a56e9"
+SRC_URI[sha256sum] = "76bd9e803db5a626b86669f08330cf95b8cc35057a1cdf65759bc00aef120e25"
+
+do_configure_prepend() {
+    rm -f ${S}/build/cache/glib-gettext.m4
+}
+
+FILES_${PN} += "${datadir}/icons"
+FILES_${PN}-dev += "${libdir}/geany/*.la ${libdir}/${PN}/*/*.la"
+
+PLUGINS += "${PN}-addons"
+LIC_FILES_CHKSUM += "file://addons/COPYING;md5=4325afd396febcb659c36b49533135d4"
+FILES_${PN}-addons = "${libdir}/geany/addons.so"
+RDEPENDS_${PN}-addons = "${PN}"
+
+PLUGINS += "${PN}-autoclose"
+LIC_FILES_CHKSUM += "file://autoclose/COPYING;md5=751419260aa954499f7abaabaa882bbe"
+FILES_${PN}-autoclose = "${libdir}/geany/autoclose.so"
+RDEPENDS_${PN}-autoclose = "${PN}"
+
+PLUGINS += "${PN}-automark"
+LIC_FILES_CHKSUM += "file://automark/COPYING;md5=751419260aa954499f7abaabaa882bbe"
+FILES_${PN}-automark = "${libdir}/geany/automark.so"
+RDEPENDS_${PN}-automark = "${PN}"
+
+PLUGINS += "${PN}-codenav"
+LIC_FILES_CHKSUM += "file://codenav/COPYING;md5=751419260aa954499f7abaabaa882bbe"
+FILES_${PN}-codenav = "${libdir}/geany/codenav.so"
+RDEPENDS_${PN}-codenav = "${PN}"
+
+PLUGINS += "${PN}-commander"
+LIC_FILES_CHKSUM += "file://commander/COPYING;md5=d32239bcb673463ab874e80d47fae504"
+LICENSE_${PN}-commander = "GPLv3"
+FILES_${PN}-commander = "${libdir}/geany/commander.so"
+RDEPENDS_${PN}-commander = "${PN}"
+
+PLUGINS += "${PN}-debugger"
+LIC_FILES_CHKSUM += "file://debugger/COPYING;md5=4325afd396febcb659c36b49533135d4"
+FILES_${PN}-debugger = "${libdir}/geany/debugger.so ${datadir}/${PN}/debugger"
+RDEPENDS_${PN}-debugger = "${PN}"
+
+PLUGINS += "${PN}-defineformat"
+LIC_FILES_CHKSUM += "file://defineformat/COPYING;md5=751419260aa954499f7abaabaa882bbe"
+FILES_${PN}-defineformat = "${libdir}/geany/defineformat.so"
+RDEPENDS_${PN}-defineformat = "${PN}"
+
+# no gnome devhelp in some common layer
+EXTRA_OECONF += "--disable-devhelp"
+#PLUGINS += "${PN}-devhelp"
+#LIC_FILES_CHKSUM += "file://devhelp/COPYING;md5=d32239bcb673463ab874e80d47fae504"
+#LICENSE_${PN}-devhelp = "GPLv3"
+#FILES_${PN}-devhelp = "${libdir}/geany/devhelp.so"
+#RDEPENDS_${PN}-devhelp = "${PN}"
+
+PLUGINS += "${PN}-geanyctags"
+LIC_FILES_CHKSUM += "file://geanyctags/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-geanyctags = "${libdir}/geany/geanyctags.so"
+RDEPENDS_${PN}-geanyctags = "${PN}"
+
+PLUGINS += "${PN}-geanydoc"
+LIC_FILES_CHKSUM += "file://geanydoc/COPYING;md5=d32239bcb673463ab874e80d47fae504"
+LICENSE_${PN}-geanydoc = "GPLv3"
+FILES_${PN}-geanydoc = "${libdir}/geany/geanydoc.so"
+RDEPENDS_${PN}-geanydoc = "${PN}"
+
+PLUGINS += "${PN}-geanyextrasel"
+LIC_FILES_CHKSUM += "file://geanyextrasel/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-geanyextrasel = "${libdir}/geany/geanyextrasel.so"
+RDEPENDS_${PN}-geanyextrasel = "${PN}"
+
+PLUGINS += "${PN}-geanyinsertnum"
+LIC_FILES_CHKSUM += "file://geanyinsertnum/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-geanyinsertnum = "${libdir}/geany/geanyinsertnum.so"
+RDEPENDS_${PN}-geanyinsertnum = "${PN}"
+
+PLUGINS += "${PN}-geanylatex"
+LIC_FILES_CHKSUM += "file://geanylatex/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-geanylatex = "${libdir}/geany/geanylatex.so"
+RDEPENDS_${PN}-geanylatex = "${PN}"
+
+PLUGINS += "${PN}-geanylipsum"
+LIC_FILES_CHKSUM += "file://lipsum/COPYING;md5=4325afd396febcb659c36b49533135d4"
+FILES_${PN}-geanylipsum = "${libdir}/geany/lipsum.so"
+RDEPENDS_${PN}-geanylipsum = "${PN}"
+
+# no lua: max supported version is 5.2
+EXTRA_OECONF += "--disable-geanylua"
+#PLUGINS += "${PN}-geanylua"
+#LIC_FILES_CHKSUM += "file://geanylua/COPYING;md5=4325afd396febcb659c36b49533135d4"
+#FILES_${PN}-geanylua = "${libdir}/geany/geanylua.so ${libdir}/${PN}/geanylua/*.so"
+#RDEPENDS_${PN}-geanylua = "${PN}"
+
+PLUGINS += "${PN}-geanymacro"
+LIC_FILES_CHKSUM += "file://geanymacro/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-geanymacro = "${libdir}/geany/geanymacro.so"
+RDEPENDS_${PN}-geanymacro = "${PN}"
+
+PLUGINS += "${PN}-geanyminiscript"
+LIC_FILES_CHKSUM += "file://geanyminiscript/COPYING;md5=4325afd396febcb659c36b49533135d4"
+FILES_${PN}-geanyminiscript = "${libdir}/geany/geanyminiscript.so"
+RDEPENDS_${PN}-geanyminiscript = "${PN}"
+
+PLUGINS += "${PN}-geanynumberedbookmarks"
+LIC_FILES_CHKSUM += "file://geanynumberedbookmarks/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-geanynumberedbookmarks = "${libdir}/geany/geanynumberedbookmarks.so"
+RDEPENDS_${PN}-geanynumberedbookmarks = "${PN}"
+
+PLUGINS += "${PN}-geanypg"
+LIC_FILES_CHKSUM += "file://geanypg/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+FILES_${PN}-geanypg = "${libdir}/geany/geanypg.so"
+RDEPENDS_${PN}-geanypg = "${PN}"
+
+PLUGINS += "${PN}-geanyprj"
+LIC_FILES_CHKSUM += "file://geanyprj/COPYING;md5=d32239bcb673463ab874e80d47fae504"
+LICENSE_${PN}-geanyprj = "GPLv3"
+FILES_${PN}-geanyprj = "${libdir}/geany/geanyprj.so"
+RDEPENDS_${PN}-geanyprj = "${PN}"
+
+# no gnome pygtk
+EXTRA_OECONF += "--disable-geanypy"
+#PLUGINS += "${PN}-geanypy"
+#LIC_FILES_CHKSUM += "file://geanypy/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+#FILES_${PN}-geanypy = "${libdir}/geany/geanypy.so"
+#RDEPENDS_${PN}-geanypy = "${PN}"
+
+PLUGINS += "${PN}-geanyvc"
+LIC_FILES_CHKSUM += "file://geanyvc/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-geanyvc = "${libdir}/geany/geanyvc.so"
+RDEPENDS_${PN}-geanyvc = "${PN}"
+
+PLUGINS += "${PN}-geniuspaste"
+LIC_FILES_CHKSUM += "file://geniuspaste/COPYING;md5=bfc203269f8862ebfc1198cdc809a95a"
+FILES_${PN}-geniuspaste = "${libdir}/geany/geniuspaste.so ${datadir}/${PN}/geniuspaste"
+RDEPENDS_${PN}-geniuspaste = "${PN}"
+
+PLUGINS += "${PN}-git-changebar"
+LIC_FILES_CHKSUM += "file://git-changebar/COPYING;md5=d32239bcb673463ab874e80d47fae504"
+LICENSE_${PN}-git-changebar = "GPLv3"
+FILES_${PN}-git-changebar = "${libdir}/geany/git-changebar.so"
+RDEPENDS_${PN}-git-changebar = "${PN}"
+
+PLUGINS += "${PN}-keyrecord"
+LIC_FILES_CHKSUM += "file://keyrecord/COPYING;md5=751419260aa954499f7abaabaa882bbe"
+FILES_${PN}-keyrecord = "${libdir}/geany/keyrecord.so"
+RDEPENDS_${PN}-keyrecord = "${PN}"
+
+PLUGINS += "${PN}-lineoperations"
+LIC_FILES_CHKSUM += "file://lineoperations/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-lineoperations = "${libdir}/geany/lineoperations.so"
+RDEPENDS_${PN}-lineoperations = "${PN}"
+
+# no markdown - avoid floating dependencies
+EXTRA_OECONF += " --disable-peg-markdown"
+#PLUGINS += "${PN}-markdown"
+#LIC_FILES_CHKSUM += "file://markdown/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+#FILES_${PN}-markdown = "${libdir}/geany/markdown.so"
+#RDEPENDS_${PN}-markdown = "${PN}"
+
+PLUGINS += "${PN}-multiterm"
+LIC_FILES_CHKSUM += "file://multiterm/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+FILES_${PN}-multiterm = "${libdir}/geany/multiterm.so"
+RDEPENDS_${PN}-multiterm = "${PN}"
+
+PLUGINS += "${PN}-overview"
+LIC_FILES_CHKSUM += "file://overview/overview/overviewplugin.c;beginline=4;endline=20;md5=1aa33522916cdeb46cccac0c629da0d0"
+FILES_${PN}-overview = "${libdir}/geany/overview.so ${datadir}/${PN}/overview"
+RDEPENDS_${PN}-overview = "${PN}"
+
+PLUGINS += "${PN}-pairtaghighlighter"
+LICENSE_${PN}-pairtaghighlighter = "BSD-2-Clause"
+LIC_FILES_CHKSUM += "file://pairtaghighlighter/COPYING;md5=d6d927525a612b3a8dbebc4b2e9b47c1"
+FILES_${PN}-pairtaghighlighter = "${libdir}/geany/pairtaghighlighter.so"
+RDEPENDS_${PN}-pairtaghighlighter = "${PN}"
+
+PLUGINS += "${PN}-pohelper"
+LICENSE_${PN}-pohelper = "GPLv3"
+LIC_FILES_CHKSUM += "file://pohelper/COPYING;md5=d32239bcb673463ab874e80d47fae504"
+FILES_${PN}-pohelper = "${libdir}/geany/pohelper.so"
+RDEPENDS_${PN}-pohelper = "${PN}"
+
+PLUGINS += "${PN}-pretty-printer"
+LIC_FILES_CHKSUM += "file://pretty-printer/src/PrettyPrinter.c;beginline=1;endline=17;md5=1665115c2fadb17c1b53cdb4e43b2440"
+FILES_${PN}-pretty-printer = "${libdir}/geany/pretty-printer.so"
+RDEPENDS_${PN}-pretty-printer = "${PN}"
+
+PLUGINS += "${PN}-projectorganizer"
+LIC_FILES_CHKSUM += "file://projectorganizer/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-projectorganizer = "${libdir}/geany/projectorganizer.so"
+RDEPENDS_${PN}-projectorganizer = "${PN}"
+
+PLUGINS += "${PN}-scope"
+LIC_FILES_CHKSUM += "file://scope/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-scope = "${libdir}/geany/scope.so"
+RDEPENDS_${PN}-scope = "${PN}"
+
+PLUGINS += "${PN}-sendmail"
+LIC_FILES_CHKSUM += "file://sendmail/COPYING;md5=c107cf754550e65755c42985a5d4e9c9"
+FILES_${PN}-sendmail = "${libdir}/geany/sendmail.so"
+RDEPENDS_${PN}-sendmail = "${PN}"
+
+PLUGINS += "${PN}-shiftcolumn"
+LIC_FILES_CHKSUM += "file://shiftcolumn/COPYING;md5=751419260aa954499f7abaabaa882bbe"
+FILES_${PN}-shiftcolumn = "${libdir}/geany/shiftcolumn.so"
+RDEPENDS_${PN}-shiftcolumn = "${PN}"
+
+PLUGINS += "${PN}-spellcheck"
+LIC_FILES_CHKSUM += "file://spellcheck/COPYING;md5=4325afd396febcb659c36b49533135d4"
+FILES_${PN}-spellcheck = "${libdir}/geany/spellcheck.so"
+RDEPENDS_${PN}-spellcheck = "${PN}"
+
+PLUGINS += "${PN}-tableconvert"
+LIC_FILES_CHKSUM += "file://tableconvert/COPYING;md5=6753686878d090a1f3f9445661d3dfbc"
+FILES_${PN}-tableconvert = "${libdir}/geany/tableconvert.so"
+RDEPENDS_${PN}-tableconvert = "${PN}"
+
+PLUGINS += "${PN}-treebrowser"
+LIC_FILES_CHKSUM += "file://treebrowser/README;beginline=67;endline=67;md5=52f90857fd1a9672111e472dd056a0d8"
+FILES_${PN}-treebrowser = "${libdir}/geany/treebrowser.so"
+RDEPENDS_${PN}-treebrowser = "${PN}"
+
+PLUGINS += "${PN}-updatechecker"
+LIC_FILES_CHKSUM += "file://updatechecker/COPYING;md5=4325afd396febcb659c36b49533135d4"
+FILES_${PN}-updatechecker = "${libdir}/geany/updatechecker.so"
+RDEPENDS_${PN}-updatechecker = "${PN}"
+
+# no webkit - lasts ages and is not properly detected
+EXTRA_OECONF += " --disable-webhelper"
+#PLUGINS += "${PN}-webhelper"
+#LIC_FILES_CHKSUM += "file://webhelper/COPYING;md5=d32239bcb673463ab874e80d47fae504"
+#LICENSE_${PN}-webhelper = "GPLv3"
+#FILES_${PN}-webhelper = "${libdir}/geany/webhelper.so"
+#RDEPENDS_${PN}-webhelper = "${PN}"
+
+PLUGINS += "${PN}-xmlsnippets"
+LIC_FILES_CHKSUM += "file://xmlsnippets/COPYING;md5=4325afd396febcb659c36b49533135d4"
+FILES_${PN}-xmlsnippets = "${libdir}/geany/xmlsnippets.so"
+RDEPENDS_${PN}-xmlsnippets = "${PN}"
+
+PACKAGES =+ "${PLUGINS}"
+RDEPENDS_${PN} = "${PLUGINS}"
+ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.30.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.30.1.bb
deleted file mode 100644
index e316ea7..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.30.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "A fast and lightweight IDE"
-HOMEPAGE = "http://www.geany.org/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=bd7b2c994af21d318bd2cd3b3f80c2d5"
-
-DEPENDS = "gtk+ libxml-parser-perl-native python3-docutils-native intltool-native"
-
-inherit autotools pkgconfig perlnative pythonnative gettext
-
-SRC_URI = "http://download.geany.org/${BP}.tar.bz2"
-SRC_URI[md5sum] = "75081b600560c5c8366eda0e1b8cc531"
-SRC_URI[sha256sum] = "0ac360f1f3d6c28790a81d570252a7d40421f6e1d8e5a8d653756bd041d88491"
-
-FILES_${PN} += "${datadir}/icons"
-
-EXTRA_OECONF = "--disable-html-docs"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.31.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.31.bb
new file mode 100644
index 0000000..ce36e1e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.31.bb
@@ -0,0 +1,16 @@
+SUMMARY = "A fast and lightweight IDE"
+HOMEPAGE = "http://www.geany.org/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bd7b2c994af21d318bd2cd3b3f80c2d5"
+
+DEPENDS = "gtk+ libxml-parser-perl-native python3-docutils-native intltool-native"
+
+inherit autotools pkgconfig perlnative pythonnative gettext
+
+SRC_URI = "http://download.geany.org/${BP}.tar.bz2"
+SRC_URI[md5sum] = "386000be6b26972c6a699939c37cda34"
+SRC_URI[sha256sum] = "30fdb906bb76c4251a8bcf83ee267db28c26ef6ab867668a782cec1164a3aba5"
+
+FILES_${PN} += "${datadir}/icons"
+
+EXTRA_OECONF = "--disable-html-docs"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade/remove-yelp-help-rules-var.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade/remove-yelp-help-rules-var.patch
new file mode 100644
index 0000000..78a8719
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade/remove-yelp-help-rules-var.patch
@@ -0,0 +1,39 @@
+From 42efc94c11d510b41d8cf3407e1c3900eb52b600 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 4 Jun 2015 16:28:02 +0800
+Subject: [PATCH] Remove unused variable (YELP_HELP_RULES)
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ help/Makefile.am | 2 --
+ help/Makefile.in | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/help/Makefile.am b/help/Makefile.am
+index 50c0e84..5c5d2e9 100644
+--- a/help/Makefile.am
++++ b/help/Makefile.am
+@@ -1,5 +1,3 @@
+-@YELP_HELP_RULES@
+-
+ HELP_ID = glade
+ 
+ HELP_FILES = \
+diff --git a/help/Makefile.in b/help/Makefile.in
+index 6978ea5..e1c7d3b 100644
+--- a/help/Makefile.in
++++ b/help/Makefile.in
+@@ -521,8 +521,6 @@ uninstall-am:
+ 
+ .PRECIOUS: Makefile
+ 
+-@YELP_HELP_RULES@
+-
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/files/0001-gnome-doc-utils.make-sysrooted-pkg-config.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0001-gnome-doc-utils.make-sysrooted-pkg-config.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/files/0001-gnome-doc-utils.make-sysrooted-pkg-config.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0001-gnome-doc-utils.make-sysrooted-pkg-config.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/files/0002-fix-gcc-6-build.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0002-fix-gcc-6-build.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/files/0002-fix-gcc-6-build.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0002-fix-gcc-6-build.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.0.bb
new file mode 100644
index 0000000..f33b6e3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.0.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Glade - A User Interface Designer"
+HOMEPAGE = "http://www.gnu.org/software/gnash"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \
+                    file://COPYING.GPL;md5=9ac2e7cff1ddaf48b6eab6028f23ef88 \
+                    file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475"
+DEPENDS = "gtk+ gtk+3 glib-2.0 libxml2 intltool-native \
+           gnome-common-native \
+"
+
+
+inherit autotools pkgconfig gnomebase gobject-introspection
+
+SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade/3.20/glade-${PV}.tar.xz \
+           file://remove-yelp-help-rules-var.patch \
+          "
+SRC_URI[md5sum] = "9964a2da14c5f845eae363889586ca43"
+SRC_URI[sha256sum] = "82d96dca5dec40ee34e2f41d49c13b4ea50da8f32a3a49ca2da802ff14dc18fe"
+
+EXTRA_OECONF += "--disable-man-pages"
+
+FILES_${PN} += "${datadir}/* ${libdir}/glade/modules/libgladegtk.so"
+FILES_${PN}-dev += "${libdir}/glade/modules/libgladegtk.la"
+FILES_${PN}-dbg += "${libdir}/glade/modules/.debug/libgladegtk.so"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch
new file mode 100644
index 0000000..5b9afd9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch
@@ -0,0 +1,54 @@
+From 86b4d398dbb95e2437b70eba3b30e995ec9be505 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Aug 2017 20:47:50 -0700
+Subject: [PATCH] Fix printd formatting strings
+
+Fixes
+error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/ipfilter.c | 2 +-
+ src/othptab.c  | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ipfilter.c b/src/ipfilter.c
+index eb17ec7..8c76e4c 100644
+--- a/src/ipfilter.c
++++ b/src/ipfilter.c
+@@ -146,7 +146,7 @@ void gethostparams(struct hostparams *data, char *init_saddr, char *init_smask,
+ 				snprintf(msgstr, 60,
+ 					 "Invalid protocol input at or near token \"%s\"",
+ 					 bptr);
+-				tui_error(ANYKEY_MSG, msgstr);
++				tui_error(ANYKEY_MSG, "%s", msgstr);
+ 				doagain = 1;
+ 			} else
+ 				doagain = 0;
+diff --git a/src/othptab.c b/src/othptab.c
+index 142c9c2..fe395c2 100644
+--- a/src/othptab.c
++++ b/src/othptab.c
+@@ -410,7 +410,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry,
+ 				break;
+ 			}
+ 
+-			sprintf(scratchpad, rarp_mac_addr);
++			sprintf(scratchpad, "%s", rarp_mac_addr);
+ 			strcat(msgstring, scratchpad);
+ 			wattrset(table->othpwin, ARPATTR);
+ 			break;
+@@ -485,7 +485,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry,
+ 		wattrset(table->othpwin, UNKNIPATTR);
+ 		protptr = getprotobynumber(entry->protocol);
+ 		if (protptr != NULL) {
+-			sprintf(protname, protptr->p_aliases[0]);
++			sprintf(protname, "%s", protptr->p_aliases[0]);
+ 		} else {
+ 			sprintf(protname, "IP protocol");
+ 			unknown = 1;
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch
new file mode 100644
index 0000000..65b92da
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch
@@ -0,0 +1,81 @@
+Use pkg-config to search for ncurses libraries
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: iptraf-ng-1.1.4/Makefile
+===================================================================
+--- iptraf-ng-1.1.4.orig/Makefile
++++ iptraf-ng-1.1.4/Makefile
+@@ -205,8 +205,8 @@ endif
+ 
+ ifndef NCURSES_LDFLAGS
+ ifdef NEEDS_NCURSES5
+-	NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null)
+-	NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null)
++	NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null)
++	NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null)
+ 	ifndef NO_PANEL
+ 		NCURSES_LDFLAGS += -lpanel
+ 	endif
+@@ -215,8 +215,8 @@ endif
+ 
+ ifndef NCURSES_LDFLAGS
+ ifdef NEEDS_NCURSESW5
+-	NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null)
+-	NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null)
++	NCURSES_CFLAGS := $(shell p[k-config ncursesw --cflags 2>/dev/null)
++	NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
+ 	ifndef NO_PANEL
+ 		NCURSES_LDFLAGS += -lpanel
+ 	endif
+@@ -225,8 +225,8 @@ endif
+ 
+ ifndef NCURSES_LDFLAGS
+ ifdef NEEDS_NCURSES6
+-	NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null)
+-	NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null)
++	NCURSES_CFLAGS := $(shell pkg-config ncurses6 --cflags 2>/dev/null)
++	NCURSES_LDFLAGS := $(shell pkg-config ncurses6 --libs 2>/dev/null)
+ 	ifndef NO_PANEL
+ 		NCURSES_LDFLAGS += -lpanel
+ 	endif
+@@ -235,8 +235,8 @@ endif
+ 
+ ifndef NCURSES_LDFLAGS
+ ifdef NEEDS_NCURSESW6
+-	NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null)
+-	NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null)
++	NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
++	NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
+ 	ifndef NO_PANEL
+ 		NCURSES_LDFLAGS += -lpanel
+ 	endif
+@@ -246,17 +246,17 @@ endif
+ # try find ncuses by autodetect
+ ifndef NCURSES_LDFLAGS
+ 	ifneq ($(shell ncursesw6-config --libs 2>/dev/null),)
+-		NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null)
+-		NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null)
+-	else ifneq ($(shell ncurses6-config --libs 2>/dev/null),)
+-		NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null)
+-		NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null)
+-	else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),)
+-		NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null)
+-		NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null)
+-	else ifneq ($(shell ncurses5-config --libs 2>/dev/null),)
+-		NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null)
+-		NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null)
++		NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
++		NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
++	else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),)
++		NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null)
++		NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null)
++	else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),)
++		NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
++		NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
++	else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),)
++		NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null)
++		NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null)
+ 	endif
+ 
+ 	ifneq ($(NCURSES_LDFLAGS),)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb
new file mode 100644
index 0000000..c53e663
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb
@@ -0,0 +1,42 @@
+# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "A console-based network monitoring utility"
+DESCRIPTION = "IPTraf-ng is a console-based network monitoring utility.  IPTraf gathers \
+data like TCP connection packet and byte counts, interface statistics \
+and activity indicators, TCP/UDP traffic breakdowns, and LAN station \
+packet and byte counts.  IPTraf-ng features include an IP traffic monitor \
+which shows TCP flag information, packet and byte counts, ICMP \
+details, OSPF packet types, and oversized IP packet warnings; \
+interface statistics showing IP, TCP, UDP, ICMP, non-IP and other IP \
+packet counts, IP checksum errors, interface activity and packet size \
+counts; a TCP and UDP service monitor showing counts of incoming and \
+outgoing packets for common TCP and UDP application ports, a LAN \
+statistics module that discovers active hosts and displays statistics \
+about their activity; TCP, UDP and other protocol display filters so \
+you can view just the traffic you want; logging; support for Ethernet, \
+FDDI, ISDN, SLIP, PPP, and loopback interfaces; and utilization of the \
+built-in raw socket interface of the Linux kernel, so it can be used \
+on a wide variety of supported network cards."
+
+HOMEPAGE = "https://fedorahosted.org/iptraf-ng/"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e2b3850593b899b1a17594ed4cc4c731"
+DEPENDS = "ncurses"
+
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/iptraf-ng/iptraf-ng-1.1.4.tar.gz/e0f8df3b7baf2b5106709abc4f8c029a/${BP}.tar.gz \
+           file://ncurses-config.patch \
+           file://0001-Fix-printd-formatting-strings.patch \
+           "
+SRC_URI[md5sum] = "e0f8df3b7baf2b5106709abc4f8c029a"
+SRC_URI[sha256sum] = "16b9b05bf5d3725d86409b901696639ad46944d02de6def87b1ceae5310dd35c"
+
+inherit autotools-brokensep pkgconfig
+
+CFLAGS += "-D_GNU_SOURCE"
+
+PROVIDES = "iptraf"
+RPROVIDES_${PN} += "iptraf"
+RREPLACES_${PN} += "iptraf"
+RCONFLICTS_${PN} += "iptraf"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/0001-src-Fix-error-in-cross-compile.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/0001-src-Fix-error-in-cross-compile.patch
deleted file mode 100644
index 291ed31..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/0001-src-Fix-error-in-cross-compile.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 27910ea19260b7f7a3f9c0465addd1dea80cf3bd Mon Sep 17 00:00:00 2001
-From: Li Xin <lixin.fnst@cn.fujitsu.com>
-Date: Thu, 8 Oct 2015 15:11:17 +0900
-Subject: [PATCH] src: Fix error in cross-compile
-
-The errors are like this:
-tcptable.h:26:25: fatal error: linux/if_tr.h: No such file or directory
-ld: cannot find -ltextbox
-
-Upstream-Status: pending
-
-Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
----
- src/Makefile     | 2 +-
- src/hostmon.c    | 2 +-
- src/install.sh   | 4 ++--
- src/othptab.c    | 2 +-
- src/packet.c     | 2 +-
- src/tcptable.h   | 2 +-
- src/tr.c         | 2 +-
- support/Makefile | 3 +--
- 8 files changed, 9 insertions(+), 10 deletions(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index 2043c2d..0f77bea 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -39,7 +39,7 @@ LDOPTS		= #-static
- # you may want to change this to point to your ncurses include directory
- # if the ncurses include files are not in the default location.
- 
--INCLUDEDIR	= -I/usr/include/ncurses -I../support
-+INCLUDEDIR	=  -I../support
- 
- # You can uncomment this one to disable the backspace key in input fields.
- # This means you must use the Del key or Ctrl+H combination to erase the
-diff --git a/src/hostmon.c b/src/hostmon.c
-index 14df2c8..6571562 100644
---- a/src/hostmon.c
-+++ b/src/hostmon.c
-@@ -31,7 +31,7 @@ details.
- #include <linux/if_packet.h>
- #include <linux/if_ether.h>
- #include <linux/if_fddi.h>
--#include <linux/if_tr.h>
-+#include <netinet/if_tr.h>
- #include <net/if_arp.h>
- #include <stdlib.h>
- #include <time.h>
-diff --git a/src/install.sh b/src/install.sh
-index d2fd360..36d3516 100755
---- a/src/install.sh
-+++ b/src/install.sh
-@@ -23,9 +23,9 @@ echo
- echo "*** Installing executable programs and preparing work directories"
- echo
- echo ">>> Installing iptraf in $TARGET"
--$INSTALL -m 0700 -o root -g root -s iptraf $TARGET
-+$INSTALL -m 0700 -o root -g root  iptraf $TARGET
- echo ">>> Installing rvnamed in $TARGET"
--$INSTALL -m 0700 -o root -g root -s rvnamed $TARGET
-+$INSTALL -m 0700 -o root -g root  rvnamed $TARGET
- 
- if [ ! -d $WORKDIR ]; then
-     echo ">>> Creating IPTraf work directory $WORKDIR"
-diff --git a/src/othptab.c b/src/othptab.c
-index 97771d1..a8bb536 100644
---- a/src/othptab.c
-+++ b/src/othptab.c
-@@ -18,7 +18,7 @@ details.
- 
- #include <asm/types.h>
- #include <linux/if_ether.h>
--#include <linux/if_tr.h>
-+#include <netinet/if_tr.h>
- #include <linux/if_fddi.h>
- #include <winops.h>
- #include "arphdr.h"
-diff --git a/src/packet.c b/src/packet.c
-index 33fdf2a..1e2b81b 100644
---- a/src/packet.c
-+++ b/src/packet.c
-@@ -36,7 +36,7 @@ details.
- #include <linux/if_packet.h>
- #include <linux/if_ether.h>
- #include <linux/if_fddi.h>
--#include <linux/if_tr.h>
-+#include <netinet/if_tr.h>
- #include <linux/isdn.h>
- #include <linux/sockios.h>
- #include <msgboxes.h>
-diff --git a/src/tcptable.h b/src/tcptable.h
-index 3e17793..d1380b5 100644
---- a/src/tcptable.h
-+++ b/src/tcptable.h
-@@ -23,7 +23,7 @@
- #include <linux/if_packet.h>
- #include <linux/if_ether.h>
- #include <linux/if_fddi.h>
--#include <linux/if_tr.h>
-+#include <netinet/if_tr.h>
- #include <net/if.h>
- #include <netinet/ip.h>
- #include <netinet/udp.h>
-diff --git a/src/tr.c b/src/tr.c
-index 40c9e63..11f8045 100644
---- a/src/tr.c
-+++ b/src/tr.c
-@@ -7,7 +7,7 @@
-  */
- 
- #include <asm/types.h>
--#include <linux/if_tr.h>
-+#include <netinet/if_tr.h>
- #include <netinet/in.h>
- 
- unsigned int get_tr_ip_offset(unsigned char *pkt)
-diff --git a/support/Makefile b/support/Makefile
-index 114bfc3..c962c09 100644
---- a/support/Makefile
-+++ b/support/Makefile
-@@ -1,4 +1,3 @@
--INCLUDEDIR		= -I/usr/include/ncurses
- 
- OBJS			= input.o menurt.o listbox.o winops.o labels.o \
- 				msgboxes.o txbox.o
-@@ -12,7 +11,7 @@ libtextbox.a: $(OBJS)
- #	gcc -shared -o libtextbox.so $(OBJS)
- 
- %.o: %.c *.h
--	gcc -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $<
-+	${CC} -O2 -g -Wall -fPIC  -c -o $*.o $<
- 
- clean:
- 	rm -rf *.o *~ libtextbox.a libtextbox.so
--- 
-1.8.4.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
deleted file mode 100644
index 5f96f0f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Index: iptraf-3.0.0/src/othptab.c
-===================================================================
---- iptraf-3.0.0.orig/src/othptab.c
-+++ iptraf-3.0.0/src/othptab.c
-@@ -335,7 +335,7 @@ void printothpentry(struct othptable *ta
-                 break;
-             }
- 
--            sprintf(scratchpad, inet_ntoa(saddr));
-+            sprintf(scratchpad, "%s", inet_ntoa(saddr));
-             strcat(msgstring, scratchpad);
-             wattrset(table->othpwin, ARPATTR);
-             break;
-@@ -354,7 +354,7 @@ void printothpentry(struct othptable *ta
-                 break;
-             }
- 
--            sprintf(scratchpad, rarp_mac_addr);
-+            sprintf(scratchpad, "%s", rarp_mac_addr);
-             strcat(msgstring, scratchpad);
-             wattrset(table->othpwin, ARPATTR);
-             break;
-@@ -421,7 +421,7 @@ void printothpentry(struct othptable *ta
-         wattrset(table->othpwin, UNKNIPATTR);
-         protptr = getprotobynumber(entry->protocol);
-         if (protptr != NULL) {
--            sprintf(protname, protptr->p_aliases[0]);
-+            sprintf(protname, "%s", protptr->p_aliases[0]);
-         } else {
-             sprintf(protname, "IP protocol");
-             unknown = 1;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch
deleted file mode 100644
index c84a0a0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Index: iptraf-3.0.0/src/Makefile
-===================================================================
---- iptraf-3.0.0.orig/src/Makefile
-+++ iptraf-3.0.0/src/Makefile
-@@ -5,7 +5,7 @@
- #
- # Architecture determination string borrowed from the kernel makefile.
- #
--ARCH 		:= $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-+ARCH 		?= $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
- 			-e s/arm.*/arm/ -e s/sa110/arm/)
- PLATFORM 	= -DPLATFORM=\"$(shell uname -s)/$(ARCH)\"
- VERNUMBER	:= $(shell cat version)
-@@ -17,7 +17,7 @@ VERSION 	= -DVERSION=\"$(VERNUMBER)\"
- #
- BINDIR		= ../../iptraf-$(VERNUMBER).bin.$(ARCH)
- 
--CC		= gcc
-+CC		= $(CC)
- LIBS		= -L../support -ltextbox -lpanel -lncurses   # in this order!
- 
- # comment this one out to omit debug code when done.
-@@ -31,10 +31,10 @@ PROF		= #-pg
- # options to be passed to the compiler.  I don't believe they need to be
- # modified (except for -m486 on non-Intel x86 platforms).
- 
--CFLAGS		= -Wall #-O2 #-m486
-+CFLAGS		?= -Wall #-O2 #-m486
- DIRS		= -DWORKDIR=\"$(WORKDIR)\" \
- 		  -DLOGDIR=\"$(LOGDIR)\" -DEXECDIR=\"$(TARGET)\"
--LDOPTS		= #-static
-+LDOPTS		?= #-static
- 
- # you may want to change this to point to your ncurses include directory
- # if the ncurses include files are not in the default location.
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb
deleted file mode 100644
index abfab02..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-DESCRIPTION = "IPTraf is a console-based network statistics utility for Linux. \
-It gathers a variety of figures such as TCP connection packet and byte counts, \
-interface statistics and activity indicators, TCP/UDP traffic breakdowns, \
-and LAN station packet and byte counts."
-
-HOMEPAGE = "http://iptraf.seul.org"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dc0bdc29df738baf327368b1bbb15a45"
-
-DEPENDS = "ncurses"
-
-SRC_URI = " \
-    ftp://iptraf.seul.org/pub/iptraf/iptraf-3.0.0.tar.gz \
-    file://0001-src-Fix-error-in-cross-compile.patch \
-    file://format_string.patch \
-    file://ldopts.patch \
-"
-SRC_URI[md5sum] = "377371c28ee3c21a76f7024920649ea8"
-SRC_URI[sha256sum] = "9ee433d95573d612539da4b452e6cdcbca6ab6674a88bfbf6eaf12d4902b5163"
-RDEPENDS_${PN} = "ncurses"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS= LDOPTS='${LDFLAGS}' ARCH='${TARGET_ARCH}'"
-
-do_compile() {
-    oe_runmake -C src all
-}
-
-do_install_append() {
-    rm -r ${D}/${localstatedir}/run
-}
-
-do_install() {
-    install -d ${D}${bindir}
-    oe_runmake -C src install \
-        TARGET=${D}${bindir} \
-        WORKDIR=${D}${localstatedir}/local/iptraf \
-        LOGDIR=${D}${localstatedir}/log/iptraf \
-        LOCKDIR=${D}${localstatedir}/run/iptraf
-}
-
-FILES_${PN} += "${bindir} ${localstatedir} /run"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/json-spirit/json-spirit/0001-Link-to-libatomic.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/json-spirit/json-spirit/0001-Link-to-libatomic.patch
new file mode 100644
index 0000000..4c8c7b9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/json-spirit/json-spirit/0001-Link-to-libatomic.patch
@@ -0,0 +1,64 @@
+From bbac9ac3e391253bc1f90cf0f70a2ce1aac9511f Mon Sep 17 00:00:00 2001
+From: Ming Liu <liu.ming50@gmail.com>
+Date: Wed, 30 Aug 2017 16:50:56 +0200
+Subject: [PATCH] Link to libatomic
+
+This is needed for clang compiler.
+
+Upstream-Status: Pending
+
+Signed-off-by: Ming Liu <liu.ming50@gmail.com>
+---
+ json_demo/CMakeLists.txt              | 2 +-
+ json_headers_only_demo/CMakeLists.txt | 2 +-
+ json_map_demo/CMakeLists.txt          | 2 +-
+ json_test/CMakeLists.txt              | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/json_demo/CMakeLists.txt b/json_demo/CMakeLists.txt
+index b1d3c6a..0dfd308 100644
+--- a/json_demo/CMakeLists.txt
++++ b/json_demo/CMakeLists.txt
+@@ -5,5 +5,5 @@ FIND_PACKAGE(Boost 1.34 REQUIRED)
+ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
+ 
+ ADD_EXECUTABLE(json_demo ${JSON_DEMO_SRCS})
+-TARGET_LINK_LIBRARIES(json_demo json_spirit)
++TARGET_LINK_LIBRARIES(json_demo json_spirit -latomic)
+ 
+diff --git a/json_headers_only_demo/CMakeLists.txt b/json_headers_only_demo/CMakeLists.txt
+index a3c787a..6eae11e 100644
+--- a/json_headers_only_demo/CMakeLists.txt
++++ b/json_headers_only_demo/CMakeLists.txt
+@@ -5,5 +5,5 @@ FIND_PACKAGE(Boost 1.34 REQUIRED)
+ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
+ 
+ ADD_EXECUTABLE(json_headers_only_demo ${JSON_HEADERS_ONLY_DEMO_SRCS})
+-TARGET_LINK_LIBRARIES(json_headers_only_demo json_spirit)
++TARGET_LINK_LIBRARIES(json_headers_only_demo json_spirit -latomic)
+ 
+diff --git a/json_map_demo/CMakeLists.txt b/json_map_demo/CMakeLists.txt
+index 599006a..e3e45e8 100644
+--- a/json_map_demo/CMakeLists.txt
++++ b/json_map_demo/CMakeLists.txt
+@@ -5,5 +5,5 @@ FIND_PACKAGE(Boost 1.34 REQUIRED)
+ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
+ 
+ ADD_EXECUTABLE(json_map_demo ${JSON_MAP_DEMO_SRCS})
+-TARGET_LINK_LIBRARIES(json_map_demo json_spirit)
++TARGET_LINK_LIBRARIES(json_map_demo json_spirit -latomic)
+ 
+diff --git a/json_test/CMakeLists.txt b/json_test/CMakeLists.txt
+index 38ffa7f..1ec1365 100644
+--- a/json_test/CMakeLists.txt
++++ b/json_test/CMakeLists.txt
+@@ -11,5 +11,5 @@ FIND_PACKAGE(Boost 1.34 REQUIRED)
+ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
+ 
+ ADD_EXECUTABLE(json_test ${JSON_TEST_SRCS})
+-TARGET_LINK_LIBRARIES(json_test json_spirit)
++TARGET_LINK_LIBRARIES(json_test json_spirit -latomic)
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
index 2f456bf..c7c1ad1 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
@@ -11,14 +11,13 @@
 
 SRC_URI = "file://json_spirit_v${PV}.zip \
            file://0001-Adjust-the-cmake-files.patch \
+           file://0001-Link-to-libatomic.patch \
 "
 
 S = "${WORKDIR}/json_spirit_v${PV}"
 
 DEPENDS = "boost"
 
-LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
-
 inherit cmake
 
 FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibJsonSpirit.cmake"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.0.bb
deleted file mode 100644
index fe6ae24..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "JSON C++ lib used to read and write json file."
-DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
-               and writer in C++. JSON (JavaScript Object Notation) is a \
-               lightweight data-interchange format. It is easy for humans to \
-               read and write. It is easy for machines to parse and generate."
-
-HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
-
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c56ee55c03a55f8105b969d8270632ce"
-
-SRCREV = "f700fe455940d4d325c088b9174a173e130e0fa8"
-SRC_URI = "git://github.com/open-source-parsers/jsoncpp"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.3.bb
new file mode 100644
index 0000000..b7a02ef
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.3.bb
@@ -0,0 +1,21 @@
+SUMMARY = "JSON C++ lib used to read and write json file."
+DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
+               and writer in C++. JSON (JavaScript Object Notation) is a \
+               lightweight data-interchange format. It is easy for humans to \
+               read and write. It is easy for machines to parse and generate."
+
+HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
+
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b"
+
+SRCREV = "2de18021fcb11370e9b5a1fbe7dcfd673533a134"
+SRC_URI = "git://github.com/open-source-parsers/jsoncpp"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Makefile-ensure-frontends-exits-before-writing-into-.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Makefile-ensure-frontends-exits-before-writing-into-.patch
new file mode 100644
index 0000000..a5263c6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Makefile-ensure-frontends-exits-before-writing-into-.patch
@@ -0,0 +1,32 @@
+From 780b0b8e48551ba49b011caeeb09101a09c14a61 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Fri, 26 May 2017 17:11:32 +0100
+Subject: [PATCH] Makefile: ensure frontends/ exits before writing into it
+
+As previously, if GCC dependencies are not being written and the build is out of
+tree then frontends/ won't exist so we need to create it.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
+(cherry picked from commit f7986375129d1ada7dc6abeeec5b9d00ef6f7149)
+Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1baa110..434db5d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -171,6 +171,7 @@ if COND_kconfig
+ bin_SCRIPTS += frontends/kconfig
+ 
+ frontends/kconfig: frontends/kconfig.in
++	$(MKDIR_P) $(@D)
+ 	$(AM_V_GEN)$(SED) -e 's/@KCFG_LIST@/$(kcfg_list)/g' \
+ 		$< >$@
+ 	@chmod +x $@
+-- 
+2.12.0
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Switch-utils-kconfig-diff-to-use-Python-3.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Switch-utils-kconfig-diff-to-use-Python-3.patch
new file mode 100644
index 0000000..b8f8904
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/files/0001-Switch-utils-kconfig-diff-to-use-Python-3.patch
@@ -0,0 +1,26 @@
+From 3b9b0f82c33f793a14d44bf06b6c8136bc3fc4bf Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 27 Apr 2017 16:48:42 +0300
+Subject: [PATCH] Switch utils/kconfig-diff to use Python 3
+
+The script supports it, but continues to refer to 2.x in shebang.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ utils/kconfig-diff | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/kconfig-diff b/utils/kconfig-diff
+index 0db267d..19189f3 100755
+--- a/utils/kconfig-diff
++++ b/utils/kconfig-diff
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ #
+ # diffconfig - a tool to compare .config files.
+ #
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb
new file mode 100644
index 0000000..df08b8b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb
@@ -0,0 +1,41 @@
+# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Linux kernel style configuration framework for other projects"
+DESCRIPTION = "The kconfig-frontends project aims at centralising \
+the effort of keeping an up-to-date, out-of-tree, packaging of the \
+kconfig infrastructure, ready for use by third-party projects. \
+The kconfig-frontends package provides the kconfig parser, as well as all \
+the frontends"
+HOMEPAGE = "http://ymorin.is-a-geek.org/projects/kconfig-frontends"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9b8cf60ff39767ff04b671fca8302408"
+SECTION = "devel"
+DEPENDS += "ncurses flex bison gperf-native"
+RDEPENDS_${PN} += "python3 bash"
+SRC_URI = "git://ymorin.is-a-geek.org/kconfig-frontends;branch=4.11.x \
+	   file://0001-Makefile-ensure-frontends-exits-before-writing-into-.patch \
+           file://0001-Switch-utils-kconfig-diff-to-use-Python-3.patch"
+
+SRCREV = "f22fce3a308be1c7790ebefc6bbedb33c5f7c86a"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+do_configure_prepend () {
+	mkdir -p ${S}/scripts/.autostuff/m4
+}
+
+do_install_append() {
+	ln -s kconfig-conf ${D}${bindir}/conf
+	ln -s kconfig-mconf ${D}${bindir}/mconf
+}
+
+EXTRA_OECONF += "--disable-gconf --disable-qconf"
+
+# Some packages have the version preceeding the .so instead properly
+# versioned .so.<version>, so we need to reorder and repackage.
+SOLIBS = "-${@d.getVar('PV')[:-2]}.so"
+FILES_SOLIBSDEV = "${libdir}/libkconfig-parser.so"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-Add-CMake-build-files.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-Add-CMake-build-files.patch
index cd0d143..560c3a6 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-Add-CMake-build-files.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-Add-CMake-build-files.patch
@@ -53,7 +53,7 @@
 +####################################################################
 +INCLUDE (${CMAKE_SOURCE_DIR}/VERSION.cmake)
 +
-+SET (LIBRCF_LIBRARIES "-lpthread -ldl")
++SET (LIBRCF_LIBRARIES "-lpthread -ldl -latomic")
 +INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/include)
 +
 +IF (LIBRCF_USE_OPENSSL)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-Check-for-__powerpc__-define.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-Check-for-__powerpc__-define.patch
new file mode 100644
index 0000000..d91accf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-Check-for-__powerpc__-define.patch
@@ -0,0 +1,28 @@
+From ac7316679e30f7013604b19aa0949a0744e91d2f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 1 Jul 2017 13:06:30 -0700
+Subject: [PATCH] Check for __powerpc__ define
+
+Also check for gcc's internal define for ppc platform
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/RCF/ByteOrdering.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/RCF/ByteOrdering.cpp b/src/RCF/ByteOrdering.cpp
+index 278ca80..9f9c446 100755
+--- a/src/RCF/ByteOrdering.cpp
++++ b/src/RCF/ByteOrdering.cpp
+@@ -36,7 +36,7 @@ namespace RCF {
+ 
+     const ByteOrder MachineByteOrder = BigEndian;
+ 
+-#elif defined( __ppc__ )
++#elif defined( __ppc__ ) || defined( __powerpc__ )
+ 
+     const ByteOrder MachineByteOrder = BigEndian;
+ 
+-- 
+2.13.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-ClientStub.hpp-fix-a-clang-compiling-issue.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-ClientStub.hpp-fix-a-clang-compiling-issue.patch
new file mode 100644
index 0000000..e949dee
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/0001-ClientStub.hpp-fix-a-clang-compiling-issue.patch
@@ -0,0 +1,35 @@
+From d78851b6f87f2472f041102d7b3726ffc009bfad Mon Sep 17 00:00:00 2001
+From: Ming Liu <peter.x.liu@external.atlascopco.com>
+Date: Tue, 6 Jun 2017 05:54:20 +0200
+Subject: [PATCH] ClientStub.hpp: fix a clang compiling issue
+
+A error was observed with clang compiler, as follows:
+| src/RCF/RCF.cpp:49:
+| src/RCF/ClientStub.cpp:28:
+| include/RCF/Future.hpp:49:26: error: 'enrol' is a private member of 'RCF::ClientStub'
+
+it can be fixed by declaring Future as a friend class of ClientStub.
+
+Upstream-Status: Pending
+
+Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
+---
+ include/RCF/ClientStub.hpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/RCF/ClientStub.hpp b/include/RCF/ClientStub.hpp
+index 9882cf4..8465625 100755
+--- a/include/RCF/ClientStub.hpp
++++ b/include/RCF/ClientStub.hpp
+@@ -372,6 +372,8 @@ namespace RCF {
+ 
+     private:
+ 
++        template<typename U>
++        friend class Future;
+         friend class FutureImplBase;
+ 
+         template<
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/aarch64-support.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/aarch64-support.patch
index 28cd0fe..e08efb9 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/aarch64-support.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/aarch64-support.patch
@@ -3,11 +3,11 @@
 --- RCF-2.2.0.0.orig/src/RCF/ByteOrdering.cpp
 +++ RCF-2.2.0.0/src/RCF/ByteOrdering.cpp
 @@ -60,7 +60,7 @@ namespace RCF {
- 

-     const ByteOrder MachineByteOrder = LittleEndian;

- 

--#elif defined(__arm__)

-+#elif defined(__arm__) || defined(__aarch64__)

- 

-     const ByteOrder MachineByteOrder = LittleEndian;

- 

+ 
+     const ByteOrder MachineByteOrder = LittleEndian;
+ 
+-#elif defined(__arm__)
++#elif defined(__arm__) || defined(__aarch64__)
+ 
+     const ByteOrder MachineByteOrder = LittleEndian;
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/mips-support.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/mips-support.patch
new file mode 100644
index 0000000..4a327f7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf/mips-support.patch
@@ -0,0 +1,19 @@
+Index: RCF-2.2.0.0/src/RCF/ByteOrdering.cpp
+===================================================================
+--- RCF-2.2.0.0.orig/src/RCF/ByteOrdering.cpp
++++ RCF-2.2.0.0/src/RCF/ByteOrdering.cpp
+@@ -64,6 +64,14 @@ namespace RCF {
+ 
+     const ByteOrder MachineByteOrder = LittleEndian;
+ 
++#elif defined(__mipsel__) || defined(__mips64el__)
++
++    const ByteOrder MachineByteOrder = LittleEndian;
++
++#elif defined( __mips__ ) || defined(__mips64__)
++
++    const ByteOrder MachineByteOrder = BigEndian;
++
+ #elif defined(__bfin__)
+ 
+     const ByteOrder MachineByteOrder = LittleEndian;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb
index 51ad7ec..43eff72 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb
@@ -8,19 +8,22 @@
 SECTION = "libs"
 PRIORITY = "optional"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://license.txt;md5=137c2935b51c95068a8b1bbd434ffe2d"
+LIC_FILES_CHKSUM = "file://license.txt;md5=7586a312b9e978f9d6fac9a5780d1f84"
 
 SRC_URI = "http://www.deltavsoft.com/downloads/RCF-${PV}.tar.gz \
            file://0001-Add-CMake-build-files.patch \
            file://aarch64-support.patch \
-          "
+           file://0001-ClientStub.hpp-fix-a-clang-compiling-issue.patch \
+           file://mips-support.patch \
+           file://0001-Check-for-__powerpc__-define.patch \
+           "
 
 SRC_URI[md5sum] = "7ecb3c73f7eb66dba8790b659374f690"
 SRC_URI[sha256sum] = "bbfcc88de502c39604878c395f516b03fff4eac63eb4f7f44c07d433839712dd"
 
 S = "${WORKDIR}/RCF-${PV}"
 
-inherit cmake
+inherit cmake dos2unix
 
 PACKAGECONFIG ?= "zlib openssl sf-serialization boost-filesystem boost-asio protobuf json dll static shared demos"
 PACKAGECONFIG[zlib] = "-DLIBRCF_USE_ZLIB=ON,-DLIBRCF_USE_ZLIB=OFF,zlib,zlib"
@@ -31,8 +34,8 @@
 PACKAGECONFIG[boost-serialization] = "-DLIBRCF_USE_BOOST_SERIALIZATION=ON,-DLIBRCF_USE_BOOST_SERIALIZATION=OFF,boost,"
 PACKAGECONFIG[boost-filesystem] = "-DLIBRCF_USE_BOOST_FILESYSTEM=ON,-DLIBRCF_USE_BOOST_FILESYSTEM=OFF,boost,"
 PACKAGECONFIG[boost-asio] = "-DLIBRCF_USE_BOOST_ASIO=ON,-DLIBRCF_USE_BOOST_ASIO=OFF,boost,"
-PACKAGECONFIG[protobuf] = "-DLIBRCF_USE_PROTOBUF=ON,-DLIBRCF_USE_PROTOBUF=OFF,protobuf,"
-PACKAGECONFIG[json] = "-DLIBRCF_USE_JSON=ON,-DLIBRCF_USE_JSON=OFF,json-spirit,"
+PACKAGECONFIG[protobuf] = "-DLIBRCF_USE_PROTOBUF=ON,-DLIBRCF_USE_PROTOBUF=OFF,protobuf,protobuf"
+PACKAGECONFIG[json] = "-DLIBRCF_USE_JSON=ON,-DLIBRCF_USE_JSON=OFF,json-spirit,json-spirit"
 PACKAGECONFIG[ipv6] = "-DLIBRCF_USE_IPV6=ON,-DLIBRCF_USE_IPV6=OFF,"
 PACKAGECONFIG[custom-allocator] = "-DLIBRCF_USE_CUSTOM_ALLOCATOR=ON,-DLIBRCF_USE_CUSTOM_ALLOCATOR=OFF,"
 PACKAGECONFIG[dll] = "-DLIBRCF_BUILD_DLL=ON,-DLIBRCF_BUILD_DLL=OFF,"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/libsombok3/libsombok3/0001-configure.ac-fix-cross-compiling-issue.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/libsombok3/libsombok3/0001-configure.ac-fix-cross-compiling-issue.patch
new file mode 100644
index 0000000..1a69287
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/libsombok3/libsombok3/0001-configure.ac-fix-cross-compiling-issue.patch
@@ -0,0 +1,31 @@
+From 9c2ffe825e28d63e2a771135f297e8ffac0dbe81 Mon Sep 17 00:00:00 2001
+From: Ming Liu <liu.ming50@gmail.com>
+Date: Tue, 11 Jul 2017 14:35:30 +0200
+Subject: [PATCH] configure.ac: fix cross-compiling issue
+
+Avoid checking for file existence when cross compiling.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Ming Liu <liu.ming50@gmail.com>
+---
+ configure.ac | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9978852..06b16e3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -120,9 +120,6 @@ AC_ARG_WITH(unicode-version,
+   AC_HELP_STRING(--with-unicode-version=VERSION,
+   [version of Unicode Standard @<:@default=current version@:>@]),
+   UNICODE_VERSION=$withval,UNICODE_VERSION=$DEFAULT_UNICODE_VERSION)
+-AC_CHECK_FILE([lib/$UNICODE_VERSION.c],
+-  AC_MSG_RESULT($UNICODE_VERSION),
+-  AC_MSG_ERROR(Unknown Unicode version $UNICODE_VERSION.))
+ AC_SUBST(UNICODE_VERSION)
+ 
+ # check if code to debug memory allocation is enabled.
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb
new file mode 100644
index 0000000..b83e86a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Sombok - Unicode Text Segmentation Package."
+DESCRIPTION = "Sombok library package performs Line Breaking Algorithm described in \
+Unicode Standard Annex #14 (UAX #14).  East_Asian_Width informative \
+properties defined by Annex #11 (UAX #11) may be concerned to determin \
+breaking positions.  This package also implements "default" Grapheme \
+Cluster segmentation described in Annex #29 (UAX #29)."
+LICENSE = "Artistic-1.0 | GPLv1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5b122a36d0f6dc55279a0ebc69f3c60b"
+
+SRC_URI = "git://github.com/hatukanezumi/sombok.git;protocol=https \
+           file://0001-configure.ac-fix-cross-compiling-issue.patch \
+          "
+
+inherit autotools pkgconfig
+
+# sombok-2.4.0
+SRCREV = "0098d85a037ef5c99a648a3669a077781a45e8cc"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+# Disable libthai support
+EXTRA_OECONF = "--disable-libthai"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/ltp-Do-not-link-against-libfl.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/ltp-Do-not-link-against-libfl.patch
deleted file mode 100644
index 3e4aa73..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/ltp-Do-not-link-against-libfl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001
-From: Chong Lu <Chong.Lu@windriver.com>
-Date: Tue, 11 Mar 2014 14:47:22 +0800
-Subject: [PATCH] ltp: Don't link against libfl
-
-We have already defined yywrap function in scan.l file. After this, we no longer need to
-link against libfl and so no longer get errors about undefined references to yylex.
-
-Upstream-status: Pending
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- pan/Makefile |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pan/Makefile b/pan/Makefile
-index 4cc6466..a4b575b 100644
---- a/pan/Makefile
-+++ b/pan/Makefile
-@@ -31,7 +31,7 @@ CPPFLAGS		+= -Wno-error
- 
- CPPFLAGS		+= -I$(abs_srcdir)
- 
--LDLIBS			+= -lm $(LEXLIB)
-+LDLIBS			+= -lm
- 
- LFLAGS			+= -l
- 
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb
deleted file mode 100644
index b13bd7b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb
+++ /dev/null
@@ -1,97 +0,0 @@
-SUMMARY = "Embedded Linux Device Driver Tests based on Linux Test Project"
-HOMEPAGE = "http://arago-project.org/git/projects/test-automation/ltp-ddt.git"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-PROVIDES += "ltp"
-DEPENDS += "zip-native virtual/kernel alsa-lib"
-
-RDEPENDS_${PN} += "pm-qa serialcheck"
-
-inherit autotools module-base kernel-module-split
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-SRCREV = "f086bed6cc88bf102eaad0e96cb7ebe79944a8ad"
-BRANCH ?= "master"
-
-SRC_URI = "git://arago-project.org/git/projects/test-automation/ltp-ddt.git;branch=${BRANCH} \
-    file://ltp-Do-not-link-against-libfl.patch \
-"
-
-S = "${WORKDIR}/git"
-
-LTPROOT = "/opt/ltp"
-
-EXTRA_OEMAKE_append = " \
-    prefix=${LTPROOT} \
-    CROSS_COMPILE=${HOST_PREFIX} \
-    SKIP_IDCHECK=1 \
-    KERNEL_PATH=${STAGING_KERNEL_DIR} \
-    KERNEL_INC=${STAGING_KERNEL_DIR} \
-    KERNEL_USR_INC=${STAGING_INCDIR} \
-    ALSA_INCPATH=${STAGING_INCDIR} \
-    ALSA_LIBPATH=${STAGING_LIBDIR} \
-    PLATFORM=${MACHINE} \
-    RANLIB=${RANLIB} \
-    DESTDIR=${D} \
-    CC='${CC}' \
-    KERNEL_CC='${KERNEL_CC}' \
-"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-FILES_${PN}-dbg += " \
-    ${LTPROOT}/.debug \
-    ${LTPROOT}/bin/.debug \
-    ${LTPROOT}/runtest/.debug \
-    ${LTPROOT}/testcases/bin/.debug \
-    ${LTPROOT}/testcases/bin/*/bin/.debug \
-    ${LTPROOT}/testcases/bin/*/test/.debug \
-    ${LTPROOT}/testcases/bin/ddt/.debug \
-    ${LTPROOT}/testcases/bin/ddt/*/bin/.debug \
-    ${LTPROOT}/testcases/bin/ddt/*/test/.debug \
-    ${LTPROOT}/testcases/realtime/*/*/.debug \
-"
-
-FILES_${PN}-staticdev += "${LTPROOT}/lib"
-FILES_${PN} += "${LTPROOT}/*"
-
-KERNEL_MODULES_META_PACKAGE = "${PN}"
-
-kmoddir = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/ddt"
-
-# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
-# we explicitly force regeneration of that directory and pass configure options.
-do_configure_append() {
-    (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
-}
-
-# The makefiles make excessive use of make -C and several include testcases.mk
-# which triggers a build of the syscall header. To reproduce, build ltp,
-# then delete the header, then "make -j XX" and watch regen.sh run multiple
-# times. Its easier to generate this once here instead.
-do_compile_prepend () {
-    ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h )
-}
-
-do_compile_append () {
-    unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
-    oe_runmake modules
-}
-
-do_install() {
-    oe_runmake install
-    install -d ${D}${datadir}
-    install -d ${D}${kmoddir}
-    mv ${D}${LTPROOT}/testcases/bin/ddt/*.ko ${D}${kmoddir}
-}
-
-# do_make_scripts should be a separate task for the lock to work
-addtask make_scripts before do_compile
-do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
-do_make_scripts[deptask] = "do_populate_sysroot"
-
-# http://errors.yoctoproject.org/Errors/Details/56327/
-PNBLACKLIST[ltp-ddt] ?= "BROKEN: fails since last autotools.bbclass changes - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch
new file mode 100644
index 0000000..76ba7de
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch
@@ -0,0 +1,27 @@
+From 19a3e590c97420bd3952301bf376067c75d0ee32 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 18 Sep 2017 23:45:54 -0700
+Subject: [PATCH] mips/plt.c: Delete include error.h
+
+Its not needed
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/linux-gnu/mips/plt.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/sysdeps/linux-gnu/mips/plt.c b/sysdeps/linux-gnu/mips/plt.c
+index 2d85ad9..9c3ae2f 100644
+--- a/sysdeps/linux-gnu/mips/plt.c
++++ b/sysdeps/linux-gnu/mips/plt.c
+@@ -24,7 +24,6 @@
+ 
+ #include <sys/ptrace.h>
+ #include <errno.h>
+-#include <error.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+ #include <string.h>
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
index 01b3bbe..abe015d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
@@ -24,6 +24,7 @@
            file://0001-Fix-tautological-compare-warning.patch \
            file://0001-Add-support-for-mips64-n32-n64.patch \
            file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \
+           file://0001-mips-plt.c-Delete-include-error.h.patch \
            "
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.3.bb
deleted file mode 100644
index b7995c2..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.3.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-DESCRIPTION = "Lua is a powerful light-weight programming language designed \
-for extending applications."
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=10ffd57d574c60d5b4d6189544e205a9"
-HOMEPAGE = "http://www.lua.org/"
-
-DEPENDS = "readline"
-SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
-           file://lua.pc.in \
-           "
-SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
-           'http://www.lua.org/tests/lua-${PV}-tests.tar.gz;name=tarballtest \
-            file://run-ptest \
-           ', '', d)}"
-
-SRC_URI[tarballsrc.md5sum] = "703f75caa4fdf4a911c1a72e67a27498"
-SRC_URI[tarballsrc.sha256sum] = "5113c06884f7de453ce57702abaac1d618307f33f6789fa870e87a59d772aca2"
-SRC_URI[tarballtest.md5sum] = "76f4fb07f2a4970d554645ac26df86df"
-SRC_URI[tarballtest.sha256sum] = "13154abc20976196119db531b4169ce1ce511755879d40b4192e4173291287e5"
-
-inherit pkgconfig binconfig ptest
-
-UCLIBC_PATCHES += "file://uclibc-pthread.patch"
-SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}"
-
-TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
-EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -DLUA_USE_LINUX -fPIC' MYLDFLAGS='${LDFLAGS}'"
-
-do_configure_prepend() {
-    sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
-}
-
-do_compile () {
-    oe_runmake linux
-}
-
-do_install () {
-    oe_runmake \
-        'INSTALL_TOP=${D}${prefix}' \
-        'INSTALL_BIN=${D}${bindir}' \
-        'INSTALL_INC=${D}${includedir}/' \
-        'INSTALL_MAN=${D}${mandir}/man1' \
-        'INSTALL_SHARE=${D}${datadir}/lua' \
-        'INSTALL_LIB=${D}${libdir}' \
-        'INSTALL_CMOD=${D}${libdir}/lua/5.3' \
-        install
-    install -d ${D}${libdir}/pkgconfig
-
-    sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
-    install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
-    rmdir ${D}${datadir}/lua/5.3
-    rmdir ${D}${datadir}/lua
-}
-
-do_install_ptest () {
-        cp -R --no-dereference --preserve=mode,links -v ${WORKDIR}/lua-${PV}-tests ${D}${PTEST_PATH}/test
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.4.bb
new file mode 100644
index 0000000..8f4e8fe
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.4.bb
@@ -0,0 +1,59 @@
+DESCRIPTION = "Lua is a powerful light-weight programming language designed \
+for extending applications."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=60aa5cfdbd40086501778d9b6ebf29ee"
+HOMEPAGE = "http://www.lua.org/"
+
+DEPENDS = "readline"
+SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
+           file://lua.pc.in \
+           "
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
+           'http://www.lua.org/tests/lua-${PV}-tests.tar.gz;name=tarballtest \
+            file://run-ptest \
+           ', '', d)}"
+
+SRC_URI[tarballsrc.md5sum] = "53a9c68bcc0eda58bdc2095ad5cdfc63"
+SRC_URI[tarballsrc.sha256sum] = "f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c"
+SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3"
+SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f"
+
+inherit pkgconfig binconfig ptest
+
+UCLIBC_PATCHES += "file://uclibc-pthread.patch"
+SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}"
+
+TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
+EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -DLUA_USE_LINUX -fPIC' MYLDFLAGS='${LDFLAGS}'"
+
+do_configure_prepend() {
+    sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
+}
+
+do_compile () {
+    oe_runmake linux
+}
+
+do_install () {
+    oe_runmake \
+        'INSTALL_TOP=${D}${prefix}' \
+        'INSTALL_BIN=${D}${bindir}' \
+        'INSTALL_INC=${D}${includedir}/' \
+        'INSTALL_MAN=${D}${mandir}/man1' \
+        'INSTALL_SHARE=${D}${datadir}/lua' \
+        'INSTALL_LIB=${D}${libdir}' \
+        'INSTALL_CMOD=${D}${libdir}/lua/5.3' \
+        install
+    install -d ${D}${libdir}/pkgconfig
+
+    sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
+    install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
+    rmdir ${D}${datadir}/lua/5.3
+    rmdir ${D}${datadir}/lua
+}
+
+do_install_ptest () {
+        cp -R --no-dereference --preserve=mode,links -v ${WORKDIR}/lua-${PV}-tests ${D}${PTEST_PATH}/test
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit/clang.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit/clang.patch
new file mode 100644
index 0000000..c39ef6f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit/clang.patch
@@ -0,0 +1,19 @@
+clang pretends to be gcc 4.2.0 which is a big lie when it comes
+to features, its same as latest gcc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: LuaJIT-2.0.5/src/lj_arch.h
+===================================================================
+--- LuaJIT-2.0.5.orig/src/lj_arch.h
++++ LuaJIT-2.0.5/src/lj_arch.h
+@@ -313,7 +313,7 @@
+ #error "Need at least GCC 4.2 or newer"
+ #endif
+ #elif !LJ_TARGET_PS3
+-#if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3)
++#if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3) && !defined(__clang__)
+ #error "Need at least GCC 4.3 or newer"
+ #endif
+ #endif
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
deleted file mode 100644
index cee9cc4..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
+++ /dev/null
@@ -1,91 +0,0 @@
-SUMMARY = "Just-In-Time Compiler for Lua"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3992f1fbae3b8b061f9056b7fcda8cc6"
-HOMEPAGE = "http://luajit.org"
-
-SRC_URI = "http://luajit.org/download/LuaJIT-${PV}.tar.gz \
-           file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \
-"
-SRC_URI[md5sum] = "dd9c38307f2223a504cbfb96e477eca0"
-SRC_URI[sha256sum] = "620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d"
-
-S = "${WORKDIR}/LuaJIT-${PV}"
-
-inherit pkgconfig binconfig siteinfo
-
-BBCLASSEXTEND = "native"
-
-# http://luajit.org/install.html#cross
-# Host luajit needs to be compiled with the same pointer size
-# If you want to cross-compile to any 32 bit target on an x64 OS,
-# you need to install the multilib development package (e.g.
-# libc6-dev-i386 on Debian/Ubuntu) and build a 32 bit host part
-# (HOST_CC="gcc -m32").
-BUILD_CC_ARCH_append = " ${@['-m32',''][d.getVar('SITEINFO_BITS', True) != '32']}"
-
-# The lua makefiles expect the TARGET_SYS to be from uname -s
-# Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD
-LUA_TARGET_OS = "Unknown"
-LUA_TARGET_OS_darwin = "Darwin"
-LUA_TARGET_OS_linux = "Linux"
-LUA_TARGET_OS_linux-gnueabi = "Linux"
-LUA_TARGET_OS_mingw32 = "Windows"
-
-# We don't want the lua buildsystem's compiler optimizations, or its
-# stripping, and we don't want it to pick up CFLAGS or LDFLAGS, as those apply
-# to both host and target compiles
-EXTRA_OEMAKE = "\
-    Q= E='@:' \
-    \
-    CCOPT= CCOPT_x86= CFLAGS= LDFLAGS= TARGET_STRIP='@:' \
-    \
-    'TARGET_SYS=${LUA_TARGET_OS}' \
-    \
-    'CC=${CC}' \
-    'TARGET_AR=${AR} rcus' \
-    'TARGET_CFLAGS=${CFLAGS}' \
-    'TARGET_LDFLAGS=${LDFLAGS}' \
-    'TARGET_SHLDFLAGS=${LDFLAGS}' \
-    'HOST_CC=${BUILD_CC}' \
-    'HOST_CFLAGS=${BUILD_CFLAGS}' \
-    'HOST_LDFLAGS=${BUILD_LDFLAGS}' \
-    \
-    'PREFIX=${prefix}' \
-    'MULTILIB=${baselib}' \
-"
-
-do_compile () {
-    oe_runmake
-}
-
-# There's INSTALL_LIB and INSTALL_SHARE also, but the lua binary hardcodes the
-# '/share' and '/' + LUA_MULTILIB paths, so we don't want to break those
-# expectations.
-EXTRA_OEMAKEINST = "\
-    'DESTDIR=${D}' \
-    'INSTALL_BIN=${D}${bindir}' \
-    'INSTALL_INC=${D}${includedir}/luajit-$(MAJVER).$(MINVER)' \
-    'INSTALL_MAN=${D}${mandir}/man1' \
-"
-do_install () {
-    oe_runmake ${EXTRA_OEMAKEINST} install
-    rmdir ${D}${datadir}/lua/5.* \
-          ${D}${datadir}/lua \
-          ${D}${libdir}/lua/5.* \
-          ${D}${libdir}/lua
-}
-
-PACKAGES += 'luajit-common'
-
-# See the comment for EXTRA_OEMAKEINST. This is needed to ensure the hardcoded
-# paths are packaged regardless of what the libdir and datadir paths are.
-FILES_${PN} += "${prefix}/${baselib} ${prefix}/share"
-FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \
-    ${libdir}/libluajit-5.1.so.${PV} \
-"
-FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \
-    ${libdir}/libluajit-5.1.so \
-    ${libdir}/pkgconfig/luajit.pc \
-"
-FILES_luajit-common = "${datadir}/${BPN}-${PV}"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb
new file mode 100644
index 0000000..73c3811
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb
@@ -0,0 +1,92 @@
+SUMMARY = "Just-In-Time Compiler for Lua"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=10a96c93403affcc34765f4c2612bc22"
+HOMEPAGE = "http://luajit.org"
+
+SRC_URI = "http://luajit.org/download/LuaJIT-${PV}.tar.gz \
+           file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \
+           file://clang.patch \
+"
+SRC_URI[md5sum] = "48353202cbcacab84ee41a5a70ea0a2c"
+SRC_URI[sha256sum] = "874b1f8297c697821f561f9b73b57ffd419ed8f4278c82e05b48806d30c1e979"
+
+S = "${WORKDIR}/LuaJIT-${PV}"
+
+inherit pkgconfig binconfig siteinfo
+
+BBCLASSEXTEND = "native"
+
+# http://luajit.org/install.html#cross
+# Host luajit needs to be compiled with the same pointer size
+# If you want to cross-compile to any 32 bit target on an x64 OS,
+# you need to install the multilib development package (e.g.
+# libc6-dev-i386 on Debian/Ubuntu) and build a 32 bit host part
+# (HOST_CC="gcc -m32").
+BUILD_CC_ARCH_append = " ${@['-m32',''][d.getVar('SITEINFO_BITS', True) != '32']}"
+
+# The lua makefiles expect the TARGET_SYS to be from uname -s
+# Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD
+LUA_TARGET_OS = "Unknown"
+LUA_TARGET_OS_darwin = "Darwin"
+LUA_TARGET_OS_linux = "Linux"
+LUA_TARGET_OS_linux-gnueabi = "Linux"
+LUA_TARGET_OS_mingw32 = "Windows"
+
+# We don't want the lua buildsystem's compiler optimizations, or its
+# stripping, and we don't want it to pick up CFLAGS or LDFLAGS, as those apply
+# to both host and target compiles
+EXTRA_OEMAKE = "\
+    Q= E='@:' \
+    \
+    CCOPT= CCOPT_x86= CFLAGS= LDFLAGS= TARGET_STRIP='@:' \
+    \
+    'TARGET_SYS=${LUA_TARGET_OS}' \
+    \
+    'CC=${CC}' \
+    'TARGET_AR=${AR} rcus' \
+    'TARGET_CFLAGS=${CFLAGS}' \
+    'TARGET_LDFLAGS=${LDFLAGS}' \
+    'TARGET_SHLDFLAGS=${LDFLAGS}' \
+    'HOST_CC=${BUILD_CC}' \
+    'HOST_CFLAGS=${BUILD_CFLAGS}' \
+    'HOST_LDFLAGS=${BUILD_LDFLAGS}' \
+    \
+    'PREFIX=${prefix}' \
+    'MULTILIB=${baselib}' \
+"
+
+do_compile () {
+    oe_runmake
+}
+
+# There's INSTALL_LIB and INSTALL_SHARE also, but the lua binary hardcodes the
+# '/share' and '/' + LUA_MULTILIB paths, so we don't want to break those
+# expectations.
+EXTRA_OEMAKEINST = "\
+    'DESTDIR=${D}' \
+    'INSTALL_BIN=${D}${bindir}' \
+    'INSTALL_INC=${D}${includedir}/luajit-$(MAJVER).$(MINVER)' \
+    'INSTALL_MAN=${D}${mandir}/man1' \
+"
+do_install () {
+    oe_runmake ${EXTRA_OEMAKEINST} install
+    rmdir ${D}${datadir}/lua/5.* \
+          ${D}${datadir}/lua \
+          ${D}${libdir}/lua/5.* \
+          ${D}${libdir}/lua
+}
+
+PACKAGES += 'luajit-common'
+
+# See the comment for EXTRA_OEMAKEINST. This is needed to ensure the hardcoded
+# paths are packaged regardless of what the libdir and datadir paths are.
+FILES_${PN} += "${prefix}/${baselib} ${prefix}/share"
+FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \
+    ${libdir}/libluajit-5.1.so.${PV} \
+"
+FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \
+    ${libdir}/libluajit-5.1.so \
+    ${libdir}/pkgconfig/luajit.pc \
+"
+FILES_luajit-common = "${datadir}/${BPN}-${PV}"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson/native_bindir.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
index 53eeff7..993e975 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
@@ -1,8 +1,13 @@
+There are some discussions upstream to merge this patch, but I presonaly believe
+that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
 diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
-index da73a57b7ecd..22100f69c580 100644
+index 04a22f985941..3e33bc4a79e7 100644
 --- a/mesonbuild/dependencies.py
 +++ b/mesonbuild/dependencies.py
-@@ -65,7 +65,7 @@ class Dependency():
+@@ -95,7 +95,7 @@ class Dependency:
      def need_threads(self):
          return False
  
@@ -11,7 +16,7 @@
          raise MesonException('Tried to get a pkg-config variable from a non-pkgconfig dependency.')
  
  class InternalDependency(Dependency):
-@@ -177,8 +177,12 @@ class PkgConfigDependency(Dependency):
+@@ -224,8 +224,12 @@ class PkgConfigDependency(Dependency):
          return s.format(self.__class__.__name__, self.name, self.is_found,
                          self.version_reqs)
  
@@ -23,10 +28,10 @@
 +        else:
 +            pkgbin = [self.pkgbin]
 +        p, out = Popen_safe(pkgbin + args, env=os.environ)[0:2]
-         return (p.returncode, out.strip())
+         return p.returncode, out.strip()
  
      def _set_cargs(self):
-@@ -212,8 +216,8 @@ class PkgConfigDependency(Dependency):
+@@ -259,8 +263,8 @@ class PkgConfigDependency(Dependency):
                  self.is_libtool = True
              self.libs.append(lib)
  
@@ -37,12 +42,8 @@
          variable = ''
          if ret != 0:
              if self.required:
-@@ -933,10 +937,10 @@ class QtBaseDependency(Dependency):
-             corekwargs = {'required': 'false', 'silent': 'true'}
-             core = PkgConfigDependency(self.qtpkgname + 'Core', env, corekwargs)
-         # Used by self.compilers_detect()
--        self.bindir = core.get_pkgconfig_variable('host_bins')
-+        self.bindir = core.get_pkgconfig_variable('host_bins', use_native=True)
+@@ -1091,7 +1095,7 @@ class QtBaseDependency(Dependency):
+         self.bindir = self.get_pkgconfig_host_bins(core)
          if not self.bindir:
              # If exec_prefix is not defined, the pkg-config file is broken
 -            prefix = core.get_pkgconfig_variable('exec_prefix')
@@ -50,3 +51,21 @@
              if prefix:
                  self.bindir = os.path.join(prefix, 'bin')
  
+@@ -1202,7 +1206,7 @@ class Qt5Dependency(QtBaseDependency):
+         QtBaseDependency.__init__(self, 'qt5', env, kwargs)
+ 
+     def get_pkgconfig_host_bins(self, core):
+-        return core.get_pkgconfig_variable('host_bins')
++        return core.get_pkgconfig_variable('host_bins', use_native=True)
+ 
+ class Qt4Dependency(QtBaseDependency):
+     def __init__(self, env, kwargs):
+@@ -1216,7 +1220,7 @@ class Qt4Dependency(QtBaseDependency):
+         applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
+         for application in applications:
+             try:
+-                return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application))
++                return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, use_native=True))
+             except MesonException:
+                 pass
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.37.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.37.1.bb
deleted file mode 100644
index dbbea64..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.37.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-HOMEPAGE = "http://mesonbuild.com"
-SUMMARY = "A high performance build system"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
-
-SRC_URI = " \
-    git://github.com/mesonbuild/meson.git \
-    file://native_bindir.patch \
-"
-
-SRCREV = "3d4bfdcb22314ea7db45a5b075f8b2a9c1498aab"
-
-S = "${WORKDIR}/git"
-
-inherit setuptools3
-
-RDEPENDS_${PN}_class-target = "ninja python3-core python3-modules"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.40.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.40.1.bb
new file mode 100644
index 0000000..14644ba
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.40.1.bb
@@ -0,0 +1,20 @@
+HOMEPAGE = "http://mesonbuild.com"
+SUMMARY = "A high performance build system"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = " \
+    git://github.com/mesonbuild/meson.git \
+    file://native_bindir.patch \
+"
+
+SRCREV = "b25d3e4d3f2b4d37029a507cc089bdde643c6240"
+
+S = "${WORKDIR}/git"
+
+inherit setuptools3
+
+RDEPENDS_${PN} = "ninja python3-core python3-modules"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_3.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_3.2.bb
index 4537a66..4a2c377 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_3.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_3.2.bb
@@ -12,8 +12,6 @@
 SRC_URI[md5sum] = "f414cfa77099cd1fa1a5ae4e22db508a"
 SRC_URI[sha256sum] = "0778679a6b693d7b7caff37ff9d2856dc2bfc51318bf8373859bfa74253da3dc"
 
-CACHED_CONFIGUREVARS += "BASH_SHELL=${base_bindir}/bash"
-
 RDEPENDS_${PN} += "bash perl libxml2"
 S = "${WORKDIR}/${BP}"
 
@@ -26,6 +24,8 @@
     --disable-fc \
     --disable-fortran \
     --disable-cxx \
+    BASH_SHELL='${USRBINPATH}/env bash' \
+    PERL='${USRBINPATH}/env perl' \
 "
 
 inherit autotools-brokensep gettext
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Comment-intentional-fallthrough-in-case-statements.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Comment-intentional-fallthrough-in-case-statements.patch
deleted file mode 100644
index a388297..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Comment-intentional-fallthrough-in-case-statements.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 15d8bb6792c9639d85a9ffe2ac81431f1b986c21 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 22 Apr 2017 08:53:50 -0700
-Subject: [PATCH] Comment intentional fallthrough in case statements
-
-Fixes build with gcc7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp b/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp
-index b35c21a7..4c463a90 100644
---- a/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp
-+++ b/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp
-@@ -105,6 +105,7 @@ struct define_array<A0, A1> {
-             switch(size) {
-             default:
-             case 2: ptr[1].convert(a1);
-+            //fallthrough
-             case 1: ptr[0].convert(a0);
-             }
-         }
-@@ -193,8 +194,11 @@ struct define_array<A0, A1, A2, A3> {
-             switch(size) {
-             default:
-             case 4: ptr[3].convert(a3);
-+            //fallthrough
-             case 3: ptr[2].convert(a2);
-+            //fallthrough
-             case 2: ptr[1].convert(a1);
-+            //fallthrough
-             case 1: ptr[0].convert(a0);
-             }
-         }
--- 
-2.12.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.1.bb
deleted file mode 100644
index 7655d94..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "MessagePack implementation for C and C++"
-DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small"
-HOMEPAGE = "http://msgpack.org/index.html"
-LICENSE = "BSL-1.0"
-LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \
-                    file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \
-                    file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \
-                   "
-
-PV .= "+git${SRCPV}"
-
-SRCREV = "20ef1f925b007f170ab1c257e4aa61fdd0927773"
-
-SRC_URI = "git://github.com/msgpack/msgpack-c \
-           file://0001-Comment-intentional-fallthrough-in-case-statements.patch \
-           "
-
-inherit cmake pkgconfig
-
-S = "${WORKDIR}/git"
-
-FILES_${PN}-dev += "${libdir}/cmake/msgpack/*.cmake"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb
new file mode 100644
index 0000000..d9f6956
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb
@@ -0,0 +1,21 @@
+SUMMARY = "MessagePack implementation for C and C++"
+DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small"
+HOMEPAGE = "http://msgpack.org/index.html"
+LICENSE = "BSL-1.0"
+LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \
+                    file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \
+                    file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \
+                   "
+
+PV .= "+git${SRCPV}"
+
+SRCREV = "7a98138f27f27290e680bf8fbf1f8d1b089bf138"
+
+SRC_URI = "git://github.com/msgpack/msgpack-c \
+           "
+
+inherit cmake pkgconfig
+
+S = "${WORKDIR}/git"
+
+FILES_${PN}-dev += "${libdir}/cmake/msgpack/*.cmake"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ninja/ninja_1.7.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ninja/ninja_1.7.2.bb
deleted file mode 100644
index 932e3a6..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ninja/ninja_1.7.2.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Ninja is a small build system with a focus on speed."
-HOMEPAGE = "http://martine.github.com/ninja/"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"
-
-DEPENDS = "re2c-native ninja-native"
-
-SRCREV = "717b7b4a31db6027207588c0fb89c3ead384747b"
-
-SRC_URI = "git://github.com/martine/ninja.git;branch=release"
-
-S = "${WORKDIR}/git"
-
-do_configure[noexec] = "1"
-
-do_compile_class-native() {
-    ./configure.py --bootstrap
-}
-
-do_compile() {
-    ./configure.py
-    ninja
-}
-
-do_install() {
-    install -d ${D}${bindir}
-    install -m 0755 ${S}/ninja ${D}${bindir}/
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
new file mode 100644
index 0000000..324a468
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
@@ -0,0 +1,29 @@
+From c2aff16cc196a61f4ab1cdae4a91c7926123c239 Mon Sep 17 00:00:00 2001
+From: Zuzana Svetlikova <zsvetlik@redhat.com>
+Date: Thu, 27 Apr 2017 14:25:42 +0200
+Subject: [PATCH] Disable running gyp on shared deps
+
+---
+ Makefile | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 0a217bd893..e1229ad07f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -79,10 +79,9 @@ $(NODE_G_EXE): config.gypi out/Makefile
+ 	$(MAKE) -C out BUILDTYPE=Debug V=$(V)
+ 	if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
+ 
+-out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \
+-              deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
+-              deps/v8/gypfiles/features.gypi deps/v8/src/v8.gyp node.gyp \
+-              config.gypi
++out/Makefile: common.gypi deps/http_parser/http_parser.gyp \
++              deps/v8/gypfiles/toolchain.gypi deps/v8/gypfiles/features.gypi \
++			  deps/v8/src/v8.gyp node.gyp config.gypi
+ 	$(PYTHON) tools/gyp_node.py -f make
+ 
+ config.gypi: configure
+-- 
+2.12.2
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
new file mode 100644
index 0000000..324a468
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
@@ -0,0 +1,29 @@
+From c2aff16cc196a61f4ab1cdae4a91c7926123c239 Mon Sep 17 00:00:00 2001
+From: Zuzana Svetlikova <zsvetlik@redhat.com>
+Date: Thu, 27 Apr 2017 14:25:42 +0200
+Subject: [PATCH] Disable running gyp on shared deps
+
+---
+ Makefile | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 0a217bd893..e1229ad07f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -79,10 +79,9 @@ $(NODE_G_EXE): config.gypi out/Makefile
+ 	$(MAKE) -C out BUILDTYPE=Debug V=$(V)
+ 	if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
+ 
+-out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \
+-              deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
+-              deps/v8/gypfiles/features.gypi deps/v8/src/v8.gyp node.gyp \
+-              config.gypi
++out/Makefile: common.gypi deps/http_parser/http_parser.gyp \
++              deps/v8/gypfiles/toolchain.gypi deps/v8/gypfiles/features.gypi \
++			  deps/v8/src/v8.gyp node.gyp config.gypi
+ 	$(PYTHON) tools/gyp_node.py -f make
+ 
+ config.gypi: configure
+-- 
+2.12.2
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_4.8.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_4.8.2.bb
deleted file mode 100644
index ae84ad3..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_4.8.2.bb
+++ /dev/null
@@ -1,88 +0,0 @@
-DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
-HOMEPAGE = "http://nodejs.org"
-LICENSE = "MIT & BSD & Artistic-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f45e9ffb97e64da46d14f462d34a039f"
-
-DEPENDS = "openssl zlib"
-
-COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
-COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
-COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
-
-SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
-    file://no-registry.patch \
-"
-SRC_URI[md5sum] = "aea6139f952bb7e1d66f76afedee813c"
-SRC_URI[sha256sum] = "b961350b8490c791bdd3663925662ba0fbe01e004b43f1c2779baffcc816b930"
-
-S = "${WORKDIR}/node-v${PV}"
-
-# v8 errors out if you have set CCACHE
-CCACHE = ""
-
-def map_nodejs_arch(a, d):
-    import re
-
-    if   re.match('i.86$', a): return 'ia32'
-    elif re.match('x86_64$', a): return 'x64'
-    elif re.match('aarch64$', a): return 'arm64'
-    elif re.match('powerpc64$', a): return 'ppc64'
-    elif re.match('powerpc$', a): return 'ppc'
-    return a
-
-ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
-                 ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
-                    bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
-                    bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
-                    '--with-arm-fpu=vfp', d), d), d)}"
-GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "
-ARCHFLAGS ?= ""
-
-# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
-do_configure () {
-    export LD="${CXX}"
-    GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
-    # $TARGET_ARCH settings don't match --dest-cpu settings
-   ./configure --prefix=${prefix} --without-snapshot --shared-openssl --shared-zlib \
-               --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
-               --dest-os=linux \
-               ${ARCHFLAGS}
-}
-
-do_compile () {
-    export LD="${CXX}"
-    oe_runmake BUILDTYPE=Release
-}
-
-do_install () {
-    oe_runmake install DESTDIR=${D}
-}
-
-do_install_append_class-native() {
-    # use node from PATH instead of absolute path to sysroot
-    # node-v0.10.25/tools/install.py is using:
-    # shebang = os.path.join(node_prefix, 'bin/node')
-    # update_shebang(link_path, shebang)
-    # and node_prefix can be very long path to bindir in native sysroot and
-    # when it exceeds 128 character shebang limit it's stripped to incorrect path
-    # and npm fails to execute like in this case with 133 characters show in log.do_install:
-    # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node
-    # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
-    # use sed on npm-cli.js because otherwise symlink is replaced with normal file and
-    # npm-cli.js continues to use old shebang
-    sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
-}
-
-do_install_append_class-target() {
-    sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
-}
-
-PACKAGES =+ "${PN}-npm"
-FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm"
-RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils"
-
-PACKAGES =+ "${PN}-systemtap"
-FILES_${PN}-systemtap = "${datadir}/systemtap"
-
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb
new file mode 100644
index 0000000..5bcbc00
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb
@@ -0,0 +1,89 @@
+DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
+HOMEPAGE = "http://nodejs.org"
+LICENSE = "MIT & BSD & Artistic-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e4d35c6120f175e1fbe5ff908b1cf2d6"
+
+DEPENDS = "openssl10 zlib"
+
+COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
+COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
+COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
+
+SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
+           file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
+"
+SRC_URI[md5sum] = "e6c85c83001340b30671e9432e1bd337"
+SRC_URI[sha256sum] = "5d5aa2a101dcc617231a475812eb8ed87cac21491f1dcc7997b9dd463563f361"
+
+S = "${WORKDIR}/node-v${PV}"
+
+# v8 errors out if you have set CCACHE
+CCACHE = ""
+
+def map_nodejs_arch(a, d):
+    import re
+
+    if   re.match('i.86$', a): return 'ia32'
+    elif re.match('x86_64$', a): return 'x64'
+    elif re.match('aarch64$', a): return 'arm64'
+    elif re.match('powerpc64$', a): return 'ppc64'
+    elif re.match('powerpc$', a): return 'ppc'
+    return a
+
+ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
+                 ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
+                    bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
+                    bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
+                    '--with-arm-fpu=vfp', d), d), d)}"
+GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "
+ARCHFLAGS ?= ""
+
+# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
+do_configure () {
+    rm -rf ${S}/deps/openssl
+    export LD="${CXX}"
+    GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
+    # $TARGET_ARCH settings don't match --dest-cpu settings
+   ./configure --prefix=${prefix} --without-intl --without-snapshot --shared-openssl --shared-zlib \
+               --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
+               --dest-os=linux \
+               ${ARCHFLAGS}
+}
+
+do_compile () {
+    export LD="${CXX}"
+    oe_runmake BUILDTYPE=Release
+}
+
+do_install () {
+    oe_runmake install DESTDIR=${D}
+}
+
+do_install_append_class-native() {
+    # use node from PATH instead of absolute path to sysroot
+    # node-v0.10.25/tools/install.py is using:
+    # shebang = os.path.join(node_prefix, 'bin/node')
+    # update_shebang(link_path, shebang)
+    # and node_prefix can be very long path to bindir in native sysroot and
+    # when it exceeds 128 character shebang limit it's stripped to incorrect path
+    # and npm fails to execute like in this case with 133 characters show in log.do_install:
+    # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node
+    # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
+    # use sed on npm-cli.js because otherwise symlink is replaced with normal file and
+    # npm-cli.js continues to use old shebang
+    sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+}
+
+do_install_append_class-target() {
+    sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+}
+
+PACKAGES =+ "${PN}-npm"
+FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"
+RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils"
+
+PACKAGES =+ "${PN}-systemtap"
+FILES_${PN}-systemtap = "${datadir}/systemtap"
+
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0001-Add-fallthrough-comments.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0001-Add-fallthrough-comments.patch
new file mode 100644
index 0000000..644146c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0001-Add-fallthrough-comments.patch
@@ -0,0 +1,155 @@
+From 8f85163b030e7b957648f90cd8fa599fb04d5d65 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Jun 2017 23:32:49 -0700
+Subject: [PATCH 1/5] Add fallthrough comments
+
+Fixes
+
+src/svf/svf.c:663:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
+     i = -1;
+     ~~^~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/flash/mflash.c            | 3 ++-
+ src/flash/nand/mx3.c          | 1 +
+ src/jtag/drivers/ftdi.c       | 1 +
+ src/svf/svf.c                 | 2 ++
+ src/target/arm_adi_v5.c       | 9 +++++++++
+ src/target/arm_disassembler.c | 1 +
+ src/target/target.c           | 1 +
+ 7 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/src/flash/mflash.c b/src/flash/mflash.c
+index b69995542..3254a3d56 100644
+--- a/src/flash/mflash.c
++++ b/src/flash/mflash.c
+@@ -259,10 +259,11 @@ static int mg_dsk_wait(mg_io_type_wait wait_local, uint32_t time_var)
+ 				case mg_io_wait_rdy:
+ 					if (status & mg_io_rbit_status_ready)
+ 						return ERROR_OK;
+-
++					/* fallthru */
+ 				case mg_io_wait_drq:
+ 					if (status & mg_io_rbit_status_data_req)
+ 						return ERROR_OK;
++					/* fallthru */
+ 
+ 				default:
+ 					break;
+diff --git a/src/flash/nand/mx3.c b/src/flash/nand/mx3.c
+index b61e47535..0a55929ed 100644
+--- a/src/flash/nand/mx3.c
++++ b/src/flash/nand/mx3.c
+@@ -281,6 +281,7 @@ static int imx31_command(struct nand_device *nand, uint8_t command)
+ 			 * offset == one half of page size
+ 			 */
+ 			in_sram_address = MX3_NF_MAIN_BUFFER0 + (nand->page_size >> 1);
++			/* fallthru */
+ 		default:
+ 			in_sram_address = MX3_NF_MAIN_BUFFER0;
+ 	}
+diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
+index 00fe37faf..20f17d810 100644
+--- a/src/jtag/drivers/ftdi.c
++++ b/src/jtag/drivers/ftdi.c
+@@ -855,6 +855,7 @@ COMMAND_HANDLER(ftdi_handle_set_signal_command)
+ 			ftdi_set_signal(sig, *CMD_ARGV[1]);
+ 			break;
+ 		}
++		/* fallthru */
+ 	default:
+ 		LOG_ERROR("unknown signal level '%s', use 0, 1 or z", CMD_ARGV[1]);
+ 		return ERROR_COMMAND_SYNTAX_ERROR;
+diff --git a/src/svf/svf.c b/src/svf/svf.c
+index e7e815c10..7b261cc72 100644
+--- a/src/svf/svf.c
++++ b/src/svf/svf.c
+@@ -661,11 +661,13 @@ static int svf_read_command_from_file(FILE *fd)
+ 				if (svf_getline(&svf_read_line, &svf_read_line_size, svf_fd) <= 0)
+ 					return ERROR_FAIL;
+ 				i = -1;
++				/* fallthru */
+ 			case '\r':
+ 				slash = 0;
+ 				/* Don't save '\r' and '\n' if no data is parsed */
+ 				if (!cmd_pos)
+ 					break;
++				/* fallthru */
+ 			default:
+ 				/* The parsing code currently expects a space
+ 				 * before parentheses -- "TDI (123)".  Also a
+diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
+index eafc2ddc0..d444db2b1 100644
+--- a/src/target/arm_adi_v5.c
++++ b/src/target/arm_adi_v5.c
+@@ -346,10 +346,13 @@ static int mem_ap_write(struct adiv5_ap *ap, const uint8_t *buffer, uint32_t siz
+ 			case 4:
+ 				outvalue |= (uint32_t)*buffer++ << 8 * (address++ & 3);
+ 				outvalue |= (uint32_t)*buffer++ << 8 * (address++ & 3);
++				/* fallthru */
+ 			case 2:
+ 				outvalue |= (uint32_t)*buffer++ << 8 * (address++ & 3);
++				/* fallthru */
+ 			case 1:
+ 				outvalue |= (uint32_t)*buffer++ << 8 * (address++ & 3);
++				/* fallthru */
+ 			}
+ 		}
+ 
+@@ -509,20 +512,26 @@ static int mem_ap_read(struct adiv5_ap *ap, uint8_t *buffer, uint32_t size, uint
+ 			case 4:
+ 				*buffer++ = *read_ptr >> 8 * (3 - (address++ & 3));
+ 				*buffer++ = *read_ptr >> 8 * (3 - (address++ & 3));
++				/* fallthru */
+ 			case 2:
+ 				*buffer++ = *read_ptr >> 8 * (3 - (address++ & 3));
++				/* fallthru */
+ 			case 1:
+ 				*buffer++ = *read_ptr >> 8 * (3 - (address++ & 3));
++				/* fallthru */
+ 			}
+ 		} else {
+ 			switch (this_size) {
+ 			case 4:
+ 				*buffer++ = *read_ptr >> 8 * (address++ & 3);
+ 				*buffer++ = *read_ptr >> 8 * (address++ & 3);
++				/* fallthru */
+ 			case 2:
+ 				*buffer++ = *read_ptr >> 8 * (address++ & 3);
++				/* fallthru */
+ 			case 1:
+ 				*buffer++ = *read_ptr >> 8 * (address++ & 3);
++				/* fallthru */
+ 			}
+ 		}
+ 
+diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c
+index 5277b94d8..2eb21ea33 100644
+--- a/src/target/arm_disassembler.c
++++ b/src/target/arm_disassembler.c
+@@ -3299,6 +3299,7 @@ static int t2ev_data_immed(uint32_t opcode, uint32_t address,
+ 		case 0x10:
+ 		case 0x12:
+ 			is_signed = true;
++			/* fallthru */
+ 		case 0x18:
+ 		case 0x1a:
+ 			/* signed/unsigned saturated add */
+diff --git a/src/target/target.c b/src/target/target.c
+index e04ecc470..597b4b13d 100644
+--- a/src/target/target.c
++++ b/src/target/target.c
+@@ -3684,6 +3684,7 @@ COMMAND_HANDLER(handle_bp_command)
+ 				addr = 0;
+ 				return handle_bp_command_set(CMD_CTX, addr, asid, length, hw);
+ 			}
++			/* fallthru */
+ 
+ 		case 4:
+ 			hw = BKPT_HARD;
+-- 
+2.13.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0002-Workaround-new-warnings-generated-by-GCC-7.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0002-Workaround-new-warnings-generated-by-GCC-7.patch
new file mode 100644
index 0000000..aa99735
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0002-Workaround-new-warnings-generated-by-GCC-7.patch
@@ -0,0 +1,53 @@
+From 8daaa8c27794653d02854c5982669a7638473224 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Jun 2017 23:52:46 -0700
+Subject: [PATCH 2/5] Workaround new warnings generated by GCC 7
+
+src/flash/nor/xmc4xxx.c: In function 'xmc4xxx_get_info_command':
+src/flash/nor/xmc4xxx.c:939:43: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 6 [-Werror=format-truncation=]
+     snprintf(otp_str, sizeof(otp_str), "- %d\n", i);
+                                           ^~
+src/flash/nor/xmc4xxx.c:939:40: note: directive argument in the range [0, 2147483647]
+     snprintf(otp_str, sizeof(otp_str), "- %d\n", i);
+                                        ^~~~~~~~
+src/flash/nor/xmc4xxx.c:939:5: note: 'snprintf' output between 5 and 14 bytes into a destination of size 8
+     snprintf(otp_str, sizeof(otp_str), "- %d\n", i);
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/flash/nor/xmc4xxx.c | 2 +-
+ src/target/arm_adi_v5.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/flash/nor/xmc4xxx.c b/src/flash/nor/xmc4xxx.c
+index 02df46a3f..e6c398ff9 100644
+--- a/src/flash/nor/xmc4xxx.c
++++ b/src/flash/nor/xmc4xxx.c
+@@ -931,7 +931,7 @@ static int xmc4xxx_get_info_command(struct flash_bank *bank, char *buf, int buf_
+ 
+ 	/* If OTP Write protection is enabled (User 2), list each
+ 	 * sector that has it enabled */
+-	char otp_str[8];
++	char otp_str[14];
+ 	if (otp_enabled) {
+ 		strcat(prot_str, "\nOTP Protection is enabled for sectors:\n");
+ 		for (int i = 0; i < bank->num_sectors; i++) {
+diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
+index d444db2b1..d0d95121f 100644
+--- a/src/target/arm_adi_v5.c
++++ b/src/target/arm_adi_v5.c
+@@ -1062,7 +1062,7 @@ static int dap_rom_display(struct command_context *cmd_ctx,
+ 	int retval;
+ 	uint64_t pid;
+ 	uint32_t cid;
+-	char tabs[7] = "";
++	char tabs[16] = "";
+ 
+ 	if (depth > 16) {
+ 		command_print(cmd_ctx, "\tTables too deep");
+-- 
+2.13.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch
new file mode 100644
index 0000000..bcfbfc9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch
@@ -0,0 +1,27 @@
+From 8e5051e83fedb078170565a24d1f5de6c2ce4428 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 00:01:51 -0700
+Subject: [PATCH 3/5] armv7a: Add missing break to fix fallthrough warning
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/target/armv7a.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/target/armv7a.c b/src/target/armv7a.c
+index 6021def4e..bad806b3d 100644
+--- a/src/target/armv7a.c
++++ b/src/target/armv7a.c
+@@ -355,6 +355,7 @@ int armv7a_mmu_translate_va_pa(struct target *target, uint32_t va,
+ 				break;
+ 			case 7:
+ 				LOG_INFO("inner: Write-Back, no Write-Allocate");
++				break;
+ 
+ 			default:
+ 				LOG_INFO("inner: %" PRIx32 " ???", INNER);
+-- 
+2.13.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0004-Fix-overflow-warning.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0004-Fix-overflow-warning.patch
new file mode 100644
index 0000000..bfc5627
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0004-Fix-overflow-warning.patch
@@ -0,0 +1,30 @@
+From d3ca56370a2be7e737d48bd14d474d790a0ab8ac Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 00:04:00 -0700
+Subject: [PATCH 4/5] Fix overflow warning
+
+Remove an empty space which makes it fit into 11 byte string
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/target/nds32_cmd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/target/nds32_cmd.c b/src/target/nds32_cmd.c
+index edb4872e4..73355073c 100644
+--- a/src/target/nds32_cmd.c
++++ b/src/target/nds32_cmd.c
+@@ -821,7 +821,7 @@ static int jim_nds32_bulk_read(Jim_Interp *interp, int argc, Jim_Obj * const *ar
+ 	jim_wide i;
+ 	Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
+ 	for (i = 0; i < count; i++) {
+-		sprintf(data_str, "0x%08" PRIx32 " ", data[i]);
++		sprintf(data_str, "0x%08" PRIx32 "", data[i]);
+ 		Jim_AppendStrings(interp, Jim_GetResult(interp), data_str, NULL);
+ 	}
+ 
+-- 
+2.13.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0005-command-Move-the-fall-through-comment-to-right-scope.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0005-command-Move-the-fall-through-comment-to-right-scope.patch
new file mode 100644
index 0000000..60f75da
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd/0005-command-Move-the-fall-through-comment-to-right-scope.patch
@@ -0,0 +1,27 @@
+From 29dbf92ffdbdda29662b4190a2f8eb09caad8b51 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 00:06:32 -0700
+Subject: [PATCH 5/5] command: Move the fall through comment to right scope
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/helper/command.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/helper/command.c b/src/helper/command.c
+index 5deaee859..287c14857 100644
+--- a/src/helper/command.c
++++ b/src/helper/command.c
+@@ -1456,8 +1456,8 @@ COMMAND_HELPER(handle_command_parse_bool, bool *out, const char *label)
+ 				LOG_ERROR("%s: argument '%s' is not valid", CMD_NAME, in);
+ 				return ERROR_COMMAND_SYNTAX_ERROR;
+ 			}
+-			/* fall through */
+ 		}
++		/* fall through */
+ 		case 0:
+ 			LOG_INFO("%s is %s", label, *out ? "enabled" : "disabled");
+ 			break;
+-- 
+2.13.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd_git.bb
new file mode 100644
index 0000000..20bc663
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd_git.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "libusb-compat libftdi"
+RDEPENDS_${PN} = "libusb1"
+
+SRC_URI = "git://repo.or.cz/openocd.git \
+           file://0001-Add-fallthrough-comments.patch \
+           file://0002-Workaround-new-warnings-generated-by-GCC-7.patch \
+           file://0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch \
+           file://0004-Fix-overflow-warning.patch \
+           file://0005-command-Move-the-fall-through-comment-to-right-scope.patch \
+"
+SRCREV = "1025be363e2bf42f1613083223a2322cc3a9bd4c"
+
+PV = "0.10+gitr${SRCPV}"
+S = "${WORKDIR}/git"
+
+inherit pkgconfig autotools-brokensep gettext
+
+BBCLASSEXTEND += "nativesdk"
+
+EXTRA_OECONF = "--enable-ftdi --disable-doxygen-html "
+
+do_configure() {
+    ./bootstrap
+    oe_runconf ${EXTRA_OECONF}
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} install
+    if [ -e "${D}${infodir}" ]; then
+      rm -Rf ${D}${infodir}
+    fi
+    if [ -e "${D}${mandir}" ]; then
+      rm -Rf ${D}${mandir}
+    fi
+    if [ -e "${D}${bindir}/.debug" ]; then
+      rm -Rf ${D}${bindir}/.debug
+    fi
+}
+
+FILES_${PN} = " \
+  ${datadir}/openocd/* \
+  ${bindir}/openocd \
+  "
+
+PACKAGECONFIG[sysfsgpio] = "--enable-sysfsgpio,--disable-sysfsgpio"
+PACKAGECONFIG ??= "sysfsgpio"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb
index 14e75dc..1be7f6a 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Packages required for a target (on-device) SDK"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
 PR = "r1"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/0001-Don-t-call-deprecated-glib-functions-and-use-the-new.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/0001-Don-t-call-deprecated-glib-functions-and-use-the-new.patch
deleted file mode 100644
index ecf8e74..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/0001-Don-t-call-deprecated-glib-functions-and-use-the-new.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-From 869e52a9055c72970fed036a1510f676e6ce0824 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 13 Jun 2013 01:24:19 -0700
-Subject: [PATCH] Don't call deprecated glib functions and use the new gthread
- API.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate[version Unmaintained Upstream]
----
- client/pk-console.c                              |    3 ++-
- client/pk-generate-pack.c                        |    3 ++-
- client/pk-monitor.c                              |    3 ++-
- contrib/command-not-found/PackageKit.sh          |    2 +-
- contrib/command-not-found/pk-command-not-found.c |    4 ++--
- contrib/debuginfo-install/pk-debuginfo-install.c |    4 ++--
- src/pk-backend.c                                 |    7 +++++++
- src/pk-main.c                                    |    4 ++--
- 10 files changed, 20 insertions(+), 10 deletions(-)
-
-diff --git a/client/pk-console.c b/client/pk-console.c
-index de927e1..2435f27 100644
---- a/client/pk-console.c
-+++ b/client/pk-console.c
-@@ -1264,11 +1264,12 @@ main (int argc, char *argv[])
- 	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
- 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- 	textdomain (GETTEXT_PACKAGE);
--
-+#if !GLIB_CHECK_VERSION(2,32,0)
- 	if (! g_thread_supported ())
- 		g_thread_init (NULL);
- 	g_type_init ();
- 	dbus_g_thread_init ();
-+#endif
- 
- 	/* do stuff on ctrl-c */
- 	signal (SIGINT, pk_console_sigint_cb);
-diff --git a/client/pk-generate-pack.c b/client/pk-generate-pack.c
-index 0b2b40f..20d7e8d 100644
---- a/client/pk-generate-pack.c
-+++ b/client/pk-generate-pack.c
-@@ -251,12 +251,13 @@ main (int argc, char *argv[])
- 	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
- 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- 	textdomain (GETTEXT_PACKAGE);
--
-+#if !GLIB_CHECK_VERSION(2,32,0)
- 	if (! g_thread_supported ())
- 		g_thread_init (NULL);
- 
- 	g_type_init ();
- 	dbus_g_thread_init ();
-+#endif
- 
- 	/* do stuff on ctrl-c */
- 	signal (SIGINT, pk_generate_pack_sigint_cb);
-diff --git a/client/pk-monitor.c b/client/pk-monitor.c
-index f230f7a..d43007f 100644
---- a/client/pk-monitor.c
-+++ b/client/pk-monitor.c
-@@ -285,11 +285,12 @@ main (int argc, char *argv[])
- 	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
- 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- 	textdomain (GETTEXT_PACKAGE);
--
-+#if !GLIB_CHECK_VERSION(2,32,0)
- 	if (! g_thread_supported ())
- 		g_thread_init (NULL);
- 	g_type_init ();
- 	dbus_g_thread_init ();
-+#endif
- 
- 	context = g_option_context_new (NULL);
- 	/* TRANSLATORS: this is a program that monitors PackageKit */
-diff --git a/contrib/command-not-found/PackageKit.sh b/contrib/command-not-found/PackageKit.sh
-index d08989c..d708fff 100644
---- a/contrib/command-not-found/PackageKit.sh
-+++ b/contrib/command-not-found/PackageKit.sh
-@@ -18,7 +18,7 @@ command_not_found_handle () {
- 
- 	# run the command, or just print a warning
- 	if [ $runcnf -eq 1 ]; then
--		/home/hughsie/.root/libexec/pk-command-not-found $1
-+		/usr/lib/packagekit/pk-command-not-found $1
- 		retval=$?
- 	else
- 		echo "bash: $1: command not found"
-diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
-index 70679c0..9f81ce4 100644
---- a/contrib/command-not-found/pk-command-not-found.c
-+++ b/contrib/command-not-found/pk-command-not-found.c
-@@ -659,12 +659,12 @@ main (int argc, char *argv[])
- 	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
- 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- 	textdomain (GETTEXT_PACKAGE);
--
-+#if !GLIB_CHECK_VERSION(2,32,0)
- 	if (! g_thread_supported ())
- 		g_thread_init (NULL);
- 	dbus_g_thread_init ();
- 	g_type_init ();
--
-+#endif
- 	context = g_option_context_new (NULL);
- 	/* TRANSLATORS: tool that gets called when the command is not found */
- 	g_option_context_set_summary (context, _("PackageKit Command Not Found"));
-diff --git a/contrib/debuginfo-install/pk-debuginfo-install.c b/contrib/debuginfo-install/pk-debuginfo-install.c
-index c12aca5..b0e1e7c 100644
---- a/contrib/debuginfo-install/pk-debuginfo-install.c
-+++ b/contrib/debuginfo-install/pk-debuginfo-install.c
-@@ -532,11 +532,11 @@ main (int argc, char *argv[])
- 	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
- 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- 	textdomain (GETTEXT_PACKAGE);
--
-+#if !GLIB_CHECK_VERSION(2,32,0)
- 	if (! g_thread_supported ())
- 		g_thread_init (NULL);
- 	g_type_init ();
--
-+#endif
- 	context = g_option_context_new (NULL);
- 	/* TRANSLATORS: tool that gets called when the command is not found */
- 	g_option_context_set_summary (context, _("PackageKit Debuginfo Installer"));
-diff --git a/src/pk-backend.c b/src/pk-backend.c
-index 5216b63..5b83ae4 100644
---- a/src/pk-backend.c
-+++ b/src/pk-backend.c
-@@ -2103,7 +2103,14 @@ pk_backend_thread_create (PkBackend *backend, PkBackendThreadFunc func)
- 		egg_warning ("already has thread");
- 		return FALSE;
- 	}
-+#if !GLIB_CHECK_VERSION(2,32,0)
- 	backend->priv->thread = g_thread_create ((GThreadFunc) func, backend, FALSE, NULL);
-+#else
-+	backend->priv->thread = g_thread_try_new ("daemon thread", (GThreadFunc) func, backend, NULL);
-+	if (backend->priv->thread != NULL) {
-+		g_thread_unref(backend->priv->thread);
-+	}
-+#endif
- 	if (backend->priv->thread == NULL) {
- 		egg_warning ("failed to create thread");
- 		return FALSE;
-diff --git a/src/pk-main.c b/src/pk-main.c
-index 4c758cd..8fa2482 100644
---- a/src/pk-main.c
-+++ b/src/pk-main.c
-@@ -219,12 +219,12 @@ main (int argc, char *argv[])
- 	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
- 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- 	textdomain (GETTEXT_PACKAGE);
--
-+#if !GLIB_CHECK_VERSION(2,32,0)
- 	if (! g_thread_supported ())
- 		g_thread_init (NULL);
- 	dbus_g_thread_init ();
- 	g_type_init ();
--
-+#endif
- 	/* TRANSLATORS: describing the service that is running */
- 	context = g_option_context_new (_("PackageKit service"));
- 	g_option_context_add_main_entries (context, options, NULL);
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/configurefix.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/configurefix.patch
deleted file mode 100644
index 48f9591..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/configurefix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: PackageKit-0.6.0/configure.ac
-===================================================================
---- PackageKit-0.6.0.orig/configure.ac	2010-01-04 16:32:18.000000000 +0000
-+++ PackageKit-0.6.0/configure.ac	2010-01-29 11:33:48.000000000 +0000
-@@ -90,7 +90,7 @@
- 							enable_strict=$default_strict)
- if test x$enable_strict != xno; then
- 	if test "$GCC" = "yes"; then
--		WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Werror"
-+		:
- 	fi
- fi
- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/opkgfixes.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/opkgfixes.patch
deleted file mode 100644
index 5a73a19..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit-0.5.6/opkgfixes.patch
+++ /dev/null
@@ -1,422 +0,0 @@
-Index: PackageKit-0.6.0/backends/opkg/pk-backend-opkg.c
-===================================================================
---- PackageKit-0.6.0.orig/backends/opkg/pk-backend-opkg.c	2010-01-29 09:39:33.000000000 +0000
-+++ PackageKit-0.6.0/backends/opkg/pk-backend-opkg.c	2010-01-29 11:30:51.000000000 +0000
-@@ -29,8 +29,7 @@
- 
-+#include <stdio.h>
- #include <libopkg/opkg.h>
- 
--static opkg_t *opkg;
--
- enum {
- 	SEARCH_NAME,
- 	SEARCH_DESCRIPTION,
-@@ -62,7 +60,7 @@
-  * check an opkg package for known GUI dependancies
-  */
- static gboolean
--opkg_is_gui_pkg (opkg_package_t *pkg)
-+opkg_is_gui_pkg (pkg_t *pkg)
- {
- 
-   /* TODO: check appropriate tag */
-@@ -84,7 +82,7 @@
-  * check an opkg package to determine if it is a development package
-  */
- static gboolean
--opkg_is_devel_pkg (opkg_package_t *pkg)
-+opkg_is_devel_pkg (pkg_t *pkg)
- {
-   if (g_strrstr (pkg->name, "-dev"))
-       return TRUE;
-@@ -105,7 +103,7 @@
-  * returns true if the tag is present
-  */
- static gboolean 
--opkg_check_tag (opkg_package_t *pkg, const gchar *tag)
-+opkg_check_tag (pkg_t *pkg, const gchar *tag)
- {
- 	if (pkg->tags && tag)
- 		return (g_strrstr (pkg->tags, tag) != NULL);
-@@ -118,7 +116,7 @@
- {
- 	switch (err)
- 	{
--	case OPKG_NO_ERROR:
-+/*	case OPKG_NO_ERROR:
- 		break;
- 	case OPKG_PACKAGE_NOT_INSTALLED:
- 		pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, NULL);
-@@ -140,7 +138,7 @@
- 		break;
- 	case OPKG_PACKAGE_NOT_AVAILABLE:
- 		pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, NULL);
--		break;
-+		break;*/
- 	default:
- 		opkg_unknown_error (backend, err, "Update package");
- 	}
-@@ -152,7 +150,7 @@
- static void
- backend_initialize (PkBackend *backend)
- {
--	opkg = opkg_new ();
-+	int opkg = opkg_new ();
- 
- 	if (!opkg) {
- 		pk_backend_error_code (backend,
-@@ -162,8 +160,8 @@
- 	}
- 
- #ifdef OPKG_OFFLINE_ROOT
--	opkg_set_option (opkg, (char *) "offline_root", OPKG_OFFLINE_ROOT);
--	opkg_re_read_config_files (opkg);
-+	opkg_set_option ((char *) "offline_root", OPKG_OFFLINE_ROOT);
-+	opkg_re_read_config_files ();
- #endif
- 
- }
-@@ -174,22 +172,22 @@
- static void
- backend_destroy (PkBackend *backend)
- {
--	opkg_free (opkg);
-+	opkg_free ();
- }
- 
- 
- static void
--pk_opkg_progress_cb (opkg_t *_opkg, const opkg_progress_data_t *pdata, void *data)
-+pk_opkg_progress_cb (const opkg_progress_data_t *pdata, void *data)
- {
--	PkBackend *backend = PK_BACKEND (data);
-+	PkBackend *backend = (PkBackend*) data;
- 	if (!backend)
- 		return;
- 
- 	pk_backend_set_percentage (backend, pdata->percentage);
--	if (pdata->package)
-+	if (pdata->pkg)
- 	{
- 		gchar *uid;
--		opkg_package_t *pkg = pdata->package;
-+		pkg_t *pkg = pdata->pkg;
- 		gint status = PK_INFO_ENUM_UNKNOWN;
- 
- 		uid = g_strdup_printf ("%s;%s;%s;",
-@@ -225,12 +223,12 @@
- {
- 	int ret;
- 
--	ret = opkg_update_package_lists (opkg, pk_opkg_progress_cb, backend);
-+	ret = opkg_update_package_lists (pk_opkg_progress_cb, backend);
- 
- 	if (ret) {
--		if (ret == OPKG_DOWNLOAD_FAILED)
--			pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_AVAILABLE, NULL);
--		else
-+//		if (ret == OPKG_DOWNLOAD_FAILED)
-+//			pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_AVAILABLE, NULL);
-+//		else
- 			opkg_unknown_error (backend, ret, "Refreshing cache");
- 	}
- 	pk_backend_finished (backend);
-@@ -256,7 +254,7 @@
-  */
- 
- static void
--pk_opkg_package_list_cb (opkg_t *_opkg, opkg_package_t *pkg, void *data)
-+pk_opkg_package_list_cb (pkg_t *pkg, void *data)
- {
- 	SearchParams *params = (SearchParams*) data;
- 	gchar *uid;
-@@ -298,7 +296,7 @@
- 	uid = g_strdup_printf ("%s;%s;%s;",
- 		pkg->name, pkg->version, pkg->architecture);
- 
--	if (pkg->installed)
-+	if (pkg->state_status == SS_INSTALLED)
- 		status = PK_INFO_ENUM_INSTALLED;
- 	else
- 		status = PK_INFO_ENUM_AVAILABLE;
-@@ -318,10 +316,10 @@
-                 opkg_is_gui_pkg (pkg))
- 		goto end_handle;
- 	if (pk_bitfield_contain(filters, PK_FILTER_ENUM_INSTALLED) && 
--                (!pkg->installed))
-+                (pkg->state_status != SS_INSTALLED))
- 		goto end_handle;
- 	if (pk_bitfield_contain(filters, PK_FILTER_ENUM_NOT_INSTALLED) && 
--                (pkg->installed))
-+                (pkg->state_status == SS_INSTALLED))
- 		goto end_handle;
- 
- 	pk_backend_package (params->backend, status, uid, pkg->description);
-@@ -338,7 +336,7 @@
- 
- 	params = pk_backend_get_pointer (backend, "search-params");
- 
--	opkg_list_packages (opkg, pk_opkg_package_list_cb, params);
-+	opkg_list_packages (pk_opkg_package_list_cb, params);
- 
- 	pk_backend_finished (params->backend);
- 
-@@ -349,7 +347,7 @@
- }
- 
- static void
--backend_search_name (PkBackend *backend, PkBitfield filters, const gchar *search)
-+backend_search_name (PkBackend *backend, PkBitfield filters, gchar **search)
- {
- 	SearchParams *params;
- 
-@@ -360,7 +358,7 @@
- 	params = g_new0 (SearchParams, 1);
- 	params->filters = filters;
- 	params->search_type = SEARCH_NAME;
--	params->needle = g_utf8_strdown (search, -1);
-+	params->needle = g_utf8_strdown (search[0], -1);
- 	params->backend = backend;
- 
- 	pk_backend_set_pointer (backend, "search-params", params);
-@@ -371,7 +369,7 @@
-  * backend_search_description:
-  */
- static void
--backend_search_description (PkBackend *backend, PkBitfield filters, const gchar *search)
-+backend_search_description (PkBackend *backend, PkBitfield filters, gchar **search)
- {
- 	SearchParams *params;
- 
-@@ -382,7 +380,7 @@
- 	params = g_new0 (SearchParams, 1);
- 	params->filters = filters;
- 	params->search_type = SEARCH_DESCRIPTION;
--	params->needle = g_utf8_strdown (search, -1);
-+	params->needle = g_utf8_strdown (search[0], -1);
- 	params->backend = backend;
- 
- 	pk_backend_set_pointer (backend, "search-params", params);
-@@ -390,7 +388,7 @@
- }
- 
- static void
--backend_search_group (PkBackend *backend, PkBitfield filters, const gchar *search)
-+backend_search_group (PkBackend *backend, PkBitfield filters, gchar **search)
- {
- 	SearchParams *params;
- 
-@@ -401,7 +399,7 @@
- 	params = g_new0 (SearchParams, 1);
- 	params->filters = filters;
- 	params->search_type = SEARCH_TAG;
--	params->needle = g_strdup_printf ("group::%s", search);
-+	params->needle = g_strdup_printf ("group::%s", search[0]);
- 	params->backend = backend;
- 
- 	pk_backend_set_pointer (backend, "search-params", params);
-@@ -412,9 +410,9 @@
- static gboolean
- backend_install_packages_thread (PkBackend *backend)
- {
--	PkPackageId *pi;
- 	gint err, i;
- 	gchar **package_ids;
-+	gchar **parts;
- 
- 	package_ids = pk_backend_get_strv (backend, "pkids");
- 
-@@ -424,13 +422,13 @@
- 	{
- 		pk_backend_package (backend, PK_INFO_ENUM_INSTALLING, package_ids[i], NULL);
- 
--		pi = pk_package_id_new_from_string (package_ids[i]);
-+		parts = pk_package_id_split (package_ids[i]);
- 
--		err = opkg_install_package (opkg, pi->name, pk_opkg_progress_cb, backend);
-+		err = opkg_install_package (parts[PK_PACKAGE_ID_NAME], pk_opkg_progress_cb, backend);
- 		if (err)
- 			handle_install_error (backend, err);
- 
--		pk_package_id_free (pi);
-+		g_strfreev (parts);
- 		if (err != 0)
- 			break;
- 	}
-@@ -453,9 +451,9 @@
- static gboolean
- backend_remove_packages_thread (PkBackend *backend)
- {
--	PkPackageId *pi;
- 	gint err, i;
- 	gchar **package_ids;
-+	gchar **parts;
- 	gboolean allow_deps;
- 	gboolean autoremove;
- 	gpointer *data;
-@@ -467,29 +465,30 @@
- 	autoremove = GPOINTER_TO_INT (data[2]);
- 	g_free (data);
- 
--	opkg_set_option (opkg, (char *)"autoremove", &autoremove);
--	opkg_set_option (opkg, (char *)"force_removal_of_dependent_packages", &allow_deps);
-+	opkg_set_option ((char *)"autoremove", &autoremove);
-+	opkg_set_option ((char *)"force_removal_of_dependent_packages", &allow_deps);
- 
- 	err = 0;
- 
- 	for (i = 0; package_ids[i]; i++)
- 	{
--		pi = pk_package_id_new_from_string (package_ids[i]);
- 		pk_backend_package (backend, PK_INFO_ENUM_REMOVING, package_ids[i], NULL);
- 
--		err = opkg_remove_package (opkg, pi->name, pk_opkg_progress_cb, backend);
-+		parts = pk_package_id_split (package_ids[i]);
-+
-+		err = opkg_remove_package (parts[PK_PACKAGE_ID_NAME], pk_opkg_progress_cb, backend);
- 
- 		switch (err)
- 		{
--		case OPKG_NO_ERROR:
--			break;
--		case OPKG_PACKAGE_NOT_INSTALLED:
--			pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, NULL);
--			break;
-+		//case OPKG_NO_ERROR:
-+		//	break;
-+		//case OPKG_PACKAGE_NOT_INSTALLED:
-+		//	pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, NULL);
-+		//	break;
- 		default:
- 			opkg_unknown_error (backend, err, "Remove");
- 		}
--		pk_package_id_free (pi);
-+		g_strfreev (parts);
- 
- 		if (err != 0)
- 			break;
-@@ -540,7 +539,7 @@
- 	gint err;
- 
- 	/* FIXME: support only_trusted */
--	err = opkg_upgrade_all (opkg, pk_opkg_progress_cb, backend);
-+	err = opkg_upgrade_all (pk_opkg_progress_cb, backend);
- 
- 	if (err)
- 		opkg_unknown_error (backend, err, "Upgrading system");
-@@ -564,29 +563,28 @@
- static gboolean
- backend_update_package_thread (PkBackend *backend)
- {
--	PkPackageId *pi;
-+        gchar **parts;
- 	gint err = 0;
- 	const gchar *package_id;
- 
- 	/* FIXME: support only_trusted */
- 	package_id = pk_backend_get_string (backend, "pkgid");
--	pi = pk_package_id_new_from_string (package_id);
-+	parts = pk_package_id_split (package_id);
- 
--	if (!pi->name || !pi->version)
-+	if (!parts)
- 	{
- 		pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND,
- 				"Package not found");
--		pk_package_id_free (pi);
- 		pk_backend_finished (backend);
- 		return FALSE;
- 	}
- 
--	err = opkg_upgrade_package (opkg, pi->name, pk_opkg_progress_cb, backend);
-+	err = opkg_upgrade_package (parts[PK_PACKAGE_ID_NAME], pk_opkg_progress_cb, backend);
- 	if (err)
- 		handle_install_error (backend, err);
- 
- 
--	pk_package_id_free (pi);
-+	g_strfreev (parts);
- 	pk_backend_finished (backend);
- 	return (err != 0);
- }
-@@ -610,13 +608,13 @@
-  */
- 
- static void
--pk_opkg_list_upgradable_cb (opkg_t *_opkg, opkg_package_t *pkg, void *data)
-+pk_opkg_list_upgradable_cb (pkg_t *pkg, void *data)
- {
--	PkBackend *backend = PK_BACKEND (data);
-+	PkBackend *backend = (PkBackend*) data;
- 	gchar *uid;
- 	gint status;
- 
--	if (pkg->installed)
-+	if (pkg->state_status == SS_INSTALLED)
- 		status = PK_INFO_ENUM_INSTALLED;
- 	else
- 		status = PK_INFO_ENUM_AVAILABLE;
-@@ -631,7 +629,7 @@
- static gboolean
- backend_get_updates_thread (PkBackend *backend)
- {
--	opkg_list_upgradable_packages (opkg, pk_opkg_list_upgradable_cb, backend);
-+	opkg_list_upgradable_packages (pk_opkg_list_upgradable_cb, backend);
- 	pk_backend_finished (backend);
- 	return TRUE;
- }
-@@ -668,16 +666,18 @@
- static gboolean
- backend_get_details_thread (PkBackend *backend)
- {
--	PkPackageId *pi;
- 	gchar **package_ids;
-+        gchar **parts;
- 	int group_index;
- 	PkGroupEnum group = 0;
--	opkg_package_t *pkg;
-+	pkg_t *pkg;
- 	gchar *newid;
- 
-         package_ids = pk_backend_get_strv(backend, "package_ids");
--	pi = pk_package_id_new_from_string (package_ids[0]);
--	if (pi == NULL)
-+	parts = pk_package_id_split (package_ids[0]);
-+
-+
-+	if (!parts)
- 	{
- 		pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "invalid package id");
- 		pk_backend_finished (backend);
-@@ -685,8 +685,8 @@
- 	}
- 
- 
--	pkg = opkg_find_package (opkg, pi->name, pi->version, pi->arch, pi->data);
--	pk_package_id_free (pi);
-+	pkg = opkg_find_package (parts[PK_PACKAGE_ID_NAME], parts[PK_PACKAGE_ID_VERSION], parts[PK_PACKAGE_ID_ARCH], parts[PK_PACKAGE_ID_DATA]);
-+	g_strfreev (parts);
- 
- 	if (!pkg)
- 	{
-@@ -695,7 +695,7 @@
- 		return FALSE;
- 	}
- 
--	newid = g_strdup_printf ("%s;%s;%s;%s", pkg->name, pkg->version, pkg->architecture, pkg->repository);
-+	newid = g_strdup_printf ("%s;%s;%s;%s", pkg->name, pkg->version, pkg->architecture, pkg->src->name);
- 
- 	if (pkg->tags) {
- 		for (group_index = 0; group < PK_GROUP_ENUM_LAST; group_index++) {
-@@ -706,9 +706,8 @@
- 		}
- 	}
- 
--	pk_backend_details (backend, newid, NULL, group, pkg->description, pkg->url, pkg->size);
-+	pk_backend_details (backend, newid, NULL, group, pkg->description, NULL, pkg->size);
- 	g_free (newid);
--	opkg_package_free(pkg);
- 	pk_backend_finished (backend);
- 	return TRUE;
- }
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit_0.5.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit_0.5.6.bb
deleted file mode 100644
index 1b60c47..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagekit/packagekit_0.5.6.bb
+++ /dev/null
@@ -1,65 +0,0 @@
-SUMMARY = "PackageKit package management abstraction"
-SECTION = "libs"
-LICENSE = "GPL-2.0+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "gtk+ python polkit dbus dbus-glib glib-2.0 sqlite3 opkg intltool intltool-native"
-RDEPENDS_${PN} = "opkg bash"
-
-inherit gnome pythonnative
-
-SRC_URI = "http://www.freedesktop.org/software/PackageKit/releases/PackageKit-${PV}.tar.bz2;name=archive \
-           file://configurefix.patch \
-           file://opkgfixes.patch \
-           file://0001-Don-t-call-deprecated-glib-functions-and-use-the-new.patch \
-          "
-
-SRC_URI[archive.md5sum] = "33a3127e9ed41e26671786aee9fe56ff"
-SRC_URI[archive.sha256sum] = "8dae41493dfb011442746d252b3435bf3204e17bf7c47e396f90fbd215260e14"
-
-S = "${WORKDIR}/PackageKit-${PV}"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[service-packs] = "--enable-service-packs,--disable-service-packs,libarchive"
-
-EXTRA_OECONF = "--with-security-framework=dummy \
-                --with-default-backend=opkg \
-                --enable-opkg \
-                --disable-tests \
-                --disable-ruck \
-                --disable-qt \
-                --disable-gstreamer-plugin \
-                --disable-local  \
-                --disable-networkmanager \
-                --disable-device-rebind \
-                ac_cv_path_XMLTO=no \
-"
-
-#do_configure_prepend() {
-#    mkdir -p m4
-#    echo "EXTRA_DIST=" > gtk-doc.make
-#}
-
-do_configure_append() {
-    for i in $(find . -name Makefile) ; do
-        sed -i -e s:${STAGING_DIR_NATIVE}::g \
-               -e s:/usr/bin/intltool-merge:${STAGING_BINDIR_NATIVE}/intltool-merge:g \
-               $i
-    done
-}
-
-PACKAGES =+ "${PN}-website"
-FILES_${PN}-website = "${datadir}/PackageKit/website"
-
-PACKAGES =+ "${PN}-python"
-FILES_${PN}-python = "${libdir}/python*"
-
-PACKAGES =+ "${PN}-gtkmodule"
-FILES_${PN}-gtkmodule = "${libdir}/gtk-2.0/*/*.so"
-
-FILES_${PN} += "${libdir}/packagekit-backend/*.so ${libdir}/pm-utils ${datadir}/dbus-1/system-services/ ${datadir}/PolicyKit ${datadir}/PackageKit"
-FILES_${PN}-dbg += "${libdir}/packagekit-backend/.debug/*.so ${libdir}/gtk-2.0/*/.debug"
-FILES_${PN}-dev += "${libdir}/packagekit-backend/*.la ${libdir}/gtk-2.0/*/*.la"
-FILES_${PN}-staticdev += "${libdir}/packagekit-backend/*.a ${libdir}/gtk-2.0/*/*.a"
-
-# PackageKit-0.5.6/backends/opkg/pk-backend-opkg.c:31:26: fatal error: libopkg/opkg.h: No such file or directory
-PNBLACKLIST[packagekit] ?= "BROKEN: depends on old deprecated libopkg which is currently disabled and will be removed soon - the recipe will be removed on 2017-09-01 unless the issue is fixed"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.94.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.94.bb
index 66054a2..3b58939 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.94.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.94.bb
@@ -3,6 +3,7 @@
 using files, pipes, and pseudo-ttys. Both system()-style and scripted \
 usages are supported and may be mixed. Likewise, functional and OO API \
 styles are both supported and may be mixed."
+HOMEPAGE = "https://metacpan.org/release/IPC-Run"
 SECTION = "libs"
 LICENSE = "Artistic-1.0 | GPL-1.0+"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=0ebd37caf53781e8b7223e6b99b63f4e"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.26/0001-Add-lpthread-to-link.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/0001-Add-lpthread-to-link.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.26/0001-Add-lpthread-to-link.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/0001-Add-lpthread-to-link.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.26/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.26/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/0001-Specify-tag-with-libtool.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/0001-Specify-tag-with-libtool.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/CVE-2017-16642.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/CVE-2017-16642.patch
new file mode 100644
index 0000000..41d2a0f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/CVE-2017-16642.patch
@@ -0,0 +1,5241 @@
+From f2f90767311355cafabff604a7a857ca60ee3f01 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Wed, 22 Nov 2017 21:14:59 -0800
+Subject: [PATCH] Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian()
+
+Upstream-Status: Backport
+CVE: CVE-2017-16642
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ ext/date/lib/parse_date.c         | 1544 +++++++++++++++++++++----------------
+ ext/date/lib/parse_date.re        |    4 +-
+ ext/date/tests/bug53437_var3.phpt |    2 +-
+ ext/wddx/tests/bug75055.phpt      |   20 +
+ ext/wddx/tests/bug75055.wddx      |   13 +
+ 5 files changed, 911 insertions(+), 672 deletions(-)
+ create mode 100644 ext/wddx/tests/bug75055.phpt
+ create mode 100644 ext/wddx/tests/bug75055.wddx
+
+diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
+index f929619..6b11418 100644
+--- a/ext/date/lib/parse_date.c
++++ b/ext/date/lib/parse_date.c
+@@ -1,4 +1,5 @@
+-/* Generated by re2c 0.15.3 on Tue Jul  4 21:15:17 2017 */
++/* Generated by re2c 0.15.3 on Wed Nov 22 21:14:47 2017 */
++#line 1 "ext/date/lib/parse_date.re"
+ /*
+  * The MIT License (MIT)
+  *
+@@ -837,9 +838,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
+ std:
+ 	s->tok = cursor;
+ 	s->len = 0;
++#line 965 "ext/date/lib/parse_date.re"
+ 
+ 
+ 
++#line 846 "ext/date/lib/parse_date.c"
+ {
+ 	YYCTYPE yych;
+ 	unsigned int yyaccept = 0;
+@@ -962,18 +965,19 @@ yy2:
+ 		} else {
+ 			if (yych <= '@') goto yy3;
+ 			if (yych <= 'D') goto yy165;
+-			goto yy1521;
++			goto yy1523;
+ 		}
+ 	} else {
+ 		if (yych <= 'd') {
+ 			if (yych <= 'Z') goto yy165;
+ 			if (yych >= 'a') goto yy170;
+ 		} else {
+-			if (yych <= 'e') goto yy1530;
++			if (yych <= 'e') goto yy1532;
+ 			if (yych <= 'z') goto yy170;
+ 		}
+ 	}
+ yy3:
++#line 1673 "ext/date/lib/parse_date.re"
+ 	{
+ 		int tz_not_found;
+ 		DEBUG_OUTPUT("tzcorrection | tz");
+@@ -986,6 +990,7 @@ yy3:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_TIMEZONE;
+ 	}
++#line 994 "ext/date/lib/parse_date.c"
+ yy4:
+ 	yych = *++YYCURSOR;
+ 	if (yych <= 'E') {
+@@ -995,7 +1000,7 @@ yy4:
+ 		} else {
+ 			if (yych <= '@') goto yy3;
+ 			if (yych <= 'D') goto yy165;
+-			goto yy1521;
++			goto yy1523;
+ 		}
+ 	} else {
+ 		if (yych <= 'd') {
+@@ -1003,7 +1008,7 @@ yy4:
+ 			if (yych <= '`') goto yy3;
+ 			goto yy165;
+ 		} else {
+-			if (yych <= 'e') goto yy1521;
++			if (yych <= 'e') goto yy1523;
+ 			if (yych <= 'z') goto yy165;
+ 			goto yy3;
+ 		}
+@@ -1017,12 +1022,12 @@ yy5:
+ 			goto yy165;
+ 		} else {
+ 			if (yych <= 'H') {
+-				if (yych <= 'E') goto yy1492;
++				if (yych <= 'E') goto yy1494;
+ 				goto yy165;
+ 			} else {
+-				if (yych <= 'I') goto yy1493;
++				if (yych <= 'I') goto yy1495;
+ 				if (yych <= 'N') goto yy165;
+-				goto yy1491;
++				goto yy1493;
+ 			}
+ 		}
+ 	} else {
+@@ -1031,15 +1036,15 @@ yy5:
+ 				if (yych <= 'Z') goto yy165;
+ 				goto yy3;
+ 			} else {
+-				if (yych == 'e') goto yy1508;
++				if (yych == 'e') goto yy1510;
+ 				goto yy170;
+ 			}
+ 		} else {
+ 			if (yych <= 'n') {
+-				if (yych <= 'i') goto yy1509;
++				if (yych <= 'i') goto yy1511;
+ 				goto yy170;
+ 			} else {
+-				if (yych <= 'o') goto yy1507;
++				if (yych <= 'o') goto yy1509;
+ 				if (yych <= 'z') goto yy170;
+ 				goto yy3;
+ 			}
+@@ -1054,12 +1059,12 @@ yy6:
+ 			goto yy165;
+ 		} else {
+ 			if (yych <= 'H') {
+-				if (yych <= 'E') goto yy1492;
++				if (yych <= 'E') goto yy1494;
+ 				goto yy165;
+ 			} else {
+-				if (yych <= 'I') goto yy1493;
++				if (yych <= 'I') goto yy1495;
+ 				if (yych <= 'N') goto yy165;
+-				goto yy1491;
++				goto yy1493;
+ 			}
+ 		}
+ 	} else {
+@@ -1068,15 +1073,15 @@ yy6:
+ 				if (yych <= 'Z') goto yy165;
+ 				goto yy3;
+ 			} else {
+-				if (yych == 'e') goto yy1492;
++				if (yych == 'e') goto yy1494;
+ 				goto yy165;
+ 			}
+ 		} else {
+ 			if (yych <= 'n') {
+-				if (yych <= 'i') goto yy1493;
++				if (yych <= 'i') goto yy1495;
+ 				goto yy165;
+ 			} else {
+-				if (yych <= 'o') goto yy1491;
++				if (yych <= 'o') goto yy1493;
+ 				if (yych <= 'z') goto yy165;
+ 				goto yy3;
+ 			}
+@@ -1088,24 +1093,24 @@ yy7:
+ 		if (yych <= 'A') {
+ 			if (yych == ')') goto yy164;
+ 			if (yych <= '@') goto yy3;
+-			goto yy1461;
++			goto yy1463;
+ 		} else {
+-			if (yych == 'I') goto yy1462;
++			if (yych == 'I') goto yy1464;
+ 			if (yych <= 'N') goto yy165;
+-			goto yy1463;
++			goto yy1465;
+ 		}
+ 	} else {
+ 		if (yych <= 'h') {
+ 			if (yych <= 'Z') goto yy165;
+ 			if (yych <= '`') goto yy3;
+-			if (yych <= 'a') goto yy1476;
++			if (yych <= 'a') goto yy1478;
+ 			goto yy170;
+ 		} else {
+ 			if (yych <= 'n') {
+-				if (yych <= 'i') goto yy1477;
++				if (yych <= 'i') goto yy1479;
+ 				goto yy170;
+ 			} else {
+-				if (yych <= 'o') goto yy1478;
++				if (yych <= 'o') goto yy1480;
+ 				if (yych <= 'z') goto yy170;
+ 				goto yy3;
+ 			}
+@@ -1117,24 +1122,24 @@ yy8:
+ 		if (yych <= 'A') {
+ 			if (yych == ')') goto yy164;
+ 			if (yych <= '@') goto yy3;
+-			goto yy1461;
++			goto yy1463;
+ 		} else {
+-			if (yych == 'I') goto yy1462;
++			if (yych == 'I') goto yy1464;
+ 			if (yych <= 'N') goto yy165;
+-			goto yy1463;
++			goto yy1465;
+ 		}
+ 	} else {
+ 		if (yych <= 'h') {
+ 			if (yych <= 'Z') goto yy165;
+ 			if (yych <= '`') goto yy3;
+-			if (yych <= 'a') goto yy1461;
++			if (yych <= 'a') goto yy1463;
+ 			goto yy165;
+ 		} else {
+ 			if (yych <= 'n') {
+-				if (yych <= 'i') goto yy1462;
++				if (yych <= 'i') goto yy1464;
+ 				goto yy165;
+ 			} else {
+-				if (yych <= 'o') goto yy1463;
++				if (yych <= 'o') goto yy1465;
+ 				if (yych <= 'z') goto yy165;
+ 				goto yy3;
+ 			}
+@@ -1146,15 +1151,15 @@ yy9:
+ 	switch (yych) {
+ 	case ')':	goto yy164;
+ 	case '0':
+-	case '1':	goto yy1391;
+-	case '2':	goto yy1392;
++	case '1':	goto yy1393;
++	case '2':	goto yy1394;
+ 	case '3':
+ 	case '4':
+ 	case '5':
+ 	case '6':
+ 	case '7':
+ 	case '8':
+-	case '9':	goto yy1393;
++	case '9':	goto yy1395;
+ 	case 'A':
+ 	case 'B':
+ 	case 'C':
+@@ -1176,11 +1181,11 @@ yy9:
+ 	case 'X':
+ 	case 'Y':
+ 	case 'Z':	goto yy165;
+-	case 'E':	goto yy1386;
+-	case 'H':	goto yy1387;
+-	case 'O':	goto yy1388;
+-	case 'U':	goto yy1389;
+-	case 'W':	goto yy1390;
++	case 'E':	goto yy1388;
++	case 'H':	goto yy1389;
++	case 'O':	goto yy1390;
++	case 'U':	goto yy1391;
++	case 'W':	goto yy1392;
+ 	case 'a':
+ 	case 'b':
+ 	case 'c':
+@@ -1202,11 +1207,11 @@ yy9:
+ 	case 'x':
+ 	case 'y':
+ 	case 'z':	goto yy170;
+-	case 'e':	goto yy1429;
+-	case 'h':	goto yy1430;
+-	case 'o':	goto yy1431;
+-	case 'u':	goto yy1432;
+-	case 'w':	goto yy1433;
++	case 'e':	goto yy1431;
++	case 'h':	goto yy1432;
++	case 'o':	goto yy1433;
++	case 'u':	goto yy1434;
++	case 'w':	goto yy1435;
+ 	default:	goto yy3;
+ 	}
+ yy10:
+@@ -1215,15 +1220,15 @@ yy10:
+ 	switch (yych) {
+ 	case ')':	goto yy164;
+ 	case '0':
+-	case '1':	goto yy1391;
+-	case '2':	goto yy1392;
++	case '1':	goto yy1393;
++	case '2':	goto yy1394;
+ 	case '3':
+ 	case '4':
+ 	case '5':
+ 	case '6':
+ 	case '7':
+ 	case '8':
+-	case '9':	goto yy1393;
++	case '9':	goto yy1395;
+ 	case 'A':
+ 	case 'B':
+ 	case 'C':
+@@ -1267,28 +1272,30 @@ yy10:
+ 	case 'y':
+ 	case 'z':	goto yy165;
+ 	case 'E':
+-	case 'e':	goto yy1386;
++	case 'e':	goto yy1388;
+ 	case 'H':
+-	case 'h':	goto yy1387;
++	case 'h':	goto yy1389;
+ 	case 'O':
+-	case 'o':	goto yy1388;
++	case 'o':	goto yy1390;
+ 	case 'U':
+-	case 'u':	goto yy1389;
++	case 'u':	goto yy1391;
+ 	case 'W':
+-	case 'w':	goto yy1390;
++	case 'w':	goto yy1392;
+ 	default:	goto yy3;
+ 	}
+ yy11:
+ 	yyaccept = 1;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+-	if (yych == '-') goto yy1374;
++	if (yych == '-') goto yy1376;
+ 	if (yych <= '/') goto yy12;
+-	if (yych <= '9') goto yy1375;
++	if (yych <= '9') goto yy1377;
+ yy12:
++#line 1768 "ext/date/lib/parse_date.re"
+ 	{
+ 		add_error(s, "Unexpected character");
+ 		goto std;
+ 	}
++#line 1299 "ext/date/lib/parse_date.c"
+ yy13:
+ 	yych = *++YYCURSOR;
+ 	if (yych <= 'R') {
+@@ -1299,16 +1306,16 @@ yy13:
+ 			} else {
+ 				if (yych <= '@') goto yy3;
+ 				if (yych <= 'D') goto yy165;
+-				goto yy1310;
++				goto yy1311;
+ 			}
+ 		} else {
+ 			if (yych <= 'N') {
+-				if (yych == 'I') goto yy1311;
++				if (yych == 'I') goto yy1312;
+ 				goto yy165;
+ 			} else {
+-				if (yych <= 'O') goto yy1312;
++				if (yych <= 'O') goto yy1313;
+ 				if (yych <= 'Q') goto yy165;
+-				goto yy1313;
++				goto yy1314;
+ 			}
+ 		}
+ 	} else {
+@@ -1318,16 +1325,16 @@ yy13:
+ 				if (yych <= '`') goto yy3;
+ 				goto yy170;
+ 			} else {
+-				if (yych <= 'e') goto yy1351;
++				if (yych <= 'e') goto yy1353;
+ 				if (yych <= 'h') goto yy170;
+-				goto yy1352;
++				goto yy1354;
+ 			}
+ 		} else {
+ 			if (yych <= 'q') {
+-				if (yych == 'o') goto yy1353;
++				if (yych == 'o') goto yy1355;
+ 				goto yy170;
+ 			} else {
+-				if (yych <= 'r') goto yy1354;
++				if (yych <= 'r') goto yy1356;
+ 				if (yych <= 'z') goto yy170;
+ 				goto yy3;
+ 			}
+@@ -1343,16 +1350,16 @@ yy14:
+ 			} else {
+ 				if (yych <= '@') goto yy3;
+ 				if (yych <= 'D') goto yy165;
+-				goto yy1310;
++				goto yy1311;
+ 			}
+ 		} else {
+ 			if (yych <= 'N') {
+-				if (yych == 'I') goto yy1311;
++				if (yych == 'I') goto yy1312;
+ 				goto yy165;
+ 			} else {
+-				if (yych <= 'O') goto yy1312;
++				if (yych <= 'O') goto yy1313;
+ 				if (yych <= 'Q') goto yy165;
+-				goto yy1313;
++				goto yy1314;
+ 			}
+ 		}
+ 	} else {
+@@ -1362,16 +1369,16 @@ yy14:
+ 				if (yych <= '`') goto yy3;
+ 				goto yy165;
+ 			} else {
+-				if (yych <= 'e') goto yy1310;
++				if (yych <= 'e') goto yy1311;
+ 				if (yych <= 'h') goto yy165;
+-				goto yy1311;
++				goto yy1312;
+ 			}
+ 		} else {
+ 			if (yych <= 'q') {
+-				if (yych == 'o') goto yy1312;
++				if (yych == 'o') goto yy1313;
+ 				goto yy165;
+ 			} else {
+-				if (yych <= 'r') goto yy1313;
++				if (yych <= 'r') goto yy1314;
+ 				if (yych <= 'z') goto yy165;
+ 				goto yy3;
+ 			}
+@@ -1382,13 +1389,13 @@ yy15:
+ 	if (yych <= 'A') {
+ 		if (yych == ')') goto yy164;
+ 		if (yych <= '@') goto yy3;
+-		goto yy1296;
++		goto yy1297;
+ 	} else {
+ 		if (yych <= '`') {
+ 			if (yych <= 'Z') goto yy165;
+ 			goto yy3;
+ 		} else {
+-			if (yych <= 'a') goto yy1307;
++			if (yych <= 'a') goto yy1308;
+ 			if (yych <= 'z') goto yy170;
+ 			goto yy3;
+ 		}
+@@ -1398,13 +1405,13 @@ yy16:
+ 	if (yych <= 'A') {
+ 		if (yych == ')') goto yy164;
+ 		if (yych <= '@') goto yy3;
+-		goto yy1296;
++		goto yy1297;
+ 	} else {
+ 		if (yych <= '`') {
+ 			if (yych <= 'Z') goto yy165;
+ 			goto yy3;
+ 		} else {
+-			if (yych <= 'a') goto yy1296;
++			if (yych <= 'a') goto yy1297;
+ 			if (yych <= 'z') goto yy165;
+ 			goto yy3;
+ 		}
+@@ -1420,7 +1427,7 @@ yy17:
+ 			if (yych <= 'Z') goto yy165;
+ 			goto yy3;
+ 		} else {
+-			if (yych <= 'a') goto yy1293;
++			if (yych <= 'a') goto yy1294;
+ 			if (yych <= 'z') goto yy170;
+ 			goto yy3;
+ 		}
+@@ -2495,18 +2502,22 @@ yy48:
+ 	if (yych <= '/') goto yy49;
+ 	if (yych <= '9') goto yy54;
+ yy49:
++#line 1757 "ext/date/lib/parse_date.re"
+ 	{
+ 		goto std;
+ 	}
++#line 2510 "ext/date/lib/parse_date.c"
+ yy50:
+ 	yych = *++YYCURSOR;
+ 	goto yy49;
+ yy51:
+ 	++YYCURSOR;
++#line 1762 "ext/date/lib/parse_date.re"
+ 	{
+ 		s->pos = cursor; s->line++;
+ 		goto std;
+ 	}
++#line 2521 "ext/date/lib/parse_date.c"
+ yy53:
+ 	yych = *++YYCURSOR;
+ 	goto yy12;
+@@ -2693,23 +2704,23 @@ yy56:
+ 					}
+ 				} else {
+ 					if (yyaccept == 28) {
+-						goto yy1377;
++						goto yy1379;
+ 					} else {
+-						goto yy1415;
++						goto yy1417;
+ 					}
+ 				}
+ 			} else {
+ 				if (yyaccept <= 31) {
+ 					if (yyaccept == 30) {
+-						goto yy1418;
++						goto yy1420;
+ 					} else {
+-						goto yy1498;
++						goto yy1500;
+ 					}
+ 				} else {
+ 					if (yyaccept == 32) {
+-						goto yy1506;
++						goto yy1508;
+ 					} else {
+-						goto yy1529;
++						goto yy1531;
+ 					}
+ 				}
+ 			}
+@@ -2920,6 +2931,7 @@ yy73:
+ 	if (yych == 'S') goto yy75;
+ 	if (yych == 's') goto yy75;
+ yy74:
++#line 1741 "ext/date/lib/parse_date.re"
+ 	{
+ 		timelib_ull i;
+ 		DEBUG_OUTPUT("relative");
+@@ -2934,6 +2946,7 @@ yy74:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_RELATIVE;
+ 	}
++#line 2950 "ext/date/lib/parse_date.c"
+ yy75:
+ 	yych = *++YYCURSOR;
+ 	if (yych == 'D') goto yy76;
+@@ -3719,6 +3732,7 @@ yy190:
+ 		}
+ 	}
+ yy191:
++#line 1604 "ext/date/lib/parse_date.re"
+ 	{
+ 		const timelib_relunit* relunit;
+ 		DEBUG_OUTPUT("daytext");
+@@ -3735,6 +3749,7 @@ yy191:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_WEEKDAY;
+ 	}
++#line 3753 "ext/date/lib/parse_date.c"
+ yy192:
+ 	yych = *++YYCURSOR;
+ 	if (yych <= 'K') {
+@@ -4227,6 +4242,7 @@ yy217:
+ 		}
+ 	}
+ yy218:
++#line 1663 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("monthtext");
+ 		TIMELIB_INIT;
+@@ -4235,6 +4251,7 @@ yy218:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_DATE_TEXT;
+ 	}
++#line 4255 "ext/date/lib/parse_date.c"
+ yy219:
+ 	++YYCURSOR;
+ 	if ((YYLIMIT - YYCURSOR) < 23) YYFILL(23);
+@@ -4469,6 +4486,7 @@ yy231:
+ 	if (yych == 't') goto yy319;
+ 	goto yy237;
+ yy232:
++#line 1409 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("datetextual | datenoyear");
+@@ -4481,6 +4499,7 @@ yy232:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_DATE_TEXT;
+ 	}
++#line 4503 "ext/date/lib/parse_date.c"
+ yy233:
+ 	yyaccept = 6;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -4593,6 +4612,7 @@ yy245:
+ 		if (yych <= ':') goto yy248;
+ 	}
+ yy246:
++#line 1711 "ext/date/lib/parse_date.re"
+ 	{
+ 		int tz_not_found;
+ 		DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
+@@ -4621,6 +4641,7 @@ yy246:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_SHORTDATE_WITH_TIME;
+ 	}
++#line 4645 "ext/date/lib/parse_date.c"
+ yy247:
+ 	yyaccept = 7;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -4893,6 +4914,7 @@ yy269:
+ 	}
+ yy270:
+ 	++YYCURSOR;
++#line 1687 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
+ 		TIMELIB_INIT;
+@@ -4915,6 +4937,7 @@ yy270:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_SHORTDATE_WITH_TIME;
+ 	}
++#line 4941 "ext/date/lib/parse_date.c"
+ yy272:
+ 	yych = *++YYCURSOR;
+ 	if (yych <= 0x1F) {
+@@ -5470,6 +5493,7 @@ yy320:
+ 	if (yych <= '/') goto yy56;
+ 	if (yych >= ':') goto yy56;
+ 	++YYCURSOR;
++#line 1381 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("datenoday");
+@@ -5482,6 +5506,7 @@ yy320:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_DATE_NO_DAY;
+ 	}
++#line 5510 "ext/date/lib/parse_date.c"
+ yy323:
+ 	yych = *++YYCURSOR;
+ 	if (yych <= '9') {
+@@ -5704,6 +5729,7 @@ yy327:
+ 	if ((yych = *YYCURSOR) <= '/') goto yy330;
+ 	if (yych <= '9') goto yy331;
+ yy330:
++#line 1525 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("pgtextshort");
+@@ -5716,6 +5742,7 @@ yy330:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_PG_TEXT;
+ 	}
++#line 5746 "ext/date/lib/parse_date.c"
+ yy331:
+ 	yych = *++YYCURSOR;
+ 	if (yych <= '/') goto yy330;
+@@ -6270,6 +6297,7 @@ yy356:
+ 		if (yych <= 'z') goto yy167;
+ 	}
+ yy357:
++#line 1583 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("ago");
+ 		TIMELIB_INIT;
+@@ -6289,6 +6317,7 @@ yy357:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_AGO;
+ 	}
++#line 6321 "ext/date/lib/parse_date.c"
+ yy358:
+ 	yyaccept = 5;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -8009,6 +8038,7 @@ yy417:
+ yy418:
+ 	++YYCURSOR;
+ yy419:
++#line 1286 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
+ 		TIMELIB_INIT;
+@@ -8019,6 +8049,7 @@ yy419:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_ISO_DATE;
+ 	}
++#line 8053 "ext/date/lib/parse_date.c"
+ yy420:
+ 	yyaccept = 0;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -8641,6 +8672,7 @@ yy439:
+ 		}
+ 	}
+ yy440:
++#line 1423 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("datenoyearrev");
+ 		TIMELIB_INIT;
+@@ -8651,6 +8683,7 @@ yy440:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_DATE_TEXT;
+ 	}
++#line 8687 "ext/date/lib/parse_date.c"
+ yy441:
+ 	yyaccept = 9;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -8778,6 +8811,7 @@ yy450:
+ 	}
+ yy452:
+ 	++YYCURSOR;
++#line 1141 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
+ 		TIMELIB_INIT;
+@@ -8793,6 +8827,7 @@ yy452:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_TIME12;
+ 	}
++#line 8831 "ext/date/lib/parse_date.c"
+ yy454:
+ 	yyaccept = 10;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -8803,6 +8838,7 @@ yy454:
+ 		if (yych <= ':') goto yy457;
+ 	}
+ yy455:
++#line 1178 "ext/date/lib/parse_date.re"
+ 	{
+ 		int tz_not_found;
+ 		DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
+@@ -8827,6 +8863,7 @@ yy455:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_TIME24_WITH_ZONE;
+ 	}
++#line 8867 "ext/date/lib/parse_date.c"
+ yy456:
+ 	yyaccept = 10;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -9103,6 +9140,7 @@ yy485:
+ 	}
+ yy487:
+ 	++YYCURSOR;
++#line 1158 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("mssqltime");
+ 		TIMELIB_INIT;
+@@ -9121,6 +9159,7 @@ yy487:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_TIME24_WITH_ZONE;
+ 	}
++#line 9163 "ext/date/lib/parse_date.c"
+ yy489:
+ 	yyaccept = 10;
+ 	YYMARKER = ++YYCURSOR;
+@@ -9215,6 +9254,7 @@ yy498:
+ 	if ((yych = *YYCURSOR) <= '/') goto yy499;
+ 	if (yych <= '9') goto yy505;
+ yy499:
++#line 1340 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("datefull");
+@@ -9228,6 +9268,7 @@ yy499:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_DATE_FULL;
+ 	}
++#line 9272 "ext/date/lib/parse_date.c"
+ yy500:
+ 	yych = *++YYCURSOR;
+ 	if (yych == 'M') goto yy501;
+@@ -9891,6 +9932,7 @@ yy569:
+ 	if (yych <= '/') goto yy56;
+ 	if (yych >= ':') goto yy56;
+ 	++YYCURSOR;
++#line 1355 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("pointed date YYYY");
+ 		TIMELIB_INIT;
+@@ -9901,6 +9943,7 @@ yy569:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_DATE_FULL_POINTED;
+ 	}
++#line 9947 "ext/date/lib/parse_date.c"
+ yy572:
+ 	yyaccept = 10;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -9931,6 +9974,7 @@ yy575:
+ 	if (yych <= '/') goto yy576;
+ 	if (yych <= '9') goto yy569;
+ yy576:
++#line 1367 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("pointed date YY");
+@@ -9943,6 +9987,7 @@ yy576:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_DATE_FULL_POINTED;
+ 	}
++#line 9991 "ext/date/lib/parse_date.c"
+ yy577:
+ 	yyaccept = 10;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -10538,6 +10583,7 @@ yy620:
+ 		}
+ 	}
+ yy621:
++#line 1326 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("gnudateshort");
+@@ -10550,6 +10596,7 @@ yy621:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_ISO_DATE;
+ 	}
++#line 10600 "ext/date/lib/parse_date.c"
+ yy622:
+ 	yyaccept = 12;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -10645,6 +10692,7 @@ yy630:
+ 		}
+ 	}
+ yy631:
++#line 1270 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("americanshort | american");
+@@ -10659,6 +10707,7 @@ yy631:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_AMERICAN;
+ 	}
++#line 10711 "ext/date/lib/parse_date.c"
+ yy632:
+ 	yyaccept = 13;
+ 	yych = *(YYMARKER = ++YYCURSOR);
+@@ -10857,6 +10906,7 @@ yy664:
+ 	if (yych <= '9') goto yy667;
+ 	if (yych <= ':') goto yy668;
+ yy665:
++#line 1553 "ext/date/lib/parse_date.re"
+ 	{
+ 		int tz_not_found;
+ 		DEBUG_OUTPUT("clf");
+@@ -10876,6 +10926,7 @@ yy665:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_CLF;
+ 	}
++#line 10930 "ext/date/lib/parse_date.c"
+ yy666:
+ 	yych = *++YYCURSOR;
+ 	if (yych <= '5') {
+@@ -11362,6 +11413,7 @@ yy727:
+ 		if (yych <= 't') goto yy627;
+ 	}
+ yy728:
++#line 1298 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("iso8601date2");
+@@ -11374,6 +11426,7 @@ yy728:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_ISO_DATE;
+ 	}
++#line 11430 "ext/date/lib/parse_date.c"
+ yy729:
+ 	yych = *++YYCURSOR;
+ 	if (yych == 'C') goto yy730;
+@@ -11404,6 +11457,7 @@ yy734:
+ 	if (yych >= '2') goto yy56;
+ yy735:
+ 	++YYCURSOR;
++#line 1539 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("pgtextreverse");
+@@ -11416,6 +11470,7 @@ yy735:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_PG_TEXT;
+ 	}
++#line 11474 "ext/date/lib/parse_date.c"
+ yy737:
+ 	yych = *++YYCURSOR;
+ 	if (yych == 'V') goto yy730;
+@@ -11568,6 +11623,7 @@ yy747:
+ 		}
+ 	}
+ yy748:
++#line 1574 "ext/date/lib/parse_date.re"
+ 	{
+ 		DEBUG_OUTPUT("year4");
+ 		TIMELIB_INIT;
+@@ -11575,6 +11631,7 @@ yy748:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_CLF;
+ 	}
++#line 11635 "ext/date/lib/parse_date.c"
+ yy749:
+ 	yych = *++YYCURSOR;
+ 	switch (yych) {
+@@ -11769,6 +11826,7 @@ yy757:
+ 		if (yych <= 'X') goto yy848;
+ 	}
+ yy758:
++#line 1395 "ext/date/lib/parse_date.re"
+ 	{
+ 		int length = 0;
+ 		DEBUG_OUTPUT("datenodayrev");
+@@ -11781,6 +11839,7 @@ yy758:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_DATE_NO_DAY;
+ 	}
++#line 11843 "ext/date/lib/parse_date.c"
+ yy759:
+ 	yych = *++YYCURSOR;
+ 	if (yych == 'I') goto yy892;
+@@ -11980,6 +12039,7 @@ yy778:
+ 	if (yych <= '/') goto yy779;
+ 	if (yych <= '7') goto yy781;
+ yy779:
++#line 1506 "ext/date/lib/parse_date.re"
+ 	{
+ 		timelib_sll w, d;
+ 		DEBUG_OUTPUT("isoweek");
+@@ -11997,12 +12057,14 @@ yy779:
+ 		TIMELIB_DEINIT;
+ 		return TIMELIB_ISO_WEEK;
+ 	}
++#line 12061 "ext/date/lib/parse_date.c"
+ yy780:
+ 	yych = *++YYCURSOR;
+ 	if (yych <= '/') goto yy56;
+ 	if (yych >= '8') goto yy56;
+ yy781:
+ 	++YYCURSOR;
++#line 1487 "ext/date/lib/parse_date.re"