Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jan 2020 18:18:07 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r524059 - in head/x11-fonts: . py-opentype-sanitizer py-opentype-sanitizer/files
Message-ID:  <202001251818.00PII7AD062984@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Sat Jan 25 18:18:06 2020
New Revision: 524059
URL: https://svnweb.freebsd.org/changeset/ports/524059

Log:
  Add py-opentype-sanitizer 8.0.0.post2
  
  Python wrapper for the OpenType Sanitizer (OTS)
  
  WWW: https://github.com/googlefonts/ots-python

Added:
  head/x11-fonts/py-opentype-sanitizer/
  head/x11-fonts/py-opentype-sanitizer/Makefile   (contents, props changed)
  head/x11-fonts/py-opentype-sanitizer/distinfo   (contents, props changed)
  head/x11-fonts/py-opentype-sanitizer/files/
  head/x11-fonts/py-opentype-sanitizer/files/patch-setup.py   (contents, props changed)
  head/x11-fonts/py-opentype-sanitizer/files/patch-src-python-ots-__init__.py   (contents, props changed)
  head/x11-fonts/py-opentype-sanitizer/pkg-descr   (contents, props changed)
Modified:
  head/x11-fonts/Makefile

Modified: head/x11-fonts/Makefile
==============================================================================
--- head/x11-fonts/Makefile	Sat Jan 25 18:18:00 2020	(r524058)
+++ head/x11-fonts/Makefile	Sat Jan 25 18:18:06 2020	(r524059)
@@ -198,6 +198,7 @@
     SUBDIR += py-fontMath
     SUBDIR += py-fontmake
     SUBDIR += py-glyphsLib
+    SUBDIR += py-opentype-sanitizer
     SUBDIR += py-ufo2ft
     SUBDIR += py-ufoLib
     SUBDIR += py-ufolint

Added: head/x11-fonts/py-opentype-sanitizer/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-fonts/py-opentype-sanitizer/Makefile	Sat Jan 25 18:18:06 2020	(r524059)
@@ -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>

Added: head/x11-fonts/py-opentype-sanitizer/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-fonts/py-opentype-sanitizer/distinfo	Sat Jan 25 18:18:06 2020	(r524059)
@@ -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

Added: head/x11-fonts/py-opentype-sanitizer/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-fonts/py-opentype-sanitizer/files/patch-setup.py	Sat Jan 25 18:18:06 2020	(r524059)
@@ -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")

Added: head/x11-fonts/py-opentype-sanitizer/files/patch-src-python-ots-__init__.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-fonts/py-opentype-sanitizer/files/patch-src-python-ots-__init__.py	Sat Jan 25 18:18:06 2020	(r524059)
@@ -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"]
+ 

Added: head/x11-fonts/py-opentype-sanitizer/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-fonts/py-opentype-sanitizer/pkg-descr	Sat Jan 25 18:18:06 2020	(r524059)
@@ -0,0 +1,3 @@
+Python wrapper for the OpenType Sanitizer
+
+WWW: https://github.com/googlefonts/ots-python



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001251818.00PII7AD062984>