Gentoo Archives: gentoo-commits

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