/[gentoo-x86]/eclass/mythtv-plugins.eclass
Gentoo

Contents of /eclass/mythtv-plugins.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Mon Feb 27 07:59:57 2006 UTC (8 years, 5 months ago) by cardoe
Branch: MAIN
Changes since 1.11: +2 -2 lines
Fix to make it work with new mythtv-0.19_pREV versions

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/mythtv-plugins.eclass,v 1.11 2006/02/12 10:16:41 cardoe Exp $
4 #
5 # Author: Doug Goldstein <cardoe@gentoo.org>
6 #
7
8 inherit multilib
9
10 IUSE="debug mmx"
11
12 EXPORT_FUNCTIONS src_unpack src_compile src_install
13 MYTHPLUGINS="mythbrowser mythcontrols mythdvd mythflix mythgallery mythgame mythmusic mythnews mythphone mythvideo mythweather mythweb"
14 MTVCONF=""
15 S="${WORKDIR}/mythplugins-${PV}"
16
17 RDEPEND="=media-tv/mythtv-${PV}*"
18 DEPEND="${RDEPEND}
19 >=sys-apps/sed-4"
20
21 mythtv-plugins_src_unpack() {
22 unpack ${A}
23 cd ${S}
24
25 sed -e 's!PREFIX = /usr/local!PREFIX = /usr!' \
26 -i 'settings.pro' || die "fixing PREFIX to /usr failed"
27
28 sed -e "s!QMAKE_CXXFLAGS_RELEASE = -O3 -march=pentiumpro -fomit-frame-pointer!QMAKE_CXXFLAGS_RELEASE = ${CXXFLAGS}!" \
29 -i 'settings.pro' || die "Fixing QMake's CXXFLAGS failed"
30
31 sed -e "s!QMAKE_CFLAGS_RELEASE = \$\${QMAKE_CXXFLAGS_RELEASE}!QMAKE_CFLAGS_RELEASE = ${CFLAGS}!" \
32 -i 'settings.pro' || die "Fixing Qmake's CFLAGS failed"
33
34 find ${S} -name '*.pro' -exec sed -i \
35 -e "s:\$\${PREFIX}/lib/:\$\${PREFIX}/$(get_libdir)/:g" \
36 -e "s:\$\${PREFIX}/lib$:\$\${PREFIX}/$(get_libdir):g" \
37 {} \;
38 }
39
40 mythtv-plugins_src_compile() {
41 cd ${S}
42
43 if use debug; then
44 sed -e 's!CONFIG += release!CONFIG += debug!' \
45 -i 'settings.pro' || die "switching to debug build failed"
46 fi
47
48 # if ( use x86 && ! use mmx ) || ! use amd64 ; then
49 if ( ! use mmx ); then
50 sed -e 's!DEFINES += HAVE_MMX!DEFINES -= HAVE_MMX!' \
51 -i 'settings.pro' || die "disabling MMX failed"
52 fi
53
54 local myconf=""
55
56 if hasq ${PN} ${MYTHPLUGINS} ; then
57 for x in ${MYTHPLUGINS} ; do
58 if [[ ${PN} == ${x} ]] ; then
59 myconf="${myconf} --enable-${x}"
60 else
61 myconf="${myconf} --disable-${x}"
62 fi
63 done
64 else
65 die "Package ${PN} is unsupported"
66 fi
67
68 econf ${myconf} ${MTVCONF}
69
70 ${QTDIR}/bin/qmake QMAKE="${QTDIR}/bin/qmake" -o "Makefile" mythplugins.pro || die "qmake failed to run"
71 emake || die "make failed to compile"
72 }
73
74 mythtv-plugins_src_install() {
75 if hasq ${PN} ${MYTHPLUGINS} ; then
76 cd ${S}/${PN}
77 else
78 die "Package ${PN} is unsupported"
79 fi
80
81 einstall INSTALL_ROOT="${D}"
82 for doc in AUTHORS COPYING FAQ UPGRADING ChangeLog README; do
83 test -e "${doc}" && dodoc ${doc}
84 done
85 }

  ViewVC Help
Powered by ViewVC 1.1.20