1 |
ulm 09/02/28 17:56:09 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-22.3-r2.ebuild |
5 |
Log: |
6 |
IUSE default for xpm, SLOT dependency for gtk+; change EAPI to 2. |
7 |
(Portage version: 2.2_rc23/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.305 app-editors/emacs/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.305&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.305&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?r1=1.304&r2=1.305 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v |
19 |
retrieving revision 1.304 |
20 |
retrieving revision 1.305 |
21 |
diff -u -r1.304 -r1.305 |
22 |
--- ChangeLog 22 Feb 2009 17:27:23 -0000 1.304 |
23 |
+++ ChangeLog 28 Feb 2009 17:56:09 -0000 1.305 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for app-editors/emacs |
26 |
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.304 2009/02/22 17:27:23 ulm Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.305 2009/02/28 17:56:09 ulm Exp $ |
29 |
+ |
30 |
+*emacs-22.3-r2 (28 Feb 2009) |
31 |
+ |
32 |
+ 28 Feb 2009; Ulrich Mueller <ulm@g.o> +emacs-22.3-r2.ebuild: |
33 |
+ IUSE default for xpm, SLOT dependency for gtk+; change EAPI to 2. |
34 |
|
35 |
22 Feb 2009; Ulrich Mueller <ulm@g.o> -emacs-18.59-r5.ebuild: |
36 |
Remove old. |
37 |
|
38 |
|
39 |
|
40 |
1.1 app-editors/emacs/emacs-22.3-r2.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-22.3-r2.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-22.3-r2.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: emacs-22.3-r2.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2009 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-22.3-r2.ebuild,v 1.1 2009/02/28 17:56:09 ulm Exp $ |
50 |
|
51 |
EAPI=2 |
52 |
|
53 |
inherit autotools elisp-common eutils flag-o-matic |
54 |
|
55 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
56 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
57 |
SRC_URI="mirror://gnu/emacs/${P}.tar.gz" |
58 |
|
59 |
LICENSE="GPL-3 FDL-1.2 BSD as-is X11" |
60 |
SLOT="22" |
61 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
62 |
IUSE="alsa gif gtk gzip-el hesiod jpeg kerberos motif png spell sound source tiff toolkit-scroll-bars X Xaw3d +xpm" |
63 |
RESTRICT="strip" |
64 |
|
65 |
RDEPEND="!<app-editors/emacs-cvs-22.1 |
66 |
sys-libs/ncurses |
67 |
>=app-admin/eselect-emacs-1.2 |
68 |
net-libs/liblockfile |
69 |
hesiod? ( net-dns/hesiod ) |
70 |
kerberos? ( virtual/krb5 ) |
71 |
spell? ( || ( app-text/aspell app-text/ispell ) ) |
72 |
alsa? ( media-libs/alsa-lib ) |
73 |
X? ( |
74 |
x11-libs/libXmu |
75 |
x11-libs/libXt |
76 |
x11-misc/xbitmaps |
77 |
x11-misc/emacs-desktop |
78 |
gif? ( media-libs/giflib ) |
79 |
jpeg? ( media-libs/jpeg ) |
80 |
tiff? ( media-libs/tiff ) |
81 |
png? ( media-libs/libpng ) |
82 |
xpm? ( x11-libs/libXpm ) |
83 |
gtk? ( x11-libs/gtk+:2 ) |
84 |
!gtk? ( |
85 |
Xaw3d? ( x11-libs/Xaw3d ) |
86 |
!Xaw3d? ( motif? ( x11-libs/openmotif ) ) |
87 |
) |
88 |
)" |
89 |
|
90 |
DEPEND="${RDEPEND} |
91 |
alsa? ( dev-util/pkgconfig ) |
92 |
X? ( gtk? ( dev-util/pkgconfig ) ) |
93 |
gzip-el? ( app-arch/gzip )" |
94 |
|
95 |
# FULL_VERSION keeps the full version number, which is needed in order to |
96 |
# determine some path information correctly for copy/move operations later on |
97 |
FULL_VERSION="${PV}" |
98 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
99 |
|
100 |
src_prepare() { |
101 |
epatch "${FILESDIR}/emacs-22.1-Xaw3d-headers.patch" |
102 |
epatch "${FILESDIR}/emacs-22.3-freebsd-sparc.patch" |
103 |
# SuperH support (bug 238210) |
104 |
epatch "${FILESDIR}/emacs-22.2-sh.patch" |
105 |
# Fix sporadic segmentation faults in unexec (bug 236579) |
106 |
epatch "${FILESDIR}/emacs-22.3-linux-random-heap.patch" |
107 |
|
108 |
sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \ |
109 |
-e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \ |
110 |
"${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings" |
111 |
|
112 |
if ! use alsa; then |
113 |
# ALSA is detected even if not requested by its USE flag. |
114 |
# Suppress it by supplying pkg-config with a wrong library name. |
115 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \ |
116 |
|| die "unable to sed configure.in" |
117 |
fi |
118 |
if ! use gzip-el; then |
119 |
# Emacs' build system automatically detects the gzip binary and |
120 |
# compresses el files. We don't want that so confuse it with a |
121 |
# wrong binary name |
122 |
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
123 |
|| die "unable to sed configure.in" |
124 |
fi |
125 |
|
126 |
eautoreconf |
127 |
} |
128 |
|
129 |
src_configure() { |
130 |
ALLOWED_FLAGS="" |
131 |
strip-flags |
132 |
#unset LDFLAGS |
133 |
if use hppa; then # bug #193703 |
134 |
replace-flags -O[2-9] -O |
135 |
else |
136 |
replace-flags -O[3-9] -O2 |
137 |
fi |
138 |
sed -i -e "s/-lungif/-lgif/g" configure* src/Makefile* || die |
139 |
|
140 |
local myconf |
141 |
|
142 |
if use alsa && ! use sound; then |
143 |
echo |
144 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
145 |
einfo "so sound is switched on anyway." |
146 |
echo |
147 |
myconf="${myconf} --with-sound" |
148 |
else |
149 |
myconf="${myconf} $(use_with sound)" |
150 |
fi |
151 |
|
152 |
if use X; then |
153 |
myconf="${myconf} --with-x" |
154 |
myconf="${myconf} $(use_with toolkit-scroll-bars)" |
155 |
myconf="${myconf} $(use_with jpeg) $(use_with tiff)" |
156 |
myconf="${myconf} $(use_with gif) $(use_with png)" |
157 |
myconf="${myconf} $(use_with xpm)" |
158 |
|
159 |
# GTK+ is the default toolkit if USE=gtk is chosen with other |
160 |
# possibilities. Emacs upstream thinks this should be standard |
161 |
# policy on all distributions |
162 |
if use gtk; then |
163 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
164 |
myconf="${myconf} --with-x-toolkit=gtk" |
165 |
elif use Xaw3d; then |
166 |
einfo "Configuring to build with Xaw3d (Athena/Lucid) toolkit" |
167 |
myconf="${myconf} --with-x-toolkit=athena" |
168 |
myconf="${myconf} --without-gtk" |
169 |
elif use motif; then |
170 |
einfo "Configuring to build with Motif toolkit" |
171 |
myconf="${myconf} --with-x-toolkit=motif" |
172 |
myconf="${myconf} --without-gtk" |
173 |
else |
174 |
einfo "Configuring to build with no toolkit" |
175 |
myconf="${myconf} --with-x-toolkit=no" |
176 |
myconf="${myconf} --without-gtk" |
177 |
fi |
178 |
|
179 |
local f tk= |
180 |
for f in gtk Xaw3d motif; do |
181 |
use ${f} || continue |
182 |
[ "${tk}" ] \ |
183 |
&& ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")" |
184 |
tk="${tk}${tk:+ }${f}" |
185 |
done |
186 |
else |
187 |
myconf="${myconf} --without-x" |
188 |
fi |
189 |
|
190 |
myconf="${myconf} $(use_with hesiod)" |
191 |
myconf="${myconf} $(use_with kerberos) $(use_with kerberos kerberos5)" |
192 |
|
193 |
econf \ |
194 |
--program-suffix=-emacs-${SLOT} \ |
195 |
--infodir=/usr/share/info/emacs-${SLOT} \ |
196 |
--without-carbon \ |
197 |
${myconf} || die "econf emacs failed" |
198 |
} |
199 |
|
200 |
src_compile() { |
201 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
202 |
emake CC="$(tc-getCC)" || die "emake failed" |
203 |
} |
204 |
|
205 |
src_install () { |
206 |
local i m |
207 |
|
208 |
emake install DESTDIR="${D}" || die "make install failed" |
209 |
|
210 |
rm "${D}"/usr/bin/emacs-${FULL_VERSION}-emacs-${SLOT} \ |
211 |
|| die "removing duplicate emacs executable failed" |
212 |
mv "${D}"/usr/bin/emacs-emacs-${SLOT} "${D}"/usr/bin/emacs-${SLOT} \ |
213 |
|| die "moving Emacs executable failed" |
214 |
|
215 |
# move info documentation to the correct place |
216 |
for i in "${D}"/usr/share/info/emacs-${SLOT}/*; do |
217 |
mv "${i}" "${i}.info" || die "mv info failed" |
218 |
done |
219 |
|
220 |
# move man pages to the correct place |
221 |
for m in "${D}"/usr/share/man/man1/* ; do |
222 |
mv "${m}" "${m%.1}-emacs-${SLOT}.1" || die "mv man failed" |
223 |
done |
224 |
|
225 |
# avoid collision between slots, see bug #169033 e.g. |
226 |
rm "${D}"/usr/share/emacs/site-lisp/subdirs.el |
227 |
rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores |
228 |
keepdir /usr/share/emacs/site-lisp |
229 |
keepdir /var/lib/games/emacs |
230 |
|
231 |
local c=";;" |
232 |
if use source; then |
233 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
234 |
# This is not meant to install all the source -- just the |
235 |
# C source you might find via find-function |
236 |
doins src/*.[ch] |
237 |
c="" |
238 |
fi |
239 |
|
240 |
sed 's/^X//' >"${SITEFILE}" <<-EOF |
241 |
X |
242 |
;;; ${PN}-${SLOT} site-lisp configuration |
243 |
X |
244 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
245 |
X ${c}(setq find-function-C-source-directory |
246 |
X ${c} "/usr/share/emacs/${FULL_VERSION}/src") |
247 |
X (let ((path (getenv "INFOPATH")) |
248 |
X (dir "/usr/share/info/emacs-${SLOT}")) |
249 |
X (and path |
250 |
X ;; move Emacs Info dir to beginning of list |
251 |
X (setq Info-directory-list |
252 |
X (cons dir (delete dir (split-string path ":" t))))))) |
253 |
EOF |
254 |
elisp-site-file-install "${SITEFILE}" || die |
255 |
|
256 |
dodoc AUTHORS BUGS CONTRIBUTE README || die "dodoc failed" |
257 |
} |
258 |
|
259 |
emacs-infodir-rebuild() { |
260 |
# Depending on the Portage version, the Info dir file is compressed |
261 |
# or removed. It is only rebuilt by Portage if our directory is in |
262 |
# INFOPATH, which is not guaranteed. So we rebuild it ourselves. |
263 |
|
264 |
local infodir=/usr/share/info/emacs-${SLOT} f |
265 |
[ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo |
266 |
einfo "Regenerating Info directory index in ${infodir} ..." |
267 |
rm -f "${ROOT}"${infodir}/dir{,.*} |
268 |
for f in "${ROOT}"${infodir}/*.info*; do |
269 |
[[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ |
270 |
&& install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null |
271 |
done |
272 |
rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty |
273 |
echo |
274 |
} |
275 |
|
276 |
pkg_postinst() { |
277 |
[ -f "${ROOT}"/usr/share/emacs/site-lisp/subdirs.el ] \ |
278 |
|| cp "${ROOT}"/usr/share/emacs{/${FULL_VERSION},}/site-lisp/subdirs.el |
279 |
|
280 |
local f |
281 |
for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do |
282 |
[ -e "${f}" ] || touch "${f}" |
283 |
done |
284 |
|
285 |
elisp-site-regen |
286 |
emacs-infodir-rebuild |
287 |
|
288 |
if [[ $(readlink "${ROOT}"/usr/bin/emacs) == emacs.emacs-${SLOT}* ]]; then |
289 |
# transition from pre-eselect revision |
290 |
eselect emacs set emacs-${SLOT} |
291 |
else |
292 |
eselect emacs update ifunset |
293 |
fi |
294 |
|
295 |
echo |
296 |
elog "You can set the version to be started by /usr/bin/emacs through" |
297 |
elog "the Emacs eselect module, which also redirects man and info pages." |
298 |
elog "Therefore, several Emacs versions can be installed at the same time." |
299 |
elog "\"man emacs.eselect\" for details." |
300 |
} |
301 |
|
302 |
pkg_postrm() { |
303 |
elisp-site-regen |
304 |
emacs-infodir-rebuild |
305 |
eselect emacs update ifunset |
306 |
} |