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