/[gentoo-x86]/media-plugins/vdr-xineliboutput/vdr-xineliboutput-1.0.4_p20090810.ebuild
Gentoo

Contents of /media-plugins/vdr-xineliboutput/vdr-xineliboutput-1.0.4_p20090810.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Jan 8 19:42:13 2014 UTC (6 months ago) by hd_brummy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
cleanup; converted to vdr-plugin-2.eclass

(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.4_p20090810.ebuild,v 1.4 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 SO_VERSION="${PV%_p*}"
14 SO_VERSION="${SO_VERSION/_/}"
15
16 DESCRIPTION="Video Disk Recorder Xinelib PlugIn"
17 HOMEPAGE="http://sourceforge.net/projects/xineliboutput/"
18 SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
19
20 SLOT="0"
21 LICENSE="GPL-2"
22 KEYWORDS="~amd64 ~x86"
23 IUSE="+vdr +xine fbcon X libextractor xinerama"
24
25 # both vdr plugin or vdr-sxfe can use X11
26 # still depends need some cleanup
27 COMMON_DEPEND="
28 vdr? ( >=media-video/vdr-1.4.0 )
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}-compile-fix.diff"
89
90 if use xine; then
91 XINE_PLUGIN_DIR=$(xine-config --plugindir)
92 if [[ ${XINE_PLUGIN_DIR} = "" ]]; then
93 eerror "Could not find xine plugin dir"
94 die "Could not find xine plugin dir"
95 fi
96 fi
97
98 # stop some automagic overwriting of the stuff we set
99 sed -e '/XINELIBOUTPUT_VDRPLUGIN = 1/s/^/#/' \
100 -e '/HAVE_EXTRACTOR_H = 1/s/^/#/' \
101 -i Makefile
102
103 cat >>Make.config <<-EOF
104 XINELIBOUTPUT_XINEPLUGIN = $(use_onoff xine)
105 XINELIBOUTPUT_VDRPLUGIN = $(use_onoff vdr)
106
107 XINELIBOUTPUT_FB = $(use_onoff_xine fbcon)
108 XINELIBOUTPUT_X11 = $(use_onoff_xine X)
109
110 HAVE_XRENDER = 1
111 HAVE_XDPMS = 1
112 HAVE_EXTRACTOR_H = $(use_onoff libextractor)
113 HAVE_XINERAMA = $(use_onoff xinerama)
114 EOF
115
116 # patching makefile to work with this
117 # $ rm ${outdir}/file; cp file ${outdir}/file
118 # work in the sandbox
119 sed -i Makefile \
120 -e 's:XINEPLUGINDIR.*=.*:XINEPLUGINDIR = '"${WORKDIR}/lib:" \
121 -e 's:VDRINCDIR.*=.*:VDRINCDIR ?= /usr/include:'
122 mkdir -p "${WORKDIR}/lib"
123 }
124
125 src_install() {
126 if use vdr; then
127 # install vdr plugin
128 vdr-plugin_src_install
129
130 # There may be no sub-plugin, depending on use-flags
131 insinto ${VDR_PLUGIN_DIR}
132 local f
133 for f in libxineliboutput*.so.${SO_VERSION}; do
134 [[ -f "$f" ]] || continue
135 doins "${f}" || die "could not install sub-plugin ${f}"
136 done
137 fi
138
139 if use xine; then
140 # install xine-plugins
141 insinto "${XINE_PLUGIN_DIR}"
142 doins xineplug_inp_*.so
143
144 insinto "${XINE_PLUGIN_DIR}"/post
145 doins xineplug_post_*.so
146
147 # install xine-based frontends
148 use fbcon && dobin vdr-fbfe
149 use X && dobin vdr-sxfe
150
151 fi
152 }
153
154 pkg_config() {
155 einfo "emerge --config is not supported"
156 }

  ViewVC Help
Powered by ViewVC 1.1.20