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: ChangeLog emacs-23.1-r1.ebuild
Date: Wed, 28 Oct 2009 19:38:56
Message-Id: E1N3EM9-0001ar-2x@stork.gentoo.org
1 ulm 09/10/28 19:38:53
2
3 Modified: ChangeLog
4 Added: emacs-23.1-r1.ebuild
5 Log:
6 Fix swapped backspace and delete keys when started as daemon, bug 289709.
7 (Portage version: 2.2_rc46/cvs/Linux i686)
8
9 Revision Changes Path
10 1.342 app-editors/emacs/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.342&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.342&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?r1=1.341&r2=1.342
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v
19 retrieving revision 1.341
20 retrieving revision 1.342
21 diff -u -r1.341 -r1.342
22 --- ChangeLog 12 Oct 2009 16:34:24 -0000 1.341
23 +++ ChangeLog 28 Oct 2009 19:38:52 -0000 1.342
24 @@ -1,6 +1,12 @@
25 # ChangeLog for app-editors/emacs
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.341 2009/10/12 16:34:24 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.342 2009/10/28 19:38:52 ulm Exp $
29 +
30 +*emacs-23.1-r1 (28 Oct 2009)
31 +
32 + 28 Oct 2009; Ulrich Mueller <ulm@g.o> +emacs-23.1-r1.ebuild,
33 + +files/emacs-23.1-backspace.patch:
34 + Fix swapped backspace and delete keys when started as daemon, bug 289709.
35
36 12 Oct 2009; Raúl Porcel <armin76@g.o> emacs-23.1.ebuild:
37 ia64/s390/sh stable wrt #285063
38
39
40
41 1.1 app-editors/emacs/emacs-23.1-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-23.1-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-23.1-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: emacs-23.1-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-23.1-r1.ebuild,v 1.1 2009/10/28 19:38:52 ulm Exp $
51
52 EAPI=2
53
54 inherit autotools elisp-common eutils flag-o-matic
55
56 if [ "${PV##*.}" = "9999" ]; then
57 ECVS_AUTH="pserver"
58 ECVS_SERVER="cvs.savannah.gnu.org:/sources/emacs"
59 ECVS_MODULE="emacs"
60 ECVS_BRANCH="HEAD"
61 ECVS_LOCALNAME="emacs"
62 inherit cvs
63 SRC_URI=""
64 S="${WORKDIR}/${ECVS_LOCALNAME}"
65 else
66 SRC_URI="mirror://gnu/emacs/${P}.tar.bz2"
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 X11 W3C unicode"
78 SLOT="23"
79 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
80 IUSE="alsa dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm"
81 RESTRICT="strip"
82
83 RDEPEND="!=app-editors/emacs-cvs-23.0*
84 !=app-editors/emacs-cvs-23.1.9999
85 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 X? (
94 x11-libs/libXmu
95 x11-libs/libXt
96 x11-misc/xbitmaps
97 gif? ( media-libs/giflib )
98 jpeg? ( media-libs/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 ) )
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}"
127 SITEFILE="20${PN}-${SLOT}-gentoo.el"
128
129 src_prepare() {
130 if [ "${PV##*.}" = "9999" ]; then
131 FULL_VERSION=$(grep 'defconst[ ]*emacs-version' lisp/version.el \
132 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/')
133 [ "${FULL_VERSION}" ] || die "Cannot determine current Emacs version"
134 echo
135 einfo "Emacs CVS branch: ${ECVS_BRANCH}"
136 einfo "Emacs version number: ${FULL_VERSION}"
137 [ "${FULL_VERSION%.*}" = ${PV%.*} ] \
138 || die "Upstream version number changed to ${FULL_VERSION}"
139 echo
140 fi
141
142 epatch "${FILESDIR}/${PN}-23.0.94-handle-xz-suffix.patch"
143 epatch "${FILESDIR}/${P}-backspace.patch"
144
145 sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \
146 -e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \
147 "${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings"
148
149 if ! use alsa; then
150 # ALSA is detected even if not requested by its USE flag.
151 # Suppress it by supplying pkg-config with a wrong library name.
152 sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
153 || die "unable to sed configure.in"
154 fi
155 if ! use gzip-el; then
156 # Emacs' build system automatically detects the gzip binary and
157 # compresses el files. We don't want that so confuse it with a
158 # wrong binary name
159 sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
160 || die "unable to sed configure.in"
161 fi
162
163 eautoreconf
164 }
165
166 src_configure() {
167 ALLOWED_FLAGS=""
168 strip-flags
169 #unset LDFLAGS
170 if use sh; then
171 replace-flags -O[1-9] -O0 #262359
172 else
173 replace-flags -O[3-9] -O2
174 fi
175
176 local myconf
177
178 if use alsa && ! use sound; then
179 echo
180 einfo "Although sound USE flag is disabled you chose to have alsa,"
181 einfo "so sound is switched on anyway."
182 echo
183 myconf="${myconf} --with-sound"
184 else
185 myconf="${myconf} $(use_with sound)"
186 fi
187
188 if use X; then
189 myconf="${myconf} --with-x"
190 myconf="${myconf} $(use_with toolkit-scroll-bars)"
191 myconf="${myconf} $(use_with gif) $(use_with jpeg)"
192 myconf="${myconf} $(use_with png) $(use_with svg rsvg)"
193 myconf="${myconf} $(use_with tiff) $(use_with xpm)"
194 myconf="${myconf} $(use_with xft)"
195
196 if use xft; then
197 myconf="${myconf} $(use_with m17n-lib libotf)"
198 myconf="${myconf} $(use_with m17n-lib m17n-flt)"
199 else
200 myconf="${myconf} --without-libotf --without-m17n-flt"
201 use m17n-lib && ewarn \
202 "USE flag \"m17n-lib\" has no effect because xft is not set."
203 fi
204
205 # GTK+ is the default toolkit if USE=gtk is chosen with other
206 # possibilities. Emacs upstream thinks this should be standard
207 # policy on all distributions
208 if use gtk; then
209 einfo "Configuring to build with GIMP Toolkit (GTK+)"
210 myconf="${myconf} --with-x-toolkit=gtk"
211 elif use Xaw3d; then
212 einfo "Configuring to build with Xaw3d (Athena/Lucid) toolkit"
213 myconf="${myconf} --with-x-toolkit=athena"
214 elif use motif; then
215 einfo "Configuring to build with Motif toolkit"
216 myconf="${myconf} --with-x-toolkit=motif"
217 else
218 einfo "Configuring to build with no toolkit"
219 myconf="${myconf} --with-x-toolkit=no"
220 fi
221
222 local f tk=
223 for f in gtk Xaw3d motif; do
224 use ${f} || continue
225 [ "${tk}" ] \
226 && ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")"
227 tk="${tk}${tk:+ }${f}"
228 done
229 else
230 myconf="${myconf} --without-x"
231 fi
232
233 myconf="${myconf} $(use_with hesiod)"
234 myconf="${myconf} $(use_with kerberos) $(use_with kerberos kerberos5)"
235 myconf="${myconf} $(use_with gpm) $(use_with dbus)"
236
237 econf \
238 --program-suffix=-${EMACS_SUFFIX} \
239 --infodir=/usr/share/info/${EMACS_SUFFIX} \
240 ${myconf} || die "econf emacs failed"
241 }
242
243 src_compile() {
244 export SANDBOX_ON=0 # for the unbelievers, see Bug #131505
245 if [ "${PV##*.}" = "9999" ]; then
246 emake CC="$(tc-getCC)" bootstrap || die "make bootstrap failed"
247 # cleanup, otherwise emacs will be dumped again in src_install
248 (cd src; emake versionclean)
249 fi
250 emake CC="$(tc-getCC)" || die "emake failed"
251 }
252
253 src_install () {
254 local i m
255
256 emake install DESTDIR="${D}" || die "make install failed"
257
258 rm "${D}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
259 || die "removing duplicate emacs executable failed"
260 mv "${D}"/usr/bin/emacs-${EMACS_SUFFIX} "${D}"/usr/bin/${EMACS_SUFFIX} \
261 || die "moving Emacs executable failed"
262
263 # move info documentation to the correct place
264 for i in "${D}"/usr/share/info/${EMACS_SUFFIX}/*; do
265 mv "${i}" "${i}.info" || die "mv info failed"
266 done
267
268 # move man pages to the correct place
269 for m in "${D}"/usr/share/man/man1/* ; do
270 mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed"
271 done
272
273 # avoid collision between slots, see bug #169033 e.g.
274 rm "${D}"/usr/share/emacs/site-lisp/subdirs.el
275 rm -rf "${D}"/usr/share/{applications,icons}
276 rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores
277 keepdir /var/lib/games/emacs
278
279 local c=";;"
280 if use source; then
281 insinto /usr/share/emacs/${FULL_VERSION}/src
282 # This is not meant to install all the source -- just the
283 # C source you might find via find-function
284 doins src/*.[ch]
285 c=""
286 fi
287
288 sed 's/^X//' >"${SITEFILE}" <<-EOF
289 X
290 ;;; ${PN}-${SLOT} site-lisp configuration
291 X
292 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
293 X ${c}(setq find-function-C-source-directory
294 X ${c} "/usr/share/emacs/${FULL_VERSION}/src")
295 X (let ((path (getenv "INFOPATH"))
296 X (dir "/usr/share/info/${EMACS_SUFFIX}")
297 X (re "\\\\\`/usr/share/info\\\\>"))
298 X (and path
299 X ;; move Emacs Info dir before anything else in /usr/share/info
300 X (let* ((p (cons nil (split-string path ":" t))) (q p))
301 X (while (and (cdr q) (not (string-match re (cadr q))))
302 X (setq q (cdr q)))
303 X (setcdr q (cons dir (delete dir (cdr q))))
304 X (setq Info-directory-list (prune-directory-list (cdr p)))))))
305 EOF
306 elisp-site-file-install "${SITEFILE}" || die
307
308 dodoc README BUGS || die "dodoc failed"
309 }
310
311 emacs-infodir-rebuild() {
312 # Depending on the Portage version, the Info dir file is compressed
313 # or removed. It is only rebuilt by Portage if our directory is in
314 # INFOPATH, which is not guaranteed. So we rebuild it ourselves.
315
316 local infodir=/usr/share/info/${EMACS_SUFFIX} f
317 [ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo
318 einfo "Regenerating Info directory index in ${infodir} ..."
319 rm -f "${ROOT}"${infodir}/dir{,.*}
320 for f in "${ROOT}"${infodir}/*.info*; do
321 [[ ${f##*/} != *[0-9].info* && -e ${f} ]] \
322 && install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null
323 done
324 rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty
325 echo
326 }
327
328 pkg_postinst() {
329 local f
330 for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do
331 [ -e "${f}" ] || touch "${f}"
332 done
333
334 elisp-site-regen
335 emacs-infodir-rebuild
336 eselect emacs update ifunset
337
338 echo
339 elog "You can set the version to be started by /usr/bin/emacs through"
340 elog "the Emacs eselect module, which also redirects man and info pages."
341 elog "Therefore, several Emacs versions can be installed at the same time."
342 elog "\"man emacs.eselect\" for details."
343 echo
344 elog "If you upgrade from a previous major version of Emacs, then it is"
345 elog "strongly recommended that you use app-admin/emacs-updater to rebuild"
346 elog "all byte-compiled elisp files of the installed Emacs packages."
347 }
348
349 pkg_postrm() {
350 elisp-site-regen
351 emacs-infodir-rebuild
352 eselect emacs update ifunset
353 }