summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/emacs/files
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandro@enedino.org>2020-08-21 15:47:56 -0700
committerKhem Raj <raj.khem@gmail.com>2020-08-21 16:35:25 -0700
commit4c84ab39b3234a6266275352cd827ab114ff46d9 (patch)
tree9c6e6ae3299ae31f187db1c5adf81035ddc3619b /meta-oe/recipes-support/emacs/files
parente4d491efcc2cc333ac73d6406cd8377cc26c8c43 (diff)
downloadmeta-openembedded-4c84ab39b3234a6266275352cd827ab114ff46d9.tar.gz
emacs: Create a new recipe for emacs
Emacs is for obvious reasons one of the most important and powerful editors, being the first program released by the GNU project and being maintained for many years. Its not the obvious choice when being used on a small or resource constrained device, but, on this recipe I was able to split it into three different packages to fit different needs for those who decide to use it, the emacs-minimal package would install a working emacs requiring around 2 MB of storage space, the emacs-base package includes some themes, syntax highlighting for some of the most used programming languages, as well as some extra functionality like a working shell, requiring less than 5 MB, which should work for a wide spectrum of workflows, and lasty, the emacs-full package contains the a fully working emacs using around 30 MB of space trading off size for functionality. This recipe also uses BBCLASSEXTEND=native to build some tools that emacs itself requires to build for target, but does not build a full native emacs since that is not necessary. Simply installing emacs will use the emacs-base package as default. Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/emacs/files')
-rw-r--r--meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch b/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch
new file mode 100644
index 0000000000..cc0b05c792
--- /dev/null
+++ b/meta-oe/recipes-support/emacs/files/usemake-docfile-native.patch
@@ -0,0 +1,85 @@
1Upstream-Status: Inappropriate [OE-Specific]
2
3When building emacs, it builds some tools for the HOST
4that are then used to build for target, such as
5make-fingerprint and make-docfile, this needs to be
6adapted to be used by bitbake, otherwise the compiled
7executables arent compatible with the HOST.
8
9Use the above mentioned tools provided by the native
10version of the recipe instead.
11
12Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
13
14Index: emacs-27.1/src/Makefile.in
15===================================================================
16--- emacs-27.1.orig/src/Makefile.in
17+++ emacs-27.1/src/Makefile.in
18@@ -472,7 +472,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@@ -566,8 +566,7 @@ ${lispintdir}/characters.elc: ${charscri
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 ($(DUMPING),unexec)
36 LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump
37@@ -596,15 +595,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@@ -622,8 +621,8 @@ am__v_GLOBALS_ = $(am__v_GLOBALS_@AM_DEF
58 am__v_GLOBALS_0 = @echo " GEN " globals.h;
59 am__v_GLOBALS_1 =
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@@ -637,7 +636,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@@ -647,7 +646,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) $(MAKE_PDUMPER_FINGERPRINT)
82+ $(charsets) $(charscript)
83 $(AM_V_CCLD)$(CC) -o $@.tmp \
84 $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
85 $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)