git: 4f636bdb1e32 - main - sysutils/polkit-gnome: Autostart the agent when running under Cinnamon

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Tue, 15 Jul 2025 07:38:05 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4f636bdb1e3254ca005d6b6182ecbd4455641b3b

commit 4f636bdb1e3254ca005d6b6182ecbd4455641b3b
Author:     Pavel Timofeev <timp87@gmail.com>
AuthorDate: 2025-07-15 07:01:38 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-07-15 07:37:59 +0000

    sysutils/polkit-gnome: Autostart the agent when running under Cinnamon
    
    PR:             281993, 278635
---
 sysutils/polkit-gnome/Makefile                      | 10 +++++++++-
 sysutils/polkit-gnome/files/polkit-gnome.desktop.in |  8 ++++++++
 sysutils/polkit-gnome/pkg-plist                     |  1 +
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/sysutils/polkit-gnome/Makefile b/sysutils/polkit-gnome/Makefile
index dcaffec500d4..f68acf023919 100644
--- a/sysutils/polkit-gnome/Makefile
+++ b/sysutils/polkit-gnome/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	polkit-gnome
 PORTVERSION=	0.105
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	sysutils gnome
 MASTER_SITES=	GNOME
 
@@ -8,6 +8,8 @@ MAINTAINER=	gnome@FreeBSD.org
 COMMENT=	GNOME frontend to the PolicyKit framework
 WWW=		https://www.freedesktop.org/wiki/Software/polkit/
 
+LICENSE=	LGPL20
+
 LIB_DEPENDS=	libpolkit-gobject-1.so:sysutils/polkit
 
 USES=		gettext gmake gnome pathfix pkgconfig tar:xz
@@ -19,4 +21,10 @@ CONFIGURE_ARGS=	--disable-gtk-doc \
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
+SUB_FILES=	polkit-gnome.desktop
+
+post-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg/autostart
+	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/etc/xdg/autostart/
+
 .include <bsd.port.mk>
diff --git a/sysutils/polkit-gnome/files/polkit-gnome.desktop.in b/sysutils/polkit-gnome/files/polkit-gnome.desktop.in
new file mode 100644
index 000000000000..6b599e3dcee4
--- /dev/null
+++ b/sysutils/polkit-gnome/files/polkit-gnome.desktop.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=PolicyKit Authentication Agent
+Comment=PolicyKit Authentication Agent
+Type=Application
+Exec=%%PREFIX%%/libexec/polkit-gnome-authentication-agent-1
+Terminal=false
+NoDisplay=true
+OnlyShowIn=X-Cinnamon;
diff --git a/sysutils/polkit-gnome/pkg-plist b/sysutils/polkit-gnome/pkg-plist
index 2c76f9dde431..23b132b807ab 100644
--- a/sysutils/polkit-gnome/pkg-plist
+++ b/sysutils/polkit-gnome/pkg-plist
@@ -1,3 +1,4 @@
+etc/xdg/autostart/polkit-gnome.desktop
 libexec/polkit-gnome-authentication-agent-1
 share/locale/ar/LC_MESSAGES/polkit-gnome-1.mo
 share/locale/be/LC_MESSAGES/polkit-gnome-1.mo