From 6d191eca40e7f60c8c104fa26980d4895f15d670 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Wed, 11 Nov 2020 19:03:59 +0000 Subject: [PATCH] Add a port of `x11/xdo', utility to perform elementary actions on windows. PR: 249352 --- x11/Makefile | 1 + x11/xdo/Makefile | 23 +++++++++++++++++++++++ x11/xdo/distinfo | 3 +++ x11/xdo/files/patch-Makefile | 24 ++++++++++++++++++++++++ x11/xdo/pkg-descr | 6 ++++++ 5 files changed, 57 insertions(+) create mode 100644 x11/xdo/Makefile create mode 100644 x11/xdo/distinfo create mode 100644 x11/xdo/files/patch-Makefile create mode 100644 x11/xdo/pkg-descr diff --git a/x11/Makefile b/x11/Makefile index 908e9722dde6..4cc3e7428be3 100644 --- a/x11/Makefile +++ b/x11/Makefile @@ -405,6 +405,7 @@ SUBDIR += xcut SUBDIR += xditview SUBDIR += xdm + SUBDIR += xdo SUBDIR += xdotool SUBDIR += xdpyinfo SUBDIR += xdriinfo diff --git a/x11/xdo/Makefile b/x11/xdo/Makefile new file mode 100644 index 000000000000..3e01f0c1e9c0 --- /dev/null +++ b/x11/xdo/Makefile @@ -0,0 +1,23 @@ +# $FreeBSD$ + +PORTNAME= xdo +PORTVERSION= 0.5.7 +CATEGORIES= x11 + +MAINTAINER= casnix@gmail.com +COMMENT= Utility to perform elementary actions on windows + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libxcb-util.so:x11/xcb-util \ + libxcb-icccm.so:x11/xcb-util-wm + +USES= gmake localbase:ldflags xorg +USE_XORG= xcb +USE_GITHUB= yes +GH_ACCOUNT= baskerville + +PLIST_FILES= bin/xdo man/man1/xdo.1.gz + +.include diff --git a/x11/xdo/distinfo b/x11/xdo/distinfo new file mode 100644 index 000000000000..f04019d4d85c --- /dev/null +++ b/x11/xdo/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1505736007 +SHA256 (baskerville-xdo-0.5.7_GH0.tar.gz) = b661229f0457939d3867cca1664c5671ae959b309feb58abe9142229c8c7ffb4 +SIZE (baskerville-xdo-0.5.7_GH0.tar.gz) = 7453 diff --git a/x11/xdo/files/patch-Makefile b/x11/xdo/files/patch-Makefile new file mode 100644 index 000000000000..a3927dd599ac --- /dev/null +++ b/x11/xdo/files/patch-Makefile @@ -0,0 +1,24 @@ +--- Makefile.orig 2017-09-18 12:00:07 UTC ++++ Makefile +@@ -2,7 +2,7 @@ NAME := xdo + VERCMD ?= git describe 2> /dev/null + VERSION := $(shell $(VERCMD) || cat VERSION) + +-CPPFLAGS += -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" ++CPPFLAGS += -DVERSION=\"$(VERSION)\" + CFLAGS += -std=c99 -pedantic -Wall -Wextra + LDLIBS := -lxcb -lxcb-util -lxcb-icccm -lxcb-ewmh -lxcb-xtest + +@@ -26,9 +26,9 @@ $(NAME): $(OBJ) + + install: + mkdir -p "$(DESTDIR)$(BINPREFIX)" +- cp -p $(NAME) "$(DESTDIR)$(BINPREFIX)" +- mkdir -p "$(DESTDIR)$(MANPREFIX)/man1" +- cp -p doc/$(NAME).1 "$(DESTDIR)$(MANPREFIX)/man1" ++ $(BSD_INSTALL_PROGRAM) $(NAME) "$(DESTDIR)$(BINPREFIX)" ++ mkdir -p "$(DESTDIR)$(MANPREFIX)/man/man1" ++ $(BSD_INSTALL_MAN) doc/$(NAME).1 "$(DESTDIR)$(MANPREFIX)/man/man1" + + uninstall: + rm -f "$(DESTDIR)$(BINPREFIX)/$(NAME)" diff --git a/x11/xdo/pkg-descr b/x11/xdo/pkg-descr new file mode 100644 index 000000000000..6ad9c2485cf3 --- /dev/null +++ b/x11/xdo/pkg-descr @@ -0,0 +1,6 @@ +Apply the given action to the given windows. + +If no window IDs and no options are given, +the action applies to the focused window. + +WWW: https://github.com/baskerville/xdo