From nobody Fri Dec 13 19:40:07 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y906b5FM2z5g1ZT; Fri, 13 Dec 2024 19:40:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y906b4PyGz4N8Z; Fri, 13 Dec 2024 19:40:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734118807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=herUTZ15Wjn0WfXCMRhz3rG7kR0hl0f+dcPrNqo7mIk=; b=o8zvqwzfnOBRsjYQwZgAdEmTqhAyARJke2fDgx3TOPHCNTTEpE020RB21XRmDhYK6lLA+E DqcImFOHTLMCQlH9BczVymkUrK6eq1zQasJaXIUbUHaxff7Zva8veHuzqd3K38lE/ND1CE h7vCfhKC32e/SQ1CnCOQtub82KpTDcrkZLLtx1qz8i72EeBo1EykLfLc/IeeahXVw2kIsL 9hzvhFuV+v0V428VG+jTQDWyl3Fd4bf9LPS02rvIuLpkvDjYHGv4XrUNOmLvZgOAaGGPm5 +WOEL/DXL6jR7ZsoLedwBwNjc1GFUinm2s6/7d+vVppionMnYfRqCrxjvZwqPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734118807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=herUTZ15Wjn0WfXCMRhz3rG7kR0hl0f+dcPrNqo7mIk=; b=tBRNMNIiZedpgXsz9QEZjzbTAh8ZaHVv6zwFGH31/DQe93jR+VG1X+jJklHqLDiGS0VQYJ VdZiMBPcXGqSqGNAJZ/klsULRDrhV1snMTdtp+UUxw/McccwqRKyzL+gS4RDcH5CBs+Skq zHlIdpyPYoudk+YrJaGdnxvHHbhM2WF075ywNNpMX+sojJ4SCZeAgngGPeSsLjXW7EY3tV PYN7r+91LEpE+LQJdW25fZt9vFVuSxBBd3TCJy2ORAAywpR+HDFKnaLEy77iWZGlCHstyU ELAXk7jEH6IeqEHTP7bamxgLniMifUwKPtePyFVbiW9SP3D5O8t+fgHPmDdaEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734118807; a=rsa-sha256; cv=none; b=DJ/RcPJbVgKg7tC/YYISxU41qFQOfnJvXyL1mVWVfx59z7QlfJGcRtSImXI1JUH9ND7CKp 43jfSgdGOufE1w+2gQfE0o6+G9ImAPZlJh5zZA7bfYl8wk+t8oKKkfN6B/5GKS4qW4Pusd lwsCYuWO7R86IIhF03xAOqlu+5QipMo4SEQsBMyxPvnARf+3cM/tMJWpuz8tKllDq1TLgV ueaQHwtb2/ZVzPoj0Ngv//Dr0MOpti31S4W6bjsBf/InVVwfQ8vqtjXaqhbFCvD/1ZEiVI O1wfBH4/OmIDAj0ODowsaO1NifqywYRe4R5dxafrB86U596smNG1PsUBJmA+sQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y906b40rczqpQ; Fri, 13 Dec 2024 19:40:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BDJe7qq042402; Fri, 13 Dec 2024 19:40:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BDJe7JN042397; Fri, 13 Dec 2024 19:40:07 GMT (envelope-from git) Date: Fri, 13 Dec 2024 19:40:07 GMT Message-Id: <202412131940.4BDJe7JN042397@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: 248938f607f8 - main - x11/xseticon: new port had been added (+) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 248938f607f8961ea821f43dc360eb2cc8cacf4f Auto-Submitted: auto-generated The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=248938f607f8961ea821f43dc360eb2cc8cacf4f commit 248938f607f8961ea821f43dc360eb2cc8cacf4f Author: Alexey Dokuchaev AuthorDate: 2024-12-13 19:38:34 +0000 Commit: Alexey Dokuchaev CommitDate: 2024-12-13 19:38:34 +0000 x11/xseticon: new port had been added (+) Some X11 programs do not set their window icons which window managers typically use to represent that program window in switcher lists, taskbars, and so on; this little program can be handy in this case. The patch to enable window selection based on WM_CLASS hints is courtesy of Victor Kareh. WWW: http://www.leonerd.org.uk/code/xseticon/ --- x11/Makefile | 1 + x11/xseticon/Makefile | 27 +++++++++++++++++ x11/xseticon/distinfo | 3 ++ x11/xseticon/files/patch-xseticon.c | 58 +++++++++++++++++++++++++++++++++++++ x11/xseticon/pkg-descr | 4 +++ 5 files changed, 93 insertions(+) diff --git a/x11/Makefile b/x11/Makefile index aa6405480270..22c89f0c3801 100644 --- a/x11/Makefile +++ b/x11/Makefile @@ -640,6 +640,7 @@ SUBDIR += xscreensaver.app SUBDIR += xsel-conrad SUBDIR += xset + SUBDIR += xseticon SUBDIR += xsetroot SUBDIR += xsettingsd SUBDIR += xskyroot diff --git a/x11/xseticon/Makefile b/x11/xseticon/Makefile new file mode 100644 index 000000000000..459b2d5fdf2e --- /dev/null +++ b/x11/xseticon/Makefile @@ -0,0 +1,27 @@ +PORTNAME= xseticon +PORTVERSION= 0.1 +DISTVERSIONSUFFIX= +bzr14 +CATEGORIES= x11 +MASTER_SITES= ${WWW} + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Set window icon for any given X11 window +WWW= http://www.leonerd.org.uk/code/xseticon/ + +LICENSE= GPLv2+ + +LIB_DEPENDS= libgd.so:graphics/gd + +USES= gmake gnome pkgconfig xorg +USE_GNOME= glib20 +USE_XORG= x11 xmu + +PLIST_FILES= bin/${PORTNAME} + +post-patch: + @${REINPLACE_CMD} -e 's,gcc,$${CC} $${CFLAGS},' ${WRKSRC}/Makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + +.include diff --git a/x11/xseticon/distinfo b/x11/xseticon/distinfo new file mode 100644 index 000000000000..cf1bd256701b --- /dev/null +++ b/x11/xseticon/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1516047601 +SHA256 (xseticon-0.1+bzr14.tar.gz) = 048a8339b47030ebbff9cce4b58cb071a5c5f5a2cd7ff1ecc8434f95b2f8e4c5 +SIZE (xseticon-0.1+bzr14.tar.gz) = 10192 diff --git a/x11/xseticon/files/patch-xseticon.c b/x11/xseticon/files/patch-xseticon.c new file mode 100644 index 000000000000..6ab257f54a1b --- /dev/null +++ b/x11/xseticon/files/patch-xseticon.c @@ -0,0 +1,58 @@ +--- xseticon.c.orig 2018-01-15 20:20:01 UTC ++++ xseticon.c +@@ -46,6 +46,7 @@ void usage(int exitcode) + printf("options:\n"); + printf(" -name : apply icon to the window of the name supplied\n"); + printf(" -id : apply icon to the window id supplied\n"); ++ printf(" -class : apply icon to the window matching the class supplied\n"); + printf("\n"); + printf("Sets the window icon to the specified .png image. The image is loaded from\n"); + printf("the file at runtime and sent to the X server; thereafter the file does not\n"); +@@ -98,6 +99,30 @@ Window Window_With_Name(Display* dpy, Window top, char + return(w); + } + ++Window Window_With_Class(Display* dpy, Window top, char* class) ++{ ++ Window *children, dummy; ++ unsigned int nchildren; ++ int i; ++ Window w = 0; ++ XClassHint *hint = XAllocClassHint(); ++ ++ if (XGetClassHint(dpy, top, hint) ++ && (!strcmp(hint->res_class, class) || !strcmp(hint->res_name, class))) ++ return(top); ++ ++ if (!XQueryTree(dpy, top, &dummy, &dummy, &children, &nchildren)) ++ return(0); ++ ++ for (i=0; i