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