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