1 |
commit: 67300938dec2b8e726bcee9a3bded684a63e9262 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 1 13:18:08 2018 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 1 13:22:11 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67300938 |
7 |
|
8 |
app-editors/emacs: Make the X11 interface in Emacs 18 work again. |
9 |
|
10 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
11 |
|
12 |
app-editors/emacs/Manifest | 1 + |
13 |
app-editors/emacs/emacs-18.59-r12.ebuild | 162 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 163 insertions(+) |
15 |
|
16 |
diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest |
17 |
index f15ec949952..3930fa08353 100644 |
18 |
--- a/app-editors/emacs/Manifest |
19 |
+++ b/app-editors/emacs/Manifest |
20 |
@@ -1,5 +1,6 @@ |
21 |
DIST emacs-18.59-linux22x-elf-glibc21.diff.gz 15671 BLAKE2B 0106fe8053b4f65f384d451ca85138991a57afaca16b32035585055bb877c039af826859fa58c4660ec80664d3bfb0ee7a757ad76381c150ebcb22cb333a98d6 SHA512 c6c6ea33850dadf08d68fff56fc6aacc80ad1aa36661260715d50b95438942d56e6244094427d50356cfe716f26559feb885254c436399bff7be639637d605b6 |
22 |
DIST emacs-18.59-patches-10.tar.xz 21496 BLAKE2B bfa0202511a9e41d3278c63f43f174cca4ba95f42675796d85139fc43654ca3b9bc56a8c547029eaae967df66ec1e520d3bcdc67c4d53261fea70def6641574c SHA512 c0255d9d02e047cc2173cebb916677e268d8f5043c9dd08041b78019df208cdd02eb8eb49256acde7a3d5b004a7227ee9a1220d7b1e24580bdb5a5258216fc39 |
23 |
+DIST emacs-18.59-patches-11.tar.xz 22032 BLAKE2B cfdb85aeefa7a71dfd0719de893e9ea3f7118baa0b8c5aa97b3800c1a5743e77d63c35ab1e4afb13c284f5c6dda522d1e2e37f8bfd9bbba052e543af7401565b SHA512 cac3f2efc8b3f18cdf43474453acc406c5b469ecc11955f8216083a4deced887aea4a73221aa36f0bc6b7480788606f969ee1df15a8932ee771fdf790e98c00c |
24 |
DIST emacs-18.59.tar.gz 2962652 BLAKE2B d617636daff41e672af2dcda26ec24b2495cf0a3e6373561ee26a2a922b7252c074dd6b79289d771853a4720c60f084f5726b904bf65989718173232ac874b0b SHA512 03ce565e346e89b7aacb1852f4783e8907f394de7da0c543b475cb038eb89b87f980d0f7ca1841b1d2108b20f211e95113c7214e4a33e5767a1827ff43173f33 |
25 |
DIST emacs-23.4-patches-21.tar.xz 19604 BLAKE2B 97327f2079c496c28122203d233a12199a3c11a8c4efb2107247a4ca4483b898467d73d19d4f0570ec7be2a49dc5f6bd1bc9ee0811f932e7deb6b1c4ca96e362 SHA512 135eda432de64200797456d594f7de811275a7adf792d10a1c3a51ca4bbbbaa3a2c682b9fd577c4d93fbce967ca08d4ac47eb45f031477c3e44c69c14d5d5b48 |
26 |
DIST emacs-23.4.tar.bz2 38646508 BLAKE2B 33dac5d27a63b7aab6b4053964a0ecf7f7939c7aea5af15103f2da7bd34fbb18dba7a1bf44cc4fcc2e3fb1439cdf7085d8dfc4b0005f5485748996e75ca6872d SHA512 def7a95ecaefae24d8102b96b1d575a23def1b11a8f0bb17b68f7913bd118e2ea4449a8feee76c1bd649f099b70419f0d494ddd9bb32b26f92720cda842b0296 |
27 |
|
28 |
diff --git a/app-editors/emacs/emacs-18.59-r12.ebuild b/app-editors/emacs/emacs-18.59-r12.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..48dbd0a516e |
31 |
--- /dev/null |
32 |
+++ b/app-editors/emacs/emacs-18.59-r12.ebuild |
33 |
@@ -0,0 +1,162 @@ |
34 |
+# Copyright 1999-2018 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit toolchain-funcs flag-o-matic multilib |
40 |
+ |
41 |
+DESCRIPTION="The extensible self-documenting text editor" |
42 |
+HOMEPAGE="https://www.gnu.org/software/emacs/" |
43 |
+SRC_URI="ftp://ftp.gnu.org/old-gnu/emacs/${P}.tar.gz |
44 |
+ ftp://ftp.splode.com/pub/users/friedman/emacs/${P}-linux22x-elf-glibc21.diff.gz |
45 |
+ https://dev.gentoo.org/~ulm/emacs/${P}-patches-11.tar.xz" |
46 |
+ |
47 |
+LICENSE="GPL-1+ GPL-2+ BSD HPND" |
48 |
+SLOT="18" |
49 |
+KEYWORDS="~amd64 ~x86" |
50 |
+IUSE="abi_x86_x32 X" |
51 |
+ |
52 |
+RDEPEND=">=app-eselect/eselect-emacs-1.16 |
53 |
+ sys-libs/ncurses:0= |
54 |
+ amd64? ( |
55 |
+ abi_x86_x32? ( >=sys-libs/ncurses-5.9-r3:0=[abi_x86_x32(-)?] ) |
56 |
+ !abi_x86_x32? ( >=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)] ) |
57 |
+ ) |
58 |
+ X? ( x11-libs/libX11 )" |
59 |
+ |
60 |
+DEPEND="${RDEPEND} |
61 |
+ X? ( |
62 |
+ x11-base/xorg-proto |
63 |
+ x11-misc/xbitmaps |
64 |
+ )" |
65 |
+BDEPEND="virtual/pkgconfig" |
66 |
+ |
67 |
+PATCHES="../${P}-linux22x-elf-glibc21.diff ../patch" |
68 |
+ |
69 |
+src_prepare() { |
70 |
+ default |
71 |
+ |
72 |
+ # Do not use the sandbox, or the dumped Emacs will be twice as large |
73 |
+ sed -i -e 's:\./temacs.*dump:SANDBOX_ON=0 LD_PRELOAD= env &:' \ |
74 |
+ src/ymakefile || die |
75 |
+} |
76 |
+ |
77 |
+src_configure() { |
78 |
+ # autoconf? What's autoconf? We are living in 1992. ;-) |
79 |
+ local arch |
80 |
+ case ${ARCH} in |
81 |
+ amd64) |
82 |
+ if use abi_x86_x32; then |
83 |
+ arch=x86-x32 |
84 |
+ multilib_toolchain_setup x32 |
85 |
+ else |
86 |
+ arch=intel386 |
87 |
+ multilib_toolchain_setup x86 |
88 |
+ fi |
89 |
+ ;; |
90 |
+ x86) arch=intel386 ;; |
91 |
+ *) die "Architecture ${ARCH} not yet supported" ;; |
92 |
+ esac |
93 |
+ local cmd="s/\"s-.*\.h\"/\"s-linux.h\"/;s/\"m-.*\.h\"/\"m-${arch}.h\"/" |
94 |
+ use X && cmd="${cmd};s/.*\(#define HAVE_X_WINDOWS\).*/\1/" |
95 |
+ sed -e "${cmd}" src/config.h-dist >src/config.h || die |
96 |
+ |
97 |
+ cat <<-END >src/paths.h |
98 |
+ #define PATH_LOADSEARCH "/usr/share/emacs/${PV}/lisp" |
99 |
+ #define PATH_EXEC "/usr/share/emacs/${PV}/etc" |
100 |
+ #define PATH_LOCK "/var/lib/emacs/lock/" |
101 |
+ #define PATH_SUPERLOCK "/var/lib/emacs/lock/!!!SuperLock!!!" |
102 |
+ END |
103 |
+ |
104 |
+ sed -i -e "s:/usr/lib/\([^ ]*\).o:/usr/$(get_libdir)/\1.o:g" \ |
105 |
+ -e "s:-lncurses:$("$(tc-getPKG_CONFIG)" --libs ncurses):" \ |
106 |
+ src/s-linux.h || die |
107 |
+ |
108 |
+ # -O3 and -finline-functions cause segmentation faults at run time. |
109 |
+ # -Wno-implicit will quieten GCC 5; feel free to submit a patch |
110 |
+ # adding all those missing prototypes. |
111 |
+ strip-flags |
112 |
+ filter-flags -finline-functions -fpie |
113 |
+ append-flags -Wno-implicit |
114 |
+ append-ldflags $(test-flags -no-pie) #639562 |
115 |
+ replace-flags -O[3-9] -O2 |
116 |
+} |
117 |
+ |
118 |
+src_compile() { |
119 |
+ addpredict /var/lib/emacs/lock |
120 |
+ emake --jobs=1 \ |
121 |
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Demacs" \ |
122 |
+ LD="$(tc-getCC) -nostdlib" LDFLAGS="${LDFLAGS}" |
123 |
+} |
124 |
+ |
125 |
+src_install() { |
126 |
+ local basedir="/usr/share/emacs/${PV}" i |
127 |
+ |
128 |
+ dodir ${basedir} |
129 |
+ dodir /usr/share/man/man1 |
130 |
+ emake --jobs=1 \ |
131 |
+ LIBDIR="${D}"${basedir} \ |
132 |
+ BINDIR="${D}"/usr/bin \ |
133 |
+ MANDIR="${D}"/usr/share/man/man1 \ |
134 |
+ install |
135 |
+ |
136 |
+ rmdir "${D}"${basedir}/lock || die |
137 |
+ find "${D}"${basedir} -type f \( -name "*.c" -o -name ChangeLog \ |
138 |
+ -o -name COPYING ! -path "*/etc/COPYING" \) -exec rm "{}" + || die |
139 |
+ fperms -R go-w ${basedir} |
140 |
+ |
141 |
+ # remove duplicate DOC file |
142 |
+ rm "${D}"${basedir}/etc/DOC || die |
143 |
+ |
144 |
+ # move executables to the correct place |
145 |
+ mv "${D}"/usr/bin/emacs{,-${SLOT}} || die |
146 |
+ for i in etags ctags emacsclient; do |
147 |
+ mv "${D}"/usr/bin/${i}{,-emacs-${SLOT}} || die |
148 |
+ rm "${D}"${basedir}/etc/${i} || die |
149 |
+ done |
150 |
+ |
151 |
+ dodir /usr/libexec/emacs/${PV} |
152 |
+ for i in wakeup digest-doc sorted-doc movemail cvtmail fakemail \ |
153 |
+ yow env server |
154 |
+ do |
155 |
+ mv "${D}"${basedir}/etc/${i} "${D}"/usr/libexec/emacs/${PV}/${i} || die |
156 |
+ dosym ../../../../libexec/emacs/${PV}/${i} ${basedir}/etc/${i} |
157 |
+ done |
158 |
+ for i in test-distrib make-docfile; do |
159 |
+ rm "${D}"${basedir}/etc/${i} || die |
160 |
+ done |
161 |
+ |
162 |
+ # move man page |
163 |
+ mv "${D}"/usr/share/man/man1/emacs{,-${SLOT}}.1 || die |
164 |
+ |
165 |
+ # move Info files |
166 |
+ dodir /usr/share/info |
167 |
+ mv "${D}"${basedir}/info "${D}"/usr/share/info/emacs-${SLOT} || die |
168 |
+ dosym ../../info/emacs-${SLOT} "${basedir}"/info |
169 |
+ docompress -x /usr/share/info |
170 |
+ |
171 |
+ # move Info dir to avoid collisions with the dir file generated by portage |
172 |
+ mv "${D}"/usr/share/info/emacs-${SLOT}/dir{,.orig} || die |
173 |
+ touch "${D}"/usr/share/info/emacs-${SLOT}/.keepinfodir |
174 |
+ |
175 |
+ dodir /var/lib/emacs |
176 |
+ diropts -m0777 |
177 |
+ keepdir /var/lib/emacs/lock |
178 |
+ |
179 |
+ dodoc README PROBLEMS |
180 |
+} |
181 |
+ |
182 |
+pkg_preinst() { |
183 |
+ # move Info dir file to correct name |
184 |
+ if [[ -d "${D}"/usr/share/info ]]; then |
185 |
+ mv "${D}"/usr/share/info/emacs-${SLOT}/dir{.orig,} || die |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+pkg_postinst() { |
190 |
+ eselect emacs update ifunset |
191 |
+} |
192 |
+ |
193 |
+pkg_postrm() { |
194 |
+ eselect emacs update ifunset |
195 |
+} |