v4l-utils: make BPF support optional (#467296)
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
udevCheckHook,
|
||||
withUtils ? true,
|
||||
withGUI ? true,
|
||||
# BPF support fail to cross compile, unable to find `linux/lirc.h`
|
||||
withBPF ? stdenv.hostPlatform == stdenv.buildPlatform,
|
||||
alsa-lib,
|
||||
libGLU,
|
||||
qt6Packages,
|
||||
@@ -62,14 +64,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.mesonEnable "gconv" stdenv.hostPlatform.isGnu)
|
||||
(lib.mesonEnable "qv4l2" withQt)
|
||||
(lib.mesonEnable "qvidcap" withQt)
|
||||
(lib.mesonEnable "bpf" withBPF)
|
||||
(lib.mesonOption "udevdir" "${placeholder "out"}/lib/udev")
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isGnu [
|
||||
(lib.mesonOption "gconvsysdir" "${glibc.out}/lib/gconv")
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
# BPF support fail to cross compile, unable to find `linux/lirc.h`
|
||||
(lib.mesonOption "bpf" "disabled")
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
@@ -78,7 +77,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
clang
|
||||
doxygen
|
||||
meson
|
||||
ninja
|
||||
@@ -86,15 +84,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
perl
|
||||
udevCheckHook
|
||||
]
|
||||
++ lib.optional withBPF clang
|
||||
++ lib.optional withQt qt6Packages.wrapQtAppsHook;
|
||||
|
||||
buildInputs = [
|
||||
json_c
|
||||
libbpf
|
||||
libelf
|
||||
udev
|
||||
]
|
||||
++ lib.optional (!stdenv.hostPlatform.isGnu) argp-standalone
|
||||
++ lib.optionals withBPF [
|
||||
libbpf
|
||||
libelf
|
||||
]
|
||||
++ lib.optionals withQt [
|
||||
alsa-lib
|
||||
qt6Packages.qt5compat
|
||||
|
||||
Reference in New Issue
Block a user