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

Contents of /eclass/enlightenment.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.106 - (show annotations) (download)
Fri Jul 11 08:21:58 2014 UTC (3 days, 8 hours ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.105: +4 -4 lines
Avoid reserved names for functions and variables, bug 516092.

1 # Copyright 1999-2014 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.105 2013/10/12 15:30:23 aballier Exp $
4
5 # @ECLASS: enlightenment.eclass
6 # @MAINTAINER:
7 # enlightenment@gentoo.org
8 # @BLURB: simplify enlightenment package management
9
10 if [[ -z ${_ENLIGHTENMENT_ECLASS} ]]; then
11 _ENLIGHTENMENT_ECLASS=1
12
13 inherit eutils libtool
14
15 # @ECLASS-VARIABLE: E_PYTHON
16 # @DEFAULT_UNSET
17 # @DESCRIPTION:
18 # if defined, the package is based on Python/distutils
19
20 # @ECLASS-VARIABLE: E_CYTHON
21 # @DEFAULT_UNSET
22 # @DESCRIPTION:
23 # if defined, the package is Cython bindings (implies E_PYTHON)
24
25 # @ECLASS-VARIABLE: E_ECONF
26 # @DESCRIPTION:
27 # Array of flags to pass to econf (obsoletes MY_ECONF)
28 E_ECONF=()
29
30 # E_STATE's:
31 # release [default]
32 # KEYWORDS arch
33 # SRC_URI $P.tar.gz
34 # S $WORKDIR/$P
35 #
36 # snap $PV has .200##### datestamp or .### counter
37 # KEYWORDS ~arch
38 # SRC_URI $P.tar.bz2
39 # S $WORKDIR/$P
40 #
41 # live $PV has a 9999 marker
42 # KEYWORDS ""
43 # SRC_URI svn/etc... up
44 # S $WORKDIR/$E_S_APPEND
45 #
46 # Overrides:
47 # KEYWORDS EKEY_STATE
48 # SRC_URI EURI_STATE
49 # S EURI_STATE
50
51 E_LIVE_SERVER_DEFAULT_SVN="http://svn.enlightenment.org/svn/e/trunk"
52 E_LIVE_SERVER_DEFAULT_GIT="git://git.enlightenment.org"
53
54 E_STATE="release"
55 if [[ ${PV} == *9999* ]] ; then
56 if [[ ${EGIT_URI_APPEND} ]] ; then
57 E_LIVE_SERVER=${E_LIVE_SERVER:-${E_LIVE_SERVER_DEFAULT_GIT}}
58 EGIT_URI_APPEND=${EGIT_URI_APPEND:-${PN}}
59 EGIT_PROJECT="enlightenment/${EGIT_SUB_PROJECT}/${EGIT_URI_APPEND}"
60 EGIT_REPO_URI=${EGIT_SERVER:-${E_LIVE_SERVER_DEFAULT_GIT}}/${EGIT_SUB_PROJECT}/${EGIT_URI_APPEND}.git
61 E_S_APPEND=${EGIT_URI_APPEND}
62 E_LIVE_SOURCE="git"
63 inherit git-2
64 else
65 E_LIVE_SERVER=${E_LIVE_SERVER:-${E_LIVE_SERVER_DEFAULT_SVN}}
66
67 ESVN_URI_APPEND=${ESVN_URI_APPEND:-${PN}}
68 ESVN_PROJECT="enlightenment/${ESVN_SUB_PROJECT}"
69 ESVN_REPO_URI=${ESVN_SERVER:-${E_LIVE_SERVER_DEFAULT_SVN}}/${ESVN_SUB_PROJECT}/${ESVN_URI_APPEND}
70 E_S_APPEND=${ESVN_URI_APPEND}
71 E_LIVE_SOURCE="svn"
72 inherit subversion
73 fi
74 E_STATE="live"
75 WANT_AUTOTOOLS="yes"
76
77 elif [[ -n ${E_SNAP_DATE} ]] ; then
78 E_STATE="snap"
79 else
80 E_STATE="release"
81 fi
82
83 # Parse requested python state
84 : ${E_PYTHON:=${E_CYTHON}}
85 if [[ -n ${E_PYTHON} ]] ; then
86 PYTHON_DEPEND="2"
87
88 inherit python
89 fi
90
91 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
92 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest}
93 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest}
94 inherit autotools
95 fi
96
97 ENLIGHTENMENT_EXPF="src_unpack src_compile src_install"
98 case "${EAPI:-0}" in
99 2|3|4|5) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;;
100 *) ;;
101 esac
102 EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF}
103
104 DESCRIPTION="A DR17 production"
105 HOMEPAGE="http://www.enlightenment.org/"
106 if [[ -z ${SRC_URI} ]] ; then
107 case ${EURI_STATE:-${E_STATE}} in
108 release) SRC_URI="mirror://sourceforge/enlightenment/${P}.tar.gz";;
109 snap) SRC_URI="http://download.enlightenment.org/snapshots/${E_SNAP_DATE}/${P}.tar.bz2";;
110 live) SRC_URI="";;
111 esac
112 fi
113
114 LICENSE="BSD"
115 SLOT="0"
116 case ${EKEY_STATE:-${E_STATE}} in
117 release) KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-interix ~x86-solaris ~x64-solaris";;
118 snap) KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-interix ~x86-solaris ~x64-solaris";;
119 live) KEYWORDS="";;
120 esac
121 IUSE="nls doc"
122
123 DEPEND="doc? ( app-doc/doxygen )
124 ${E_PYTHON:+>=dev-python/setuptools-0.6_rc9}
125 ${E_CYTHON:+>=dev-python/cython-0.12.1}"
126 RDEPEND="nls? ( sys-devel/gettext )"
127
128 case ${EURI_STATE:-${E_STATE}} in
129 release) S=${WORKDIR}/${P};;
130 snap) S=${WORKDIR}/${P};;
131 live) S=${WORKDIR}/${E_S_APPEND};;
132 esac
133
134 enlightenment_src_unpack() {
135 if [[ ${E_STATE} == "live" ]] ; then
136 case ${E_LIVE_SOURCE} in
137 svn) subversion_src_unpack;;
138 git) git-2_src_unpack;;
139 *) die "eek!";;
140 esac
141 else
142 unpack ${A}
143 fi
144 if ! has src_prepare ${ENLIGHTENMENT_EXPF} ; then
145 cd "${S}" || die
146 enlightenment_src_prepare
147 fi
148 }
149
150 enlightenment_src_prepare() {
151 epatch_user
152 [[ -s gendoc ]] && chmod a+rx gendoc
153 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
154 [[ -d po ]] && eautopoint -f
155 # autotools require README, when README.in is around, but README
156 # is created later in configure step
157 [[ -f README.in ]] && touch README
158 export SVN_REPO_PATH=${ESVN_WC_PATH}
159 eautoreconf
160 fi
161 epunt_cxx
162 elibtoolize
163 }
164
165 enlightenment_src_configure() {
166 # gstreamer sucks, work around it doing stupid stuff
167 export GST_REGISTRY="${S}/registry.xml"
168 has static-libs ${IUSE} && E_ECONF+=( $(use_enable static-libs static) )
169
170 econf ${MY_ECONF} "${E_ECONF[@]}"
171 }
172
173 enlightenment_src_compile() {
174 has src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure
175
176 V=1 emake || die
177
178 if use doc ; then
179 if [[ -x ./gendoc ]] ; then
180 ./gendoc || die
181 elif emake -j1 -n doc >&/dev/null ; then
182 V=1 emake doc || die
183 fi
184 fi
185 }
186
187 enlightenment_src_install() {
188 V=1 emake install DESTDIR="${D}" || die
189 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null
190 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do
191 [[ -f ${d} ]] && dodoc ${d}
192 done
193 use doc && [[ -d doc ]] && dohtml -r doc/*
194 if has static-libs ${IUSE} ; then
195 use static-libs || find "${D}" -name '*.la' -exec rm -f {} +
196 fi
197 }
198
199 fi

  ViewVC Help
Powered by ViewVC 1.1.20