git: 57a0570ffd8f - main - x11-fonts/py-cffsubr: Add py-cffsubr 0.2.9.post1

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 07 Mar 2022 18:16:07 UTC
The branch main has been updated by sunpoet:

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

commit 57a0570ffd8fc91a1415248affafe00943009dbf
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-03-07 17:47:02 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-03-07 18:10:53 +0000

    x11-fonts/py-cffsubr: Add py-cffsubr 0.2.9.post1
    
    Standalone CFF subroutinizer based on the AFDKO tx tool.
    
    WWW: https://github.com/adobe-type-tools/cffsubr
---
 x11-fonts/Makefile                        |  1 +
 x11-fonts/py-cffsubr/Makefile             | 28 ++++++++++++++++++++++++++++
 x11-fonts/py-cffsubr/distinfo             |  3 +++
 x11-fonts/py-cffsubr/files/patch-setup.py | 28 ++++++++++++++++++++++++++++
 x11-fonts/py-cffsubr/pkg-descr            |  3 +++
 5 files changed, 63 insertions(+)

diff --git a/x11-fonts/Makefile b/x11-fonts/Makefile
index 66104094926a..0855f6de2ed9 100644
--- a/x11-fonts/Makefile
+++ b/x11-fonts/Makefile
@@ -217,6 +217,7 @@
     SUBDIR += py-babelfont
     SUBDIR += py-bdflib
     SUBDIR += py-booleanOperations
+    SUBDIR += py-cffsubr
     SUBDIR += py-compreffor
     SUBDIR += py-cu2qu
     SUBDIR += py-defcon
diff --git a/x11-fonts/py-cffsubr/Makefile b/x11-fonts/py-cffsubr/Makefile
new file mode 100644
index 000000000000..fbbe54a640e1
--- /dev/null
+++ b/x11-fonts/py-cffsubr/Makefile
@@ -0,0 +1,28 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	cffsubr
+PORTVERSION=	0.2.9.post1
+CATEGORIES=	x11-fonts python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Standalone CFF subroutinizer based on the AFDKO tx tool
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}afdko>=0:x11-fonts/py-afdko@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}fonttools>=4.10.2:print/py-fonttools@${PY_FLAVOR}
+
+USES=		python:3.6+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+post-patch:
+# Clean up bundled libraries
+	@${RM} -r ${WRKSRC}/external/
+
+.include <bsd.port.mk>
diff --git a/x11-fonts/py-cffsubr/distinfo b/x11-fonts/py-cffsubr/distinfo
new file mode 100644
index 000000000000..934b510c85ca
--- /dev/null
+++ b/x11-fonts/py-cffsubr/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1646057862
+SHA256 (cffsubr-0.2.9.post1.tar.gz) = 6b31412dcf49c8fa84664bda867e2eddc55b6fe6fa696ff253c4f13a9ff2fc5c
+SIZE (cffsubr-0.2.9.post1.tar.gz) = 12671095
diff --git a/x11-fonts/py-cffsubr/files/patch-setup.py b/x11-fonts/py-cffsubr/files/patch-setup.py
new file mode 100644
index 000000000000..cbbdca8803a1
--- /dev/null
+++ b/x11-fonts/py-cffsubr/files/patch-setup.py
@@ -0,0 +1,28 @@
+--- setup.py.orig	2021-11-25 15:57:49 UTC
++++ setup.py
+@@ -107,6 +107,9 @@ elif platform.system() == "Darwin":
+ elif platform.system() == "Windows":
+     plat = "win"
+     compiler = "visualstudio"
++elif platform.system() == "FreeBSD":
++    plat = "freebsd"
++    compiler = "cc"
+ else:
+     raise NotImplementedError(platform.system())
+ 
+@@ -136,7 +139,6 @@ setup(
+     package_dir={"": "src"},
+     packages=find_packages("src"),
+     entry_points={"console_scripts": ["cffsubr = cffsubr.__main__:main"]},
+-    ext_modules=[tx],
+     zip_safe=False,
+     cmdclass=cmdclass,
+     install_requires=[
+@@ -146,7 +148,6 @@ setup(
+     setup_requires=[
+         "setuptools_scm",
+         # finds all git tracked files including submodules when making sdist MANIFEST
+-        "setuptools-git-ls-files",
+     ],
+     extras_require={"testing": ["pytest"]},
+     python_requires=">=3.6",
diff --git a/x11-fonts/py-cffsubr/pkg-descr b/x11-fonts/py-cffsubr/pkg-descr
new file mode 100644
index 000000000000..985ffd17adb8
--- /dev/null
+++ b/x11-fonts/py-cffsubr/pkg-descr
@@ -0,0 +1,3 @@
+Standalone CFF subroutinizer based on the AFDKO tx tool.
+
+WWW: https://github.com/adobe-type-tools/cffsubr