1 |
ulm 09/06/21 17:00:33 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-cvs-23.1.9999.ebuild |
5 |
emacs-cvs-23.0.9999-r2.ebuild |
6 |
Removed: emacs-cvs-23.0.9999-r1.ebuild |
7 |
Log: |
8 |
Add live ebuilds for trunk and for EMACS_23_1_RC branch. |
9 |
(Portage version: 2.2_rc33/cvs/Linux i686) |
10 |
|
11 |
Revision Changes Path |
12 |
1.251 app-editors/emacs-cvs/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?rev=1.251&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?rev=1.251&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?r1=1.250&r2=1.251 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v |
21 |
retrieving revision 1.250 |
22 |
retrieving revision 1.251 |
23 |
diff -u -r1.250 -r1.251 |
24 |
--- ChangeLog 19 Jun 2009 22:42:51 -0000 1.250 |
25 |
+++ ChangeLog 21 Jun 2009 17:00:33 -0000 1.251 |
26 |
@@ -1,6 +1,15 @@ |
27 |
# ChangeLog for app-editors/emacs-cvs |
28 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v 1.250 2009/06/19 22:42:51 ulm Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v 1.251 2009/06/21 17:00:33 ulm Exp $ |
31 |
+ |
32 |
+*emacs-cvs-23.1.9999 (21 Jun 2009) |
33 |
+*emacs-cvs-23.0.9999-r2 (21 Jun 2009) |
34 |
+ |
35 |
+ 21 Jun 2009; Ulrich Mueller <ulm@g.o> |
36 |
+ -emacs-cvs-23.0.9999-r1.ebuild, +emacs-cvs-23.0.9999-r2.ebuild, |
37 |
+ +emacs-cvs-23.1.9999.ebuild: |
38 |
+ Upstream CVS has been branched for the 23.1 release. 23.0.9999-r2 is the |
39 |
+ live ebuild for the EMACS_23_1_RC branch, 23.1.9999 for the trunk. |
40 |
|
41 |
*emacs-cvs-23.0.95 (19 Jun 2009) |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
1.1 app-editors/emacs-cvs/emacs-cvs-23.1.9999.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.1.9999.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.1.9999.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: emacs-cvs-23.1.9999.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2009 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.1.9999.ebuild,v 1.1 2009/06/21 17:00:33 ulm Exp $ |
56 |
|
57 |
EAPI=2 |
58 |
|
59 |
inherit autotools elisp-common eutils flag-o-matic |
60 |
|
61 |
if [ "${PV##*.}" = "9999" ]; then |
62 |
ECVS_AUTH="pserver" |
63 |
ECVS_SERVER="cvs.savannah.gnu.org:/sources/emacs" |
64 |
ECVS_MODULE="emacs" |
65 |
ECVS_BRANCH="HEAD" |
66 |
ECVS_LOCALNAME="emacs" |
67 |
inherit cvs |
68 |
SRC_URI="" |
69 |
S="${WORKDIR}/${ECVS_LOCALNAME}" |
70 |
else |
71 |
SRC_URI="mirror://gentoo/emacs-${PV}.tar.gz |
72 |
ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-${PV}.tar.gz" |
73 |
# FULL_VERSION keeps the full version number, which is needed in |
74 |
# order to determine some path information correctly for copy/move |
75 |
# operations later on |
76 |
FULL_VERSION="${PV%%_*}" |
77 |
S="${WORKDIR}/emacs-${FULL_VERSION}" |
78 |
fi |
79 |
|
80 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
81 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
82 |
|
83 |
LICENSE="GPL-3 FDL-1.3 BSD as-is X11 W3C unicode" |
84 |
SLOT="23" |
85 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
86 |
IUSE="alsa dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm" |
87 |
RESTRICT="strip" |
88 |
|
89 |
RDEPEND="sys-libs/ncurses |
90 |
>=app-admin/eselect-emacs-1.2 |
91 |
net-libs/liblockfile |
92 |
hesiod? ( net-dns/hesiod ) |
93 |
kerberos? ( virtual/krb5 ) |
94 |
alsa? ( media-libs/alsa-lib ) |
95 |
gpm? ( sys-libs/gpm ) |
96 |
dbus? ( sys-apps/dbus ) |
97 |
X? ( |
98 |
x11-libs/libXmu |
99 |
x11-libs/libXt |
100 |
x11-misc/xbitmaps |
101 |
gif? ( media-libs/giflib ) |
102 |
jpeg? ( media-libs/jpeg ) |
103 |
png? ( media-libs/libpng ) |
104 |
svg? ( >=gnome-base/librsvg-2.0 ) |
105 |
tiff? ( media-libs/tiff ) |
106 |
xpm? ( x11-libs/libXpm ) |
107 |
xft? ( |
108 |
media-libs/fontconfig |
109 |
media-libs/freetype |
110 |
x11-libs/libXft |
111 |
m17n-lib? ( |
112 |
>=dev-libs/libotf-0.9.4 |
113 |
>=dev-libs/m17n-lib-1.5.1 |
114 |
) |
115 |
) |
116 |
gtk? ( x11-libs/gtk+:2 ) |
117 |
!gtk? ( |
118 |
Xaw3d? ( x11-libs/Xaw3d ) |
119 |
!Xaw3d? ( motif? ( x11-libs/openmotif ) ) |
120 |
) |
121 |
)" |
122 |
|
123 |
DEPEND="${RDEPEND} |
124 |
dev-util/pkgconfig |
125 |
gzip-el? ( app-arch/gzip )" |
126 |
|
127 |
RDEPEND="${RDEPEND} |
128 |
>=app-emacs/emacs-common-gentoo-1[X?]" |
129 |
|
130 |
EMACS_SUFFIX="emacs-${SLOT}" |
131 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
132 |
|
133 |
src_prepare() { |
134 |
if [ "${PV##*.}" = "9999" ]; then |
135 |
FULL_VERSION=$(grep 'defconst[ ]*emacs-version' lisp/version.el \ |
136 |
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/') |
137 |
[ "${FULL_VERSION}" ] || die "Cannot determine current Emacs version" |
138 |
echo |
139 |
einfo "Emacs CVS branch: ${ECVS_BRANCH}" |
140 |
einfo "Emacs version number: ${FULL_VERSION}" |
141 |
[ "${FULL_VERSION%.*}" = ${PV%.*} ] \ |
142 |
|| die "Upstream version number changed to ${FULL_VERSION}" |
143 |
echo |
144 |
fi |
145 |
|
146 |
sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \ |
147 |
-e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \ |
148 |
"${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings" |
149 |
|
150 |
if ! use alsa; then |
151 |
# ALSA is detected even if not requested by its USE flag. |
152 |
# Suppress it by supplying pkg-config with a wrong library name. |
153 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \ |
154 |
|| die "unable to sed configure.in" |
155 |
fi |
156 |
if ! use gzip-el; then |
157 |
# Emacs' build system automatically detects the gzip binary and |
158 |
# compresses el files. We don't want that so confuse it with a |
159 |
# wrong binary name |
160 |
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
161 |
|| die "unable to sed configure.in" |
162 |
fi |
163 |
|
164 |
eautoreconf |
165 |
} |
166 |
|
167 |
src_configure() { |
168 |
ALLOWED_FLAGS="" |
169 |
strip-flags |
170 |
#unset LDFLAGS |
171 |
if use sh; then |
172 |
replace-flags -O[1-9] -O0 #262359 |
173 |
else |
174 |
replace-flags -O[3-9] -O2 |
175 |
fi |
176 |
|
177 |
local myconf |
178 |
|
179 |
if use alsa && ! use sound; then |
180 |
echo |
181 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
182 |
einfo "so sound is switched on anyway." |
183 |
echo |
184 |
myconf="${myconf} --with-sound" |
185 |
else |
186 |
myconf="${myconf} $(use_with sound)" |
187 |
fi |
188 |
|
189 |
if use X; then |
190 |
myconf="${myconf} --with-x" |
191 |
myconf="${myconf} $(use_with toolkit-scroll-bars)" |
192 |
myconf="${myconf} $(use_with gif) $(use_with jpeg)" |
193 |
myconf="${myconf} $(use_with png) $(use_with svg rsvg)" |
194 |
myconf="${myconf} $(use_with tiff) $(use_with xpm)" |
195 |
myconf="${myconf} $(use_with xft)" |
196 |
|
197 |
if use xft; then |
198 |
myconf="${myconf} $(use_with m17n-lib libotf)" |
199 |
myconf="${myconf} $(use_with m17n-lib m17n-flt)" |
200 |
else |
201 |
myconf="${myconf} --without-libotf --without-m17n-flt" |
202 |
use m17n-lib && ewarn \ |
203 |
"USE flag \"m17n-lib\" has no effect because xft is not set." |
204 |
fi |
205 |
|
206 |
# GTK+ is the default toolkit if USE=gtk is chosen with other |
207 |
# possibilities. Emacs upstream thinks this should be standard |
208 |
# policy on all distributions |
209 |
if use gtk; then |
210 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
211 |
myconf="${myconf} --with-x-toolkit=gtk" |
212 |
elif use Xaw3d; then |
213 |
einfo "Configuring to build with Xaw3d (Athena/Lucid) toolkit" |
214 |
myconf="${myconf} --with-x-toolkit=athena" |
215 |
elif use motif; then |
216 |
einfo "Configuring to build with Motif toolkit" |
217 |
myconf="${myconf} --with-x-toolkit=motif" |
218 |
else |
219 |
einfo "Configuring to build with no toolkit" |
220 |
myconf="${myconf} --with-x-toolkit=no" |
221 |
fi |
222 |
|
223 |
local f tk= |
224 |
for f in gtk Xaw3d motif; do |
225 |
use ${f} || continue |
226 |
[ "${tk}" ] \ |
227 |
&& ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")" |
228 |
tk="${tk}${tk:+ }${f}" |
229 |
done |
230 |
else |
231 |
myconf="${myconf} --without-x" |
232 |
fi |
233 |
|
234 |
myconf="${myconf} $(use_with hesiod)" |
235 |
myconf="${myconf} $(use_with kerberos) $(use_with kerberos kerberos5)" |
236 |
myconf="${myconf} $(use_with gpm) $(use_with dbus)" |
237 |
|
238 |
econf \ |
239 |
--program-suffix=-${EMACS_SUFFIX} \ |
240 |
--infodir=/usr/share/info/${EMACS_SUFFIX} \ |
241 |
${myconf} || die "econf emacs failed" |
242 |
} |
243 |
|
244 |
src_compile() { |
245 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
246 |
if [ "${PV##*.}" = "9999" ]; then |
247 |
emake CC="$(tc-getCC)" bootstrap || die "make bootstrap failed" |
248 |
# cleanup, otherwise emacs will be dumped again in src_install |
249 |
(cd src; emake versionclean) |
250 |
fi |
251 |
emake CC="$(tc-getCC)" || die "emake failed" |
252 |
} |
253 |
|
254 |
src_install () { |
255 |
local i m |
256 |
|
257 |
emake install DESTDIR="${D}" || die "make install failed" |
258 |
|
259 |
rm "${D}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \ |
260 |
|| die "removing duplicate emacs executable failed" |
261 |
mv "${D}"/usr/bin/emacs-${EMACS_SUFFIX} "${D}"/usr/bin/${EMACS_SUFFIX} \ |
262 |
|| die "moving Emacs executable failed" |
263 |
|
264 |
# move info documentation to the correct place |
265 |
for i in "${D}"/usr/share/info/${EMACS_SUFFIX}/*; do |
266 |
mv "${i}" "${i}.info" || die "mv info failed" |
267 |
done |
268 |
|
269 |
# move man pages to the correct place |
270 |
for m in "${D}"/usr/share/man/man1/* ; do |
271 |
mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed" |
272 |
done |
273 |
|
274 |
# avoid collision between slots, see bug #169033 e.g. |
275 |
rm "${D}"/usr/share/emacs/site-lisp/subdirs.el |
276 |
rm -rf "${D}"/usr/share/{applications,icons} |
277 |
rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores |
278 |
keepdir /var/lib/games/emacs |
279 |
|
280 |
local c=";;" |
281 |
if use source; then |
282 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
283 |
# This is not meant to install all the source -- just the |
284 |
# C source you might find via find-function |
285 |
doins src/*.[ch] |
286 |
c="" |
287 |
fi |
288 |
|
289 |
sed 's/^X//' >"${SITEFILE}" <<-EOF |
290 |
X |
291 |
;;; ${PN}-${SLOT} site-lisp configuration |
292 |
X |
293 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
294 |
X ${c}(setq find-function-C-source-directory |
295 |
X ${c} "/usr/share/emacs/${FULL_VERSION}/src") |
296 |
X (let ((path (getenv "INFOPATH")) |
297 |
X (dir "/usr/share/info/${EMACS_SUFFIX}")) |
298 |
X (and path |
299 |
X ;; move Emacs Info dir to beginning of list |
300 |
X (setq Info-directory-list |
301 |
X (cons dir (delete dir (split-string path ":" t))))))) |
302 |
EOF |
303 |
elisp-site-file-install "${SITEFILE}" || die |
304 |
|
305 |
dodoc README BUGS || die "dodoc failed" |
306 |
} |
307 |
|
308 |
emacs-infodir-rebuild() { |
309 |
# Depending on the Portage version, the Info dir file is compressed |
310 |
# or removed. It is only rebuilt by Portage if our directory is in |
311 |
# INFOPATH, which is not guaranteed. So we rebuild it ourselves. |
312 |
|
313 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
314 |
[ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo |
315 |
einfo "Regenerating Info directory index in ${infodir} ..." |
316 |
rm -f "${ROOT}"${infodir}/dir{,.*} |
317 |
for f in "${ROOT}"${infodir}/*.info*; do |
318 |
[[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ |
319 |
&& install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null |
320 |
done |
321 |
rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty |
322 |
echo |
323 |
} |
324 |
|
325 |
pkg_postinst() { |
326 |
local f |
327 |
for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do |
328 |
[ -e "${f}" ] || touch "${f}" |
329 |
done |
330 |
|
331 |
elisp-site-regen |
332 |
emacs-infodir-rebuild |
333 |
eselect emacs update ifunset |
334 |
|
335 |
echo |
336 |
elog "You can set the version to be started by /usr/bin/emacs through" |
337 |
elog "the Emacs eselect module, which also redirects man and info pages." |
338 |
elog "You can therefore test emacs-cvs along with the stable release." |
339 |
elog "\"man emacs.eselect\" for details." |
340 |
} |
341 |
|
342 |
pkg_postrm() { |
343 |
elisp-site-regen |
344 |
emacs-infodir-rebuild |
345 |
eselect emacs update ifunset |
346 |
} |
347 |
|
348 |
|
349 |
|
350 |
1.1 app-editors/emacs-cvs/emacs-cvs-23.0.9999-r2.ebuild |
351 |
|
352 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.0.9999-r2.ebuild?rev=1.1&view=markup |
353 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.0.9999-r2.ebuild?rev=1.1&content-type=text/plain |
354 |
|
355 |
Index: emacs-cvs-23.0.9999-r2.ebuild |
356 |
=================================================================== |
357 |
# Copyright 1999-2009 Gentoo Foundation |
358 |
# Distributed under the terms of the GNU General Public License v2 |
359 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.0.9999-r2.ebuild,v 1.1 2009/06/21 17:00:33 ulm Exp $ |
360 |
|
361 |
EAPI=2 |
362 |
|
363 |
inherit autotools elisp-common eutils flag-o-matic |
364 |
|
365 |
if [ "${PV##*.}" = "9999" ]; then |
366 |
ECVS_AUTH="pserver" |
367 |
ECVS_SERVER="cvs.savannah.gnu.org:/sources/emacs" |
368 |
ECVS_MODULE="emacs" |
369 |
ECVS_BRANCH="EMACS_23_1_RC" |
370 |
ECVS_LOCALNAME="emacs-23.1" |
371 |
inherit cvs |
372 |
SRC_URI="" |
373 |
S="${WORKDIR}/${ECVS_LOCALNAME}" |
374 |
else |
375 |
SRC_URI="mirror://gentoo/emacs-${PV}.tar.gz |
376 |
ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-${PV}.tar.gz" |
377 |
# FULL_VERSION keeps the full version number, which is needed in |
378 |
# order to determine some path information correctly for copy/move |
379 |
# operations later on |
380 |
FULL_VERSION="${PV%%_*}" |
381 |
S="${WORKDIR}/emacs-${FULL_VERSION}" |
382 |
fi |
383 |
|
384 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
385 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
386 |
|
387 |
LICENSE="GPL-3 FDL-1.3 BSD as-is X11 W3C unicode" |
388 |
SLOT="23" |
389 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
390 |
IUSE="alsa dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm" |
391 |
RESTRICT="strip" |
392 |
|
393 |
RDEPEND="sys-libs/ncurses |
394 |
>=app-admin/eselect-emacs-1.2 |
395 |
net-libs/liblockfile |
396 |
hesiod? ( net-dns/hesiod ) |
397 |
kerberos? ( virtual/krb5 ) |
398 |
alsa? ( media-libs/alsa-lib ) |
399 |
gpm? ( sys-libs/gpm ) |
400 |
dbus? ( sys-apps/dbus ) |
401 |
X? ( |
402 |
x11-libs/libXmu |
403 |
x11-libs/libXt |
404 |
x11-misc/xbitmaps |
405 |
gif? ( media-libs/giflib ) |
406 |
jpeg? ( media-libs/jpeg ) |
407 |
png? ( media-libs/libpng ) |
408 |
svg? ( >=gnome-base/librsvg-2.0 ) |
409 |
tiff? ( media-libs/tiff ) |
410 |
xpm? ( x11-libs/libXpm ) |
411 |
xft? ( |
412 |
media-libs/fontconfig |
413 |
media-libs/freetype |
414 |
x11-libs/libXft |
415 |
m17n-lib? ( |
416 |
>=dev-libs/libotf-0.9.4 |
417 |
>=dev-libs/m17n-lib-1.5.1 |
418 |
) |
419 |
) |
420 |
gtk? ( x11-libs/gtk+:2 ) |
421 |
!gtk? ( |
422 |
Xaw3d? ( x11-libs/Xaw3d ) |
423 |
!Xaw3d? ( motif? ( x11-libs/openmotif ) ) |
424 |
) |
425 |
)" |
426 |
|
427 |
DEPEND="${RDEPEND} |
428 |
dev-util/pkgconfig |
429 |
gzip-el? ( app-arch/gzip )" |
430 |
|
431 |
RDEPEND="${RDEPEND} |
432 |
>=app-emacs/emacs-common-gentoo-1[X?]" |
433 |
|
434 |
EMACS_SUFFIX="emacs-${SLOT}" |
435 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
436 |
|
437 |
src_prepare() { |
438 |
if [ "${PV##*.}" = "9999" ]; then |
439 |
FULL_VERSION=$(grep 'defconst[ ]*emacs-version' lisp/version.el \ |
440 |
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/') |
441 |
[ "${FULL_VERSION}" ] || die "Cannot determine current Emacs version" |
442 |
echo |
443 |
einfo "Emacs CVS branch: ${ECVS_BRANCH}" |
444 |
einfo "Emacs version number: ${FULL_VERSION}" |
445 |
[ "${FULL_VERSION%.*}" = ${PV%.*} ] \ |
446 |
|| die "Upstream version number changed to ${FULL_VERSION}" |
447 |
echo |
448 |
fi |
449 |
|
450 |
sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \ |
451 |
-e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \ |
452 |
"${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings" |
453 |
|
454 |
if ! use alsa; then |
455 |
# ALSA is detected even if not requested by its USE flag. |
456 |
# Suppress it by supplying pkg-config with a wrong library name. |
457 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \ |
458 |
|| die "unable to sed configure.in" |
459 |
fi |
460 |
if ! use gzip-el; then |
461 |
# Emacs' build system automatically detects the gzip binary and |
462 |
# compresses el files. We don't want that so confuse it with a |
463 |
# wrong binary name |
464 |
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
465 |
|| die "unable to sed configure.in" |
466 |
fi |
467 |
|
468 |
eautoreconf |
469 |
} |
470 |
|
471 |
src_configure() { |
472 |
ALLOWED_FLAGS="" |
473 |
strip-flags |
474 |
#unset LDFLAGS |
475 |
if use sh; then |
476 |
replace-flags -O[1-9] -O0 #262359 |
477 |
else |
478 |
replace-flags -O[3-9] -O2 |
479 |
fi |
480 |
|
481 |
local myconf |
482 |
|
483 |
if use alsa && ! use sound; then |
484 |
echo |
485 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
486 |
einfo "so sound is switched on anyway." |
487 |
echo |
488 |
myconf="${myconf} --with-sound" |
489 |
else |
490 |
myconf="${myconf} $(use_with sound)" |
491 |
fi |
492 |
|
493 |
if use X; then |
494 |
myconf="${myconf} --with-x" |
495 |
myconf="${myconf} $(use_with toolkit-scroll-bars)" |
496 |
myconf="${myconf} $(use_with gif) $(use_with jpeg)" |
497 |
myconf="${myconf} $(use_with png) $(use_with svg rsvg)" |
498 |
myconf="${myconf} $(use_with tiff) $(use_with xpm)" |
499 |
myconf="${myconf} $(use_with xft)" |
500 |
|
501 |
if use xft; then |
502 |
myconf="${myconf} $(use_with m17n-lib libotf)" |
503 |
myconf="${myconf} $(use_with m17n-lib m17n-flt)" |
504 |
else |
505 |
myconf="${myconf} --without-libotf --without-m17n-flt" |
506 |
use m17n-lib && ewarn \ |
507 |
"USE flag \"m17n-lib\" has no effect because xft is not set." |
508 |
fi |
509 |
|
510 |
# GTK+ is the default toolkit if USE=gtk is chosen with other |
511 |
# possibilities. Emacs upstream thinks this should be standard |
512 |
# policy on all distributions |
513 |
if use gtk; then |
514 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
515 |
myconf="${myconf} --with-x-toolkit=gtk" |
516 |
elif use Xaw3d; then |
517 |
einfo "Configuring to build with Xaw3d (Athena/Lucid) toolkit" |
518 |
myconf="${myconf} --with-x-toolkit=athena" |
519 |
elif use motif; then |
520 |
einfo "Configuring to build with Motif toolkit" |
521 |
myconf="${myconf} --with-x-toolkit=motif" |
522 |
else |
523 |
einfo "Configuring to build with no toolkit" |
524 |
myconf="${myconf} --with-x-toolkit=no" |
525 |
fi |
526 |
|
527 |
local f tk= |
528 |
for f in gtk Xaw3d motif; do |
529 |
use ${f} || continue |
530 |
[ "${tk}" ] \ |
531 |
&& ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")" |
532 |
tk="${tk}${tk:+ }${f}" |
533 |
done |
534 |
else |
535 |
myconf="${myconf} --without-x" |
536 |
fi |
537 |
|
538 |
myconf="${myconf} $(use_with hesiod)" |
539 |
myconf="${myconf} $(use_with kerberos) $(use_with kerberos kerberos5)" |
540 |
myconf="${myconf} $(use_with gpm) $(use_with dbus)" |
541 |
|
542 |
econf \ |
543 |
--program-suffix=-${EMACS_SUFFIX} \ |
544 |
--infodir=/usr/share/info/${EMACS_SUFFIX} \ |
545 |
${myconf} || die "econf emacs failed" |
546 |
} |
547 |
|
548 |
src_compile() { |
549 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
550 |
if [ "${PV##*.}" = "9999" ]; then |
551 |
emake CC="$(tc-getCC)" bootstrap || die "make bootstrap failed" |
552 |
# cleanup, otherwise emacs will be dumped again in src_install |
553 |
(cd src; emake versionclean) |
554 |
fi |
555 |
emake CC="$(tc-getCC)" || die "emake failed" |
556 |
} |
557 |
|
558 |
src_install () { |
559 |
local i m |
560 |
|
561 |
emake install DESTDIR="${D}" || die "make install failed" |
562 |
|
563 |
rm "${D}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \ |
564 |
|| die "removing duplicate emacs executable failed" |
565 |
mv "${D}"/usr/bin/emacs-${EMACS_SUFFIX} "${D}"/usr/bin/${EMACS_SUFFIX} \ |
566 |
|| die "moving Emacs executable failed" |
567 |
|
568 |
# move info documentation to the correct place |
569 |
for i in "${D}"/usr/share/info/${EMACS_SUFFIX}/*; do |
570 |
mv "${i}" "${i}.info" || die "mv info failed" |
571 |
done |
572 |
|
573 |
# move man pages to the correct place |
574 |
for m in "${D}"/usr/share/man/man1/* ; do |
575 |
mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed" |
576 |
done |
577 |
|
578 |
# avoid collision between slots, see bug #169033 e.g. |
579 |
rm "${D}"/usr/share/emacs/site-lisp/subdirs.el |
580 |
rm -rf "${D}"/usr/share/{applications,icons} |
581 |
rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores |
582 |
keepdir /var/lib/games/emacs |
583 |
|
584 |
local c=";;" |
585 |
if use source; then |
586 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
587 |
# This is not meant to install all the source -- just the |
588 |
# C source you might find via find-function |
589 |
doins src/*.[ch] |
590 |
c="" |
591 |
fi |
592 |
|
593 |
sed 's/^X//' >"${SITEFILE}" <<-EOF |
594 |
X |
595 |
;;; ${PN}-${SLOT} site-lisp configuration |
596 |
X |
597 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
598 |
X ${c}(setq find-function-C-source-directory |
599 |
X ${c} "/usr/share/emacs/${FULL_VERSION}/src") |
600 |
X (let ((path (getenv "INFOPATH")) |
601 |
X (dir "/usr/share/info/${EMACS_SUFFIX}")) |
602 |
X (and path |
603 |
X ;; move Emacs Info dir to beginning of list |
604 |
X (setq Info-directory-list |
605 |
X (cons dir (delete dir (split-string path ":" t))))))) |
606 |
EOF |
607 |
elisp-site-file-install "${SITEFILE}" || die |
608 |
|
609 |
dodoc README BUGS || die "dodoc failed" |
610 |
} |
611 |
|
612 |
emacs-infodir-rebuild() { |
613 |
# Depending on the Portage version, the Info dir file is compressed |
614 |
# or removed. It is only rebuilt by Portage if our directory is in |
615 |
# INFOPATH, which is not guaranteed. So we rebuild it ourselves. |
616 |
|
617 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
618 |
[ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo |
619 |
einfo "Regenerating Info directory index in ${infodir} ..." |
620 |
rm -f "${ROOT}"${infodir}/dir{,.*} |
621 |
for f in "${ROOT}"${infodir}/*.info*; do |
622 |
[[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ |
623 |
&& install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null |
624 |
done |
625 |
rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty |
626 |
echo |
627 |
} |
628 |
|
629 |
pkg_postinst() { |
630 |
local f |
631 |
for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do |
632 |
[ -e "${f}" ] || touch "${f}" |
633 |
done |
634 |
|
635 |
elisp-site-regen |
636 |
emacs-infodir-rebuild |
637 |
eselect emacs update ifunset |
638 |
|
639 |
echo |
640 |
elog "You can set the version to be started by /usr/bin/emacs through" |
641 |
elog "the Emacs eselect module, which also redirects man and info pages." |
642 |
elog "You can therefore test emacs-cvs along with the stable release." |
643 |
elog "\"man emacs.eselect\" for details." |
644 |
} |
645 |
|
646 |
pkg_postrm() { |
647 |
elisp-site-regen |
648 |
emacs-infodir-rebuild |
649 |
eselect emacs update ifunset |
650 |
} |