git: 6c4a339fa855 - main - x11-fonts/py-opentype-sanitizer: Update to 9.1.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 05 Jun 2023 18:51:32 UTC
The branch main has been updated by sunpoet:

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

commit 6c4a339fa8550f3e34a7087d6954fb3328f2bc50
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-06-05 18:38:44 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-06-05 18:46:56 +0000

    x11-fonts/py-opentype-sanitizer: Update to 9.1.0
    
    - Convert to USE_PYTHON=pep517
    - Rename build.py to build_ext.py. Otherwise, it masks PEP517_BUILD_CMD (python -m build ...).
    
    Changes:        https://github.com/googlefonts/ots-python/releases
---
 x11-fonts/py-opentype-sanitizer/Makefile           |  9 ++++--
 x11-fonts/py-opentype-sanitizer/distinfo           |  6 ++--
 .../files/patch-pyproject.toml                     | 10 ++++++
 .../py-opentype-sanitizer/files/patch-setup.py     | 36 +++++++++++-----------
 4 files changed, 37 insertions(+), 24 deletions(-)

diff --git a/x11-fonts/py-opentype-sanitizer/Makefile b/x11-fonts/py-opentype-sanitizer/Makefile
index de2091d0e68b..24606ed1f82d 100644
--- a/x11-fonts/py-opentype-sanitizer/Makefile
+++ b/x11-fonts/py-opentype-sanitizer/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	opentype-sanitizer
-PORTVERSION=	9.0.0
+PORTVERSION=	9.1.0
 CATEGORIES=	x11-fonts python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,15 +11,18 @@ WWW=		https://github.com/googlefonts/ots-python
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR}
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	ots-sanitize:x11-fonts/ots
 
 USES=		python:3.6+
-USE_PYTHON=	autoplist concurrent distutils pytest
+USE_PYTHON=	autoplist concurrent pep517 pytest
 
 LDFLAGS+=	-lpython${PYTHON_VER}${PYTHON_ABIVER}
 
 post-patch:
+	@${MV} ${WRKSRC}/build.py ${WRKSRC}/build_ext.py
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/src/python/ots/__init__.py
 	@${RM} -r ${WRKSRC}/src/c/
 
diff --git a/x11-fonts/py-opentype-sanitizer/distinfo b/x11-fonts/py-opentype-sanitizer/distinfo
index 3cbb158a4569..587ed2ed20d4 100644
--- a/x11-fonts/py-opentype-sanitizer/distinfo
+++ b/x11-fonts/py-opentype-sanitizer/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1663672778
-SHA256 (opentype-sanitizer-9.0.0.tar.gz) = 4b89660e166a1fe057ab1c6b63038fc48ee73e768e80e1bf982abaf7b16fa064
-SIZE (opentype-sanitizer-9.0.0.tar.gz) = 162061
+TIMESTAMP = 1685792192
+SHA256 (opentype-sanitizer-9.1.0.tar.gz) = d5975df9e4440a299997c2fc082926ee90a33744da7d2b1ce62d98ebfa07f3c2
+SIZE (opentype-sanitizer-9.1.0.tar.gz) = 159945
diff --git a/x11-fonts/py-opentype-sanitizer/files/patch-pyproject.toml b/x11-fonts/py-opentype-sanitizer/files/patch-pyproject.toml
new file mode 100644
index 000000000000..1c8b1c94759a
--- /dev/null
+++ b/x11-fonts/py-opentype-sanitizer/files/patch-pyproject.toml
@@ -0,0 +1,10 @@
+--- pyproject.toml.orig	2023-05-31 23:17:56 UTC
++++ pyproject.toml
+@@ -3,7 +3,5 @@ requires = [
+     "setuptools",
+     "wheel",
+     "setuptools_scm",
+-    "meson >= 0.48",
+-    "ninja",
+ ]
+ build-backend = "setuptools.build_meta"
diff --git a/x11-fonts/py-opentype-sanitizer/files/patch-setup.py b/x11-fonts/py-opentype-sanitizer/files/patch-setup.py
index 2ce8a8102b5e..dc5492e3a1ad 100644
--- a/x11-fonts/py-opentype-sanitizer/files/patch-setup.py
+++ b/x11-fonts/py-opentype-sanitizer/files/patch-setup.py
@@ -1,6 +1,6 @@
---- setup.py.orig	2019-10-09 09:44:36 UTC
+--- setup.py.orig	2023-05-31 23:17:56 UTC
 +++ setup.py
-@@ -16,17 +16,17 @@ if sys.version_info[:2] < (3, 6):
+@@ -17,19 +17,8 @@ if sys.version_info[:2] < (3, 6):
      )
  
  cmdclass = {}
@@ -9,34 +9,34 @@
 -except ImportError:
 -    pass
 -else:
-+#try:
-+#    from wheel.bdist_wheel import bdist_wheel
-+#except ImportError:
-+#    pass
-+#else:
  
 -    class UniversalBdistWheel(bdist_wheel):
 -        def get_tag(self):
 -            return ("py2.py3", "none") + bdist_wheel.get_tag(self)[2:]
-+#    class UniversalBdistWheel(bdist_wheel):
-+#        def get_tag(self):
-+#            return ("py2.py3", "none") + bdist_wheel.get_tag(self)[2:]
  
 -    cmdclass["bdist_wheel"] = UniversalBdistWheel
-+#    cmdclass["bdist_wheel"] = UniversalBdistWheel
- 
- 
+-
+-
  class Download(Command):
-@@ -212,9 +212,9 @@ class CustomEggInfo(egg_info):
+ 
+     user_options = [
+@@ -213,10 +202,6 @@ class CustomEggInfo(egg_info):
          egg_info.run(self)
  
  
 -cmdclass["download"] = Download
 -cmdclass["build_ext"] = ExecutableBuildExt
 -cmdclass["egg_info"] = CustomEggInfo
-+#cmdclass["download"] = Download
-+#cmdclass["build_ext"] = ExecutableBuildExt
-+#cmdclass["egg_info"] = CustomEggInfo
+-
+ build_options = []
+ platform_tags = get_platform().split("-")
+ if "macosx" in platform_tags:
+@@ -227,7 +212,7 @@ if "macosx" in platform_tags:
  
  ots_sanitize = Executable(
-     "ots.ots-sanitize", script="build.py", output_dir=os.path.join("build", "meson")
+     "ots.ots-sanitize",
+-    script="build.py",
++    script="build_ext.py",
+     options=build_options,
+     output_dir=os.path.join("build", "meson"),
+ )