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.91.ebuild ChangeLog
Date: Mon, 31 Oct 2011 07:57:23
Message-Id: 20111031075711.44B682004B@flycatcher.gentoo.org
1 ulm 11/10/31 07:57:11
2
3 Modified: ChangeLog
4 Added: emacs-vcs-24.0.91.ebuild
5 Log:
6 New pretest version.
7
8 (Portage version: 2.1.10.32/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.65 app-editors/emacs-vcs/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.65&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.65&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?r1=1.64&r2=1.65
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v
20 retrieving revision 1.64
21 retrieving revision 1.65
22 diff -u -r1.64 -r1.65
23 --- ChangeLog 28 Sep 2011 05:43:45 -0000 1.64
24 +++ ChangeLog 31 Oct 2011 07:57:11 -0000 1.65
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-editors/emacs-vcs
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.64 2011/09/28 05:43:45 ulm Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.65 2011/10/31 07:57:11 ulm Exp $
30 +
31 +*emacs-vcs-24.0.91 (31 Oct 2011)
32 +
33 + 31 Oct 2011; Ulrich Mueller <ulm@g.o> +emacs-vcs-24.0.91.ebuild:
34 + New pretest version.
35
36 28 Sep 2011; Ulrich Mueller <ulm@g.o> emacs-vcs-23.3.9999.ebuild,
37 emacs-vcs-24.0.90.ebuild, emacs-vcs-24.0.9999-r1.ebuild:
38
39
40
41 1.1 app-editors/emacs-vcs/emacs-vcs-24.0.91.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.0.91.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.0.91.ebuild?rev=1.1&content-type=text/plain
45
46 Index: emacs-vcs-24.0.91.ebuild
47 ===================================================================
48 # Copyright 1999-2011 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.91.ebuild,v 1.1 2011/10/31 07:57:11 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 selinux? ( sys-libs/libselinux )
92 X? (
93 x11-libs/libXmu
94 x11-libs/libXt
95 x11-misc/xbitmaps
96 gconf? ( >=gnome-base/gconf-2.26.2 )
97 gsettings? ( >=dev-libs/glib-2.28.6 )
98 libxml2? ( >=dev-libs/libxml2-2.2.0 )
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 dev-util/pkgconfig
130 gzip-el? ( app-arch/gzip )"
131
132 RDEPEND="${RDEPEND}
133 >=app-emacs/emacs-common-gentoo-1[X?]"
134
135 EMACS_SUFFIX="emacs-${SLOT}"
136 SITEFILE="20${PN}-${SLOT}-gentoo.el"
137
138 src_prepare() {
139 if [[ ${PV##*.} = 9999 ]]; then
140 FULL_VERSION=$(sed -n 's/^AC_INIT(emacs,[ \t]*\([^ \t,)]*\).*/\1/p' \
141 configure.in)
142 [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
143 echo
144 einfo "Emacs branch: ${EBZR_BRANCH}"
145 einfo "Revision: ${EBZR_REVISION:-${EBZR_REVNO}}"
146 einfo "Emacs version number: ${FULL_VERSION}"
147 [[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
148 || die "Upstream version number changed to ${FULL_VERSION}"
149 echo
150 fi
151
152 if ! use alsa; then
153 # ALSA is detected even if not requested by its USE flag.
154 # Suppress it by supplying pkg-config with a wrong library name.
155 sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
156 || die "unable to sed configure.in"
157 fi
158 if ! use gzip-el; then
159 # Emacs' build system automatically detects the gzip binary and
160 # compresses el files. We don't want that so confuse it with a
161 # wrong binary name
162 sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
163 || die "unable to sed configure.in"
164 fi
165
166 AT_M4DIR=m4 eautoreconf
167 }
168
169 src_configure() {
170 ALLOWED_FLAGS=""
171 strip-flags
172
173 if use sh; then
174 replace-flags -O[1-9] -O0 #262359
175 elif use ia64; then
176 replace-flags -O[2-9] -O1 #325373
177 else
178 replace-flags -O[3-9] -O2
179 fi
180
181 local myconf
182
183 if use alsa && ! use sound; then
184 echo
185 einfo "Although sound USE flag is disabled you chose to have alsa,"
186 einfo "so sound is switched on anyway."
187 echo
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"
195 myconf="${myconf} $(use_with gconf)"
196 myconf="${myconf} $(use_with gsettings)"
197 myconf="${myconf} $(use_with libxml2 xml2)"
198 myconf="${myconf} $(use_with toolkit-scroll-bars)"
199 myconf="${myconf} $(use_with wide-int)"
200 myconf="${myconf} $(use_with gif) $(use_with jpeg)"
201 myconf="${myconf} $(use_with png) $(use_with svg rsvg)"
202 myconf="${myconf} $(use_with tiff) $(use_with xpm)"
203 myconf="${myconf} $(use_with imagemagick)"
204
205 if use xft; then
206 myconf="${myconf} --with-xft"
207 myconf="${myconf} $(use_with m17n-lib libotf)"
208 myconf="${myconf} $(use_with m17n-lib m17n-flt)"
209 else
210 myconf="${myconf} --without-xft"
211 myconf="${myconf} --without-libotf --without-m17n-flt"
212 use m17n-lib && ewarn \
213 "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
214 fi
215
216 if use gtk; then
217 einfo "Configuring to build with GIMP Toolkit (GTK+)"
218 myconf="${myconf} --with-x-toolkit=$(usev gtk3 || echo gtk)"
219 elif use Xaw3d || use athena; then
220 einfo "Configuring to build with Athena/Lucid toolkit"
221 myconf="${myconf} --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
222 elif use motif; then
223 einfo "Configuring to build with Motif toolkit"
224 myconf="${myconf} --with-x-toolkit=motif"
225 else
226 einfo "Configuring to build with no toolkit"
227 myconf="${myconf} --with-x-toolkit=no"
228 fi
229
230 local f tk=
231 for f in gtk Xaw3d athena motif; do
232 use ${f} || continue
233 [[ ${tk} ]] \
234 && ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")"
235 tk="${tk}${tk:+ }${f}"
236 done
237 else
238 myconf="${myconf} --without-x"
239 fi
240
241 if [[ ${PV##*.} = 9999 ]]; then
242 # These variables are not needed for building. We add them to
243 # configure options because they are stored in the Emacs binary
244 # and available in variable "system-configuration-options".
245 myconf="${myconf} EBZR_BRANCH=${EBZR_BRANCH} EBZR_REVNO=${EBZR_REVNO}"
246 fi
247
248 # According to configure, this option is only used for GNU/Linux
249 # (x86_64 and s390). For Gentoo Prefix we have to explicitly spell
250 # out the location because $(get_libdir) does not necessarily return
251 # something that matches the host OS's libdir naming (e.g. RHEL).
252 local crtdir=$($(tc-getCC) -print-file-name=crt1.o)
253 crtdir=${crtdir%/*}
254
255 econf \
256 --program-suffix=-${EMACS_SUFFIX} \
257 --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
258 --with-crt-dir="${crtdir}" \
259 --with-gameuser="${GAMES_USER_DED:-games}" \
260 --without-compress-info \
261 $(use_with hesiod) \
262 $(use_with kerberos) $(use_with kerberos kerberos5) \
263 $(use_with gpm) \
264 $(use_with dbus) \
265 $(use_with gnutls) \
266 $(use_with selinux) \
267 ${myconf}
268 }
269
270 src_compile() {
271 export SANDBOX_ON=0 # for the unbelievers, see Bug #131505
272 if [[ ${PV##*.} = 9999 ]]; then
273 emake CC="$(tc-getCC)" bootstrap
274 # cleanup, otherwise emacs will be dumped again in src_install
275 (cd src; emake versionclean)
276 fi
277 # set last component of emacs-version to (package revision + 1)
278 touch src/emacs-${FULL_VERSION}.${PR#r}
279 emake CC="$(tc-getCC)"
280 }
281
282 src_install () {
283 local i m
284
285 emake install DESTDIR="${D}"
286
287 rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
288 || die "removing duplicate emacs executable failed"
289 mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \
290 || die "moving Emacs executable failed"
291
292 # move man pages to the correct place
293 for m in "${ED}"/usr/share/man/man1/* ; do
294 mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed"
295 done
296
297 # move info dir to avoid collisions with the dir file generated by portage
298 mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
299 || die "moving info dir failed"
300 touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
301 docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
302
303 # avoid collision between slots, see bug #169033 e.g.
304 rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
305 rm -rf "${ED}"/usr/share/{applications,icons}
306 rm "${ED}"/var/lib/games/emacs/{snake,tetris}-scores
307 keepdir /var/lib/games/emacs
308
309 local c=";;"
310 if use source; then
311 insinto /usr/share/emacs/${FULL_VERSION}/src
312 # This is not meant to install all the source -- just the
313 # C source you might find via find-function
314 doins src/*.[ch]
315 c=""
316 fi
317
318 sed 's/^X//' >"${T}/${SITEFILE}" <<-EOF
319 X
320 ;;; ${PN}-${SLOT} site-lisp configuration
321 X
322 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
323 X ${c}(setq find-function-C-source-directory
324 X ${c} "${EPREFIX}/usr/share/emacs/${FULL_VERSION}/src")
325 X (let ((path (getenv "INFOPATH"))
326 X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
327 X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
328 X (and path
329 X ;; move Emacs Info dir before anything else in /usr/share/info
330 X (let* ((p (cons nil (split-string path ":" t))) (q p))
331 X (while (and (cdr q) (not (string-match re (cadr q))))
332 X (setq q (cdr q)))
333 X (setcdr q (cons dir (delete dir (cdr q))))
334 X (setq Info-directory-list (prune-directory-list (cdr p)))))))
335 EOF
336 elisp-site-file-install "${T}/${SITEFILE}" || die
337
338 dodoc README BUGS
339 }
340
341 pkg_preinst() {
342 # move Info dir file to correct name
343 local infodir=/usr/share/info/${EMACS_SUFFIX} f
344 if [[ -f ${ED}${infodir}/dir.orig ]]; then
345 mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
346 else
347 # this should not happen in EAPI 4
348 ewarn "Regenerating Info directory index in ${infodir} ..."
349 rm -f "${ED}"${infodir}/dir{,.*}
350 for f in "${ED}"${infodir}/*; do
351 if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
352 install-info --info-dir="${ED}"${infodir} "${f}" \
353 || die "install-info failed"
354 fi
355 done
356 fi
357 }
358
359 pkg_postinst() {
360 local f
361 for f in "${EROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do
362 [[ -e ${f} ]] || touch "${f}"
363 done
364 chown "${GAMES_USER_DED:-games}" "${EROOT}"/var/lib/games/emacs
365
366 elisp-site-regen
367 eselect emacs update ifunset
368
369 if use X; then
370 echo
371 elog "You need to install some fonts for Emacs."
372 elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's"
373 elog "machine would satisfy basic Emacs requirements under X11."
374 elog "See also http://www.gentoo.org/proj/en/lisp/emacs/xft.xml"
375 elog "for how to enable anti-aliased fonts."
376 fi
377
378 echo
379 elog "You can set the version to be started by /usr/bin/emacs through"
380 elog "the Emacs eselect module, which also redirects man and info pages."
381 elog "Therefore, several Emacs versions can be installed at the same time."
382 elog "\"man emacs.eselect\" for details."
383 echo
384 elog "If you upgrade from a previous major version of Emacs, then it is"
385 elog "strongly recommended that you use app-admin/emacs-updater to rebuild"
386 elog "all byte-compiled elisp files of the installed Emacs packages."
387 }
388
389 pkg_postrm() {
390 elisp-site-regen
391 eselect emacs update ifunset
392 }