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