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-cvs: emacs-cvs-23.0.91.ebuild ChangeLog
Date: Thu, 26 Feb 2009 06:27:47
Message-Id: E1LcZij-0005WR-JW@stork.gentoo.org
1 ulm 09/02/26 06:27:45
2
3 Modified: ChangeLog
4 Added: emacs-cvs-23.0.91.ebuild
5 Log:
6 New prerelease version from upstream.
7 (Portage version: 2.2_rc23/cvs/Linux i686)
8
9 Revision Changes Path
10 1.236 app-editors/emacs-cvs/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?rev=1.236&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?rev=1.236&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?r1=1.235&r2=1.236
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v
19 retrieving revision 1.235
20 retrieving revision 1.236
21 diff -u -r1.235 -r1.236
22 --- ChangeLog 17 Feb 2009 19:48:07 -0000 1.235
23 +++ ChangeLog 26 Feb 2009 06:27:45 -0000 1.236
24 @@ -1,6 +1,11 @@
25 # ChangeLog for app-editors/emacs-cvs
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v 1.235 2009/02/17 19:48:07 ulm Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v 1.236 2009/02/26 06:27:45 ulm Exp $
29 +
30 +*emacs-cvs-23.0.91 (26 Feb 2009)
31 +
32 + 26 Feb 2009; Ulrich Mueller <ulm@g.o> +emacs-cvs-23.0.91.ebuild:
33 + New prerelease version from upstream.
34
35 17 Feb 2009; Ulrich Mueller <ulm@g.o>
36 emacs-cvs-23.0.60_pre20090125.ebuild, emacs-cvs-23.0.90.ebuild,
37
38
39
40 1.1 app-editors/emacs-cvs/emacs-cvs-23.0.91.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.0.91.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.0.91.ebuild?rev=1.1&content-type=text/plain
44
45 Index: emacs-cvs-23.0.91.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.0.91.ebuild,v 1.1 2009/02/26 06:27:45 ulm Exp $
50
51 EAPI=2
52 WANT_AUTOCONF="latest"
53 WANT_AUTOMAKE="latest"
54
55 inherit autotools elisp-common eutils flag-o-matic
56
57 if [ "${PV##*.}" = "9999" ]; then
58 ECVS_AUTH="pserver"
59 ECVS_SERVER="cvs.savannah.gnu.org:/sources/emacs"
60 ECVS_MODULE="emacs"
61 ECVS_BRANCH="HEAD"
62 ECVS_LOCALNAME="emacs"
63 inherit cvs
64 SRC_URI=""
65 FULL_VERSION=""
66 S="${WORKDIR}/${ECVS_LOCALNAME}"
67 else
68 SRC_URI="mirror://gentoo/emacs-${PV}.tar.gz
69 ftp://alpha.gnu.org/gnu/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 X11 W3C"
81 SLOT="23"
82 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
83 IUSE="alsa dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png spell sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm"
84 RESTRICT="strip"
85
86 RDEPEND="sys-libs/ncurses
87 >=app-admin/eselect-emacs-1.2
88 net-libs/liblockfile
89 hesiod? ( net-dns/hesiod )
90 kerberos? ( virtual/krb5 )
91 spell? ( || ( app-text/aspell app-text/ispell ) )
92 alsa? ( media-libs/alsa-lib )
93 gpm? ( sys-libs/gpm )
94 dbus? ( sys-apps/dbus )
95 X? (
96 x11-libs/libXmu
97 x11-libs/libXt
98 x11-misc/xbitmaps
99 x11-misc/emacs-desktop
100 gif? ( media-libs/giflib )
101 jpeg? ( media-libs/jpeg )
102 png? ( media-libs/libpng )
103 svg? ( >=gnome-base/librsvg-2.0 )
104 tiff? ( media-libs/tiff )
105 xpm? ( x11-libs/libXpm )
106 xft? (
107 media-libs/fontconfig
108 media-libs/freetype
109 x11-libs/libXft
110 m17n-lib? (
111 >=dev-libs/libotf-0.9.4
112 >=dev-libs/m17n-lib-1.5.1
113 )
114 )
115 gtk? ( x11-libs/gtk+:2 )
116 !gtk? (
117 Xaw3d? ( x11-libs/Xaw3d )
118 !Xaw3d? ( motif? ( x11-libs/openmotif ) )
119 )
120 )"
121
122 DEPEND="${RDEPEND}
123 dev-util/pkgconfig
124 gzip-el? ( app-arch/gzip )"
125
126 EMACS_SUFFIX="emacs-${SLOT}"
127 SITEFILE="20${PN}-${SLOT}-gentoo.el"
128
129 src_prepare() {
130 if [ -z "${FULL_VERSION}" ]; 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 sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \
143 -e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \
144 "${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings"
145
146 if ! use alsa; then
147 # ALSA is detected even if not requested by its USE flag.
148 # Suppress it by supplying pkg-config with a wrong library name.
149 sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
150 || die "unable to sed configure.in"
151 fi
152 if ! use gzip-el; then
153 # Emacs' build system automatically detects the gzip binary and
154 # compresses el files. We don't want that so confuse it with a
155 # wrong binary name
156 sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
157 || die "unable to sed configure.in"
158 fi
159
160 eautoreconf
161 }
162
163 src_configure() {
164 ALLOWED_FLAGS=""
165 strip-flags
166 #unset LDFLAGS
167 replace-flags -O[3-9] -O2
168
169 local myconf
170
171 if use alsa && ! use sound; then
172 echo
173 einfo "Although sound USE flag is disabled you chose to have alsa,"
174 einfo "so sound is switched on anyway."
175 echo
176 myconf="${myconf} --with-sound"
177 else
178 myconf="${myconf} $(use_with sound)"
179 fi
180
181 if use X; then
182 myconf="${myconf} --with-x"
183 myconf="${myconf} $(use_with toolkit-scroll-bars)"
184 myconf="${myconf} $(use_with gif) $(use_with jpeg)"
185 myconf="${myconf} $(use_with png) $(use_with svg rsvg)"
186 myconf="${myconf} $(use_with tiff) $(use_with xpm)"
187 myconf="${myconf} $(use_with xft freetype) $(use_with xft)"
188
189 if use xft; then
190 myconf="${myconf} $(use_with m17n-lib libotf)"
191 myconf="${myconf} $(use_with m17n-lib m17n-flt)"
192 else
193 myconf="${myconf} --without-libotf --without-m17n-flt"
194 use m17n-lib && einfo \
195 "USE flag \"m17n-lib\" has no effect because xft is not set."
196 fi
197
198 # GTK+ is the default toolkit if USE=gtk is chosen with other
199 # possibilities. Emacs upstream thinks this should be standard
200 # policy on all distributions
201 if use gtk; then
202 einfo "Configuring to build with GIMP Toolkit (GTK+)"
203 myconf="${myconf} --with-x-toolkit=gtk"
204 elif use Xaw3d; then
205 einfo "Configuring to build with Xaw3d (Athena/Lucid) toolkit"
206 myconf="${myconf} --with-x-toolkit=athena"
207 elif use motif; then
208 einfo "Configuring to build with Motif toolkit"
209 myconf="${myconf} --with-x-toolkit=motif"
210 else
211 einfo "Configuring to build with no toolkit"
212 myconf="${myconf} --with-x-toolkit=no"
213 fi
214
215 local f tk=
216 for f in gtk Xaw3d motif; do
217 use ${f} || continue
218 [ "${tk}" ] \
219 && ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")"
220 tk="${tk}${tk:+ }${f}"
221 done
222 else
223 myconf="${myconf} --without-x"
224 fi
225
226 myconf="${myconf} $(use_with hesiod)"
227 myconf="${myconf} $(use_with kerberos) $(use_with kerberos kerberos5)"
228 myconf="${myconf} $(use_with gpm) $(use_with dbus)"
229
230 econf \
231 --program-suffix=-${EMACS_SUFFIX} \
232 --infodir=/usr/share/info/${EMACS_SUFFIX} \
233 ${myconf} || die "econf emacs failed"
234 }
235
236 src_compile() {
237 export SANDBOX_ON=0 # for the unbelievers, see Bug #131505
238 if [ "${PV##*.}" = "9999" ]; then
239 emake CC="$(tc-getCC)" bootstrap || die "make bootstrap failed"
240 # cleanup, otherwise emacs will be dumped again in src_install
241 (cd src; emake versionclean)
242 fi
243 emake CC="$(tc-getCC)" || die "emake failed"
244 }
245
246 src_install () {
247 local i m
248
249 emake install DESTDIR="${D}" || die "make install failed"
250
251 rm "${D}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
252 || die "removing duplicate emacs executable failed"
253 mv "${D}"/usr/bin/emacs-${EMACS_SUFFIX} "${D}"/usr/bin/${EMACS_SUFFIX} \
254 || die "moving Emacs executable failed"
255
256 # move info documentation to the correct place
257 for i in "${D}"/usr/share/info/${EMACS_SUFFIX}/*; do
258 mv "${i}" "${i}.info" || die "mv info failed"
259 done
260
261 # move man pages to the correct place
262 for m in "${D}"/usr/share/man/man1/* ; do
263 mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed"
264 done
265
266 # avoid collision between slots, see bug #169033 e.g.
267 rm "${D}"/usr/share/emacs/site-lisp/subdirs.el
268 rm -rf "${D}"/usr/share/{applications,icons}
269 rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores
270 keepdir /usr/share/emacs/site-lisp
271 keepdir /var/lib/games/emacs
272
273 local c=";;"
274 if use source; then
275 insinto /usr/share/emacs/${FULL_VERSION}/src
276 # This is not meant to install all the source -- just the
277 # C source you might find via find-function
278 doins src/*.[ch]
279 c=""
280 fi
281
282 sed 's/^X//' >"${SITEFILE}" <<-EOF
283 X
284 ;;; ${PN}-${SLOT} site-lisp configuration
285 X
286 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
287 X ${c}(setq find-function-C-source-directory
288 X ${c} "/usr/share/emacs/${FULL_VERSION}/src")
289 X (let ((path (getenv "INFOPATH"))
290 X (dir "/usr/share/info/${EMACS_SUFFIX}"))
291 X (and path
292 X ;; move Emacs Info dir to beginning of list
293 X (setq Info-directory-list
294 X (cons dir (delete dir (split-string path ":" t)))))))
295 EOF
296 elisp-site-file-install "${SITEFILE}" || die
297
298 dodoc README BUGS || die "dodoc failed"
299 }
300
301 emacs-infodir-rebuild() {
302 # Depending on the Portage version, the Info dir file is compressed
303 # or removed. It is only rebuilt by Portage if our directory is in
304 # INFOPATH, which is not guaranteed. So we rebuild it ourselves.
305
306 local infodir=/usr/share/info/${EMACS_SUFFIX} f
307 [ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo
308 einfo "Regenerating Info directory index in ${infodir} ..."
309 rm -f "${ROOT}"${infodir}/dir{,.*}
310 for f in "${ROOT}"${infodir}/*.info*; do
311 [[ ${f##*/} != *[0-9].info* && -e ${f} ]] \
312 && install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null
313 done
314 rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty
315 echo
316 }
317
318 pkg_postinst() {
319 [ -f "${ROOT}"/usr/share/emacs/site-lisp/subdirs.el ] \
320 || cp "${ROOT}"/usr/share/emacs{/${FULL_VERSION},}/site-lisp/subdirs.el
321
322 local f
323 for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do
324 [ -e "${f}" ] || touch "${f}"
325 done
326
327 elisp-site-regen
328 emacs-infodir-rebuild
329 eselect emacs update ifunset
330
331 echo
332 elog "You can set the version to be started by /usr/bin/emacs through"
333 elog "the Emacs eselect module, which also redirects man and info pages."
334 elog "You can therefore test emacs-cvs along with the stable release."
335 elog "\"man emacs.eselect\" for details."
336 }
337
338 pkg_postrm() {
339 elisp-site-regen
340 emacs-infodir-rebuild
341 eselect emacs update ifunset
342 }