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: ChangeLog emacs-cvs-23.0.92.ebuild
Date: Tue, 31 Mar 2009 04:52:39
Message-Id: E1LoVxl-00014h-8D@stork.gentoo.org
1 ulm 09/03/31 04:52:37
2
3 Modified: ChangeLog
4 Added: emacs-cvs-23.0.92.ebuild
5 Log:
6 New prerelease version from upstream.
7 (Portage version: 2.2_rc27/cvs/Linux i686)
8
9 Revision Changes Path
10 1.240 app-editors/emacs-cvs/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?rev=1.240&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?rev=1.240&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?r1=1.239&r2=1.240
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v
19 retrieving revision 1.239
20 retrieving revision 1.240
21 diff -u -r1.239 -r1.240
22 --- ChangeLog 26 Mar 2009 20:25:00 -0000 1.239
23 +++ ChangeLog 31 Mar 2009 04:52:37 -0000 1.240
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.239 2009/03/26 20:25:00 ulm Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v 1.240 2009/03/31 04:52:37 ulm Exp $
29 +
30 +*emacs-cvs-23.0.92 (31 Mar 2009)
31 +
32 + 31 Mar 2009; Ulrich Mueller <ulm@g.o> +emacs-cvs-23.0.92.ebuild:
33 + New prerelease version from upstream.
34
35 26 Mar 2009; Ulrich Mueller <ulm@g.o> emacs-cvs-23.0.90.ebuild,
36 emacs-cvs-23.0.91.ebuild, emacs-cvs-23.0.9999-r1.ebuild:
37
38
39
40 1.1 app-editors/emacs-cvs/emacs-cvs-23.0.92.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.0.92.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-23.0.92.ebuild?rev=1.1&content-type=text/plain
44
45 Index: emacs-cvs-23.0.92.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.92.ebuild,v 1.1 2009/03/31 04:52:37 ulm Exp $
50
51 EAPI=2
52
53 inherit autotools elisp-common eutils flag-o-matic
54
55 if [ "${PV##*.}" = "9999" ]; then
56 ECVS_AUTH="pserver"
57 ECVS_SERVER="cvs.savannah.gnu.org:/sources/emacs"
58 ECVS_MODULE="emacs"
59 ECVS_BRANCH="HEAD"
60 ECVS_LOCALNAME="emacs"
61 inherit cvs
62 SRC_URI=""
63 FULL_VERSION=""
64 S="${WORKDIR}/${ECVS_LOCALNAME}"
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 X11 W3C"
79 SLOT="23"
80 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
81 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"
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 gif? ( media-libs/giflib )
97 jpeg? ( media-libs/jpeg )
98 png? ( media-libs/libpng )
99 svg? ( >=gnome-base/librsvg-2.0 )
100 tiff? ( media-libs/tiff )
101 xpm? ( x11-libs/libXpm )
102 xft? (
103 media-libs/fontconfig
104 media-libs/freetype
105 x11-libs/libXft
106 m17n-lib? (
107 >=dev-libs/libotf-0.9.4
108 >=dev-libs/m17n-lib-1.5.1
109 )
110 )
111 gtk? ( x11-libs/gtk+:2 )
112 !gtk? (
113 Xaw3d? ( x11-libs/Xaw3d )
114 !Xaw3d? ( motif? ( x11-libs/openmotif ) )
115 )
116 )"
117
118 DEPEND="${RDEPEND}
119 dev-util/pkgconfig
120 gzip-el? ( app-arch/gzip )"
121
122 RDEPEND="${RDEPEND}
123 >=app-emacs/emacs-common-gentoo-1[X?]
124 spell? ( || ( app-text/aspell app-text/ispell ) )"
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 /var/lib/games/emacs
271
272 local c=";;"
273 if use source; then
274 insinto /usr/share/emacs/${FULL_VERSION}/src
275 # This is not meant to install all the source -- just the
276 # C source you might find via find-function
277 doins src/*.[ch]
278 c=""
279 fi
280
281 sed 's/^X//' >"${SITEFILE}" <<-EOF
282 X
283 ;;; ${PN}-${SLOT} site-lisp configuration
284 X
285 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
286 X ${c}(setq find-function-C-source-directory
287 X ${c} "/usr/share/emacs/${FULL_VERSION}/src")
288 X (let ((path (getenv "INFOPATH"))
289 X (dir "/usr/share/info/${EMACS_SUFFIX}"))
290 X (and path
291 X ;; move Emacs Info dir to beginning of list
292 X (setq Info-directory-list
293 X (cons dir (delete dir (split-string path ":" t)))))))
294 EOF
295 elisp-site-file-install "${SITEFILE}" || die
296
297 dodoc README BUGS || die "dodoc failed"
298 }
299
300 emacs-infodir-rebuild() {
301 # Depending on the Portage version, the Info dir file is compressed
302 # or removed. It is only rebuilt by Portage if our directory is in
303 # INFOPATH, which is not guaranteed. So we rebuild it ourselves.
304
305 local infodir=/usr/share/info/${EMACS_SUFFIX} f
306 [ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo
307 einfo "Regenerating Info directory index in ${infodir} ..."
308 rm -f "${ROOT}"${infodir}/dir{,.*}
309 for f in "${ROOT}"${infodir}/*.info*; do
310 [[ ${f##*/} != *[0-9].info* && -e ${f} ]] \
311 && install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null
312 done
313 rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty
314 echo
315 }
316
317 pkg_postinst() {
318 local f
319 for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do
320 [ -e "${f}" ] || touch "${f}"
321 done
322
323 elisp-site-regen
324 emacs-infodir-rebuild
325 eselect emacs update ifunset
326
327 echo
328 elog "You can set the version to be started by /usr/bin/emacs through"
329 elog "the Emacs eselect module, which also redirects man and info pages."
330 elog "You can therefore test emacs-cvs along with the stable release."
331 elog "\"man emacs.eselect\" for details."
332 }
333
334 pkg_postrm() {
335 elisp-site-regen
336 emacs-infodir-rebuild
337 eselect emacs update ifunset
338 }