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