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

Contents of /eclass/mythtv-plugins.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download)
Sun Feb 12 10:16:41 2006 UTC (8 years, 8 months ago) by cardoe
Branch: MAIN
Changes since 1.10: +7 -5 lines
Added {R}DEPEND to eclass rather then ebuild

1 cardoe 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 cardoe 1.11 # $Header: /var/cvsroot/gentoo-x86/eclass/mythtv-plugins.eclass,v 1.10 2006/02/11 16:31:53 caleb Exp $
4 cardoe 1.1 #
5 cardoe 1.11 # Author: Doug Goldstein <cardoe@gentoo.org>
6 cardoe 1.1 #
7    
8 eradicator 1.2 inherit multilib
9    
10 swegener 1.9 IUSE="debug mmx"
11 cardoe 1.1
12     EXPORT_FUNCTIONS src_unpack src_compile src_install
13 cardoe 1.11 MYTHPLUGINS="mythbrowser mythcontrols mythdvd mythflix mythgallery mythgame mythmusic mythnews mythphone mythvideo mythweather mythweb"
14 cardoe 1.1 MTVCONF=""
15     S="${WORKDIR}/mythplugins-${PV}"
16    
17 cardoe 1.11 RDEPEND="~media-tv/mythtv-${PV}"
18     DEPEND="${RDEPEND}
19     >=sys-apps/sed-4"
20 cardoe 1.1
21     mythtv-plugins_src_unpack() {
22     unpack ${A}
23     cd ${S}
24 swegener 1.8
25 cardoe 1.1 sed -e 's!PREFIX = /usr/local!PREFIX = /usr!' \
26     -i 'settings.pro' || die "fixing PREFIX to /usr failed"
27 swegener 1.8
28 cardoe 1.1 sed -e "s!QMAKE_CXXFLAGS_RELEASE = -O3 -march=pentiumpro -fomit-frame-pointer!QMAKE_CXXFLAGS_RELEASE = ${CXXFLAGS}!" \
29 cardoe 1.3 -i 'settings.pro' || die "Fixing QMake's CXXFLAGS failed"
30 swegener 1.8
31 cardoe 1.1 sed -e "s!QMAKE_CFLAGS_RELEASE = \$\${QMAKE_CXXFLAGS_RELEASE}!QMAKE_CFLAGS_RELEASE = ${CFLAGS}!" \
32 cardoe 1.3 -i 'settings.pro' || die "Fixing Qmake's CFLAGS failed"
33 eradicator 1.2
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 cardoe 1.1 }
39    
40     mythtv-plugins_src_compile() {
41     cd ${S}
42 swegener 1.8
43 cardoe 1.1 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 swegener 1.8
48 cardoe 1.3 # if ( use x86 && ! use mmx ) || ! use amd64 ; then
49     if ( ! use mmx ); then
50 cardoe 1.1 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 cardoe 1.11 ${QTDIR}/bin/qmake QMAKE="${QTDIR}/bin/qmake" -o "Makefile" mythplugins.pro || die "qmake failed to run"
71 cardoe 1.1 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