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