/[gentoo-x86]/media-plugins/vdr-xineliboutput/vdr-xineliboutput-1.0.5-r1.ebuild
Gentoo

Contents of /media-plugins/vdr-xineliboutput/vdr-xineliboutput-1.0.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Feb 23 14:09:56 2014 UTC (18 months, 1 week ago) by hd_brummy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
removed vdr-plugin.eclass depended ebuild

(Portage version: 2.2.1/cvs/Linux i686, signed Manifest commit with key 34C2808A)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-xineliboutput/vdr-xineliboutput-1.0.5-r1.ebuild,v 1.3 2012/04/13 19:31:39 ulm Exp $
4
5 EAPI=2
6 GENTOO_VDR_CONDITIONAL=yes
7
8 inherit vdr-plugin eutils multilib versionator
9
10 MY_PV=${PV#*_p}
11 MY_P=${PN}-cvs-${MY_PV}
12
13 DESCRIPTION="Video Disk Recorder Xinelib PlugIn"
14 HOMEPAGE="http://sourceforge.net/projects/xineliboutput/"
15 SRC_URI="mirror://sourceforge/${PN#vdr-}/${P}.tgz"
16
17 SLOT="0"
18 LICENSE="GPL-2"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="+vdr +xine fbcon X libextractor xinerama"
21
22 # both vdr plugin or vdr-sxfe can use X11
23 # still depends need some cleanup
24 COMMON_DEPEND="
25 vdr? (
26 >=media-video/vdr-1.4.0
27 !>=media-video/vdr-1.7
28 )
29
30 xine? ( >=media-libs/xine-lib-1.1.1 )
31
32 virtual/jpeg
33 libextractor? ( >=media-libs/libextractor-0.5.20 )
34
35 X? (
36 x11-libs/libX11
37 x11-libs/libXv
38 x11-libs/libXext
39 x11-libs/libXrender
40 xinerama? ( x11-libs/libXinerama )
41 )"
42
43 DEPEND="${COMMON_DEPEND}
44 sys-kernel/linux-headers
45 X? (
46 x11-proto/xextproto
47 x11-proto/xf86vidmodeproto
48 x11-proto/xproto
49 x11-proto/renderproto
50 xinerama? ( x11-proto/xineramaproto )
51 )"
52
53 RDEPEND="${COMMON_DEPEND}"
54
55 #S=${WORKDIR}/${MY_P#vdr-}
56
57 VDR_CONFD_FILE=${FILESDIR}/confd-1.0.0_pre6
58
59 pkg_setup() {
60 vdr-plugin_pkg_setup
61
62 if ! use vdr && ! use xine; then
63 eerror "Compiling ${PN} with USE='-vdr -xine' is not possible."
64 eerror "You either need at least one of these flags."
65 #die "${PN} cannot be used with vdr support and xine support disabled!"
66 fi
67 }
68
69 use_onoff() {
70 if use "$1"; then
71 echo 1
72 else
73 echo 0
74 fi
75 }
76
77 use_onoff_xine() {
78 if use xine && use "$1"; then
79 echo 1
80 else
81 echo 0
82 fi
83 }
84
85 src_prepare() {
86 vdr-plugin_src_prepare
87
88 epatch "${FILESDIR}/${P}-ldflags.patch"
89 if use xine; then
90 XINE_PLUGIN_DIR=$(xine-config --plugindir)
91 if [[ ${XINE_PLUGIN_DIR} = "" ]]; then
92 eerror "Could not find xine plugin dir"
93 die "Could not find xine plugin dir"
94 fi
95 fi
96
97 # stop some automagic overwriting of the stuff we set
98 sed -e '/XINELIBOUTPUT_VDRPLUGIN = 1/s/^/#/' \
99 -e '/HAVE_EXTRACTOR_H = 1/s/^/#/' \
100 -i Makefile
101
102 cat >>Make.config <<-EOF
103 XINELIBOUTPUT_XINEPLUGIN = $(use_onoff xine)
104 XINELIBOUTPUT_VDRPLUGIN = $(use_onoff vdr)
105
106 XINELIBOUTPUT_FB = $(use_onoff_xine fbcon)
107 XINELIBOUTPUT_X11 = $(use_onoff_xine X)
108
109 HAVE_XRENDER = 1
110 HAVE_XDPMS = 1
111 HAVE_EXTRACTOR_H = $(use_onoff libextractor)
112 HAVE_XINERAMA = $(use_onoff xinerama)
113 EOF
114
115 # patching makefile to work with this
116 # $ rm ${outdir}/file; cp file ${outdir}/file
117 # work in the sandbox
118 sed -i Makefile \
119 -e 's:XINEPLUGINDIR.*=.*:XINEPLUGINDIR = '"${WORKDIR}/lib:" \
120 -e 's:VDRINCDIR.*=.*:VDRINCDIR ?= /usr/include:'
121 mkdir -p "${WORKDIR}/lib"
122 }
123
124 src_configure() { :; }
125
126 src_install() {
127 if use vdr; then
128 # install vdr plugin
129 vdr-plugin_src_install
130
131 # version number that the sources contain
132 local SO_VERSION="$(grep 'static const char \*VERSION *=' xineliboutput.c |\
133 cut -d'"' -f2)"
134 echo SO_VERSION=$SO_VERSION
135 insinto ${VDR_PLUGIN_DIR}
136 if use fbcon; then
137 doins libxineliboutput-fbfe.so.${SO_VERSION} || die "doins failed"
138 fi
139 if use X; then
140 doins libxineliboutput-sxfe.so.${SO_VERSION} || die "doins failed"
141 fi
142 fi
143
144 if use xine; then
145 # install xine-plugins
146 insinto "${XINE_PLUGIN_DIR}"
147 doins xineplug_inp_*.so
148
149 insinto "${XINE_PLUGIN_DIR}"/post
150 doins xineplug_post_*.so
151
152 # install xine-based frontends
153 use fbcon && dobin vdr-fbfe
154 use X && dobin vdr-sxfe
155
156 fi
157 }
158
159 pkg_config() {
160 einfo "emerge --config is not supported"
161 }

  ViewVC Help
Powered by ViewVC 1.1.20