diff --git a/dev-python/cffsubr/Manifest b/dev-python/cffsubr/Manifest new file mode 100644 index 0000000000..d42a93d366 --- /dev/null +++ b/dev-python/cffsubr/Manifest @@ -0,0 +1 @@ +DIST cffsubr-0.2.8.tar.gz 124245 BLAKE2B fa78acf9158faf3917f194a2c30a13c2a598a7476a89dc79f95440eb04fe91663e7620729e6be1635ce1df24fff34068c42ea155abb17f016f50e961d13f52af SHA512 5f5a655168c6157799d17e20762893f23a7f7d90e739fb5bbe0a4fd895dc2b1c5359b5bdb92f4cb8333f841cd5b471359825d709f2477afd2bd7322760359d24 diff --git a/dev-python/cffsubr/cffsubr-0.2.8.ebuild b/dev-python/cffsubr/cffsubr-0.2.8.ebuild new file mode 100644 index 0000000000..d98815a40a --- /dev/null +++ b/dev-python/cffsubr/cffsubr-0.2.8.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_8 ) + +inherit distutils-r1 + +SRC_URI="https://github.com/adobe-type-tools/cffsubr/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" +DESCRIPTION="Standalone CFF subroutinizer based on AFDKO tx tool" +HOMEPAGE="https://github.com/adobe-type-tools/cffsubr" +LICENSE="Apache-2.0" +SLOT="0" + +RDEPEND=" + >=dev-util/afdko-3.6.1[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/setuptools_scm[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}/${PN}-system_tx.diff" + "${FILESDIR}/${P}-fix-setup-py.patch" +) + +distutils_enable_tests pytest + +pkg_setup() { + export SETUPTOOLS_SCM_PRETEND_VERSION="${PV%_*}" +} + +src_prepare() { + #no bundled afdko + rm -rf external || die + default +} diff --git a/dev-python/cffsubr/files/cffsubr-0.2.8-fix-setup-py.patch b/dev-python/cffsubr/files/cffsubr-0.2.8-fix-setup-py.patch new file mode 100644 index 0000000000..2d429c2b84 --- /dev/null +++ b/dev-python/cffsubr/files/cffsubr-0.2.8-fix-setup-py.patch @@ -0,0 +1,18 @@ +--- a/setup.py ++++ b//setup.py +@@ -135,7 +135,6 @@ + platforms=["posix", "nt"], + package_dir={"": "src"}, + packages=find_packages("src"), +- ext_modules=[tx], + zip_safe=False, + cmdclass=cmdclass, + install_requires=[ +@@ -145,7 +144,6 @@ + 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/dev-python/cffsubr/files/cffsubr-system_tx.diff b/dev-python/cffsubr/files/cffsubr-system_tx.diff new file mode 100644 index 0000000000..16c41c74c2 --- /dev/null +++ b/dev-python/cffsubr/files/cffsubr-system_tx.diff @@ -0,0 +1,12 @@ +--- a/src/cffsubr/__init__.py ++++ b/src/cffsubr/__init__.py +@@ -60,8 +60,7 @@ def _run_embedded_tx(*args, **kwargs): + subprocess.CompletedProcess object with the following attributes: + args, returncode, stdout, stderr. + """ +- with path(__name__, TX_EXE) as tx_cli: +- return subprocess.run([str(tx_cli)] + list(args), **kwargs) ++ return subprocess.run(['tx'] + list(args), **kwargs) + + + def _tx_subroutinize(data: bytes, output_format: str = CFFTableTag.CFF) -> bytes: diff --git a/dev-python/cffsubr/metadata.xml b/dev-python/cffsubr/metadata.xml new file mode 100644 index 0000000000..6f49eba8f4 --- /dev/null +++ b/dev-python/cffsubr/metadata.xml @@ -0,0 +1,5 @@ + + + + +