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-22.2.91.ebuild
Date: Tue, 26 Aug 2008 21:09:52
Message-Id: E1KY5nN-0000eG-D5@stork.gentoo.org
1 ulm 08/08/26 21:09:45
2
3 Modified: ChangeLog
4 Added: emacs-cvs-22.2.91.ebuild
5 Log:
6 New pretest version.
7 (Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 i686)
8
9 Revision Changes Path
10 1.213 app-editors/emacs-cvs/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?rev=1.213&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?rev=1.213&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/ChangeLog?r1=1.212&r2=1.213
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v
19 retrieving revision 1.212
20 retrieving revision 1.213
21 diff -u -r1.212 -r1.213
22 --- ChangeLog 20 Aug 2008 15:34:02 -0000 1.212
23 +++ ChangeLog 26 Aug 2008 21:09:44 -0000 1.213
24 @@ -1,6 +1,11 @@
25 # ChangeLog for app-editors/emacs-cvs
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v 1.212 2008/08/20 15:34:02 ulm Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-cvs/ChangeLog,v 1.213 2008/08/26 21:09:44 ulm Exp $
29 +
30 +*emacs-cvs-22.2.91 (26 Aug 2008)
31 +
32 + 26 Aug 2008; Ulrich Mueller <ulm@g.o> +emacs-cvs-22.2.91.ebuild:
33 + New pretest version.
34
35 20 Aug 2008; Ulrich Mueller <ulm@g.o>
36 -files/emacs-cvs-freebsd-sparc.patch,
37
38
39
40 1.1 app-editors/emacs-cvs/emacs-cvs-22.2.91.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-22.2.91.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs-cvs/emacs-cvs-22.2.91.ebuild?rev=1.1&content-type=text/plain
44
45 Index: emacs-cvs-22.2.91.ebuild
46 ===================================================================
47 # Copyright 1999-2008 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-22.2.91.ebuild,v 1.1 2008/08/26 21:09:44 ulm Exp $
50
51 inherit autotools elisp-common eutils flag-o-matic
52
53 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
54 HOMEPAGE="http://www.gnu.org/software/emacs/"
55 SRC_URI="ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-${PV}.tar.gz"
56
57 LICENSE="GPL-3 FDL-1.2 BSD"
58 SLOT="22"
59 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
60 IUSE="alsa gif gtk gzip-el hesiod jpeg kerberos motif png spell sound source tiff toolkit-scroll-bars X Xaw3d xpm"
61 RESTRICT="strip"
62
63 RDEPEND="sys-libs/ncurses
64 >=app-admin/eselect-emacs-1.2
65 net-libs/liblockfile
66 hesiod? ( net-dns/hesiod )
67 kerberos? ( virtual/krb5 )
68 spell? ( || ( app-text/ispell app-text/aspell ) )
69 alsa? ( media-libs/alsa-lib )
70 X? (
71 x11-libs/libXmu
72 x11-libs/libXt
73 x11-misc/xbitmaps
74 x11-misc/emacs-desktop
75 gif? ( media-libs/giflib )
76 jpeg? ( media-libs/jpeg )
77 tiff? ( media-libs/tiff )
78 png? ( media-libs/libpng )
79 xpm? ( x11-libs/libXpm )
80 gtk? ( =x11-libs/gtk+-2* )
81 !gtk? (
82 Xaw3d? ( x11-libs/Xaw3d )
83 !Xaw3d? ( motif? ( x11-libs/openmotif ) )
84 )
85 )"
86
87 DEPEND="${RDEPEND}
88 alsa? ( dev-util/pkgconfig )
89 X? ( gtk? ( dev-util/pkgconfig ) )
90 gzip-el? ( app-arch/gzip )"
91
92 S="${WORKDIR}/emacs-${PV}"
93
94 # FULL_VERSION keeps the full version number, which is needed in order to
95 # determine some path information correctly for copy/move operations later on
96 FULL_VERSION="${PV}"
97 EMACS_SUFFIX="emacs-${SLOT}-cvs"
98
99 src_unpack() {
100 unpack ${A}
101 cd "${S}"
102
103 epatch "${FILESDIR}/${PN}-Xaw3d-headers.patch"
104 epatch "${FILESDIR}/${PN}-freebsd-sparc-1.patch"
105
106 sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \
107 -e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \
108 "${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings"
109
110 if ! use alsa; then
111 # ALSA is detected even if not requested by its USE flag.
112 # Suppress it by supplying pkg-config with a wrong library name.
113 sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
114 || die "unable to sed configure.in"
115 fi
116 if ! use gzip-el; then
117 # Emacs' build system automatically detects the gzip binary and
118 # compresses el files. We don't want that so confuse it with a
119 # wrong binary name
120 sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
121 || die "unable to sed configure.in"
122 fi
123
124 eautoreconf
125 }
126
127 src_compile() {
128 export SANDBOX_ON=0 # for the unbelievers, see Bug #131505
129 ALLOWED_FLAGS=""
130 strip-flags
131 #unset LDFLAGS
132 replace-flags -O[3-9] -O2
133 sed -i -e "s/-lungif/-lgif/g" configure* src/Makefile* || die
134
135 local myconf
136
137 if use alsa && ! use sound; then
138 echo
139 einfo "Although sound USE flag is disabled you chose to have alsa,"
140 einfo "so sound is switched on anyway."
141 echo
142 myconf="${myconf} --with-sound"
143 else
144 myconf="${myconf} $(use_with sound)"
145 fi
146
147 if use X; then
148 myconf="${myconf} --with-x"
149 myconf="${myconf} $(use_with toolkit-scroll-bars)"
150 myconf="${myconf} $(use_with jpeg) $(use_with tiff)"
151 myconf="${myconf} $(use_with gif) $(use_with png)"
152 myconf="${myconf} $(use_with xpm)"
153
154 # GTK+ is the default toolkit if USE=gtk is chosen with other
155 # possibilities. Emacs upstream thinks this should be standard
156 # policy on all distributions
157 if use gtk; then
158 einfo "Configuring to build with GIMP Toolkit (GTK+)"
159 myconf="${myconf} --with-x-toolkit=gtk"
160 elif use Xaw3d; then
161 einfo "Configuring to build with Xaw3d (Athena) toolkit"
162 myconf="${myconf} --with-x-toolkit=athena"
163 myconf="${myconf} --without-gtk"
164 elif use motif; then
165 einfo "Configuring to build with Motif toolkit"
166 myconf="${myconf} --with-x-toolkit=motif"
167 myconf="${myconf} --without-gtk"
168 else
169 einfo "Configuring to build with no toolkit"
170 myconf="${myconf} --with-x-toolkit=no"
171 myconf="${myconf} --without-gtk"
172 fi
173
174 local f tk=
175 for f in gtk Xaw3d motif; do
176 use ${f} || continue
177 [ "${tk}" ] \
178 && ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")"
179 tk="${tk}${tk:+ }${f}"
180 done
181 else
182 myconf="${myconf} --without-x"
183 fi
184
185 myconf="${myconf} $(use_with hesiod)"
186 myconf="${myconf} $(use_with kerberos) $(use_with kerberos kerberos5)"
187
188 econf \
189 --program-suffix=-${EMACS_SUFFIX} \
190 --infodir=/usr/share/info/${EMACS_SUFFIX} \
191 --without-carbon \
192 ${myconf} || die "econf emacs failed"
193
194 emake CC="$(tc-getCC)" || die "emake failed"
195 # cleanup, otherwise emacs will be dumped again in src_install
196 #(cd src; emake versionclean)
197 #emake CC="$(tc-getCC)" || die "emake failed"
198 }
199
200 src_install () {
201 local i m
202
203 emake install DESTDIR="${D}" || die "make install failed"
204
205 rm "${D}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
206 || die "removing duplicate emacs executable failed"
207 mv "${D}"/usr/bin/emacs-${EMACS_SUFFIX} "${D}"/usr/bin/${EMACS_SUFFIX} \
208 || die "moving Emacs executable failed"
209
210 # move info documentation to the correct place
211 einfo "Fixing info documentation ..."
212 for i in "${D}"/usr/share/info/${EMACS_SUFFIX}/*; do
213 mv "${i}" "${i}.info" || die "mv info failed"
214 done
215
216 # move man pages to the correct place
217 einfo "Fixing manpages ..."
218 for m in "${D}"/usr/share/man/man1/* ; do
219 mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed"
220 done
221
222 # avoid collision between slots, see bug #169033 e.g.
223 rm "${D}"/usr/share/emacs/site-lisp/subdirs.el
224 rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores
225 keepdir /usr/share/emacs/site-lisp
226 keepdir /var/lib/games/emacs
227
228 if use source; then
229 insinto /usr/share/emacs/${FULL_VERSION}/src
230 # This is not meant to install all the source -- just the
231 # C source you might find via find-function
232 doins src/*.[ch]
233 sed 's/^X//' >10${PN}-${SLOT}-gentoo.el <<-EOF
234
235 ;;; ${PN}-${SLOT} site-lisp configuration
236
237 (if (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
238 X (setq find-function-C-source-directory
239 X "/usr/share/emacs/${FULL_VERSION}/src"))
240 EOF
241 elisp-site-file-install 10${PN}-${SLOT}-gentoo.el
242 fi
243
244 dodoc AUTHORS BUGS CONTRIBUTE README || die "dodoc failed"
245 }
246
247 emacs-infodir-rebuild() {
248 # Depending on the Portage version, the Info dir file is compressed
249 # or removed. It is only rebuilt by Portage if our directory is in
250 # INFOPATH, which is not guaranteed. So we rebuild it ourselves.
251
252 local infodir=/usr/share/info/${EMACS_SUFFIX} f
253 einfo "Regenerating Info directory index in ${infodir} ..."
254 rm -f "${ROOT}"${infodir}/dir{,.*}
255 for f in "${ROOT}"${infodir}/*.info*; do
256 [[ ${f##*/} == *[0-9].info* ]] \
257 || install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null
258 done
259 rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty
260 echo
261 }
262
263 pkg_postinst() {
264 [ -f "${ROOT}"/usr/share/emacs/site-lisp/subdirs.el ] \
265 || cp "${ROOT}"/usr/share/emacs{/${FULL_VERSION},}/site-lisp/subdirs.el
266
267 local f
268 for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do
269 [ -e "${f}" ] || touch "${f}"
270 done
271
272 elisp-site-regen
273 emacs-infodir-rebuild
274 eselect emacs update ifunset
275
276 if use X; then
277 elog "You need to install some fonts for Emacs. Under monolithic"
278 elog "XFree86/Xorg you typically had such fonts installed by default."
279 elog "With modular Xorg, you will have to perform this step yourself."
280 elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's"
281 elog "machine would satisfy basic Emacs requirements under X11."
282 fi
283
284 echo
285 elog "You can set the version to be started by /usr/bin/emacs through"
286 elog "the Emacs eselect module, which also redirects man and info pages."
287 elog "You can therefore test emacs-cvs along with the stable release."
288 elog "\"man emacs.eselect\" for details."
289 }
290
291 pkg_postrm() {
292 elisp-site-regen
293 emacs-infodir-rebuild
294 eselect emacs update ifunset
295 }