2019-06-14 10:04:27 +02:00
|
|
|
{ stdenv, fetchurl, lib, vdr
|
|
|
|
, libav, libcap, libvdpau
|
2021-04-27 16:25:03 +02:00
|
|
|
, xine-lib, libjpeg, libextractor, libglvnd, libGLU
|
2019-06-14 10:04:27 +02:00
|
|
|
, libX11, libXext, libXrender, libXrandr
|
|
|
|
, makeWrapper
|
|
|
|
}: let
|
|
|
|
makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l);
|
|
|
|
|
2020-03-22 11:42:53 +01:00
|
|
|
self = stdenv.mkDerivation rec {
|
|
|
|
pname = "vdr-xineliboutput";
|
|
|
|
version = "2.2.0";
|
2019-06-14 10:04:27 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-03-22 11:42:53 +01:00
|
|
|
url = "mirror://sourceforge/project/xineliboutput/xineliboutput/${pname}-${version}/${pname}-${version}.tgz";
|
|
|
|
sha256 = "0a24hs5nr7ncf51c5agyfn1xrvb4p70y3i0s6dlyyd9bwbfjldns";
|
2019-06-14 10:04:27 +02:00
|
|
|
};
|
|
|
|
|
2020-03-22 11:38:28 +01:00
|
|
|
postPatch = ''
|
|
|
|
# pkg-config is called with opengl, which do not contain needed glx symbols
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "X11 opengl" "X11 gl"
|
|
|
|
'';
|
|
|
|
|
2019-06-17 18:48:48 +02:00
|
|
|
# configure don't accept argument --prefix
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
postConfigure = ''
|
2019-06-14 10:04:27 +02:00
|
|
|
sed -i config.mak \
|
|
|
|
-e 's,XINEPLUGINDIR=/[^/]*/[^/]*/[^/]*/,XINEPLUGINDIR=/,'
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
for f in $out/bin/*; do
|
|
|
|
wrapProgram $f \
|
2021-04-27 16:25:03 +02:00
|
|
|
--prefix XINE_PLUGIN_PATH ":" "${makeXinePluginPath [ "$out" xine-lib ]}"
|
2019-06-14 10:04:27 +02:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libav
|
|
|
|
libcap
|
|
|
|
libextractor
|
|
|
|
libjpeg
|
2020-03-22 11:38:28 +01:00
|
|
|
libglvnd
|
2019-06-14 10:04:27 +02:00
|
|
|
libGLU
|
|
|
|
libvdpau
|
|
|
|
libXext
|
|
|
|
libXrandr
|
|
|
|
libXrender
|
|
|
|
libX11
|
|
|
|
vdr
|
2021-04-27 16:25:03 +02:00
|
|
|
xine-lib
|
2019-06-14 10:04:27 +02:00
|
|
|
];
|
|
|
|
|
2021-04-27 16:25:03 +02:00
|
|
|
passthru.requiredXinePlugins = [ xine-lib self ];
|
2019-06-14 10:04:27 +02:00
|
|
|
|
|
|
|
meta = with lib;{
|
2019-06-17 18:48:48 +02:00
|
|
|
homepage = "https://sourceforge.net/projects/xineliboutput/";
|
|
|
|
description = "Xine-lib based software output device for VDR";
|
2019-06-14 10:04:27 +02:00
|
|
|
maintainers = [ maintainers.ck3d ];
|
|
|
|
license = licenses.gpl2;
|
2019-06-17 18:48:48 +02:00
|
|
|
inherit (vdr.meta) platforms;
|
2019-06-14 10:04:27 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in self
|