8 |
8 |
if [[ ${PV##*.} = 9999 ]]; then
|
9 |
9 |
inherit git-r3
|
10 |
10 |
EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
|
11 |
|
EGIT_BRANCH="emacs-28"
|
|
11 |
EGIT_BRANCH="emacs-29"
|
12 |
12 |
EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
|
13 |
13 |
S="${EGIT_CHECKOUT_DIR}"
|
14 |
14 |
SLOT="${PV%%.*}-vcs"
|
... | ... | |
32 |
32 |
SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
|
33 |
33 |
fi
|
34 |
34 |
# Patchset from proj/emacs-patches.git
|
35 |
|
SRC_URI+=" https://dev.gentoo.org/~ulm/emacs/${P}-patches-4.tar.xz"
|
|
35 |
SRC_URI+=" https://dev.gentoo.org/~ulm/emacs/${P}-patches-3.tar.xz"
|
36 |
36 |
PATCHES=("${WORKDIR}/patch")
|
37 |
37 |
SLOT="${PV%%.*}"
|
38 |
38 |
[[ ${PV} == *.*.* ]] && SLOT+="-vcs"
|
... | ... | |
43 |
43 |
HOMEPAGE="https://www.gnu.org/software/emacs/"
|
44 |
44 |
|
45 |
45 |
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
|
46 |
|
IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gfile gif +gmp gpm gsettings gtk gui gzip-el harfbuzz imagemagick +inotify jit jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars valgrind wide-int Xaw3d xft +xpm xwidgets zlib"
|
|
46 |
IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gfile gif +gmp gpm gsettings gtk gui gzip-el harfbuzz imagemagick +inotify jit jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source sqlite ssl svg systemd +threads tiff toolkit-scroll-bars tree-sitter valgrind webp wide-int +X Xaw3d xft +xpm xwidgets zlib"
|
|
47 |
|
|
48 |
X_DEPEND="x11-libs/libICE
|
|
49 |
x11-libs/libSM
|
|
50 |
x11-libs/libX11
|
|
51 |
x11-libs/libXcomposite
|
|
52 |
x11-libs/libXext
|
|
53 |
x11-libs/libXfixes
|
|
54 |
x11-libs/libXi
|
|
55 |
x11-libs/libXinerama
|
|
56 |
x11-libs/libXrandr
|
|
57 |
x11-libs/libxcb
|
|
58 |
x11-libs/xcb-util
|
|
59 |
x11-misc/xbitmaps
|
|
60 |
xpm? ( x11-libs/libXpm )
|
|
61 |
xft? (
|
|
62 |
media-libs/fontconfig
|
|
63 |
media-libs/freetype
|
|
64 |
x11-libs/libXrender
|
|
65 |
cairo? ( >=x11-libs/cairo-1.12.18[X] )
|
|
66 |
!cairo? ( x11-libs/libXft )
|
|
67 |
harfbuzz? ( media-libs/harfbuzz:0= )
|
|
68 |
m17n-lib? (
|
|
69 |
>=dev-libs/libotf-0.9.4
|
|
70 |
>=dev-libs/m17n-lib-1.5.1
|
|
71 |
)
|
|
72 |
)
|
|
73 |
gtk? (
|
|
74 |
x11-libs/gtk+:3
|
|
75 |
xwidgets? (
|
|
76 |
net-libs/webkit-gtk:4.1=
|
|
77 |
x11-libs/libXcomposite
|
|
78 |
)
|
|
79 |
)
|
|
80 |
!gtk? (
|
|
81 |
motif? (
|
|
82 |
>=x11-libs/motif-2.3:0
|
|
83 |
x11-libs/libXpm
|
|
84 |
x11-libs/libXmu
|
|
85 |
x11-libs/libXt
|
|
86 |
)
|
|
87 |
!motif? (
|
|
88 |
Xaw3d? (
|
|
89 |
x11-libs/libXaw3d
|
|
90 |
x11-libs/libXmu
|
|
91 |
x11-libs/libXt
|
|
92 |
)
|
|
93 |
!Xaw3d? ( athena? (
|
|
94 |
x11-libs/libXaw
|
|
95 |
x11-libs/libXmu
|
|
96 |
x11-libs/libXt
|
|
97 |
) )
|
|
98 |
)
|
|
99 |
)"
|
47 |
100 |
|
48 |
101 |
RDEPEND="app-emacs/emacs-common[games?,gui(-)?]
|
49 |
102 |
sys-libs/ncurses:0=
|
... | ... | |
65 |
118 |
mailutils? ( net-mail/mailutils[clients] )
|
66 |
119 |
!mailutils? ( acct-group/mail net-libs/liblockfile )
|
67 |
120 |
selinux? ( sys-libs/libselinux )
|
|
121 |
sqlite? ( dev-db/sqlite:3 )
|
68 |
122 |
ssl? ( net-libs/gnutls:0= )
|
69 |
123 |
systemd? ( sys-apps/systemd )
|
|
124 |
tree-sitter? ( dev-libs/tree-sitter )
|
70 |
125 |
valgrind? ( dev-util/valgrind )
|
71 |
126 |
zlib? ( sys-libs/zlib )
|
72 |
|
gui? ( !aqua? (
|
73 |
|
x11-libs/libICE
|
74 |
|
x11-libs/libSM
|
75 |
|
x11-libs/libX11
|
76 |
|
x11-libs/libXext
|
77 |
|
x11-libs/libXfixes
|
78 |
|
x11-libs/libXinerama
|
79 |
|
x11-libs/libXrandr
|
80 |
|
x11-libs/libxcb
|
81 |
|
x11-misc/xbitmaps
|
82 |
|
gsettings? ( >=dev-libs/glib-2.28.6 )
|
|
127 |
gui? (
|
83 |
128 |
gif? ( media-libs/giflib:0= )
|
84 |
129 |
jpeg? ( media-libs/libjpeg-turbo:0= )
|
85 |
130 |
png? ( >=media-libs/libpng-1.4:0= )
|
86 |
131 |
svg? ( >=gnome-base/librsvg-2.0 )
|
87 |
132 |
tiff? ( media-libs/tiff:= )
|
88 |
|
xpm? ( x11-libs/libXpm )
|
|
133 |
webp? ( media-libs/libwebp:0= )
|
89 |
134 |
imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= )
|
90 |
|
xft? (
|
91 |
|
media-libs/fontconfig
|
92 |
|
media-libs/freetype
|
93 |
|
x11-libs/libXrender
|
94 |
|
cairo? ( >=x11-libs/cairo-1.12.18[X] )
|
95 |
|
!cairo? ( x11-libs/libXft )
|
96 |
|
harfbuzz? ( media-libs/harfbuzz:0= )
|
97 |
|
m17n-lib? (
|
98 |
|
>=dev-libs/libotf-0.9.4
|
99 |
|
>=dev-libs/m17n-lib-1.5.1
|
100 |
|
)
|
101 |
|
)
|
102 |
|
gtk? (
|
103 |
|
x11-libs/gtk+:3
|
104 |
|
xwidgets? (
|
105 |
|
net-libs/webkit-gtk:4.1=
|
106 |
|
x11-libs/libXcomposite
|
107 |
|
)
|
108 |
|
)
|
109 |
|
!gtk? (
|
110 |
|
motif? (
|
111 |
|
>=x11-libs/motif-2.3:0
|
112 |
|
x11-libs/libXpm
|
113 |
|
x11-libs/libXmu
|
114 |
|
x11-libs/libXt
|
|
135 |
!aqua? (
|
|
136 |
gsettings? (
|
|
137 |
app-emacs/emacs-common[gsettings(-)]
|
|
138 |
>=dev-libs/glib-2.28.6
|
115 |
139 |
)
|
116 |
|
!motif? (
|
117 |
|
Xaw3d? (
|
118 |
|
x11-libs/libXaw3d
|
119 |
|
x11-libs/libXmu
|
120 |
|
x11-libs/libXt
|
|
140 |
gtk? ( !X? (
|
|
141 |
media-libs/fontconfig
|
|
142 |
media-libs/freetype
|
|
143 |
>=x11-libs/cairo-1.12.18
|
|
144 |
x11-libs/gtk+:3
|
|
145 |
harfbuzz? ( media-libs/harfbuzz:0= )
|
|
146 |
m17n-lib? (
|
|
147 |
>=dev-libs/libotf-0.9.4
|
|
148 |
>=dev-libs/m17n-lib-1.5.1
|
121 |
149 |
)
|
122 |
|
!Xaw3d? ( athena? (
|
123 |
|
x11-libs/libXaw
|
124 |
|
x11-libs/libXmu
|
125 |
|
x11-libs/libXt
|
126 |
|
) )
|
127 |
|
)
|
|
150 |
xwidgets? ( net-libs/webkit-gtk:4.1= )
|
|
151 |
) )
|
|
152 |
!gtk? ( ${X_DEPEND} )
|
|
153 |
X? ( ${X_DEPEND} )
|
128 |
154 |
)
|
129 |
|
) )"
|
|
155 |
)"
|
130 |
156 |
|
131 |
157 |
DEPEND="${RDEPEND}
|
132 |
|
gui? ( !aqua? ( x11-base/xorg-proto ) )"
|
|
158 |
gui? ( !aqua? (
|
|
159 |
!gtk? ( x11-base/xorg-proto )
|
|
160 |
X? ( x11-base/xorg-proto )
|
|
161 |
) )"
|
133 |
162 |
|
134 |
163 |
BDEPEND="sys-apps/texinfo
|
135 |
164 |
virtual/pkgconfig
|
... | ... | |
155 |
184 |
fi
|
156 |
185 |
|
157 |
186 |
if use jit; then
|
158 |
|
export NATIVE_FULL_AOT=1
|
159 |
187 |
find lisp -type f -name "*.elc" -delete || die
|
160 |
188 |
|
161 |
189 |
# These files ignore LDFLAGS. We assign the variable here, because
|
... | ... | |
174 |
202 |
# Fix filename reference in redirected man page
|
175 |
203 |
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die
|
176 |
204 |
|
|
205 |
# libseccomp is detected by configure but doesn't appear to have any
|
|
206 |
# effect on the installed image. Suppress it by supplying pkg-config
|
|
207 |
# with a wrong library name.
|
|
208 |
sed -i -e "/CHECK_MODULES/s/libseccomp/DiSaBlE&/" configure.ac || die
|
|
209 |
|
177 |
210 |
AT_M4DIR=m4 eautoreconf
|
178 |
211 |
}
|
179 |
212 |
|
... | ... | |
199 |
232 |
myconf+=" $(use_with zlib)"
|
200 |
233 |
fi
|
201 |
234 |
|
|
235 |
# Emacs supports these window systems:
|
|
236 |
# X11, pure GTK (without X11), or Nextstep (Aqua/Cocoa).
|
|
237 |
# General GUI support is enabled by the "gui" USE flag, then
|
|
238 |
# the window system is selected as follows:
|
|
239 |
# "aqua" -> Nextstep
|
|
240 |
# "gtk -X" -> pure GTK
|
|
241 |
# otherwise -> X11
|
|
242 |
# For X11 there is the further choice of toolkits GTK, Motif,
|
|
243 |
# Athena (Lucid), or no toolkit. They are enabled (in order of
|
|
244 |
# preference) with the "gtk", "motif", "Xaw3d", and "athena" flags.
|
|
245 |
|
202 |
246 |
if ! use gui; then
|
203 |
247 |
einfo "Configuring to build without window system support"
|
204 |
|
myconf+=" --without-x --without-ns"
|
|
248 |
myconf+=" --without-x --without-pgtk --without-ns"
|
205 |
249 |
elif use aqua; then
|
206 |
250 |
einfo "Configuring to build with Nextstep (Macintosh Cocoa) support"
|
207 |
251 |
myconf+=" --with-ns --disable-ns-self-contained"
|
208 |
|
myconf+=" --without-x"
|
|
252 |
myconf+=" --without-x --without-pgtk"
|
|
253 |
elif use gtk && ! use X; then
|
|
254 |
einfo "Configuring to build with pure GTK (without X11) support"
|
|
255 |
myconf+=" --with-pgtk --without-x --without-ns"
|
|
256 |
myconf+=" --with-toolkit-scroll-bars" #836392
|
|
257 |
myconf+=" --without-gconf"
|
|
258 |
myconf+=" $(use_with gsettings)"
|
|
259 |
myconf+=" $(use_with harfbuzz)"
|
|
260 |
myconf+=" $(use_with m17n-lib libotf)"
|
|
261 |
myconf+=" $(use_with m17n-lib m17n-flt)"
|
|
262 |
myconf+=" $(use_with xwidgets)"
|
209 |
263 |
else
|
210 |
|
myconf+=" --with-x --without-ns"
|
|
264 |
# X11
|
|
265 |
myconf+=" --with-x --without-pgtk --without-ns"
|
211 |
266 |
myconf+=" --without-gconf"
|
212 |
267 |
myconf+=" $(use_with gsettings)"
|
213 |
268 |
myconf+=" $(use_with toolkit-scroll-bars)"
|
214 |
|
myconf+=" $(use_with gif)"
|
215 |
|
myconf+=" $(use_with jpeg)"
|
216 |
|
myconf+=" $(use_with png)"
|
217 |
|
myconf+=" $(use_with svg rsvg)"
|
218 |
|
myconf+=" $(use_with tiff)"
|
219 |
269 |
myconf+=" $(use_with xpm)"
|
220 |
|
myconf+=" $(use_with imagemagick)"
|
221 |
270 |
|
222 |
271 |
if use xft; then
|
223 |
272 |
myconf+=" --with-xft"
|
... | ... | |
271 |
320 |
"USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
|
272 |
321 |
fi
|
273 |
322 |
|
|
323 |
if use gui; then
|
|
324 |
# Common flags recognised for all GUIs
|
|
325 |
myconf+=" $(use_with gif)"
|
|
326 |
myconf+=" $(use_with jpeg)"
|
|
327 |
myconf+=" $(use_with png)"
|
|
328 |
myconf+=" $(use_with svg rsvg)"
|
|
329 |
myconf+=" $(use_with tiff)"
|
|
330 |
myconf+=" $(use_with webp)"
|
|
331 |
myconf+=" $(use_with imagemagick)"
|
|
332 |
fi
|
|
333 |
|
274 |
334 |
if tc-is-cross-compiler; then
|
275 |
335 |
# Configure a CBUILD directory when cross-compiling to make tools
|
276 |
336 |
mkdir "${S}-build" && pushd "${S}-build" >/dev/null || die
|
... | ... | |
302 |
362 |
$(use_with games gameuser ":gamestat") \
|
303 |
363 |
$(use_with gmp libgmp) \
|
304 |
364 |
$(use_with gpm) \
|
305 |
|
$(use_with jit native-compilation) \
|
|
365 |
$(use_with jit native-compilation aot) \
|
306 |
366 |
$(use_with json) \
|
307 |
367 |
$(use_with kerberos) $(use_with kerberos kerberos5) \
|
308 |
368 |
$(use_with lcms lcms2) \
|
309 |
369 |
$(use_with libxml2 xml2) \
|
310 |
370 |
$(use_with mailutils) \
|
311 |
371 |
$(use_with selinux) \
|
|
372 |
$(use_with sqlite sqlite3) \
|
312 |
373 |
$(use_with ssl gnutls) \
|
313 |
374 |
$(use_with systemd libsystemd) \
|
314 |
375 |
$(use_with threads) \
|
|
376 |
$(use_with tree-sitter) \
|
315 |
377 |
$(use_with wide-int) \
|
316 |
378 |
${myconf}
|
317 |
379 |
}
|
... | ... | |
346 |
408 |
# mml-secure-sign-verify-1
|
347 |
409 |
%lisp/gnus/mml-sec-tests.el
|
348 |
410 |
|
349 |
|
# Reason: race condition
|
350 |
|
# Looks like it should be fixed in 29.x at least:
|
351 |
|
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55706
|
352 |
|
# files-tests-file-name-non-special-file-in-directory-p
|
353 |
|
%lisp/files-tests.el
|
354 |
|
|
355 |
411 |
# Reason: permission denied on /nonexistent
|
356 |
412 |
# (vc-*-bzr only fails if breezy is installed, as they
|
357 |
413 |
# try to access cache dirs under /nonexistent)
|
... | ... | |
403 |
459 |
# avoid collision between slots, see bug #169033 e.g.
|
404 |
460 |
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el || die
|
405 |
461 |
rm -rf "${ED}"/usr/share/{applications,icons} || die
|
|
462 |
rm -rf "${ED}"/usr/share/glib-2.0 || die #911117
|
406 |
463 |
rm -rf "${ED}/usr/$(get_libdir)/systemd" || die
|
407 |
464 |
rm -rf "${ED}"/var || die
|
408 |
465 |
|