git: 10ce7855852c - main - graphics/py-mcomix: Add .desktop file

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Fri, 04 Mar 2022 17:36:42 UTC
The branch main has been updated by jhale:

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

commit 10ce7855852c9ff3bac6a76d2c5ba223bac24e86
Author:     Stefan Ehmann <shoesoft@gmx.net>
AuthorDate: 2022-03-04 17:33:48 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2022-03-04 17:36:09 +0000

    graphics/py-mcomix: Add .desktop file
    
    PR:             262311
    Reported by:    tod.jackson@gmail.com
---
 graphics/py-mcomix/Makefile  | 4 +++-
 graphics/py-mcomix/pkg-plist | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/graphics/py-mcomix/Makefile b/graphics/py-mcomix/Makefile
index 9dda1b90bb37..2054f6b71506 100644
--- a/graphics/py-mcomix/Makefile
+++ b/graphics/py-mcomix/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	mcomix
 PORTVERSION=	1.2.1g20210526
+PORTREVISION=	1
 CATEGORIES=	graphics
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -14,7 +15,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pillow>=5.2.0:graphics/py-pillow@${PY_FLAVOR}
 RUN_DEPENDS:=	${BUILD_DEPENDS}
 
-USES=		gnome python:3.8+ shebangfix
+USES=		desktop-file-utils gnome python:3.8+ shebangfix
 USE_GNOME=	gtk30 pygobject3
 USE_PYTHON=	flavors
 USE_GITHUB=	yes
@@ -41,5 +42,6 @@ do-install:
 	(cd ${WRKSRC}/mcomix/mcomix && ${COPYTREE_SHARE} . ${STAGEDIR}${PYTHON_SITELIBDIR}/mcomix)
 	${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/mcomix
 	${INSTALL} ${WRKSRC}/mcomix/mcomixstarter.py ${STAGEDIR}/${PREFIX}/bin/mcomix
+	${INSTALL_DATA} ${WRKSRC}/mime/mcomix.desktop ${STAGEDIR}${PREFIX}/share/applications/
 
 .include <bsd.port.mk>
diff --git a/graphics/py-mcomix/pkg-plist b/graphics/py-mcomix/pkg-plist
index 105a14a00f7f..aab58eacb310 100644
--- a/graphics/py-mcomix/pkg-plist
+++ b/graphics/py-mcomix/pkg-plist
@@ -257,3 +257,4 @@ bin/mcomix
 %%PYTHON_SITELIBDIR%%/mcomix/upgrade_tools.py
 %%PYTHON_SITELIBDIR%%/mcomix/worker_thread.py
 %%PYTHON_SITELIBDIR%%/mcomix/zoom.py
+share/applications/mcomix.desktop