From c74b6d441614606bf397bc97a9d39e9699d4fd20 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 23 Mar 2015 16:02:23 +0100 Subject: [PATCH] New package: qemacs-0.4.0.20140809 --- .../patches/qemacs-0.4.0dev-utf8-tty.patch | 31 ++++++++++++++++++ srcpkgs/qemacs/template | 32 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 srcpkgs/qemacs/patches/qemacs-0.4.0dev-utf8-tty.patch create mode 100644 srcpkgs/qemacs/template diff --git a/srcpkgs/qemacs/patches/qemacs-0.4.0dev-utf8-tty.patch b/srcpkgs/qemacs/patches/qemacs-0.4.0dev-utf8-tty.patch new file mode 100644 index 00000000000..7281f6d6fe1 --- /dev/null +++ b/srcpkgs/qemacs/patches/qemacs-0.4.0dev-utf8-tty.patch @@ -0,0 +1,31 @@ +diff --git tty.c tty.c +index bff0a97..21287a4 100644 +--- tty.c ++++ tty.c +@@ -95,7 +95,6 @@ typedef struct TTYState { + /* input handling */ + enum InputState input_state; + int input_param; +- int utf8_state; + int utf8_index; + unsigned char buf[10]; + char *term_name; +@@ -413,12 +412,14 @@ static void tty_read_handler(void *opaque) + + /* charset handling */ + if (s->charset == &charset_utf8) { +- if (ts->utf8_state == 0) { +- const char *p = cs8(ts->buf); ++ /* Make sure utf8 input works correctly 20040314 */ ++ ts->utf8_index++; ++ if (utf8_length[ts->buf[0]] == ts->utf8_index) { ++ const char *p; ++ p = (const char *)ts->buf; + ch = utf8_decode(&p); +- } else { +- ts->utf8_state = utf8_length[ts->buf[0]] - 1; + ts->utf8_index = 0; ++ } else { + return; + } + } else { diff --git a/srcpkgs/qemacs/template b/srcpkgs/qemacs/template new file mode 100644 index 00000000000..4ae7e56b481 --- /dev/null +++ b/srcpkgs/qemacs/template @@ -0,0 +1,32 @@ +# Template file for 'qemacs' +pkgname=qemacs +version=0.4.0.20140809 +revision=1 +wrksrc="${pkgname}" +build_style=configure +configure_args="--prefix=/usr --mandir=/usr/share/man + --disable-x11 --disable-plugins" +hostmakedepends="cvs" +short_desc="Small but powerful Emacs clone (feat. UTF-8, HTML, shell, dired)" +maintainer="Christian Neukirchen " +license="LGPL-2.1" +homepage="http://bellard.org/qemacs/" + +do_fetch() { + cvs -d :pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemacs \ + co -D ${version##*.} qemacs +} + +do_build() { + sed -i -e /HOST_CC/s/CFLAGS/HOST_CFLAGS/ -e /INSTALL/s/-s// \ + Makefile */Makefile + echo CONFIG_HTML=yes >>config.mak + make V=1 TARGETS=qe STRIP=echo CC="$CC" \ + CFLAGS="$CFLAGS -funsigned-char -Ilibqhtml -I.." \ + LDFLAGS="$LDFLAGS" +} + +do_install() { + make TARGETS=qe DESTDIR="$DESTDIR" CONFIG_HTML= install + vdoc qe-doc.html +}