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.1.95.ebuild emacs-vcs-23.1.91.ebuild emacs-vcs-23.1.92.ebuild emacs-vcs-23.1.90-r1.ebuild
Date: Sat, 03 Apr 2010 11:19:11
Message-Id: E1Ny1Nc-0002gw-He@stork.gentoo.org
1 ulm 10/04/03 11:19:08
2
3 Modified: ChangeLog
4 Added: emacs-vcs-23.1.95.ebuild
5 Removed: emacs-vcs-23.1.91.ebuild emacs-vcs-23.1.92.ebuild
6 emacs-vcs-23.1.90-r1.ebuild
7 Log:
8 New pretest version. Remove old.
9 (Portage version: 2.2_rc67/cvs/Linux i686)
10
11 Revision Changes Path
12 1.13 app-editors/emacs-vcs/ChangeLog
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.13&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.13&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/ChangeLog?r1=1.12&r2=1.13
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v
21 retrieving revision 1.12
22 retrieving revision 1.13
23 diff -u -r1.12 -r1.13
24 --- ChangeLog 11 Mar 2010 16:40:08 -0000 1.12
25 +++ ChangeLog 3 Apr 2010 11:19:08 -0000 1.13
26 @@ -1,6 +1,13 @@
27 # ChangeLog for app-editors/emacs-vcs
28 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.12 2010/03/11 16:40:08 ulm Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.13 2010/04/03 11:19:08 ulm Exp $
31 +
32 +*emacs-vcs-23.1.95 (03 Apr 2010)
33 +
34 + 03 Apr 2010; Ulrich Mueller <ulm@g.o> -emacs-vcs-23.1.90-r1.ebuild,
35 + -emacs-vcs-23.1.91.ebuild, -emacs-vcs-23.1.92.ebuild,
36 + +emacs-vcs-23.1.95.ebuild:
37 + New pretest version. Remove old.
38
39 *emacs-vcs-23.1.94 (11 Mar 2010)
40
41
42
43
44 1.1 app-editors/emacs-vcs/emacs-vcs-23.1.95.ebuild
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-23.1.95.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-23.1.95.ebuild?rev=1.1&content-type=text/plain
48
49 Index: emacs-vcs-23.1.95.ebuild
50 ===================================================================
51 # Copyright 1999-2010 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-23.1.95.ebuild,v 1.1 2010/04/03 11:19:08 ulm Exp $
54
55 EAPI=2
56
57 inherit autotools elisp-common eutils flag-o-matic
58
59 if [ "${PV##*.}" = "9999" ]; then
60 inherit bzr
61 EMACS_BRANCH="emacs-23"
62 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/emacs/${EMACS_BRANCH}/"
63 EBZR_CACHE_DIR="emacs-${EMACS_BRANCH#emacs-}"
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 ~sparc-fbsd ~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? ( media-libs/jpeg:0 )
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}-vcs"
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 branch: ${EMACS_BRANCH}"
136 einfo "Emacs version number: ${FULL_VERSION}"
137 [ "${FULL_VERSION%.*}" = ${PV%.*} ] \
138 || die "Upstream version number changed to ${FULL_VERSION}"
139 echo
140 #else
141 # EPATCH_SUFFIX=patch epatch
142 fi
143
144 sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \
145 -e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \
146 "${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings"
147
148 if ! use alsa; then
149 # ALSA is detected even if not requested by its USE flag.
150 # Suppress it by supplying pkg-config with a wrong library name.
151 sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
152 || die "unable to sed configure.in"
153 fi
154 if ! use gzip-el; then
155 # Emacs' build system automatically detects the gzip binary and
156 # compresses el files. We don't want that so confuse it with a
157 # wrong binary name
158 sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
159 || die "unable to sed configure.in"
160 fi
161
162 eautoreconf
163 }
164
165 src_configure() {
166 ALLOWED_FLAGS=""
167 strip-flags
168 #unset LDFLAGS
169 if use sh; then
170 replace-flags -O[1-9] -O0 #262359
171 else
172 replace-flags -O[3-9] -O2
173 fi
174
175 local myconf
176
177 if use alsa && ! use sound; then
178 echo
179 einfo "Although sound USE flag is disabled you chose to have alsa,"
180 einfo "so sound is switched on anyway."
181 echo
182 myconf="${myconf} --with-sound"
183 else
184 myconf="${myconf} $(use_with sound)"
185 fi
186
187 if use X; then
188 myconf="${myconf} --with-x"
189 myconf="${myconf} $(use_with gconf)"
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 }
326
327 pkg_postinst() {
328 local f
329 for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do
330 [ -e "${f}" ] || touch "${f}"
331 done
332
333 elisp-site-regen
334 emacs-infodir-rebuild
335 eselect emacs update ifunset
336
337 if use X; then
338 echo
339 elog "You need to install some fonts for Emacs."
340 elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's"
341 elog "machine would satisfy basic Emacs requirements under X11."
342 elog "See also http://www.gentoo.org/proj/en/lisp/emacs/xft.xml"
343 elog "for how to enable anti-aliased fonts."
344 fi
345
346 echo
347 elog "You can set the version to be started by /usr/bin/emacs through"
348 elog "the Emacs eselect module, which also redirects man and info pages."
349 elog "Therefore, several Emacs versions can be installed at the same time."
350 elog "\"man emacs.eselect\" for details."
351 echo
352 elog "If you upgrade from a previous major version of Emacs, then it is"
353 elog "strongly recommended that you use app-admin/emacs-updater to rebuild"
354 elog "all byte-compiled elisp files of the installed Emacs packages."
355 }
356
357 pkg_postrm() {
358 elisp-site-regen
359 emacs-infodir-rebuild
360 eselect emacs update ifunset
361 }