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

Contents of /eclass/enlightenment.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.105 - (hide annotations) (download)
Sat Oct 12 15:30:23 2013 UTC (10 months, 2 weeks ago) by aballier
Branch: MAIN
Changes since 1.104: +3 -3 lines
add amd64-fbsd keywords

1 chithanh 1.103 # Copyright 1999-2013 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 aballier 1.105 # $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.104 2013/10/11 18:34:43 vapier Exp $
4 vapier 1.84
5     # @ECLASS: enlightenment.eclass
6     # @MAINTAINER:
7     # enlightenment@gentoo.org
8     # @BLURB: simplify enlightenment package management
9 vapier 1.1
10 vapier 1.104 if [[ ${___ECLASS_ONCE_ENLIGHTENMENT} != "recur -_+^+_- spank" ]] ; then
11     ___ECLASS_ONCE_ENLIGHTENMENT="recur -_+^+_- spank"
12    
13 flameeyes 1.63 inherit eutils libtool
14 vapier 1.39
15 vapier 1.84 # @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 vapier 1.99 # @ECLASS-VARIABLE: E_ECONF
26     # @DESCRIPTION:
27     # Array of flags to pass to econf (obsoletes MY_ECONF)
28     E_ECONF=()
29    
30 vapier 1.73 # E_STATE's:
31 vapier 1.55 # 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 vapier 1.72 # KEYWORDS ""
43 vapier 1.93 # SRC_URI svn/etc... up
44 vapier 1.73 # S $WORKDIR/$E_S_APPEND
45 vapier 1.55 #
46     # Overrides:
47     # KEYWORDS EKEY_STATE
48     # SRC_URI EURI_STATE
49     # S EURI_STATE
50    
51 vapier 1.73 E_LIVE_SERVER_DEFAULT_SVN="http://svn.enlightenment.org/svn/e/trunk"
52 tommy 1.100 E_LIVE_SERVER_DEFAULT_GIT="git://git.enlightenment.org"
53 vapier 1.62
54 vapier 1.73 E_STATE="release"
55 vapier 1.93 if [[ ${PV} == *9999* ]] ; then
56 tommy 1.101 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 tommy 1.100 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 vapier 1.73 E_STATE="live"
75     WANT_AUTOTOOLS="yes"
76    
77 vapier 1.75 elif [[ -n ${E_SNAP_DATE} ]] ; then
78 vapier 1.73 E_STATE="snap"
79 vapier 1.75 else
80     E_STATE="release"
81 vapier 1.21 fi
82 vapier 1.84
83     # Parse requested python state
84     : ${E_PYTHON:=${E_CYTHON}}
85     if [[ -n ${E_PYTHON} ]] ; then
86 floppym 1.97 PYTHON_DEPEND="2"
87 vapier 1.84
88 vapier 1.87 inherit python
89 vapier 1.84 fi
90    
91 vapier 1.68 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
92 vapier 1.73 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest}
93     WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest}
94 vapier 1.68 inherit autotools
95     fi
96 vapier 1.21
97 vapier 1.85 ENLIGHTENMENT_EXPF="src_unpack src_compile src_install"
98 tommy 1.81 case "${EAPI:-0}" in
99 vapier 1.104 2|3|4|5) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;;
100     *) ;;
101 tommy 1.81 esac
102     EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF}
103    
104 vapier 1.2 DESCRIPTION="A DR17 production"
105 vapier 1.1 HOMEPAGE="http://www.enlightenment.org/"
106 vapier 1.102 if [[ -z ${SRC_URI} ]] ; then
107     case ${EURI_STATE:-${E_STATE}} in
108 vapier 1.75 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 vapier 1.23 live) SRC_URI="";;
111 vapier 1.102 esac
112     fi
113 vapier 1.1
114 vapier 1.10 LICENSE="BSD"
115 vapier 1.2 SLOT="0"
116 vapier 1.73 case ${EKEY_STATE:-${E_STATE}} in
117 aballier 1.105 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 vapier 1.72 live) KEYWORDS="";;
120 vapier 1.28 esac
121 vapier 1.6 IUSE="nls doc"
122 vapier 1.1
123 vapier 1.88 DEPEND="doc? ( app-doc/doxygen )
124     ${E_PYTHON:+>=dev-python/setuptools-0.6_rc9}
125     ${E_CYTHON:+>=dev-python/cython-0.12.1}"
126 vapier 1.11 RDEPEND="nls? ( sys-devel/gettext )"
127 vapier 1.74
128 vapier 1.73 case ${EURI_STATE:-${E_STATE}} in
129 vapier 1.27 release) S=${WORKDIR}/${P};;
130 vapier 1.75 snap) S=${WORKDIR}/${P};;
131 vapier 1.73 live) S=${WORKDIR}/${E_S_APPEND};;
132 vapier 1.23 esac
133 vapier 1.2
134     enlightenment_src_unpack() {
135 vapier 1.73 if [[ ${E_STATE} == "live" ]] ; then
136     case ${E_LIVE_SOURCE} in
137     svn) subversion_src_unpack;;
138 tommy 1.100 git) git-2_src_unpack;;
139 vapier 1.73 *) die "eek!";;
140     esac
141 vapier 1.30 else
142     unpack ${A}
143     fi
144 vapier 1.98 if ! has src_prepare ${ENLIGHTENMENT_EXPF} ; then
145     cd "${S}" || die
146     enlightenment_src_prepare
147     fi
148 tommy 1.81 }
149    
150     enlightenment_src_prepare() {
151 vapier 1.92 epatch_user
152 vapier 1.47 [[ -s gendoc ]] && chmod a+rx gendoc
153 tommy 1.81 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 tommy 1.86 export SVN_REPO_PATH=${ESVN_WC_PATH}
159 tommy 1.81 eautoreconf
160     fi
161     epunt_cxx
162     elibtoolize
163 vapier 1.2 }
164    
165 tommy 1.81 enlightenment_src_configure() {
166 vapier 1.64 # gstreamer sucks, work around it doing stupid stuff
167     export GST_REGISTRY="${S}/registry.xml"
168 vapier 1.99 has static-libs ${IUSE} && E_ECONF+=( $(use_enable static-libs static) )
169 vapier 1.64
170 vapier 1.99 econf ${MY_ECONF} "${E_ECONF[@]}"
171 tommy 1.81 }
172    
173     enlightenment_src_compile() {
174 ssuominen 1.89 has src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure
175 vapier 1.84
176 tommy 1.95 V=1 emake || die
177 vapier 1.84
178     if use doc ; then
179     if [[ -x ./gendoc ]] ; then
180 vapier 1.85 ./gendoc || die
181 vapier 1.90 elif emake -j1 -n doc >&/dev/null ; then
182 tommy 1.95 V=1 emake doc || die
183 vapier 1.84 fi
184     fi
185 vapier 1.2 }
186    
187     enlightenment_src_install() {
188 tommy 1.95 V=1 emake install DESTDIR="${D}" || die
189 vapier 1.73 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null
190 pva 1.79 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do
191     [[ -f ${d} ]] && dodoc ${d}
192     done
193 vapier 1.38 use doc && [[ -d doc ]] && dohtml -r doc/*
194 tommy 1.86 if has static-libs ${IUSE} ; then
195     use static-libs || find "${D}" -name '*.la' -exec rm -f {} +
196     fi
197 vapier 1.3 }
198 vapier 1.104
199     fi

  ViewVC Help
Powered by ViewVC 1.1.20