1 |
fauli 09/07/30 14:43:07 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-23.1.ebuild |
5 |
Log: |
6 |
Major version bump to 23, with only one little patch for xz support |
7 |
(Portage version: 2.1.6.13/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.326 app-editors/emacs/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.326&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.326&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?r1=1.325&r2=1.326 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v |
19 |
retrieving revision 1.325 |
20 |
retrieving revision 1.326 |
21 |
diff -u -r1.325 -r1.326 |
22 |
--- ChangeLog 21 Jul 2009 23:28:18 -0000 1.325 |
23 |
+++ ChangeLog 30 Jul 2009 14:43:07 -0000 1.326 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for app-editors/emacs |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.325 2009/07/21 23:28:18 jer Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.326 2009/07/30 14:43:07 fauli Exp $ |
29 |
+ |
30 |
+*emacs-23.1 (30 Jul 2009) |
31 |
+ |
32 |
+ 30 Jul 2009; Christian Faulhammer <fauli@g.o> |
33 |
+ +files/emacs-23.0.94-handle-xz-suffix.patch, +emacs-23.1.ebuild: |
34 |
+ Major version bump to 23, with only one little patch for xz support |
35 |
|
36 |
21 Jul 2009; Jeroen Roovers <jer@g.o> emacs-21.4-r19.ebuild: |
37 |
Stable for HPPA (bug #277194). |
38 |
|
39 |
|
40 |
|
41 |
1.1 app-editors/emacs/emacs-23.1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-23.1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-23.1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: emacs-23.1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2009 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-23.1.ebuild,v 1.1 2009/07/30 14:43:07 fauli Exp $ |
51 |
|
52 |
EAPI=2 |
53 |
|
54 |
inherit autotools elisp-common eutils flag-o-matic |
55 |
|
56 |
if [ "${PV##*.}" = "9999" ]; then |
57 |
ECVS_AUTH="pserver" |
58 |
ECVS_SERVER="cvs.savannah.gnu.org:/sources/emacs" |
59 |
ECVS_MODULE="emacs" |
60 |
ECVS_BRANCH="HEAD" |
61 |
ECVS_LOCALNAME="emacs" |
62 |
inherit cvs |
63 |
SRC_URI="" |
64 |
S="${WORKDIR}/${ECVS_LOCALNAME}" |
65 |
else |
66 |
SRC_URI="mirror://gnu/emacs/${P}.tar.gz" |
67 |
# FULL_VERSION keeps the full version number, which is needed in |
68 |
# order to determine some path information correctly for copy/move |
69 |
# operations later on |
70 |
FULL_VERSION="${PV%%_*}" |
71 |
S="${WORKDIR}/emacs-${FULL_VERSION}" |
72 |
fi |
73 |
|
74 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
75 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
76 |
|
77 |
LICENSE="GPL-3 FDL-1.3 BSD as-is X11 W3C unicode" |
78 |
SLOT="23" |
79 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
80 |
IUSE="alsa dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm" |
81 |
RESTRICT="strip" |
82 |
|
83 |
RDEPEND="!=app-editors/emacs-cvs-23.0* |
84 |
!=app-editors/emacs-cvs-23.1.9999 |
85 |
sys-libs/ncurses |
86 |
>=app-admin/eselect-emacs-1.2 |
87 |
net-libs/liblockfile |
88 |
hesiod? ( net-dns/hesiod ) |
89 |
kerberos? ( virtual/krb5 ) |
90 |
alsa? ( media-libs/alsa-lib ) |
91 |
gpm? ( sys-libs/gpm ) |
92 |
dbus? ( sys-apps/dbus ) |
93 |
X? ( |
94 |
x11-libs/libXmu |
95 |
x11-libs/libXt |
96 |
x11-misc/xbitmaps |
97 |
gif? ( media-libs/giflib ) |
98 |
jpeg? ( media-libs/jpeg ) |
99 |
png? ( media-libs/libpng ) |
100 |
svg? ( >=gnome-base/librsvg-2.0 ) |
101 |
tiff? ( media-libs/tiff ) |
102 |
xpm? ( x11-libs/libXpm ) |
103 |
xft? ( |
104 |
media-libs/fontconfig |
105 |
media-libs/freetype |
106 |
x11-libs/libXft |
107 |
m17n-lib? ( |
108 |
>=dev-libs/libotf-0.9.4 |
109 |
>=dev-libs/m17n-lib-1.5.1 |
110 |
) |
111 |
) |
112 |
gtk? ( x11-libs/gtk+:2 ) |
113 |
!gtk? ( |
114 |
Xaw3d? ( x11-libs/Xaw3d ) |
115 |
!Xaw3d? ( motif? ( x11-libs/openmotif ) ) |
116 |
) |
117 |
)" |
118 |
|
119 |
DEPEND="${RDEPEND} |
120 |
dev-util/pkgconfig |
121 |
gzip-el? ( app-arch/gzip )" |
122 |
|
123 |
RDEPEND="${RDEPEND} |
124 |
>=app-emacs/emacs-common-gentoo-1[X?]" |
125 |
|
126 |
EMACS_SUFFIX="emacs-${SLOT}" |
127 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
128 |
|
129 |
src_prepare() { |
130 |
if [ "${PV##*.}" = "9999" ]; then |
131 |
FULL_VERSION=$(grep 'defconst[ ]*emacs-version' lisp/version.el \ |
132 |
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/') |
133 |
[ "${FULL_VERSION}" ] || die "Cannot determine current Emacs version" |
134 |
echo |
135 |
einfo "Emacs CVS branch: ${ECVS_BRANCH}" |
136 |
einfo "Emacs version number: ${FULL_VERSION}" |
137 |
[ "${FULL_VERSION%.*}" = ${PV%.*} ] \ |
138 |
|| die "Upstream version number changed to ${FULL_VERSION}" |
139 |
echo |
140 |
fi |
141 |
|
142 |
epatch "${FILESDIR}/emacs-23.0.94-handle-xz-suffix.patch" |
143 |
|
144 |
sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \ |
145 |
-e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \ |
146 |
"${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings" |
147 |
|
148 |
if ! use alsa; then |
149 |
# ALSA is detected even if not requested by its USE flag. |
150 |
# Suppress it by supplying pkg-config with a wrong library name. |
151 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \ |
152 |
|| die "unable to sed configure.in" |
153 |
fi |
154 |
if ! use gzip-el; then |
155 |
# Emacs' build system automatically detects the gzip binary and |
156 |
# compresses el files. We don't want that so confuse it with a |
157 |
# wrong binary name |
158 |
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
159 |
|| die "unable to sed configure.in" |
160 |
fi |
161 |
|
162 |
eautoreconf |
163 |
} |
164 |
|
165 |
src_configure() { |
166 |
ALLOWED_FLAGS="" |
167 |
strip-flags |
168 |
#unset LDFLAGS |
169 |
if use sh; then |
170 |
replace-flags -O[1-9] -O0 #262359 |
171 |
else |
172 |
replace-flags -O[3-9] -O2 |
173 |
fi |
174 |
|
175 |
local myconf |
176 |
|
177 |
if use alsa && ! use sound; then |
178 |
echo |
179 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
180 |
einfo "so sound is switched on anyway." |
181 |
echo |
182 |
myconf="${myconf} --with-sound" |
183 |
else |
184 |
myconf="${myconf} $(use_with sound)" |
185 |
fi |
186 |
|
187 |
if use X; then |
188 |
myconf="${myconf} --with-x" |
189 |
myconf="${myconf} $(use_with toolkit-scroll-bars)" |
190 |
myconf="${myconf} $(use_with gif) $(use_with jpeg)" |
191 |
myconf="${myconf} $(use_with png) $(use_with svg rsvg)" |
192 |
myconf="${myconf} $(use_with tiff) $(use_with xpm)" |
193 |
myconf="${myconf} $(use_with xft)" |
194 |
|
195 |
if use xft; then |
196 |
myconf="${myconf} $(use_with m17n-lib libotf)" |
197 |
myconf="${myconf} $(use_with m17n-lib m17n-flt)" |
198 |
else |
199 |
myconf="${myconf} --without-libotf --without-m17n-flt" |
200 |
use m17n-lib && ewarn \ |
201 |
"USE flag \"m17n-lib\" has no effect because xft is not set." |
202 |
fi |
203 |
|
204 |
# GTK+ is the default toolkit if USE=gtk is chosen with other |
205 |
# possibilities. Emacs upstream thinks this should be standard |
206 |
# policy on all distributions |
207 |
if use gtk; then |
208 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
209 |
myconf="${myconf} --with-x-toolkit=gtk" |
210 |
elif use Xaw3d; then |
211 |
einfo "Configuring to build with Xaw3d (Athena/Lucid) toolkit" |
212 |
myconf="${myconf} --with-x-toolkit=athena" |
213 |
elif use motif; then |
214 |
einfo "Configuring to build with Motif toolkit" |
215 |
myconf="${myconf} --with-x-toolkit=motif" |
216 |
else |
217 |
einfo "Configuring to build with no toolkit" |
218 |
myconf="${myconf} --with-x-toolkit=no" |
219 |
fi |
220 |
|
221 |
local f tk= |
222 |
for f in gtk Xaw3d motif; do |
223 |
use ${f} || continue |
224 |
[ "${tk}" ] \ |
225 |
&& ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")" |
226 |
tk="${tk}${tk:+ }${f}" |
227 |
done |
228 |
else |
229 |
myconf="${myconf} --without-x" |
230 |
fi |
231 |
|
232 |
myconf="${myconf} $(use_with hesiod)" |
233 |
myconf="${myconf} $(use_with kerberos) $(use_with kerberos kerberos5)" |
234 |
myconf="${myconf} $(use_with gpm) $(use_with dbus)" |
235 |
|
236 |
econf \ |
237 |
--program-suffix=-${EMACS_SUFFIX} \ |
238 |
--infodir=/usr/share/info/${EMACS_SUFFIX} \ |
239 |
${myconf} || die "econf emacs failed" |
240 |
} |
241 |
|
242 |
src_compile() { |
243 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
244 |
if [ "${PV##*.}" = "9999" ]; then |
245 |
emake CC="$(tc-getCC)" bootstrap || die "make bootstrap failed" |
246 |
# cleanup, otherwise emacs will be dumped again in src_install |
247 |
(cd src; emake versionclean) |
248 |
fi |
249 |
emake CC="$(tc-getCC)" || die "emake failed" |
250 |
} |
251 |
|
252 |
src_install () { |
253 |
local i m |
254 |
|
255 |
emake install DESTDIR="${D}" || die "make install failed" |
256 |
|
257 |
rm "${D}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \ |
258 |
|| die "removing duplicate emacs executable failed" |
259 |
mv "${D}"/usr/bin/emacs-${EMACS_SUFFIX} "${D}"/usr/bin/${EMACS_SUFFIX} \ |
260 |
|| die "moving Emacs executable failed" |
261 |
|
262 |
# move info documentation to the correct place |
263 |
for i in "${D}"/usr/share/info/${EMACS_SUFFIX}/*; do |
264 |
mv "${i}" "${i}.info" || die "mv info failed" |
265 |
done |
266 |
|
267 |
# move man pages to the correct place |
268 |
for m in "${D}"/usr/share/man/man1/* ; do |
269 |
mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed" |
270 |
done |
271 |
|
272 |
# avoid collision between slots, see bug #169033 e.g. |
273 |
rm "${D}"/usr/share/emacs/site-lisp/subdirs.el |
274 |
rm -rf "${D}"/usr/share/{applications,icons} |
275 |
rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores |
276 |
keepdir /var/lib/games/emacs |
277 |
|
278 |
local c=";;" |
279 |
if use source; then |
280 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
281 |
# This is not meant to install all the source -- just the |
282 |
# C source you might find via find-function |
283 |
doins src/*.[ch] |
284 |
c="" |
285 |
fi |
286 |
|
287 |
sed 's/^X//' >"${SITEFILE}" <<-EOF |
288 |
X |
289 |
;;; ${PN}-${SLOT} site-lisp configuration |
290 |
X |
291 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
292 |
X ${c}(setq find-function-C-source-directory |
293 |
X ${c} "/usr/share/emacs/${FULL_VERSION}/src") |
294 |
X (let ((path (getenv "INFOPATH")) |
295 |
X (dir "/usr/share/info/${EMACS_SUFFIX}")) |
296 |
X (and path |
297 |
X ;; move Emacs Info dir to beginning of list |
298 |
X (setq Info-directory-list |
299 |
X (cons dir (delete dir (split-string path ":" t))))))) |
300 |
EOF |
301 |
elisp-site-file-install "${SITEFILE}" || die |
302 |
|
303 |
dodoc README BUGS || die "dodoc failed" |
304 |
} |
305 |
|
306 |
emacs-infodir-rebuild() { |
307 |
# Depending on the Portage version, the Info dir file is compressed |
308 |
# or removed. It is only rebuilt by Portage if our directory is in |
309 |
# INFOPATH, which is not guaranteed. So we rebuild it ourselves. |
310 |
|
311 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
312 |
[ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo |
313 |
einfo "Regenerating Info directory index in ${infodir} ..." |
314 |
rm -f "${ROOT}"${infodir}/dir{,.*} |
315 |
for f in "${ROOT}"${infodir}/*.info*; do |
316 |
[[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ |
317 |
&& install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null |
318 |
done |
319 |
rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty |
320 |
echo |
321 |
} |
322 |
|
323 |
pkg_postinst() { |
324 |
local f |
325 |
for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do |
326 |
[ -e "${f}" ] || touch "${f}" |
327 |
done |
328 |
|
329 |
elisp-site-regen |
330 |
emacs-infodir-rebuild |
331 |
eselect emacs update ifunset |
332 |
|
333 |
echo |
334 |
elog "You can set the version to be started by /usr/bin/emacs through" |
335 |
elog "the Emacs eselect module, which also redirects man and info pages." |
336 |
elog "Therefore, several Emacs versions can be installed at the same time." |
337 |
elog "\"man emacs.eselect\" for details." |
338 |
} |
339 |
|
340 |
pkg_postrm() { |
341 |
elisp-site-regen |
342 |
emacs-infodir-rebuild |
343 |
eselect emacs update ifunset |
344 |
} |