@@ -0,0 +1,64 @@
1+{ stdenv, fetchurl, lib, vdr
2+, libav, libcap, libvdpau
3+, xineLib, libjpeg, libextractor, mesa_noglu, libGLU
4+, libX11, libXext, libXrender, libXrandr
5+, makeWrapper
6+}: let
7+ name = "vdr-xineliboutput-2.1.0";
8+
9+ makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l);
10+
11+ self = stdenv.mkDerivation {
12+ inherit name;
13+
14+ src = fetchurl {
15+ url = "mirror://sourceforge/project/xineliboutput/xineliboutput/${name}/${name}.tgz";
16+ sha256 = "1phrxpaz8li7z0qy241spawalhcmwkv5hh3gdijbv4h7mm899yba";
17+ };
18+
19+ # configure don't accept argument --prefix
20+ dontAddPrefix = true;
21+
22+ postConfigure = ''
23+ sed -i config.mak \
24+ -e 's,XINEPLUGINDIR=/[^/]*/[^/]*/[^/]*/,XINEPLUGINDIR=/,'
25+ '';
26+
27+ makeFlags = [ "DESTDIR=$(out)" ];
28+
29+ postFixup = ''
30+ for f in $out/bin/*; do
31+ wrapProgram $f \
32+ --prefix XINE_PLUGIN_PATH ":" "${makeXinePluginPath [ "$out" xineLib ]}"
33+ done
34+ '';
35+
36+ nativeBuildInputs = [ makeWrapper ];
37+
38+ buildInputs = [
39+ libav
40+ libcap
41+ libextractor
42+ libjpeg
43+ libGLU
44+ libvdpau
45+ libXext
46+ libXrandr
47+ libXrender
48+ libX11
49+ mesa_noglu
50+ vdr
51+ xineLib
52+ ];
53+
54+ passthru.requiredXinePlugins = [ xineLib self ];
55+
56+ meta = with lib;{
57+ homepage = "https://sourceforge.net/projects/xineliboutput/";
58+ description = "Xine-lib based software output device for VDR";
59+ maintainers = [ maintainers.ck3d ];
60+ license = licenses.gpl2;
61+ inherit (vdr.meta) platforms;
62+ };
63+ };
64+in self