1 |
commit: 7e8f8f2c15a1eb2148b73d65ceddf6712cea5a15 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 22 12:36:06 2018 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 22 12:36:06 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=7e8f8f2c |
7 |
|
8 |
app-editors/emacs: Copied from gentoo repo. |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
app-editors/emacs/Manifest | 8 + |
13 |
app-editors/emacs/emacs-18.59-r11.ebuild | 150 +++++++++++++ |
14 |
app-editors/emacs/emacs-23.4-r17.ebuild | 366 ++++++++++++++++++++++++++++++ |
15 |
app-editors/emacs/emacs-24.5-r5.ebuild | 359 ++++++++++++++++++++++++++++++ |
16 |
app-editors/emacs/emacs-25.3-r3.ebuild | 371 +++++++++++++++++++++++++++++++ |
17 |
app-editors/emacs/metadata.xml | 53 +++++ |
18 |
6 files changed, 1307 insertions(+) |
19 |
|
20 |
diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest |
21 |
new file mode 100644 |
22 |
index 0000000..10f4db7 |
23 |
--- /dev/null |
24 |
+++ b/app-editors/emacs/Manifest |
25 |
@@ -0,0 +1,8 @@ |
26 |
+DIST emacs-18.59-linux22x-elf-glibc21.diff.gz 15671 BLAKE2B 0106fe8053b4f65f384d451ca85138991a57afaca16b32035585055bb877c039af826859fa58c4660ec80664d3bfb0ee7a757ad76381c150ebcb22cb333a98d6 SHA512 c6c6ea33850dadf08d68fff56fc6aacc80ad1aa36661260715d50b95438942d56e6244094427d50356cfe716f26559feb885254c436399bff7be639637d605b6 |
27 |
+DIST emacs-18.59-patches-10.tar.xz 21496 BLAKE2B bfa0202511a9e41d3278c63f43f174cca4ba95f42675796d85139fc43654ca3b9bc56a8c547029eaae967df66ec1e520d3bcdc67c4d53261fea70def6641574c SHA512 c0255d9d02e047cc2173cebb916677e268d8f5043c9dd08041b78019df208cdd02eb8eb49256acde7a3d5b004a7227ee9a1220d7b1e24580bdb5a5258216fc39 |
28 |
+DIST emacs-18.59.tar.gz 2962652 BLAKE2B d617636daff41e672af2dcda26ec24b2495cf0a3e6373561ee26a2a922b7252c074dd6b79289d771853a4720c60f084f5726b904bf65989718173232ac874b0b SHA512 03ce565e346e89b7aacb1852f4783e8907f394de7da0c543b475cb038eb89b87f980d0f7ca1841b1d2108b20f211e95113c7214e4a33e5767a1827ff43173f33 |
29 |
+DIST emacs-23.4-patches-21.tar.xz 19604 BLAKE2B 97327f2079c496c28122203d233a12199a3c11a8c4efb2107247a4ca4483b898467d73d19d4f0570ec7be2a49dc5f6bd1bc9ee0811f932e7deb6b1c4ca96e362 SHA512 135eda432de64200797456d594f7de811275a7adf792d10a1c3a51ca4bbbbaa3a2c682b9fd577c4d93fbce967ca08d4ac47eb45f031477c3e44c69c14d5d5b48 |
30 |
+DIST emacs-23.4.tar.bz2 38646508 BLAKE2B 33dac5d27a63b7aab6b4053964a0ecf7f7939c7aea5af15103f2da7bd34fbb18dba7a1bf44cc4fcc2e3fb1439cdf7085d8dfc4b0005f5485748996e75ca6872d SHA512 def7a95ecaefae24d8102b96b1d575a23def1b11a8f0bb17b68f7913bd118e2ea4449a8feee76c1bd649f099b70419f0d494ddd9bb32b26f92720cda842b0296 |
31 |
+DIST emacs-24.5-patches-4.tar.xz 13632 BLAKE2B 99e70f4ee32c1ba3a66b934de692437aaf0b83eb6fa841ce4569bc58e2bd12802890c2a8496375280c0ce8fa56515918dfdcbc958f349bc2472104e37ad1fcd1 SHA512 569c3a55aaf1102c0bae4ab25ee06372763cd2de8a54e26b3eefd54e585cf90b53c8ffe1ca48eb4fd312a340380fd3f2fcdb584697814bf429129b48fa56ffb5 |
32 |
+DIST emacs-24.5.tar.xz 39759804 BLAKE2B aec253528038686822d1f8ed9a52dff276789ef7744053fc9b6176fceba4d4d8684fe979cf97e756b3feaf734d2377baef81f5efaa5450930a4e94d9f3bca355 SHA512 89dee4c3aadb6e505c523f84c65b5e40e5bf28a586cc8a4518a59581c22972f942bb6f3c772df0d5b2685c3e78247c545c6bb2576e981d1ef0f9298c18ad1677 |
33 |
+DIST emacs-25.3.tar.xz 42854740 BLAKE2B 4f4e2572bbef48b75c561497fc22046081e56099b6174725d79b15a5b16d5c886eaf8ff3f75cf561e989ebb092ab9e98ba7503e720a9db7560758b30d5116f23 SHA512 1cce656451b6ca8502ebb229e88bd3ef48b7f9444a10eeac4ea43bd5491b2efacd641dfa35227a33362c3866493d3449cf1df81606563eef44bba0ed668e457f |
34 |
|
35 |
diff --git a/app-editors/emacs/emacs-18.59-r11.ebuild b/app-editors/emacs/emacs-18.59-r11.ebuild |
36 |
new file mode 100644 |
37 |
index 0000000..bd7a527 |
38 |
--- /dev/null |
39 |
+++ b/app-editors/emacs/emacs-18.59-r11.ebuild |
40 |
@@ -0,0 +1,150 @@ |
41 |
+# Copyright 1999-2018 Gentoo Foundation |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=6 |
45 |
+ |
46 |
+inherit toolchain-funcs flag-o-matic multilib |
47 |
+ |
48 |
+DESCRIPTION="The extensible self-documenting text editor" |
49 |
+HOMEPAGE="https://www.gnu.org/software/emacs/" |
50 |
+SRC_URI="ftp://ftp.gnu.org/old-gnu/emacs/${P}.tar.gz |
51 |
+ ftp://ftp.splode.com/pub/users/friedman/emacs/${P}-linux22x-elf-glibc21.diff.gz |
52 |
+ https://dev.gentoo.org/~ulm/emacs/${P}-patches-10.tar.xz" |
53 |
+ |
54 |
+LICENSE="GPL-1+ GPL-2+ BSD" #HPND |
55 |
+SLOT="18" |
56 |
+KEYWORDS="amd64 x86" |
57 |
+IUSE="abi_x86_x32" |
58 |
+ |
59 |
+RDEPEND=">=app-eselect/eselect-emacs-1.16 |
60 |
+ sys-libs/ncurses:0= |
61 |
+ amd64? ( |
62 |
+ abi_x86_x32? ( >=sys-libs/ncurses-5.9-r3:0=[abi_x86_x32(-)?] ) |
63 |
+ !abi_x86_x32? ( >=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)] ) |
64 |
+ )" |
65 |
+# X? ( x11-libs/libX11[-xcb] ) |
66 |
+DEPEND="${RDEPEND} |
67 |
+ virtual/pkgconfig" |
68 |
+ |
69 |
+PATCHES="../${P}-linux22x-elf-glibc21.diff ../patch" |
70 |
+ |
71 |
+src_configure() { |
72 |
+ # autoconf? What's autoconf? We are living in 1992. ;-) |
73 |
+ local arch |
74 |
+ case ${ARCH} in |
75 |
+ amd64) |
76 |
+ if use abi_x86_x32; then |
77 |
+ arch=x86-x32 |
78 |
+ multilib_toolchain_setup x32 |
79 |
+ else |
80 |
+ arch=intel386 |
81 |
+ multilib_toolchain_setup x86 |
82 |
+ fi |
83 |
+ ;; |
84 |
+ x86) arch=intel386 ;; |
85 |
+ *) die "Architecture ${ARCH} not yet supported" ;; |
86 |
+ esac |
87 |
+ local cmd="s/\"s-.*\.h\"/\"s-linux.h\"/;s/\"m-.*\.h\"/\"m-${arch}.h\"/" |
88 |
+ #use X && cmd="${cmd};s/.*\(#define HAVE_X_WINDOWS\).*/\1/" |
89 |
+ sed -e "${cmd}" src/config.h-dist >src/config.h || die |
90 |
+ |
91 |
+ cat <<-END >src/paths.h |
92 |
+ #define PATH_LOADSEARCH "/usr/share/emacs/${PV}/lisp" |
93 |
+ #define PATH_EXEC "/usr/share/emacs/${PV}/etc" |
94 |
+ #define PATH_LOCK "/var/lib/emacs/lock/" |
95 |
+ #define PATH_SUPERLOCK "/var/lib/emacs/lock/!!!SuperLock!!!" |
96 |
+ END |
97 |
+ |
98 |
+ sed -i -e "s:/usr/lib/\([^ ]*\).o:/usr/$(get_libdir)/\1.o:g" \ |
99 |
+ -e "s:-lncurses:$("$(tc-getPKG_CONFIG)" --libs ncurses):" \ |
100 |
+ src/s-linux.h || die |
101 |
+ |
102 |
+ # -O3 and -finline-functions cause segmentation faults at run time. |
103 |
+ # -Wno-implicit will quieten GCC 5; feel free to submit a patch |
104 |
+ # adding all those missing prototypes. |
105 |
+ strip-flags |
106 |
+ filter-flags -finline-functions -fpie |
107 |
+ append-flags -Wno-implicit |
108 |
+ append-ldflags $(test-flags -no-pie) #639562 |
109 |
+ replace-flags -O[3-9] -O2 |
110 |
+} |
111 |
+ |
112 |
+src_compile() { |
113 |
+ # Do not use the sandbox, or the dumped Emacs will be twice as large |
114 |
+ export SANDBOX_ON=0 |
115 |
+ emake --jobs=1 \ |
116 |
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Demacs" \ |
117 |
+ LD="$(tc-getCC) -nostdlib" LDFLAGS="${LDFLAGS}" |
118 |
+} |
119 |
+ |
120 |
+src_install() { |
121 |
+ local basedir="/usr/share/emacs/${PV}" i |
122 |
+ |
123 |
+ dodir ${basedir} |
124 |
+ dodir /usr/share/man/man1 |
125 |
+ emake --jobs=1 \ |
126 |
+ LIBDIR="${D}"${basedir} \ |
127 |
+ BINDIR="${D}"/usr/bin \ |
128 |
+ MANDIR="${D}"/usr/share/man/man1 \ |
129 |
+ install |
130 |
+ |
131 |
+ rmdir "${D}"${basedir}/lock || die |
132 |
+ find "${D}"${basedir} -type f \( -name "*.c" -o -name ChangeLog \ |
133 |
+ -o -name COPYING ! -path "*/etc/COPYING" \) -exec rm "{}" + || die |
134 |
+ fperms -R go-w ${basedir} |
135 |
+ |
136 |
+ # remove duplicate DOC file |
137 |
+ rm "${D}"${basedir}/etc/DOC || die |
138 |
+ |
139 |
+ # move executables to the correct place |
140 |
+ mv "${D}"/usr/bin/emacs{,-${SLOT}} || die |
141 |
+ for i in etags ctags emacsclient; do |
142 |
+ mv "${D}"/usr/bin/${i}{,-emacs-${SLOT}} || die |
143 |
+ rm "${D}"${basedir}/etc/${i} || die |
144 |
+ done |
145 |
+ |
146 |
+ dodir /usr/libexec/emacs/${PV} |
147 |
+ for i in wakeup digest-doc sorted-doc movemail cvtmail fakemail \ |
148 |
+ yow env server |
149 |
+ do |
150 |
+ mv "${D}"${basedir}/etc/${i} "${D}"/usr/libexec/emacs/${PV}/${i} || die |
151 |
+ dosym ../../../../libexec/emacs/${PV}/${i} ${basedir}/etc/${i} |
152 |
+ done |
153 |
+ for i in test-distrib make-docfile; do |
154 |
+ rm "${D}"${basedir}/etc/${i} || die |
155 |
+ done |
156 |
+ |
157 |
+ # move man page |
158 |
+ mv "${D}"/usr/share/man/man1/emacs{,-${SLOT}}.1 || die |
159 |
+ |
160 |
+ # move Info files |
161 |
+ dodir /usr/share/info |
162 |
+ mv "${D}"${basedir}/info "${D}"/usr/share/info/emacs-${SLOT} || die |
163 |
+ dosym ../../info/emacs-${SLOT} "${basedir}"/info |
164 |
+ docompress -x /usr/share/info |
165 |
+ |
166 |
+ # move Info dir to avoid collisions with the dir file generated by portage |
167 |
+ mv "${D}"/usr/share/info/emacs-${SLOT}/dir{,.orig} || die |
168 |
+ touch "${D}"/usr/share/info/emacs-${SLOT}/.keepinfodir |
169 |
+ |
170 |
+ dodir /var/lib/emacs |
171 |
+ diropts -m0777 |
172 |
+ keepdir /var/lib/emacs/lock |
173 |
+ |
174 |
+ dodoc README PROBLEMS |
175 |
+} |
176 |
+ |
177 |
+pkg_preinst() { |
178 |
+ # move Info dir file to correct name |
179 |
+ if [[ -d "${D}"/usr/share/info ]]; then |
180 |
+ mv "${D}"/usr/share/info/emacs-${SLOT}/dir{.orig,} || die |
181 |
+ fi |
182 |
+} |
183 |
+ |
184 |
+pkg_postinst() { |
185 |
+ eselect emacs update ifunset |
186 |
+} |
187 |
+ |
188 |
+pkg_postrm() { |
189 |
+ eselect emacs update ifunset |
190 |
+} |
191 |
|
192 |
diff --git a/app-editors/emacs/emacs-23.4-r17.ebuild b/app-editors/emacs/emacs-23.4-r17.ebuild |
193 |
new file mode 100644 |
194 |
index 0000000..0a3267b |
195 |
--- /dev/null |
196 |
+++ b/app-editors/emacs/emacs-23.4-r17.ebuild |
197 |
@@ -0,0 +1,366 @@ |
198 |
+# Copyright 1999-2018 Gentoo Foundation |
199 |
+# Distributed under the terms of the GNU General Public License v2 |
200 |
+ |
201 |
+EAPI=6 |
202 |
+WANT_AUTOMAKE="none" |
203 |
+ |
204 |
+inherit autotools elisp-common flag-o-matic multilib readme.gentoo-r1 |
205 |
+ |
206 |
+DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
207 |
+HOMEPAGE="https://www.gnu.org/software/emacs/" |
208 |
+SRC_URI="mirror://gnu/emacs/${P}.tar.bz2 |
209 |
+ https://dev.gentoo.org/~ulm/emacs/${P}-patches-21.tar.xz" |
210 |
+ |
211 |
+LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
212 |
+SLOT="23" |
213 |
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
214 |
+IUSE="alsa aqua athena dbus games gconf gif gpm gtk gzip-el hesiod jpeg kerberos livecd m17n-lib motif pax_kernel png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm" |
215 |
+REQUIRED_USE="?? ( aqua X )" |
216 |
+ |
217 |
+RDEPEND="sys-libs/ncurses:0= |
218 |
+ >=app-eselect/eselect-emacs-1.16 |
219 |
+ >=app-emacs/emacs-common-gentoo-1.5[games?,X?] |
220 |
+ net-libs/liblockfile |
221 |
+ hesiod? ( net-dns/hesiod ) |
222 |
+ kerberos? ( virtual/krb5 ) |
223 |
+ alsa? ( media-libs/alsa-lib ) |
224 |
+ gpm? ( sys-libs/gpm ) |
225 |
+ dbus? ( sys-apps/dbus ) |
226 |
+ X? ( |
227 |
+ x11-libs/libICE |
228 |
+ x11-libs/libSM |
229 |
+ x11-libs/libX11 |
230 |
+ x11-misc/xbitmaps |
231 |
+ gconf? ( >=gnome-base/gconf-2.26.2 ) |
232 |
+ gif? ( media-libs/giflib:0= ) |
233 |
+ jpeg? ( virtual/jpeg:0= ) |
234 |
+ png? ( >=media-libs/libpng-1.4:0= ) |
235 |
+ svg? ( >=gnome-base/librsvg-2.0 ) |
236 |
+ tiff? ( media-libs/tiff:0 ) |
237 |
+ xpm? ( x11-libs/libXpm ) |
238 |
+ xft? ( |
239 |
+ media-libs/fontconfig |
240 |
+ media-libs/freetype |
241 |
+ x11-libs/libXft |
242 |
+ x11-libs/libXrender |
243 |
+ m17n-lib? ( |
244 |
+ >=dev-libs/libotf-0.9.4 |
245 |
+ >=dev-libs/m17n-lib-1.5.1 |
246 |
+ ) |
247 |
+ ) |
248 |
+ gtk? ( x11-libs/gtk+:2 ) |
249 |
+ !gtk? ( |
250 |
+ motif? ( |
251 |
+ >=x11-libs/motif-2.3:0 |
252 |
+ x11-libs/libXp |
253 |
+ x11-libs/libXpm |
254 |
+ x11-libs/libXext |
255 |
+ x11-libs/libXmu |
256 |
+ x11-libs/libXt |
257 |
+ ) |
258 |
+ !motif? ( |
259 |
+ Xaw3d? ( |
260 |
+ x11-libs/libXaw3d |
261 |
+ x11-libs/libXext |
262 |
+ x11-libs/libXmu |
263 |
+ x11-libs/libXt |
264 |
+ ) |
265 |
+ !Xaw3d? ( athena? ( |
266 |
+ x11-libs/libXaw |
267 |
+ x11-libs/libXext |
268 |
+ x11-libs/libXmu |
269 |
+ x11-libs/libXt |
270 |
+ ) ) |
271 |
+ ) |
272 |
+ ) |
273 |
+ )" |
274 |
+ |
275 |
+DEPEND="${RDEPEND} |
276 |
+ alsa? ( virtual/pkgconfig ) |
277 |
+ dbus? ( virtual/pkgconfig ) |
278 |
+ X? ( virtual/pkgconfig ) |
279 |
+ gzip-el? ( app-arch/gzip ) |
280 |
+ pax_kernel? ( sys-apps/attr )" |
281 |
+ |
282 |
+RDEPEND="${RDEPEND} |
283 |
+ !<app-editors/emacs-vcs-${PV}" |
284 |
+ |
285 |
+EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
286 |
+SITEFILE="20${PN}-${SLOT}-gentoo.el" |
287 |
+# FULL_VERSION keeps the full version number, which is needed in |
288 |
+# order to determine some path information correctly for copy/move |
289 |
+# operations later on |
290 |
+FULL_VERSION="${PV%%_*}" |
291 |
+S="${WORKDIR}/emacs-${FULL_VERSION}" |
292 |
+ |
293 |
+src_prepare() { |
294 |
+ eapply ../patch |
295 |
+ eapply_user |
296 |
+ |
297 |
+ sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \ |
298 |
+ || die "unable to sed ctags.1" |
299 |
+ |
300 |
+ if ! use alsa; then |
301 |
+ # ALSA is detected even if not requested by its USE flag. |
302 |
+ # Suppress it by supplying pkg-config with a wrong library name. |
303 |
+ sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \ |
304 |
+ || die "unable to sed configure.in" |
305 |
+ fi |
306 |
+ if ! use gzip-el; then |
307 |
+ # Emacs' build system automatically detects the gzip binary and |
308 |
+ # compresses el files. We don't want that so confuse it with a |
309 |
+ # wrong binary name |
310 |
+ sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
311 |
+ || die "unable to sed configure.in" |
312 |
+ fi |
313 |
+ |
314 |
+ mv configure.in configure.ac || die |
315 |
+ eautoreconf |
316 |
+ touch src/stamp-h.in || die |
317 |
+} |
318 |
+ |
319 |
+src_configure() { |
320 |
+ strip-flags |
321 |
+ filter-flags -fstrict-aliasing -pie |
322 |
+ append-flags $(test-flags -fno-strict-aliasing) |
323 |
+ append-ldflags $(test-flags -no-pie) #639568 |
324 |
+ |
325 |
+ if use sh; then |
326 |
+ replace-flags "-O[1-9]" -O0 #262359 |
327 |
+ elif use ia64; then |
328 |
+ replace-flags "-O[2-9]" -O1 #325373 |
329 |
+ else |
330 |
+ replace-flags "-O[3-9]" -O2 |
331 |
+ fi |
332 |
+ |
333 |
+ local myconf |
334 |
+ |
335 |
+ if use alsa && ! use sound; then |
336 |
+ einfo "Although sound USE flag is disabled you chose to have alsa," |
337 |
+ einfo "so sound is switched on anyway." |
338 |
+ myconf+=" --with-sound" |
339 |
+ else |
340 |
+ myconf+=" $(use_with sound)" |
341 |
+ fi |
342 |
+ |
343 |
+ if use X; then |
344 |
+ myconf+=" --with-x --without-ns" |
345 |
+ myconf+=" $(use_with gconf)" |
346 |
+ myconf+=" $(use_with toolkit-scroll-bars)" |
347 |
+ myconf+=" $(use_with gif)" |
348 |
+ myconf+=" $(use_with jpeg)" |
349 |
+ myconf+=" $(use_with png)" |
350 |
+ myconf+=" $(use_with svg rsvg)" |
351 |
+ myconf+=" $(use_with tiff)" |
352 |
+ myconf+=" $(use_with xpm)" |
353 |
+ |
354 |
+ if use xft; then |
355 |
+ myconf+=" --with-xft" |
356 |
+ myconf+=" $(use_with m17n-lib libotf)" |
357 |
+ myconf+=" $(use_with m17n-lib m17n-flt)" |
358 |
+ else |
359 |
+ myconf+=" --without-xft" |
360 |
+ myconf+=" --without-libotf --without-m17n-flt" |
361 |
+ use m17n-lib && ewarn \ |
362 |
+ "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
363 |
+ fi |
364 |
+ |
365 |
+ # GTK+ is the default toolkit if USE=gtk is chosen with other |
366 |
+ # possibilities. Emacs upstream thinks this should be standard |
367 |
+ # policy on all distributions |
368 |
+ local f |
369 |
+ if use gtk; then |
370 |
+ einfo "Configuring to build with GIMP Toolkit (GTK+)" |
371 |
+ myconf+=" --with-x-toolkit=gtk" |
372 |
+ for f in motif Xaw3d athena; do |
373 |
+ use ${f} && ewarn \ |
374 |
+ "USE flag \"${f}\" has no effect if \"gtk\" is set." |
375 |
+ done |
376 |
+ elif use motif; then |
377 |
+ einfo "Configuring to build with Motif toolkit" |
378 |
+ myconf+=" --with-x-toolkit=motif" |
379 |
+ for f in Xaw3d athena; do |
380 |
+ use ${f} && ewarn \ |
381 |
+ "USE flag \"${f}\" has no effect if \"motif\" is set." |
382 |
+ done |
383 |
+ elif use athena || use Xaw3d; then |
384 |
+ einfo "Configuring to build with Athena/Lucid toolkit" |
385 |
+ myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
386 |
+ else |
387 |
+ einfo "Configuring to build with no toolkit" |
388 |
+ myconf+=" --with-x-toolkit=no" |
389 |
+ fi |
390 |
+ elif use aqua; then |
391 |
+ einfo "Configuring to build with Nextstep (Cocoa) support" |
392 |
+ myconf+=" --with-ns --disable-ns-self-contained" |
393 |
+ myconf+=" --without-x" |
394 |
+ else |
395 |
+ myconf+=" --without-x --without-ns" |
396 |
+ fi |
397 |
+ |
398 |
+ # Save version information in the Emacs binary. It will be available |
399 |
+ # in variable "system-configuration-options". |
400 |
+ myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}" |
401 |
+ |
402 |
+ # According to configure, this option is only used for GNU/Linux |
403 |
+ # (x86_64 and s390). For Gentoo Prefix we have to explicitly spell |
404 |
+ # out the location because $(get_libdir) does not necessarily return |
405 |
+ # something that matches the host OS's libdir naming (e.g. RHEL). |
406 |
+ local crtdir=$($(tc-getCC) -print-file-name=crt1.o) |
407 |
+ crtdir=${crtdir%/*} |
408 |
+ |
409 |
+ econf \ |
410 |
+ --program-suffix="-${EMACS_SUFFIX}" \ |
411 |
+ --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
412 |
+ --localstatedir="${EPREFIX}"/var \ |
413 |
+ --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
414 |
+ --with-crt-dir="${crtdir}" \ |
415 |
+ --with-gameuser=":gamestat" \ |
416 |
+ $(use_with hesiod) \ |
417 |
+ $(use_with kerberos) $(use_with kerberos kerberos5) \ |
418 |
+ $(use_with gpm) \ |
419 |
+ $(use_with dbus) \ |
420 |
+ ${myconf} |
421 |
+} |
422 |
+ |
423 |
+src_compile() { |
424 |
+ export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
425 |
+ emake CC="$(tc-getCC)" \ |
426 |
+ AR="$(tc-getAR) cq" \ |
427 |
+ RANLIB="$(tc-getRANLIB)" |
428 |
+} |
429 |
+ |
430 |
+src_install () { |
431 |
+ emake DESTDIR="${D}" install |
432 |
+ |
433 |
+ rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \ |
434 |
+ || die "removing duplicate emacs executable failed" |
435 |
+ mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \ |
436 |
+ || die "moving emacs executable failed" |
437 |
+ |
438 |
+ # move man pages to the correct place |
439 |
+ local m |
440 |
+ mv "${ED}"/usr/share/man/man1/{emacs,${EMACS_SUFFIX}}.1 \ |
441 |
+ || die "moving emacs man page failed" |
442 |
+ for m in b2m ctags ebrowse emacsclient etags grep-changelog rcs-checkin; do |
443 |
+ mv "${ED}"/usr/share/man/man1/${m}{,-${EMACS_SUFFIX}}.1 \ |
444 |
+ || die "moving ${m} man page failed" |
445 |
+ done |
446 |
+ |
447 |
+ # move info dir to avoid collisions with the dir file generated by portage |
448 |
+ mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
449 |
+ || die "moving info dir failed" |
450 |
+ touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
451 |
+ docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
452 |
+ |
453 |
+ # avoid collision between slots, see bug #169033 e.g. |
454 |
+ rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
455 |
+ rm -rf "${ED}"/usr/share/{applications,icons} |
456 |
+ rm -rf "${ED}"/var |
457 |
+ |
458 |
+ # remove unused <version>/site-lisp dir |
459 |
+ rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
460 |
+ |
461 |
+ # remove COPYING file (except for etc/COPYING used by describe-copying) |
462 |
+ rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING |
463 |
+ |
464 |
+ local cdir |
465 |
+ if use source; then |
466 |
+ cdir="/usr/share/emacs/${FULL_VERSION}/src" |
467 |
+ insinto "${cdir}" |
468 |
+ # This is not meant to install all the source -- just the |
469 |
+ # C source you might find via find-function |
470 |
+ doins src/*.{c,h,m} |
471 |
+ doins -r src/{m,s} |
472 |
+ rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/Makefile.c |
473 |
+ rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/{m,s}/README |
474 |
+ elif has installsources ${FEATURES}; then |
475 |
+ cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" |
476 |
+ fi |
477 |
+ |
478 |
+ sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die |
479 |
+ X |
480 |
+ ;;; ${PN}-${SLOT} site-lisp configuration |
481 |
+ X |
482 |
+ (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
483 |
+ Y (setq find-function-C-source-directory |
484 |
+ Y "${EPREFIX}${cdir}") |
485 |
+ X (let ((path (getenv "INFOPATH")) |
486 |
+ X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
487 |
+ X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
488 |
+ X (and path |
489 |
+ X ;; move Emacs Info dir before anything else in /usr/share/info |
490 |
+ X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
491 |
+ X (while (and (cdr q) (not (string-match re (cadr q)))) |
492 |
+ X (setq q (cdr q))) |
493 |
+ X (setcdr q (cons dir (delete dir (cdr q)))) |
494 |
+ X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
495 |
+ EOF |
496 |
+ elisp-site-file-install "${T}/${SITEFILE}" || die |
497 |
+ |
498 |
+ dodoc README BUGS |
499 |
+ |
500 |
+ if use aqua; then |
501 |
+ dodir /Applications/Gentoo |
502 |
+ rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app |
503 |
+ mv nextstep/Emacs.app \ |
504 |
+ "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die |
505 |
+ fi |
506 |
+ |
507 |
+ DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs |
508 |
+ through the Emacs eselect module, which also redirects man and info |
509 |
+ pages. Therefore, several Emacs versions can be installed at the |
510 |
+ same time. \"man emacs.eselect\" for details. |
511 |
+ \\n\\nIf you upgrade from a previous major version of Emacs, then |
512 |
+ it is strongly recommended that you use app-admin/emacs-updater |
513 |
+ to rebuild all byte-compiled elisp files of the installed Emacs |
514 |
+ packages." |
515 |
+ use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs. |
516 |
+ Installing media-fonts/font-adobe-{75,100}dpi on the X server's |
517 |
+ machine would satisfy basic Emacs requirements under X11. |
518 |
+ See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs |
519 |
+ for how to enable anti-aliased fonts." |
520 |
+ use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in |
521 |
+ \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink |
522 |
+ it into /Applications by yourself." |
523 |
+ readme.gentoo_create_doc |
524 |
+} |
525 |
+ |
526 |
+pkg_preinst() { |
527 |
+ # move Info dir file to correct name |
528 |
+ local infodir=/usr/share/info/${EMACS_SUFFIX} f |
529 |
+ if [[ -f ${ED}${infodir}/dir.orig ]]; then |
530 |
+ mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
531 |
+ elif [[ -d "${ED}"${infodir} ]]; then |
532 |
+ # this should not happen in EAPI 4 |
533 |
+ ewarn "Regenerating Info directory index in ${infodir} ..." |
534 |
+ rm -f "${ED}"${infodir}/dir{,.*} |
535 |
+ for f in "${ED}"${infodir}/*; do |
536 |
+ if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
537 |
+ install-info --info-dir="${ED}"${infodir} "${f}" \ |
538 |
+ || die "install-info failed" |
539 |
+ fi |
540 |
+ done |
541 |
+ fi |
542 |
+} |
543 |
+ |
544 |
+pkg_postinst() { |
545 |
+ elisp-site-regen |
546 |
+ readme.gentoo_print_elog |
547 |
+ |
548 |
+ if use livecd; then |
549 |
+ # force an update of the emacs symlink for the livecd/dvd, |
550 |
+ # because some microemacs packages set it with USE=livecd |
551 |
+ eselect emacs update |
552 |
+ elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then |
553 |
+ # refresh symlinks in case any installed files have changed |
554 |
+ eselect emacs set ${EMACS_SUFFIX} |
555 |
+ else |
556 |
+ eselect emacs update ifunset |
557 |
+ fi |
558 |
+} |
559 |
+ |
560 |
+pkg_postrm() { |
561 |
+ elisp-site-regen |
562 |
+ eselect emacs update ifunset |
563 |
+} |
564 |
|
565 |
diff --git a/app-editors/emacs/emacs-24.5-r5.ebuild b/app-editors/emacs/emacs-24.5-r5.ebuild |
566 |
new file mode 100644 |
567 |
index 0000000..4244c1f |
568 |
--- /dev/null |
569 |
+++ b/app-editors/emacs/emacs-24.5-r5.ebuild |
570 |
@@ -0,0 +1,359 @@ |
571 |
+# Copyright 1999-2018 Gentoo Foundation |
572 |
+# Distributed under the terms of the GNU General Public License v2 |
573 |
+ |
574 |
+EAPI=6 |
575 |
+ |
576 |
+inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo-r1 |
577 |
+ |
578 |
+DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
579 |
+HOMEPAGE="https://www.gnu.org/software/emacs/" |
580 |
+SRC_URI="mirror://gnu/emacs/${P}.tar.xz |
581 |
+ https://dev.gentoo.org/~ulm/emacs/${P}-patches-4.tar.xz" |
582 |
+ |
583 |
+LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
584 |
+SLOT="24" |
585 |
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
586 |
+IUSE="acl alsa aqua athena dbus games gconf gfile gif gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib" |
587 |
+REQUIRED_USE="?? ( aqua X )" |
588 |
+ |
589 |
+RDEPEND="sys-libs/ncurses:0= |
590 |
+ >=app-eselect/eselect-emacs-1.16 |
591 |
+ >=app-emacs/emacs-common-gentoo-1.5[games?,X?] |
592 |
+ net-libs/liblockfile |
593 |
+ acl? ( virtual/acl ) |
594 |
+ alsa? ( media-libs/alsa-lib ) |
595 |
+ dbus? ( sys-apps/dbus ) |
596 |
+ gpm? ( sys-libs/gpm ) |
597 |
+ hesiod? ( net-dns/hesiod ) |
598 |
+ !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) |
599 |
+ kerberos? ( virtual/krb5 ) |
600 |
+ libxml2? ( >=dev-libs/libxml2-2.2.0 ) |
601 |
+ selinux? ( sys-libs/libselinux ) |
602 |
+ ssl? ( net-libs/gnutls:0= ) |
603 |
+ zlib? ( sys-libs/zlib ) |
604 |
+ X? ( |
605 |
+ x11-libs/libICE |
606 |
+ x11-libs/libSM |
607 |
+ x11-libs/libX11 |
608 |
+ x11-libs/libXext |
609 |
+ x11-libs/libXinerama |
610 |
+ x11-libs/libXrandr |
611 |
+ x11-misc/xbitmaps |
612 |
+ gconf? ( >=gnome-base/gconf-2.26.2 ) |
613 |
+ gsettings? ( >=dev-libs/glib-2.28.6 ) |
614 |
+ gif? ( media-libs/giflib:0= ) |
615 |
+ jpeg? ( virtual/jpeg:0= ) |
616 |
+ png? ( >=media-libs/libpng-1.4:0= ) |
617 |
+ svg? ( >=gnome-base/librsvg-2.0 ) |
618 |
+ tiff? ( media-libs/tiff:0 ) |
619 |
+ xpm? ( x11-libs/libXpm ) |
620 |
+ imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= ) |
621 |
+ xft? ( |
622 |
+ media-libs/fontconfig |
623 |
+ media-libs/freetype |
624 |
+ x11-libs/libXft |
625 |
+ x11-libs/libXrender |
626 |
+ m17n-lib? ( |
627 |
+ >=dev-libs/libotf-0.9.4 |
628 |
+ >=dev-libs/m17n-lib-1.5.1 |
629 |
+ ) |
630 |
+ ) |
631 |
+ gtk? ( |
632 |
+ gtk3? ( x11-libs/gtk+:3 ) |
633 |
+ !gtk3? ( x11-libs/gtk+:2 ) |
634 |
+ ) |
635 |
+ !gtk? ( |
636 |
+ motif? ( |
637 |
+ >=x11-libs/motif-2.3:0 |
638 |
+ x11-libs/libXp |
639 |
+ x11-libs/libXpm |
640 |
+ x11-libs/libXmu |
641 |
+ x11-libs/libXt |
642 |
+ ) |
643 |
+ !motif? ( |
644 |
+ Xaw3d? ( |
645 |
+ x11-libs/libXaw3d |
646 |
+ x11-libs/libXmu |
647 |
+ x11-libs/libXt |
648 |
+ ) |
649 |
+ !Xaw3d? ( athena? ( |
650 |
+ x11-libs/libXaw |
651 |
+ x11-libs/libXmu |
652 |
+ x11-libs/libXt |
653 |
+ ) ) |
654 |
+ ) |
655 |
+ ) |
656 |
+ )" |
657 |
+ |
658 |
+DEPEND="${RDEPEND} |
659 |
+ virtual/pkgconfig |
660 |
+ gzip-el? ( app-arch/gzip ) |
661 |
+ pax_kernel? ( sys-apps/attr )" |
662 |
+ |
663 |
+RDEPEND="${RDEPEND} |
664 |
+ !<app-editors/emacs-vcs-${PV}" |
665 |
+ |
666 |
+EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
667 |
+SITEFILE="20${PN}-${SLOT}-gentoo.el" |
668 |
+# FULL_VERSION keeps the full version number, which is needed in |
669 |
+# order to determine some path information correctly for copy/move |
670 |
+# operations later on |
671 |
+FULL_VERSION="${PV%%_*}" |
672 |
+S="${WORKDIR}/emacs-${FULL_VERSION}" |
673 |
+ |
674 |
+src_prepare() { |
675 |
+ eapply ../patch |
676 |
+ eapply_user |
677 |
+ |
678 |
+ # Fix filename reference in redirected man page |
679 |
+ sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \ |
680 |
+ || die "unable to sed ctags.1" |
681 |
+ |
682 |
+ AT_M4DIR=m4 eautoreconf |
683 |
+ touch src/stamp-h.in || die |
684 |
+} |
685 |
+ |
686 |
+src_configure() { |
687 |
+ strip-flags |
688 |
+ filter-flags -pie #526948 |
689 |
+ append-ldflags $(test-flags -no-pie) #639570 |
690 |
+ |
691 |
+ if use sh; then |
692 |
+ replace-flags "-O[1-9]" -O0 #262359 |
693 |
+ elif use ia64; then |
694 |
+ replace-flags "-O[2-9]" -O1 #325373 |
695 |
+ else |
696 |
+ replace-flags "-O[3-9]" -O2 |
697 |
+ fi |
698 |
+ |
699 |
+ local myconf |
700 |
+ |
701 |
+ if use alsa; then |
702 |
+ use sound || ewarn \ |
703 |
+ "USE flag \"alsa\" overrides \"-sound\"; enabling sound support." |
704 |
+ myconf+=" --with-sound=alsa" |
705 |
+ else |
706 |
+ myconf+=" --with-sound=$(usex sound oss)" |
707 |
+ fi |
708 |
+ |
709 |
+ if use X; then |
710 |
+ myconf+=" --with-x --without-ns" |
711 |
+ myconf+=" $(use_with gconf)" |
712 |
+ myconf+=" $(use_with gsettings)" |
713 |
+ myconf+=" $(use_with toolkit-scroll-bars)" |
714 |
+ myconf+=" $(use_with gif)" |
715 |
+ myconf+=" $(use_with jpeg)" |
716 |
+ myconf+=" $(use_with png)" |
717 |
+ myconf+=" $(use_with svg rsvg)" |
718 |
+ myconf+=" $(use_with tiff)" |
719 |
+ myconf+=" $(use_with xpm)" |
720 |
+ myconf+=" $(use_with imagemagick)" |
721 |
+ |
722 |
+ if use xft; then |
723 |
+ myconf+=" --with-xft" |
724 |
+ myconf+=" $(use_with m17n-lib libotf)" |
725 |
+ myconf+=" $(use_with m17n-lib m17n-flt)" |
726 |
+ else |
727 |
+ myconf+=" --without-xft" |
728 |
+ myconf+=" --without-libotf --without-m17n-flt" |
729 |
+ use m17n-lib && ewarn \ |
730 |
+ "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
731 |
+ fi |
732 |
+ |
733 |
+ local f line |
734 |
+ if use gtk; then |
735 |
+ einfo "Configuring to build with GIMP Toolkit (GTK+)" |
736 |
+ while read line; do ewarn "${line}"; done <<-EOF |
737 |
+ Your version of GTK+ will have problems with closing open |
738 |
+ displays. This is no problem if you just use one display, but |
739 |
+ if you use more than one and close one of them Emacs may crash. |
740 |
+ See <https://bugzilla.gnome.org/show_bug.cgi?id=85715>. |
741 |
+ If you intend to use more than one display, then it is strongly |
742 |
+ recommended that you compile Emacs with the Athena/Lucid or the |
743 |
+ Motif toolkit instead. |
744 |
+ EOF |
745 |
+ myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)" |
746 |
+ for f in motif Xaw3d athena; do |
747 |
+ use ${f} && ewarn \ |
748 |
+ "USE flag \"${f}\" has no effect if \"gtk\" is set." |
749 |
+ done |
750 |
+ elif use motif; then |
751 |
+ einfo "Configuring to build with Motif toolkit" |
752 |
+ myconf+=" --with-x-toolkit=motif" |
753 |
+ for f in Xaw3d athena; do |
754 |
+ use ${f} && ewarn \ |
755 |
+ "USE flag \"${f}\" has no effect if \"motif\" is set." |
756 |
+ done |
757 |
+ elif use athena || use Xaw3d; then |
758 |
+ einfo "Configuring to build with Athena/Lucid toolkit" |
759 |
+ myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
760 |
+ else |
761 |
+ einfo "Configuring to build with no toolkit" |
762 |
+ myconf+=" --with-x-toolkit=no" |
763 |
+ fi |
764 |
+ elif use aqua; then |
765 |
+ einfo "Configuring to build with Nextstep (Cocoa) support" |
766 |
+ myconf+=" --with-ns --disable-ns-self-contained" |
767 |
+ myconf+=" --without-x" |
768 |
+ else |
769 |
+ myconf+=" --without-x --without-ns" |
770 |
+ fi |
771 |
+ |
772 |
+ # Save version information in the Emacs binary. It will be available |
773 |
+ # in variable "system-configuration-options". |
774 |
+ myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}" |
775 |
+ |
776 |
+ econf \ |
777 |
+ --program-suffix="-${EMACS_SUFFIX}" \ |
778 |
+ --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
779 |
+ --localstatedir="${EPREFIX}"/var \ |
780 |
+ --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
781 |
+ --with-gameuser=":gamestat" \ |
782 |
+ --without-compress-install \ |
783 |
+ --with-file-notification=$(usev inotify || usev gfile || echo no) \ |
784 |
+ $(use_enable acl) \ |
785 |
+ $(use_with dbus) \ |
786 |
+ $(use_with gpm) \ |
787 |
+ $(use_with hesiod) \ |
788 |
+ $(use_with kerberos) $(use_with kerberos kerberos5) \ |
789 |
+ $(use_with libxml2 xml2) \ |
790 |
+ $(use_with selinux) \ |
791 |
+ $(use_with ssl gnutls) \ |
792 |
+ $(use_with wide-int) \ |
793 |
+ $(use_with zlib) \ |
794 |
+ ${myconf} |
795 |
+} |
796 |
+ |
797 |
+src_compile() { |
798 |
+ export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
799 |
+ emake |
800 |
+} |
801 |
+ |
802 |
+src_install () { |
803 |
+ emake DESTDIR="${D}" NO_BIN_LINK=t install |
804 |
+ |
805 |
+ mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \ |
806 |
+ || die "moving emacs executable failed" |
807 |
+ mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \ |
808 |
+ || die "moving emacs man page failed" |
809 |
+ |
810 |
+ # move info dir to avoid collisions with the dir file generated by portage |
811 |
+ mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
812 |
+ || die "moving info dir failed" |
813 |
+ touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
814 |
+ docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
815 |
+ |
816 |
+ # avoid collision between slots, see bug #169033 e.g. |
817 |
+ rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
818 |
+ rm -rf "${ED}"/usr/share/{applications,icons} |
819 |
+ rm -rf "${ED}"/var |
820 |
+ |
821 |
+ # remove unused <version>/site-lisp dir |
822 |
+ rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
823 |
+ |
824 |
+ # remove COPYING file (except for etc/COPYING used by describe-copying) |
825 |
+ rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING |
826 |
+ |
827 |
+ if use gzip-el; then |
828 |
+ # compress .el files when a corresponding .elc exists |
829 |
+ find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ |
830 |
+ -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n |
831 |
+ assert "gzip .el failed" |
832 |
+ fi |
833 |
+ |
834 |
+ local cdir |
835 |
+ if use source; then |
836 |
+ cdir="/usr/share/emacs/${FULL_VERSION}/src" |
837 |
+ insinto "${cdir}" |
838 |
+ # This is not meant to install all the source -- just the |
839 |
+ # C source you might find via find-function |
840 |
+ doins src/*.{c,h,m} |
841 |
+ elif has installsources ${FEATURES}; then |
842 |
+ cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" |
843 |
+ fi |
844 |
+ |
845 |
+ sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die |
846 |
+ X |
847 |
+ ;;; ${PN}-${SLOT} site-lisp configuration |
848 |
+ X |
849 |
+ (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
850 |
+ Y (setq find-function-C-source-directory |
851 |
+ Y "${EPREFIX}${cdir}") |
852 |
+ X (let ((path (getenv "INFOPATH")) |
853 |
+ X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
854 |
+ X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
855 |
+ X (and path |
856 |
+ X ;; move Emacs Info dir before anything else in /usr/share/info |
857 |
+ X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
858 |
+ X (while (and (cdr q) (not (string-match re (cadr q)))) |
859 |
+ X (setq q (cdr q))) |
860 |
+ X (setcdr q (cons dir (delete dir (cdr q)))) |
861 |
+ X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
862 |
+ EOF |
863 |
+ elisp-site-file-install "${T}/${SITEFILE}" || die |
864 |
+ |
865 |
+ dodoc README BUGS |
866 |
+ |
867 |
+ if use aqua; then |
868 |
+ dodir /Applications/Gentoo |
869 |
+ rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app |
870 |
+ mv nextstep/Emacs.app \ |
871 |
+ "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die |
872 |
+ fi |
873 |
+ |
874 |
+ DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs |
875 |
+ through the Emacs eselect module, which also redirects man and info |
876 |
+ pages. Therefore, several Emacs versions can be installed at the |
877 |
+ same time. \"man emacs.eselect\" for details. |
878 |
+ \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is |
879 |
+ strongly recommended that you use app-admin/emacs-updater to rebuild |
880 |
+ all byte-compiled elisp files of the installed Emacs packages." |
881 |
+ use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs. |
882 |
+ Installing media-fonts/font-adobe-{75,100}dpi on the X server's |
883 |
+ machine would satisfy basic Emacs requirements under X11. |
884 |
+ See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs |
885 |
+ for how to enable anti-aliased fonts." |
886 |
+ use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in |
887 |
+ \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink |
888 |
+ it into /Applications by yourself." |
889 |
+ readme.gentoo_create_doc |
890 |
+} |
891 |
+ |
892 |
+pkg_preinst() { |
893 |
+ # move Info dir file to correct name |
894 |
+ local infodir=/usr/share/info/${EMACS_SUFFIX} f |
895 |
+ if [[ -f ${ED}${infodir}/dir.orig ]]; then |
896 |
+ mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
897 |
+ elif [[ -d "${ED}"${infodir} ]]; then |
898 |
+ # this should not happen in EAPI 4 |
899 |
+ ewarn "Regenerating Info directory index in ${infodir} ..." |
900 |
+ rm -f "${ED}"${infodir}/dir{,.*} |
901 |
+ for f in "${ED}"${infodir}/*; do |
902 |
+ if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
903 |
+ install-info --info-dir="${ED}"${infodir} "${f}" \ |
904 |
+ || die "install-info failed" |
905 |
+ fi |
906 |
+ done |
907 |
+ fi |
908 |
+} |
909 |
+ |
910 |
+pkg_postinst() { |
911 |
+ elisp-site-regen |
912 |
+ readme.gentoo_print_elog |
913 |
+ |
914 |
+ if use livecd; then |
915 |
+ # force an update of the emacs symlink for the livecd/dvd, |
916 |
+ # because some microemacs packages set it with USE=livecd |
917 |
+ eselect emacs update |
918 |
+ elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then |
919 |
+ # refresh symlinks in case any installed files have changed |
920 |
+ eselect emacs set ${EMACS_SUFFIX} |
921 |
+ else |
922 |
+ eselect emacs update ifunset |
923 |
+ fi |
924 |
+} |
925 |
+ |
926 |
+pkg_postrm() { |
927 |
+ elisp-site-regen |
928 |
+ eselect emacs update ifunset |
929 |
+} |
930 |
|
931 |
diff --git a/app-editors/emacs/emacs-25.3-r3.ebuild b/app-editors/emacs/emacs-25.3-r3.ebuild |
932 |
new file mode 100644 |
933 |
index 0000000..8267aed |
934 |
--- /dev/null |
935 |
+++ b/app-editors/emacs/emacs-25.3-r3.ebuild |
936 |
@@ -0,0 +1,371 @@ |
937 |
+# Copyright 1999-2018 Gentoo Foundation |
938 |
+# Distributed under the terms of the GNU General Public License v2 |
939 |
+ |
940 |
+EAPI=6 |
941 |
+ |
942 |
+inherit elisp-common flag-o-matic multilib readme.gentoo-r1 |
943 |
+ |
944 |
+DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
945 |
+HOMEPAGE="https://www.gnu.org/software/emacs/" |
946 |
+SRC_URI="mirror://gnu/emacs/${P}.tar.xz" |
947 |
+ |
948 |
+LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
949 |
+SLOT="25" |
950 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
951 |
+IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib" |
952 |
+REQUIRED_USE="?? ( aqua X )" |
953 |
+ |
954 |
+RDEPEND="sys-libs/ncurses:0= |
955 |
+ >=app-eselect/eselect-emacs-1.16 |
956 |
+ >=app-emacs/emacs-common-gentoo-1.5[games?,X?] |
957 |
+ net-libs/liblockfile |
958 |
+ acl? ( virtual/acl ) |
959 |
+ alsa? ( media-libs/alsa-lib ) |
960 |
+ dbus? ( sys-apps/dbus ) |
961 |
+ gpm? ( sys-libs/gpm ) |
962 |
+ hesiod? ( net-dns/hesiod ) |
963 |
+ !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) |
964 |
+ kerberos? ( virtual/krb5 ) |
965 |
+ libxml2? ( >=dev-libs/libxml2-2.2.0 ) |
966 |
+ selinux? ( sys-libs/libselinux ) |
967 |
+ ssl? ( net-libs/gnutls:0= ) |
968 |
+ zlib? ( sys-libs/zlib ) |
969 |
+ X? ( |
970 |
+ x11-libs/libICE |
971 |
+ x11-libs/libSM |
972 |
+ x11-libs/libX11 |
973 |
+ x11-libs/libXext |
974 |
+ x11-libs/libXfixes |
975 |
+ x11-libs/libXinerama |
976 |
+ x11-libs/libXrandr |
977 |
+ x11-libs/libxcb |
978 |
+ x11-misc/xbitmaps |
979 |
+ gconf? ( >=gnome-base/gconf-2.26.2 ) |
980 |
+ gsettings? ( >=dev-libs/glib-2.28.6 ) |
981 |
+ gif? ( media-libs/giflib:0= ) |
982 |
+ jpeg? ( virtual/jpeg:0= ) |
983 |
+ png? ( >=media-libs/libpng-1.4:0= ) |
984 |
+ svg? ( >=gnome-base/librsvg-2.0 ) |
985 |
+ tiff? ( media-libs/tiff:0 ) |
986 |
+ xpm? ( x11-libs/libXpm ) |
987 |
+ imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= ) |
988 |
+ xft? ( |
989 |
+ media-libs/fontconfig |
990 |
+ media-libs/freetype |
991 |
+ x11-libs/libXft |
992 |
+ x11-libs/libXrender |
993 |
+ cairo? ( >=x11-libs/cairo-1.12.18 ) |
994 |
+ m17n-lib? ( |
995 |
+ >=dev-libs/libotf-0.9.4 |
996 |
+ >=dev-libs/m17n-lib-1.5.1 |
997 |
+ ) |
998 |
+ ) |
999 |
+ gtk? ( |
1000 |
+ gtk3? ( x11-libs/gtk+:3 ) |
1001 |
+ !gtk3? ( x11-libs/gtk+:2 ) |
1002 |
+ ) |
1003 |
+ !gtk? ( |
1004 |
+ motif? ( |
1005 |
+ >=x11-libs/motif-2.3:0 |
1006 |
+ x11-libs/libXp |
1007 |
+ x11-libs/libXpm |
1008 |
+ x11-libs/libXmu |
1009 |
+ x11-libs/libXt |
1010 |
+ ) |
1011 |
+ !motif? ( |
1012 |
+ Xaw3d? ( |
1013 |
+ x11-libs/libXaw3d |
1014 |
+ x11-libs/libXmu |
1015 |
+ x11-libs/libXt |
1016 |
+ ) |
1017 |
+ !Xaw3d? ( athena? ( |
1018 |
+ x11-libs/libXaw |
1019 |
+ x11-libs/libXmu |
1020 |
+ x11-libs/libXt |
1021 |
+ ) ) |
1022 |
+ ) |
1023 |
+ ) |
1024 |
+ )" |
1025 |
+ |
1026 |
+DEPEND="${RDEPEND} |
1027 |
+ virtual/pkgconfig |
1028 |
+ gzip-el? ( app-arch/gzip ) |
1029 |
+ pax_kernel? ( sys-apps/attr )" |
1030 |
+ |
1031 |
+RDEPEND="${RDEPEND} |
1032 |
+ !<app-editors/emacs-vcs-${PV}" |
1033 |
+ |
1034 |
+EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
1035 |
+SITEFILE="20${PN}-${SLOT}-gentoo.el" |
1036 |
+# FULL_VERSION keeps the full version number, which is needed in |
1037 |
+# order to determine some path information correctly for copy/move |
1038 |
+# operations later on |
1039 |
+FULL_VERSION="${PV%%_*}" |
1040 |
+S="${WORKDIR}/emacs-${FULL_VERSION}" |
1041 |
+ |
1042 |
+src_prepare() { |
1043 |
+ eapply_user |
1044 |
+ |
1045 |
+ # Fix filename reference in redirected man page |
1046 |
+ sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \ |
1047 |
+ || die "unable to sed ctags.1" |
1048 |
+ |
1049 |
+ #AT_M4DIR=m4 eautoreconf |
1050 |
+ #touch src/stamp-h.in || die |
1051 |
+} |
1052 |
+ |
1053 |
+src_configure() { |
1054 |
+ strip-flags |
1055 |
+ filter-flags -pie #526948 |
1056 |
+ |
1057 |
+ if use sh; then |
1058 |
+ replace-flags "-O[1-9]" -O0 #262359 |
1059 |
+ elif use ia64; then |
1060 |
+ replace-flags "-O[2-9]" -O1 #325373 |
1061 |
+ else |
1062 |
+ replace-flags "-O[3-9]" -O2 |
1063 |
+ fi |
1064 |
+ |
1065 |
+ local myconf |
1066 |
+ |
1067 |
+ if use alsa; then |
1068 |
+ use sound || ewarn \ |
1069 |
+ "USE flag \"alsa\" overrides \"-sound\"; enabling sound support." |
1070 |
+ myconf+=" --with-sound=alsa" |
1071 |
+ else |
1072 |
+ myconf+=" --with-sound=$(usex sound oss)" |
1073 |
+ fi |
1074 |
+ |
1075 |
+ if use X; then |
1076 |
+ myconf+=" --with-x --without-ns" |
1077 |
+ myconf+=" $(use_with gconf)" |
1078 |
+ myconf+=" $(use_with gsettings)" |
1079 |
+ myconf+=" $(use_with toolkit-scroll-bars)" |
1080 |
+ myconf+=" $(use_with gif)" |
1081 |
+ myconf+=" $(use_with jpeg)" |
1082 |
+ myconf+=" $(use_with png)" |
1083 |
+ myconf+=" $(use_with svg rsvg)" |
1084 |
+ myconf+=" $(use_with tiff)" |
1085 |
+ myconf+=" $(use_with xpm)" |
1086 |
+ myconf+=" $(use_with imagemagick)" |
1087 |
+ |
1088 |
+ if use xft; then |
1089 |
+ myconf+=" --with-xft" |
1090 |
+ myconf+=" $(use_with cairo)" |
1091 |
+ myconf+=" $(use_with m17n-lib libotf)" |
1092 |
+ myconf+=" $(use_with m17n-lib m17n-flt)" |
1093 |
+ else |
1094 |
+ myconf+=" --without-xft" |
1095 |
+ myconf+=" --without-cairo" |
1096 |
+ myconf+=" --without-libotf --without-m17n-flt" |
1097 |
+ use cairo && ewarn \ |
1098 |
+ "USE flag \"cairo\" has no effect if \"xft\" is not set." |
1099 |
+ use m17n-lib && ewarn \ |
1100 |
+ "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
1101 |
+ fi |
1102 |
+ |
1103 |
+ local f line |
1104 |
+ if use gtk; then |
1105 |
+ einfo "Configuring to build with GIMP Toolkit (GTK+)" |
1106 |
+ while read line; do ewarn "${line}"; done <<-EOF |
1107 |
+ Your version of GTK+ will have problems with closing open |
1108 |
+ displays. This is no problem if you just use one display, but |
1109 |
+ if you use more than one and close one of them Emacs may crash. |
1110 |
+ See <https://bugzilla.gnome.org/show_bug.cgi?id=85715>. |
1111 |
+ If you intend to use more than one display, then it is strongly |
1112 |
+ recommended that you compile Emacs with the Athena/Lucid or the |
1113 |
+ Motif toolkit instead. |
1114 |
+ EOF |
1115 |
+ #if use xwidgets; then |
1116 |
+ # myconf+=" --with-x-toolkit=gtk3 --with-xwidgets" |
1117 |
+ #else |
1118 |
+ myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)" |
1119 |
+ myconf+=" --without-xwidgets" |
1120 |
+ #fi |
1121 |
+ for f in motif Xaw3d athena; do |
1122 |
+ use ${f} && ewarn \ |
1123 |
+ "USE flag \"${f}\" has no effect if \"gtk\" is set." |
1124 |
+ done |
1125 |
+ elif use motif; then |
1126 |
+ einfo "Configuring to build with Motif toolkit" |
1127 |
+ myconf+=" --with-x-toolkit=motif" |
1128 |
+ for f in Xaw3d athena; do |
1129 |
+ use ${f} && ewarn \ |
1130 |
+ "USE flag \"${f}\" has no effect if \"motif\" is set." |
1131 |
+ done |
1132 |
+ elif use athena || use Xaw3d; then |
1133 |
+ einfo "Configuring to build with Athena/Lucid toolkit" |
1134 |
+ myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
1135 |
+ else |
1136 |
+ einfo "Configuring to build with no toolkit" |
1137 |
+ myconf+=" --with-x-toolkit=no" |
1138 |
+ fi |
1139 |
+ #! use gtk && use xwidgets && ewarn \ |
1140 |
+ # "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." |
1141 |
+ elif use aqua; then |
1142 |
+ einfo "Configuring to build with Nextstep (Cocoa) support" |
1143 |
+ myconf+=" --with-ns --disable-ns-self-contained" |
1144 |
+ myconf+=" --without-x" |
1145 |
+ else |
1146 |
+ myconf+=" --without-x --without-ns" |
1147 |
+ fi |
1148 |
+ |
1149 |
+ # Save version information in the Emacs binary. It will be available |
1150 |
+ # in variable "system-configuration-options". |
1151 |
+ myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}" |
1152 |
+ |
1153 |
+ econf \ |
1154 |
+ --program-suffix="-${EMACS_SUFFIX}" \ |
1155 |
+ --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
1156 |
+ --localstatedir="${EPREFIX}"/var \ |
1157 |
+ --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
1158 |
+ --with-gameuser=":gamestat" \ |
1159 |
+ --without-compress-install \ |
1160 |
+ --with-file-notification=$(usev inotify || usev gfile || echo no) \ |
1161 |
+ $(use_enable acl) \ |
1162 |
+ $(use_with dbus) \ |
1163 |
+ $(use_with dynamic-loading modules) \ |
1164 |
+ $(use_with gpm) \ |
1165 |
+ $(use_with hesiod) \ |
1166 |
+ $(use_with kerberos) $(use_with kerberos kerberos5) \ |
1167 |
+ $(use_with libxml2 xml2) \ |
1168 |
+ $(use_with selinux) \ |
1169 |
+ $(use_with ssl gnutls) \ |
1170 |
+ $(use_with wide-int) \ |
1171 |
+ $(use_with zlib) \ |
1172 |
+ ${myconf} |
1173 |
+} |
1174 |
+ |
1175 |
+src_compile() { |
1176 |
+ # Disable sandbox when dumping. For the unbelievers, see bug #131505 |
1177 |
+ emake RUN_TEMACS="env SANDBOX_ON=0 LD_PRELOAD= ./temacs" |
1178 |
+} |
1179 |
+ |
1180 |
+src_install () { |
1181 |
+ emake DESTDIR="${D}" NO_BIN_LINK=t install |
1182 |
+ |
1183 |
+ mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \ |
1184 |
+ || die "moving emacs executable failed" |
1185 |
+ mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \ |
1186 |
+ || die "moving emacs man page failed" |
1187 |
+ |
1188 |
+ # move info dir to avoid collisions with the dir file generated by portage |
1189 |
+ mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
1190 |
+ || die "moving info dir failed" |
1191 |
+ touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
1192 |
+ docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
1193 |
+ |
1194 |
+ # avoid collision between slots, see bug #169033 e.g. |
1195 |
+ rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
1196 |
+ rm -rf "${ED}"/usr/share/{appdata,applications,icons} |
1197 |
+ rm -rf "${ED}"/var |
1198 |
+ |
1199 |
+ # remove unused <version>/site-lisp dir |
1200 |
+ rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
1201 |
+ |
1202 |
+ # remove COPYING file (except for etc/COPYING used by describe-copying) |
1203 |
+ rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING |
1204 |
+ |
1205 |
+ if use gzip-el; then |
1206 |
+ # compress .el files when a corresponding .elc exists |
1207 |
+ find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ |
1208 |
+ -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n |
1209 |
+ assert "gzip .el failed" |
1210 |
+ fi |
1211 |
+ |
1212 |
+ local cdir |
1213 |
+ if use source; then |
1214 |
+ cdir="/usr/share/emacs/${FULL_VERSION}/src" |
1215 |
+ insinto "${cdir}" |
1216 |
+ # This is not meant to install all the source -- just the |
1217 |
+ # C source you might find via find-function |
1218 |
+ doins src/*.{c,h,m} |
1219 |
+ elif has installsources ${FEATURES}; then |
1220 |
+ cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" |
1221 |
+ fi |
1222 |
+ |
1223 |
+ sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die |
1224 |
+ X |
1225 |
+ ;;; ${PN}-${SLOT} site-lisp configuration |
1226 |
+ X |
1227 |
+ (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
1228 |
+ Y (setq find-function-C-source-directory |
1229 |
+ Y "${EPREFIX}${cdir}") |
1230 |
+ X (let ((path (getenv "INFOPATH")) |
1231 |
+ X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
1232 |
+ X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
1233 |
+ X (and path |
1234 |
+ X ;; move Emacs Info dir before anything else in /usr/share/info |
1235 |
+ X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
1236 |
+ X (while (and (cdr q) (not (string-match re (cadr q)))) |
1237 |
+ X (setq q (cdr q))) |
1238 |
+ X (setcdr q (cons dir (delete dir (cdr q)))) |
1239 |
+ X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
1240 |
+ EOF |
1241 |
+ elisp-site-file-install "${T}/${SITEFILE}" || die |
1242 |
+ |
1243 |
+ dodoc README BUGS CONTRIBUTE |
1244 |
+ |
1245 |
+ if use aqua; then |
1246 |
+ dodir /Applications/Gentoo |
1247 |
+ rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app |
1248 |
+ mv nextstep/Emacs.app \ |
1249 |
+ "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die |
1250 |
+ fi |
1251 |
+ |
1252 |
+ DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs |
1253 |
+ through the Emacs eselect module, which also redirects man and info |
1254 |
+ pages. Therefore, several Emacs versions can be installed at the |
1255 |
+ same time. \"man emacs.eselect\" for details. |
1256 |
+ \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is |
1257 |
+ strongly recommended that you use app-admin/emacs-updater to rebuild |
1258 |
+ all byte-compiled elisp files of the installed Emacs packages." |
1259 |
+ use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs. |
1260 |
+ Installing media-fonts/font-adobe-{75,100}dpi on the X server's |
1261 |
+ machine would satisfy basic Emacs requirements under X11. |
1262 |
+ See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs |
1263 |
+ for how to enable anti-aliased fonts." |
1264 |
+ use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in |
1265 |
+ \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink |
1266 |
+ it into /Applications by yourself." |
1267 |
+ readme.gentoo_create_doc |
1268 |
+} |
1269 |
+ |
1270 |
+pkg_preinst() { |
1271 |
+ # move Info dir file to correct name |
1272 |
+ local infodir=/usr/share/info/${EMACS_SUFFIX} f |
1273 |
+ if [[ -f ${ED}${infodir}/dir.orig ]]; then |
1274 |
+ mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
1275 |
+ elif [[ -d "${ED}"${infodir} ]]; then |
1276 |
+ # this should not happen in EAPI 4 |
1277 |
+ ewarn "Regenerating Info directory index in ${infodir} ..." |
1278 |
+ rm -f "${ED}"${infodir}/dir{,.*} |
1279 |
+ for f in "${ED}"${infodir}/*; do |
1280 |
+ if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
1281 |
+ install-info --info-dir="${ED}"${infodir} "${f}" \ |
1282 |
+ || die "install-info failed" |
1283 |
+ fi |
1284 |
+ done |
1285 |
+ fi |
1286 |
+} |
1287 |
+ |
1288 |
+pkg_postinst() { |
1289 |
+ elisp-site-regen |
1290 |
+ readme.gentoo_print_elog |
1291 |
+ |
1292 |
+ if use livecd; then |
1293 |
+ # force an update of the emacs symlink for the livecd/dvd, |
1294 |
+ # because some microemacs packages set it with USE=livecd |
1295 |
+ eselect emacs update |
1296 |
+ elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then |
1297 |
+ # refresh symlinks in case any installed files have changed |
1298 |
+ eselect emacs set ${EMACS_SUFFIX} |
1299 |
+ else |
1300 |
+ eselect emacs update ifunset |
1301 |
+ fi |
1302 |
+} |
1303 |
+ |
1304 |
+pkg_postrm() { |
1305 |
+ elisp-site-regen |
1306 |
+ eselect emacs update ifunset |
1307 |
+} |
1308 |
|
1309 |
diff --git a/app-editors/emacs/metadata.xml b/app-editors/emacs/metadata.xml |
1310 |
new file mode 100644 |
1311 |
index 0000000..64c34d3 |
1312 |
--- /dev/null |
1313 |
+++ b/app-editors/emacs/metadata.xml |
1314 |
@@ -0,0 +1,53 @@ |
1315 |
+<?xml version="1.0" encoding="UTF-8"?> |
1316 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
1317 |
+<pkgmetadata> |
1318 |
+<maintainer type="project"> |
1319 |
+ <email>gnu-emacs@g.o</email> |
1320 |
+ <name>Gentoo GNU Emacs project</name> |
1321 |
+</maintainer> |
1322 |
+<longdescription> |
1323 |
+ GNU Emacs is an extensible, customizable text editor - and more. At its core |
1324 |
+ is an interpreter for Emacs Lisp, a dialect of the Lisp programming language |
1325 |
+ with extensions to support text editing. The features of GNU Emacs include: |
1326 |
+ * Content-sensitive editing modes, including syntax coloring, for a variety |
1327 |
+ of file types including plain text, source code, and HTML. |
1328 |
+ * Complete built-in documentation, including a tutorial for new users. |
1329 |
+ * Full Unicode support for nearly all human languages and their scripts. |
1330 |
+ * Highly customizable, using Emacs Lisp code or a graphical interface. |
1331 |
+ * A large number of extensions that add other functionality, including a |
1332 |
+ project planner, mail and news reader, debugger interface, calendar, and |
1333 |
+ more. Many of these extensions are distributed with GNU Emacs; others are |
1334 |
+ available separately. |
1335 |
+</longdescription> |
1336 |
+<use> |
1337 |
+ <flag name="athena">Enable the MIT Athena widget set |
1338 |
+ (<pkg>x11-libs/libXaw</pkg>)</flag> |
1339 |
+ <flag name="dynamic-loading">Enable loading of dynamic libraries at |
1340 |
+ runtime</flag> |
1341 |
+ <flag name="games">Support shared score files for games</flag> |
1342 |
+ <flag name="gconf">Use <pkg>gnome-base/gconf</pkg> to read the system |
1343 |
+ font name</flag> |
1344 |
+ <flag name="gfile">Use gfile (<pkg>dev-libs/glib</pkg>) for file |
1345 |
+ notification</flag> |
1346 |
+ <flag name="gsettings">Use gsettings (<pkg>dev-libs/glib</pkg>) to read the |
1347 |
+ system font name</flag> |
1348 |
+ <flag name="gtk3">Prefer version 3 of the GIMP Toolkit to version 2 |
1349 |
+ (<pkg>x11-libs/gtk+</pkg>)</flag> |
1350 |
+ <flag name="gzip-el">Compress bundled Emacs Lisp source</flag> |
1351 |
+ <flag name="hesiod">Enable support for <pkg>net-dns/hesiod</pkg></flag> |
1352 |
+ <flag name="imagemagick">Use <pkg>media-gfx/imagemagick</pkg> for image |
1353 |
+ processing</flag> |
1354 |
+ <flag name="libxml2">Use <pkg>dev-libs/libxml2</pkg> to parse XML instead |
1355 |
+ of the internal Lisp implementations</flag> |
1356 |
+ <flag name="pax_kernel">Enable building under a PaX enabled kernel</flag> |
1357 |
+ <flag name="source">Install C source files and make them available for |
1358 |
+ find-function</flag> |
1359 |
+ <flag name="toolkit-scroll-bars">Use the selected toolkit's scrollbars in |
1360 |
+ preference to Emacs' own scrollbars</flag> |
1361 |
+ <flag name="wide-int">Prefer wide Emacs integers (typically 62-bit). |
1362 |
+ This option has an effect only on architectures where "long" and |
1363 |
+ "long long" types have different size.</flag> |
1364 |
+ <!--flag name='xwidgets'>Enable use of GTK widgets in Emacs buffers |
1365 |
+ (requires GTK3)</flag--> |
1366 |
+</use> |
1367 |
+</pkgmetadata> |