# It really depends on order of the layers appearing in BBLAYERS
# variable in toplevel bblayers.conf file, where bitbake will search
# for .inc files and others where bitbake uses BBPATH since it will
# search the directories from first to last as specified in BBPATH
# Therefore if you want a given layer to be considered high priority
# for the .inc and .conf etc. then consider it adding at the beginning
# of BBPATH. For bblayers bitbake will use BBFILES_PRIORITY to resolve
# the recipe contention so the order of directories in BBFILES does
# not matter.

# 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 += "openembedded-layer"
BBFILE_PATTERN_openembedded-layer := "^${LAYERDIR}/"

# Define the priority for recipes (.bb files) from this layer,
# choosing carefully how this layer interacts with all of the
# other layers.

BBFILE_PRIORITY_openembedded-layer = "5"

# only activates content when identified layers are present,
# to ensure yocto compatibility check pass
BBFILES_DYNAMIC += " \
    clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/recipes-*/*/*.bb \
    clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/recipes-*/*/*.bbappend \
    meta-python:${LAYERDIR}/dynamic-layers/meta-python/recipes-*/*/*.bb \
    meta-python:${LAYERDIR}/dynamic-layers/meta-python/recipes-*/*/*.bbappend \
    multimedia-layer:${LAYERDIR}/dynamic-layers/multimedia-layer/recipes-*/*/*.bb \
    multimedia-layer:${LAYERDIR}/dynamic-layers/multimedia-layer/recipes-*/*/*.bbappend \
    networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/recipes-*/*/*.bb \
    networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/recipes-*/*/*.bbappend \
    gnome-layer:${LAYERDIR}/dynamic-layers/gnome-layer/recipes-*/*/*.bb \
    gnome-layer:${LAYERDIR}/dynamic-layers/gnome-layer/recipes-*/*/*.bbappend \
    perl-layer:${LAYERDIR}/dynamic-layers/perl-layer/recipes-*/*/*.bb \
    perl-layer:${LAYERDIR}/dynamic-layers/perl-layer/recipes-*/*/*.bbappend \
    selinux:${LAYERDIR}/dynamic-layers/selinux/recipes-*/*/*.bb \
    selinux:${LAYERDIR}/dynamic-layers/selinux/recipes-*/*/*.bbappend \
"

# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_openembedded-layer = "1"

LAYERDEPENDS_openembedded-layer = "core"

LAYERSERIES_COMPAT_openembedded-layer = "walnascar whinlatter"

LICENSE_PATH += "${LAYERDIR}/licenses"

PREFERRED_RPROVIDER_libdevmapper = "lvm2"
PREFERRED_RPROVIDER_libdevmapper-native = "lvm2-native"
PREFERRED_RPROVIDER_nativesdk-libdevmapper = "nativesdk-lvm2"
PREFERRED_PROVIDER_android-tools-conf ?= "android-tools-conf"
# Configures whether coreutils or uutils-coreutils is used.
PREFERRED_PROVIDER_coreutils = "coreutils"
PREFERRED_PROVIDER_virtual/opencl-icd ?= "opencl-icd-loader"
PREFERRED_RPROVIDER_virtual-opencl-icd ?= "opencl-icd-loader"
PREFERRED_RPROVIDER_virtual-redis ?= "redis"

SIGGEN_EXCLUDERECIPES_ABISAFE += " \
  fbset-modes \
  gpsd-machine-conf \
  distro-feed-configs \
  ca-certificates \
  pointercal \
"

SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
  android-tools->android-tools-conf \
  usb-modeswitch-data->usb-modeswitch \
  lmsensors->lmsensors-config \
  phoronix-test-suite->bash \
  phoronix-test-suite->python3 \
  phoronix-test-suite->php \
  phoronix-test-suite->lsb-release \
  phoronix-test-suite->util-linux \
  phoronix-test-suite->busybox \
  phoronix-test-suite->shared-mime-info \
  phoronix-test-suite->desktop-file-utils \
"

# ttf.inc inherits fontcache which adds fontconfig-utils to RDEPENDS
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
  terminus-font->fontconfig \
  ttf-abyssinica->fontconfig \
  ttf-arphic-uming->fontconfig \
  ttf-dejavu->fontconfig \
  ttf-droid->fontconfig \
  ttf-gentium->fontconfig \
  ttf-google-fira->fontconfig \
  ttf-hunkyfonts->fontconfig \
  ttf-inconsolata->fontconfig \
  ttf-ipa->fontconfig \
  ttf-liberation->fontconfig \
  ttf-liberation-sans-narrow->fontconfig \
  ttf-lklug->fontconfig \
  ttf-lohit->fontconfig \
  ttf-noto-emoji->fontconfig \
  ttf-pt-sans->fontconfig \
  ttf-roboto->fontconfig \
  ttf-mplus->fontconfig \
  ttf-sazanami->fontconfig \
  ttf-takao->fontconfig \
  ttf-tlwg->fontconfig \
  ttf-ubuntu-font-family->fontconfig \
  ttf-vlgothic->fontconfig \
  ttf-wqy-zenhei->fontconfig \
  source-han-sans-cn-fonts->fontconfig \
  source-han-sans-jp-fonts->fontconfig \
  source-han-sans-kr-fonts->fontconfig \
  source-han-sans-tw-fonts->fontconfig \
  source-code-pro-fonts->fontconfig \
"

DEFAULT_TEST_SUITES:pn-meta-oe-ptest-image = " ${PTESTTESTSUITE}"

NON_MULTILIB_RECIPES:append = " crash pahole libbpf"

NON_MULTILIB_RECIPES:remove:x86 = "libbpf"
NON_MULTILIB_RECIPES:remove:x86-64 = "libbpf"

# List of known non-reproducible package of the meta-oe layer
# Please keep this list sorted
OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES += " \
    apitrace \
    apitrace-dbg \
    asio-dbg \
    asio-ptest \
    asio-src \
    cpuid-doc \
    dhrystone \
    dhrystone-dbg \
    dhrystone-dev \
    dhrystone-src \
    directfb \
    directfb-dbg \
    doxygen-src \
    edid-decode \
    edid-decode-dbg \
    editorconfig-core-c-dev \
    etcd-cpp-apiv3-dev \
    evemu-tools-python \
    fbgrab-doc \
    fluentbit-src \
    fsverity-utils-dbg \
    fsverity-utils-staticdev \
    fvwm-dbg \
    fvwm-doc \
    fvwm-extra \
    fwupd-dbg \
    fwupd-ptest \
    gcab-src \
    gosu \
    gosu-dbg \
    gosu-dev \
    gosu-staticdev \
    gphoto2 \
    gphoto2-dbg \
    hddtemp-locale-de \
    hdf5 \
    hdf5-dbg \
    hdf5-src \
    hdf5-staticdev \
    hplip-dbg \
    hplip-filter \
    hplip-src \
    iotop \
    iotop-dbg \
    ipmiutil \
    ipmiutil-dbg \
    ipmiutil-dev \
    jpnevulator-doc \
    jsonrpc-dev \
    kpatch-build \
    kpatch-doc \
    ldns \
    libass9 \
    libass-dbg \
    libbotan-3-7 \
    libbotan-3-bin \
    libbotan-3-dbg \
    libbotan-3-dev \
    libck-doc \
    libdbus-cxx-dev \
    libforms \
    libfsverity0 \
    libhugetlbfs-doc \
    libiio-src \
    libjcat-dbg \
    libjcat-ptest \
    librelp-dbg \
    librelp-ptest \
    libsdl2-compat \
    libsdl2-compat-dbg \
    libsource-highlight5 \
    libsource-highlight-dbg \
    libsource-highlight-dev \
    libsource-highlight-src \
    libthrift-c-glib-zlib-src \
    libvncserver-dev \
    libwebsockets-testapps \
    libwmf \
    libyui-ncurses-dbg \
    libyui-ncurses-dev \
    lmbench-staticdev \
    log4cpp \
    lprng \
    lprng-dbg \
    lshw \
    lshw-locale-fr \
    mariadb-dbg \
    mariadb-server \
    mariadb-src \
    mce-test \
    mime-support-doc \
    minifi-cpp \
    minifi-cpp-dbg \
    minifi-cpp-src \
    mpv \
    mpv-dbg \
    nana \
    nbench-byte \
    nbench-byte-dbg \
    nbench-byte-src \
    nspr-staticdev \
    obconf-locale-es \
    pcp \
    pcp-dev \
    pcp-doc \
    pcp-src \
    perfetto \
    perfetto-dbg \
    php-phar \
    pidgin \
    pidgin-dbg \
    pim435-staticdev \
    poco-ptest \
    postgresql-server-dev \
    qcbor-staticdev \
    qperf-doc \
    sharutils \
    sharutils-dbg \
    smemstat-doc \
    soci-dev \
    switchtec-user \
    switchtec-user-dbg \
    switchtec-user-staticdev \
    thin-provisioning-tools-dev \
    toybox-inittab \
    toybox-inittab-dbg \
    toybox-inittab-dev \
    transmission-dbg \
    transmission-gtk \
    transmission-src \
    vulkan-cts \
    vulkan-cts-dbg \
    waylandpp-dev \
    yasm-src \
    zlog-staticdev \
    zsh \
    zsh-dbg \
    zsh-src \
"
