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