Import devel/libtermkey.

pkg/DESCR:
---8<---
This library allows easy processing of keyboard entry from terminal-based
programs. It handles all the necessary logic to recognise special keys, UTF-8
combining, and so on, with a simple interface.
--->8---

OK czarkoff@, thanks.
This commit is contained in:
edd 2017-01-19 20:34:04 +00:00
parent db487b08c4
commit 0dfb1f0218
6 changed files with 99 additions and 0 deletions

25
devel/libtermkey/Makefile Normal file
View File

@ -0,0 +1,25 @@
# $OpenBSD: Makefile,v 1.1.1.1 2017/01/19 20:34:04 edd Exp $
COMMENT = library for processing of keyboard entry from a terminal
DISTNAME = libtermkey-0.19
SHARED_LIBS += termkey 0.0 # 14.0
CATEGORIES = devel
HOMEPAGE = http://www.leonerd.org.uk/code/libtermkey/
# MIT
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += unibilium
MASTER_SITES = ${HOMEPAGE}
LIB_DEPENDS = devel/unibilium
USE_GMAKE = Yes
MAKE_FLAGS = PREFIX=${PREFIX} \
MANDIR=${PREFIX}/man
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (libtermkey-0.19.tar.gz) = xQWqTLSMj6WcUmJlV2uXoZ5uvnt9og9Oyq6Ji3J7SLc=
SIZE (libtermkey-0.19.tar.gz) = 43148

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2017/01/19 20:34:04 edd Exp $
Don't compresss manuals and remove odd symlinking scheme to alias man pages. As
it happens mandoc is clever enough to figure out the aliases.
--- Makefile.orig Fri Dec 16 16:08:07 2016
+++ Makefile Tue Jan 17 23:15:29 2017
@@ -120,12 +120,9 @@ install-man:
install -d $(DESTDIR)$(MAN3DIR)
install -d $(DESTDIR)$(MAN7DIR)
for F in man/*.3; do \
- gzip <$$F >$(DESTDIR)$(MAN3DIR)/$${F#man/}.gz; \
+ install -c $$F $(DESTDIR)$(MAN3DIR)/$${F#man/}; \
done
for F in man/*.7; do \
- gzip <$$F >$(DESTDIR)$(MAN7DIR)/$${F#man/}.gz; \
+ install -c $$F $(DESTDIR)$(MAN7DIR)/$${F#man/}; \
done
- while read FROM EQ TO; do \
- echo ln -sf $$TO.gz $(DESTDIR)$(MAN3DIR)/$$FROM.gz; \
- done < man/also

View File

@ -0,0 +1,3 @@
This library allows easy processing of keyboard entry from terminal-based
programs. It handles all the necessary logic to recognise special keys, UTF-8
combining, and so on, with a simple interface.

View File

@ -0,0 +1,31 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2017/01/19 20:34:04 edd Exp $
include/termkey.h
lib/libtermkey.a
lib/libtermkey.la
@lib lib/libtermkey.so.${LIBtermkey_VERSION}
lib/pkgconfig/termkey.pc
@man man/man3/termkey_advisereadable.3
@man man/man3/termkey_canonicalise.3
@man man/man3/termkey_get_buffer_remaining.3
@man man/man3/termkey_get_fd.3
@man man/man3/termkey_get_keyname.3
@man man/man3/termkey_getkey.3
@man man/man3/termkey_interpret_csi.3
@man man/man3/termkey_interpret_modereport.3
@man man/man3/termkey_interpret_mouse.3
@man man/man3/termkey_interpret_position.3
@man man/man3/termkey_keycmp.3
@man man/man3/termkey_keyname2sym.3
@man man/man3/termkey_lookup_keyname.3
@man man/man3/termkey_new.3
@man man/man3/termkey_push_bytes.3
@man man/man3/termkey_set_buffer_size.3
@man man/man3/termkey_set_canonflags.3
@man man/man3/termkey_set_flags.3
@man man/man3/termkey_set_waittime.3
@man man/man3/termkey_start.3
@man man/man3/termkey_strfkey.3
@man man/man3/termkey_strpkey.3
@man man/man3/termkey_waitkey.3
@man man/man7/termkey.7
share/doc/pkg-readmes/${FULLPKGNAME}

View File

@ -0,0 +1,16 @@
$OpenBSD: README,v 1.1.1.1 2017/01/19 20:34:04 edd Exp $
+-------------------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-------------------------------------------------------------------------------
libtermkey and tmux
===================
Both tmux and libtermkey wait after an escape is input to determine if it is
part of a function or meta key sequences. This leads to false positives in
meta key sequence detection in programs that use libtermkey. To work around
this bug one may reduce such delay in tmux to a value below the default 50 ms
value in libtermkey by setting "escape-time" setting in tmux configuration:
set-option escape-time 40