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

Contents of /eclass/mythtv-plugins.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Mon Jul 11 15:08:06 2005 UTC (9 years, 5 months ago) by swegener
Branch: MAIN
Changes since 1.7: +6 -6 lines
QA: Apply whitespace checks from repoman to eclasses.

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

  ViewVC Help
Powered by ViewVC 1.1.20