@@ -, +, @@ deskutils/xdpi: X11 DPI information retrieval --- b/deskutils/Makefile +++ b/deskutils/Makefile @@ -307,6 +307,7 @@ SUBDIR += xdg-desktop-portal SUBDIR += xdg-desktop-portal-lxqt SUBDIR += xdg-terminal-exec + SUBDIR += xdpi SUBDIR += xfce4-generic-slider SUBDIR += xfce4-notes-plugin SUBDIR += xfce4-notifyd --- /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 --- /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 --- /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 --- /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.