PKGNAME=libnvme
PKGDES="Library for NVMe protocol definition"
PKGSEC=libs
PKGDEP="dbus json-c keyutils liburing openssl python-3"
PKGDEP__RETRO="gcc-runtime"
BUILDDEP="swig"
BUILDDEP__RETRO=""

ABTYPE=meson
MESON_AFTER=(
    '-Ddocs=false'
    '-Ddocs-build=false'
    '-Dexamples=false'
    '-Dtests=false'
    '-Dpython=enabled'
    '-Dopenssl=enabled'
    '-Dlibdbus=enabled'
    '-Djson-c=enabled'
    '-Dkeyutils=enabled'
    '-Dliburing=enabled'
)
# Note: This package shouldn't have even existed but is now needed to
# build UDisks. Use minimal feature set with no regards for usability.
MESON_AFTER__RETRO=(
    "${MESON_AFTER[@]}"
    '-Dpython=disabled'
    '-Dopenssl=disabled'
    '-Dlibdbus=disabled'
    '-Djson-c=disabled'
    '-Dkeyutils=disabled'
    '-Dliburing=disabled'
)

# FIXME: PKGBREAK can not coexist with PKGREP in such conditiion that a
# needs to de-bundle a dependency, which will result in a file overwriting
# error. Remove PKGBREAK to allow the affected package(s) to be replaced
# without removing them beforehand.
PKGREP="nvme-cli<=2.2.1-1"

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
