diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2020-01-25 18:18:06 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2020-01-25 18:18:06 +0000 |
commit | 6b79aea2572215a2a0338fbc52046479017021aa (patch) | |
tree | 16afff9671635726fafc94fa68822dff347548b8 /x11-fonts/py-opentype-sanitizer | |
parent | 12f917488dd8f3875b131c56bd3155cd31d5d62b (diff) | |
download | ports-6b79aea2572215a2a0338fbc52046479017021aa.tar.gz ports-6b79aea2572215a2a0338fbc52046479017021aa.zip |
Add py-opentype-sanitizer 8.0.0.post2
Python wrapper for the OpenType Sanitizer (OTS)
WWW: https://github.com/googlefonts/ots-python
Notes
Notes:
svn path=/head/; revision=524059
Diffstat (limited to 'x11-fonts/py-opentype-sanitizer')
-rw-r--r-- | x11-fonts/py-opentype-sanitizer/Makefile | 33 | ||||
-rw-r--r-- | x11-fonts/py-opentype-sanitizer/distinfo | 3 | ||||
-rw-r--r-- | x11-fonts/py-opentype-sanitizer/files/patch-setup.py | 42 | ||||
-rw-r--r-- | x11-fonts/py-opentype-sanitizer/files/patch-src-python-ots-__init__.py | 11 | ||||
-rw-r--r-- | x11-fonts/py-opentype-sanitizer/pkg-descr | 3 |
5 files changed, 92 insertions, 0 deletions
diff --git a/x11-fonts/py-opentype-sanitizer/Makefile b/x11-fonts/py-opentype-sanitizer/Makefile new file mode 100644 index 000000000000..766d7ea8c123 --- /dev/null +++ b/x11-fonts/py-opentype-sanitizer/Makefile @@ -0,0 +1,33 @@ +# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= opentype-sanitizer +PORTVERSION= 8.0.0.post2 +CATEGORIES= x11-fonts python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Python wrapper for the OpenType Sanitizer + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR} +RUN_DEPENDS= ots-sanitize:x11-fonts/ots +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= autoplist distutils + +post-patch: + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/src/python/ots/__init__.py + @${RM} -r ${WRKSRC}/src/c/ + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/ots/ots-sanitize.so + +do-test: + cd ${WRKSRC}/ && ${PYTHON_CMD} -m pytest -v + +.include <bsd.port.mk> diff --git a/x11-fonts/py-opentype-sanitizer/distinfo b/x11-fonts/py-opentype-sanitizer/distinfo new file mode 100644 index 000000000000..6fabd5b58874 --- /dev/null +++ b/x11-fonts/py-opentype-sanitizer/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1579945423 +SHA256 (opentype-sanitizer-8.0.0.post2.tar.gz) = 95bbd6ce193841654aef95237e95197addbc0495daa9da2947f64f5ccd86ef38 +SIZE (opentype-sanitizer-8.0.0.post2.tar.gz) = 34069671 diff --git a/x11-fonts/py-opentype-sanitizer/files/patch-setup.py b/x11-fonts/py-opentype-sanitizer/files/patch-setup.py new file mode 100644 index 000000000000..2ce8a8102b5e --- /dev/null +++ b/x11-fonts/py-opentype-sanitizer/files/patch-setup.py @@ -0,0 +1,42 @@ +--- setup.py.orig 2019-10-09 09:44:36 UTC ++++ setup.py +@@ -16,17 +16,17 @@ if sys.version_info[:2] < (3, 6): + ) + + cmdclass = {} +-try: +- from wheel.bdist_wheel import bdist_wheel +-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): + 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 + + ots_sanitize = Executable( + "ots.ots-sanitize", script="build.py", output_dir=os.path.join("build", "meson") diff --git a/x11-fonts/py-opentype-sanitizer/files/patch-src-python-ots-__init__.py b/x11-fonts/py-opentype-sanitizer/files/patch-src-python-ots-__init__.py new file mode 100644 index 000000000000..2530869203d3 --- /dev/null +++ b/x11-fonts/py-opentype-sanitizer/files/patch-src-python-ots-__init__.py @@ -0,0 +1,11 @@ +--- src/python/ots/__init__.py.orig 2019-10-09 09:44:36 UTC ++++ src/python/ots/__init__.py +@@ -3,7 +3,7 @@ import subprocess + import sys + import os + +-OTS_SANITIZE = os.path.join(os.path.dirname(__file__), "ots-sanitize") ++OTS_SANITIZE = "%%LOCALBASE%%/bin/ots-sanitize" + + __all__ = ["sanitize", "OTSError", "CalledProcessError"] + diff --git a/x11-fonts/py-opentype-sanitizer/pkg-descr b/x11-fonts/py-opentype-sanitizer/pkg-descr new file mode 100644 index 000000000000..70839de9a198 --- /dev/null +++ b/x11-fonts/py-opentype-sanitizer/pkg-descr @@ -0,0 +1,3 @@ +Python wrapper for the OpenType Sanitizer + +WWW: https://github.com/googlefonts/ots-python |