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