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.1.9999-r1.ebuild emacs-vcs-24.1.9999.ebuild
Date: Fri, 01 Jun 2012 16:47:27
Message-Id: 20120601164713.F3DFE2004B@flycatcher.gentoo.org
1 ulm 12/06/01 16:47:13
2
3 Modified: ChangeLog
4 Added: emacs-vcs-24.1.9999-r1.ebuild
5 Removed: emacs-vcs-24.1.9999.ebuild
6 Log:
7 Install live version as emacs-24-vcs, in order to avoid collisions with the upcoming 24.1 release.
8
9 (Portage version: 2.1.10.63/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.97 app-editors/emacs-vcs/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.97&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.97&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?r1=1.96&r2=1.97
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v
21 retrieving revision 1.96
22 retrieving revision 1.97
23 diff -u -r1.96 -r1.97
24 --- ChangeLog 24 May 2012 21:12:55 -0000 1.96
25 +++ ChangeLog 1 Jun 2012 16:47:13 -0000 1.97
26 @@ -1,6 +1,13 @@
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.96 2012/05/24 21:12:55 ulm Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.97 2012/06/01 16:47:13 ulm Exp $
31 +
32 +*emacs-vcs-24.1.9999-r1 (01 Jun 2012)
33 +
34 + 01 Jun 2012; Ulrich Müller <ulm@g.o> -emacs-vcs-24.1.9999.ebuild,
35 + +emacs-vcs-24.1.9999-r1.ebuild:
36 + Install live version as emacs-24-vcs, in order to avoid collisions with the
37 + upcoming 24.1 release.
38
39 24 May 2012; Ulrich Müller <ulm@g.o> emacs-vcs-24.0.97.ebuild,
40 emacs-vcs-24.0.9999-r4.ebuild, emacs-vcs-24.1.9999.ebuild:
41
42
43
44 1.1 app-editors/emacs-vcs/emacs-vcs-24.1.9999-r1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.1.9999-r1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.1.9999-r1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: emacs-vcs-24.1.9999-r1.ebuild
50 ===================================================================
51 # Copyright 1999-2012 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.1.9999-r1.ebuild,v 1.1 2012/06/01 16:47:13 ulm Exp $
54
55 EAPI=4
56
57 inherit autotools elisp-common eutils flag-o-matic multilib
58
59 if [[ ${PV##*.} = 9999 ]]; then
60 EBZR_PROJECT="emacs"
61 EBZR_BRANCH="trunk"
62 EBZR_REPO_URI="bzr://bzr.savannah.gnu.org/emacs/${EBZR_BRANCH}/"
63 # "Nosmart" is much faster for initial branching.
64 EBZR_INITIAL_URI="nosmart+${EBZR_REPO_URI}"
65 inherit bzr
66 SRC_URI=""
67 else
68 SRC_URI="mirror://gentoo/emacs-${PV}.tar.gz
69 mirror://gnu-alpha/emacs/pretest/emacs-${PV}.tar.gz"
70 # FULL_VERSION keeps the full version number, which is needed in
71 # order to determine some path information correctly for copy/move
72 # operations later on
73 FULL_VERSION="${PV%%_*}"
74 S="${WORKDIR}/emacs-${FULL_VERSION}"
75 fi
76
77 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
78 HOMEPAGE="http://www.gnu.org/software/emacs/"
79
80 LICENSE="GPL-3 FDL-1.3 BSD as-is MIT W3C unicode PSF-2"
81 SLOT="24"
82 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
83 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"
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? ( virtual/pkgconfig )
133 dbus? ( virtual/pkgconfig )
134 gnutls? ( virtual/pkgconfig )
135 libxml2? ( virtual/pkgconfig )
136 X? ( virtual/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}-vcs"
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_user
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 strip-flags
178
179 if use sh; then
180 replace-flags "-O[1-9]" -O0 #262359
181 elif use ia64; then
182 replace-flags "-O[2-9]" -O1 #325373
183 else
184 replace-flags "-O[3-9]" -O2
185 fi
186
187 local myconf
188
189 if use alsa && ! use sound; then
190 einfo "Although sound USE flag is disabled you chose to have alsa,"
191 einfo "so sound is switched on anyway."
192 myconf="${myconf} --with-sound"
193 else
194 myconf="${myconf} $(use_with sound)"
195 fi
196
197 if use X; then
198 myconf="${myconf} --with-x --without-ns"
199 myconf="${myconf} $(use_with gconf)"
200 myconf="${myconf} $(use_with gsettings)"
201 myconf="${myconf} $(use_with toolkit-scroll-bars)"
202 myconf="${myconf} $(use_with wide-int)"
203 myconf="${myconf} $(use_with gif) $(use_with jpeg)"
204 myconf="${myconf} $(use_with png) $(use_with svg rsvg)"
205 myconf="${myconf} $(use_with tiff) $(use_with xpm)"
206 myconf="${myconf} $(use_with imagemagick)"
207
208 if use xft; then
209 myconf="${myconf} --with-xft"
210 myconf="${myconf} $(use_with m17n-lib libotf)"
211 myconf="${myconf} $(use_with m17n-lib m17n-flt)"
212 else
213 myconf="${myconf} --without-xft"
214 myconf="${myconf} --without-libotf --without-m17n-flt"
215 use m17n-lib && ewarn \
216 "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
217 fi
218
219 if use gtk; then
220 einfo "Configuring to build with GIMP Toolkit (GTK+)"
221 myconf="${myconf} --with-x-toolkit=$(usev gtk3 || echo gtk)"
222 local f
223 for f in athena Xaw3d motif; do
224 use ${f} && ewarn "USE flag \"${f}\" ignored" \
225 "(superseded by \"gtk\")"
226 done
227 elif use athena || use Xaw3d; then
228 einfo "Configuring to build with Athena/Lucid toolkit"
229 myconf="${myconf} --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
230 use motif && ewarn "USE flag \"motif\" ignored" \
231 "(superseded by \"athena\" or \"Xaw3d\")"
232 elif use motif; then
233 einfo "Configuring to build with Motif toolkit"
234 myconf="${myconf} --with-x-toolkit=motif"
235 else
236 einfo "Configuring to build with no toolkit"
237 myconf="${myconf} --with-x-toolkit=no"
238 fi
239
240 ! use gtk && use gtk3 \
241 && ewarn "USE flag \"gtk3\" has no effect if \"gtk\" is not set."
242 else
243 myconf="${myconf} --without-x --without-ns"
244 fi
245
246 if [[ ${PV##*.} = 9999 ]]; then
247 # These variables are not needed for building. We add them to
248 # configure options because they are stored in the Emacs binary
249 # and available in variable "system-configuration-options".
250 myconf="${myconf} EBZR_BRANCH=${EBZR_BRANCH} EBZR_REVNO=${EBZR_REVNO}"
251 fi
252
253 # According to configure, this option is only used for GNU/Linux
254 # (x86_64 and s390). For Gentoo Prefix we have to explicitly spell
255 # out the location because $(get_libdir) does not necessarily return
256 # something that matches the host OS's libdir naming (e.g. RHEL).
257 local crtdir=$($(tc-getCC) -print-file-name=crt1.o)
258 crtdir=${crtdir%/*}
259
260 econf \
261 --program-suffix=-${EMACS_SUFFIX} \
262 --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
263 --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
264 --with-crt-dir="${crtdir}" \
265 --with-gameuser="${GAMES_USER_DED:-games}" \
266 --without-compress-info \
267 --disable-maintainer-mode \
268 $(use_with hesiod) \
269 $(use_with kerberos) $(use_with kerberos kerberos5) \
270 $(use_with gpm) \
271 $(use_with dbus) \
272 $(use_with gnutls) \
273 $(use_with libxml2 xml2) \
274 $(use_with selinux) \
275 ${myconf}
276 }
277
278 src_compile() {
279 export SANDBOX_ON=0 # for the unbelievers, see Bug #131505
280 if [[ ${PV##*.} = 9999 ]]; then
281 emake CC="$(tc-getCC)" bootstrap
282 # cleanup, otherwise emacs will be dumped again in src_install
283 (cd src; emake versionclean)
284 fi
285 # set last component of emacs-version to (package revision + 1)
286 touch src/emacs-${FULL_VERSION}.${PR#r}
287 emake CC="$(tc-getCC)"
288 }
289
290 src_install () {
291 emake install DESTDIR="${D}"
292
293 rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
294 || die "removing duplicate emacs executable failed"
295 mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \
296 || die "moving Emacs executable failed"
297
298 # move man pages to the correct place
299 local m
300 for m in "${ED}"/usr/share/man/man1/* ; do
301 mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed"
302 done
303
304 # move info dir to avoid collisions with the dir file generated by portage
305 mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
306 || die "moving info dir failed"
307 touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
308 docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
309
310 # avoid collision between slots, see bug #169033 e.g.
311 rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
312 rm -rf "${ED}"/usr/share/{applications,icons}
313 rm "${ED}"/var/lib/games/emacs/{snake,tetris}-scores
314 keepdir /var/lib/games/emacs
315
316 # remove unused <version>/site-lisp dir
317 rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
318
319 local c=";;"
320 if use source; then
321 insinto /usr/share/emacs/${FULL_VERSION}/src
322 # This is not meant to install all the source -- just the
323 # C source you might find via find-function
324 doins src/*.{c,h,m}
325 doins -r src/s
326 rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/s/README
327 c=""
328 fi
329
330 sed 's/^X//' >"${T}/${SITEFILE}" <<-EOF
331 X
332 ;;; ${PN}-${SLOT} site-lisp configuration
333 X
334 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
335 X ${c}(setq find-function-C-source-directory
336 X ${c} "${EPREFIX}/usr/share/emacs/${FULL_VERSION}/src")
337 X (let ((path (getenv "INFOPATH"))
338 X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
339 X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
340 X (and path
341 X ;; move Emacs Info dir before anything else in /usr/share/info
342 X (let* ((p (cons nil (split-string path ":" t))) (q p))
343 X (while (and (cdr q) (not (string-match re (cadr q))))
344 X (setq q (cdr q)))
345 X (setcdr q (cons dir (delete dir (cdr q))))
346 X (setq Info-directory-list (prune-directory-list (cdr p)))))))
347 EOF
348 elisp-site-file-install "${T}/${SITEFILE}" || die
349
350 dodoc README BUGS
351 }
352
353 pkg_preinst() {
354 # move Info dir file to correct name
355 local infodir=/usr/share/info/${EMACS_SUFFIX} f
356 if [[ -f ${ED}${infodir}/dir.orig ]]; then
357 mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
358 elif [[ -d "${ED}"${infodir} ]]; then
359 # this should not happen in EAPI 4
360 ewarn "Regenerating Info directory index in ${infodir} ..."
361 rm -f "${ED}"${infodir}/dir{,.*}
362 for f in "${ED}"${infodir}/*; do
363 if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
364 install-info --info-dir="${ED}"${infodir} "${f}" \
365 || die "install-info failed"
366 fi
367 done
368 fi
369 }
370
371 pkg_postinst() {
372 local f
373 for f in "${EROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do
374 [[ -e ${f} ]] || touch "${f}"
375 done
376 chown "${GAMES_USER_DED:-games}" "${EROOT}"/var/lib/games/emacs
377
378 elisp-site-regen
379 eselect emacs update ifunset
380
381 if use X; then
382 elog "You need to install some fonts for Emacs."
383 elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's"
384 elog "machine would satisfy basic Emacs requirements under X11."
385 elog "See also http://www.gentoo.org/proj/en/lisp/emacs/xft.xml"
386 elog "for how to enable anti-aliased fonts."
387 elog
388 fi
389
390 elog "You can set the version to be started by /usr/bin/emacs through"
391 elog "the Emacs eselect module, which also redirects man and info pages."
392 elog "Therefore, several Emacs versions can be installed at the same time."
393 elog "\"man emacs.eselect\" for details."
394 elog
395 elog "If you upgrade from a previous major version of Emacs, then it is"
396 elog "strongly recommended that you use app-admin/emacs-updater to rebuild"
397 elog "all byte-compiled elisp files of the installed Emacs packages."
398 }
399
400 pkg_postrm() {
401 elisp-site-regen
402 eselect emacs update ifunset
403 }