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

Contents of /eclass/mythtv-plugins.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Wed Jul 6 20:20:04 2005 UTC (8 years, 9 months ago) by agriffis
Branch: MAIN
Changes since 1.4: +1 -2 lines
Remove ECLASS= and INHERITED= which haven't been necessary for a long time now

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

  ViewVC Help
Powered by ViewVC 1.1.20