1 |
ulm 07/11/03 14:49:21 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-22.1-r2.ebuild |
5 |
Log: |
6 |
Security fix for function hack-local-variables, CVE-2007-5795, bug #197958. |
7 |
(Portage version: 2.1.3.16) |
8 |
|
9 |
Revision Changes Path |
10 |
1.198 app-editors/emacs/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.198&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.198&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?r1=1.197&r2=1.198 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v |
19 |
retrieving revision 1.197 |
20 |
retrieving revision 1.198 |
21 |
diff -u -r1.197 -r1.198 |
22 |
--- ChangeLog 2 Nov 2007 09:37:33 -0000 1.197 |
23 |
+++ ChangeLog 3 Nov 2007 14:49:20 -0000 1.198 |
24 |
@@ -1,6 +1,12 @@ |
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.197 2007/11/02 09:37:33 ulm Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.198 2007/11/03 14:49:20 ulm Exp $ |
29 |
+ |
30 |
+*emacs-22.1-r2 (03 Nov 2007) |
31 |
+ |
32 |
+ 03 Nov 2007; Ulrich Mueller <ulm@g.o> |
33 |
+ +files/emacs-22.1-hack-local-variables.patch, +emacs-22.1-r2.ebuild: |
34 |
+ Security fix for function hack-local-variables, CVE-2007-5795, bug #197958. |
35 |
|
36 |
02 Nov 2007; Ulrich Mueller <ulm@g.o> emacs-22.1-r1.ebuild: |
37 |
Partial sync of emacs and emacs-cvs ebuilds. |
38 |
|
39 |
|
40 |
|
41 |
1.1 app-editors/emacs/emacs-22.1-r2.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-22.1-r2.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-22.1-r2.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: emacs-22.1-r2.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2007 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-22.1-r2.ebuild,v 1.1 2007/11/03 14:49:21 ulm Exp $ |
51 |
|
52 |
WANT_AUTOCONF="2.5" |
53 |
WANT_AUTOMAKE="latest" |
54 |
|
55 |
inherit autotools elisp-common eutils flag-o-matic |
56 |
|
57 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
58 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
59 |
SRC_URI="mirror://gnu/emacs/${P}.tar.gz" |
60 |
|
61 |
LICENSE="GPL-2 FDL-1.2 BSD" |
62 |
SLOT="22" |
63 |
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
64 |
IUSE="alsa gif gtk gzip-el hesiod jpeg motif png spell sound source tiff toolkit-scroll-bars X Xaw3d xpm" |
65 |
RESTRICT="strip" |
66 |
|
67 |
X_DEPEND="x11-libs/libXmu x11-libs/libXt x11-misc/xbitmaps" |
68 |
|
69 |
RDEPEND="!<app-editors/emacs-cvs-22.1 |
70 |
sys-libs/ncurses |
71 |
>=app-admin/eselect-emacs-0.7-r1 |
72 |
sys-libs/zlib |
73 |
hesiod? ( net-dns/hesiod ) |
74 |
spell? ( || ( app-text/ispell app-text/aspell ) ) |
75 |
alsa? ( media-sound/alsa-headers ) |
76 |
X? ( |
77 |
$X_DEPEND |
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? ( |
88 |
motif? ( virtual/motif ) |
89 |
) |
90 |
) |
91 |
)" |
92 |
|
93 |
DEPEND="${RDEPEND} |
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 |
sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \ |
105 |
-e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \ |
106 |
"${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings" |
107 |
if ! use gzip-el; then |
108 |
# Emacs' build system automatically detects the gzip binary and |
109 |
# compresses el files. We don't want that so confuse it with a |
110 |
# wrong binary name |
111 |
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
112 |
|| die "unable to sed configure.in" |
113 |
fi |
114 |
|
115 |
epatch "${FILESDIR}/${P}-Xaw3d-headers.patch" |
116 |
epatch "${FILESDIR}/${P}-freebsd-sparc.patch" |
117 |
epatch "${FILESDIR}/${P}-oldxmenu-qa.patch" |
118 |
epatch "${FILESDIR}/${P}-backup-buffer.patch" |
119 |
epatch "${FILESDIR}/${P}-hack-local-variables.patch" |
120 |
# ALSA is detected and used even if not requested by the USE=alsa flag. |
121 |
# So remove the automagic check |
122 |
use alsa || epatch "${FILESDIR}/${P}-disable_alsa_detection.patch" |
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 |
echo |
159 |
einfo "Configuring to build with GTK support, disabling all other toolkits" |
160 |
echo |
161 |
myconf="${myconf} --with-x-toolkit=gtk" |
162 |
elif use Xaw3d; then |
163 |
einfo "Configuring to build with Xaw3d(athena) support" |
164 |
myconf="${myconf} --with-x-toolkit=athena" |
165 |
myconf="${myconf} --without-gtk" |
166 |
elif use motif; then |
167 |
einfo "Configuring to build with motif toolkit support" |
168 |
myconf="${myconf} --with-x-toolkit=motif" |
169 |
myconf="${myconf} --without-gtk" |
170 |
else |
171 |
einfo "Configuring to build with no toolkit" |
172 |
myconf="${myconf} --with-x-toolkit=no" |
173 |
myconf="${myconf} --without-gtk" |
174 |
fi |
175 |
else |
176 |
myconf="${myconf} --without-x" |
177 |
fi |
178 |
|
179 |
myconf="${myconf} $(use_with hesiod)" |
180 |
|
181 |
econf \ |
182 |
--program-suffix=-emacs-${SLOT} \ |
183 |
--infodir=/usr/share/info/emacs-${SLOT} \ |
184 |
--without-carbon \ |
185 |
${myconf} || die "econf emacs failed" |
186 |
|
187 |
emake CC="$(tc-getCC)" || die "emake failed" |
188 |
|
189 |
einfo "Recompiling patched lisp files..." |
190 |
(cd lisp; emake recompile) || die "emake recompile failed" |
191 |
(cd src; emake versionclean) |
192 |
emake CC="$(tc-getCC)" || die "emake failed" |
193 |
} |
194 |
|
195 |
src_install () { |
196 |
emake install DESTDIR="${D}" || die "make install failed" |
197 |
|
198 |
rm "${D}"/usr/bin/emacs-${FULL_VERSION}-emacs-${SLOT} \ |
199 |
|| die "removing duplicate emacs executable failed" |
200 |
mv "${D}"/usr/bin/emacs-emacs-${SLOT} "${D}"/usr/bin/emacs-${SLOT} \ |
201 |
|| die "moving Emacs executable failed" |
202 |
|
203 |
# move info documentation to the correct place |
204 |
einfo "Fixing info documentation ..." |
205 |
for i in "${D}"/usr/share/info/emacs-${SLOT}/*; do |
206 |
mv ${i} ${i}.info || die "mv info failed" |
207 |
done |
208 |
|
209 |
# move man pages to the correct place |
210 |
einfo "Fixing manpages ..." |
211 |
for m in "${D}"/usr/share/man/man1/* ; do |
212 |
mv ${m} ${m%.1}-emacs-${SLOT}.1 || die "mv man failed" |
213 |
done |
214 |
|
215 |
# avoid collision between slots, see bug #169033 e.g. |
216 |
rm "${D}"/usr/share/emacs/site-lisp/subdirs.el |
217 |
rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores |
218 |
keepdir /var/lib/games/emacs/ |
219 |
|
220 |
if use source; then |
221 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
222 |
# This is not meant to install all the source -- just the |
223 |
# C source you might find via find-function |
224 |
doins src/*.[ch] |
225 |
sed 's/^X//' >00${PN}-${SLOT}-gentoo.el <<-EOF |
226 |
|
227 |
;;; ${PN}-${SLOT} site-lisp configuration |
228 |
|
229 |
(if (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
230 |
X (setq find-function-C-source-directory |
231 |
X "/usr/share/emacs/${FULL_VERSION}/src")) |
232 |
EOF |
233 |
elisp-site-file-install 00${PN}-${SLOT}-gentoo.el |
234 |
fi |
235 |
|
236 |
dodoc AUTHORS BUGS CONTRIBUTE README || die "dodoc failed" |
237 |
} |
238 |
|
239 |
emacs-infodir-rebuild() { |
240 |
# Depending on the Portage version, the Info dir file is compressed |
241 |
# or removed. It is only rebuilt by Portage if our directory is in |
242 |
# INFOPATH, which is not guaranteed. So we rebuild it ourselves. |
243 |
|
244 |
local infodir=/usr/share/info/emacs-${SLOT} f |
245 |
einfo "Regenerating Info directory index in ${infodir} ..." |
246 |
rm -f "${ROOT}"${infodir}/dir{,.*} |
247 |
for f in "${ROOT}"${infodir}/*.info*; do |
248 |
[[ ${f##*/} == *[0-9].info* ]] \ |
249 |
|| install-info --info-dir="${ROOT}"${infodir} ${f} &>/dev/null |
250 |
done |
251 |
echo |
252 |
} |
253 |
|
254 |
pkg_postinst() { |
255 |
test -f "${ROOT}"/usr/share/emacs/site-lisp/subdirs.el || |
256 |
cp "${ROOT}"/usr/share/emacs{/${FULL_VERSION},}/site-lisp/subdirs.el |
257 |
|
258 |
local f |
259 |
for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do |
260 |
test -e ${f} || touch ${f} |
261 |
done |
262 |
|
263 |
elisp-site-regen |
264 |
emacs-infodir-rebuild |
265 |
|
266 |
if [[ $(readlink "${ROOT}"/usr/bin/emacs) == emacs.emacs-${SLOT}* ]]; then |
267 |
# transition from pre-eselect revision |
268 |
eselect emacs set emacs-${SLOT} |
269 |
else |
270 |
eselect emacs update --if-unset |
271 |
fi |
272 |
|
273 |
if use X; then |
274 |
elog "You need to install some fonts for Emacs. Under monolithic" |
275 |
elog "XFree86/Xorg you typically had such fonts installed by default." |
276 |
elog "With modular Xorg, you will have to perform this step yourself." |
277 |
elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's" |
278 |
elog "machine would satisfy basic Emacs requirements under X11." |
279 |
fi |
280 |
|
281 |
echo |
282 |
elog "You can set the version to be started by /usr/bin/emacs through" |
283 |
elog "the Emacs eselect module, which also redirects man and info pages." |
284 |
elog "Therefore, several Emacs versions can be installed at the same time." |
285 |
elog "\"man emacs.eselect\" for details." |
286 |
} |
287 |
|
288 |
pkg_postrm() { |
289 |
elisp-site-regen |
290 |
emacs-infodir-rebuild |
291 |
eselect emacs update --if-unset |
292 |
} |
293 |
|
294 |
|
295 |
|
296 |
-- |
297 |
gentoo-commits@g.o mailing list |