/[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.100
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2013 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.100 2013/08/31 12:29:26 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 [[ ${ESVN_URI_APPEND} ]] ; then
49 E_LIVE_SERVER=${E_LIVE_SERVER:-${E_LIVE_SERVER_DEFAULT_SVN}} 54 E_LIVE_SERVER=${E_LIVE_SERVER:-${E_LIVE_SERVER_DEFAULT_SVN}}
50 E_STATE="live"
51 WANT_AUTOTOOLS="yes"
52 55
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}} 56 ESVN_URI_APPEND=${ESVN_URI_APPEND:-${PN}}
61 ESVN_PROJECT="enlightenment/${ESVN_SUB_PROJECT}" 57 ESVN_PROJECT="enlightenment/${ESVN_SUB_PROJECT}"
62 ESVN_REPO_URI=${ESVN_SERVER:-${E_LIVE_SERVER_DEFAULT_SVN}}/${ESVN_SUB_PROJECT}/${ESVN_URI_APPEND} 58 ESVN_REPO_URI=${ESVN_SERVER:-${E_LIVE_SERVER_DEFAULT_SVN}}/${ESVN_SUB_PROJECT}/${ESVN_URI_APPEND}
63 E_S_APPEND=${ESVN_URI_APPEND} 59 E_S_APPEND=${ESVN_URI_APPEND}
64 E_LIVE_SOURCE="svn" 60 E_LIVE_SOURCE="svn"
65 inherit subversion 61 inherit subversion
62 elif [[ ${EGIT_URI_APPEND} ]] ; then
63 E_LIVE_SERVER=${E_LIVE_SERVER:-${E_LIVE_SERVER_DEFAULT_GIT}}
64 EGIT_URI_APPEND=${EGIT_URI_APPEND:-${PN}}
65 EGIT_PROJECT="enlightenment/${EGIT_SUB_PROJECT}/${EGIT_URI_APPEND}"
66 EGIT_REPO_URI=${EGIT_SERVER:-${E_LIVE_SERVER_DEFAULT_GIT}}/${EGIT_SUB_PROJECT}/${EGIT_URI_APPEND}.git
67 E_S_APPEND=${EGIT_URI_APPEND}
68 E_LIVE_SOURCE="git"
69 inherit git-2
70 else
71 die "Either ESVN_URI_APPEND or EGIT_URI_APPEND need to be defined"
66 fi 72 fi
73 E_STATE="live"
74 WANT_AUTOTOOLS="yes"
75
67elif [[ -n ${E_SNAP_DATE} ]] ; then 76elif [[ -n ${E_SNAP_DATE} ]] ; then
68 E_STATE="snap" 77 E_STATE="snap"
69else 78else
70 E_STATE="release" 79 E_STATE="release"
71fi 80fi
72 81
73# Parse requested python state 82# Parse requested python state
74: ${E_PYTHON:=${E_CYTHON}} 83: ${E_PYTHON:=${E_CYTHON}}
75if [[ -n ${E_PYTHON} ]] ; then 84if [[ -n ${E_PYTHON} ]] ; then
76 PYTHON_DEPEND="2:2.4" 85 PYTHON_DEPEND="2"
77 86
78 inherit python 87 inherit python
79fi 88fi
80 89
81if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then 90if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
84 inherit autotools 93 inherit autotools
85fi 94fi
86 95
87ENLIGHTENMENT_EXPF="src_unpack src_compile src_install" 96ENLIGHTENMENT_EXPF="src_unpack src_compile src_install"
88case "${EAPI:-0}" in 97case "${EAPI:-0}" in
89 2|3|4) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;; 98 2|3|4|5) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;;
90 *) ;; 99 *) ;;
91esac 100esac
92EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF} 101EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF}
93 102
94DESCRIPTION="A DR17 production" 103DESCRIPTION="A DR17 production"
95HOMEPAGE="http://www.enlightenment.org/" 104HOMEPAGE="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";; 115 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="";; 116 live) KEYWORDS="";;
108esac 117esac
109IUSE="nls doc" 118IUSE="nls doc"
110 119
111DEPEND="doc? ( app-doc/doxygen )" 120DEPEND="doc? ( app-doc/doxygen )
121 ${E_PYTHON:+>=dev-python/setuptools-0.6_rc9}
122 ${E_CYTHON:+>=dev-python/cython-0.12.1}"
112RDEPEND="nls? ( sys-devel/gettext )" 123RDEPEND="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 124
116case ${EURI_STATE:-${E_STATE}} in 125case ${EURI_STATE:-${E_STATE}} in
117 release) S=${WORKDIR}/${P};; 126 release) S=${WORKDIR}/${P};;
118 snap) S=${WORKDIR}/${P};; 127 snap) S=${WORKDIR}/${P};;
119 live) S=${WORKDIR}/${E_S_APPEND};; 128 live) S=${WORKDIR}/${E_S_APPEND};;
120esac 129esac
121 130
122enlightenment_src_unpack() { 131enlightenment_src_unpack() {
123 if [[ ${E_STATE} == "live" ]] ; then 132 if [[ ${E_STATE} == "live" ]] ; then
124 case ${E_LIVE_SOURCE} in 133 case ${E_LIVE_SOURCE} in
125 cvs) cvs_src_unpack;;
126 svn) subversion_src_unpack;; 134 svn) subversion_src_unpack;;
135 git) git-2_src_unpack;;
127 *) die "eek!";; 136 *) die "eek!";;
128 esac 137 esac
129 else 138 else
130 unpack ${A} 139 unpack ${A}
131 fi 140 fi
132 hasq src_prepare ${ENLIGHTENMENT_EXPF} || enlightenment_src_prepare 141 if ! has src_prepare ${ENLIGHTENMENT_EXPF} ; then
142 cd "${S}" || die
143 enlightenment_src_prepare
144 fi
133} 145}
134 146
135enlightenment_src_prepare() { 147enlightenment_src_prepare() {
148 epatch_user
136 [[ -s gendoc ]] && chmod a+rx gendoc 149 [[ -s gendoc ]] && chmod a+rx gendoc
137 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then 150 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
138 [[ -d po ]] && eautopoint -f 151 [[ -d po ]] && eautopoint -f
139 # autotools require README, when README.in is around, but README 152 # autotools require README, when README.in is around, but README
140 # is created later in configure step 153 # is created later in configure step
147} 160}
148 161
149enlightenment_src_configure() { 162enlightenment_src_configure() {
150 # gstreamer sucks, work around it doing stupid stuff 163 # gstreamer sucks, work around it doing stupid stuff
151 export GST_REGISTRY="${S}/registry.xml" 164 export GST_REGISTRY="${S}/registry.xml"
152 has static-libs ${IUSE} && MY_ECONF+=" $(use_enable static-libs static)" 165 has static-libs ${IUSE} && E_ECONF+=( $(use_enable static-libs static) )
153 166
154 econf ${MY_ECONF} 167 econf ${MY_ECONF} "${E_ECONF[@]}"
155} 168}
156 169
157enlightenment_src_compile() { 170enlightenment_src_compile() {
158 hasq src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure 171 has src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure
159 172
160 emake || die 173 V=1 emake || die
161 174
162 if use doc ; then 175 if use doc ; then
163 if [[ -x ./gendoc ]] ; then 176 if [[ -x ./gendoc ]] ; then
164 ./gendoc || die 177 ./gendoc || die
165 else 178 elif emake -j1 -n doc >&/dev/null ; then
166 emake doc || die 179 V=1 emake doc || die
167 fi 180 fi
168 fi 181 fi
169} 182}
170 183
171enlightenment_src_install() { 184enlightenment_src_install() {
172 emake install DESTDIR="${D}" || die 185 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 186 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 187 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do
175 [[ -f ${d} ]] && dodoc ${d} 188 [[ -f ${d} ]] && dodoc ${d}
176 done 189 done
177 use doc && [[ -d doc ]] && dohtml -r doc/* 190 use doc && [[ -d doc ]] && dohtml -r doc/*

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

  ViewVC Help
Powered by ViewVC 1.1.20