diff options
author | Alejandro Hernandez Samaniego <alejandro@enedino.org> | 2023-08-30 00:25:17 -0600 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-08-30 00:20:59 -0700 |
commit | 1cfd2bcc847526af3f476adab0703b20d6184104 (patch) | |
tree | a5289a6cad3c702ddfffc0d91bb9fe8063605e30 | |
parent | f9afd633705c46033a9e7539af4ad7423890ac7c (diff) | |
download | meta-openembedded-1cfd2bcc847526af3f476adab0703b20d6184104.tar.gz |
emacs: update to 29.1
- Rebase (and rename) use-emacs-native-tools-for-cross-compiling.patch
- Build bootstrap-emacs for emacs-native
- Use bootstrap-emacs (native) for cross compiling.
- We need to pass EMACSLOADPATH and EMACSDATA so we can control the
directories being used by bootstrap-emacs.
- Create avoid-running-host-binaries-for-sanity.patch to avoid running
the newly integrated santity-check by emacs since it tries to run target
binaries on the host.
- Fix emacs-minimal packaging for new version.
Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/emacs/emacs_29.1.bb (renamed from meta-oe/recipes-support/emacs/emacs_28.2.bb) | 52 | ||||
-rw-r--r-- | meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch | 38 | ||||
-rw-r--r-- | meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch | 106 | ||||
-rw-r--r-- | meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch | 85 |
4 files changed, 187 insertions, 94 deletions
diff --git a/meta-oe/recipes-support/emacs/emacs_28.2.bb b/meta-oe/recipes-support/emacs/emacs_29.1.bb index d44026536d..ae35367ac4 100644 --- a/meta-oe/recipes-support/emacs/emacs_28.2.bb +++ b/meta-oe/recipes-support/emacs/emacs_29.1.bb | |||
@@ -5,11 +5,13 @@ LICENSE = "GPL-3.0-only" | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" |
6 | 6 | ||
7 | SRC_URI = "https://ftp.gnu.org/pub/gnu/emacs/emacs-${PV}.tar.xz \ | 7 | SRC_URI = "https://ftp.gnu.org/pub/gnu/emacs/emacs-${PV}.tar.xz \ |
8 | file://0001-largefile.m4-Update-from-latest-gnulib.patch \ | ||
9 | " | 8 | " |
10 | SRC_URI:append:class-target = " file://usemake-docfile-native.patch" | 9 | SRC_URI:append:class-target = " \ |
10 | file://use-emacs-native-tools-for-cross-compiling.patch \ | ||
11 | file://avoid-running-host-binaries-for-sanity.patch \ | ||
12 | " | ||
11 | 13 | ||
12 | SRC_URI[sha256sum] = "ee21182233ef3232dc97b486af2d86e14042dbb65bbc535df562c3a858232488" | 14 | SRC_URI[sha256sum] = "d2f881a5cc231e2f5a03e86f4584b0438f83edd7598a09d24a21bd8d003e2e01" |
13 | 15 | ||
14 | CVE_STATUS[CVE-2007-6109] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." | 16 | CVE_STATUS[CVE-2007-6109] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." |
15 | 17 | ||
@@ -32,24 +34,42 @@ DEPENDS:append:class-target = " emacs-native" | |||
32 | 34 | ||
33 | inherit autotools mime-xdg pkgconfig | 35 | inherit autotools mime-xdg pkgconfig |
34 | 36 | ||
35 | # Remove build host references to avoid target pollution | ||
36 | do_compile:prepend () { | ||
37 | sed -i -e 's|${TMPDIR}||g' ${B}/src/config.h | ||
38 | sed -i -e 's|${B}||g' ${B}/src/epaths.h | ||
39 | } | ||
40 | 37 | ||
38 | # Create the required native tools for the target build | ||
41 | do_compile:class-native (){ | 39 | do_compile:class-native (){ |
42 | cd ${B}/lib-src | 40 | cd ${B}/lib-src |
43 | oe_runmake make-docfile | 41 | oe_runmake make-docfile |
44 | oe_runmake make-fingerprint | 42 | oe_runmake make-fingerprint |
43 | cd ${B}/src | ||
44 | oe_runmake bootstrap-emacs | ||
45 | } | 45 | } |
46 | |||
46 | do_install:class-native(){ | 47 | do_install:class-native(){ |
47 | install -d ${D}${bindir} | 48 | install -d ${D}${bindir} |
48 | install -m 755 ${B}/lib-src/make-docfile ${D}/${bindir}/ | 49 | install -m 755 ${B}/lib-src/make-docfile ${D}/${bindir}/ |
49 | install -m 755 ${B}/lib-src/make-fingerprint ${D}/${bindir}/ | 50 | install -m 755 ${B}/lib-src/make-fingerprint ${D}/${bindir}/ |
51 | install -m 755 ${B}/src/bootstrap-emacs ${D}/${bindir}/ | ||
52 | } | ||
53 | |||
54 | do_compile:prepend:class-target () { | ||
55 | # export EMACS env variables for the native tools to use to allow calling bootstrap-emacs | ||
56 | export EMACSLOADPATH=${S}/lisp | ||
57 | export EMACSDATA=${S}/etc | ||
50 | } | 58 | } |
51 | 59 | ||
52 | 60 | ||
61 | do_install:prepend:class-target(){ | ||
62 | # export EMACS env variables for the native tools to use to allow calling bootstrap-emacs | ||
63 | export EMACSLOADPATH=${S}/lisp | ||
64 | export EMACSDATA=${S}/etc | ||
65 | } | ||
66 | |||
67 | # Remove build host references to avoid target pollution | ||
68 | do_compile:prepend () { | ||
69 | sed -i -e 's|${TMPDIR}||g' ${B}/src/config.h | ||
70 | sed -i -e 's|${B}||g' ${B}/src/epaths.h | ||
71 | } | ||
72 | |||
53 | do_install:append(){ | 73 | do_install:append(){ |
54 | # Delete systemd stuff, extend using DISTRO_FEATURES? | 74 | # Delete systemd stuff, extend using DISTRO_FEATURES? |
55 | rm -rf ${D}/${libdir} | 75 | rm -rf ${D}/${libdir} |
@@ -96,18 +116,28 @@ FILES:${PN}-minimal = " \ | |||
96 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/bytecomp.elc \ | 116 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/bytecomp.elc \ |
97 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cconv.elc \ | 117 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cconv.elc \ |
98 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-generic.elc \ | 118 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-generic.elc \ |
119 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-lib.elc \ | ||
120 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-macs.elc \ | ||
99 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-preloaded.elc \ | 121 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-preloaded.elc \ |
122 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-seq.elc \ | ||
123 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/debug-early.elc \ | ||
124 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/easy-mmode.elc \ | ||
100 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/easymenu.elc \ | 125 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/easymenu.elc \ |
101 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/eldoc.elc \ | 126 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/eldoc.elc \ |
102 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/float-sup.elc \ | 127 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/float-sup.elc \ |
103 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/gv.elc \ | 128 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/gv.elc \ |
129 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/inline.elc \ | ||
104 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/lisp-mode.elc \ | 130 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/lisp-mode.elc \ |
105 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/lisp.elc \ | 131 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/lisp.elc \ |
106 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/macroexp.elc \ | 132 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/macroexp.elc \ |
107 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/map-ynp.elc \ | 133 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/map-ynp.elc \ |
108 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/map.elc \ | 134 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/map.elc \ |
109 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/nadvice.elc \ | 135 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/nadvice.elc \ |
136 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/oclosure.elc \ | ||
137 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/pcase.elc \ | ||
110 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/regexp-opt.elc \ | 138 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/regexp-opt.elc \ |
139 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/rmc.elc \ | ||
140 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/rx.elc \ | ||
111 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/seq.elc \ | 141 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/seq.elc \ |
112 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/shorthands.elc \ | 142 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/shorthands.elc \ |
113 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/subr-x.elc \ | 143 | ${datadir}/${BPN}/${PV}/lisp/emacs-lisp/subr-x.elc \ |
@@ -141,6 +171,8 @@ FILES:${PN}-minimal = " \ | |||
141 | ${datadir}/${BPN}/${PV}/lisp/isearch.elc \ | 171 | ${datadir}/${BPN}/${PV}/lisp/isearch.elc \ |
142 | ${datadir}/${BPN}/${PV}/lisp/jit-lock.elc \ | 172 | ${datadir}/${BPN}/${PV}/lisp/jit-lock.elc \ |
143 | ${datadir}/${BPN}/${PV}/lisp/jka-cmpr-hook.elc \ | 173 | ${datadir}/${BPN}/${PV}/lisp/jka-cmpr-hook.elc \ |
174 | ${datadir}/${BPN}/${PV}/lisp/jka-compr.elc \ | ||
175 | ${datadir}/${BPN}/${PV}/lisp/keymap.elc \ | ||
144 | ${datadir}/${BPN}/${PV}/lisp/language/burmese.elc \ | 176 | ${datadir}/${BPN}/${PV}/lisp/language/burmese.elc \ |
145 | ${datadir}/${BPN}/${PV}/lisp/language/cham.elc \ | 177 | ${datadir}/${BPN}/${PV}/lisp/language/cham.elc \ |
146 | ${datadir}/${BPN}/${PV}/lisp/language/chinese.elc \ | 178 | ${datadir}/${BPN}/${PV}/lisp/language/chinese.elc \ |
@@ -153,11 +185,13 @@ FILES:${PN}-minimal = " \ | |||
153 | ${datadir}/${BPN}/${PV}/lisp/language/greek.elc \ | 185 | ${datadir}/${BPN}/${PV}/lisp/language/greek.elc \ |
154 | ${datadir}/${BPN}/${PV}/lisp/language/hebrew.elc \ | 186 | ${datadir}/${BPN}/${PV}/lisp/language/hebrew.elc \ |
155 | ${datadir}/${BPN}/${PV}/lisp/language/indian.elc \ | 187 | ${datadir}/${BPN}/${PV}/lisp/language/indian.elc \ |
188 | ${datadir}/${BPN}/${PV}/lisp/language/indonesian.elc \ | ||
156 | ${datadir}/${BPN}/${PV}/lisp/language/japanese.elc \ | 189 | ${datadir}/${BPN}/${PV}/lisp/language/japanese.elc \ |
157 | ${datadir}/${BPN}/${PV}/lisp/language/khmer.elc \ | 190 | ${datadir}/${BPN}/${PV}/lisp/language/khmer.elc \ |
158 | ${datadir}/${BPN}/${PV}/lisp/language/korean.elc \ | 191 | ${datadir}/${BPN}/${PV}/lisp/language/korean.elc \ |
159 | ${datadir}/${BPN}/${PV}/lisp/language/lao.elc \ | 192 | ${datadir}/${BPN}/${PV}/lisp/language/lao.elc \ |
160 | ${datadir}/${BPN}/${PV}/lisp/language/misc-lang.elc \ | 193 | ${datadir}/${BPN}/${PV}/lisp/language/misc-lang.elc \ |
194 | ${datadir}/${BPN}/${PV}/lisp/language/philippine.elc \ | ||
161 | ${datadir}/${BPN}/${PV}/lisp/language/romanian.elc \ | 195 | ${datadir}/${BPN}/${PV}/lisp/language/romanian.elc \ |
162 | ${datadir}/${BPN}/${PV}/lisp/language/sinhala.elc \ | 196 | ${datadir}/${BPN}/${PV}/lisp/language/sinhala.elc \ |
163 | ${datadir}/${BPN}/${PV}/lisp/language/slovak.elc \ | 197 | ${datadir}/${BPN}/${PV}/lisp/language/slovak.elc \ |
@@ -182,7 +216,6 @@ FILES:${PN}-minimal = " \ | |||
182 | ${datadir}/${BPN}/${PV}/lisp/rfn-eshadow.elc \ | 216 | ${datadir}/${BPN}/${PV}/lisp/rfn-eshadow.elc \ |
183 | ${datadir}/${BPN}/${PV}/lisp/select.elc \ | 217 | ${datadir}/${BPN}/${PV}/lisp/select.elc \ |
184 | ${datadir}/${BPN}/${PV}/lisp/simple.elc \ | 218 | ${datadir}/${BPN}/${PV}/lisp/simple.elc \ |
185 | ${datadir}/${BPN}/${PV}/lisp/simple.elc \ | ||
186 | ${datadir}/${BPN}/${PV}/lisp/startup.elc \ | 219 | ${datadir}/${BPN}/${PV}/lisp/startup.elc \ |
187 | ${datadir}/${BPN}/${PV}/lisp/subr.elc \ | 220 | ${datadir}/${BPN}/${PV}/lisp/subr.elc \ |
188 | ${datadir}/${BPN}/${PV}/lisp/tab-bar.elc \ | 221 | ${datadir}/${BPN}/${PV}/lisp/tab-bar.elc \ |
@@ -192,6 +225,7 @@ FILES:${PN}-minimal = " \ | |||
192 | ${datadir}/${BPN}/${PV}/lisp/textmodes/page.elc \ | 225 | ${datadir}/${BPN}/${PV}/lisp/textmodes/page.elc \ |
193 | ${datadir}/${BPN}/${PV}/lisp/textmodes/paragraphs.elc \ | 226 | ${datadir}/${BPN}/${PV}/lisp/textmodes/paragraphs.elc \ |
194 | ${datadir}/${BPN}/${PV}/lisp/textmodes/text-mode.elc \ | 227 | ${datadir}/${BPN}/${PV}/lisp/textmodes/text-mode.elc \ |
228 | ${datadir}/${BPN}/${PV}/lisp/thingatpt.elc \ | ||
195 | ${datadir}/${BPN}/${PV}/lisp/tooltip.elc \ | 229 | ${datadir}/${BPN}/${PV}/lisp/tooltip.elc \ |
196 | ${datadir}/${BPN}/${PV}/lisp/uniquify.elc \ | 230 | ${datadir}/${BPN}/${PV}/lisp/uniquify.elc \ |
197 | ${datadir}/${BPN}/${PV}/lisp/vc/ediff-hook.elc \ | 231 | ${datadir}/${BPN}/${PV}/lisp/vc/ediff-hook.elc \ |
diff --git a/meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch b/meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch new file mode 100644 index 0000000000..719ee4bce9 --- /dev/null +++ b/meta-oe/recipes-support/emacs/files/avoid-running-host-binaries-for-sanity.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Specific] | ||
2 | |||
3 | Emacs introduced a sanity-check for the build artifacts, where it | ||
4 | runs the newly built emacs to perform some checks. | ||
5 | |||
6 | This is not going to work for us since we are cross-compiling, | ||
7 | we need to avoid running target binaries on the host | ||
8 | |||
9 | Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> | ||
10 | |||
11 | Index: emacs-29.1/Makefile.in | ||
12 | =================================================================== | ||
13 | --- emacs-29.1.orig/Makefile.in | ||
14 | +++ emacs-29.1/Makefile.in | ||
15 | @@ -416,19 +416,10 @@ advice-on-failure: | ||
16 | @exit ${exit-status} | ||
17 | |||
18 | sanity-check: | ||
19 | - @[ -f .no-advice-on-failure ] && exit 0; true | ||
20 | - @v=$$(src/emacs${EXEEXT} --batch --eval \ | ||
21 | - '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \ | ||
22 | - 2> /dev/null); \ | ||
23 | - [ "X$$v" = "X3628800" ] && exit 0; \ | ||
24 | - echo >&2 '***'; \ | ||
25 | - echo >&2 '*** '"\"make ${make-target}\" succeeded, but Emacs is not functional."; \ | ||
26 | - echo >&2 '***'; \ | ||
27 | - cat Makefile | \ | ||
28 | - sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q;};' | \ | ||
29 | - sed 's/^# /*** /' | grep -v '^\*\*\* ADVICE-ON-FAILURE-' >&2; \ | ||
30 | - echo >&2 '***'; \ | ||
31 | - exit 1 | ||
32 | +# The Makefile will try to call the newly built emacs to perform some checks | ||
33 | +# this is not going to work since it was (probably) built for a different architecture. | ||
34 | +# Avoid calling target binaries from the host and simply assume our build artifacts work. | ||
35 | + exit 0 | ||
36 | |||
37 | .PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 epaths-force-ns-self-contained etc-emacsver | ||
38 | |||
diff --git a/meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch b/meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch new file mode 100644 index 0000000000..df5e4bd258 --- /dev/null +++ b/meta-oe/recipes-support/emacs/files/use-emacs-native-tools-for-cross-compiling.patch | |||
@@ -0,0 +1,106 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Specific] | ||
2 | |||
3 | When building emacs, it builds some tools for the HOST | ||
4 | that are then used to build for target, such as | ||
5 | make-fingerprint and make-docfile and bootstrap-emacs, | ||
6 | this needs to be adapted to be used by bitbake, otherwise | ||
7 | the compiled executables arent compatible with the HOST. | ||
8 | |||
9 | We also need to be able to use emacs env variables to | ||
10 | control how bootstrap-emacs is used when cross-compiling. | ||
11 | |||
12 | Use the above mentioned tools provided by the native | ||
13 | version of the recipe instead. | ||
14 | |||
15 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> | ||
16 | |||
17 | Index: emacs-29.1/src/Makefile.in | ||
18 | =================================================================== | ||
19 | --- emacs-29.1.orig/src/Makefile.in | ||
20 | +++ emacs-29.1/src/Makefile.in | ||
21 | @@ -1,3 +1,4 @@ | ||
22 | + | ||
23 | ### @configure_input@ | ||
24 | |||
25 | # Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2023 Free Software | ||
26 | @@ -508,7 +509,7 @@ ifeq ($(CHECK_STRUCTS),true) | ||
27 | pdumper.o: dmpstruct.h | ||
28 | endif | ||
29 | dmpstruct.h: $(srcdir)/dmpstruct.awk | ||
30 | -dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers) | ||
31 | +dmpstruct.h: $(dmpstruct_headers) | ||
32 | $(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \ | ||
33 | $(dmpstruct_headers) > $@ | ||
34 | |||
35 | @@ -610,8 +611,7 @@ SYSTEM_TYPE = @SYSTEM_TYPE@ | ||
36 | ## Strictly speaking, emacs does not depend directly on all of $lisp, | ||
37 | ## since not all pieces are used on all platforms. But DOC depends | ||
38 | ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. | ||
39 | -emacs$(EXEEXT): temacs$(EXEEXT) \ | ||
40 | - lisp.mk $(etc)/DOC $(lisp) \ | ||
41 | +emacs$(EXEEXT): lisp.mk $(etc)/DOC $(lisp) \ | ||
42 | $(lispsource)/international/charprop.el ${charsets} | ||
43 | ifeq ($(SYSTEM_TYPE),cygwin) | ||
44 | find ${top_builddir} -name '*.eln' | rebase -v -O -T - | ||
45 | @@ -654,7 +654,7 @@ endif | ||
46 | $(etc)/DOC: $(libsrc)/make-docfile$(EXEEXT) $(doc_obj) | ||
47 | $(AM_V_GEN)$(MKDIR_P) $(etc) | ||
48 | $(AM_V_at)rm -f $(etc)/DOC | ||
49 | - $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \ | ||
50 | + make-docfile -d $(srcdir) \ | ||
51 | $(SOME_MACHINE_OBJECTS) $(doc_obj) > $(etc)/DOC | ||
52 | |||
53 | $(libsrc)/make-docfile$(EXEEXT) $(libsrc)/make-fingerprint$(EXEEXT): \ | ||
54 | @@ -671,7 +671,7 @@ buildobj.h: Makefile | ||
55 | GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) | ||
56 | |||
57 | gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) | ||
58 | - $(AM_V_GLOBALS)$(libsrc)/make-docfile -d $(srcdir) -g $(doc_obj) > globals.tmp | ||
59 | + make-docfile -d $(srcdir) -g $(doc_obj) > globals.tmp | ||
60 | $(AM_V_at)$(top_srcdir)/build-aux/move-if-change globals.tmp globals.h | ||
61 | $(AM_V_at)echo timestamp > $@ | ||
62 | |||
63 | @@ -685,7 +685,7 @@ $(LIBEGNU_ARCHIVE): $(config_h) | ||
64 | $(MAKE) -C $(dir $@) all | ||
65 | |||
66 | ifeq ($(HAVE_PDUMPER),yes) | ||
67 | -MAKE_PDUMPER_FINGERPRINT = $(libsrc)/make-fingerprint$(EXEEXT) | ||
68 | +MAKE_PDUMPER_FINGERPRINT = make-fingerprint | ||
69 | else | ||
70 | MAKE_PDUMPER_FINGERPRINT = | ||
71 | endif | ||
72 | Index: emacs-29.1/lisp/Makefile.in | ||
73 | =================================================================== | ||
74 | --- emacs-29.1.orig/lisp/Makefile.in | ||
75 | +++ emacs-29.1/lisp/Makefile.in | ||
76 | @@ -53,7 +53,7 @@ FIND_DELETE = @FIND_DELETE@ | ||
77 | # We never change directory before running Emacs, so a relative file | ||
78 | # name is fine, and makes life easier. If we need to change | ||
79 | # directory, we can use emacs --chdir. | ||
80 | -EMACS = ../src/emacs${EXEEXT} | ||
81 | +EMACS = bootstrap-emacs | ||
82 | |||
83 | # Command line flags for Emacs. | ||
84 | |||
85 | @@ -109,7 +109,7 @@ MAIN_FIRST = ./emacs-lisp/eieio.el ./ema | ||
86 | ./org/oc.el ./org/ol.el ./emacs-lisp/cl-lib.el | ||
87 | |||
88 | # Prevent any settings in the user environment causing problems. | ||
89 | -unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH | ||
90 | +unexport EMACSDOC EMACSPATH | ||
91 | |||
92 | # The actual Emacs command run in the targets below. | ||
93 | emacs = '$(EMACS)' $(EMACSOPT) | ||
94 | Index: emacs-29.1/Makefile.in | ||
95 | =================================================================== | ||
96 | --- emacs-29.1.orig/Makefile.in | ||
97 | +++ emacs-29.1/Makefile.in | ||
98 | @@ -328,7 +328,7 @@ GLIB_COMPILE_SCHEMAS = glib-compile-sche | ||
99 | TRANSFORM = @program_transform_name@ | ||
100 | |||
101 | # Prevent any settings in the user environment causing problems. | ||
102 | -unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH | ||
103 | +unexport EMACSDOC EMACSPATH | ||
104 | |||
105 | # What emacs should be called when installed. | ||
106 | EMACS_NAME = `echo emacs | sed '$(TRANSFORM)'` | ||
diff --git a/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch b/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch deleted file mode 100644 index 95b4281836..0000000000 --- a/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Specific] | ||
2 | |||
3 | When building emacs, it builds some tools for the HOST | ||
4 | that are then used to build for target, such as | ||
5 | make-fingerprint and make-docfile, this needs to be | ||
6 | adapted to be used by bitbake, otherwise the compiled | ||
7 | executables arent compatible with the HOST. | ||
8 | |||
9 | Use the above mentioned tools provided by the native | ||
10 | version of the recipe instead. | ||
11 | |||
12 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> | ||
13 | |||
14 | Index: emacs-28.2/src/Makefile.in | ||
15 | =================================================================== | ||
16 | --- emacs-28.2.orig/src/Makefile.in | ||
17 | +++ emacs-28.2/src/Makefile.in | ||
18 | @@ -462,7 +462,7 @@ ifeq ($(CHECK_STRUCTS),true) | ||
19 | pdumper.o: dmpstruct.h | ||
20 | endif | ||
21 | dmpstruct.h: $(srcdir)/dmpstruct.awk | ||
22 | -dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers) | ||
23 | +dmpstruct.h: $(dmpstruct_headers) | ||
24 | $(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \ | ||
25 | $(dmpstruct_headers) > $@ | ||
26 | |||
27 | @@ -563,8 +563,7 @@ SYSTEM_TYPE = @SYSTEM_TYPE@ | ||
28 | ## Strictly speaking, emacs does not depend directly on all of $lisp, | ||
29 | ## since not all pieces are used on all platforms. But DOC depends | ||
30 | ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. | ||
31 | -emacs$(EXEEXT): temacs$(EXEEXT) \ | ||
32 | - lisp.mk $(etc)/DOC $(lisp) \ | ||
33 | +emacs$(EXEEXT): lisp.mk $(etc)/DOC $(lisp) \ | ||
34 | $(lispsource)/international/charprop.el ${charsets} | ||
35 | ifeq ($(SYSTEM_TYPE),cygwin) | ||
36 | find ${top_builddir} -name '*.eln' | rebase -v -O -T - | ||
37 | @@ -597,15 +596,15 @@ endif | ||
38 | ## for the first time, this prevents any variation between configurations | ||
39 | ## in the contents of the DOC file. | ||
40 | ## | ||
41 | -$(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp) | ||
42 | +$(etc)/DOC: lisp.mk $(obj) $(lisp) | ||
43 | $(AM_V_GEN)$(MKDIR_P) $(etc) | ||
44 | $(AM_V_at)rm -f $(etc)/DOC | ||
45 | - $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \ | ||
46 | + make-docfile -d $(srcdir) \ | ||
47 | $(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC | ||
48 | - $(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \ | ||
49 | + make-docfile -a $(etc)/DOC -d $(lispsource) \ | ||
50 | $(shortlisp) | ||
51 | |||
52 | -$(libsrc)/make-docfile$(EXEEXT) $(libsrc)/make-fingerprint$(EXEEXT): \ | ||
53 | +$(libsrc)/make-fingerprint$(EXEEXT): \ | ||
54 | $(lib)/libgnu.a | ||
55 | $(MAKE) -C $(dir $@) $(notdir $@) | ||
56 | |||
57 | @@ -618,8 +617,8 @@ buildobj.h: Makefile | ||
58 | |||
59 | GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) | ||
60 | |||
61 | -gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) | ||
62 | - $(AM_V_GLOBALS)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) > globals.tmp | ||
63 | +gl-stamp: $(GLOBAL_SOURCES) | ||
64 | + make-docfile -d $(srcdir) -g $(obj) > globals.tmp | ||
65 | $(AM_V_at)$(top_srcdir)/build-aux/move-if-change globals.tmp globals.h | ||
66 | $(AM_V_at)echo timestamp > $@ | ||
67 | |||
68 | @@ -633,7 +632,7 @@ $(LIBEGNU_ARCHIVE): $(config_h) | ||
69 | $(MAKE) -C $(dir $@) all | ||
70 | |||
71 | ifeq ($(HAVE_PDUMPER),yes) | ||
72 | - MAKE_PDUMPER_FINGERPRINT = $(libsrc)/make-fingerprint$(EXEEXT) | ||
73 | + MAKE_PDUMPER_FINGERPRINT = make-fingerprint | ||
74 | else | ||
75 | MAKE_PDUMPER_FINGERPRINT = | ||
76 | endif | ||
77 | @@ -643,7 +642,7 @@ endif | ||
78 | ## This goes on to affect various things, and the emacs binary fails | ||
79 | ## to start if Vinstallation_directory has the wrong value. | ||
80 | temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \ | ||
81 | - $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT) | ||
82 | + $(charsets) $(charscript) ${emoji-zwj} | ||
83 | $(AM_V_CCLD)$(CC) -o $@.tmp \ | ||
84 | $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ | ||
85 | $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) | ||