1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-22 13:41:53 +02:00

jfbterm - J Framebuffer Terminal

JFBTERM takes advantages of framebuffer device and makes it able to display multilingual text on console
This commit is contained in:
kyak 2010-07-14 10:29:12 +04:00
parent bc9afd7b36
commit d3db1719d6
10 changed files with 271 additions and 0 deletions

86
jfbterm/Makefile Normal file
View File

@ -0,0 +1,86 @@
#
# kyak@freenode/#qi-hardware
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=jfbterm
PKG_VERSION:=0.4.7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://jaist.dl.sourceforge.jp/jfbterm/13501/
PKG_MD5SUM:=cb0b869bd1c21f0dd224b7fc40517680
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
define Package/jfbterm
SECTION:=utils
CATEGORY:=Utilities
TITLE:=J framebuffer terminal / Multilingual Enhancement
URL:=http://jfbterm.sourceforge.jp
SUBMENU:=terminal
DEPENDS:=libiconv
endef
define Package/jfbterm/description
JFBTERM takes advantages of framebuffer device and makes it
able to display multilingual text on console.
endef
TARGET_CFLAGS+= \
-I$(STAGING_DIR)/usr/lib/libiconv/include \
-I$(LINUX_DIR)/include
TARGET_LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv
MAKE_FLAGS += ACLOCAL=aclocal-1.10 AUTOMAKE="automake-1.10 -a"
#CONFIGURE_VARS += ac_cv_func_ioperm=no
#CONFIGURE_ARGS += \
--enable-vga16fb=no
#TARGET_CFLAGS += -Wall -g
#define Build/Configure
# $(call Build/Configure/Default, \
--enable-vga16fb=no, \
ac_cv_func_ioperm=no)
#endef
define Package/jfbterm/install
$(INSTALL_DIR) \
$(1)/usr/bin \
$(1)/etc \
$(1)/usr/share/fonts/jfbterm \
$(1)/usr/share/terminfo/j
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/jfbterm \
$(1)/usr/bin/jfbterm
$(INSTALL_DATA) \
./config/jfbterm.conf \
$(1)/etc/jfbterm.conf
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/fonts/* \
$(1)/usr/share/fonts/jfbterm
$(INSTALL_DATA) \
./fonts/* \
$(1)/usr/share/fonts/jfbterm
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/terminfo.jfbterm \
$(1)/usr/share/terminfo/j/jfbterm
endef
$(eval $(call BuildPackage,jfbterm))

View File

@ -0,0 +1,97 @@
###############################################################################
#
# jfbterm configuration file
#
###############################################################################
###############################################################################
#
# Genral configuration
#
###############################################################################
# TERM environment variable (default: TERM=jfbterm)
term : xterm-color
###############################################################################
#
# Font configuration
# Absolute path or relative path to PWD
#
###############################################################################
#fontset : iso646-1973irv,pcf,L,/usr/share/fonts/jfbterm/8x16.pcf.gz
#+fontset: ansix3.4-1968,alias,L,iso646-1973irv
#+fontset: jisc6226-1978,pcf,L,/usr/share/fonts/jfbterm/jiskan16.pcf.gz
#+fontset: jisx0208-1983,alias,L,jisc6226-1978
#+fontset: jisc6220-1969roman,pcf,L,/usr/share/fonts/jfbterm/a18rk.pcf.gz
#+fontset: jisc6220-1969kana,alias,R,jisc6220-1969roman
#+fontset: jisx0212-1990,pcf,L,/usr/share/fonts/jfbterm/jksp16.pcf.gz
#+fontset: gb2312-80,pcf,L,/usr/share/fonts/jfbterm/gb16fs.pcf.gz
#+fontset: ksc5601-1987,pcf,L,/usr/share/fonts/jfbterm/hanglg16.pcf.gz
#+fontset: iso8859.1-1987,pcf,R,/usr/share/fonts/jfbterm/8x16.pcf.gz
#+fontset: iso8859.2-1987,pcf,R,/usr/share/fonts/jfbterm/lt2-16-etl.pcf.gz
#+fontset: iso8859.3-1988,pcf,R,/usr/share/fonts/jfbterm/lt3-16-etl.pcf.gz
#+fontset: iso8859.4-1988,pcf,R,/usr/share/fonts/jfbterm/lt4-16-etl.pcf.gz
#+fontset: iso8859.5-1988,pcf,R,/usr/share/fonts/jfbterm/cyr16-etl.pcf.gz
#+fontset: iso8859.7-1987,pcf,R,/usr/share/fonts/jfbterm/grk16-etl.pcf.gz
#+fontset: iso8859.8-1988,pcf,R,/usr/share/fonts/jfbterm/heb16-etl.pcf.gz
#+fontset: iso8859.9-1989,pcf,R,/usr/share/fonts/jfbterm/lt5-16-etl.pcf.gz
#+fontset: iso8859.10-1992,pcf,R,/usr/share/fonts/jfbterm/8x13-ISO8859-10.pcf.gz
#+fontset: iso8859.13-1998,pcf,R,/usr/share/fonts/jfbterm/8x13-ISO8859-13.pcf.gz
#+fontset: iso8859.14-1998,pcf,R,/usr/share/fonts/jfbterm/8x13-ISO8859-14.pcf.gz
#+fontset: iso8859.15-1999,pcf,R,/usr/share/fonts/jfbterm/8x13-ISO8859-15.pcf.gz
fontset: iso10646.1,pcf,U,/usr/share/fonts/jfbterm/unifont.pcf.gz
#+fontset: vt100-graphics,pcf,L,/usr/share/fonts/jfbterm/vt100-graphics.pcf.gz
#+fontset: iso8859.1-1987,pcf,R,/usr/share/fonts/jfbterm/8x16.pcf.gz
###############################################################################
#
# Encoding configuration
#
###############################################################################
encoding : locale
#encoding.C : G0,G1,ansix3.4-1968,ansix3.4-1968,iso8859.1-1987,ansix3.4-1968
#encoding.POSIX : G0,G1,ansix3.4-1968,ansix3.4-1968,iso8859.1-1987,ansix3.4-1968
#encoding.ANSI_X3.4-1968 : G0,G1,ansix3.4-1968,ansix3.4-1968,ansix3.4-1968,ansix3.4-1968
#encoding.EUC-JP : G0,G1,ansix3.4-1968,jisx0208-1983,jisc6220-1969kana,jisx0212-1990
#encoding.EUC-KR : G0,G1,ansix3.4-1968,ksc5601-1987,ansix3.4-1968,ansix3.4-1968
#encoding.GB2312 : G0,G1,ansix3.4-1968,gb2312-80,ansix3.4-1968,ansix3.4-1968
#encoding.ISO-8859-1 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.1-1987,ansix3.4-1968
#encoding.ISO-8859-2 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.2-1987,ansix3.4-1968
#encoding.ISO-8859-3 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.3-1987,ansix3.4-1968
#encoding.ISO-8859-4 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.4-1988,ansix3.4-1968
#encoding.ISO-8859-5 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.5-1988,ansix3.4-1968
#encoding.ISO-8859-6 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.6-1987,ansix3.4-1968
#encoding.ISO-8859-7 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.7-1987,ansix3.4-1968
#encoding.ISO-8859-8 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.8-1988,ansix3.4-1968
#encoding.ISO-8859-9 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.9-1989,ansix3.4-1968
#encoding.ISO-8859-10 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.10-1992,ansix3.4-1968
#encoding.ISO-8859-11 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.11-2001,ansix3.4-1968
#encoding.ISO-8859-13 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.13-1998,ansix3.4-1968
#encoding.ISO-8859-14 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.14-1998,ansix3.4-1968
#encoding.ISO-8859-15 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.15-1999,ansix3.4-1968
#encoding.ISO-8859-16 : G0,G2,ansix3.4-1968,ansix3.4-1968,iso8859.16-2001,ansix3.4-1968
encoding.UTF-8 : UTF-8,iso10646.1
# other,*,iconv,UTF-8 is default action
#encoding.SHIFT_JIS : other,SHIFT_JIS,iconv,UTF-8
#encoding.BIG5 : other,BIG5,iconv,UTF-8
#encoding.KOI8-U : other,KOI8-U,iconv,UTF-8
#encoding.KOI8-T : other,KOI8-T,iconv,UTF-8
#encoding.KOI8-R : other,KOI8-R,iconv,UTF-8
#encoding.KOI-8 : other,KOI-8,iconv,UTF-8
#encoding.CP1251 : other,CP1251,iconv,UTF-8
#encoding.CP1255 : other,CP1255,iconv,UTF-8
#encoding.TIS-620 : other,TIS-620,iconv,UTF-8
#encoding.TCVN5712-1 : other,TCVN5712-1,iconv,UTF-8
#encoding.GEORGIAN-PS : other,GEORGIAN-PS,iconv,UTF-8
#encoding.GBK : other,GBK,iconv,UTF-8
#encoding.GB18030 : other,GB18030,iconv,UTF-8
###############################################################################
#
# color gamma value (default: 1.7)
#
################################################################################
color.gamma : 1.7

BIN
jfbterm/fonts/8x16.pcf.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,11 @@
--- a/fbcommon.c 2010-06-19 22:33:15.744920495 +0400
+++ b/fbcommon.c 2010-06-19 22:33:36.347047734 +0400
@@ -46,7 +46,7 @@
#endif
#include <linux/vt.h>
#include <linux/fb.h>
-#include <asm/page.h>
+#include <asm-generic/page.h>
#include "mytypes.h"
#include "fbcommon.h"

View File

@ -0,0 +1,25 @@
--- a/main.c 2010-06-20 12:41:23.797920527 +0400
+++ b/main.c 2010-06-20 22:08:46.443043724 +0400
@@ -185,6 +185,7 @@
p->gConfFile = FILE_JFBTERM_CONF;
p->gConfEncoding = NULL;
+ signal(SIGCHLD, sigchld);
atexit(tapp_final_at_exit);
}
@@ -193,10 +194,12 @@
struct vt_stat vts;
int cfd;
int vfd;
- int vtNum;
+ int vtNum = 0;
int child;
char vtty[128];
- int mode;
+ int mode = 0;
+
+ memset(&vts, 0, sizeof(struct vt_stat));
cfd = util_privilege_open("/dev/console", O_WRONLY);
if (cfd < 0 &&

View File

@ -0,0 +1,11 @@
--- a/vterm.c 2010-06-20 11:45:25.027920481 +0400
+++ b/vterm.c 2010-06-20 11:45:32.394920713 +0400
@@ -795,7 +795,7 @@
tvterm_put_otherCS_char(TVterm *p, u_char ch)
{
int rev;
- char *inbuf;
+ const char *inbuf;
size_t inbuflen;
char *outbuf;
size_t outbuflen;

View File

@ -0,0 +1,11 @@
--- a/configure.in 2010-06-20 12:48:58.356043542 +0400
+++ b/configure.in 2010-06-20 12:48:47.550195355 +0400
@@ -33,7 +33,7 @@
AC_FUNC_MMAP
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(select strdup strerror ioperm)
+AC_CHECK_FUNCS(select strdup strerror)
dnl setup options.
AC_PATH_PROGS(jfb_gzip_path, gunzip, :)

View File

@ -0,0 +1,10 @@
--- a/term.h 2010-06-20 20:22:20.620998681 +0400
+++ b/term.h 2010-06-20 20:22:48.435043158 +0400
@@ -45,6 +45,7 @@
void tterm_start(TTerm* p, const char* tn, const char* en);
+void sigchld(int sig);
extern TTerm gTerm;
#endif /* INCLUDE_TERM_H */

View File

@ -0,0 +1,20 @@
--- a/term.c 2010-06-20 22:10:17.197918007 +0400
+++ b/term.c 2010-06-21 16:16:36.829840350 +0400
@@ -100,7 +100,7 @@
void tterm_final(TTerm* p)
{
- tterm_reset_utmp(p);
+ //tterm_reset_utmp(p);
tvterm_final(&(p->vterm));
}
@@ -172,7 +172,7 @@
exit(1);
}
/* parent */
- tterm_set_utmp(p);
+ //tterm_set_utmp(p);
signal(SIGCHLD, sigchld);
atexit(application_final);