1 |
# Copyright 1999-2004 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.22 2004/07/19 22:20:16 vapier Exp $ |
4 |
# |
5 |
# Author: vapier@gentoo.org |
6 |
|
7 |
ECLASS=enlightenment |
8 |
INHERITED="$INHERITED $ECLASS" |
9 |
|
10 |
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst |
11 |
|
12 |
ECVS_STATE="release" |
13 |
if [ "${PV/.9999}" != "${PV}" ] ; then |
14 |
ECVS_STATE="live" |
15 |
inherit cvs |
16 |
elif [ "${PV/.200?????/}" != "${PV}" ] ; then |
17 |
ECVS_STATE="snap" |
18 |
fi |
19 |
|
20 |
DESCRIPTION="A DR17 production" |
21 |
HOMEPAGE="http://www.enlightenment.org/" |
22 |
case ${ECVS_STATE} in |
23 |
release) SRC_URI="mirror://sourceforge/enlightenment/${P}.tar.gz";; |
24 |
snap) SRC_URI="mirror://gentoo/${P}.tar.bz2";; |
25 |
live) SRC_URI="";; |
26 |
esac |
27 |
|
28 |
LICENSE="BSD" |
29 |
SLOT="0" |
30 |
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~amd64 ~ia64" |
31 |
IUSE="nls doc" |
32 |
|
33 |
DEPEND="doc? ( app-doc/doxygen ) |
34 |
>=sys-devel/autoconf-2.58-r1" |
35 |
RDEPEND="nls? ( sys-devel/gettext )" |
36 |
|
37 |
case ${ECVS_STATE} in |
38 |
release) S=${WORKDIR}/${P};; |
39 |
snap|live) S=${WORKDIR}/${PN};; |
40 |
esac |
41 |
|
42 |
enlightenment_warning_msg() { |
43 |
if [ "${PV/200}" != "${PV}" ] ; then |
44 |
ewarn "Please do not contact the E team about bugs in Gentoo." |
45 |
ewarn "Only contact vapier@gentoo.org via e-mail or bugzilla." |
46 |
ewarn "Remember, this stuff is CVS only code so dont cry when" |
47 |
ewarn "I break you :)." |
48 |
fi |
49 |
} |
50 |
|
51 |
enlightenment_die() { |
52 |
enlightenment_warning_msg |
53 |
die "$@"$'\n'"!!! SEND BUG REPORTS TO vapier@gentoo.org NOT THE E TEAM" |
54 |
} |
55 |
|
56 |
enlightenment_pkg_setup() { |
57 |
enlightenment_warning_msg |
58 |
} |
59 |
|
60 |
# the stupid gettextize script prevents non-interactive mode, so we hax it |
61 |
gettext_modify() { |
62 |
use nls || return 0 |
63 |
cp `which gettextize` ${T} || die "could not copy gettextize" |
64 |
cp ${T}/gettextize ${T}/gettextize.old |
65 |
sed -e 's:read dummy < /dev/tty::' ${T}/gettextize.old > ${T}/gettextize |
66 |
} |
67 |
|
68 |
enlightenment_src_unpack() { |
69 |
[ "${ECVS_STATE}" != "live" ] && unpack ${A} |
70 |
gettext_modify |
71 |
} |
72 |
|
73 |
enlightenment_src_compile() { |
74 |
if [ "${ECVS_STATE}" != "release" ] ; then |
75 |
[ ! -z "${EHACKAUTOGEN}" ] && sed -i 's:.*configure.*::' autogen.sh |
76 |
export WANT_AUTOMAKE="${EAUTOMAKE:-1.8}" |
77 |
env \ |
78 |
PATH="${T}:${PATH}" \ |
79 |
NOCONFIGURE=yes \ |
80 |
USER=blah \ |
81 |
./autogen.sh \ |
82 |
|| enlightenment_die "autogen failed" |
83 |
if [ ! -z "${EHACKLIBLTDL}" ] ; then |
84 |
cd libltdl |
85 |
autoconf || enlightenment_die "autogen in libltdl failed" |
86 |
cd .. |
87 |
fi |
88 |
fi |
89 |
econf ${MY_ECONF} || enlightenment_die "econf failed" |
90 |
emake || enlightenment_die "emake failed" |
91 |
use doc && [ -x ./gendoc ] && { ./gendoc || enlightenment_die "gendoc failed" ; } |
92 |
} |
93 |
|
94 |
enlightenment_src_install() { |
95 |
make install DESTDIR=${D} || enlightenment_die |
96 |
find ${D} -name CVS -type d -exec rm -rf '{}' \; 2>/dev/null |
97 |
dodoc AUTHORS ChangeLog NEWS README TODO ${EDOCS} |
98 |
use doc && [ -d doc ] && dohtml -r doc/* |
99 |
} |
100 |
|
101 |
enlightenment_pkg_postinst() { |
102 |
enlightenment_warning_msg |
103 |
} |