git: 60237d1b38ce - main - x11/wvkbd: add new port

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 22 Dec 2021 22:12:26 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=60237d1b38ce3d99fa374058993ed3c99b7f36dc

commit 60237d1b38ce3d99fa374058993ed3c99b7f36dc
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-12-01 18:01:43 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-12-22 22:12:01 +0000

    x11/wvkbd: add new port
    
    wvkbd project aims to deliver a minimal but practically usable
    implementation of a wlroots on-screen keyboard in legible C. This will
    only be a keyboard, not a feedback buzzer, led blinker, or anything
    that requires more than what's needed to input text quickly. The end
    product should be a static codebase that can be patched to add new
    features.
    
    Features:
    - Typing, modifier locking, layout switching
    - Positive visual feedback on key presses
    - Custom layouts and underlying keymaps
    - On-the-fly layout and keymap switching
    - Custom color schemes
    - Proper font drawing
    - Intuitive layouts
    - International layouts (cyrillic, arabic)
    - Support for 'Copy' keys which are not on the keymap
    - Emoji support
    - Compose key for character variants (e.g. diacritics)
    - Show/hide keyboard on signals (SIGUSR1 = hide, SIGUSR2 = show)
    - Automatic portrait/landscape detection and subsequent layout switching
    
    https://github.com/jjsullivan5196/wvkbd
---
 x11/Makefile        |  1 +
 x11/wvkbd/Makefile  | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 x11/wvkbd/distinfo  |  3 +++
 x11/wvkbd/pkg-descr | 23 +++++++++++++++++++++++
 4 files changed, 73 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index 6f29ee6c6d58..c9657664076f 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -404,6 +404,7 @@
     SUBDIR += workrave
     SUBDIR += wshowkeys
     SUBDIR += wtype
+    SUBDIR += wvkbd
     SUBDIR += x-on-resize
     SUBDIR += x11perf
     SUBDIR += x3270
diff --git a/x11/wvkbd/Makefile b/x11/wvkbd/Makefile
new file mode 100644
index 000000000000..ba431c3751e2
--- /dev/null
+++ b/x11/wvkbd/Makefile
@@ -0,0 +1,46 @@
+PORTNAME=	wvkbd
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.5
+CATEGORIES=	x11
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	On-screen keyboard for wlroots
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto
+LIB_DEPENDS=	libepoll-shim.so:devel/libepoll-shim \
+		libwayland-client.so:graphics/wayland
+
+USES=		gmake gnome pkgconfig
+USE_GITHUB=	yes
+USE_GNOME=	cairo pango
+GH_ACCOUNT=	jjsullivan5196
+MAKE_ARGS=	VERSION="${DISTVERSIONFULL}"
+PLIST_FILES=	bin/${PORTNAME}-mobintl
+LDFLAGS+=	-Wl,--as-needed # pango deps
+
+pre-everything::
+	@${ECHO_MSG} "To build ${PORTNAME} with your own config.h set ${PORTNAME:tu}_CONF variable"
+	@${ECHO_MSG} "either in ${.CURDIR:T}/Makefile.local, make.conf(5), environ(7) or command line e.g.,"
+	@${ECHO_MSG} "\$$ make install clean ${PORTNAME:tu}_CONF=/path/to/${PORTNAME}/config.h"
+
+post-extract:
+# .if exists(...) before bsd.port.mk ignores *_CONF in make.conf(5) and Makefile.local
+	@if [ -e "${${PORTNAME:tu}_CONF}" ]; then \
+		${ECHO_MSG} "Creating symlink: config.h -> ${${PORTNAME:tu}_CONF}"; \
+		${LN} -fs "${${PORTNAME:tu}_CONF}" ${WRKSRC}/config.h; \
+	fi
+
+post-patch:
+	@${REINPLACE_CMD} -e '/^PKGS/s/$$/ epoll-shim/' \
+		-e 's/ xkbcommon//' \
+		-e '/^LDFLAGS/s/=/+=/' \
+		${WRKSRC}/Makefile
+	@${REINPLACE_CMD} '/^CFLAGS/s/=/+=/' ${WRKSRC}/config.mk
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}*
+
+.include <bsd.port.mk>
diff --git a/x11/wvkbd/distinfo b/x11/wvkbd/distinfo
new file mode 100644
index 000000000000..e6e492955026
--- /dev/null
+++ b/x11/wvkbd/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1638381703
+SHA256 (jjsullivan5196-wvkbd-v0.5_GH0.tar.gz) = b83e2bd3df2ef44f192be4c9cdd53e4053130f661ba070f0761dcce96a4b603e
+SIZE (jjsullivan5196-wvkbd-v0.5_GH0.tar.gz) = 1047350
diff --git a/x11/wvkbd/pkg-descr b/x11/wvkbd/pkg-descr
new file mode 100644
index 000000000000..98934bf4723a
--- /dev/null
+++ b/x11/wvkbd/pkg-descr
@@ -0,0 +1,23 @@
+wvkbd project aims to deliver a minimal but practically usable
+implementation of a wlroots on-screen keyboard in legible C. This will
+only be a keyboard, not a feedback buzzer, led blinker, or anything
+that requires more than what's needed to input text quickly. The end
+product should be a static codebase that can be patched to add new
+features.
+
+Features:
+- Typing, modifier locking, layout switching
+- Positive visual feedback on key presses
+- Custom layouts and underlying keymaps
+- On-the-fly layout and keymap switching
+- Custom color schemes
+- Proper font drawing
+- Intuitive layouts
+- International layouts (cyrillic, arabic)
+- Support for 'Copy' keys which are not on the keymap
+- Emoji support
+- Compose key for character variants (e.g. diacritics)
+- Show/hide keyboard on signals (SIGUSR1 = hide, SIGUSR2 = show)
+- Automatic portrait/landscape detection and subsequent layout switching
+
+WWW: https://github.com/jjsullivan5196/wvkbd