[oe] [PATCH v2] emacs: Add emacs 23.2

Sean Cross sean at chumby.com
Fri Nov 19 06:14:51 UTC 2010


Emacs 23.2 is the first version that cleanly builds with gcc-4.5.  This patch adds support for Emacs 23.2.

---
 recipes/emacs/emacs_23.2.bb                  |   12 +++
 recipes/emacs/files/emacs23.2-use-qemu.patch |  102 ++++++++++++++++++++++++++
 2 files changed, 114 insertions(+), 0 deletions(-)
 create mode 100644 recipes/emacs/emacs_23.2.bb
 create mode 100644 recipes/emacs/files/emacs23.2-use-qemu.patch

diff --git a/recipes/emacs/emacs_23.2.bb b/recipes/emacs/emacs_23.2.bb
new file mode 100644
index 0000000..2fbb793
--- /dev/null
+++ b/recipes/emacs/emacs_23.2.bb
@@ -0,0 +1,12 @@
+require emacs.inc
+
+EXTRA_OECONF = "--without-sound --without-x"
+
+SRC_URI = "${GNU_MIRROR}/emacs/emacs-${PV}.tar.gz;name=tarball \
+	   file://emacs23.2-use-qemu.patch \
+	   file://nostdlib-unwind.patch"
+SRC_URI[tarball.md5sum] = "b6691852dae0bc142b3c12749f6b7ade"
+SRC_URI[tarball.sha256sum] = "1617b8289e403bc6345f8fcc4b3ec01755962cf8842b505d971efe08c9bf7919"
+
+
+S = "${WORKDIR}/emacs-${PV}"
diff --git a/recipes/emacs/files/emacs23.2-use-qemu.patch b/recipes/emacs/files/emacs23.2-use-qemu.patch
new file mode 100644
index 0000000..2c3c195
--- /dev/null
+++ b/recipes/emacs/files/emacs23.2-use-qemu.patch
@@ -0,0 +1,102 @@
+diff -ur emacs-23.2-stock/Makefile.in emacs-23.2/Makefile.in
+--- emacs-23.2-stock/Makefile.in	2010-11-19 02:52:08.102072074 +0000
++++ emacs-23.2/Makefile.in	2010-11-19 02:52:15.282048950 +0000
+@@ -336,7 +336,7 @@
+ # all preloaded elisp files, and only then dump the actual src/emacs, which
+ # is not wrong, but is overkill in 99.99% of the cases.
+ src: Makefile FRC
+-	boot=bootstrap-emacs$(EXEEXT);                         \
++	boot=${QEMU} bootstrap-emacs$(EXEEXT);                         \
+ 	if [ ! -x "src/$$boot" ]; then                                     \
+ 	    cd $@; $(MAKE) all $(MFLAGS)                                   \
+ 	      CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}'         \
+diff -ur emacs-23.2-stock/leim/Makefile.in emacs-23.2/leim/Makefile.in
+--- emacs-23.2-stock/leim/Makefile.in	2010-11-19 02:52:08.202082146 +0000
++++ emacs-23.2/leim/Makefile.in	2010-11-19 02:52:15.282048950 +0000
+@@ -51,7 +51,7 @@
+ 
+ # How to run Emacs.
+ RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
+-	${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte
++	${QEMU} ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte
+ 
+ # Subdirectories to be made if ${srcdir} is different from the current
+ # directory.
+diff -ur emacs-23.2-stock/lib-src/Makefile.in emacs-23.2/lib-src/Makefile.in
+--- emacs-23.2-stock/lib-src/Makefile.in	2010-11-19 02:52:08.082052237 +0000
++++ emacs-23.2/lib-src/Makefile.in	2010-11-19 02:52:15.282048950 +0000
+@@ -23,7 +23,7 @@
+ SHELL = /bin/sh
+ 
+ # Following ../lisp/Makefile.in.
+-EMACS = ../src/emacs
++EMACS = ${QEMU} ../src/emacs
+ EMACSOPT = -batch --no-site-file --multibyte
+ 
+ # ==================== Things `configure' will edit ====================
+@@ -372,7 +372,7 @@
+    clobbered too.  */
+ test-distrib${EXEEXT}: ${srcdir}/test-distrib.c
+ 	$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
+-	./test-distrib ${srcdir}/testfile
++	${QEMU} ./test-distrib ${srcdir}/testfile
+ 
+ /* We need the following in order to create a <getopt.h> when the system
+    does not have one that works with the given compiler.  */
+diff -ur emacs-23.2-stock/lisp/Makefile.in emacs-23.2/lisp/Makefile.in
+--- emacs-23.2-stock/lisp/Makefile.in	2010-11-19 02:52:07.922057070 +0000
++++ emacs-23.2/lisp/Makefile.in	2010-11-19 02:52:15.282048950 +0000
+@@ -26,8 +26,7 @@
+ # You can specify a different executable on the make command line,
+ # e.g. "make EMACS=../src/emacs ...".
+ 
+-EMACS = ../src/emacs
+-
++EMACS = "${QEMU} ../src/emacs"
+ # Command line flags for Emacs.  This must include --multibyte,
+ # otherwise some files will not compile.
+ 
+diff -ur emacs-23.2-stock/src/Makefile.in emacs-23.2/src/Makefile.in
+--- emacs-23.2-stock/src/Makefile.in	2010-11-19 02:52:08.182079361 +0000
++++ emacs-23.2/src/Makefile.in	2010-11-19 02:55:09.762049503 +0000
+@@ -479,7 +479,7 @@
+    this with the shell''s ``for'' construct.
+    Note that some people do not have '.'  in their paths, so we must
+    use ./prefix-args.  */
+-#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
++#define YMF_PASS_LDFLAGS(flags) `${QEMU} ./prefix-args -Xlinker flags`
+ #else
+ #define YMF_PASS_LDFLAGS(flags) flags
+ #endif
+@@ -916,9 +916,9 @@
+    $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
+ 
+ #ifdef HAVE_SHM
+-RUN_TEMACS = `/bin/pwd`/temacs -nl
++RUN_TEMACS = ${QEMU} temacs -nl
+ #else
+-RUN_TEMACS = `/bin/pwd`/temacs
++RUN_TEMACS = ${QEMU} temacs
+ #endif
+ 
+ all: emacs${EXEEXT} $(OTHER_FILES)
+@@ -933,7 +933,7 @@
+ 	@: This new Emacs is as functional and more efficient then
+ 	@: bootstrap-emacs, so let us replace it.
+ 	-ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
+-	-./emacs -q -batch -f list-load-path-shadows
++	-${QEMU} ./emacs -q -batch -f list-load-path-shadows
+ #endif /* ! defined (CANNOT_DUMP) */
+ 
+ /* We run make-docfile twice because the command line may get too long
+@@ -951,8 +951,8 @@
+    only in order to reduce the command line length.  --Stef  */
+ ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${lisp} ${SOME_MACHINE_LISP}
+ 	-rm -f ${etc}DOC
+-	${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
+-	${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
++	${QEMU}${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
++	${QEMU} ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
+ 
+ ${libsrc}make-docfile${EXEEXT}:
+ 	cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
-- 
1.7.0.4





More information about the Openembedded-devel mailing list