mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
v4l-utils: 1.24.1 -> 1.30.1
It now builds with meson, cf. https://git.linuxtv.org/v4l-utils.git/commit/?id=c252c887c4e390fd7fd8b9f059680e5de3b5f540 It also no longer creates `.la` files for libtool. We also switch to Qt6 (with `qt5compat`), cf. https://git.linuxtv.org/v4l-utils.git/commit/?id=ac99ab1b812d7a68ad078e42f49035a7671a6433 On the other hand, it implicitely adds some content to the packages that are derived from this recipe: * share/doc now contains 6 MiB of html documentation * lib/gconv apparently contains files to decode Japanese DVB tables (see `README.md` in the sources) * new program `v4l2-tracer` * new program `edid-decode`, obsoleting the `edid-decode` package, cf. https://git.linuxtv.org/v4l-utils.git/commit/?id=363495b6df0dc30a0d63d49720ebbfa33f65c91f
This commit is contained in:
@@ -2,22 +2,30 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
glibc,
|
||||
clang,
|
||||
doxygen,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
perl,
|
||||
argp-standalone,
|
||||
libjpeg,
|
||||
json_c,
|
||||
libbpf,
|
||||
libelf,
|
||||
udev,
|
||||
udevCheckHook,
|
||||
withUtils ? true,
|
||||
withGUI ? true,
|
||||
alsa-lib,
|
||||
libX11,
|
||||
qt5compat,
|
||||
qtbase,
|
||||
libGLU,
|
||||
wrapQtAppsHook,
|
||||
}:
|
||||
|
||||
# See libv4l in all-packages.nix for the libs only (overrides alsa, libX11 & QT)
|
||||
# See libv4l in all-packages.nix for the libs only (overrides alsa, QT)
|
||||
|
||||
let
|
||||
withQt = withUtils && withGUI;
|
||||
@@ -26,26 +34,22 @@ in
|
||||
# we need to use stdenv.mkDerivation in order not to pollute the libv4l’s closure with Qt
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "v4l-utils";
|
||||
version = "1.24.1";
|
||||
version = "1.30.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://linuxtv.org/downloads/v4l-utils/v4l-utils-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-y7f+imMH9c5TOgXN7XC7k8O6BjlaubbQB+tTt12AX1s=";
|
||||
url = "https://linuxtv.org/downloads/v4l-utils/v4l-utils-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-wc9UnC7DzznrXse/FXMTSeYbJqIbXpY5IttCIzO64Zc=";
|
||||
};
|
||||
|
||||
outputs = [ "out" ] ++ lib.optional withUtils "lib" ++ [ "dev" ];
|
||||
|
||||
configureFlags = (
|
||||
if withUtils then
|
||||
[
|
||||
"--with-localedir=${placeholder "lib"}/share/locale"
|
||||
"--with-udevdir=${placeholder "out"}/lib/udev"
|
||||
]
|
||||
else
|
||||
[
|
||||
"--disable-v4l-utils"
|
||||
]
|
||||
);
|
||||
mesonFlags = [
|
||||
(lib.mesonBool "v4l-utils" withUtils)
|
||||
(lib.mesonEnable "qv4l2" withQt)
|
||||
(lib.mesonEnable "qvidcap" withQt)
|
||||
(lib.mesonOption "gconvsysdir" "${glibc.out}/lib/gconv")
|
||||
(lib.mesonOption "udevdir" "${placeholder "out"}/lib/udev")
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
# Create symlink for V4l1 compatibility
|
||||
@@ -53,25 +57,45 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
clang
|
||||
doxygen
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
perl
|
||||
udevCheckHook
|
||||
] ++ lib.optional withQt wrapQtAppsHook;
|
||||
|
||||
buildInputs =
|
||||
[ udev ]
|
||||
[
|
||||
json_c
|
||||
libbpf
|
||||
libelf
|
||||
udev
|
||||
]
|
||||
++ lib.optional (!stdenv.hostPlatform.isGnu) argp-standalone
|
||||
++ lib.optionals withQt [
|
||||
alsa-lib
|
||||
libX11
|
||||
qt5compat
|
||||
qtbase
|
||||
libGLU
|
||||
];
|
||||
|
||||
hardeningDisable = [ "zerocallusedregs" ];
|
||||
|
||||
propagatedBuildInputs = [ libjpeg ];
|
||||
|
||||
# these two `substituteInPlace` have been sent upstream as patches
|
||||
# https://lore.kernel.org/linux-media/867c4d2e-7871-4280-8c89-d4b654597f32@public-files.de/T/
|
||||
# they might fail and have to be removed once the patches get accepted
|
||||
postPatch = ''
|
||||
patchShebangs utils/
|
||||
substituteInPlace \
|
||||
lib/libdvbv5/meson.build \
|
||||
--replace-fail "install_dir: 'include/libdvbv5'" "install_dir: get_option('includedir') / 'libdvbv5'"
|
||||
substituteInPlace \
|
||||
meson.build \
|
||||
--replace-fail "get_option('datadir') / 'locale'" "get_option('localedir')"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -11515,7 +11515,7 @@ with pkgs;
|
||||
translateManpages = false;
|
||||
};
|
||||
|
||||
v4l-utils = qt5.callPackage ../os-specific/linux/v4l-utils { };
|
||||
v4l-utils = qt6.callPackage ../os-specific/linux/v4l-utils { };
|
||||
|
||||
windows = callPackages ../os-specific/windows { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user