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

Diff of /eclass/enlightenment.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.84 Revision 1.85
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.84 2010/08/22 23:31:08 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.85 2010/08/23 21:38:13 vapier Exp $
4 4
5# @ECLASS: enlightenment.eclass 5# @ECLASS: enlightenment.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# enlightenment@gentoo.org 7# enlightenment@gentoo.org
8# @BLURB: simplify enlightenment package management 8# @BLURB: simplify enlightenment package management
84 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest} 84 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest}
85 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest} 85 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest}
86 inherit autotools 86 inherit autotools
87fi 87fi
88 88
89ENLIGHTENMENT_EXPF="pkg_setup src_unpack src_compile src_install pkg_postinst" 89ENLIGHTENMENT_EXPF="src_unpack src_compile src_install"
90case "${EAPI:-0}" in 90case "${EAPI:-0}" in
91 2|3|4) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;; 91 2|3|4) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;;
92 *) ;; 92 *) ;;
93esac 93esac
94EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF} 94EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF}
118case ${EURI_STATE:-${E_STATE}} in 118case ${EURI_STATE:-${E_STATE}} in
119 release) S=${WORKDIR}/${P};; 119 release) S=${WORKDIR}/${P};;
120 snap) S=${WORKDIR}/${P};; 120 snap) S=${WORKDIR}/${P};;
121 live) S=${WORKDIR}/${E_S_APPEND};; 121 live) S=${WORKDIR}/${E_S_APPEND};;
122esac 122esac
123
124enlightenment_warning_msg() {
125 if [[ -n ${E_LIVE_SERVER} ]] ; then
126 einfo "Using user server for live sources: ${E_LIVE_SERVER}"
127 fi
128 if [[ ${E_STATE} == "snap" ]] ; then
129 ewarn "Please do not contact the E team about bugs in Gentoo."
130 ewarn "Only contact enlightenment@gentoo.org via e-mail or bugzilla."
131 ewarn "Remember, this stuff is DEV only code so dont cry when"
132 ewarn "I break you :)."
133 elif [[ ${E_STATE} == "live" ]] ; then
134 eerror "This is a LIVE SOURCES ebuild."
135 eerror "That means there are NO promises it will work."
136 eerror "If it fails to build, FIX THE CODE YOURSELF"
137 eerror "before reporting any issues."
138 fi
139}
140
141enlightenment_die() {
142 enlightenment_warning_msg
143 die "$@"$'\n'"!!! SEND BUG REPORTS TO enlightenment@gentoo.org NOT THE E TEAM"
144}
145
146enlightenment_pkg_setup() {
147 : enlightenment_warning_msg
148}
149 123
150enlightenment_src_unpack() { 124enlightenment_src_unpack() {
151 if [[ ${E_STATE} == "live" ]] ; then 125 if [[ ${E_STATE} == "live" ]] ; then
152 case ${E_LIVE_SOURCE} in 126 case ${E_LIVE_SOURCE} in
153 cvs) cvs_src_unpack;; 127 cvs) cvs_src_unpack;;
182 156
183enlightenment_src_compile() { 157enlightenment_src_compile() {
184 hasq src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure 158 hasq src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure
185 159
186 if [[ -z ${E_PYTHON} ]] ; then 160 if [[ -z ${E_PYTHON} ]] ; then
187 emake || enlightenment_die "emake failed" 161 emake || die "emake failed"
188 else 162 else
189 distutils_src_compile 163 distutils_src_compile
190 fi 164 fi
191 165
192 if use doc ; then 166 if use doc ; then
193 if [[ -x ./gendoc ]] ; then 167 if [[ -x ./gendoc ]] ; then
194 ./gendoc || enlightenment_die "gendoc failed" 168 ./gendoc || die
195 else 169 else
196 emake doc || enlightenment_die "emake doc failed" 170 emake doc || die
197 fi 171 fi
198 fi 172 fi
199} 173}
200 174
201enlightenment_src_install() { 175enlightenment_src_install() {
202 emake install DESTDIR="${D}" || enlightenment_die 176 emake install DESTDIR="${D}" || die
203 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null 177 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null
204 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do 178 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do
205 [[ -f ${d} ]] && dodoc ${d} 179 [[ -f ${d} ]] && dodoc ${d}
206 done 180 done
207 use doc && [[ -d doc ]] && dohtml -r doc/* 181 use doc && [[ -d doc ]] && dohtml -r doc/*
208} 182}
209
210enlightenment_pkg_postinst() {
211 : enlightenment_warning_msg
212}

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85

  ViewVC Help
Powered by ViewVC 1.1.20