/[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.87
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.87 2010/09/18 08:38:08 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
71fi 71fi
72 72
73# Parse requested python state 73# Parse requested python state
74: ${E_PYTHON:=${E_CYTHON}} 74: ${E_PYTHON:=${E_CYTHON}}
75if [[ -n ${E_PYTHON} ]] ; then 75if [[ -n ${E_PYTHON} ]] ; then
76 WANT_AUTOTOOLS="no"
77
78 PYTHON_DEPEND="2:2.4" 76 PYTHON_DEPEND="2:2.4"
79 77
80 inherit python distutils 78 inherit python
81fi 79fi
82 80
83if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then 81if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
84 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest} 82 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest}
85 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest} 83 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest}
86 inherit autotools 84 inherit autotools
87fi 85fi
88 86
89ENLIGHTENMENT_EXPF="pkg_setup src_unpack src_compile src_install pkg_postinst" 87ENLIGHTENMENT_EXPF="src_unpack src_compile src_install"
90case "${EAPI:-0}" in 88case "${EAPI:-0}" in
91 2|3|4) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;; 89 2|3|4) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;;
92 *) ;; 90 *) ;;
93esac 91esac
94EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF} 92EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF}
119 release) S=${WORKDIR}/${P};; 117 release) S=${WORKDIR}/${P};;
120 snap) S=${WORKDIR}/${P};; 118 snap) S=${WORKDIR}/${P};;
121 live) S=${WORKDIR}/${E_S_APPEND};; 119 live) S=${WORKDIR}/${E_S_APPEND};;
122esac 120esac
123 121
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
150enlightenment_src_unpack() { 122enlightenment_src_unpack() {
151 if [[ ${E_STATE} == "live" ]] ; then 123 if [[ ${E_STATE} == "live" ]] ; then
152 case ${E_LIVE_SOURCE} in 124 case ${E_LIVE_SOURCE} in
153 cvs) cvs_src_unpack;; 125 cvs) cvs_src_unpack;;
154 svn) subversion_src_unpack;; 126 svn) subversion_src_unpack;;
165 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then 137 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
166 [[ -d po ]] && eautopoint -f 138 [[ -d po ]] && eautopoint -f
167 # autotools require README, when README.in is around, but README 139 # autotools require README, when README.in is around, but README
168 # is created later in configure step 140 # is created later in configure step
169 [[ -f README.in ]] && touch README 141 [[ -f README.in ]] && touch README
142 export SVN_REPO_PATH=${ESVN_WC_PATH}
170 eautoreconf 143 eautoreconf
171 fi 144 fi
172 epunt_cxx 145 epunt_cxx
173 elibtoolize 146 elibtoolize
174} 147}
175 148
176enlightenment_src_configure() { 149enlightenment_src_configure() {
177 # gstreamer sucks, work around it doing stupid stuff 150 # gstreamer sucks, work around it doing stupid stuff
178 export GST_REGISTRY="${S}/registry.xml" 151 export GST_REGISTRY="${S}/registry.xml"
152 has static-libs ${IUSE} && MY_ECONF+=" $(use_enable static-libs static)"
179 153
180 econf ${MY_ECONF} 154 econf ${MY_ECONF}
181} 155}
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 emake || die
187 emake || enlightenment_die "emake failed"
188 else
189 distutils_src_compile
190 fi
191 161
192 if use doc ; then 162 if use doc ; then
193 if [[ -x ./gendoc ]] ; then 163 if [[ -x ./gendoc ]] ; then
194 ./gendoc || enlightenment_die "gendoc failed" 164 ./gendoc || die
195 else 165 else
196 emake doc || enlightenment_die "emake doc failed" 166 emake doc || die
197 fi 167 fi
198 fi 168 fi
199} 169}
200 170
201enlightenment_src_install() { 171enlightenment_src_install() {
202 emake install DESTDIR="${D}" || enlightenment_die 172 emake install DESTDIR="${D}" || die
203 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null 173 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 174 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do
205 [[ -f ${d} ]] && dodoc ${d} 175 [[ -f ${d} ]] && dodoc ${d}
206 done 176 done
207 use doc && [[ -d doc ]] && dohtml -r doc/* 177 use doc && [[ -d doc ]] && dohtml -r doc/*
178 if has static-libs ${IUSE} ; then
179 use static-libs || find "${D}" -name '*.la' -exec rm -f {} +
180 fi
208} 181}
209
210enlightenment_pkg_postinst() {
211 : enlightenment_warning_msg
212}

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

  ViewVC Help
Powered by ViewVC 1.1.20