git: b1306594c4a6 - main - graphics/oculante: add desktop file and icon

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 17 Oct 2026 03:27:31 UTC
The branch main has been updated by yuri:

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

commit b1306594c4a601f98a3d28cbf6fc0569e218245f
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-10-17 03:25:13 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-10-17 03:27:29 +0000

    graphics/oculante: add desktop file and icon
    
    PR:             291507
    Submitted by:   Volodymyr Kostyrko <arcade@b1t.name> (initial version)
---
 graphics/oculante/Makefile                         | 17 ++++++++++++++---
 graphics/oculante/files/patch-res_oculante.desktop | 13 +++++++++++++
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/graphics/oculante/Makefile b/graphics/oculante/Makefile
index 1dd2924ba50d..656d3a058c3a 100644
--- a/graphics/oculante/Makefile
+++ b/graphics/oculante/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	oculante
 DISTVERSION=	0.9.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -18,7 +18,7 @@ LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libfreetype.so:print/freetype2 \
 		libzstd.so:archivers/zstd
 
-USES=		cargo python:build
+USES=		cargo desktop-file-utils python:build
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	woelper
@@ -1041,6 +1041,17 @@ CARGO_CRATES+=	shaderc-0.8.3 \
 BINARY_ALIAS=	python3=${PYTHON_CMD} \
 		git=/usr/bin/false
 
-PLIST_FILES=	bin/${PORTNAME}
+PLIST_FILES=	bin/${PORTNAME} \
+		share/applications/${PORTNAME}.desktop \
+		share/pixmaps/${PORTNAME}.png
+
+post-stage:
+	${INSTALL_DATA} \
+		${WRKSRC}/res/oculante.desktop \
+		${STAGEDIR}${PREFIX}/share/applications/oculante.desktop
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
+	${INSTALL_DATA} \
+		${WRKSRC}/res/icons/icon.png \
+		${STAGEDIR}${PREFIX}/share/pixmaps/oculante.png
 
 .include <bsd.port.mk>
diff --git a/graphics/oculante/files/patch-res_oculante.desktop b/graphics/oculante/files/patch-res_oculante.desktop
new file mode 100644
index 000000000000..9106eba0724c
--- /dev/null
+++ b/graphics/oculante/files/patch-res_oculante.desktop
@@ -0,0 +1,13 @@
+-- workaround for the issue known upstream: https://github.com/woelper/oculante/issues/399
+
+--- res/oculante.desktop.orig	2025-12-09 10:03:48 UTC
++++ res/oculante.desktop
+@@ -3,7 +3,7 @@ Keywords=image viewer;graphics;
+ Comment=A no-nonsense hardware-accelerated image viewer
+ GenericName=Image Viewer
+ Keywords=image viewer;graphics;
+-Exec=oculante %U
++Exec=oculante %F
+ Icon=oculante
+ Terminal=false
+ Categories=Graphics;