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

Diff of /eclass/enlightenment.eclass

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

Revision 1.83 Revision 1.87
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 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.83 2010/06/19 00:35:11 abcd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.87 2010/09/18 08:38:08 vapier Exp $
4# 4
5# Author: vapier@gentoo.org 5# @ECLASS: enlightenment.eclass
6# @MAINTAINER:
7# enlightenment@gentoo.org
8# @BLURB: simplify enlightenment package management
6 9
7inherit eutils libtool 10inherit eutils libtool
11
12# @ECLASS-VARIABLE: E_PYTHON
13# @DEFAULT_UNSET
14# @DESCRIPTION:
15# if defined, the package is based on Python/distutils
16
17# @ECLASS-VARIABLE: E_CYTHON
18# @DEFAULT_UNSET
19# @DESCRIPTION:
20# if defined, the package is Cython bindings (implies E_PYTHON)
8 21
9# E_STATE's: 22# E_STATE's:
10# release [default] 23# release [default]
11# KEYWORDS arch 24# KEYWORDS arch
12# SRC_URI $P.tar.gz 25# SRC_URI $P.tar.gz
54elif [[ -n ${E_SNAP_DATE} ]] ; then 67elif [[ -n ${E_SNAP_DATE} ]] ; then
55 E_STATE="snap" 68 E_STATE="snap"
56else 69else
57 E_STATE="release" 70 E_STATE="release"
58fi 71fi
72
73# Parse requested python state
74: ${E_PYTHON:=${E_CYTHON}}
75if [[ -n ${E_PYTHON} ]] ; then
76 PYTHON_DEPEND="2:2.4"
77
78 inherit python
79fi
80
59if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then 81if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
60 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest} 82 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest}
61 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest} 83 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest}
62 inherit autotools 84 inherit autotools
63fi 85fi
64 86
65ENLIGHTENMENT_EXPF="pkg_setup src_unpack src_compile src_install pkg_postinst" 87ENLIGHTENMENT_EXPF="src_unpack src_compile src_install"
66case "${EAPI:-0}" in 88case "${EAPI:-0}" in
67 2|3|4) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;; 89 2|3|4) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;;
68 *) ;; 90 *) ;;
69esac 91esac
70EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF} 92EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF}
86esac 108esac
87IUSE="nls doc" 109IUSE="nls doc"
88 110
89DEPEND="doc? ( app-doc/doxygen )" 111DEPEND="doc? ( app-doc/doxygen )"
90RDEPEND="nls? ( sys-devel/gettext )" 112RDEPEND="nls? ( sys-devel/gettext )"
91 113[[ -n ${E_PYTHON} ]] && DEPEND+=" >=dev-python/setuptools-0.6_rc9"
92# gettext (via `autopoint`) needs to run cvs #245073 114[[ -n ${E_CYTHON} ]] && DEPEND+=" >=dev-python/cython-0.12.1"
93[[ ${E_STATE} == "live" ]] && DEPEND="${DEPEND} dev-vcs/cvs"
94 115
95case ${EURI_STATE:-${E_STATE}} in 116case ${EURI_STATE:-${E_STATE}} in
96 release) S=${WORKDIR}/${P};; 117 release) S=${WORKDIR}/${P};;
97 snap) S=${WORKDIR}/${P};; 118 snap) S=${WORKDIR}/${P};;
98 live) S=${WORKDIR}/${E_S_APPEND};; 119 live) S=${WORKDIR}/${E_S_APPEND};;
99esac 120esac
100
101enlightenment_warning_msg() {
102 if [[ -n ${E_LIVE_SERVER} ]] ; then
103 einfo "Using user server for live sources: ${E_LIVE_SERVER}"
104 fi
105 if [[ ${E_STATE} == "snap" ]] ; then
106 ewarn "Please do not contact the E team about bugs in Gentoo."
107 ewarn "Only contact enlightenment@gentoo.org via e-mail or bugzilla."
108 ewarn "Remember, this stuff is DEV only code so dont cry when"
109 ewarn "I break you :)."
110 elif [[ ${E_STATE} == "live" ]] ; then
111 eerror "This is a LIVE SOURCES ebuild."
112 eerror "That means there are NO promises it will work."
113 eerror "If it fails to build, FIX THE CODE YOURSELF"
114 eerror "before reporting any issues."
115 fi
116}
117
118enlightenment_die() {
119 enlightenment_warning_msg
120 die "$@"$'\n'"!!! SEND BUG REPORTS TO enlightenment@gentoo.org NOT THE E TEAM"
121}
122
123enlightenment_pkg_setup() {
124 : enlightenment_warning_msg
125}
126 121
127enlightenment_src_unpack() { 122enlightenment_src_unpack() {
128 if [[ ${E_STATE} == "live" ]] ; then 123 if [[ ${E_STATE} == "live" ]] ; then
129 case ${E_LIVE_SOURCE} in 124 case ${E_LIVE_SOURCE} in
130 cvs) cvs_src_unpack;; 125 cvs) cvs_src_unpack;;
142 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then 137 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
143 [[ -d po ]] && eautopoint -f 138 [[ -d po ]] && eautopoint -f
144 # autotools require README, when README.in is around, but README 139 # autotools require README, when README.in is around, but README
145 # is created later in configure step 140 # is created later in configure step
146 [[ -f README.in ]] && touch README 141 [[ -f README.in ]] && touch README
142 export SVN_REPO_PATH=${ESVN_WC_PATH}
147 eautoreconf 143 eautoreconf
148 fi 144 fi
149 epunt_cxx 145 epunt_cxx
150 elibtoolize 146 elibtoolize
151} 147}
152 148
153enlightenment_src_configure() { 149enlightenment_src_configure() {
154 # gstreamer sucks, work around it doing stupid stuff 150 # gstreamer sucks, work around it doing stupid stuff
155 export GST_REGISTRY="${S}/registry.xml" 151 export GST_REGISTRY="${S}/registry.xml"
152 has static-libs ${IUSE} && MY_ECONF+=" $(use_enable static-libs static)"
156 153
157 econf ${MY_ECONF} 154 econf ${MY_ECONF}
158} 155}
159 156
160enlightenment_src_compile() { 157enlightenment_src_compile() {
161 hasq src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure 158 hasq src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure
162 emake || enlightenment_die "emake failed" 159
163 use doc && [[ -x ./gendoc ]] && { ./gendoc || enlightenment_die "gendoc failed" ; } 160 emake || die
161
162 if use doc ; then
163 if [[ -x ./gendoc ]] ; then
164 ./gendoc || die
165 else
166 emake doc || die
167 fi
168 fi
164} 169}
165 170
166enlightenment_src_install() { 171enlightenment_src_install() {
167 emake install DESTDIR="${D}" || enlightenment_die 172 emake install DESTDIR="${D}" || die
168 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null 173 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null
169 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do 174 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do
170 [[ -f ${d} ]] && dodoc ${d} 175 [[ -f ${d} ]] && dodoc ${d}
171 done 176 done
172 use doc && [[ -d doc ]] && dohtml -r doc/* 177 use doc && [[ -d doc ]] && dohtml -r doc/*
178 if has static-libs ${IUSE} ; then
179 use static-libs || find "${D}" -name '*.la' -exec rm -f {} +
180 fi
173} 181}
174
175enlightenment_pkg_postinst() {
176 : enlightenment_warning_msg
177}
178

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

  ViewVC Help
Powered by ViewVC 1.1.20