Gentoo Archives: gentoo-commits

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