1 |
ulm 14/10/02 07:08:50 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-vcs-24.4.50_pre20140929.ebuild |
5 |
emacs-vcs-24.3.94.ebuild |
6 |
Log: |
7 |
New pretest version. New snapshot of trunk, last revision before the renaming from 24.4.50 to 25.0.50. |
8 |
|
9 |
(Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!) |
10 |
|
11 |
Revision Changes Path |
12 |
1.166 app-editors/emacs-vcs/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.166&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.166&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?r1=1.165&r2=1.166 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v |
21 |
retrieving revision 1.165 |
22 |
retrieving revision 1.166 |
23 |
diff -u -r1.165 -r1.166 |
24 |
--- ChangeLog 1 Sep 2014 16:52:32 -0000 1.165 |
25 |
+++ ChangeLog 2 Oct 2014 07:08:50 -0000 1.166 |
26 |
@@ -1,6 +1,14 @@ |
27 |
# ChangeLog for app-editors/emacs-vcs |
28 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.165 2014/09/01 16:52:32 ulm Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.166 2014/10/02 07:08:50 ulm Exp $ |
31 |
+ |
32 |
+*emacs-vcs-24.4.50_pre20140929 (02 Oct 2014) |
33 |
+*emacs-vcs-24.3.94 (02 Oct 2014) |
34 |
+ |
35 |
+ 02 Oct 2014; Ulrich Müller <ulm@g.o> +emacs-vcs-24.3.94.ebuild, |
36 |
+ +emacs-vcs-24.4.50_pre20140929.ebuild: |
37 |
+ New pretest version. New snapshot of trunk, last revision before the renaming |
38 |
+ from 24.4.50 to 25.0.50. |
39 |
|
40 |
*emacs-vcs-24.4.50_pre20140831 (01 Sep 2014) |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
1.1 app-editors/emacs-vcs/emacs-vcs-24.4.50_pre20140929.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.4.50_pre20140929.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.4.50_pre20140929.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: emacs-vcs-24.4.50_pre20140929.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2014 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.4.50_pre20140929.ebuild,v 1.1 2014/10/02 07:08:50 ulm Exp $ |
55 |
|
56 |
EAPI=5 |
57 |
|
58 |
inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo |
59 |
|
60 |
if [[ ${PV##*.} = 9999 ]]; then |
61 |
EBZR_PROJECT="emacs" |
62 |
EBZR_BRANCH="trunk" |
63 |
EBZR_REPO_URI="bzr://bzr.savannah.gnu.org/emacs/${EBZR_BRANCH}/" |
64 |
# "Nosmart" is much faster for initial branching. |
65 |
EBZR_INITIAL_URI="nosmart+${EBZR_REPO_URI}" |
66 |
EBZR_UNPACK_DIR="${WORKDIR}/emacs" |
67 |
EBZR_WORKDIR_CHECKOUT="t" #434746 |
68 |
inherit bzr |
69 |
S="${EBZR_UNPACK_DIR}" |
70 |
else |
71 |
SRC_URI="http://dev.gentoo.org/~ulm/distfiles/emacs-${PV}.tar.xz |
72 |
mirror://gnu-alpha/emacs/pretest/emacs-${PV}.tar.xz" |
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 |
S="${WORKDIR}/emacs" |
79 |
fi |
80 |
|
81 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
82 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
83 |
|
84 |
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
85 |
SLOT="24" |
86 |
IUSE="acl alsa aqua athena dbus games gconf gfile gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib" |
87 |
REQUIRED_USE="?? ( aqua X )" |
88 |
|
89 |
RDEPEND="sys-libs/ncurses |
90 |
>=app-admin/eselect-emacs-1.16 |
91 |
>=app-emacs/emacs-common-gentoo-1.4-r1[games?,X?] |
92 |
net-libs/liblockfile |
93 |
acl? ( virtual/acl ) |
94 |
alsa? ( media-libs/alsa-lib ) |
95 |
dbus? ( sys-apps/dbus ) |
96 |
gfile? ( >=dev-libs/glib-2.28.6 ) |
97 |
gnutls? ( net-libs/gnutls ) |
98 |
gpm? ( sys-libs/gpm ) |
99 |
hesiod? ( net-dns/hesiod ) |
100 |
kerberos? ( virtual/krb5 ) |
101 |
libxml2? ( >=dev-libs/libxml2-2.2.0 ) |
102 |
selinux? ( sys-libs/libselinux ) |
103 |
zlib? ( sys-libs/zlib ) |
104 |
X? ( |
105 |
x11-libs/libXmu |
106 |
x11-libs/libXt |
107 |
x11-misc/xbitmaps |
108 |
gconf? ( >=gnome-base/gconf-2.26.2 ) |
109 |
gsettings? ( >=dev-libs/glib-2.28.6 ) |
110 |
gif? ( media-libs/giflib ) |
111 |
jpeg? ( virtual/jpeg:0= ) |
112 |
png? ( >=media-libs/libpng-1.4:0= ) |
113 |
svg? ( >=gnome-base/librsvg-2.0 ) |
114 |
tiff? ( media-libs/tiff ) |
115 |
xpm? ( x11-libs/libXpm ) |
116 |
imagemagick? ( >=media-gfx/imagemagick-6.6.2 ) |
117 |
xft? ( |
118 |
media-libs/fontconfig |
119 |
media-libs/freetype |
120 |
x11-libs/libXft |
121 |
m17n-lib? ( |
122 |
>=dev-libs/libotf-0.9.4 |
123 |
>=dev-libs/m17n-lib-1.5.1 |
124 |
) |
125 |
) |
126 |
gtk? ( |
127 |
gtk3? ( x11-libs/gtk+:3 ) |
128 |
!gtk3? ( x11-libs/gtk+:2 ) |
129 |
) |
130 |
!gtk? ( |
131 |
motif? ( >=x11-libs/motif-2.3:0 ) |
132 |
!motif? ( |
133 |
Xaw3d? ( x11-libs/libXaw3d ) |
134 |
!Xaw3d? ( athena? ( x11-libs/libXaw ) ) |
135 |
) |
136 |
) |
137 |
)" |
138 |
|
139 |
DEPEND="${RDEPEND} |
140 |
virtual/pkgconfig |
141 |
gzip-el? ( app-arch/gzip ) |
142 |
pax_kernel? ( |
143 |
sys-apps/attr |
144 |
sys-apps/paxctl |
145 |
)" |
146 |
|
147 |
if [[ ${PV##*.} = 9999 ]]; then |
148 |
DEPEND="${DEPEND} |
149 |
sys-apps/texinfo" |
150 |
fi |
151 |
|
152 |
EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
153 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
154 |
|
155 |
src_prepare() { |
156 |
if [[ ${PV##*.} = 9999 ]]; then |
157 |
FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \ |
158 |
configure.ac) |
159 |
[[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version" |
160 |
einfo "Emacs branch: ${EBZR_BRANCH}" |
161 |
einfo "Revision: ${EBZR_REVISION:-${EBZR_REVNO}}" |
162 |
einfo "Emacs version number: ${FULL_VERSION}" |
163 |
[[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \ |
164 |
|| die "Upstream version number changed to ${FULL_VERSION}" |
165 |
fi |
166 |
|
167 |
epatch_user |
168 |
|
169 |
# Fix filename reference in redirected man page |
170 |
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \ |
171 |
|| die "unable to sed ctags.1" |
172 |
|
173 |
AT_M4DIR=m4 eautoreconf |
174 |
} |
175 |
|
176 |
src_configure() { |
177 |
strip-flags |
178 |
|
179 |
if use sh; then |
180 |
replace-flags "-O[1-9]" -O0 #262359 |
181 |
elif use ia64; then |
182 |
replace-flags "-O[2-9]" -O1 #325373 |
183 |
else |
184 |
replace-flags "-O[3-9]" -O2 |
185 |
fi |
186 |
|
187 |
local myconf |
188 |
|
189 |
if use alsa; then |
190 |
use sound || ewarn \ |
191 |
"USE flag \"alsa\" overrides \"-sound\"; enabling sound support." |
192 |
myconf+=" --with-sound=alsa" |
193 |
else |
194 |
myconf+=" --with-sound=$(usex sound oss)" |
195 |
fi |
196 |
|
197 |
if use X; then |
198 |
myconf+=" --with-x --without-ns" |
199 |
myconf+=" $(use_with gconf)" |
200 |
myconf+=" $(use_with gsettings)" |
201 |
myconf+=" $(use_with toolkit-scroll-bars)" |
202 |
myconf+=" $(use_with gif)" |
203 |
myconf+=" $(use_with jpeg)" |
204 |
myconf+=" $(use_with png)" |
205 |
myconf+=" $(use_with svg rsvg)" |
206 |
myconf+=" $(use_with tiff)" |
207 |
myconf+=" $(use_with xpm)" |
208 |
myconf+=" $(use_with imagemagick)" |
209 |
|
210 |
if use xft; then |
211 |
myconf+=" --with-xft" |
212 |
myconf+=" $(use_with m17n-lib libotf)" |
213 |
myconf+=" $(use_with m17n-lib m17n-flt)" |
214 |
else |
215 |
myconf+=" --without-xft" |
216 |
myconf+=" --without-libotf --without-m17n-flt" |
217 |
use m17n-lib && ewarn \ |
218 |
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
219 |
fi |
220 |
|
221 |
local f |
222 |
if use gtk; then |
223 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
224 |
myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)" |
225 |
for f in motif Xaw3d athena; do |
226 |
use ${f} && ewarn \ |
227 |
"USE flag \"${f}\" has no effect if \"gtk\" is set." |
228 |
done |
229 |
elif use motif; then |
230 |
einfo "Configuring to build with Motif toolkit" |
231 |
myconf+=" --with-x-toolkit=motif" |
232 |
for f in Xaw3d athena; do |
233 |
use ${f} && ewarn \ |
234 |
"USE flag \"${f}\" has no effect if \"motif\" is set." |
235 |
done |
236 |
elif use athena || use Xaw3d; then |
237 |
einfo "Configuring to build with Athena/Lucid toolkit" |
238 |
myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
239 |
else |
240 |
einfo "Configuring to build with no toolkit" |
241 |
myconf+=" --with-x-toolkit=no" |
242 |
fi |
243 |
elif use aqua; then |
244 |
einfo "Configuring to build with Nextstep (Cocoa) support" |
245 |
myconf+=" --with-ns --disable-ns-self-contained" |
246 |
myconf+=" --without-x" |
247 |
else |
248 |
myconf+=" --without-x --without-ns" |
249 |
fi |
250 |
|
251 |
# Save version information in the Emacs binary. It will be available |
252 |
# in variable "system-configuration-options". |
253 |
myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}" |
254 |
if [[ ${PV##*.} = 9999 ]]; then |
255 |
myconf+=" EBZR_BRANCH=${EBZR_BRANCH} EBZR_REVNO=${EBZR_REVNO}" |
256 |
fi |
257 |
|
258 |
econf \ |
259 |
--program-suffix="-${EMACS_SUFFIX}" \ |
260 |
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
261 |
--localstatedir="${EPREFIX}"/var \ |
262 |
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
263 |
--with-gameuser="${GAMES_USER_DED:-games}" \ |
264 |
--without-compress-install \ |
265 |
--with-file-notification=$(usev gfile || usev inotify || echo no) \ |
266 |
$(use_enable acl) \ |
267 |
$(use_with dbus) \ |
268 |
$(use_with gnutls) \ |
269 |
$(use_with gpm) \ |
270 |
$(use_with hesiod) \ |
271 |
$(use_with kerberos) $(use_with kerberos kerberos5) \ |
272 |
$(use_with libxml2 xml2) \ |
273 |
$(use_with selinux) \ |
274 |
$(use_with wide-int) \ |
275 |
$(use_with zlib) \ |
276 |
${myconf} |
277 |
} |
278 |
|
279 |
src_compile() { |
280 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
281 |
emake |
282 |
} |
283 |
|
284 |
src_install () { |
285 |
emake DESTDIR="${D}" NO_BIN_LINK=t install |
286 |
|
287 |
mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \ |
288 |
|| die "moving emacs executable failed" |
289 |
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \ |
290 |
|| die "moving emacs man page failed" |
291 |
|
292 |
# move info dir to avoid collisions with the dir file generated by portage |
293 |
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
294 |
|| die "moving info dir failed" |
295 |
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
296 |
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
297 |
|
298 |
# avoid collision between slots, see bug #169033 e.g. |
299 |
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
300 |
rm -rf "${ED}"/usr/share/{applications,icons} |
301 |
rm -rf "${ED}"/var |
302 |
|
303 |
# remove unused <version>/site-lisp dir |
304 |
rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
305 |
|
306 |
if use gzip-el; then |
307 |
# compress .el files when a corresponding .elc exists |
308 |
find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ |
309 |
-name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n |
310 |
assert "gzip .el failed" |
311 |
fi |
312 |
|
313 |
local cdir |
314 |
if use source; then |
315 |
cdir="/usr/share/emacs/${FULL_VERSION}/src" |
316 |
insinto "${cdir}" |
317 |
# This is not meant to install all the source -- just the |
318 |
# C source you might find via find-function |
319 |
doins src/*.{c,h,m} |
320 |
elif has installsources ${FEATURES}; then |
321 |
cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" |
322 |
fi |
323 |
|
324 |
sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF |
325 |
X |
326 |
;;; ${PN}-${SLOT} site-lisp configuration |
327 |
X |
328 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
329 |
Y (setq find-function-C-source-directory |
330 |
Y "${EPREFIX}${cdir}") |
331 |
X (let ((path (getenv "INFOPATH")) |
332 |
X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
333 |
X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
334 |
X (and path |
335 |
X ;; move Emacs Info dir before anything else in /usr/share/info |
336 |
X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
337 |
X (while (and (cdr q) (not (string-match re (cadr q)))) |
338 |
X (setq q (cdr q))) |
339 |
X (setcdr q (cons dir (delete dir (cdr q)))) |
340 |
X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
341 |
EOF |
342 |
elisp-site-file-install "${T}/${SITEFILE}" || die |
343 |
|
344 |
dodoc README BUGS |
345 |
|
346 |
if use aqua; then |
347 |
dodir /Applications/Gentoo |
348 |
rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app |
349 |
mv nextstep/Emacs.app \ |
350 |
"${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die |
351 |
fi |
352 |
|
353 |
DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs |
354 |
through the Emacs eselect module, which also redirects man and info |
355 |
pages. Therefore, several Emacs versions can be installed at the |
356 |
same time. \"man emacs.eselect\" for details. |
357 |
\\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is |
358 |
strongly recommended that you use app-admin/emacs-updater to rebuild |
359 |
all byte-compiled elisp files of the installed Emacs packages." |
360 |
use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs. |
361 |
Installing media-fonts/font-adobe-{75,100}dpi on the X server's |
362 |
machine would satisfy basic Emacs requirements under X11. |
363 |
See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs |
364 |
for how to enable anti-aliased fonts." |
365 |
use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in |
366 |
\"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink |
367 |
it into /Applications by yourself." |
368 |
readme.gentoo_create_doc |
369 |
} |
370 |
|
371 |
pkg_preinst() { |
372 |
# move Info dir file to correct name |
373 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
374 |
if [[ -f ${ED}${infodir}/dir.orig ]]; then |
375 |
mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
376 |
elif [[ -d "${ED}"${infodir} ]]; then |
377 |
# this should not happen in EAPI 4 |
378 |
ewarn "Regenerating Info directory index in ${infodir} ..." |
379 |
rm -f "${ED}"${infodir}/dir{,.*} |
380 |
for f in "${ED}"${infodir}/*; do |
381 |
if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
382 |
install-info --info-dir="${ED}"${infodir} "${f}" \ |
383 |
|| die "install-info failed" |
384 |
fi |
385 |
done |
386 |
fi |
387 |
} |
388 |
|
389 |
pkg_postinst() { |
390 |
elisp-site-regen |
391 |
|
392 |
local pvr |
393 |
for pvr in ${REPLACING_VERSIONS}; do |
394 |
[[ ${pvr%%[-_]*} = 24.[12] ]] && FORCE_PRINT_ELOG=1 |
395 |
done |
396 |
readme.gentoo_print_elog |
397 |
|
398 |
if use livecd; then |
399 |
# force an update of the emacs symlink for the livecd/dvd, |
400 |
# because some microemacs packages set it with USE=livecd |
401 |
eselect emacs update |
402 |
elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then |
403 |
# refresh symlinks in case any installed files have changed |
404 |
eselect emacs set ${EMACS_SUFFIX} |
405 |
else |
406 |
eselect emacs update ifunset |
407 |
fi |
408 |
} |
409 |
|
410 |
pkg_postrm() { |
411 |
elisp-site-regen |
412 |
eselect emacs update ifunset |
413 |
} |
414 |
|
415 |
|
416 |
|
417 |
1.1 app-editors/emacs-vcs/emacs-vcs-24.3.94.ebuild |
418 |
|
419 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.3.94.ebuild?rev=1.1&view=markup |
420 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.3.94.ebuild?rev=1.1&content-type=text/plain |
421 |
|
422 |
Index: emacs-vcs-24.3.94.ebuild |
423 |
=================================================================== |
424 |
# Copyright 1999-2014 Gentoo Foundation |
425 |
# Distributed under the terms of the GNU General Public License v2 |
426 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.3.94.ebuild,v 1.1 2014/10/02 07:08:50 ulm Exp $ |
427 |
|
428 |
EAPI=5 |
429 |
|
430 |
inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo |
431 |
|
432 |
if [[ ${PV##*.} = 9999 ]]; then |
433 |
EBZR_PROJECT="emacs" |
434 |
EBZR_BRANCH="emacs-24" |
435 |
EBZR_REPO_URI="bzr://bzr.savannah.gnu.org/emacs/${EBZR_BRANCH}/" |
436 |
# "Nosmart" is much faster for initial branching. |
437 |
EBZR_INITIAL_URI="nosmart+${EBZR_REPO_URI}" |
438 |
EBZR_UNPACK_DIR="${WORKDIR}/emacs" |
439 |
EBZR_WORKDIR_CHECKOUT="t" #434746 |
440 |
inherit bzr |
441 |
S="${EBZR_UNPACK_DIR}" |
442 |
else |
443 |
SRC_URI="http://dev.gentoo.org/~ulm/distfiles/emacs-${PV}.tar.xz |
444 |
mirror://gnu-alpha/emacs/pretest/emacs-${PV}.tar.xz" |
445 |
# FULL_VERSION keeps the full version number, which is needed in |
446 |
# order to determine some path information correctly for copy/move |
447 |
# operations later on |
448 |
FULL_VERSION="${PV%%_*}" |
449 |
S="${WORKDIR}/emacs-${FULL_VERSION}" |
450 |
fi |
451 |
|
452 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
453 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
454 |
|
455 |
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
456 |
SLOT="24" |
457 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
458 |
IUSE="acl alsa aqua athena dbus games gconf gfile gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib" |
459 |
REQUIRED_USE="?? ( aqua X )" |
460 |
|
461 |
RDEPEND="sys-libs/ncurses |
462 |
>=app-admin/eselect-emacs-1.16 |
463 |
>=app-emacs/emacs-common-gentoo-1.4-r1[games?,X?] |
464 |
net-libs/liblockfile |
465 |
acl? ( virtual/acl ) |
466 |
alsa? ( media-libs/alsa-lib ) |
467 |
dbus? ( sys-apps/dbus ) |
468 |
gfile? ( >=dev-libs/glib-2.28.6 ) |
469 |
gnutls? ( net-libs/gnutls ) |
470 |
gpm? ( sys-libs/gpm ) |
471 |
hesiod? ( net-dns/hesiod ) |
472 |
kerberos? ( virtual/krb5 ) |
473 |
libxml2? ( >=dev-libs/libxml2-2.2.0 ) |
474 |
selinux? ( sys-libs/libselinux ) |
475 |
zlib? ( sys-libs/zlib ) |
476 |
X? ( |
477 |
x11-libs/libXmu |
478 |
x11-libs/libXt |
479 |
x11-misc/xbitmaps |
480 |
gconf? ( >=gnome-base/gconf-2.26.2 ) |
481 |
gsettings? ( >=dev-libs/glib-2.28.6 ) |
482 |
gif? ( media-libs/giflib ) |
483 |
jpeg? ( virtual/jpeg:0= ) |
484 |
png? ( >=media-libs/libpng-1.4:0= ) |
485 |
svg? ( >=gnome-base/librsvg-2.0 ) |
486 |
tiff? ( media-libs/tiff ) |
487 |
xpm? ( x11-libs/libXpm ) |
488 |
imagemagick? ( >=media-gfx/imagemagick-6.6.2 ) |
489 |
xft? ( |
490 |
media-libs/fontconfig |
491 |
media-libs/freetype |
492 |
x11-libs/libXft |
493 |
m17n-lib? ( |
494 |
>=dev-libs/libotf-0.9.4 |
495 |
>=dev-libs/m17n-lib-1.5.1 |
496 |
) |
497 |
) |
498 |
gtk? ( |
499 |
gtk3? ( x11-libs/gtk+:3 ) |
500 |
!gtk3? ( x11-libs/gtk+:2 ) |
501 |
) |
502 |
!gtk? ( |
503 |
motif? ( >=x11-libs/motif-2.3:0 ) |
504 |
!motif? ( |
505 |
Xaw3d? ( x11-libs/libXaw3d ) |
506 |
!Xaw3d? ( athena? ( x11-libs/libXaw ) ) |
507 |
) |
508 |
) |
509 |
)" |
510 |
|
511 |
DEPEND="${RDEPEND} |
512 |
virtual/pkgconfig |
513 |
gzip-el? ( app-arch/gzip ) |
514 |
pax_kernel? ( |
515 |
sys-apps/attr |
516 |
sys-apps/paxctl |
517 |
)" |
518 |
|
519 |
if [[ ${PV##*.} = 9999 ]]; then |
520 |
DEPEND="${DEPEND} |
521 |
sys-apps/texinfo" |
522 |
fi |
523 |
|
524 |
EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
525 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
526 |
|
527 |
src_prepare() { |
528 |
if [[ ${PV##*.} = 9999 ]]; then |
529 |
FULL_VERSION=$(sed -n 's/^AC_INIT(emacs,[ \t]*\([^ \t,)]*\).*/\1/p' \ |
530 |
configure.ac) |
531 |
[[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version" |
532 |
einfo "Emacs branch: ${EBZR_BRANCH}" |
533 |
einfo "Revision: ${EBZR_REVISION:-${EBZR_REVNO}}" |
534 |
einfo "Emacs version number: ${FULL_VERSION}" |
535 |
[[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \ |
536 |
|| die "Upstream version number changed to ${FULL_VERSION}" |
537 |
fi |
538 |
|
539 |
epatch_user |
540 |
|
541 |
# Fix filename reference in redirected man page |
542 |
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \ |
543 |
|| die "unable to sed ctags.1" |
544 |
|
545 |
AT_M4DIR=m4 eautoreconf |
546 |
} |
547 |
|
548 |
src_configure() { |
549 |
strip-flags |
550 |
|
551 |
if use sh; then |
552 |
replace-flags "-O[1-9]" -O0 #262359 |
553 |
elif use ia64; then |
554 |
replace-flags "-O[2-9]" -O1 #325373 |
555 |
else |
556 |
replace-flags "-O[3-9]" -O2 |
557 |
fi |
558 |
|
559 |
local myconf |
560 |
|
561 |
if use alsa; then |
562 |
use sound || ewarn \ |
563 |
"USE flag \"alsa\" overrides \"-sound\"; enabling sound support." |
564 |
myconf+=" --with-sound=alsa" |
565 |
else |
566 |
myconf+=" --with-sound=$(usex sound oss)" |
567 |
fi |
568 |
|
569 |
if use X; then |
570 |
myconf+=" --with-x --without-ns" |
571 |
myconf+=" $(use_with gconf)" |
572 |
myconf+=" $(use_with gsettings)" |
573 |
myconf+=" $(use_with toolkit-scroll-bars)" |
574 |
myconf+=" $(use_with gif)" |
575 |
myconf+=" $(use_with jpeg)" |
576 |
myconf+=" $(use_with png)" |
577 |
myconf+=" $(use_with svg rsvg)" |
578 |
myconf+=" $(use_with tiff)" |
579 |
myconf+=" $(use_with xpm)" |
580 |
myconf+=" $(use_with imagemagick)" |
581 |
|
582 |
if use xft; then |
583 |
myconf+=" --with-xft" |
584 |
myconf+=" $(use_with m17n-lib libotf)" |
585 |
myconf+=" $(use_with m17n-lib m17n-flt)" |
586 |
else |
587 |
myconf+=" --without-xft" |
588 |
myconf+=" --without-libotf --without-m17n-flt" |
589 |
use m17n-lib && ewarn \ |
590 |
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
591 |
fi |
592 |
|
593 |
local f |
594 |
if use gtk; then |
595 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
596 |
myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)" |
597 |
for f in motif Xaw3d athena; do |
598 |
use ${f} && ewarn \ |
599 |
"USE flag \"${f}\" has no effect if \"gtk\" is set." |
600 |
done |
601 |
elif use motif; then |
602 |
einfo "Configuring to build with Motif toolkit" |
603 |
myconf+=" --with-x-toolkit=motif" |
604 |
for f in Xaw3d athena; do |
605 |
use ${f} && ewarn \ |
606 |
"USE flag \"${f}\" has no effect if \"motif\" is set." |
607 |
done |
608 |
elif use athena || use Xaw3d; then |
609 |
einfo "Configuring to build with Athena/Lucid toolkit" |
610 |
myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
611 |
else |
612 |
einfo "Configuring to build with no toolkit" |
613 |
myconf+=" --with-x-toolkit=no" |
614 |
fi |
615 |
elif use aqua; then |
616 |
einfo "Configuring to build with Nextstep (Cocoa) support" |
617 |
myconf+=" --with-ns --disable-ns-self-contained" |
618 |
myconf+=" --without-x" |
619 |
else |
620 |
myconf+=" --without-x --without-ns" |
621 |
fi |
622 |
|
623 |
# Save version information in the Emacs binary. It will be available |
624 |
# in variable "system-configuration-options". |
625 |
myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}" |
626 |
if [[ ${PV##*.} = 9999 ]]; then |
627 |
myconf+=" EBZR_BRANCH=${EBZR_BRANCH} EBZR_REVNO=${EBZR_REVNO}" |
628 |
fi |
629 |
|
630 |
econf \ |
631 |
--program-suffix="-${EMACS_SUFFIX}" \ |
632 |
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
633 |
--localstatedir="${EPREFIX}"/var \ |
634 |
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
635 |
--with-gameuser="${GAMES_USER_DED:-games}" \ |
636 |
--without-compress-install \ |
637 |
--with-file-notification=$(usev gfile || usev inotify || echo no) \ |
638 |
$(use_enable acl) \ |
639 |
$(use_with dbus) \ |
640 |
$(use_with gnutls) \ |
641 |
$(use_with gpm) \ |
642 |
$(use_with hesiod) \ |
643 |
$(use_with kerberos) $(use_with kerberos kerberos5) \ |
644 |
$(use_with libxml2 xml2) \ |
645 |
$(use_with selinux) \ |
646 |
$(use_with wide-int) \ |
647 |
$(use_with zlib) \ |
648 |
${myconf} |
649 |
} |
650 |
|
651 |
src_compile() { |
652 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
653 |
emake |
654 |
} |
655 |
|
656 |
src_install () { |
657 |
emake DESTDIR="${D}" NO_BIN_LINK=t install |
658 |
|
659 |
mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \ |
660 |
|| die "moving emacs executable failed" |
661 |
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \ |
662 |
|| die "moving emacs man page failed" |
663 |
|
664 |
# move info dir to avoid collisions with the dir file generated by portage |
665 |
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
666 |
|| die "moving info dir failed" |
667 |
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
668 |
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
669 |
|
670 |
# avoid collision between slots, see bug #169033 e.g. |
671 |
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
672 |
rm -rf "${ED}"/usr/share/{applications,icons} |
673 |
rm -rf "${ED}"/var |
674 |
|
675 |
# remove unused <version>/site-lisp dir |
676 |
rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
677 |
|
678 |
if use gzip-el; then |
679 |
# compress .el files when a corresponding .elc exists |
680 |
find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ |
681 |
-name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n |
682 |
assert "gzip .el failed" |
683 |
fi |
684 |
|
685 |
local cdir |
686 |
if use source; then |
687 |
cdir="/usr/share/emacs/${FULL_VERSION}/src" |
688 |
insinto "${cdir}" |
689 |
# This is not meant to install all the source -- just the |
690 |
# C source you might find via find-function |
691 |
doins src/*.{c,h,m} |
692 |
elif has installsources ${FEATURES}; then |
693 |
cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" |
694 |
fi |
695 |
|
696 |
sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF |
697 |
X |
698 |
;;; ${PN}-${SLOT} site-lisp configuration |
699 |
X |
700 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
701 |
Y (setq find-function-C-source-directory |
702 |
Y "${EPREFIX}${cdir}") |
703 |
X (let ((path (getenv "INFOPATH")) |
704 |
X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
705 |
X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
706 |
X (and path |
707 |
X ;; move Emacs Info dir before anything else in /usr/share/info |
708 |
X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
709 |
X (while (and (cdr q) (not (string-match re (cadr q)))) |
710 |
X (setq q (cdr q))) |
711 |
X (setcdr q (cons dir (delete dir (cdr q)))) |
712 |
X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
713 |
EOF |
714 |
elisp-site-file-install "${T}/${SITEFILE}" || die |
715 |
|
716 |
dodoc README BUGS |
717 |
|
718 |
if use aqua; then |
719 |
dodir /Applications/Gentoo |
720 |
rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app |
721 |
mv nextstep/Emacs.app \ |
722 |
"${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die |
723 |
fi |
724 |
|
725 |
DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs |
726 |
through the Emacs eselect module, which also redirects man and info |
727 |
pages. Therefore, several Emacs versions can be installed at the |
728 |
same time. \"man emacs.eselect\" for details. |
729 |
\\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is |
730 |
strongly recommended that you use app-admin/emacs-updater to rebuild |
731 |
all byte-compiled elisp files of the installed Emacs packages." |
732 |
use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs. |
733 |
Installing media-fonts/font-adobe-{75,100}dpi on the X server's |
734 |
machine would satisfy basic Emacs requirements under X11. |
735 |
See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs |
736 |
for how to enable anti-aliased fonts." |
737 |
use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in |
738 |
\"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink |
739 |
it into /Applications by yourself." |
740 |
readme.gentoo_create_doc |
741 |
} |
742 |
|
743 |
pkg_preinst() { |
744 |
# move Info dir file to correct name |
745 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
746 |
if [[ -f ${ED}${infodir}/dir.orig ]]; then |
747 |
mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
748 |
elif [[ -d "${ED}"${infodir} ]]; then |
749 |
# this should not happen in EAPI 4 |
750 |
ewarn "Regenerating Info directory index in ${infodir} ..." |
751 |
rm -f "${ED}"${infodir}/dir{,.*} |
752 |
for f in "${ED}"${infodir}/*; do |
753 |
if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
754 |
install-info --info-dir="${ED}"${infodir} "${f}" \ |
755 |
|| die "install-info failed" |
756 |
fi |
757 |
done |
758 |
fi |
759 |
} |
760 |
|
761 |
pkg_postinst() { |
762 |
elisp-site-regen |
763 |
|
764 |
local pvr |
765 |
for pvr in ${REPLACING_VERSIONS}; do |
766 |
[[ ${pvr%%[-_]*} = 24.[12] ]] && FORCE_PRINT_ELOG=1 |
767 |
done |
768 |
readme.gentoo_print_elog |
769 |
|
770 |
if use livecd; then |
771 |
# force an update of the emacs symlink for the livecd/dvd, |
772 |
# because some microemacs packages set it with USE=livecd |
773 |
eselect emacs update |
774 |
elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then |
775 |
# refresh symlinks in case any installed files have changed |
776 |
eselect emacs set ${EMACS_SUFFIX} |
777 |
else |
778 |
eselect emacs update ifunset |
779 |
fi |
780 |
} |
781 |
|
782 |
pkg_postrm() { |
783 |
elisp-site-regen |
784 |
eselect emacs update ifunset |
785 |
} |