summaryrefslogtreecommitdiff
path: root/recipes/emacs
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/emacs
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/emacs')
-rw-r--r--recipes/emacs/emacs-22.3/use-qemu.patch93
-rw-r--r--recipes/emacs/emacs-x11_20060801.bb5
-rw-r--r--recipes/emacs/emacs-x11_22.3.bb15
-rw-r--r--recipes/emacs/emacs-x11_cvs.bb8
-rw-r--r--recipes/emacs/emacs.inc31
-rw-r--r--recipes/emacs/emacs_20060801.bb3
-rw-r--r--recipes/emacs/emacs_22.3.bb9
-rw-r--r--recipes/emacs/emacs_cvs.bb52
-rw-r--r--recipes/emacs/files/nostdlib-unwind.patch16
-rw-r--r--recipes/emacs/files/use-qemu.patch80
10 files changed, 312 insertions, 0 deletions
diff --git a/recipes/emacs/emacs-22.3/use-qemu.patch b/recipes/emacs/emacs-22.3/use-qemu.patch
new file mode 100644
index 0000000000..3b85dc36fb
--- /dev/null
+++ b/recipes/emacs/emacs-22.3/use-qemu.patch
@@ -0,0 +1,93 @@
+Warning: When editing the patch, see the ugly hack (removal of pwd) when calling temacs and emacs.
+For unknown reason, qemu-arm is not able to recognize binary correctly.
+
+Index: emacs-22.3/lib-src/Makefile.in
+===================================================================
+--- emacs-22.3.orig/lib-src/Makefile.in 2008-04-24 05:38:12.000000000 +0000
++++ emacs-22.3/lib-src/Makefile.in 2008-11-21 15:51:14.000000000 +0000
+@@ -24,7 +24,7 @@
+ SHELL = /bin/sh
+
+ # Following ../lisp/Makefile.in.
+-EMACS = ../src/emacs
++EMACS = ${QEMU} emacs
+ EMACSOPT = -batch --no-site-file --multibyte
+
+ # ==================== Things `configure' will edit ====================
+@@ -388,7 +388,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
+ doesn't have one that works with the given compiler. */
+Index: emacs-22.3/lisp/Makefile.in
+===================================================================
+--- emacs-22.3.orig/lisp/Makefile.in 2008-08-12 18:35:42.000000000 +0000
++++ emacs-22.3/lisp/Makefile.in 2008-11-21 15:54:38.000000000 +0000
+@@ -63,7 +63,7 @@
+
+ # The actual Emacs command run in the targets below.
+
+-emacs = EMACSLOADPATH=$(lisp) $(EMACS) $(EMACSOPT)
++emacs = EMACSLOADPATH=$(lisp) ${QEMU} emacs $(EMACSOPT)
+
+ # Common command to find subdirectories
+
+Index: emacs-22.3/src/Makefile.in
+===================================================================
+--- emacs-22.3.orig/src/Makefile.in 2008-07-11 08:52:53.000000000 +0000
++++ emacs-22.3/src/Makefile.in 2008-11-21 15:52:09.000000000 +0000
+@@ -497,7 +497,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
+@@ -949,7 +949,7 @@
+ #define OBJECTS_MACHINE
+ #endif
+
+-RUN_TEMACS = ./temacs
++RUN_TEMACS = ${QEMU} temacs
+
+ all: emacs${EXEEXT} OTHER_FILES
+
+@@ -964,7 +964,7 @@
+ LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
+ #endif /* ! defined (HAVE_SHM) */
+ #endif /* ! defined (CANNOT_DUMP) */
+- -./emacs -q -batch -f list-load-path-shadows
++ -${QEMU} emacs -q -batch -f list-load-path-shadows
+
+ /* We run make-docfile twice because the command line may get too long
+ on some systems. */
+@@ -976,8 +976,8 @@
+ Likewise for ${SOME_MACHINE_LISP}. */
+ ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${shortlisp} ${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}
+Index: emacs-22.3/leim/Makefile.in
+===================================================================
+--- emacs-22.3.orig/leim/Makefile.in 2008-01-07 08:09:43.000000000 +0000
++++ emacs-22.3/leim/Makefile.in 2008-11-21 15:52:50.000000000 +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} emacs -batch --no-init-file --no-site-file --multibyte
+
+ # Subdirectories to be made if ${srcdir} is different from the current
+ # directory.
diff --git a/recipes/emacs/emacs-x11_20060801.bb b/recipes/emacs/emacs-x11_20060801.bb
new file mode 100644
index 0000000000..a6ed4e73f9
--- /dev/null
+++ b/recipes/emacs/emacs-x11_20060801.bb
@@ -0,0 +1,5 @@
+require emacs-x11_cvs.bb
+
+SRCDATE = "20060801"
+
+DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/emacs/emacs-x11_22.3.bb b/recipes/emacs/emacs-x11_22.3.bb
new file mode 100644
index 0000000000..03102bf58a
--- /dev/null
+++ b/recipes/emacs/emacs-x11_22.3.bb
@@ -0,0 +1,15 @@
+require emacs.inc
+
+# full X (non-diet) is needed for X support
+DEPENDS += "gtk+ libungif"
+
+EXTRA_OECONF = "--without-sound --with-x-toolkit=gtk"
+
+RREPLACES = "emacs"
+
+FILESPATH = "${FILE_DIRNAME}/emacs-${PV}:${FILE_DIRNAME}/files"
+SRC_URI = "${GNU_MIRROR}/emacs/emacs-${PV}.tar.gz \
+ file://use-qemu.patch;patch=1 \
+ file://nostdlib-unwind.patch;patch=1"
+
+S = "${WORKDIR}/emacs-${PV}"
diff --git a/recipes/emacs/emacs-x11_cvs.bb b/recipes/emacs/emacs-x11_cvs.bb
new file mode 100644
index 0000000000..809176a3c3
--- /dev/null
+++ b/recipes/emacs/emacs-x11_cvs.bb
@@ -0,0 +1,8 @@
+require emacs_cvs.bb
+
+# full X (non-diet) is needed for X support
+DEPENDS += "libx11"
+
+EXTRA_OECONF = "--without-sound"
+
+RREPLACES = "emacs"
diff --git a/recipes/emacs/emacs.inc b/recipes/emacs/emacs.inc
new file mode 100644
index 0000000000..05acd828dc
--- /dev/null
+++ b/recipes/emacs/emacs.inc
@@ -0,0 +1,31 @@
+DESCRIPTION = "Emacs"
+HOMEPAGE = "http://www.gnu.org/software/emacs/"
+LICENSE = "GPLv2"
+SECTION = "editor"
+# and it needs to run some generated binaries..
+DEPENDS += "qemu-native"
+
+inherit autotools
+
+PACKAGES =+ "${PN}-el"
+
+FILES_${PN}-el = "${datadir}/emacs/*/*/*.el.gz \
+ ${datadir}/emacs/*/*/*/*.el.gz"
+
+FILES_${PN} += "${datadir}/emacs"
+
+FILES_${PN}-dbg += "${libexecdir}/emacs/*/*/.debug ${datadir}/emacs/*/*/.debug"
+
+# Large stack is required at least on x86_64 host, otherwise random segfaults appear:
+QEMU = "qemu-${TARGET_ARCH} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET}"
+
+do_compile_prepend() {
+ sed -i ':1;s:\(START.* \|LIB_STANDARD.* \|LIBES.* \)/usr/lib:\1${STAGING_LIBDIR}:;t1' ${S}/src/s/gnu-linux.h `find "${S}" -name Makefile`
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${CROSS_DIR}/${TARGET_SYS}/lib"
+# Ugly hack, see files/use-qemu.patch for more:
+ ln -sf ../src/emacs lisp/emacs
+ ln -sf ../src/emacs lib-src/emacs
+ ln -sf ../src/emacs leim/emacs
+}
+
+EXTRA_OEMAKE += 'QEMU="${QEMU}"'
diff --git a/recipes/emacs/emacs_20060801.bb b/recipes/emacs/emacs_20060801.bb
new file mode 100644
index 0000000000..fe472b4c5a
--- /dev/null
+++ b/recipes/emacs/emacs_20060801.bb
@@ -0,0 +1,3 @@
+require emacs_cvs.bb
+SRCDATE = "20060801"
+DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/emacs/emacs_22.3.bb b/recipes/emacs/emacs_22.3.bb
new file mode 100644
index 0000000000..da8de39eec
--- /dev/null
+++ b/recipes/emacs/emacs_22.3.bb
@@ -0,0 +1,9 @@
+require emacs.inc
+
+EXTRA_OECONF = "--without-sound --without-x"
+
+SRC_URI = "${GNU_MIRROR}/emacs/emacs-${PV}.tar.gz \
+ file://use-qemu.patch;patch=1 \
+ file://nostdlib-unwind.patch;patch=1"
+
+S = "${WORKDIR}/emacs-${PV}"
diff --git a/recipes/emacs/emacs_cvs.bb b/recipes/emacs/emacs_cvs.bb
new file mode 100644
index 0000000000..4a406d6516
--- /dev/null
+++ b/recipes/emacs/emacs_cvs.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "Emacs"
+HOMEPAGE = "http://www.gnu.org/software/emacs/"
+LICENSE = "GPLv2"
+SECTION = "editor"
+# and it needs to run some generated binaries..
+DEPENDS += "qemu-native"
+#NOTE: I have found that this only works with qemu-0.8.0. If I use 0.8.1 or 0.8.2
+# the build gets hung up on compiling certain .el files
+
+PV = "22.0.50+cvs${SRCDATE}"
+PE = "1"
+PR = "r9"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "cvs://anoncvs:anonymous@cvs.savannah.gnu.org/sources/emacs;module=emacs \
+ file://use-qemu.patch;patch=1"
+S = "${WORKDIR}/emacs"
+
+inherit autotools
+
+PACKAGES =+ "${PN}-el"
+
+FILES_${PN}-el = "${datadir}/emacs/*/*/*.el.gz \
+ ${datadir}/emacs/*/*/*/*.el.gz"
+
+FILES_${PN} += "${datadir}/emacs"
+
+QEMU = "qemu-${TARGET_ARCH} -L ${STAGING_DIR_TARGET}"
+LDFLAGS += "-L${CROSS_DIR}/${TARGET_SYS}/lib"
+
+EXTRA_OECONF = "--without-sound --without-x"
+
+do_bootstrap() {
+ cp "${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${S}"
+ export QEMU="${QEMU}"
+
+ sed -i 's:/usr/lib:${STAGING_LIBDIR}:g' ${S}/src/s/gnu-linux.h
+ find "${S}" -name Makefile | xargs sed -i 's:/usr/lib:${STAGING_LIBDIR}:g'
+
+ cd "${S}"
+ make bootstrap
+}
+
+addtask bootstrap before do_compile after do_configure
+
+do_compile_prepend() {
+ cp "${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${S}"
+ export QEMU="${QEMU}"
+}
diff --git a/recipes/emacs/files/nostdlib-unwind.patch b/recipes/emacs/files/nostdlib-unwind.patch
new file mode 100644
index 0000000000..4200301a3f
--- /dev/null
+++ b/recipes/emacs/files/nostdlib-unwind.patch
@@ -0,0 +1,16 @@
+Fix linking problem:
+undefined reference to `__aeabi_unwind_cpp_pr0'
+undefined reference to `__aeabi_unwind_cpp_pr1'
+Index: emacs/src/Makefile.in
+===================================================================
+--- emacs.orig/src/Makefile.in 2008-08-16 14:20:18.000000000 +0000
++++ emacs/src/Makefile.in 2008-08-16 14:51:25.000000000 +0000
+@@ -443,7 +443,7 @@
+ ask GCC explicitly where to find libgcc.a. */
+
+ #ifndef LINKER
+-#define LINKER $(CC) -nostdlib
++#define LINKER $(CC) -nostdlib -lgcc_s
+ #endif
+
+ #ifndef LIB_GCC
diff --git a/recipes/emacs/files/use-qemu.patch b/recipes/emacs/files/use-qemu.patch
new file mode 100644
index 0000000000..f27c926e3e
--- /dev/null
+++ b/recipes/emacs/files/use-qemu.patch
@@ -0,0 +1,80 @@
+diff -Nur emacs~/Makefile.in emacs/Makefile.in
+--- emacs~/Makefile.in 2006-07-25 09:45:48.000000000 -0700
++++ emacs/Makefile.in 2006-07-26 07:33:43.000000000 -0700
+@@ -782,7 +782,7 @@
+ bootstrap-build: FRC
+ (cd lisp; $(MAKE) $(MFLAGS) bootstrap-prepare)
+ (cd src; $(MAKE) $(MFLAGS) bootstrap)
+- (cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=../src/bootstrap-emacs${EXEEXT})
++ (cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS="${QEMU} ../src/bootstrap-emacs${EXEEXT}")
+ (cd src; $(MAKE) $(MFLAGS) mostlyclean)
+ $(MAKE) $(MFLAGS) all
+ (cd lisp; $(MAKE) $(MFLAGS) bootstrap-after)
+diff -Nur emacs~/leim/Makefile.in emacs/leim/Makefile.in
+--- emacs~/leim/Makefile.in 2006-07-25 09:45:53.000000000 -0700
++++ emacs/leim/Makefile.in 2006-07-26 07:30:53.000000000 -0700
+@@ -48,7 +48,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 -Nur emacs~/lib-src/Makefile.in emacs/lib-src/Makefile.in
+--- emacs~/lib-src/Makefile.in 2006-07-25 09:45:54.000000000 -0700
++++ emacs/lib-src/Makefile.in 2006-07-26 07:36:29.000000000 -0700
+@@ -380,7 +380,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
+ doesn't have one that works with the given compiler. */
+diff -Nur emacs~/lisp/Makefile.in emacs/lisp/Makefile.in
+--- emacs~/lisp/Makefile.in 2006-07-25 09:45:55.000000000 -0700
++++ emacs/lisp/Makefile.in 2006-07-26 14:09:59.000000000 -0700
+@@ -28,7 +28,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 -Nur emacs~/src/Makefile.in emacs/src/Makefile.in
+--- emacs~/src/Makefile.in 2006-07-25 09:46:16.000000000 -0700
++++ emacs/src/Makefile.in 2006-07-26 07:37:44.000000000 -0700
+@@ -491,7 +491,7 @@
+ this with the shell's `for' construct.
+ Note that some people don't 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
+@@ -943,7 +943,7 @@
+ #define OBJECTS_MACHINE
+ #endif
+
+-RUN_TEMACS = ./temacs
++RUN_TEMACS = ${QEMU} ./temacs
+
+ all: emacs${EXEEXT} OTHER_FILES
+
+@@ -970,8 +970,8 @@
+ Likewise for ${SOME_MACHINE_LISP}. */
+ ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${shortlisp} ${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}