1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 GENTOO_VDR_CONDITIONAL=yes
11 DESCRIPTION="VDR Plugin: Xinelib PlugIn"
12 HOMEPAGE="http://sourceforge.net/projects/xineliboutput/"
13 SRC_URI="http://vdr.websitec.de/download/${PN}/xineliboutput-2.0.0_p20130821.tar.bz2"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="bluray caps dbus fbcon jpeg libextractor nls opengl +vdr vdpau +X +xine xinerama"
22 >=media-video/vdr-1.6.0
23 libextractor? ( >=media-libs/libextractor-0.5.20 )
24 caps? ( sys-libs/libcap )
28 ( >=media-libs/xine-lib-1.2
30 fbcon? ( jpeg? ( virtual/jpeg:* ) )
35 xinerama? ( x11-libs/libXinerama )
36 dbus? ( dev-libs/dbus-glib dev-libs/glib:2 )
37 vdpau? ( x11-libs/libvdpau >=media-libs/xine-lib-1.2 )
38 jpeg? ( virtual/jpeg:* )
39 bluray? ( media-libs/libbluray )
40 opengl? ( virtual/opengl )
44 DEPEND="${COMMON_DEPEND}
46 sys-kernel/linux-headers
47 nls? ( sys-devel/gettext )
54 RDEPEND="${COMMON_DEPEND}"
56 REQUIRED_USE=" || ( vdr xine )"
58 VDR_CONFD_FILE="${FILESDIR}/confd-2.0.0"
61 vdr-plugin-2_pkg_setup
64 XINE_PLUGIN_DIR=$(pkg-config --variable=plugindir libxine)
65 [ -z "${XINE_PLUGIN_DIR}" ] && die "Could not find xine plugin dir"
70 vdr-plugin-2_src_prepare
72 if has_version ">=media-video/vdr-2.1.10"; then
73 sed -e "s:pm = RenderPixmaps():pm = dynamic_cast<cPixmapMemory *>(RenderPixmaps()):"\
74 -e "s:delete pm;:DestroyPixmap(pm);:"\
82 if has_version ">=media-libs/xine-lib-1.2"; then
83 myconf="${myconf} --enable-libavutil"
85 myconf="${myconf} --disable-libavutil"
88 # No autotools based configure script
93 $(use_enable X xshm) \
94 $(use_enable X xdpms) \
95 $(use_enable X xshape) \
96 $(use_enable X xrender) \
97 $(use_enable fbcon fb) \
99 $(use_enable xine libxine) \
100 $(use_enable libextractor) \
101 $(use_enable caps libcap) \
102 $(use_enable jpeg libjpeg) \
103 $(use_enable xinerama) \
104 $(use_enable vdpau) \
105 $(use_enable dbus dbus-glib-1) \
106 $(use_enable nls i18n) \
107 $(use_enable bluray libbluray) \
108 $(use_enable opengl) \
112 # UINT64_C is needed by ffmpeg headers
113 append-cxxflags -D__STDC_CONSTANT_MACROS
118 vdr-plugin-2_src_install
121 insinto /etc/vdr/plugins/xineliboutput/
122 doins examples/allowed_hosts.conf
123 fowners -R vdr:vdr /etc/vdr/
126 emake DESTDIR="${D}" i18n
130 doinitd "${FILESDIR}"/vdr-frontend
132 insinto $XINE_PLUGIN_DIR
133 doins xineplug_inp_xvdr.so
135 insinto $XINE_PLUGIN_DIR/post
136 doins xineplug_post_*.so
141 insinto $VDR_PLUGIN_DIR
142 doins libxineliboutput-fbfe.so.*
148 insinto $VDR_PLUGIN_DIR
149 doins libxineliboutput-sxfe.so.*
153 emake DESTDIR="${D}" install