/[gentoo-x86]/media-tv/mythtv/mythtv-0.25.1.ebuild
Gentoo

Contents of /media-tv/mythtv/mythtv-0.25.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Jun 22 19:26:41 2012 UTC (2 years, 1 month ago) by cardoe
Branch: MAIN
Changes since 1.5: +2 -2 lines
Fix issue where docs are no longer present.

(Portage version: 2.1.10.65/cvs/Linux x86_64)

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-tv/mythtv/mythtv-0.25.1.ebuild,v 1.5 2012/06/22 13:33:58 cardoe Exp $
4
5 EAPI=4
6
7 inherit flag-o-matic multilib eutils python user
8
9 PYTHON_DEPEND="python? 2"
10
11 #MYTHTV_VERSION="v${PV}-15-g${MYTHTV_SREV}"
12 #MYTHTV_BRANCH="fixes/0.25"
13 #MYTHTV_REV="c29d36f1634cd837276b4fd8cfea5d5d75304da8"
14 #MYTHTV_SREV="c29d36f"
15
16 DESCRIPTION="Homebrew PVR project"
17 HOMEPAGE="http://www.mythtv.org"
18 SRC_URI="ftp://ftp.osuosl.org/pub/mythtv/mythtv-0.25.1.tar.bz2"
19 SLOT="0"
20 LICENSE="GPL-2"
21 KEYWORDS="~amd64 ~x86"
22
23 IUSE_INPUT_DEVICES="input_devices_joystick"
24 IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \
25 ieee1394 jack lcd lirc perl pulseaudio python xvmc vaapi vdpau \
26 ${IUSE_INPUT_DEVICES}"
27
28 SDEPEND="
29 >=media-sound/lame-3.93.1
30 x11-libs/libX11
31 x11-libs/libXext
32 x11-libs/libXinerama
33 x11-libs/libXv
34 x11-libs/libXrandr
35 x11-libs/libXxf86vm
36 x11-libs/qt-core:4
37 x11-libs/qt-gui:4[dbus]
38 x11-libs/qt-sql:4[mysql]
39 x11-libs/qt-opengl:4
40 x11-libs/qt-webkit:4
41 virtual/mysql
42 virtual/opengl
43 virtual/glu
44 alsa? ( >=media-libs/alsa-lib-1.0.24 )
45 cec? ( dev-libs/libcec )
46 dvb? ( media-libs/libdvb virtual/linuxtv-dvb-headers )
47 ieee1394? ( >=sys-libs/libraw1394-1.2.0
48 >=sys-libs/libavc1394-0.5.3
49 >=media-libs/libiec61883-1.0.0 )
50 jack? ( media-sound/jack-audio-connection-kit )
51 lcd? ( app-misc/lcdproc )
52 libass? ( >=media-libs/libass-0.9.11 )
53 lirc? ( app-misc/lirc )
54 perl? ( dev-perl/DBD-mysql
55 dev-perl/Net-UPnP
56 dev-perl/LWP-Protocol-https
57 dev-perl/HTTP-Message
58 dev-perl/IO-Socket-INET6
59 >=dev-perl/libwww-perl-5 )
60 pulseaudio? ( media-sound/pulseaudio )
61 python? ( dev-python/mysql-python
62 dev-python/lxml
63 dev-python/urlgrabber )
64 vaapi? ( x11-libs/libva )
65 vdpau? ( x11-libs/libvdpau )
66 xvmc? ( x11-libs/libXvMC )
67 !media-tv/mythtv-bindings
68 !x11-themes/mythtv-themes
69 "
70
71 RDEPEND="${SDEPEND}
72 media-fonts/corefonts
73 media-fonts/dejavu
74 >=media-libs/freetype-2.0
75 x11-apps/xinit
76 || ( >=net-misc/wget-1.12-r3 >=media-tv/xmltv-0.5.43 )
77 autostart? ( net-dialup/mingetty
78 x11-wm/evilwm
79 x11-apps/xset )
80 bluray? ( media-libs/libbluray )
81 dvd? ( media-libs/libdvdcss )
82 "
83
84 DEPEND="${SDEPEND}
85 dev-lang/yasm
86 x11-proto/xineramaproto
87 x11-proto/xf86vidmodeproto
88 "
89
90 MYTHTV_GROUPS="video,audio,tty,uucp"
91
92 pkg_setup() {
93 einfo "This ebuild now uses a heavily stripped down version of your CFLAGS"
94
95 use python && python_set_active_version 2
96 python_pkg_setup
97
98 enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS}
99 usermod -a -G ${MYTHTV_GROUPS} mythtv
100 }
101
102 src_prepare() {
103 # upstream wants the revision number in their version.cpp
104 # since the subversion.eclass strips out the .svn directory
105 # svnversion in MythTV's build doesn't work
106 # sed -e "s#\${SOURCE_VERSION}#${MYTHTV_VERSION}#g" \
107 # -e "s#\${BRANCH}#${MYTHTV_BRANCH}#g" \
108 # -i "${S}"/version.sh
109
110 # Perl bits need to go into vender_perl and not site_perl
111 sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \
112 -i "${S}"/bindings/perl/Makefile
113
114 epatch "${FILESDIR}/fixLdconfSandbox.${PV}.patch"
115
116 epatch_user
117 }
118
119 src_configure() {
120 local myconf="--prefix=/usr"
121 myconf="${myconf} --mandir=/usr/share/man"
122 myconf="${myconf} --libdir-name=$(get_libdir)"
123
124 myconf="${myconf} --enable-pic"
125 myconf="${myconf} --enable-symbol-visibility"
126
127 use alsa || myconf="${myconf} --disable-audio-alsa"
128 use altivec || myconf="${myconf} --disable-altivec"
129 use jack || myconf="${myconf} --disable-audio-jack"
130 use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput"
131
132 myconf="${myconf} $(use_enable dvb)"
133 myconf="${myconf} $(use_enable ieee1394 firewire)"
134 myconf="${myconf} $(use_enable lirc)"
135 myconf="${myconf} --dvb-path=/usr/include"
136 myconf="${myconf} --enable-xrandr"
137 myconf="${myconf} --enable-xv"
138 myconf="${myconf} --enable-x11"
139
140 if use perl && use python; then
141 myconf="${myconf} --with-bindings=perl,python"
142 elif use perl; then
143 myconf="${myconf} --without-bindings=python"
144 myconf="${myconf} --with-bindings=perl"
145 elif use python; then
146 myconf="${myconf} --without-bindings=perl"
147 myconf="${myconf} --with-bindings=python"
148 else
149 myconf="${myconf} --without-bindings=perl,python"
150 fi
151
152 use python && myconf="${myconf} --python=$(PYTHON)"
153
154 if use debug; then
155 myconf="${myconf} --compile-type=debug"
156 else
157 myconf="${myconf} --compile-type=profile"
158 myconf="${myconf} --enable-proc-opt"
159 fi
160
161 use vdpau && myconf="${myconf} --enable-vdpau"
162 use vaapi && myconf="${myconf} --enable-vaapi"
163 use crystalhd && myconf="${myconf} --enable-crystalhd"
164
165 use input_devices_joystick || myconf="${myconf} --disable-joystick-menu"
166
167 # Clean up DSO load times
168 myconf="${myconf} --enable-symbol-visibility"
169
170 ## CFLAG cleaning so it compiles
171 strip-flags
172
173 has distcc ${FEATURES} || myconf="${myconf} --disable-distcc"
174 has ccache ${FEATURES} || myconf="${myconf} --disable-ccache"
175
176 # let MythTV come up with our CFLAGS. Upstream will support this
177 CFLAGS=""
178 CXXFLAGS=""
179
180 chmod +x ./external/FFmpeg/version.sh
181
182 einfo "Running ./configure ${myconf}"
183 ./configure ${myconf} || die "configure died"
184 }
185
186 src_compile() {
187 emake || die "emake failed"
188 }
189
190 src_install() {
191 einstall INSTALL_ROOT="${ED}" || die "install failed"
192 dodoc AUTHORS FAQ UPGRADING README
193
194 insinto /usr/share/mythtv/database
195 doins database/*
196
197 exeinto /usr/share/mythtv
198
199 newinitd "${FILESDIR}"/mythbackend.init mythbackend
200 newconfd "${FILESDIR}"/mythbackend.conf mythbackend
201
202 dodoc keys.txt
203 dohtml docs/*.html
204
205 keepdir /etc/mythtv
206 chown -R mythtv "${ED}"/etc/mythtv
207 keepdir /var/log/mythtv
208 chown -R mythtv "${ED}"/var/log/mythtv
209
210 insinto /etc/logrotate.d
211 newins "${FILESDIR}"/mythtv.logrotate.d-r1 mythtv
212
213 insinto /usr/share/mythtv/contrib
214 doins -r contrib/*
215
216 dobin "${FILESDIR}"/runmythfe
217
218 if use autostart; then
219 dodir /etc/env.d/
220 echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv
221
222 insinto /home/mythtv
223 newins "${FILESDIR}"/bash_profile .bash_profile
224 newins "${FILESDIR}"/xinitrc .xinitrc
225 fi
226
227 for file in `find "${ED}" -type f -name \*.py`; do chmod a+x "${file}"; done
228 for file in `find "${ED}" -type f -name \*.sh`; do chmod a+x "${file}"; done
229 for file in `find "${ED}" -type f -name \*.pl`; do chmod a+x "${file}"; done
230 }
231
232 pkg_preinst() {
233 export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/"
234 }
235
236 pkg_postinst() {
237 use python && python_mod_optimize MythTV
238
239 elog "To have this machine operate as recording host for MythTV, "
240 elog "mythbackend must be running. Run the following:"
241 elog "rc-update add mythbackend default"
242 elog
243 elog "Your recordings folder must be owned 'mythtv'. e.g."
244 elog "chown -R mythtv /var/lib/mythtv"
245
246 elog "Want mythfrontend to start automatically?"
247 elog "Set USE=autostart. Details can be found at:"
248 elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html"
249 }
250
251 pkg_postrm() {
252 use python && python_mod_cleanup MythTV
253 }
254
255 pkg_info() {
256 if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then
257 "${EROOT}"/usr/bin/mythfrontend --version
258 fi
259 }
260
261 pkg_config() {
262 echo "Creating mythtv MySQL user and mythconverg database if it does not"
263 echo "already exist. You will be prompted for your MySQL root password."
264 "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
265 }

  ViewVC Help
Powered by ViewVC 1.1.20