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