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