Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-editors/emacs: ChangeLog emacs-23.4.ebuild
Date: Sat, 28 Jan 2012 12:01:03
Message-Id: 20120128120053.AADD52004B@flycatcher.gentoo.org
1 ulm 12/01/28 12:00:53
2
3 Modified: ChangeLog
4 Added: emacs-23.4.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.1.10.44/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.472 app-editors/emacs/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.472&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.472&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/ChangeLog?r1=1.471&r2=1.472
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v
20 retrieving revision 1.471
21 retrieving revision 1.472
22 diff -u -r1.471 -r1.472
23 --- ChangeLog 28 Jan 2012 10:54:33 -0000 1.471
24 +++ ChangeLog 28 Jan 2012 12:00:53 -0000 1.472
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-editors/emacs
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.471 2012/01/28 10:54:33 ulm Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.472 2012/01/28 12:00:53 ulm Exp $
30 +
31 +*emacs-23.4 (28 Jan 2012)
32 +
33 + 28 Jan 2012; Ulrich Müller <ulm@g.o> +emacs-23.4.ebuild:
34 + Version bump.
35
36 28 Jan 2012; Ulrich Müller <ulm@g.o> emacs-23.3-r4.ebuild,
37 emacs-23.4_rc1.ebuild:
38
39
40
41 1.1 app-editors/emacs/emacs-23.4.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-23.4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-23.4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: emacs-23.4.ebuild
47 ===================================================================
48 # Copyright 1999-2012 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-23.4.ebuild,v 1.1 2012/01/28 12:00:53 ulm Exp $
51
52 EAPI=4
53 WANT_AUTOMAKE="none"
54
55 inherit autotools elisp-common eutils flag-o-matic multilib
56
57 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
58 HOMEPAGE="http://www.gnu.org/software/emacs/"
59 SRC_URI="mirror://gnu/emacs/${P}.tar.bz2
60 mirror://gentoo/${P}-patches-1.tar.bz2"
61
62 LICENSE="GPL-3 FDL-1.3 BSD as-is MIT W3C unicode PSF-2"
63 SLOT="23"
64 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
65 IUSE="alsa aqua athena dbus gconf gif gpm gtk gzip-el hesiod jpeg kerberos livecd m17n-lib motif png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm"
66 REQUIRED_USE="aqua? ( !X )"
67
68 RDEPEND="sys-libs/ncurses
69 >=app-admin/eselect-emacs-1.2
70 net-libs/liblockfile
71 hesiod? ( net-dns/hesiod )
72 kerberos? ( virtual/krb5 )
73 alsa? ( media-libs/alsa-lib )
74 gpm? ( sys-libs/gpm )
75 dbus? ( sys-apps/dbus )
76 X? (
77 x11-libs/libXmu
78 x11-libs/libXt
79 x11-misc/xbitmaps
80 gconf? ( >=gnome-base/gconf-2.26.2 )
81 gif? ( media-libs/giflib )
82 jpeg? ( virtual/jpeg )
83 png? ( >=media-libs/libpng-1.4:0 )
84 svg? ( >=gnome-base/librsvg-2.0 )
85 tiff? ( media-libs/tiff )
86 xpm? ( x11-libs/libXpm )
87 xft? (
88 media-libs/fontconfig
89 media-libs/freetype
90 x11-libs/libXft
91 m17n-lib? (
92 >=dev-libs/libotf-0.9.4
93 >=dev-libs/m17n-lib-1.5.1
94 )
95 )
96 gtk? ( x11-libs/gtk+:2 )
97 !gtk? (
98 Xaw3d? ( x11-libs/libXaw3d )
99 !Xaw3d? (
100 athena? ( x11-libs/libXaw )
101 !athena? ( motif? ( >=x11-libs/openmotif-2.3:0 ) )
102 )
103 )
104 )"
105
106 DEPEND="${RDEPEND}
107 alsa? ( dev-util/pkgconfig )
108 dbus? ( dev-util/pkgconfig )
109 X? ( dev-util/pkgconfig )
110 gzip-el? ( app-arch/gzip )"
111
112 RDEPEND="${RDEPEND}
113 !<app-editors/emacs-vcs-${PV}
114 >=app-emacs/emacs-common-gentoo-1.3[X?]"
115
116 EMACS_SUFFIX="emacs-${SLOT}"
117 SITEFILE="20${PN}-${SLOT}-gentoo.el"
118 # FULL_VERSION keeps the full version number, which is needed in
119 # order to determine some path information correctly for copy/move
120 # operations later on
121 FULL_VERSION="${PV%%_*}"
122 S="${WORKDIR}/emacs-${FULL_VERSION}"
123
124 src_prepare() {
125 EPATCH_SUFFIX=patch epatch
126 epatch_user
127
128 sed -i \
129 -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \
130 -e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \
131 "${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings"
132
133 if ! use alsa; then
134 # ALSA is detected even if not requested by its USE flag.
135 # Suppress it by supplying pkg-config with a wrong library name.
136 sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
137 || die "unable to sed configure.in"
138 fi
139 if ! use gzip-el; then
140 # Emacs' build system automatically detects the gzip binary and
141 # compresses el files. We don't want that so confuse it with a
142 # wrong binary name
143 sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
144 || die "unable to sed configure.in"
145 fi
146
147 eautoreconf
148 }
149
150 src_configure() {
151 ALLOWED_FLAGS=""
152 strip-flags
153 filter-flags -fstrict-aliasing
154 append-flags $(test-flags -fno-strict-aliasing)
155
156 if use sh; then
157 replace-flags -O[1-9] -O0 #262359
158 elif use ia64; then
159 replace-flags -O[2-9] -O1 #325373
160 else
161 replace-flags -O[3-9] -O2
162 fi
163
164 local myconf
165
166 if use alsa && ! use sound; then
167 einfo "Although sound USE flag is disabled you chose to have alsa,"
168 einfo "so sound is switched on anyway."
169 myconf="${myconf} --with-sound"
170 else
171 myconf="${myconf} $(use_with sound)"
172 fi
173
174 if use X; then
175 myconf="${myconf} --with-x --without-ns"
176 myconf="${myconf} $(use_with gconf)"
177 myconf="${myconf} $(use_with toolkit-scroll-bars)"
178 myconf="${myconf} $(use_with gif) $(use_with jpeg)"
179 myconf="${myconf} $(use_with png) $(use_with svg rsvg)"
180 myconf="${myconf} $(use_with tiff) $(use_with xpm)"
181
182 if use xft; then
183 myconf="${myconf} --with-xft"
184 myconf="${myconf} $(use_with m17n-lib libotf)"
185 myconf="${myconf} $(use_with m17n-lib m17n-flt)"
186 else
187 myconf="${myconf} --without-xft"
188 myconf="${myconf} --without-libotf --without-m17n-flt"
189 use m17n-lib && ewarn \
190 "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
191 fi
192
193 # GTK+ is the default toolkit if USE=gtk is chosen with other
194 # possibilities. Emacs upstream thinks this should be standard
195 # policy on all distributions
196 if use gtk; then
197 einfo "Configuring to build with GIMP Toolkit (GTK+)"
198 myconf="${myconf} --with-x-toolkit=gtk"
199 local f
200 for f in athena Xaw3d motif; do
201 use ${f} && ewarn "USE flag \"${f}\" ignored" \
202 "(superseded by \"gtk\")"
203 done
204 elif use athena || use Xaw3d; then
205 einfo "Configuring to build with Athena/Lucid toolkit"
206 myconf="${myconf} --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
207 use motif && ewarn "USE flag \"motif\" ignored" \
208 "(superseded by \"athena\" or \"Xaw3d\")"
209 elif use motif; then
210 einfo "Configuring to build with Motif toolkit"
211 myconf="${myconf} --with-x-toolkit=motif"
212 else
213 einfo "Configuring to build with no toolkit"
214 myconf="${myconf} --with-x-toolkit=no"
215 fi
216 elif use aqua; then
217 einfo "Configuring to build with Cocoa support"
218 myconf="${myconf} --with-ns --disable-ns-self-contained"
219 myconf="${myconf} --without-x"
220 else
221 myconf="${myconf} --without-x --without-ns"
222 fi
223
224 # According to configure, this option is only used for GNU/Linux
225 # (x86_64 and s390). For Gentoo Prefix we have to explicitly spell
226 # out the location because $(get_libdir) does not necessarily return
227 # something that matches the host OS's libdir naming (e.g. RHEL).
228 local crtdir=$($(tc-getCC) -print-file-name=crt1.o)
229 crtdir=${crtdir%/*}
230
231 econf \
232 --program-suffix=-${EMACS_SUFFIX} \
233 --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
234 --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
235 --with-crt-dir="${crtdir}" \
236 --with-gameuser="${GAMES_USER_DED:-games}" \
237 $(use_with hesiod) \
238 $(use_with kerberos) $(use_with kerberos kerberos5) \
239 $(use_with gpm) \
240 $(use_with dbus) \
241 ${myconf}
242 }
243
244 src_compile() {
245 export SANDBOX_ON=0 # for the unbelievers, see Bug #131505
246 # set last component of emacs-version to (package revision + 1)
247 touch src/emacs-${FULL_VERSION}.${PR#r}
248 emake CC="$(tc-getCC)"
249 }
250
251 src_install () {
252 local i m
253
254 emake install DESTDIR="${D}"
255
256 rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
257 || die "removing duplicate emacs executable failed"
258 mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \
259 || die "moving Emacs executable failed"
260
261 # move man pages to the correct place
262 for m in "${ED}"/usr/share/man/man1/* ; do
263 mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed"
264 done
265
266 # move info dir to avoid collisions with the dir file generated by portage
267 mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
268 || die "moving info dir failed"
269 touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
270 docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
271
272 # avoid collision between slots, see bug #169033 e.g.
273 rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
274 rm -rf "${ED}"/usr/share/{applications,icons}
275 rm "${ED}"/var/lib/games/emacs/{snake,tetris}-scores
276 keepdir /var/lib/games/emacs
277
278 # remove unused <version>/site-lisp dir
279 rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
280
281 local c=";;"
282 if use source; then
283 insinto /usr/share/emacs/${FULL_VERSION}/src
284 # This is not meant to install all the source -- just the
285 # C source you might find via find-function
286 doins src/*.{c,h,m}
287 doins -r src/{m,s}
288 rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/Makefile.c
289 rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/{m,s}/README
290 c=""
291 fi
292
293 sed 's/^X//' >"${T}/${SITEFILE}" <<-EOF
294 X
295 ;;; ${PN}-${SLOT} site-lisp configuration
296 X
297 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
298 X ${c}(setq find-function-C-source-directory
299 X ${c} "${EPREFIX}/usr/share/emacs/${FULL_VERSION}/src")
300 X (let ((path (getenv "INFOPATH"))
301 X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
302 X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
303 X (and path
304 X ;; move Emacs Info dir before anything else in /usr/share/info
305 X (let* ((p (cons nil (split-string path ":" t))) (q p))
306 X (while (and (cdr q) (not (string-match re (cadr q))))
307 X (setq q (cdr q)))
308 X (setcdr q (cons dir (delete dir (cdr q))))
309 X (setq Info-directory-list (prune-directory-list (cdr p)))))))
310 EOF
311 elisp-site-file-install "${T}/${SITEFILE}" || die
312
313 dodoc README BUGS
314
315 if use aqua; then
316 dodir /Applications/Gentoo
317 rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app
318 mv nextstep/Emacs.app \
319 "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die
320 elog "Emacs${EMACS_SUFFIX#emacs}.app is in ${EPREFIX}/Applications/Gentoo."
321 elog "You may want to copy or symlink it into /Applications by yourself."
322 fi
323 }
324
325 pkg_preinst() {
326 # move Info dir file to correct name
327 local infodir=/usr/share/info/${EMACS_SUFFIX} f
328 if [[ -f ${ED}${infodir}/dir.orig ]]; then
329 mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
330 else
331 # this should not happen in EAPI 4
332 ewarn "Regenerating Info directory index in ${infodir} ..."
333 rm -f "${ED}"${infodir}/dir{,.*}
334 for f in "${ED}"${infodir}/*; do
335 if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
336 install-info --info-dir="${ED}"${infodir} "${f}" \
337 || die "install-info failed"
338 fi
339 done
340 fi
341 }
342
343 pkg_postinst() {
344 local f
345 for f in "${EROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do
346 [[ -e ${f} ]] || touch "${f}"
347 done
348 chown "${GAMES_USER_DED:-games}" "${EROOT}"/var/lib/games/emacs
349
350 elisp-site-regen
351
352 if use livecd; then
353 # force an update of the emacs symlink for the livecd/dvd,
354 # because some microemacs packages set it with USE=livecd
355 eselect emacs update
356 else
357 eselect emacs update ifunset
358 fi
359
360 if use X; then
361 elog "You need to install some fonts for Emacs."
362 elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's"
363 elog "machine would satisfy basic Emacs requirements under X11."
364 elog "See also http://www.gentoo.org/proj/en/lisp/emacs/xft.xml"
365 elog "for how to enable anti-aliased fonts."
366 elog
367 fi
368
369 elog "You can set the version to be started by /usr/bin/emacs through"
370 elog "the Emacs eselect module, which also redirects man and info pages."
371 elog "Therefore, several Emacs versions can be installed at the same time."
372 elog "\"man emacs.eselect\" for details."
373 elog
374 elog "If you upgrade from a previous major version of Emacs, then it is"
375 elog "strongly recommended that you use app-admin/emacs-updater to rebuild"
376 elog "all byte-compiled elisp files of the installed Emacs packages."
377 }
378
379 pkg_postrm() {
380 elisp-site-regen
381 eselect emacs update ifunset
382 }