guvcview: enable to build with both qt5 and gtk3
This commit is contained in:
parent
ac0f42dee8
commit
6aaab573e2
@ -3,7 +3,6 @@
|
|||||||
, fetchurl
|
, fetchurl
|
||||||
, intltool
|
, intltool
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, gtk3
|
|
||||||
, portaudio
|
, portaudio
|
||||||
, SDL2
|
, SDL2
|
||||||
, ffmpeg
|
, ffmpeg
|
||||||
@ -12,9 +11,17 @@
|
|||||||
, libv4l
|
, libv4l
|
||||||
, alsaLib
|
, alsaLib
|
||||||
, gsl
|
, gsl
|
||||||
, wrapGAppsHook
|
, libpng
|
||||||
|
, sfml
|
||||||
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
||||||
, libpulseaudio ? null
|
, libpulseaudio ? null
|
||||||
|
, useQt ? false
|
||||||
|
, qt5 ? null
|
||||||
|
, wrapQtAppsHook ? null
|
||||||
|
# can be turned off if used as a library
|
||||||
|
, useGtk ? true
|
||||||
|
, gtk3 ? null
|
||||||
|
, wrapGAppsHook ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert pulseaudioSupport -> libpulseaudio != null;
|
assert pulseaudioSupport -> libpulseaudio != null;
|
||||||
@ -31,20 +38,35 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
intltool
|
intltool
|
||||||
pkgconfig
|
pkgconfig
|
||||||
wrapGAppsHook
|
]
|
||||||
];
|
++ stdenv.lib.optionals (useGtk) [ wrapGAppsHook ]
|
||||||
|
++ stdenv.lib.optionals (useQt) [ wrapQtAppsHook ]
|
||||||
|
;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
SDL2
|
SDL2
|
||||||
alsaLib
|
alsaLib
|
||||||
ffmpeg
|
ffmpeg
|
||||||
gtk3
|
|
||||||
libusb1
|
libusb1
|
||||||
libv4l
|
libv4l
|
||||||
portaudio
|
portaudio
|
||||||
udev
|
udev
|
||||||
gsl
|
gsl
|
||||||
] ++ stdenv.lib.optional pulseaudioSupport libpulseaudio;
|
libpng
|
||||||
|
sfml
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optionals (pulseaudioSupport) [ libpulseaudio ]
|
||||||
|
++ stdenv.lib.optionals (useGtk) [ gtk3 ]
|
||||||
|
++ stdenv.lib.optionals (useQt) [
|
||||||
|
qt5.qtbase
|
||||||
|
]
|
||||||
|
;
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-sfml"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optionals (useGtk) [ "--enable-gtk3" ]
|
||||||
|
++ stdenv.lib.optionals (useQt) [ "--enable-qt5" ]
|
||||||
|
;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A simple interface for devices supported by the linux UVC driver";
|
description = "A simple interface for devices supported by the linux UVC driver";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user