1 |
ulm 09/03/29 19:49:45 |
2 |
|
3 |
Modified: elisp.eclass |
4 |
Log: |
5 |
Sync elisp.eclass from Emacs overlay (revision 1355): |
6 |
|
7 |
Inherit eutils. Call EXPORT_FUNCTIONS with EAPI dependent arguments. |
8 |
Assign RDEPEND from DEPEND, avoiding unnecessary code duplication. |
9 |
New function elisp_src_prepare, applies patches from ELISP_PATCHES. |
10 |
New function elisp_src_configure, does nothing. |
11 |
|
12 |
Revision Changes Path |
13 |
1.40 eclass/elisp.eclass |
14 |
|
15 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.40&view=markup |
16 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.40&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?r1=1.39&r2=1.40 |
18 |
|
19 |
Index: elisp.eclass |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v |
22 |
retrieving revision 1.39 |
23 |
retrieving revision 1.40 |
24 |
diff -u -r1.39 -r1.40 |
25 |
--- elisp.eclass 26 Mar 2009 14:14:22 -0000 1.39 |
26 |
+++ elisp.eclass 29 Mar 2009 19:49:45 -0000 1.40 |
27 |
@@ -1,6 +1,6 @@ |
28 |
# Copyright 1999-2009 Gentoo Foundation |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.39 2009/03/26 14:14:22 ulm Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.40 2009/03/29 19:49:45 ulm Exp $ |
32 |
# |
33 |
# Copyright 2002-2003 Matthew Kennedy <mkennedy@g.o> |
34 |
# Copyright 2003 Jeremy Maitin-Shepard <jbms@×××××.com> |
35 |
@@ -38,6 +38,11 @@ |
36 |
# DOCS="blah.txt ChangeLog" is automatically used to install the given |
37 |
# files by dodoc in src_install(). |
38 |
|
39 |
+# @ECLASS-VARIABLE: ELISP_PATCHES |
40 |
+# @DESCRIPTION: |
41 |
+# Any patches to apply after unpacking the sources. Patches are searched |
42 |
+# both in ${PWD} and ${FILESDIR}. |
43 |
+ |
44 |
# @ECLASS-VARIABLE: SITEFILE |
45 |
# @DESCRIPTION: |
46 |
# Name of package's site-init file. The filename must match the shell |
47 |
@@ -45,14 +50,17 @@ |
48 |
# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice |
49 |
# in most cases. |
50 |
|
51 |
-inherit elisp-common versionator |
52 |
+inherit elisp-common eutils versionator |
53 |
|
54 |
-EXPORT_FUNCTIONS \ |
55 |
- src_unpack src_compile src_install \ |
56 |
- pkg_setup pkg_postinst pkg_postrm |
57 |
+case "${EAPI:-0}" in |
58 |
+ 0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \ |
59 |
+ pkg_{setup,postinst,postrm} ;; |
60 |
+ *) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \ |
61 |
+ pkg_{setup,postinst,postrm} ;; |
62 |
+esac |
63 |
|
64 |
DEPEND=">=virtual/emacs-${NEED_EMACS:-21}" |
65 |
-RDEPEND=">=virtual/emacs-${NEED_EMACS:-21}" |
66 |
+RDEPEND="${DEPEND}" |
67 |
IUSE="" |
68 |
|
69 |
elisp_pkg_setup() { |
70 |
@@ -73,8 +81,27 @@ |
71 |
mv ${P}.el ${PN}.el || die |
72 |
[ -d "${S}" ] || S=${WORKDIR} |
73 |
fi |
74 |
+ |
75 |
+ case "${EAPI:-0}" in |
76 |
+ 0|1) elisp_src_prepare ;; |
77 |
+ esac |
78 |
+} |
79 |
+ |
80 |
+elisp_src_prepare() { |
81 |
+ local patch |
82 |
+ for patch in ${ELISP_PATCHES}; do |
83 |
+ if [ -f "${patch}" ]; then |
84 |
+ epatch "${patch}" |
85 |
+ elif [ -f "${FILESDIR}/${patch}" ]; then |
86 |
+ epatch "${FILESDIR}/${patch}" |
87 |
+ else |
88 |
+ die "Cannot find ${patch}" |
89 |
+ fi |
90 |
+ done |
91 |
} |
92 |
|
93 |
+elisp_src_configure() { :; } |
94 |
+ |
95 |
elisp_src_compile() { |
96 |
elisp-compile *.el || die |
97 |
} |