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-21.4-r13.ebuild
Date: Sun, 28 Oct 2007 20:27:42
Message-Id: E1ImEjR-0008Fy-TE@stork.gentoo.org
1 ulm 07/10/28 20:27:37
2
3 Modified: ChangeLog
4 Added: emacs-21.4-r13.ebuild
5 Log:
6 Security fix for bug #197313.
7 (Portage version: 2.1.3.16)
8
9 Revision Changes Path
10 1.190 app-editors/emacs/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.190&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.190&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?r1=1.189&r2=1.190
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v
19 retrieving revision 1.189
20 retrieving revision 1.190
21 diff -u -r1.189 -r1.190
22 --- ChangeLog 24 Oct 2007 09:29:51 -0000 1.189
23 +++ ChangeLog 28 Oct 2007 20:27:37 -0000 1.190
24 @@ -1,6 +1,11 @@
25 # ChangeLog for app-editors/emacs
26 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.189 2007/10/24 09:29:51 ulm Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.190 2007/10/28 20:27:37 ulm Exp $
29 +
30 +*emacs-21.4-r13 (28 Oct 2007)
31 +
32 + 28 Oct 2007; Ulrich Mueller <ulm@g.o> +emacs-21.4-r13.ebuild:
33 + Security fix for crash on malformed GIF images, CVE-2007-2833, bug #197313.
34
35 24 Oct 2007; Ulrich Mueller <ulm@g.o> emacs-22.1-r1.ebuild:
36 Add standard comment to site-init file.
37
38
39
40 1.1 app-editors/emacs/emacs-21.4-r13.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-21.4-r13.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-21.4-r13.ebuild?rev=1.1&content-type=text/plain
44
45 Index: emacs-21.4-r13.ebuild
46 ===================================================================
47 # Copyright 1999-2007 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-21.4-r13.ebuild,v 1.1 2007/10/28 20:27:37 ulm Exp $
50
51 WANT_AUTOCONF="2.1"
52
53 inherit flag-o-matic eutils toolchain-funcs autotools
54
55 DESCRIPTION="An incredibly powerful, extensible text editor"
56 HOMEPAGE="http://www.gnu.org/software/emacs"
57 SRC_URI="mirror://gnu/emacs/${P}a.tar.gz
58 mirror://gentoo/${P}-patches.tar.bz2
59 leim? ( mirror://gnu/emacs/leim-${PV}.tar.gz )"
60
61 LICENSE="GPL-2 FDL-1.1 BSD"
62 SLOT="21"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
64 IUSE="X Xaw3d leim lesstif motif nls sendmail"
65
66 RDEPEND="sys-libs/ncurses
67 X? (
68 x11-libs/libXext
69 x11-libs/libICE
70 x11-libs/libSM
71 x11-libs/libXmu
72 x11-libs/libXpm
73 x11-misc/emacs-desktop
74 >=media-libs/giflib-4.1.0.1b
75 >=media-libs/jpeg-6b-r2
76 >=media-libs/tiff-3.5.5-r3
77 >=media-libs/libpng-1.2.1
78 Xaw3d? ( x11-libs/Xaw3d )
79 motif? (
80 lesstif? ( x11-libs/lesstif )
81 !lesstif? ( >=x11-libs/openmotif-2.1.30 )
82 )
83 )
84 sendmail? ( virtual/mta )
85 >=app-admin/eselect-emacs-0.7-r1"
86
87 DEPEND="${RDEPEND}
88 X? ( x11-misc/xbitmaps )"
89
90 src_unpack() {
91 unpack ${A}
92 cd "${S}"
93
94 sed -i \
95 -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \
96 -e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \
97 "${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings"
98
99 EPATCH_SUFFIX=patch epatch
100
101 # install emacsclient.1 man page (#165466)
102 sed -i -e "s/for page in emacs/& emacsclient/" Makefile.in || die
103
104 # This will need to be updated for X-Compilation
105 sed -i -e "s:/usr/lib/\([^ ]*\).o:/usr/$(get_libdir)/\1.o:g" \
106 "${S}/src/s/gnu-linux.h" || die
107 }
108
109 src_compile() {
110 export SANDBOX_ON=0
111
112 # -fstack-protector gets internal compiler error at xterm.c (bug 33265)
113 filter-flags -fstack-protector
114
115 # emacs doesn't handle LDFLAGS properly (bug #77430 and bug #65002)
116 unset LDFLAGS
117
118 # ever since GCC 3.2
119 replace-flags -O[3-9] -O2
120
121 # -march is known to cause signal 6 on some environment
122 filter-flags "-march=*"
123
124 eautoconf
125
126 local myconf
127 use nls || myconf="${myconf} --disable-nls"
128 if use X ; then
129 if use motif && use lesstif; then
130 append-ldflags -L/usr/X11R6/lib/lesstif -R/usr/X11R6/lib/lesstif
131 append-cppflags -I/usr/X11R6/include/lesstif
132 fi
133 myconf="${myconf}
134 --with-x
135 --with-xpm
136 --with-jpeg
137 --with-tiff
138 --with-gif
139 --with-png"
140 if use Xaw3d ; then
141 myconf="${myconf} --with-x-toolkit=athena"
142 elif use motif ; then
143 myconf="${myconf} --with-x-toolkit=motif"
144 else
145 # do not build emacs with any toolkit, bug 35300
146 myconf="${myconf} --with-x-toolkit=no"
147 fi
148 else
149 myconf="${myconf} --without-x"
150 fi
151 econf ${myconf} || die "econf failed"
152 emake CC="$(tc-getCC)" || die "emake failed"
153
154 einfo "Recompiling patched lisp files..."
155 (cd lisp; emake recompile) || die "emake recompile failed"
156 (cd src; emake versionclean)
157 emake CC="$(tc-getCC)" || die "die emake failed"
158 }
159
160 src_install() {
161 einstall || die "einstall failed"
162 for i in "${D}"/usr/bin/* ; do
163 mv ${i} ${i}-emacs-${SLOT} || die "mv ${i} failed"
164 done
165 mv "${D}"/usr/bin/emacs{-emacs,}-${SLOT} || die "mv emacs failed"
166 rm "${D}"/usr/bin/emacs-${PV}-emacs-${SLOT}
167
168 einfo "Fixing info documentation..."
169 mkdir "${T}/emacs-${SLOT}"
170 mv "${D}/usr/share/info/dir" "${T}"
171 for i in "${D}"/usr/share/info/*
172 do
173 mv ${i} "${T}"/emacs-${SLOT}/${i##*/}.info
174 done
175 mv "${T}/emacs-${SLOT}" "${D}/usr/share/info"
176 mv "${T}/dir" "${D}/usr/share/info/emacs-${SLOT}"
177
178 einfo "Fixing manpages..."
179 for m in "${D}"/usr/share/man/man1/* ; do
180 mv ${m} ${m%.1}-emacs-${SLOT}.1 || die "mv ${m} failed"
181 done
182
183 # avoid collision between slots
184 rm "${D}"/usr/share/emacs/site-lisp/subdirs.el
185
186 einfo "Fixing permissions..."
187 find "${D}" -perm 664 |xargs chmod -f 644 2>/dev/null
188 find "${D}" -type d |xargs chmod -f 755 2>/dev/null
189
190 keepdir /usr/share/emacs/${PV}/leim
191 keepdir /usr/share/emacs/site-lisp
192
193 dodoc BUGS ChangeLog README
194 }
195
196 emacs-infodir-rebuild() {
197 # Depending on the Portage version, the Info dir file is compressed
198 # or removed. It is only rebuilt by Portage if our directory is in
199 # INFOPATH, which is not guaranteed. So we rebuild it ourselves.
200
201 local infodir=/usr/share/info/emacs-${SLOT} f
202 einfo "Regenerating Info directory index in ${infodir} ..."
203 rm -f "${ROOT}"${infodir}/dir{,.*}
204 for f in "${ROOT}"${infodir}/*.info*; do
205 [[ ${f##*/} == *[0-9].info* ]] \
206 || install-info --info-dir="${ROOT}"${infodir} ${f} &>/dev/null
207 done
208 echo
209 }
210
211 pkg_postinst() {
212 test -f "${ROOT}"/usr/share/emacs/site-lisp/subdirs.el ||
213 cp "${ROOT}"/usr/share/emacs{/${PV},}/site-lisp/subdirs.el
214
215 emacs-infodir-rebuild
216
217 if [[ $(readlink "${ROOT}"/usr/bin/emacs) == emacs.emacs-${SLOT}* ]]; then
218 # transition from pre-eselect revision
219 eselect emacs set emacs-${SLOT}
220 else
221 eselect emacs update --if-unset
222 fi
223
224 if ! use sendmail && ! has_version "virtual/mta"; then
225 elog "You disabled sendmail support for Emacs. If you later install"
226 elog "a MTA then you will need to recompile Emacs. See Bug #11104."
227 fi
228 if use X; then
229 elog "You need to install some fonts for Emacs. Under monolithic"
230 elog "XFree86/Xorg you typically had such fonts installed by default."
231 elog "With modular Xorg, you will have to perform this step yourself."
232 elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's"
233 elog "machine would satisfy basic Emacs requirements under X11."
234 fi
235 }
236
237 pkg_postrm() {
238 emacs-infodir-rebuild
239 eselect emacs update --if-unset
240 }
241
242
243
244 --
245 gentoo-commits@g.o mailing list