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

Contents of /eclass/enlightenment.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.70 - (show annotations) (download)
Thu Jan 18 02:09:35 2007 UTC (7 years, 2 months ago) by vapier
Branch: MAIN
Changes since 1.69: +5 -5 lines
move EXPORT_FUNCTIONS to the end and use emake in src_install

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.69 2006/12/07 17:23:49 uberlord Exp $
4 #
5 # Author: vapier@gentoo.org
6
7 inherit eutils libtool
8
9 # ECVS_STATE's:
10 # release [default]
11 # KEYWORDS arch
12 # SRC_URI $P.tar.gz
13 # S $WORKDIR/$P
14 #
15 # snap $PV has .200##### datestamp or .### counter
16 # KEYWORDS ~arch
17 # SRC_URI $P.tar.bz2
18 # S $WORKDIR/$P
19 #
20 # live $PV has a 9999 marker
21 # KEYWORDS -*
22 # SRC_URI `cvs up`
23 # S $WORKDIR/$ECVS_MODULE
24 #
25 # Overrides:
26 # KEYWORDS EKEY_STATE
27 # SRC_URI EURI_STATE
28 # S EURI_STATE
29
30 #E17_DEFAULT_CVS="cvs.sourceforge.net:/cvsroot/enlightenment"
31 E17_DEFAULT_CVS="anoncvs.enlightenment.org:/var/cvs/e"
32
33 ECVS_STATE="release"
34 if [[ ${PV/9999} != ${PV} ]] ; then
35 if [[ -z ${ECVS_MODULE} ]] ; then
36 ECVS_MODULE=${PN}
37 if [[ ${CATEGORY/libs} != ${CATEGORY} ]] ; then
38 ECVS_MODULE="e17/libs/${PN}"
39 else
40 ECVS_MODULE="e17/apps/${PN}"
41 fi
42 fi
43 ECVS_SERVER=${E17_ECVS_SERVER:-${ECVS_SERVER:-${E17_DEFAULT_CVS}}}
44 ECVS_STATE="live"
45 WANT_AUTOTOOLS="yes"
46 inherit cvs
47 elif [[ ${PV/.200[3-9][0-1][0-9][0-3][0-9]/} != ${PV} ]] ; then
48 ECVS_STATE="snap"
49 elif [[ ${PV%%.[0-9][0-9][0-9]} != ${PV} ]] ; then
50 ECVS_STATE="snap"
51 EURI_STATE="release"
52 fi
53 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
54 WANT_AUTOCONF=${E17_WANT_AUTOCONF:-latest}
55 WANT_AUTOMAKE=${E17_WANT_AUTOMAKE:-latest}
56 inherit autotools
57 fi
58
59 DESCRIPTION="A DR17 production"
60 HOMEPAGE="http://www.enlightenment.org/"
61 case ${EURI_STATE:-${ECVS_STATE}} in
62 release) SRC_URI="http://enlightenment.freedesktop.org/files/${P}.tar.gz mirror://sourceforge/enlightenment/${P}.tar.gz";;
63 snap) SRC_URI="mirror://gentoo/${P}.tar.bz2";;
64 live) SRC_URI="";;
65 esac
66
67 LICENSE="BSD"
68 SLOT="0"
69 case ${EKEY_STATE:-${ECVS_STATE}} in
70 release) KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sh sparc x86 ~x86-fbsd";;
71 snap) KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd";;
72 live) KEYWORDS="-*";;
73 esac
74 IUSE="nls doc"
75
76 DEPEND="doc? ( app-doc/doxygen )"
77 RDEPEND="nls? ( sys-devel/gettext )"
78
79 case ${EURI_STATE:-${ECVS_STATE}} in
80 release) S=${WORKDIR}/${P};;
81 snap) S=${WORKDIR}/${PN};;
82 live) S=${WORKDIR}/${ECVS_MODULE};;
83 esac
84
85 enlightenment_warning_msg() {
86 if [[ -n ${E17_ECVS_SERVER} ]] ; then
87 einfo "Using user cvs server: ${E17_ECVS_SERVER}"
88 fi
89 if [[ ${ECVS_STATE} == "snap" ]] ; then
90 ewarn "Please do not contact the E team about bugs in Gentoo."
91 ewarn "Only contact vapier@gentoo.org via e-mail or bugzilla."
92 ewarn "Remember, this stuff is CVS only code so dont cry when"
93 ewarn "I break you :)."
94 elif [[ ${ECVS_STATE} == "live" ]] ; then
95 eerror "This is a LIVE CVS ebuild."
96 eerror "That means there are NO promises it will work."
97 eerror "If it fails to build, FIX THE CODE YOURSELF"
98 eerror "before reporting any issues."
99 fi
100 }
101
102 enlightenment_die() {
103 enlightenment_warning_msg
104 die "$@"$'\n'"!!! SEND BUG REPORTS TO vapier@gentoo.org NOT THE E TEAM"
105 }
106
107 enlightenment_pkg_setup() {
108 enlightenment_warning_msg
109 }
110
111 # the stupid gettextize script prevents non-interactive mode, so we hax it
112 gettext_modify() {
113 use nls || return 0
114 cp $(which gettextize) "${T}"/ || die "could not copy gettextize"
115 sed -i \
116 -e 's:read dummy < /dev/tty::' \
117 "${T}"/gettextize
118 }
119
120 enlightenment_src_unpack() {
121 if [[ ${ECVS_STATE} == "live" ]] ; then
122 cvs_src_unpack
123 else
124 unpack ${A}
125 fi
126 gettext_modify
127 [[ -s gendoc ]] && chmod a+rx gendoc
128 }
129
130 enlightenment_src_compile() {
131 # gstreamer sucks, work around it doing stupid stuff
132 export GST_REGISTRY="${S}/registry.xml"
133
134 if [[ ! -e configure ]] ; then
135 env \
136 PATH="${T}:${PATH}" \
137 NOCONFIGURE=yes \
138 USER=blah \
139 ./autogen.sh \
140 || enlightenment_die "autogen failed"
141 # symlinked files will cause sandbox violation
142 local x
143 for x in config.{guess,sub} ; do
144 [[ ! -L ${x} ]] && continue
145 rm -f ${x}
146 touch ${x}
147 done
148 elif [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
149 eautoreconf
150 fi
151 epunt_cxx
152 elibtoolize
153 econf ${MY_ECONF} || enlightenment_die "econf failed"
154 emake || enlightenment_die "emake failed"
155 use doc && [[ -x ./gendoc ]] && { ./gendoc || enlightenment_die "gendoc failed" ; }
156 }
157
158 enlightenment_src_install() {
159 emake install DESTDIR="${D}" || enlightenment_die
160 find "${D}" -name CVS -type d -exec rm -rf '{}' \; 2>/dev/null
161 dodoc AUTHORS ChangeLog NEWS README TODO ${EDOCS}
162 use doc && [[ -d doc ]] && dohtml -r doc/*
163 }
164
165 enlightenment_pkg_postinst() {
166 enlightenment_warning_msg
167 }
168
169 EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst

  ViewVC Help
Powered by ViewVC 1.1.20