1 |
ulm 12/11/02 08:10:14 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-vcs-24.2.9999-r1.ebuild |
5 |
emacs-vcs-24.3.9999.ebuild |
6 |
Removed: emacs-vcs-24.2.9999.ebuild |
7 |
Log: |
8 |
The upstream repository has been branched for the 24.3 release. 24.2.9999-r1 is the live ebuild for the emacs-24 branch, 24.3.9999 for the trunk. |
9 |
|
10 |
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key E7BE08CA7DC6EA25) |
11 |
|
12 |
Revision Changes Path |
13 |
1.119 app-editors/emacs-vcs/ChangeLog |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.119&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.119&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?r1=1.118&r2=1.119 |
18 |
|
19 |
Index: ChangeLog |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v |
22 |
retrieving revision 1.118 |
23 |
retrieving revision 1.119 |
24 |
diff -u -r1.118 -r1.119 |
25 |
--- ChangeLog 24 Oct 2012 18:52:56 -0000 1.118 |
26 |
+++ ChangeLog 2 Nov 2012 08:10:14 -0000 1.119 |
27 |
@@ -1,6 +1,14 @@ |
28 |
# ChangeLog for app-editors/emacs-vcs |
29 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.118 2012/10/24 18:52:56 ulm Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.119 2012/11/02 08:10:14 ulm Exp $ |
32 |
+ |
33 |
+*emacs-vcs-24.3.9999 (02 Nov 2012) |
34 |
+*emacs-vcs-24.2.9999-r1 (02 Nov 2012) |
35 |
+ |
36 |
+ 02 Nov 2012; Ulrich Müller <ulm@g.o> -emacs-vcs-24.2.9999.ebuild, |
37 |
+ +emacs-vcs-24.2.9999-r1.ebuild, +emacs-vcs-24.3.9999.ebuild: |
38 |
+ The upstream repository has been branched for the 24.3 release. 24.2.9999-r1 |
39 |
+ is the live ebuild for the emacs-24 branch, 24.3.9999 for the trunk. |
40 |
|
41 |
24 Oct 2012; Ulrich Müller <ulm@g.o> emacs-vcs-24.2.9999.ebuild: |
42 |
Update dependency after package move from x11-libs/openmotif to |
43 |
|
44 |
|
45 |
|
46 |
1.1 app-editors/emacs-vcs/emacs-vcs-24.2.9999-r1.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.2.9999-r1.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.2.9999-r1.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: emacs-vcs-24.2.9999-r1.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2012 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.2.9999-r1.ebuild,v 1.1 2012/11/02 08:10:14 ulm Exp $ |
56 |
|
57 |
EAPI=4 |
58 |
|
59 |
inherit autotools elisp-common eutils flag-o-matic multilib |
60 |
|
61 |
if [[ ${PV##*.} = 9999 ]]; then |
62 |
EBZR_PROJECT="emacs" |
63 |
EBZR_BRANCH="emacs-24" |
64 |
EBZR_REPO_URI="bzr://bzr.savannah.gnu.org/emacs/${EBZR_BRANCH}/" |
65 |
# "Nosmart" is much faster for initial branching. |
66 |
EBZR_INITIAL_URI="nosmart+${EBZR_REPO_URI}" |
67 |
EBZR_WORKDIR_CHECKOUT="t" #434746 |
68 |
inherit bzr |
69 |
SRC_URI="" |
70 |
else |
71 |
SRC_URI="mirror://gentoo/emacs-${PV}.tar.gz |
72 |
mirror://gnu-alpha/emacs/pretest/emacs-${PV}.tar.gz" |
73 |
# FULL_VERSION keeps the full version number, which is needed in |
74 |
# order to determine some path information correctly for copy/move |
75 |
# operations later on |
76 |
FULL_VERSION="${PV%%_*}" |
77 |
S="${WORKDIR}/emacs-${FULL_VERSION}" |
78 |
fi |
79 |
|
80 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
81 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
82 |
|
83 |
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
84 |
SLOT="24" |
85 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
86 |
IUSE="alsa athena dbus games gconf gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick jpeg kerberos libxml2 m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm" |
87 |
|
88 |
RDEPEND="sys-libs/ncurses |
89 |
>=app-admin/eselect-emacs-1.2 |
90 |
>=app-emacs/emacs-common-gentoo-1.3[games?,X?] |
91 |
net-libs/liblockfile |
92 |
hesiod? ( net-dns/hesiod ) |
93 |
kerberos? ( virtual/krb5 ) |
94 |
alsa? ( media-libs/alsa-lib ) |
95 |
gpm? ( sys-libs/gpm ) |
96 |
dbus? ( sys-apps/dbus ) |
97 |
gnutls? ( net-libs/gnutls ) |
98 |
libxml2? ( >=dev-libs/libxml2-2.2.0 ) |
99 |
selinux? ( sys-libs/libselinux ) |
100 |
X? ( |
101 |
x11-libs/libXmu |
102 |
x11-libs/libXt |
103 |
x11-misc/xbitmaps |
104 |
gconf? ( >=gnome-base/gconf-2.26.2 ) |
105 |
gsettings? ( >=dev-libs/glib-2.28.6 ) |
106 |
gif? ( media-libs/giflib ) |
107 |
jpeg? ( virtual/jpeg ) |
108 |
png? ( >=media-libs/libpng-1.4:0 ) |
109 |
svg? ( >=gnome-base/librsvg-2.0 ) |
110 |
tiff? ( media-libs/tiff ) |
111 |
xpm? ( x11-libs/libXpm ) |
112 |
imagemagick? ( >=media-gfx/imagemagick-6.6.2 ) |
113 |
xft? ( |
114 |
media-libs/fontconfig |
115 |
media-libs/freetype |
116 |
x11-libs/libXft |
117 |
m17n-lib? ( |
118 |
>=dev-libs/libotf-0.9.4 |
119 |
>=dev-libs/m17n-lib-1.5.1 |
120 |
) |
121 |
) |
122 |
gtk? ( |
123 |
gtk3? ( x11-libs/gtk+:3 ) |
124 |
!gtk3? ( x11-libs/gtk+:2 ) |
125 |
) |
126 |
!gtk? ( |
127 |
Xaw3d? ( x11-libs/libXaw3d ) |
128 |
!Xaw3d? ( |
129 |
athena? ( x11-libs/libXaw ) |
130 |
!athena? ( motif? ( >=x11-libs/motif-2.3:0 ) ) |
131 |
) |
132 |
) |
133 |
)" |
134 |
|
135 |
DEPEND="${RDEPEND} |
136 |
alsa? ( virtual/pkgconfig ) |
137 |
dbus? ( virtual/pkgconfig ) |
138 |
gnutls? ( virtual/pkgconfig ) |
139 |
libxml2? ( virtual/pkgconfig ) |
140 |
X? ( virtual/pkgconfig ) |
141 |
gzip-el? ( app-arch/gzip ) |
142 |
pax_kernel? ( sys-apps/paxctl )" |
143 |
|
144 |
EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
145 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
146 |
|
147 |
src_prepare() { |
148 |
if [[ ${PV##*.} = 9999 ]]; then |
149 |
FULL_VERSION=$(sed -n 's/^AC_INIT(emacs,[ \t]*\([^ \t,)]*\).*/\1/p' \ |
150 |
configure.ac) |
151 |
[[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version" |
152 |
einfo "Emacs branch: ${EBZR_BRANCH}" |
153 |
einfo "Revision: ${EBZR_REVISION:-${EBZR_REVNO}}" |
154 |
einfo "Emacs version number: ${FULL_VERSION}" |
155 |
[[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \ |
156 |
|| die "Upstream version number changed to ${FULL_VERSION}" |
157 |
fi |
158 |
|
159 |
epatch_user |
160 |
|
161 |
if ! use alsa; then |
162 |
# ALSA is detected even if not requested by its USE flag. |
163 |
# Suppress it by supplying pkg-config with a wrong library name. |
164 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.ac \ |
165 |
|| die "unable to sed configure.ac" |
166 |
fi |
167 |
if ! use gzip-el; then |
168 |
# Emacs' build system automatically detects the gzip binary and |
169 |
# compresses el files. We don't want that so confuse it with a |
170 |
# wrong binary name |
171 |
sed -i -e "/AC_PATH_PROG/s/gzip/PrEvEnTcOmPrEsSiOn/" configure.ac \ |
172 |
|| die "unable to sed configure.ac" |
173 |
fi |
174 |
|
175 |
AT_M4DIR=m4 eautoreconf |
176 |
} |
177 |
|
178 |
src_configure() { |
179 |
strip-flags |
180 |
|
181 |
if use sh; then |
182 |
replace-flags "-O[1-9]" -O0 #262359 |
183 |
elif use ia64; then |
184 |
replace-flags "-O[2-9]" -O1 #325373 |
185 |
else |
186 |
replace-flags "-O[3-9]" -O2 |
187 |
fi |
188 |
|
189 |
local myconf |
190 |
|
191 |
if use alsa && ! use sound; then |
192 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
193 |
einfo "so sound is switched on anyway." |
194 |
myconf="${myconf} --with-sound" |
195 |
else |
196 |
myconf="${myconf} $(use_with sound)" |
197 |
fi |
198 |
|
199 |
if use X; then |
200 |
myconf="${myconf} --with-x --without-ns" |
201 |
myconf="${myconf} $(use_with gconf)" |
202 |
myconf="${myconf} $(use_with gsettings)" |
203 |
myconf="${myconf} $(use_with toolkit-scroll-bars)" |
204 |
myconf="${myconf} $(use_with gif) $(use_with jpeg)" |
205 |
myconf="${myconf} $(use_with png) $(use_with svg rsvg)" |
206 |
myconf="${myconf} $(use_with tiff) $(use_with xpm)" |
207 |
myconf="${myconf} $(use_with imagemagick)" |
208 |
|
209 |
if use xft; then |
210 |
myconf="${myconf} --with-xft" |
211 |
myconf="${myconf} $(use_with m17n-lib libotf)" |
212 |
myconf="${myconf} $(use_with m17n-lib m17n-flt)" |
213 |
else |
214 |
myconf="${myconf} --without-xft" |
215 |
myconf="${myconf} --without-libotf --without-m17n-flt" |
216 |
use m17n-lib && ewarn \ |
217 |
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
218 |
fi |
219 |
|
220 |
if use gtk; then |
221 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
222 |
myconf="${myconf} --with-x-toolkit=$(usex gtk3 gtk3 gtk2)" |
223 |
local f |
224 |
for f in athena Xaw3d motif; do |
225 |
use ${f} && ewarn "USE flag \"${f}\" ignored" \ |
226 |
"(superseded by \"gtk\")" |
227 |
done |
228 |
elif use athena || use Xaw3d; then |
229 |
einfo "Configuring to build with Athena/Lucid toolkit" |
230 |
myconf="${myconf} --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
231 |
use motif && ewarn "USE flag \"motif\" ignored" \ |
232 |
"(superseded by \"athena\" or \"Xaw3d\")" |
233 |
elif use motif; then |
234 |
einfo "Configuring to build with Motif toolkit" |
235 |
myconf="${myconf} --with-x-toolkit=motif" |
236 |
else |
237 |
einfo "Configuring to build with no toolkit" |
238 |
myconf="${myconf} --with-x-toolkit=no" |
239 |
fi |
240 |
else |
241 |
myconf="${myconf} --without-x --without-ns" |
242 |
fi |
243 |
|
244 |
# Save version information in the Emacs binary. It will be available |
245 |
# in variable "system-configuration-options". |
246 |
myconf="${myconf} GENTOO_PACKAGE=${CATEGORY}/${PF}" |
247 |
if [[ ${PV##*.} = 9999 ]]; then |
248 |
myconf="${myconf} EBZR_BRANCH=${EBZR_BRANCH} EBZR_REVNO=${EBZR_REVNO}" |
249 |
fi |
250 |
|
251 |
# According to configure, this option is only used for GNU/Linux |
252 |
# (x86_64 and s390). For Gentoo Prefix we have to explicitly spell |
253 |
# out the location because $(get_libdir) does not necessarily return |
254 |
# something that matches the host OS's libdir naming (e.g. RHEL). |
255 |
local crtdir=$($(tc-getCC) -print-file-name=crt1.o) |
256 |
crtdir=${crtdir%/*} |
257 |
|
258 |
econf \ |
259 |
--program-suffix=-${EMACS_SUFFIX} \ |
260 |
--program-transform-name="s/emacs-[0-9].*/${EMACS_SUFFIX}/" \ |
261 |
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
262 |
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
263 |
--with-crt-dir="${crtdir}" \ |
264 |
--with-gameuser="${GAMES_USER_DED:-games}" \ |
265 |
--without-compress-info \ |
266 |
$(use_with hesiod) \ |
267 |
$(use_with kerberos) $(use_with kerberos kerberos5) \ |
268 |
$(use_with gpm) \ |
269 |
$(use_with dbus) \ |
270 |
$(use_with gnutls) \ |
271 |
$(use_with libxml2 xml2) \ |
272 |
$(use_with selinux) \ |
273 |
$(use_with wide-int) \ |
274 |
${myconf} |
275 |
} |
276 |
|
277 |
src_compile() { |
278 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
279 |
emake |
280 |
} |
281 |
|
282 |
src_install () { |
283 |
emake DESTDIR="${D}" NO_BIN_LINK=t install |
284 |
|
285 |
# move man pages to the correct place |
286 |
local m |
287 |
for m in "${ED}"/usr/share/man/man1/* ; do |
288 |
mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed" |
289 |
done |
290 |
|
291 |
# move info dir to avoid collisions with the dir file generated by portage |
292 |
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
293 |
|| die "moving info dir failed" |
294 |
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
295 |
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
296 |
|
297 |
# avoid collision between slots, see bug #169033 e.g. |
298 |
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
299 |
rm -rf "${ED}"/usr/share/{applications,icons} |
300 |
rm -rf "${ED}"/var |
301 |
|
302 |
# remove unused <version>/site-lisp dir |
303 |
rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
304 |
|
305 |
local c=";;" |
306 |
if use source; then |
307 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
308 |
# This is not meant to install all the source -- just the |
309 |
# C source you might find via find-function |
310 |
doins src/*.{c,h,m} |
311 |
c="" |
312 |
fi |
313 |
|
314 |
sed 's/^X//' >"${T}/${SITEFILE}" <<-EOF |
315 |
X |
316 |
;;; ${PN}-${SLOT} site-lisp configuration |
317 |
X |
318 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
319 |
X ${c}(setq find-function-C-source-directory |
320 |
X ${c} "${EPREFIX}/usr/share/emacs/${FULL_VERSION}/src") |
321 |
X (let ((path (getenv "INFOPATH")) |
322 |
X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
323 |
X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
324 |
X (and path |
325 |
X ;; move Emacs Info dir before anything else in /usr/share/info |
326 |
X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
327 |
X (while (and (cdr q) (not (string-match re (cadr q)))) |
328 |
X (setq q (cdr q))) |
329 |
X (setcdr q (cons dir (delete dir (cdr q)))) |
330 |
X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
331 |
EOF |
332 |
elisp-site-file-install "${T}/${SITEFILE}" || die |
333 |
|
334 |
dodoc README BUGS |
335 |
} |
336 |
|
337 |
pkg_preinst() { |
338 |
# move Info dir file to correct name |
339 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
340 |
if [[ -f ${ED}${infodir}/dir.orig ]]; then |
341 |
mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
342 |
elif [[ -d "${ED}"${infodir} ]]; then |
343 |
# this should not happen in EAPI 4 |
344 |
ewarn "Regenerating Info directory index in ${infodir} ..." |
345 |
rm -f "${ED}"${infodir}/dir{,.*} |
346 |
for f in "${ED}"${infodir}/*; do |
347 |
if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
348 |
install-info --info-dir="${ED}"${infodir} "${f}" \ |
349 |
|| die "install-info failed" |
350 |
fi |
351 |
done |
352 |
fi |
353 |
} |
354 |
|
355 |
pkg_postinst() { |
356 |
elisp-site-regen |
357 |
eselect emacs update ifunset |
358 |
|
359 |
if use X; then |
360 |
elog "You need to install some fonts for Emacs." |
361 |
elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's" |
362 |
elog "machine would satisfy basic Emacs requirements under X11." |
363 |
elog "See also http://www.gentoo.org/proj/en/lisp/emacs/xft.xml" |
364 |
elog "for how to enable anti-aliased fonts." |
365 |
elog |
366 |
fi |
367 |
|
368 |
elog "You can set the version to be started by /usr/bin/emacs through" |
369 |
elog "the Emacs eselect module, which also redirects man and info pages." |
370 |
elog "Therefore, several Emacs versions can be installed at the same time." |
371 |
elog "\"man emacs.eselect\" for details." |
372 |
elog |
373 |
elog "If you upgrade from a previous major version of Emacs, then it is" |
374 |
elog "strongly recommended that you use app-admin/emacs-updater to rebuild" |
375 |
elog "all byte-compiled elisp files of the installed Emacs packages." |
376 |
} |
377 |
|
378 |
pkg_postrm() { |
379 |
elisp-site-regen |
380 |
eselect emacs update ifunset |
381 |
} |
382 |
|
383 |
|
384 |
|
385 |
1.1 app-editors/emacs-vcs/emacs-vcs-24.3.9999.ebuild |
386 |
|
387 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.3.9999.ebuild?rev=1.1&view=markup |
388 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.3.9999.ebuild?rev=1.1&content-type=text/plain |
389 |
|
390 |
Index: emacs-vcs-24.3.9999.ebuild |
391 |
=================================================================== |
392 |
# Copyright 1999-2012 Gentoo Foundation |
393 |
# Distributed under the terms of the GNU General Public License v2 |
394 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-24.3.9999.ebuild,v 1.1 2012/11/02 08:10:14 ulm Exp $ |
395 |
|
396 |
EAPI=4 |
397 |
|
398 |
inherit autotools elisp-common eutils flag-o-matic multilib |
399 |
|
400 |
if [[ ${PV##*.} = 9999 ]]; then |
401 |
EBZR_PROJECT="emacs" |
402 |
EBZR_BRANCH="trunk" |
403 |
EBZR_REPO_URI="bzr://bzr.savannah.gnu.org/emacs/${EBZR_BRANCH}/" |
404 |
# "Nosmart" is much faster for initial branching. |
405 |
EBZR_INITIAL_URI="nosmart+${EBZR_REPO_URI}" |
406 |
EBZR_WORKDIR_CHECKOUT="t" #434746 |
407 |
inherit bzr |
408 |
SRC_URI="" |
409 |
else |
410 |
SRC_URI="mirror://gentoo/emacs-${PV}.tar.gz |
411 |
mirror://gnu-alpha/emacs/pretest/emacs-${PV}.tar.gz" |
412 |
# FULL_VERSION keeps the full version number, which is needed in |
413 |
# order to determine some path information correctly for copy/move |
414 |
# operations later on |
415 |
FULL_VERSION="${PV%%_*}" |
416 |
S="${WORKDIR}/emacs-${FULL_VERSION}" |
417 |
fi |
418 |
|
419 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
420 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
421 |
|
422 |
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
423 |
SLOT="24" |
424 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
425 |
IUSE="alsa athena dbus games gconf gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick jpeg kerberos libxml2 m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm" |
426 |
|
427 |
RDEPEND="sys-libs/ncurses |
428 |
>=app-admin/eselect-emacs-1.2 |
429 |
>=app-emacs/emacs-common-gentoo-1.3[games?,X?] |
430 |
net-libs/liblockfile |
431 |
hesiod? ( net-dns/hesiod ) |
432 |
kerberos? ( virtual/krb5 ) |
433 |
alsa? ( media-libs/alsa-lib ) |
434 |
gpm? ( sys-libs/gpm ) |
435 |
dbus? ( sys-apps/dbus ) |
436 |
gnutls? ( net-libs/gnutls ) |
437 |
libxml2? ( >=dev-libs/libxml2-2.2.0 ) |
438 |
selinux? ( sys-libs/libselinux ) |
439 |
X? ( |
440 |
x11-libs/libXmu |
441 |
x11-libs/libXt |
442 |
x11-misc/xbitmaps |
443 |
gconf? ( >=gnome-base/gconf-2.26.2 ) |
444 |
gsettings? ( >=dev-libs/glib-2.28.6 ) |
445 |
gif? ( media-libs/giflib ) |
446 |
jpeg? ( virtual/jpeg ) |
447 |
png? ( >=media-libs/libpng-1.4:0 ) |
448 |
svg? ( >=gnome-base/librsvg-2.0 ) |
449 |
tiff? ( media-libs/tiff ) |
450 |
xpm? ( x11-libs/libXpm ) |
451 |
imagemagick? ( >=media-gfx/imagemagick-6.6.2 ) |
452 |
xft? ( |
453 |
media-libs/fontconfig |
454 |
media-libs/freetype |
455 |
x11-libs/libXft |
456 |
m17n-lib? ( |
457 |
>=dev-libs/libotf-0.9.4 |
458 |
>=dev-libs/m17n-lib-1.5.1 |
459 |
) |
460 |
) |
461 |
gtk? ( |
462 |
gtk3? ( x11-libs/gtk+:3 ) |
463 |
!gtk3? ( x11-libs/gtk+:2 ) |
464 |
) |
465 |
!gtk? ( |
466 |
Xaw3d? ( x11-libs/libXaw3d ) |
467 |
!Xaw3d? ( |
468 |
athena? ( x11-libs/libXaw ) |
469 |
!athena? ( motif? ( >=x11-libs/motif-2.3:0 ) ) |
470 |
) |
471 |
) |
472 |
)" |
473 |
|
474 |
DEPEND="${RDEPEND} |
475 |
alsa? ( virtual/pkgconfig ) |
476 |
dbus? ( virtual/pkgconfig ) |
477 |
gnutls? ( virtual/pkgconfig ) |
478 |
libxml2? ( virtual/pkgconfig ) |
479 |
X? ( virtual/pkgconfig ) |
480 |
gzip-el? ( app-arch/gzip ) |
481 |
pax_kernel? ( sys-apps/paxctl )" |
482 |
|
483 |
EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
484 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
485 |
|
486 |
src_prepare() { |
487 |
if [[ ${PV##*.} = 9999 ]]; then |
488 |
FULL_VERSION=$(sed -n 's/^AC_INIT(emacs,[ \t]*\([^ \t,)]*\).*/\1/p' \ |
489 |
configure.ac) |
490 |
[[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version" |
491 |
einfo "Emacs branch: ${EBZR_BRANCH}" |
492 |
einfo "Revision: ${EBZR_REVISION:-${EBZR_REVNO}}" |
493 |
einfo "Emacs version number: ${FULL_VERSION}" |
494 |
[[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \ |
495 |
|| die "Upstream version number changed to ${FULL_VERSION}" |
496 |
fi |
497 |
|
498 |
epatch_user |
499 |
|
500 |
if ! use alsa; then |
501 |
# ALSA is detected even if not requested by its USE flag. |
502 |
# Suppress it by supplying pkg-config with a wrong library name. |
503 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.ac \ |
504 |
|| die "unable to sed configure.ac" |
505 |
fi |
506 |
if ! use gzip-el; then |
507 |
# Emacs' build system automatically detects the gzip binary and |
508 |
# compresses el files. We don't want that so confuse it with a |
509 |
# wrong binary name |
510 |
sed -i -e "/AC_PATH_PROG/s/gzip/PrEvEnTcOmPrEsSiOn/" configure.ac \ |
511 |
|| die "unable to sed configure.ac" |
512 |
fi |
513 |
|
514 |
AT_M4DIR=m4 eautoreconf |
515 |
} |
516 |
|
517 |
src_configure() { |
518 |
strip-flags |
519 |
|
520 |
if use sh; then |
521 |
replace-flags "-O[1-9]" -O0 #262359 |
522 |
elif use ia64; then |
523 |
replace-flags "-O[2-9]" -O1 #325373 |
524 |
else |
525 |
replace-flags "-O[3-9]" -O2 |
526 |
fi |
527 |
|
528 |
local myconf |
529 |
|
530 |
if use alsa && ! use sound; then |
531 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
532 |
einfo "so sound is switched on anyway." |
533 |
myconf="${myconf} --with-sound" |
534 |
else |
535 |
myconf="${myconf} $(use_with sound)" |
536 |
fi |
537 |
|
538 |
if use X; then |
539 |
myconf="${myconf} --with-x --without-ns" |
540 |
myconf="${myconf} $(use_with gconf)" |
541 |
myconf="${myconf} $(use_with gsettings)" |
542 |
myconf="${myconf} $(use_with toolkit-scroll-bars)" |
543 |
myconf="${myconf} $(use_with gif) $(use_with jpeg)" |
544 |
myconf="${myconf} $(use_with png) $(use_with svg rsvg)" |
545 |
myconf="${myconf} $(use_with tiff) $(use_with xpm)" |
546 |
myconf="${myconf} $(use_with imagemagick)" |
547 |
|
548 |
if use xft; then |
549 |
myconf="${myconf} --with-xft" |
550 |
myconf="${myconf} $(use_with m17n-lib libotf)" |
551 |
myconf="${myconf} $(use_with m17n-lib m17n-flt)" |
552 |
else |
553 |
myconf="${myconf} --without-xft" |
554 |
myconf="${myconf} --without-libotf --without-m17n-flt" |
555 |
use m17n-lib && ewarn \ |
556 |
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
557 |
fi |
558 |
|
559 |
if use gtk; then |
560 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
561 |
myconf="${myconf} --with-x-toolkit=$(usex gtk3 gtk3 gtk2)" |
562 |
local f |
563 |
for f in athena Xaw3d motif; do |
564 |
use ${f} && ewarn "USE flag \"${f}\" ignored" \ |
565 |
"(superseded by \"gtk\")" |
566 |
done |
567 |
elif use athena || use Xaw3d; then |
568 |
einfo "Configuring to build with Athena/Lucid toolkit" |
569 |
myconf="${myconf} --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
570 |
use motif && ewarn "USE flag \"motif\" ignored" \ |
571 |
"(superseded by \"athena\" or \"Xaw3d\")" |
572 |
elif use motif; then |
573 |
einfo "Configuring to build with Motif toolkit" |
574 |
myconf="${myconf} --with-x-toolkit=motif" |
575 |
else |
576 |
einfo "Configuring to build with no toolkit" |
577 |
myconf="${myconf} --with-x-toolkit=no" |
578 |
fi |
579 |
else |
580 |
myconf="${myconf} --without-x --without-ns" |
581 |
fi |
582 |
|
583 |
# Save version information in the Emacs binary. It will be available |
584 |
# in variable "system-configuration-options". |
585 |
myconf="${myconf} GENTOO_PACKAGE=${CATEGORY}/${PF}" |
586 |
if [[ ${PV##*.} = 9999 ]]; then |
587 |
myconf="${myconf} EBZR_BRANCH=${EBZR_BRANCH} EBZR_REVNO=${EBZR_REVNO}" |
588 |
fi |
589 |
|
590 |
# According to configure, this option is only used for GNU/Linux |
591 |
# (x86_64 and s390). For Gentoo Prefix we have to explicitly spell |
592 |
# out the location because $(get_libdir) does not necessarily return |
593 |
# something that matches the host OS's libdir naming (e.g. RHEL). |
594 |
local crtdir=$($(tc-getCC) -print-file-name=crt1.o) |
595 |
crtdir=${crtdir%/*} |
596 |
|
597 |
econf \ |
598 |
--program-suffix=-${EMACS_SUFFIX} \ |
599 |
--program-transform-name="s/emacs-[0-9].*/${EMACS_SUFFIX}/" \ |
600 |
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
601 |
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
602 |
--with-crt-dir="${crtdir}" \ |
603 |
--with-gameuser="${GAMES_USER_DED:-games}" \ |
604 |
--without-compress-info \ |
605 |
$(use_with hesiod) \ |
606 |
$(use_with kerberos) $(use_with kerberos kerberos5) \ |
607 |
$(use_with gpm) \ |
608 |
$(use_with dbus) \ |
609 |
$(use_with gnutls) \ |
610 |
$(use_with libxml2 xml2) \ |
611 |
$(use_with selinux) \ |
612 |
$(use_with wide-int) \ |
613 |
${myconf} |
614 |
} |
615 |
|
616 |
src_compile() { |
617 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
618 |
emake |
619 |
} |
620 |
|
621 |
src_install () { |
622 |
emake DESTDIR="${D}" NO_BIN_LINK=t install |
623 |
|
624 |
# move man pages to the correct place |
625 |
local m |
626 |
for m in "${ED}"/usr/share/man/man1/* ; do |
627 |
mv "${m}" "${m%.1}-${EMACS_SUFFIX}.1" || die "mv man failed" |
628 |
done |
629 |
|
630 |
# move info dir to avoid collisions with the dir file generated by portage |
631 |
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
632 |
|| die "moving info dir failed" |
633 |
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
634 |
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
635 |
|
636 |
# avoid collision between slots, see bug #169033 e.g. |
637 |
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
638 |
rm -rf "${ED}"/usr/share/{applications,icons} |
639 |
rm -rf "${ED}"/var |
640 |
|
641 |
# remove unused <version>/site-lisp dir |
642 |
rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
643 |
|
644 |
local c=";;" |
645 |
if use source; then |
646 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
647 |
# This is not meant to install all the source -- just the |
648 |
# C source you might find via find-function |
649 |
doins src/*.{c,h,m} |
650 |
c="" |
651 |
fi |
652 |
|
653 |
sed 's/^X//' >"${T}/${SITEFILE}" <<-EOF |
654 |
X |
655 |
;;; ${PN}-${SLOT} site-lisp configuration |
656 |
X |
657 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
658 |
X ${c}(setq find-function-C-source-directory |
659 |
X ${c} "${EPREFIX}/usr/share/emacs/${FULL_VERSION}/src") |
660 |
X (let ((path (getenv "INFOPATH")) |
661 |
X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
662 |
X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
663 |
X (and path |
664 |
X ;; move Emacs Info dir before anything else in /usr/share/info |
665 |
X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
666 |
X (while (and (cdr q) (not (string-match re (cadr q)))) |
667 |
X (setq q (cdr q))) |
668 |
X (setcdr q (cons dir (delete dir (cdr q)))) |
669 |
X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
670 |
EOF |
671 |
elisp-site-file-install "${T}/${SITEFILE}" || die |
672 |
|
673 |
dodoc README BUGS |
674 |
} |
675 |
|
676 |
pkg_preinst() { |
677 |
# move Info dir file to correct name |
678 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
679 |
if [[ -f ${ED}${infodir}/dir.orig ]]; then |
680 |
mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
681 |
elif [[ -d "${ED}"${infodir} ]]; then |
682 |
# this should not happen in EAPI 4 |
683 |
ewarn "Regenerating Info directory index in ${infodir} ..." |
684 |
rm -f "${ED}"${infodir}/dir{,.*} |
685 |
for f in "${ED}"${infodir}/*; do |
686 |
if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
687 |
install-info --info-dir="${ED}"${infodir} "${f}" \ |
688 |
|| die "install-info failed" |
689 |
fi |
690 |
done |
691 |
fi |
692 |
} |
693 |
|
694 |
pkg_postinst() { |
695 |
elisp-site-regen |
696 |
eselect emacs update ifunset |
697 |
|
698 |
if use X; then |
699 |
elog "You need to install some fonts for Emacs." |
700 |
elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's" |
701 |
elog "machine would satisfy basic Emacs requirements under X11." |
702 |
elog "See also http://www.gentoo.org/proj/en/lisp/emacs/xft.xml" |
703 |
elog "for how to enable anti-aliased fonts." |
704 |
elog |
705 |
fi |
706 |
|
707 |
elog "You can set the version to be started by /usr/bin/emacs through" |
708 |
elog "the Emacs eselect module, which also redirects man and info pages." |
709 |
elog "Therefore, several Emacs versions can be installed at the same time." |
710 |
elog "\"man emacs.eselect\" for details." |
711 |
elog |
712 |
elog "If you upgrade from a previous major version of Emacs, then it is" |
713 |
elog "strongly recommended that you use app-admin/emacs-updater to rebuild" |
714 |
elog "all byte-compiled elisp files of the installed Emacs packages." |
715 |
} |
716 |
|
717 |
pkg_postrm() { |
718 |
elisp-site-regen |
719 |
eselect emacs update ifunset |
720 |
} |