Gentoo Archives: gentoo-commits

From: Mats Lidell <matsl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/xemacs/files/, app-editors/xemacs/
Date: Wed, 06 Jul 2022 20:27:40
Message-Id: 1657139129.542b80446e7846c7b1e997787178a0773e24ae1d.matsl@gentoo
1 commit: 542b80446e7846c7b1e997787178a0773e24ae1d
2 Author: Mats Lidell <matsl <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 6 20:06:16 2022 +0000
4 Commit: Mats Lidell <matsl <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 6 20:25:29 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=542b8044
7
8 app-editors/xemacs: fix emerge with modules
9
10 Use backported patch from upstream tip development branch.
11 bug: https://bugs.gentoo.org/855122
12 Signed-off-by: Mats Lidell <matsl <AT> gentoo.org>
13
14 .../files/xemacs-21.5.34-module-autoloads.patch | 115 +++++++++++++++++++++
15 app-editors/xemacs/xemacs-21.5.34-r9.ebuild | 1 +
16 2 files changed, 116 insertions(+)
17
18 diff --git a/app-editors/xemacs/files/xemacs-21.5.34-module-autoloads.patch b/app-editors/xemacs/files/xemacs-21.5.34-module-autoloads.patch
19 new file mode 100644
20 index 000000000000..8b5443dfcb10
21 --- /dev/null
22 +++ b/app-editors/xemacs/files/xemacs-21.5.34-module-autoloads.patch
23 @@ -0,0 +1,115 @@
24 +diff -u b/lisp/update-elc-2.el b/lisp/update-elc-2.el
25 +--- b/lisp/update-elc-2.el Mon Jun 27 22:14:53 2022 +0900
26 ++++ b/lisp/update-elc-2.el Thu Jun 30 16:36:19 2022 +0100
27 +@@ -144,12 +144,12 @@
28 + (load (expand-file-name "auto-autoloads" lisp-directory))
29 + (when (featurep 'mule)
30 + (load (expand-file-name "mule/auto-autoloads" lisp-directory)))
31 ++ (when (featurep 'modules)
32 ++ (load (expand-file-name "auto-autoloads" module-directory)))
33 + ;; We remove all the bad .elcs before any byte-compilation, because
34 + ;; there may be dependencies between one .el and another (even across
35 + ;; directories), and we don't want to load an out-of-date .elc while
36 + ;; byte-compiling a file.
37 +- (when (featurep 'modules)
38 +- (load (expand-file-name "auto-autoloads" module-directory)))
39 + (message "Removing old or spurious .elcs in directory tree `%s'..." dir)
40 + (do-update-elc-2 dir nil nil)
41 + (message "Removing old or spurious .elcs in directory tree `%s'...done"
42 +unchanged:
43 +--- a/src/Makefile.in.in Mon Jun 27 13:31:39 2022 +0100
44 ++++ b/src/Makefile.in.in Mon Jun 27 22:14:53 2022 +0900
45 +@@ -95,7 +95,12 @@
46 + SHELL=/bin/sh
47 + RM = rm -f
48 +
49 +-LISP = $(SRC)/../lisp
50 ++## Earlier versions had $(SRC)/../lisp here, but currently ../lisp is a
51 ++## link to $(SRC)/../lisp in out-of-source builds. $(SRC)/../lisp breaks
52 ++## the modules build because the autoloads end up in $(SRCMODULES), but
53 ++## update-elc-2.el looks for them in $(BLDMODULES).
54 ++LISP = ../lisp
55 ++
56 + ETC = $(SRC)/../etc
57 + SRCMODULES = $(SRC)/../modules
58 + LIB_SRC = ../lib-src
59 +@@ -944,10 +949,14 @@
60 + -$(RM) $(RAW_EXE) $(DUMP_TARGET) $(DUMP_TARGET).dmp $(LIB_SRC)/DOC
61 + ## Remove the generated load files here; they cause lots of problems
62 + ## when they don't work right.
63 ++## Some older versions tried to put module load files in the SRC tree,
64 ++## but that breaks module builds, which expect them in the BLD tree,
65 ++## and that's where they belong anyway. Clean both.
66 + clean: mostlyclean versionclean
67 + -$(RM) libextcli* $(LISP)/auto-autoloads.el* $(LISP)/custom-load.el* \
68 + $(LISP)/mule/auto-autoloads.el* $(LISP)/mule/custom-load.el* \
69 +- $(SRCMODULES)/auto-autoloads.el* $(SRCMODULES)/custom-load.el*
70 ++ $(SRCMODULES)/auto-autoloads.el* $(SRCMODULES)/custom-load.el* \
71 ++ $(BLDMODULES)/auto-autoloads.el* $(BLDMODULES)/custom-load.el*
72 + ## This is used in making a distribution.
73 + ## Do not use it on development directories!
74 + distclean-noconfig: clean
75 +only in patch2:
76 +unchanged:
77 +--- a/lisp/update-elc.el
78 ++++ b/lisp/update-elc.el
79 +@@ -87,8 +87,8 @@
80 +
81 + (defvar source-lisp-mule (expand-file-name "mule" source-lisp))
82 + (defvar source-directory (expand-file-name ".." source-lisp))
83 +-(defconst module-directory (expand-file-name "modules" source-directory))
84 +-
85 ++(defvar source-modules (expand-file-name "../modules" (file-truename source-lisp)))
86 ++(defconst module-directory (expand-file-name "modules" build-directory))
87 + (defvar aa-lisp (expand-file-name "auto-autoloads.el" source-lisp))
88 + (defvar aac-lisp (expand-file-name "auto-autoloads.elc" source-lisp))
89 + (defvar aa-lisp-mule (expand-file-name "auto-autoloads.el" source-lisp-mule))
90 +@@ -280,15 +280,13 @@ If any of these files are changed, we need to redump.")
91 +
92 + ;; Check for the module autoloads separately, given the need to run
93 + ;; directory-files on subdirectories.
94 +- (let ((autoload-file
95 +- (expand-file-name "auto-autoloads.el" module-directory)))
96 +- (mapc
97 +- #'(lambda (full-dir)
98 +- (mapc #'(lambda (full-arg)
99 +- (when (file-newer-than-file-p full-arg autoload-file)
100 +- (setq need-to-rebuild-module-autoloads t)))
101 +- (directory-files full-dir t "\\.c$" nil t)))
102 +- (directory-files module-directory t nil t 'subdirs)))
103 ++ (mapc
104 ++ #'(lambda (full-dir)
105 ++ (mapc #'(lambda (full-arg)
106 ++ (when (file-newer-than-file-p full-arg aa-modules)
107 ++ (setq need-to-rebuild-module-autoloads t)))
108 ++ (directory-files full-dir t "\\.c$" nil t)))
109 ++ (directory-files source-modules t nil t 'subdirs))
110 +
111 + (if dump-target-out-of-date-wrt-dump-files
112 + (condition-case nil
113 +@@ -346,9 +344,22 @@ If any of these files are changed, we need to redump.")
114 + (if need-to-rebuild-mule-autoloads
115 + (list "-f" "batch-update-directory-autoloads"
116 + "mule" source-lisp-mule))
117 +- (if need-to-rebuild-module-autoloads
118 +- (list "-f" "batch-update-directory-autoloads"
119 +- "auto" module-directory))
120 ++ (if need-to-rebuild-module-autoloads
121 ++ (list "-eval"
122 ++ (concat
123 ++ "(update-autoload-files '("
124 ++ (mapconcat #'prin1-to-string
125 ++ (mapcan
126 ++ #'(lambda (full-dir)
127 ++ (unless (member*
128 ++ (file-name-nondirectory full-dir)
129 ++ '("." "..") :test #'equal)
130 ++ (directory-files full-dir
131 ++ t "\\.c$" nil t)))
132 ++ (directory-files source-modules
133 ++ t nil t 'subdirs))
134 ++ " ")
135 ++ ") \"modules\" " (prin1-to-string aa-modules) ")")))
136 + (if need-to-recompile-autoloads
137 + (list "-f" "batch-byte-compile-one-file"
138 + aa-lisp))
139
140 diff --git a/app-editors/xemacs/xemacs-21.5.34-r9.ebuild b/app-editors/xemacs/xemacs-21.5.34-r9.ebuild
141 index cbf425e1c83b..e6c5da2b2155 100644
142 --- a/app-editors/xemacs/xemacs-21.5.34-r9.ebuild
143 +++ b/app-editors/xemacs/xemacs-21.5.34-r9.ebuild
144 @@ -69,6 +69,7 @@ src_prepare() {
145 eapply "${FILESDIR}/${P}-process-test-qa.patch"
146 eapply "${FILESDIR}/${P}-autoloads-parallell-make.patch"
147 eapply "${FILESDIR}/${P}-no-lock-on-finder-inf.patch"
148 + eapply "${FILESDIR}/${P}-module-autoloads.patch"
149
150 eapply_user