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

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

  ViewVC Help
Powered by ViewVC 1.1.20