git: 2c93a03bbcd5 - main - textproc/py-CommonMark: Allow installation with textproc/cmark

From: Romain Tartière <romain_at_FreeBSD.org>
Date: Sat, 11 Nov 2023 01:55:20 UTC
The branch main has been updated by romain:

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

commit 2c93a03bbcd528fcdce6e06ef7f2b71017e07050
Author:     Romain Tartière <romain@FreeBSD.org>
AuthorDate: 2023-11-11 01:42:15 +0000
Commit:     Romain Tartière <romain@FreeBSD.org>
CommitDate: 2023-11-11 01:54:11 +0000

    textproc/py-CommonMark: Allow installation with textproc/cmark
    
    Both ports install bin/cmark.  Users of textproc/py-CommonMark are
    supposely more interested in the python module rather than the command
    line tool: nothing in the ports tree seems to use bin/cmark from this
    port.
    
    Rename the command to cmark-py to fix conflict
    
    PR:             274848
    Reported by:    jcfyecrayz@liamekaens.com
---
 textproc/cmark/Makefile                     |  2 --
 textproc/py-CommonMark/Makefile             |  3 +--
 textproc/py-CommonMark/files/patch-setup.py | 11 +++++++++++
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/textproc/cmark/Makefile b/textproc/cmark/Makefile
index 0f9c912ef48c..9fcb4977160a 100644
--- a/textproc/cmark/Makefile
+++ b/textproc/cmark/Makefile
@@ -14,8 +14,6 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	commonmark
 USE_LDCONFIG=	yes
 
-CONFLICTS_INSTALL=	 py*-CommonMark # bin/cmark
-
 CMAKE_ARGS=	-DCMAKE_INSTALL_LIBDIR:STRING="lib"
 PLIST_SUB=	VERSION=${PORTVERSION}
 TEST_TARGET=	test
diff --git a/textproc/py-CommonMark/Makefile b/textproc/py-CommonMark/Makefile
index a6ef2128e115..1889c819e234 100644
--- a/textproc/py-CommonMark/Makefile
+++ b/textproc/py-CommonMark/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	CommonMark
 PORTVERSION=	0.9.1
+PORTREVISION=	1
 CATEGORIES=	textproc python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -14,8 +15,6 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR}
 
-CONFLICTS_INSTALL=	cmark
-
 USES=		python
 USE_PYTHON=	autoplist concurrent distutils
 
diff --git a/textproc/py-CommonMark/files/patch-setup.py b/textproc/py-CommonMark/files/patch-setup.py
new file mode 100644
index 000000000000..27857d162967
--- /dev/null
+++ b/textproc/py-CommonMark/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig	2023-11-11 01:20:49 UTC
++++ setup.py
+@@ -48,7 +48,7 @@ setup(
+     keywords=["markup", "markdown", "commonmark"],
+     entry_points={
+         'console_scripts': [
+-            'cmark = commonmark.cmark:main',
++            'cmark-py = commonmark.cmark:main',
+         ]
+     },
+     cmdclass={'test': Test},