diff options
| author | Dirk Meyer <dinoex@FreeBSD.org> | 2026-02-27 16:46:10 +0000 |
|---|---|---|
| committer | Dirk Meyer <dinoex@FreeBSD.org> | 2026-02-27 16:46:10 +0000 |
| commit | fda060c4bb7b05c5201e42d84e020605ede197c3 (patch) | |
| tree | 49f6746b3d1e5fa8b50b9c05e115986d98ede654 | |
| parent | 3d04942b69d92591c2769d170c3e90b95d17d2a6 (diff) | |
deskutils/xdpi: X11 DPI information retrieval
PR: 293436
| -rw-r--r-- | deskutils/xdpi/Makefile | 30 | ||||
| -rw-r--r-- | deskutils/xdpi/distinfo | 3 | ||||
| -rw-r--r-- | deskutils/xdpi/files/patch-Makefile | 10 | ||||
| -rw-r--r-- | deskutils/xdpi/pkg-descr | 7 |
4 files changed, 50 insertions, 0 deletions
diff --git a/deskutils/xdpi/Makefile b/deskutils/xdpi/Makefile new file mode 100644 index 000000000000..e8eaab6e5529 --- /dev/null +++ b/deskutils/xdpi/Makefile @@ -0,0 +1,30 @@ +PORTNAME= xdpi +DISTVERSION= g20240413 +CATEGORIES= deskutils + +MAINTAINER= nimaje+fbz@bureaucracy.de +COMMENT= X11 DPI information retrieval +WWW= https://github.com/Oblomov/xdpi + +LICENSE= MPL20 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +LIB_DEPENDS+= libxcb-xrm.so:x11/xcb-util-xrm + +USES= localbase:ldflags xorg + +USE_GITHUB= yes +GH_ACCOUNT= Oblomov +GH_TAGNAME= b902c3df22152b79d95c9afba84d309d714e855a +USE_XORG= x11 xcb xinerama xrandr + +ALL_TARGET= xdpi + +PLIST_FILES= bin/xdpi + +CFLAGS+= -DWITH_XCB=1 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/xdpi ${STAGEDIR}${PREFIX}/bin/ + +.include <bsd.port.mk> diff --git a/deskutils/xdpi/distinfo b/deskutils/xdpi/distinfo new file mode 100644 index 000000000000..f7abe4cf70ca --- /dev/null +++ b/deskutils/xdpi/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1771586946 +SHA256 (Oblomov-xdpi-g20240413-b902c3df22152b79d95c9afba84d309d714e855a_GH0.tar.gz) = 9a678d3e4b39bbdbae9eab0f1f505e7db07203be003d6e982a7b02dae44f8d00 +SIZE (Oblomov-xdpi-g20240413-b902c3df22152b79d95c9afba84d309d714e855a_GH0.tar.gz) = 16013 diff --git a/deskutils/xdpi/files/patch-Makefile b/deskutils/xdpi/files/patch-Makefile new file mode 100644 index 000000000000..f36107f7990c --- /dev/null +++ b/deskutils/xdpi/files/patch-Makefile @@ -0,0 +1,10 @@ +--- Makefile.orig 2026-02-20 11:56:18 UTC ++++ Makefile +@@ -1,6 +1,6 @@ CPPFLAGS=-g -Wall -Wextra -DWITH_XCB=$(xcb) -Werror + xcb?=1 + CPPFLAGS=-g -Wall -Wextra -DWITH_XCB=$(xcb) -Werror +-CFLAGS=-std=c99 ++CFLAGS+=-std=c99 + LDLIBS=-lm -lX11 -lXrandr -lXinerama + + LDLIBS_xcb1=-lxcb -lxcb-randr -lxcb-xinerama -lxcb-xrm diff --git a/deskutils/xdpi/pkg-descr b/deskutils/xdpi/pkg-descr new file mode 100644 index 000000000000..ae44404dc4e4 --- /dev/null +++ b/deskutils/xdpi/pkg-descr @@ -0,0 +1,7 @@ +A small C program that retrieves all information about DPI (dots per inch) +of the available displays in X11. +Information from both the core protocol and the XRANDR extension is presented. +Xinerama information (which lacks physical dimensions, +and is thus not directly useful to determine output DPI) is also presented. +If an XSETTINGS daemon is found, the reported (scaled and raw) Xft/DPI value is +presented. |
