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.91.ebuild
Date: Thu, 31 Dec 2009 12:26:53
Message-Id: E1NQJum-00014o-RQ@stork.gentoo.org
1 ulm 09/12/31 12:14:04
2
3 Modified: ChangeLog
4 Added: emacs-vcs-23.1.91.ebuild
5 Log:
6 New pretest version.
7 (Portage version: 2.2_rc61/cvs/Linux i686)
8
9 Revision Changes Path
10 1.2 app-editors/emacs-vcs/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/ChangeLog?r1=1.1&r2=1.2
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- ChangeLog 27 Dec 2009 18:48:45 -0000 1.1
23 +++ ChangeLog 31 Dec 2009 12:14:04 -0000 1.2
24 @@ -1,6 +1,11 @@
25 # ChangeLog for app-editors/emacs-vcs
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.1 2009/12/27 18:48:45 ulm Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.2 2009/12/31 12:14:04 ulm Exp $
29 +
30 +*emacs-vcs-23.1.91 (31 Dec 2009)
31 +
32 + 31 Dec 2009; Ulrich Mueller <ulm@g.o> +emacs-vcs-23.1.91.ebuild:
33 + New pretest version.
34
35 *emacs-vcs-23.1.9999-r2 (27 Dec 2009)
36 *emacs-vcs-23.1.90-r1 (27 Dec 2009)
37
38
39
40 1.1 app-editors/emacs-vcs/emacs-vcs-23.1.91.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-23.1.91.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-23.1.91.ebuild?rev=1.1&content-type=text/plain
44
45 Index: emacs-vcs-23.1.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-vcs/emacs-vcs-23.1.91.ebuild,v 1.1 2009/12/31 12:14:04 ulm Exp $
50
51 EAPI=2
52
53 inherit autotools elisp-common eutils flag-o-matic
54
55 if [ "${PV##*.}" = "9999" ]; then
56 inherit bzr
57 EMACS_BRANCH="trunk"
58 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/emacs/${EMACS_BRANCH}/"
59 EBZR_CACHE_DIR="emacs-${EMACS_BRANCH}"
60 SRC_URI=""
61 else
62 SRC_URI="mirror://gentoo/emacs-${PV}.tar.gz
63 ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-${PV}.tar.gz"
64 # FULL_VERSION keeps the full version number, which is needed in
65 # order to determine some path information correctly for copy/move
66 # operations later on
67 FULL_VERSION="${PV%%_*}"
68 S="${WORKDIR}/emacs-${FULL_VERSION}"
69 fi
70
71 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
72 HOMEPAGE="http://www.gnu.org/software/emacs/"
73
74 LICENSE="GPL-3 FDL-1.3 BSD as-is MIT W3C unicode"
75 SLOT="23"
76 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
77 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"
78 RESTRICT="strip"
79
80 RDEPEND="sys-libs/ncurses
81 >=app-admin/eselect-emacs-1.2
82 net-libs/liblockfile
83 hesiod? ( net-dns/hesiod )
84 kerberos? ( virtual/krb5 )
85 alsa? ( media-libs/alsa-lib )
86 gpm? ( sys-libs/gpm )
87 dbus? ( sys-apps/dbus )
88 X? (
89 x11-libs/libXmu
90 x11-libs/libXt
91 x11-misc/xbitmaps
92 gconf? ( >=gnome-base/gconf-2.26.2 )
93 gif? ( media-libs/giflib )
94 jpeg? ( media-libs/jpeg )
95 png? ( media-libs/libpng )
96 svg? ( >=gnome-base/librsvg-2.0 )
97 tiff? ( media-libs/tiff )
98 xpm? ( x11-libs/libXpm )
99 xft? (
100 media-libs/fontconfig
101 media-libs/freetype
102 x11-libs/libXft
103 m17n-lib? (
104 >=dev-libs/libotf-0.9.4
105 >=dev-libs/m17n-lib-1.5.1
106 )
107 )
108 gtk? ( x11-libs/gtk+:2 )
109 !gtk? (
110 Xaw3d? ( x11-libs/Xaw3d )
111 !Xaw3d? ( motif? ( x11-libs/openmotif ) )
112 )
113 )"
114
115 DEPEND="${RDEPEND}
116 dev-util/pkgconfig
117 gzip-el? ( app-arch/gzip )"
118
119 RDEPEND="${RDEPEND}
120 >=app-emacs/emacs-common-gentoo-1[X?]"
121
122 EMACS_SUFFIX="emacs-${SLOT}-vcs"
123 SITEFILE="20${PN}-${SLOT}-gentoo.el"
124
125 src_prepare() {
126 if [ "${PV##*.}" = "9999" ]; then
127 FULL_VERSION=$(grep 'defconst[ ]*emacs-version' lisp/version.el \
128 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/')
129 [ "${FULL_VERSION}" ] || die "Cannot determine current Emacs version"
130 echo
131 einfo "Emacs branch: ${EMACS_BRANCH}"
132 einfo "Emacs version number: ${FULL_VERSION}"
133 [ "${FULL_VERSION%.*}" = ${PV%.*} ] \
134 || die "Upstream version number changed to ${FULL_VERSION}"
135 echo
136 #else
137 # EPATCH_SUFFIX=patch epatch
138 fi
139
140 sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \
141 -e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \
142 "${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings"
143
144 if ! use alsa; then
145 # ALSA is detected even if not requested by its USE flag.
146 # Suppress it by supplying pkg-config with a wrong library name.
147 sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
148 || die "unable to sed configure.in"
149 fi
150 if ! use gzip-el; then
151 # Emacs' build system automatically detects the gzip binary and
152 # compresses el files. We don't want that so confuse it with a
153 # wrong binary name
154 sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
155 || die "unable to sed configure.in"
156 fi
157
158 eautoreconf
159 }
160
161 src_configure() {
162 ALLOWED_FLAGS=""
163 strip-flags
164 #unset LDFLAGS
165 if use sh; then
166 replace-flags -O[1-9] -O0 #262359
167 else
168 replace-flags -O[3-9] -O2
169 fi
170
171 local myconf
172
173 if use alsa && ! use sound; then
174 echo
175 einfo "Although sound USE flag is disabled you chose to have alsa,"
176 einfo "so sound is switched on anyway."
177 echo
178 myconf="${myconf} --with-sound"
179 else
180 myconf="${myconf} $(use_with sound)"
181 fi
182
183 if use X; then
184 myconf="${myconf} --with-x"
185 myconf="${myconf} $(use_with gconf)"
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)"
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 && ewarn \
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 /var/lib/games/emacs
274
275 local c=";;"
276 if use source; then
277 insinto /usr/share/emacs/${FULL_VERSION}/src
278 # This is not meant to install all the source -- just the
279 # C source you might find via find-function
280 doins src/*.[ch]
281 c=""
282 fi
283
284 sed 's/^X//' >"${SITEFILE}" <<-EOF
285 X
286 ;;; ${PN}-${SLOT} site-lisp configuration
287 X
288 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
289 X ${c}(setq find-function-C-source-directory
290 X ${c} "/usr/share/emacs/${FULL_VERSION}/src")
291 X (let ((path (getenv "INFOPATH"))
292 X (dir "/usr/share/info/${EMACS_SUFFIX}")
293 X (re "\\\\\`/usr/share/info\\\\>"))
294 X (and path
295 X ;; move Emacs Info dir before anything else in /usr/share/info
296 X (let* ((p (cons nil (split-string path ":" t))) (q p))
297 X (while (and (cdr q) (not (string-match re (cadr q))))
298 X (setq q (cdr q)))
299 X (setcdr q (cons dir (delete dir (cdr q))))
300 X (setq Info-directory-list (prune-directory-list (cdr p)))))))
301 EOF
302 elisp-site-file-install "${SITEFILE}" || die
303
304 dodoc README BUGS || die "dodoc failed"
305 }
306
307 emacs-infodir-rebuild() {
308 # Depending on the Portage version, the Info dir file is compressed
309 # or removed. It is only rebuilt by Portage if our directory is in
310 # INFOPATH, which is not guaranteed. So we rebuild it ourselves.
311
312 local infodir=/usr/share/info/${EMACS_SUFFIX} f
313 [ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo
314 einfo "Regenerating Info directory index in ${infodir} ..."
315 rm -f "${ROOT}"${infodir}/dir{,.*}
316 for f in "${ROOT}"${infodir}/*.info*; do
317 [[ ${f##*/} != *[0-9].info* && -e ${f} ]] \
318 && install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null
319 done
320 rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty
321 echo
322 }
323
324 pkg_postinst() {
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 "Therefore, several Emacs versions can be installed at the same time."
338 elog "\"man emacs.eselect\" for details."
339 echo
340 elog "If you upgrade from a previous major version of Emacs, then it is"
341 elog "strongly recommended that you use app-admin/emacs-updater to rebuild"
342 elog "all byte-compiled elisp files of the installed Emacs packages."
343 }
344
345 pkg_postrm() {
346 elisp-site-regen
347 emacs-infodir-rebuild
348 eselect emacs update ifunset
349 }