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

Diff of /eclass/enlightenment.eclass

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

Revision 1.76 Revision 1.81
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.76 2008/11/30 09:05:51 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.81 2010/02/28 10:52:06 tommy Exp $
4# 4#
5# Author: vapier@gentoo.org 5# Author: vapier@gentoo.org
6 6
7inherit eutils libtool 7inherit eutils libtool
8 8
60 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest} 60 WANT_AUTOCONF=${E_WANT_AUTOCONF:-latest}
61 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest} 61 WANT_AUTOMAKE=${E_WANT_AUTOMAKE:-latest}
62 inherit autotools 62 inherit autotools
63fi 63fi
64 64
65ENLIGHTENMENT_EXPF="pkg_setup src_unpack src_compile src_install pkg_postinst"
66case "${EAPI:-0}" in
67 2|3|4) ENLIGHTENMENT_EXPF+=" src_prepare src_configure" ;;
68 *) ;;
69esac
70EXPORT_FUNCTIONS ${ENLIGHTENMENT_EXPF}
71
65DESCRIPTION="A DR17 production" 72DESCRIPTION="A DR17 production"
66HOMEPAGE="http://www.enlightenment.org/" 73HOMEPAGE="http://www.enlightenment.org/"
67case ${EURI_STATE:-${E_STATE}} in 74case ${EURI_STATE:-${E_STATE}} in
68 release) SRC_URI="mirror://sourceforge/enlightenment/${P}.tar.gz";; 75 release) SRC_URI="mirror://sourceforge/enlightenment/${P}.tar.gz";;
69 snap) SRC_URI="http://download.enlightenment.org/snapshots/${E_SNAP_DATE}/${P}.tar.bz2";; 76 snap) SRC_URI="http://download.enlightenment.org/snapshots/${E_SNAP_DATE}/${P}.tar.bz2";;
95 if [[ -n ${E_LIVE_SERVER} ]] ; then 102 if [[ -n ${E_LIVE_SERVER} ]] ; then
96 einfo "Using user server for live sources: ${E_LIVE_SERVER}" 103 einfo "Using user server for live sources: ${E_LIVE_SERVER}"
97 fi 104 fi
98 if [[ ${E_STATE} == "snap" ]] ; then 105 if [[ ${E_STATE} == "snap" ]] ; then
99 ewarn "Please do not contact the E team about bugs in Gentoo." 106 ewarn "Please do not contact the E team about bugs in Gentoo."
100 ewarn "Only contact vapier@gentoo.org via e-mail or bugzilla." 107 ewarn "Only contact enlightenment@gentoo.org via e-mail or bugzilla."
101 ewarn "Remember, this stuff is DEV only code so dont cry when" 108 ewarn "Remember, this stuff is DEV only code so dont cry when"
102 ewarn "I break you :)." 109 ewarn "I break you :)."
103 elif [[ ${E_STATE} == "live" ]] ; then 110 elif [[ ${E_STATE} == "live" ]] ; then
104 eerror "This is a LIVE SOURCES ebuild." 111 eerror "This is a LIVE SOURCES ebuild."
105 eerror "That means there are NO promises it will work." 112 eerror "That means there are NO promises it will work."
108 fi 115 fi
109} 116}
110 117
111enlightenment_die() { 118enlightenment_die() {
112 enlightenment_warning_msg 119 enlightenment_warning_msg
113 die "$@"$'\n'"!!! SEND BUG REPORTS TO vapier@gentoo.org NOT THE E TEAM" 120 die "$@"$'\n'"!!! SEND BUG REPORTS TO enlightenment@gentoo.org NOT THE E TEAM"
114} 121}
115 122
116enlightenment_pkg_setup() { 123enlightenment_pkg_setup() {
117 enlightenment_warning_msg 124 : enlightenment_warning_msg
118}
119
120# the stupid gettextize script prevents non-interactive mode, so we hax it
121gettext_modify() {
122 use nls || return 0
123 cp $(type -P gettextize) "${T}"/ || die "could not copy gettextize"
124 sed -i \
125 -e 's:read dummy < /dev/tty::' \
126 "${T}"/gettextize
127} 125}
128 126
129enlightenment_src_unpack() { 127enlightenment_src_unpack() {
130 if [[ ${E_STATE} == "live" ]] ; then 128 if [[ ${E_STATE} == "live" ]] ; then
131 case ${E_LIVE_SOURCE} in 129 case ${E_LIVE_SOURCE} in
134 *) die "eek!";; 132 *) die "eek!";;
135 esac 133 esac
136 else 134 else
137 unpack ${A} 135 unpack ${A}
138 fi 136 fi
139 gettext_modify 137 hasq src_prepare ${ENLIGHTENMENT_EXPF} || enlightenment_src_prepare
140 [[ -s gendoc ]] && chmod a+rx gendoc
141} 138}
142 139
143enlightenment_src_compile() { 140enlightenment_src_prepare() {
144 # gstreamer sucks, work around it doing stupid stuff 141 [[ -s gendoc ]] && chmod a+rx gendoc
145 export GST_REGISTRY="${S}/registry.xml"
146
147 if [[ ! -e configure ]] ; then
148 env \
149 PATH="${T}:${PATH}" \
150 NOCONFIGURE=yes \
151 USER=blah \
152 ./autogen.sh \
153 || enlightenment_die "autogen failed"
154 # symlinked files will cause sandbox violation
155 local x
156 for x in config.{guess,sub} ; do
157 [[ ! -L ${x} ]] && continue
158 rm -f ${x}
159 touch ${x}
160 done
161 elif [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then 142 if [[ ${WANT_AUTOTOOLS} == "yes" ]] ; then
143 [[ -d po ]] && eautopoint -f
144 # autotools require README, when README.in is around, but README
145 # is created later in configure step
146 [[ -f README.in ]] && touch README
162 eautoreconf 147 eautoreconf
163 fi 148 fi
164 epunt_cxx 149 epunt_cxx
165 elibtoolize 150 elibtoolize
166 econf ${MY_ECONF} || enlightenment_die "econf failed" 151}
152
153enlightenment_src_configure() {
154 # gstreamer sucks, work around it doing stupid stuff
155 export GST_REGISTRY="${S}/registry.xml"
156
157 econf ${MY_ECONF}
158}
159
160enlightenment_src_compile() {
161 hasq src_configure ${ENLIGHTENMENT_EXPF} || enlightenment_src_configure
167 emake || enlightenment_die "emake failed" 162 emake || enlightenment_die "emake failed"
168 use doc && [[ -x ./gendoc ]] && { ./gendoc || enlightenment_die "gendoc failed" ; } 163 use doc && [[ -x ./gendoc ]] && { ./gendoc || enlightenment_die "gendoc failed" ; }
169} 164}
170 165
171enlightenment_src_install() { 166enlightenment_src_install() {
172 emake install DESTDIR="${D}" || enlightenment_die 167 emake install DESTDIR="${D}" || enlightenment_die
173 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null 168 find "${D}" '(' -name CVS -o -name .svn -o -name .git ')' -type d -exec rm -rf '{}' \; 2>/dev/null
174 dodoc AUTHORS ChangeLog NEWS README TODO ${EDOCS} 169 for d in AUTHORS ChangeLog NEWS README TODO ${EDOCS}; do
170 [[ -f ${d} ]] && dodoc ${d}
171 done
175 use doc && [[ -d doc ]] && dohtml -r doc/* 172 use doc && [[ -d doc ]] && dohtml -r doc/*
176} 173}
177 174
178enlightenment_pkg_postinst() { 175enlightenment_pkg_postinst() {
179 enlightenment_warning_msg 176 : enlightenment_warning_msg
180} 177}
181 178
182EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.81

  ViewVC Help
Powered by ViewVC 1.1.20