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

Diff of /eclass/enlightenment.eclass

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

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

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

  ViewVC Help
Powered by ViewVC 1.1.20