/[gentoo-x86]/eclass/myth.eclass
Gentoo

Contents of /eclass/myth.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.21 - (show annotations) (download)
Mon Nov 30 04:19:36 2009 UTC (4 years, 9 months ago) by abcd
Branch: MAIN
CVS Tags: HEAD
Changes since 1.20: +1 -1 lines
FILE REMOVED
Remove eclasses that have been marked as deprecated for >=2 years; schedule other deprecated eclasses for removal

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/myth.eclass,v 1.20 2006/10/14 20:27:21 swegener Exp $
4 #
5 # Author: Daniel Ahlberg <aliz@gentoo.org>
6 #
7
8 #########################
9 ########################
10 # DO NOT USE THIS FOR MYTHTV STUFF. Use mythtv-plugins.eclass
11 #####################
12 #####################
13
14 inherit multilib versionator toolchain-funcs
15
16 IUSE="nls debug"
17
18 EXPORT_FUNCTIONS src_unpack src_compile src_install
19
20 MYTHPLUGINS="mythbrowser mythdvd mythgallery mythgame mythmusic mythnews mythphone mythvideo mythweather mythweb"
21
22 atleast_0.18() {
23 [[ $(get_version_component_range 1) > 0 || $(get_version_component_range 2) > 17 ]]
24 }
25
26 if atleast_0.18 && hasq ${PN} ${MYTHPLUGINS} ; then
27 S="${WORKDIR}/mythplugins-${PV}"
28 fi
29
30 myth_src_unpack() {
31 if atleast_0.18 && hasq ${PN} ${MYTHPLUGINS} ; then
32 pkg_pro="mythplugins.pro"
33 elif [ "${PN}" == "mythfrontend" ]; then
34 pkg_pro="mythtv.pro"
35 else
36 pkg_pro="${PN}.pro"
37 fi
38
39 unpack ${A} ; cd ${S}
40
41 sed -e "s:PREFIX = .*:PREFIX = /usr:" \
42 -e "s:QMAKE_CXXFLAGS_RELEASE = .*:QMAKE_CXXFLAGS_RELEASE = ${CXXFLAGS}:" \
43 -e "s:QMAKE_CFLAGS_RELEASE = .*:QMAKE_CFLAGS_RELEASE = ${CFLAGS}:" \
44 -i 'settings.pro' || die "Initial setup failed"
45
46 if ! use nls ; then
47 sed -e "s:i18n::" \
48 -i ${pkg_pro} || die "Disable i18n failed"
49 fi
50
51 if use debug ; then
52 FEATURES="${FEATURES} nostrip"
53 sed -e 's:#CONFIG += debug:CONFIG += debug:' \
54 -e 's:CONFIG += release:#CONFIG += release:' \
55 -i 'settings.pro' || die "enable debug failed"
56 fi
57
58 setup_pro
59
60 find ${S} -name '*.pro' -exec sed -i \
61 -e "s:\$\${PREFIX}/lib/:\$\${PREFIX}/$(get_libdir)/:g" \
62 -e "s:\$\${PREFIX}/lib$:\$\${PREFIX}/$(get_libdir):g" \
63 {} \;
64 }
65
66 myth_src_compile() {
67 export QMAKESPEC="linux-g++"
68
69 if atleast_0.18 ; then
70 if hasq ${PN} ${MYTHPLUGINS} ; then
71 for x in ${MYTHPLUGINS} ; do
72 if [[ ${PN} == ${x} ]] ; then
73 myconf="${myconf} --enable-${x}"
74 else
75 myconf="${myconf} --disable-${x}"
76 fi
77 done
78 fi
79
80 econf ${myconf}
81 fi
82
83 ${QTDIR}/bin/qmake -o "Makefile" "${S}/${pkg_pro}"
84 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" "${@}" || die
85 }
86
87 myth_src_install() {
88 if atleast_0.18 && hasq ${PN} ${MYTHPLUGINS} ; then
89 cd ${S}/${PN}
90 fi
91
92 einstall INSTALL_ROOT="${D}"
93 for doc in AUTHORS COPYING FAQ UPGRADING ChangeLog README; do
94 test -e "${doc}" && dodoc ${doc}
95 done
96 }

  ViewVC Help
Powered by ViewVC 1.1.20