diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-07-30 23:50:44 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-07-31 00:14:55 +0200 |
commit | f2afdd2b988af8d0b4d822c7c03529b725fe24ba (patch) | |
tree | c7cce0991bad7077ae56b10030ee617693808f26 /meta-oe/recipes-support/emacs | |
parent | 2fba7222716ba4e9782ebc6e5077f99669bf69b3 (diff) | |
download | meta-openembedded-f2afdd2b988af8d0b4d822c7c03529b725fe24ba.tar.gz |
emacs: import from meta-smartphone
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/emacs')
5 files changed, 223 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/emacs/emacs-23.1/configure.in.lost.backslashes.patch b/meta-oe/recipes-support/emacs/emacs-23.1/configure.in.lost.backslashes.patch new file mode 100644 index 000000000..2d29f17e5 --- /dev/null +++ b/meta-oe/recipes-support/emacs/emacs-23.1/configure.in.lost.backslashes.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | pending upstream, fixed in 23.2 | ||
2 | http://debbugs.gnu.org/cgi-bin/bugreport.cgi?bug=5047 | ||
3 | https://bugzilla.redhat.com/show_bug.cgi?id=540921 | ||
4 | diff -up emacs-23.1/configure.in.cpp emacs-23.1/configure.in | ||
5 | --- emacs-23.1/configure.in.cpp 2009-11-30 13:24:53.000000000 +0100 | ||
6 | +++ emacs-23.1/configure.in 2009-11-30 13:25:45.000000000 +0100 | ||
7 | @@ -2983,7 +2983,7 @@ echo creating lib-src/Makefile | ||
8 | sed -e '1,/start of cpp stuff/d'\ | ||
9 | -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ | ||
10 | < Makefile.c > junk.c | ||
11 | - $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ | ||
12 | + $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ | ||
13 | sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c | ||
14 | cat junk1.c junk2.c > Makefile.new | ||
15 | rm -f junk.c junk1.c junk2.c | ||
16 | @@ -2999,7 +2999,7 @@ echo creating src/Makefile | ||
17 | sed -e '1,/start of cpp stuff/d'\ | ||
18 | -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ | ||
19 | < Makefile.c > junk.c | ||
20 | - $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ | ||
21 | + $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ | ||
22 | sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c | ||
23 | cat junk1.c junk2.c > Makefile.new | ||
24 | rm -f junk.c junk1.c junk2.c | ||
diff --git a/meta-oe/recipes-support/emacs/emacs-23.1/nostdlib-unwind.patch b/meta-oe/recipes-support/emacs/emacs-23.1/nostdlib-unwind.patch new file mode 100644 index 000000000..4200301a3 --- /dev/null +++ b/meta-oe/recipes-support/emacs/emacs-23.1/nostdlib-unwind.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Fix linking problem: | ||
2 | undefined reference to `__aeabi_unwind_cpp_pr0' | ||
3 | undefined reference to `__aeabi_unwind_cpp_pr1' | ||
4 | Index: emacs/src/Makefile.in | ||
5 | =================================================================== | ||
6 | --- emacs.orig/src/Makefile.in 2008-08-16 14:20:18.000000000 +0000 | ||
7 | +++ emacs/src/Makefile.in 2008-08-16 14:51:25.000000000 +0000 | ||
8 | @@ -443,7 +443,7 @@ | ||
9 | ask GCC explicitly where to find libgcc.a. */ | ||
10 | |||
11 | #ifndef LINKER | ||
12 | -#define LINKER $(CC) -nostdlib | ||
13 | +#define LINKER $(CC) -nostdlib -lgcc_s | ||
14 | #endif | ||
15 | |||
16 | #ifndef LIB_GCC | ||
diff --git a/meta-oe/recipes-support/emacs/emacs-23.1/use-qemu.patch b/meta-oe/recipes-support/emacs/emacs-23.1/use-qemu.patch new file mode 100644 index 000000000..255b07fc9 --- /dev/null +++ b/meta-oe/recipes-support/emacs/emacs-23.1/use-qemu.patch | |||
@@ -0,0 +1,107 @@ | |||
1 | Index: emacs-23.1/leim/Makefile.in | ||
2 | =================================================================== | ||
3 | --- emacs-23.1.orig/leim/Makefile.in | ||
4 | +++ emacs-23.1/leim/Makefile.in | ||
5 | @@ -51,7 +51,7 @@ buildlisppath=${srcdir}/${dot}${dot}/lis | ||
6 | |||
7 | # How to run Emacs. | ||
8 | RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \ | ||
9 | - ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte | ||
10 | + ${QEMU} ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte | ||
11 | |||
12 | # Subdirectories to be made if ${srcdir} is different from the current | ||
13 | # directory. | ||
14 | Index: emacs-23.1/lib-src/Makefile.in | ||
15 | =================================================================== | ||
16 | --- emacs-23.1.orig/lib-src/Makefile.in | ||
17 | +++ emacs-23.1/lib-src/Makefile.in | ||
18 | @@ -23,7 +23,7 @@ | ||
19 | SHELL = /bin/sh | ||
20 | |||
21 | # Following ../lisp/Makefile.in. | ||
22 | -EMACS = ../src/emacs | ||
23 | +EMACS = ${QEMU} ../src/emacs | ||
24 | EMACSOPT = -batch --no-site-file --multibyte | ||
25 | |||
26 | # ==================== Things `configure' will edit ==================== | ||
27 | @@ -371,7 +371,7 @@ TAGS: etags${EXEEXT} | ||
28 | clobbered too. */ | ||
29 | test-distrib${EXEEXT}: ${srcdir}/test-distrib.c | ||
30 | $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c | ||
31 | - ./test-distrib ${srcdir}/testfile | ||
32 | + ${QEMU} ./test-distrib ${srcdir}/testfile | ||
33 | |||
34 | /* We need the following in order to create a <getopt.h> when the system | ||
35 | does not have one that works with the given compiler. */ | ||
36 | Index: emacs-23.1/lisp/Makefile.in | ||
37 | =================================================================== | ||
38 | --- emacs-23.1.orig/lisp/Makefile.in | ||
39 | +++ emacs-23.1/lisp/Makefile.in | ||
40 | @@ -26,8 +26,7 @@ srcdir=@srcdir@/.. | ||
41 | # You can specify a different executable on the make command line, | ||
42 | # e.g. "make EMACS=../src/emacs ...". | ||
43 | |||
44 | -EMACS = ../src/emacs | ||
45 | - | ||
46 | +EMACS = "${QEMU} ../src/emacs" | ||
47 | # Command line flags for Emacs. This must include --multibyte, | ||
48 | # otherwise some files will not compile. | ||
49 | |||
50 | Index: emacs-23.1/Makefile.in | ||
51 | =================================================================== | ||
52 | --- emacs-23.1.orig/Makefile.in | ||
53 | +++ emacs-23.1/Makefile.in | ||
54 | @@ -336,7 +336,7 @@ lib-src lisp: Makefile FRC | ||
55 | # all preloaded elisp files, and only then dump the actual src/emacs, which | ||
56 | # is not wrong, but is overkill in 99.99% of the cases. | ||
57 | src: Makefile FRC | ||
58 | - boot=bootstrap-emacs$(EXEEXT); \ | ||
59 | + boot=${QEMU} bootstrap-emacs$(EXEEXT); \ | ||
60 | if [ ! -x "src/$$boot" ]; then \ | ||
61 | cd $@; $(MAKE) all $(MFLAGS) \ | ||
62 | CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ | ||
63 | Index: emacs-23.1/src/Makefile.in | ||
64 | =================================================================== | ||
65 | --- emacs-23.1.orig/src/Makefile.in | ||
66 | +++ emacs-23.1/src/Makefile.in | ||
67 | @@ -497,7 +497,7 @@ | ||
68 | this with the shell''s ``for'' construct. | ||
69 | Note that some people do not have '.' in their paths, so we must | ||
70 | use ./prefix-args. */ | ||
71 | -#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` | ||
72 | +#define YMF_PASS_LDFLAGS(flags) `${QEMU} ./prefix-args -Xlinker flags` | ||
73 | #else | ||
74 | #define YMF_PASS_LDFLAGS(flags) flags | ||
75 | #endif | ||
76 | @@ -895,9 +895,9 @@ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(L | ||
77 | #endif | ||
78 | |||
79 | #ifdef HAVE_SHM | ||
80 | -RUN_TEMACS = `/bin/pwd`/temacs -nl | ||
81 | +RUN_TEMACS = ${QEMU} temacs -nl | ||
82 | #else | ||
83 | -RUN_TEMACS = `/bin/pwd`/temacs | ||
84 | +RUN_TEMACS = ${QEMU} temacs | ||
85 | #endif | ||
86 | |||
87 | all: emacs${EXEEXT} OTHER_FILES | ||
88 | @@ -912,7 +912,7 @@ emacs${EXEEXT}: temacs${EXEEXT} ${etc}DO | ||
89 | @: bootstrap-emacs, so let us replace it. | ||
90 | -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} | ||
91 | #endif /* ! defined (CANNOT_DUMP) */ | ||
92 | - -./emacs -q -batch -f list-load-path-shadows | ||
93 | + -${QEMU} ./emacs -q -batch -f list-load-path-shadows | ||
94 | |||
95 | /* We run make-docfile twice because the command line may get too long | ||
96 | on some systems. */ | ||
97 | @@ -929,8 +929,8 @@ emacs${EXEEXT}: temacs${EXEEXT} ${etc}DO | ||
98 | only in order to reduce the command line length. --Stef */ | ||
99 | ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${lisp} ${SOME_MACHINE_LISP} | ||
100 | -rm -f ${etc}DOC | ||
101 | - ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC | ||
102 | - ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp} | ||
103 | + ${QEMU}${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC | ||
104 | + ${QEMU} ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp} | ||
105 | |||
106 | ${libsrc}make-docfile${EXEEXT}: | ||
107 | cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT} | ||
diff --git a/meta-oe/recipes-support/emacs/emacs.inc b/meta-oe/recipes-support/emacs/emacs.inc new file mode 100644 index 000000000..588371999 --- /dev/null +++ b/meta-oe/recipes-support/emacs/emacs.inc | |||
@@ -0,0 +1,68 @@ | |||
1 | DESCRIPTION = "Emacs" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/emacs/" | ||
3 | LICENSE = "GPLv3" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
5 | SECTION = "editor" | ||
6 | # and it needs to run some generated binaries.. | ||
7 | DEPENDS += "qemu-native" | ||
8 | |||
9 | DEPENDS +=" liblockfile" | ||
10 | |||
11 | X11DEPENDS = "gtk+ libungif dbus" | ||
12 | |||
13 | EXTRA_OECONF = "--without-sound " | ||
14 | |||
15 | PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
16 | PACKAGECONFIG[x11] = "--with-x-toolkit=gtk,--without-x,${X11DEPENDS}" | ||
17 | |||
18 | inherit autotools | ||
19 | |||
20 | PACKAGES =+ "${PN}-el" | ||
21 | |||
22 | FILES_${PN}-el = "${datadir}/emacs/*/*/*.el.gz \ | ||
23 | ${datadir}/emacs/*/*/*/*.el.gz" | ||
24 | |||
25 | FILES_${PN} += "${datadir}/emacs" | ||
26 | |||
27 | FILES_${PN}-dbg += "${libexecdir}/emacs/*/*/.debug ${datadir}/emacs/*/*/.debug" | ||
28 | |||
29 | TREEDIR = "${WORKDIR}/qemu-treedir" | ||
30 | |||
31 | QEMUARCH= "${TARGET_ARCH}" | ||
32 | QEMUARCH_i486 = "i386" | ||
33 | QEMUARCH_i586 = "i386" | ||
34 | QEMUARCH_i686 = "i386" | ||
35 | |||
36 | # Large stack is required at least on x86_64 host, otherwise random segfaults appear: | ||
37 | QEMU = "qemu-${QEMUARCH} ${QEMU_OPTIONS} -s 1048576 -L ${TREEDIR} " | ||
38 | |||
39 | export LOGNAME = "$(whoami)" | ||
40 | |||
41 | do_compile_prepend() { | ||
42 | sed -i ':1;s:\(START.* \|LIB_STANDARD.* \|LIBES.* \)/usr/lib:\1${STAGING_LIBDIR}:;t1' ${S}/src/s/gnu-linux.h `find "${S}" -name Makefile` | ||
43 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${TOOLCHAIN_PATH}/${TARGET_SYS}/lib" | ||
44 | # Ugly hack, see files/use-qemu.patch for more: | ||
45 | ln -sf ../src/emacs lisp/emacs | ||
46 | ln -sf ../src/emacs lib-src/emacs | ||
47 | ln -sf ../src/emacs leim/emacs | ||
48 | #copy STAGING_DIR_TARGET and libgcc_s.so* to WORKDIR/qemu-treedir #copied code from glibc-package.bbclass | ||
49 | treedir=${TREEDIR} | ||
50 | if [ -e $treedir ];then | ||
51 | rm -rf $treedir | ||
52 | fi | ||
53 | mkdir $treedir | ||
54 | cp -pPR ${STAGING_DIR_TARGET}/* $treedir | ||
55 | if [ -f ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/libgcc_s.so ]; then | ||
56 | cp -pPR ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib | ||
57 | fi | ||
58 | if [ -f ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then | ||
59 | cp -pPR ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib | ||
60 | fi | ||
61 | # stupid hack, but without it, it tries to use /usr/lib/libc.so from host and fails | ||
62 | # temacs: error while loading shared libraries: /usr/lib/libc.so: ELF file version does not match current one | ||
63 | if [ ! -f $treedir/lib/libc.so ]; then | ||
64 | ln -s libc.so.6 $treedir/lib/libc.so | ||
65 | fi | ||
66 | } | ||
67 | |||
68 | EXTRA_OEMAKE += 'QEMU="${QEMU}"' | ||
diff --git a/meta-oe/recipes-support/emacs/emacs_23.1.bb b/meta-oe/recipes-support/emacs/emacs_23.1.bb new file mode 100644 index 000000000..fe134f805 --- /dev/null +++ b/meta-oe/recipes-support/emacs/emacs_23.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require emacs.inc | ||
2 | |||
3 | SRC_URI = "${GNU_MIRROR}/emacs/emacs-${PV}.tar.gz;name=tarball \ | ||
4 | file://use-qemu.patch \ | ||
5 | file://nostdlib-unwind.patch \ | ||
6 | file://configure.in.lost.backslashes.patch" | ||
7 | SRC_URI[tarball.md5sum] = "a620d4452769d04ad8864d662f34f8dd" | ||
8 | SRC_URI[tarball.sha256sum] = "a94cd46301f000d2d1dcd3fd7ef08ad952846d01ca5d4168b4ec3e38e857da47" | ||