diff options
author | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2021-06-18 03:19:07 +0200 |
---|---|---|
committer | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2021-06-18 04:16:54 +0200 |
commit | c949e2c93b6a3ab9394aa6cbb4c26cdbc684b646 (patch) | |
tree | 0c0ac72bf3e70ec9038f3dba0ea236fba5539082 | |
parent | dev-python/MutatorMath: add unicodedata2 test dep (diff) | |
download | guru-c949e2c9.tar.gz guru-c949e2c9.tar.bz2 guru-c949e2c9.zip |
dev-util/psautohint: initial import
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
-rw-r--r-- | dev-util/psautohint/Manifest | 2 | ||||
-rw-r--r-- | dev-util/psautohint/files/psautohint-2.3.0-no-build-library.patch | 39 | ||||
-rw-r--r-- | dev-util/psautohint/files/psautohint-2.3.0-no-werror.patch | 11 | ||||
-rw-r--r-- | dev-util/psautohint/files/psautohint-bininpath.diff | 10 | ||||
-rw-r--r-- | dev-util/psautohint/metadata.xml | 5 | ||||
-rw-r--r-- | dev-util/psautohint/psautohint-2.3.0.ebuild | 77 |
6 files changed, 144 insertions, 0 deletions
diff --git a/dev-util/psautohint/Manifest b/dev-util/psautohint/Manifest new file mode 100644 index 0000000000..a96fc73480 --- /dev/null +++ b/dev-util/psautohint/Manifest @@ -0,0 +1,2 @@ +DIST psautohint-2.3.0.tar.gz 181570 BLAKE2B 20127221ccbe890b363aba944ca19f6b126ba7c61f0b5e668288a12f93aebfe3541257e576f2ffce9bd935886f5cb9b4eb5c0dc08c0a8b1953484660fef8868a SHA512 943ac93ea4b0c188135cf2146803c36a3e5aa5b2e14924252281f22f6fc4190b935bdd72785107bbaf36d7503f48fc952fb32cd6965791c4ebebc699c0d7c5f5 +DIST psautohint-testdata-1e4c5061d328105c4dcfcb6fdbc27ec49b3e9d23.tar.gz 21949984 BLAKE2B a5da67eb4b9f3d0ce5d86469bc0a5f771fa743198836db35121e9c62b66c8b8df00fef6e40e8832e33aee065fe3bdd0a24d1b590bce6fb66d7c43f6719236242 SHA512 03d4962958d3551ffdf99463d28723f6b43d42029843da1b40493b0bfc2e586ebf40db3a2497b36b5fde345de4b6998cfc1131c6fb4e8352b05fb59fc4e90e7f diff --git a/dev-util/psautohint/files/psautohint-2.3.0-no-build-library.patch b/dev-util/psautohint/files/psautohint-2.3.0-no-build-library.patch new file mode 100644 index 0000000000..44698b6af7 --- /dev/null +++ b/dev-util/psautohint/files/psautohint-2.3.0-no-build-library.patch @@ -0,0 +1,39 @@ +diff '--color=auto' -ru psautohint-2.3.0/setup.py /var/tmp/portage/dev-util/psautohint-2.3.0/work/psautohint-2.3.0/setup.py +--- psautohint-2.3.0/setup.py 2021-06-18 02:49:14.569282664 +0200 ++++ /var/tmp/portage/dev-util/psautohint-2.3.0/work/psautohint-2.3.0/setup.py 2021-06-18 02:51:12.569250040 +0200 +@@ -192,7 +192,7 @@ + # If we were asked to build any C/C++ libraries, make sure that the + # directory where we put them is in the library search path for + # linking executables. +- if self.distribution.has_c_libraries(): ++ if False: + build_clib = self.get_finalized_command('build_clib') + self.libraries.extend(build_clib.get_library_names() or []) + self.library_dirs.append(build_clib.build_clib) +@@ -432,15 +432,13 @@ + class CustomBuildExt(_build_ext): + + def run(self): +- if self.distribution.has_c_libraries(): ++ if False: + self.run_command("build_clib") + _build_ext.run(self) + + + cmdclass = { +- 'build_clib': CustomBuildClib, + 'build_ext': CustomBuildExt, +- 'build_exe': build_exe, + } + + +@@ -572,9 +570,7 @@ + license='Apache License, Version 2.0', + package_dir={'': 'python'}, + packages=['psautohint'], +- libraries=libraries, + ext_modules=ext_modules, +- executables=executables, + entry_points={ + 'console_scripts': [ + "psautohint = psautohint.__main__:main", diff --git a/dev-util/psautohint/files/psautohint-2.3.0-no-werror.patch b/dev-util/psautohint/files/psautohint-2.3.0-no-werror.patch new file mode 100644 index 0000000000..5032e57828 --- /dev/null +++ b/dev-util/psautohint/files/psautohint-2.3.0-no-werror.patch @@ -0,0 +1,11 @@ +diff '--color=auto' -ru psautohint-2.3.0/libpsautohint/meson.build /var/tmp/portage/dev-util/psautohint-2.3.0/work/psautohint-2.3.0/libpsautohint/meson.build +--- psautohint-2.3.0/libpsautohint/meson.build 2021-06-18 02:49:14.557282566 +0200 ++++ /var/tmp/portage/dev-util/psautohint-2.3.0/work/psautohint-2.3.0/libpsautohint/meson.build 2021-06-18 02:54:34.873912737 +0200 +@@ -21,7 +21,6 @@ + '-Wstringop-truncation', + '-Wunreachable-code-break', + '-Wunused-macros', +- '-Werror', + ] + + add_global_arguments(cc.get_supported_arguments(cflags), language : 'c') diff --git a/dev-util/psautohint/files/psautohint-bininpath.diff b/dev-util/psautohint/files/psautohint-bininpath.diff new file mode 100644 index 0000000000..fe6b5df3c0 --- /dev/null +++ b/dev-util/psautohint/files/psautohint-bininpath.diff @@ -0,0 +1,10 @@ +--- a/setup.py ++++ b/setup.py +@@ -564,6 +564,7 @@ ext_modules = [ + sources=[ + "python/psautohint/_psautohint.c", + ], ++ libraries = ['psautohint'], + ), + ] + diff --git a/dev-util/psautohint/metadata.xml b/dev-util/psautohint/metadata.xml new file mode 100644 index 0000000000..6f49eba8f4 --- /dev/null +++ b/dev-util/psautohint/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +</pkgmetadata> diff --git a/dev-util/psautohint/psautohint-2.3.0.ebuild b/dev-util/psautohint/psautohint-2.3.0.ebuild new file mode 100644 index 0000000000..0684247cbc --- /dev/null +++ b/dev-util/psautohint/psautohint-2.3.0.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +COMMIT="1e4c5061d328105c4dcfcb6fdbc27ec49b3e9d23" +DISTUTILS_IN_SOURCE_BUILD=1 +EMESON_SOURCE="${S}/libpsautohint" +PYTHON_COMPAT=( python3_8 ) + +inherit meson distutils-r1 + +SRC_URI=" + https://github.com/adobe-type-tools/psautohint/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + test? ( + https://github.com/adobe-type-tools/psautohint-testdata/archive/${COMMIT}.tar.gz -> psautohint-testdata-${COMMIT}.tar.gz + ) +" +KEYWORDS="~amd64 ~x86" +DESCRIPTION="A standalone version of AFDKO autohinter" +HOMEPAGE="https://github.com/adobe-type-tools/psautohint" +LICENSE="Apache-2.0" +SLOT="0" + +RDEPEND=">=dev-python/fonttools-4.20[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-bininpath.diff" + "${FILESDIR}/${P}-no-build-library.patch" + "${FILESDIR}/${P}-no-werror.patch" +) + +distutils_enable_tests pytest + +pkg_setup() { + local _v=$(ver_cut 4) + _v="$(ver_cut 1-3)${_v:0:1}$(ver_cut 5)" + export SETUPTOOLS_SCM_PRETEND_VERSION="${_v/p/.post}" + MESON_BUILD_DIR="${WORKDIR}/${P}-build" +} + +src_unpack() { + default + if [ -d "${WORKDIR}/psautohint-testdata-${COMMIT}" ]; then + mv "${WORKDIR}/psautohint-testdata-${COMMIT}"/* "${S}/tests/integration/data/" || die + fi +} + +src_configure() { + BUILD_DIR="${MESON_BUILD_DIR}" meson_src_configure + distutils-r1_src_configure +} + +src_compile() { + BUILD_DIR="${MESON_BUILD_DIR}" meson_src_compile + distutils-r1_src_compile +} + +python_compile() { + esetup.py build_py build_ext --library-dirs "${MESON_BUILD_DIR}" +} + +src_install() { + BUILD_DIR="${MESON_BUILD_DIR}" meson_src_install + distutils-r1_src_install + dodoc doc/* +} + +python_test() { + local -x PATH="${BUILD_DIR}/test/scripts:${MESON_BUILD_DIR}l:${PATH}" + local -x LD_LIBRARY_PATH="${MESON_BUILD_DIR}" + distutils_install_for_testing + epytest -vv \ + --deselect tests/integration/test_hint.py::test_hashmap_old_version \ + || die +} |