git: fb2f1d5df969 - main - devel/py-nbclassic: Add DESKTOP option

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 28 Apr 2023 00:00:41 UTC
The branch main has been updated by sunpoet:

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

commit fb2f1d5df969460c0ecbdedccc633200cd06f253
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-04-27 23:58:41 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-04-27 23:58:41 +0000

    devel/py-nbclassic: Add DESKTOP option
    
    - Bump PORTREVISION for dependency and package change
---
 devel/py-nbclassic/Makefile                    |  9 ++++++++-
 devel/py-nbclassic/files/extra-patch-setup.cfg | 13 +++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/devel/py-nbclassic/Makefile b/devel/py-nbclassic/Makefile
index 2a1712bb769c..205f2ecd9de2 100644
--- a/devel/py-nbclassic/Makefile
+++ b/devel/py-nbclassic/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	nbclassic
 PORTVERSION=	0.5.5
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI \
 		https://github.com/jupyter/nbclassic/releases/download/v${PORTVERSION}/
@@ -30,9 +31,15 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}argon2-cffi>=0:security/py-argon2-cffi@${PY_
 		${PYTHON_PKGNAMEPREFIX}tornado>=6.1:www/py-tornado@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}traitlets>=4.2.1:devel/py-traitlets@${PY_FLAVOR}
 
-USES=		desktop-file-utils python:3.7+
+USES=		python:3.7+
 USE_PYTHON=	autoplist concurrent distutils
 
 NO_ARCH=	yes
 
+OPTIONS_DEFINE=	DESKTOP
+DESKTOP_DESC=	Install desktop entry file
+
+DESKTOP_USES=		desktop-file-utils
+DESKTOP_EXTRA_PATCHES_OFF=	${PATCHDIR}/extra-patch-setup.cfg
+
 .include <bsd.port.mk>
diff --git a/devel/py-nbclassic/files/extra-patch-setup.cfg b/devel/py-nbclassic/files/extra-patch-setup.cfg
new file mode 100644
index 000000000000..5a525ce8c1b0
--- /dev/null
+++ b/devel/py-nbclassic/files/extra-patch-setup.cfg
@@ -0,0 +1,13 @@
+--- setup.cfg.orig	2023-04-05 03:12:02 UTC
++++ setup.cfg
+@@ -51,10 +51,6 @@ install_requires =
+ [options.data_files]
+ etc/jupyter/jupyter_server_config.d =
+     jupyter_server_config.d/nbclassic.json
+-share/applications =
+-    jupyter-nbclassic.desktop
+-share/icons/hicolor/scalable/apps =
+-    nbclassic.svg
+ 
+ [options.extras_require]
+ test =