summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorivanp72021-05-19 14:55:04 +0300
committerivanp72021-05-19 15:08:34 +0300
commita11deee409843d9b94d481d5c9d8f28fde4965e1 (patch)
tree2fb1a8d78b87a4b4ec63c0834f9987e2dc6e5da5
downloadaur-a11deee409843d9b94d481d5c9d8f28fde4965e1.tar.gz
Add files
-rw-r--r--.SRCINFO32
-rw-r--r--.gitignore4
-rw-r--r--0001-Fix-build-with-gcc-6.patch104
-rw-r--r--PKGBUILD55
-rw-r--r--fbconfig.patch36
-rw-r--r--fbterm.patch9
-rw-r--r--fbtermrc45
-rw-r--r--fix_ftbfs_crosscompile.patch28
-rw-r--r--fix_ftbfs_epoll.patch15
9 files changed, 328 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c8b393d7083f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = fbterm
+ pkgdesc = Framebuffer terminal emulator
+ pkgver = 1.7_5
+ pkgrel = 1
+ url = https://salsa.debian.org/debian/fbterm
+ arch = x86_64
+ arch = armv7h
+ license = MIT
+ makedepends = pkgconf
+ depends = freetype2
+ depends = fontconfig
+ depends = gpm
+ depends = pkgconf
+ provides = fbterm
+ conflicts = fbterm
+ source = http://deb.debian.org/debian/pool/main/f/fbterm/fbterm_1.7.orig.tar.gz
+ source = fbconfig.patch
+ source = fbterm.patch
+ source = 0001-Fix-build-with-gcc-6.patch
+ source = fix_ftbfs_crosscompile.patch
+ source = fix_ftbfs_epoll.patch
+ source = fbtermrc
+ sha256sums = b98d487e84618503887e3996162354c482e24884bad8bf2219b6776372f306ad
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = fbterm
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..ba4cbaf71a5e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.tar.gz
+*.pkg.tar.*
diff --git a/0001-Fix-build-with-gcc-6.patch b/0001-Fix-build-with-gcc-6.patch
new file mode 100644
index 000000000000..ad5dd65c48ca
--- /dev/null
+++ b/0001-Fix-build-with-gcc-6.patch
@@ -0,0 +1,104 @@
+From 69917d25c6f718572433262d86691bf24e72e4c8 Mon Sep 17 00:00:00 2001
+From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+Date: Wed, 13 Jul 2016 12:02:10 +0900
+Subject: [PATCH] Fix build with gcc-6
+
+Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+---
+ src/lib/vterm.cpp | 4 ++--
+ src/lib/vterm_states.cpp | 18 +++++++++---------
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/src/lib/vterm.cpp b/src/lib/vterm.cpp
+index 3a5dcc7..f79f44c 100644
+--- a/src/lib/vterm.cpp
++++ b/src/lib/vterm.cpp
+@@ -68,13 +68,13 @@ u8 VTerm::control_map[MAX_CONTROL_CODE], VTerm::escape_map[NR_STATES][MAX_ESCAPE
+
+ void VTerm::init_state()
+ {
+- for (u8 i = 1; control_sequences[i].code != (u16)-1; i++) {
++ for (u8 i = 1; control_sequences[i].code != (u16)0xFFFF; i++) {
+ control_map[control_sequences[i].code] = i;
+ }
+
+ u8 state = ESnormal;
+ for (u8 i = 1; ; i++) {
+- if (escape_sequences[i].code == (u16)-1) {
++ if (escape_sequences[i].code == (u16)0xFFFF) {
+ state++;
+ if (state == NR_STATES) break;
+ } else {
+diff --git a/src/lib/vterm_states.cpp b/src/lib/vterm_states.cpp
+index 49e7588..6aaa8b3 100644
+--- a/src/lib/vterm_states.cpp
++++ b/src/lib/vterm_states.cpp
+@@ -39,14 +39,14 @@ const VTerm::Sequence VTerm::control_sequences[] = {
+ { 0x1B, 0, ESesc },
+ { 0x7F, 0, ESkeep },
+ { 0x9B, 0, ESsquare },
+- { -1}
++ { 0xFFFF}
+ };
+
+ const VTerm::Sequence VTerm::escape_sequences[] = {
+ { 0, 0, ESnormal },
+
+ // ESnormal
+- { -1 },
++ { 0xFFFF },
+
+ // ESesc
+ { '[', &VTerm::clear_param, ESsquare },
+@@ -65,7 +65,7 @@ const VTerm::Sequence VTerm::escape_sequences[] = {
+ { '8', &VTerm::restore_cursor, ESnormal },
+ { '>', &VTerm::keypad_numeric, ESnormal },
+ { '=', &VTerm::keypad_application, ESnormal },
+- { -1 },
++ { 0xFFFF },
+
+ // ESsquare
+ { '[', 0, ESfunckey },
+@@ -104,7 +104,7 @@ const VTerm::Sequence VTerm::escape_sequences[] = {
+ { '`', &VTerm::cursor_position_col, ESnormal },
+ { ']', &VTerm::linux_specific, ESnormal },
+ { '}', &VTerm::fbterm_specific, ESnormal },
+- { -1 },
++ { 0xFFFF },
+
+ // ESnonstd
+ { '0' | ADDSAME(9), &VTerm::set_palette, ESkeep },
+@@ -112,25 +112,25 @@ const VTerm::Sequence VTerm::escape_sequences[] = {
+ { 'a' | ADDSAME(5), &VTerm::set_palette, ESkeep },
+ { 'P', &VTerm::begin_set_palette, ESkeep },
+ { 'R', &VTerm::reset_palette, ESnormal },
+- { -1 },
++ { 0xFFFF },
+
+ // ESpercent
+ { '@', &VTerm::clear_utf8, ESnormal },
+ { 'G', &VTerm::set_utf8, ESnormal },
+ { '8', &VTerm::set_utf8, ESnormal },
+- { -1 },
++ { 0xFFFF },
+
+ // EScharset
+ { '0', &VTerm::set_charset, ESnormal },
+ { 'B', &VTerm::set_charset, ESnormal },
+ { 'U', &VTerm::set_charset, ESnormal },
+ { 'K', &VTerm::set_charset, ESnormal },
+- { -1 },
++ { 0xFFFF },
+
+ // EShash
+ { '8', &VTerm::screen_align, ESnormal },
+- { -1 },
++ { 0xFFFF },
+
+ // ESfunckey
+- { -1 },
++ { 0xFFFF },
+ };
+--
+2.8.1
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d3d03b51ff0d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: ivanp7 <ivanpzv8 at gmail dot com>
+
+pkgname=fbterm
+_gitname=fbterm
+_majorver=1.7
+pkgver=1.7_5
+pkgrel=1
+pkgdesc='Framebuffer terminal emulator'
+arch=('x86_64' 'armv7h')
+url='https://salsa.debian.org/debian/fbterm'
+license=('MIT')
+depends=(freetype2 fontconfig)
+provides=(fbterm)
+conflicts=(fbterm)
+source=("http://deb.debian.org/debian/pool/main/f/fbterm/fbterm_1.7.orig.tar.gz"
+ 'fbconfig.patch' 'fbterm.patch' '0001-Fix-build-with-gcc-6.patch' 'fix_ftbfs_crosscompile.patch' 'fix_ftbfs_epoll.patch'
+ 'fbtermrc')
+sha256sums=('b98d487e84618503887e3996162354c482e24884bad8bf2219b6776372f306ad'
+ 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
+ 'SKIP')
+
+prepare() {
+ cd $srcdir/$_gitname-$_majorver
+
+ patch -p1 < "$srcdir/fbconfig.patch"
+ patch -p1 < "$srcdir/fbterm.patch"
+ patch -p1 < "$srcdir/0001-Fix-build-with-gcc-6.patch"
+ patch -p1 < "$srcdir/fix_ftbfs_crosscompile.patch"
+ patch -p1 < "$srcdir/fix_ftbfs_epoll.patch"
+
+ autoreconf -fvi
+ ./configure --prefix=/usr
+}
+
+build() {
+ cd $srcdir/$_gitname-$_majorver
+ make
+ mkdir -p tic
+ TERMINFO=$srcdir/$_gitname-$_majorver/tic tic terminfo/fbterm
+}
+
+package() {
+ cd $srcdir/$_gitname-$_majorver
+ make DESTDIR="$pkgdir/" install
+
+ mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
+ cp COPYING "$pkgdir/usr/share/licenses/$pkgname/"
+
+ mkdir -p "$pkgdir/usr/share/terminfo"
+ cp -r tic/f "$pkgdir/usr/share/terminfo/"
+
+ mkdir -p "$pkgdir/etc/fbterm"
+ cp $srcdir/fbtermrc "$pkgdir/etc/fbterm/fbtermrc.example"
+}
+
diff --git a/fbconfig.patch b/fbconfig.patch
new file mode 100644
index 000000000000..1412f24fd7dd
--- /dev/null
+++ b/fbconfig.patch
@@ -0,0 +1,36 @@
+--- a/src/fbconfig.cpp 2010-10-18 11:20:11.000000000 +0300
++++ b/src/fbconfig.cpp 2021-05-19 14:17:36.510535281 +0300
+@@ -38,16 +38,12 @@
+ mConfigBuf = 0;
+ mConfigEntrys = 0;
+
+- const s8 *home = getenv("HOME");
+- if (!home) {
+- if (getuid()) return;
+- home = "/root";
+- }
++ const s8 *home = getenv("XDG_CONFIG_HOME");
++ if (!home)
++ return;
+
+ s8 name[64];
+- snprintf(name, sizeof(name), "%s/%s", home, ".fbtermrc");
+-
+- checkConfigFile(name);
++ snprintf(name, sizeof(name), "%s/%s", home, "fbtermrc");
+
+ struct stat cstat;
+ if (stat(name, &cstat) == -1) return;
+
+--- a/doc/fbterm.1.in 2021-05-19 14:20:03.100094341 +0300
++++ b/doc/fbterm.1.in 2021-05-19 14:19:21.990217395 +0300
+@@ -22,8 +22,7 @@
+ file. If that is not set, /bin/sh will be used. You should use the \fI--\fR argument to separate FbTerm's options from
+ the arguments supplied to the \fIcommand\fR.
+
+-FbTerm first uses option value specified in command line arguments, then in the configure file \fI$HOME/.fbtermrc\fR.
+-If that file doesn't exist, FbTerm will create it with default options on startup.
++FbTerm first uses option value specified in command line arguments, then in the configure file \fI$XDG_CONFIG_HOME/fbtermrc\fR.
+ .TP
+ \fB-h, --help\fR
+ display the help and exit
diff --git a/fbterm.patch b/fbterm.patch
new file mode 100644
index 000000000000..6a9656ff349b
--- /dev/null
+++ b/fbterm.patch
@@ -0,0 +1,9 @@
+--- a/terminfo/fbterm 2010-10-18 11:20:11.000000000 +0300
++++ b/terminfo/fbterm 2021-05-19 03:05:56.885773502 +0300
+@@ -1,5 +1,5 @@
+ # Reconstructed via infocmp from file: /lib/terminfo/l/linux
+-fbterm|framebuffer based terminal emulator,
++fbterm-256color|framebuffer based terminal emulator,
+ am, bce, ccc, eo, mir, msgr, xenl, xon,
+ colors#256, it#8, ncv#18, pairs#32767,
+ acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
diff --git a/fbtermrc b/fbtermrc
new file mode 100644
index 000000000000..cdf76eb8604a
--- /dev/null
+++ b/fbtermrc
@@ -0,0 +1,45 @@
+# Configuration for FbTerm
+
+# Lines starting with '#' are ignored.
+# Note that end-of-line comments are NOT supported, comments must be on a line of their own.
+
+
+# font family names/pixelsize used by fbterm, multiple font family names must be seperated by ','
+# and using a fixed width font as the first is strongly recommended
+font-names=mono
+font-size=12
+
+# force font width (and/or height), usually for non-fixed width fonts
+# legal value format: n (fw_new = n), +n (fw_new = fw_old + n), -n (fw_new = fw_old - n)
+#font-width=
+#font-height=
+
+# default color of foreground/background text
+# available colors: 0 = black, 1 = red, 2 = green, 3 = brown, 4 = blue, 5 = magenta, 6 = cyan, 7 = white
+color-foreground=7
+color-background=0
+
+# max scroll-back history lines of every window, value must be [0 - 65535], 0 means disable it
+history-lines=1000
+
+# up to 5 additional text encodings, multiple encodings must be seperated by ','
+# run 'iconv --list' to get available encodings.
+text-encodings=
+
+# cursor shape: 0 = underline, 1 = block
+# cursor flash interval in milliseconds, 0 means disable flashing
+cursor-shape=0
+cursor-interval=500
+
+# additional ascii chars considered as part of a word while auto-selecting text, except ' ', 0-9, a-z, A-Z
+word-chars=._-
+
+# change the clockwise orientation angle of screen display
+# available values: 0 = 0 degree, 1 = 90 degrees, 2 = 180 degrees, 3 = 270 degrees
+screen-rotate=0
+
+# specify the favorite input method program to run
+input-method=
+
+# treat ambiguous width characters as wide
+#ambiguous-wide=yes
diff --git a/fix_ftbfs_crosscompile.patch b/fix_ftbfs_crosscompile.patch
new file mode 100644
index 000000000000..0381834d20e4
--- /dev/null
+++ b/fix_ftbfs_crosscompile.patch
@@ -0,0 +1,28 @@
+Description: fbterm FTCBFS: falls back to broken select code
+Forwarded: not yet
+Bug-Debian: https://bugs.debian.org/909679
+Author: Helmut Grohne <helmut@subdivi.de>
+
+--- fbterm-1.7.orig/configure.ac
++++ fbterm-1.7/configure.ac
+@@ -83,16 +83,16 @@
+ fi
+ fi
+
+-if test x"$EPOLL" = xauto -a x"$cross_compiling" = xno; then
+- AC_RUN_IFELSE(
++if test x"$EPOLL" = xauto; then
++ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([[#include <sys/epoll.h>]],
+ [[if (epoll_create(10) >= 0) return 0; return 1;]]),
+ [EPOLL=yes]
+ )
+ fi
+
+-if test x"$SIGNALFD" = xauto -a x"$cross_compiling" = xno; then
+- AC_RUN_IFELSE(
++if test x"$SIGNALFD" = xauto; then
++ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([[#include <sys/signalfd.h>]],
+ [[sigset_t mask; if (signalfd(-1, &mask, 0) >= 0) return 0; return 1;]]),
+ [SIGNALFD=yes]
diff --git a/fix_ftbfs_epoll.patch b/fix_ftbfs_epoll.patch
new file mode 100644
index 000000000000..0a0bff2cc1ad
--- /dev/null
+++ b/fix_ftbfs_epoll.patch
@@ -0,0 +1,15 @@
+Description: fbterms FTBFS for architectures without epoll support
+Forwarded: not yet
+Bug-Debian: https://bugs.debian.org/909680
+Author: Helmut Grohne <helmut@subdivi.de>
+
+--- fbterm-1.7.orig/src/fbio.cpp
++++ fbterm-1.7/src/fbio.cpp
+@@ -30,6 +30,7 @@
+ #define NR_EPOLL_FDS 10
+ s32 epollFd;
+ #else
++#include <sys/select.h>
+ static fd_set fds;
+ static u32 maxfd = 0;
+ #endif