Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 May 2021 15:25:59 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c7864c5a12e0 - main - print/py-uharfbuzz: Add print/py-uharfbuzz 0.16.0
Message-ID:  <202105161525.14GFPxa9065779@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

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

commit c7864c5a12e00502b72ecbe8275dafe3d4e7de30
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-05-16 15:12:57 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-05-16 15:23:48 +0000

    print/py-uharfbuzz: Add print/py-uharfbuzz 0.16.0
    
    uharfbuzz provides streamlined Cython bindings for the HarfBuzz shaping engine.
    
    WWW: https://github.com/harfbuzz/uharfbuzz
---
 print/Makefile                                     |  1 +
 print/py-uharfbuzz/Makefile                        | 25 ++++++++++++++++++++++
 print/py-uharfbuzz/distinfo                        |  3 +++
 print/py-uharfbuzz/files/patch-setup.py            | 16 ++++++++++++++
 .../files/patch-src-uharfbuzz-_harfbuzz.cpp        | 17 +++++++++++++++
 print/py-uharfbuzz/pkg-descr                       |  3 +++
 6 files changed, 65 insertions(+)

diff --git a/print/Makefile b/print/Makefile
index a0ab32b9ea00..550ec7fa3165 100644
--- a/print/Makefile
+++ b/print/Makefile
@@ -195,6 +195,7 @@
     SUBDIR += py-rtf
     SUBDIR += py-ttfautohint-py
     SUBDIR += py-ufolib2
+    SUBDIR += py-uharfbuzz
     SUBDIR += py-weasyprint
     SUBDIR += qpdf
     SUBDIR += qpdfview
diff --git a/print/py-uharfbuzz/Makefile b/print/py-uharfbuzz/Makefile
new file mode 100644
index 000000000000..19fe9b8d261d
--- /dev/null
+++ b/print/py-uharfbuzz/Makefile
@@ -0,0 +1,25 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	uharfbuzz
+PORTVERSION=	0.16.0
+CATEGORIES=	print python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Streamlined Cython bindings for the harfbuzz shaping engine
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR}
+LIB_DEPENDS=	libharfbuzz.so:print/harfbuzz
+
+USES=		compiler:c++11-lang python:3.6+ zip
+USE_PYTHON=	autoplist concurrent cython distutils
+
+post-patch:
+	@${RM} -fr ${WRKSRC}/harfbuzz/
+	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/setup.py ${WRKSRC}/src/uharfbuzz/_harfbuzz.cpp
+
+.include <bsd.port.mk>
diff --git a/print/py-uharfbuzz/distinfo b/print/py-uharfbuzz/distinfo
new file mode 100644
index 000000000000..f795973ad7c4
--- /dev/null
+++ b/print/py-uharfbuzz/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1620928545
+SHA256 (uharfbuzz-0.16.0.zip) = 70f11ccfbb59028dec6ce768960ffcc4d44eee0e095d7b58421799d5e84cb17a
+SIZE (uharfbuzz-0.16.0.zip) = 1128591
diff --git a/print/py-uharfbuzz/files/patch-setup.py b/print/py-uharfbuzz/files/patch-setup.py
new file mode 100644
index 000000000000..694e58bff25e
--- /dev/null
+++ b/print/py-uharfbuzz/files/patch-setup.py
@@ -0,0 +1,16 @@
+--- setup.py.orig	2021-05-09 03:05:20 UTC
++++ setup.py
+@@ -28,10 +28,10 @@ if platform.system() == 'Darwin':
+     extra_link_args.extend(['-framework', 'ApplicationServices'])
+ 
+ extension = Extension(
+-    'uharfbuzz._harfbuzz',
++    'uharfbuzz',
+     define_macros=define_macros,
+-    include_dirs=['harfbuzz/src'],
+-    sources=['src/uharfbuzz/_harfbuzz.pyx', 'harfbuzz/src/harfbuzz.cc'],
++    include_dirs=['%%LOCALBASE%%/include/harfbuzz'],
++    sources=['src/uharfbuzz/_harfbuzz.pyx'],
+     language='c++',
+     extra_compile_args=extra_compile_args,
+     extra_link_args=extra_link_args,
diff --git a/print/py-uharfbuzz/files/patch-src-uharfbuzz-_harfbuzz.cpp b/print/py-uharfbuzz/files/patch-src-uharfbuzz-_harfbuzz.cpp
new file mode 100644
index 000000000000..67e37280fd56
--- /dev/null
+++ b/print/py-uharfbuzz/files/patch-src-uharfbuzz-_harfbuzz.cpp
@@ -0,0 +1,17 @@
+--- src/uharfbuzz/_harfbuzz.cpp.orig	2021-05-09 03:05:40 UTC
++++ src/uharfbuzz/_harfbuzz.cpp
+@@ -18,13 +18,12 @@
+             "-std=c++11"
+         ],
+         "include_dirs": [
+-            "harfbuzz/src"
++            "%%LOCALBASE%%/include/harfbuzz"
+         ],
+         "language": "c++",
+         "name": "uharfbuzz._harfbuzz",
+         "sources": [
+             "src/uharfbuzz/_harfbuzz.pyx",
+-            "harfbuzz/src/harfbuzz.cc"
+         ]
+     },
+     "module_name": "uharfbuzz._harfbuzz"
diff --git a/print/py-uharfbuzz/pkg-descr b/print/py-uharfbuzz/pkg-descr
new file mode 100644
index 000000000000..1ec6489325af
--- /dev/null
+++ b/print/py-uharfbuzz/pkg-descr
@@ -0,0 +1,3 @@
+uharfbuzz provides streamlined Cython bindings for the HarfBuzz shaping engine.
+
+WWW: https://github.com/harfbuzz/uharfbuzz



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