1
0
mirror of https://git.freebsd.org/ports.git synced 2026-06-02 11:08:52 +00:00

x11/wl-find-cursor: New port: Highlight and print out mouse position on Wayland

wl-find-cursor is a tool to highlight and print out global mouse position
on Wayland, especially for compositors based on wlroots, such as Sway.
WWW: https://github.com/cjacker/wl-find-cursor

PR:		293818
Reported by:	agathos5@gmail.com, linimon (WantedPorts)
Approved by:	vvd (mentor)
Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>
This commit is contained in:
Yusuf Yaman
2026-03-27 02:15:51 +03:00
parent 6dd59102c9
commit b582db6221
5 changed files with 75 additions and 0 deletions
+1
View File
@@ -493,6 +493,7 @@
SUBDIR += wf-shell
SUBDIR += windowtolayer
SUBDIR += wl-clipboard
SUBDIR += wl-find-cursor
SUBDIR += wl-kbptr
SUBDIR += wl-mirror
SUBDIR += wleave
+25
View File
@@ -0,0 +1,25 @@
PORTNAME= wl-find-cursor
DISTVERSION= g20260203
CATEGORIES= x11 wayland
MAINTAINER= nxjoseph@FreeBSD.org
COMMENT= Highlight and print out mouse position on Wayland
WWW= https://github.com/cjacker/wl-find-cursor
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= wayland-protocols>=0:graphics/wayland-protocols \
wayland-scanner:graphics/wayland
LIB_DEPENDS= libwayland-client.so:graphics/wayland
USE_GITHUB= yes
GH_ACCOUNT= cjacker
GH_TAGNAME= ce1a125
MAKE_ARGS= LOCALBASE=${LOCALBASE} \
PREFIX=${PREFIX}
PLIST_FILES= bin/${PORTNAME}
.include <bsd.port.mk>
+3
View File
@@ -0,0 +1,3 @@
TIMESTAMP = 1774564691
SHA256 (cjacker-wl-find-cursor-g20260203-ce1a125_GH0.tar.gz) = dce3b299c3fab60f9710fd294555f8980a35c3c3bf7e745d1348af74104ff5eb
SIZE (cjacker-wl-find-cursor-g20260203-ce1a125_GH0.tar.gz) = 56370
+44
View File
@@ -0,0 +1,44 @@
--- Makefile.orig 2026-02-03 05:00:39 UTC
+++ Makefile
@@ -1,26 +1,33 @@ PREFIX=/usr/local
DESTDIR=
PREFIX=/usr/local
+LOCALBASE=/usr
+STRIP_CMD?=strip
+CFLAGS?=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing
+CFLAGS+=-I$(LOCALBASE)/include
+LDFLAGS+=-L$(LOCALBASE)/lib -lwayland-client
+CC?=gcc
all: headers
- gcc -g -o wl-find-cursor main.c tmp/xdg-shell.c tmp/wlr-layer-shell-unstable-v1.c tmp/wlr-virtual-pointer-unstable-v1.c tmp/single-pixel-buffer-v1.c tmp/viewporter.c -I./tmp -lwayland-client
+ $(CC) $(CFLAGS) $(LDFLAGS) -g -o wl-find-cursor main.c tmp/xdg-shell.c tmp/wlr-layer-shell-unstable-v1.c tmp/wlr-virtual-pointer-unstable-v1.c tmp/single-pixel-buffer-v1.c tmp/viewporter.c -I./tmp
headers:
mkdir -p tmp
- wayland-scanner client-header /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml tmp/xdg-shell.h
- wayland-scanner public-code /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml tmp/xdg-shell.c
+ wayland-scanner client-header $(LOCALBASE)/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml tmp/xdg-shell.h
+ wayland-scanner public-code $(LOCALBASE)/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml tmp/xdg-shell.c
wayland-scanner client-header ./protocols/wlr-layer-shell-unstable-v1.xml tmp/wlr-layer-shell-unstable-v1.h
wayland-scanner public-code ./protocols/wlr-layer-shell-unstable-v1.xml tmp/wlr-layer-shell-unstable-v1.c
wayland-scanner client-header ./protocols/wlr-virtual-pointer-unstable-v1.xml tmp/wlr-virtual-pointer-unstable-v1.h
wayland-scanner public-code ./protocols/wlr-virtual-pointer-unstable-v1.xml tmp/wlr-virtual-pointer-unstable-v1.c
- wayland-scanner client-header /usr/share/wayland-protocols/staging/single-pixel-buffer/single-pixel-buffer-v1.xml tmp/single-pixel-buffer-v1.h
- wayland-scanner public-code /usr/share/wayland-protocols/staging/single-pixel-buffer/single-pixel-buffer-v1.xml tmp/single-pixel-buffer-v1.c
- wayland-scanner client-header /usr/share/wayland-protocols/stable/viewporter/viewporter.xml tmp/viewporter.h
- wayland-scanner public-code /usr/share/wayland-protocols/stable/viewporter/viewporter.xml tmp/viewporter.c
+ wayland-scanner client-header $(LOCALBASE)/share/wayland-protocols/staging/single-pixel-buffer/single-pixel-buffer-v1.xml tmp/single-pixel-buffer-v1.h
+ wayland-scanner public-code $(LOCALBASE)/share/wayland-protocols/staging/single-pixel-buffer/single-pixel-buffer-v1.xml tmp/single-pixel-buffer-v1.c
+ wayland-scanner client-header $(LOCALBASE)/share/wayland-protocols/stable/viewporter/viewporter.xml tmp/viewporter.h
+ wayland-scanner public-code $(LOCALBASE)/share/wayland-protocols/stable/viewporter/viewporter.xml tmp/viewporter.c
-install: default
+install:
mkdir -p $(DESTDIR)/$(PREFIX)/bin
install -m0755 wl-find-cursor $(DESTDIR)/$(PREFIX)/bin/
+ $(STRIP_CMD) $(DESTDIR)/$(PREFIX)/bin/wl-find-cursor
clean:
rm -f wl-find-cursor
+2
View File
@@ -0,0 +1,2 @@
wl-find-cursor is a tool to highlight and print out global mouse position
on Wayland, especially for compositors based on wlroots, such as Sway.