commit:     9337863685018665215cab86673d7ef926c02f45
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Tue Feb 28 09:16:17 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Feb 28 10:08:00 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=93378636

dev-util/psautohint: enable py3.11

I moved C library into a separate package.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 dev-util/psautohint/Manifest                       |  2 +-
 .../files/psautohint-2.3.0-no-build-library.patch  |  5 +-
 .../files/psautohint-2.3.0-no-werror.patch         | 11 ---
 ...ath.diff => psautohint-2.3.0-system-libs.patch} |  0
 dev-util/psautohint/psautohint-2.4.0-r1.ebuild     | 68 +++++++++++++++
 dev-util/psautohint/psautohint-2.4.0.ebuild        | 97 ----------------------
 6 files changed, 71 insertions(+), 112 deletions(-)

diff --git a/dev-util/psautohint/Manifest b/dev-util/psautohint/Manifest
index a0367e173..f8e805189 100644
--- a/dev-util/psautohint/Manifest
+++ b/dev-util/psautohint/Manifest
@@ -1,2 +1,2 @@
+DIST psautohint-2.4.0-testdata.gh.tar.gz 21949984 BLAKE2B 
a5da67eb4b9f3d0ce5d86469bc0a5f771fa743198836db35121e9c62b66c8b8df00fef6e40e8832e33aee065fe3bdd0a24d1b590bce6fb66d7c43f6719236242
 SHA512 
03d4962958d3551ffdf99463d28723f6b43d42029843da1b40493b0bfc2e586ebf40db3a2497b36b5fde345de4b6998cfc1131c6fb4e8352b05fb59fc4e90e7f
 DIST psautohint-2.4.0.gh.tar.gz 181009 BLAKE2B 
bb6ed5ae6b800742d8d1061004bfb49a84e3b9c99977a653ef8eeccf38d9c03261be5b735df20ee93dcf712b8b6ade7a2391937f327206fc2e01f2b5bcbe9022
 SHA512 
dfc29d020bedf8bd546e395743befb390e9fb01a3025aa10357a32724c9a78236acd57e05300aa26be630c9d43edab8bda731dc4f51c0a07d0bef79112d952aa
-DIST psautohint-testdata-1e4c5061d328105c4dcfcb6fdbc27ec49b3e9d23.gh.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
index 44698b6af..2245a901e 100644
--- 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
@@ -1,6 +1,5 @@
-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
+--- a/setup.py
++++ b/setup.py
 @@ -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

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
deleted file mode 100644
index 5032e5782..000000000
--- a/dev-util/psautohint/files/psautohint-2.3.0-no-werror.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-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-2.3.0-system-libs.patch
similarity index 100%
rename from dev-util/psautohint/files/psautohint-bininpath.diff
rename to dev-util/psautohint/files/psautohint-2.3.0-system-libs.patch

diff --git a/dev-util/psautohint/psautohint-2.4.0-r1.ebuild 
b/dev-util/psautohint/psautohint-2.4.0-r1.ebuild
new file mode 100644
index 000000000..26fb2b5d8
--- /dev/null
+++ b/dev-util/psautohint/psautohint-2.4.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=setuptools
+inherit meson distutils-r1
+
+COMMIT="1e4c5061d328105c4dcfcb6fdbc27ec49b3e9d23"
+DESCRIPTION="Python wrapper for Adobe's PostScript autohinter"
+HOMEPAGE="
+       https://pypi.org/project/psautohint/
+       https://github.com/adobe-type-tools/psautohint
+"
+SRC_URI="
+       
https://github.com/adobe-type-tools/${PN}/archive/refs/tags/v${PV}.tar.gz -> 
${P}.gh.tar.gz
+       test? (
+               
https://github.com/adobe-type-tools/${PN}-testdata/archive/${COMMIT}.tar.gz -> 
${P}-testdata.gh.tar.gz
+       )
+"
+
+KEYWORDS="~amd64"
+LICENSE="Apache-2.0"
+SLOT="0"
+
+DEPEND="media-gfx/libpsautohint"
+RDEPEND="
+       ${DEPEND}
+       >=dev-python/fonttools-4.20[${PYTHON_USEDEP}]
+       dev-python/fs[${PYTHON_USEDEP}]
+"
+BDEPEND="dev-python/setuptools_scm[${PYTHON_USEDEP}]"
+
+DOCS=( doc {NEWS,README}.md )
+
+PATCHES=(
+       "${FILESDIR}/${PN}-2.3.0-system-libs.patch"
+       "${FILESDIR}/${PN}-2.3.0-no-build-library.patch"
+)
+
+EPYTEST_DESELECT=(
+       tests/integration/test_hint.py::test_hashmap_old_version
+       
"tests/integration/test_mmhint.py::test_vfotf[tests/integration/data/vf_tests/CJKSparseVar.subset.hinted.otf]"
+)
+
+distutils_enable_tests pytest
+
+src_unpack() {
+       default
+
+       if use test; then
+               mv "${WORKDIR}"/psautohint-testdata-${COMMIT}/* 
"${S}"/tests/integration/data || die
+       fi
+}
+
+src_prepare() {
+       distutils-r1_src_prepare
+
+       rm -r libpsautohint || die
+       mkdir -p libpsautohint/src || die
+
+       rm pytest.ini || die
+}
+
+src_configure() {
+       export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
+}

diff --git a/dev-util/psautohint/psautohint-2.4.0.ebuild 
b/dev-util/psautohint/psautohint-2.4.0.ebuild
deleted file mode 100644
index 0b1181eae..000000000
--- a/dev-util/psautohint/psautohint-2.4.0.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-COMMIT="1e4c5061d328105c4dcfcb6fdbc27ec49b3e9d23"
-DISTUTILS_IN_SOURCE_BUILD=1
-EMESON_SOURCE="${S}/libpsautohint"
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit edo meson distutils-r1
-
-DESCRIPTION="A standalone version of AFDKO autohinter"
-HOMEPAGE="
-       https://github.com/adobe-type-tools/psautohint
-       https://pypi.org/project/psautohint/
-"
-SRC_URI="
-       
https://github.com/adobe-type-tools/${PN}/archive/refs/tags/v${PV}.tar.gz -> 
${P}.gh.tar.gz
-       test? (
-               
https://github.com/adobe-type-tools/${PN}-testdata/archive/${COMMIT}.tar.gz -> 
psautohint-testdata-${COMMIT}.gh.tar.gz
-       )
-"
-KEYWORDS="~amd64"
-LICENSE="Apache-2.0"
-SLOT="0"
-
-# lxml, fs are indirect dependecies
-RDEPEND="
-       >=dev-python/fonttools-4.20[${PYTHON_USEDEP}]
-
-       dev-python/fs[${PYTHON_USEDEP}]
-       dev-python/lxml[${PYTHON_USEDEP}]
-"
-
-PATCHES=(
-       "${FILESDIR}/${PN}-bininpath.diff"
-       "${FILESDIR}/${PN}-2.3.0-no-build-library.patch"
-       "${FILESDIR}/${PN}-2.3.0-no-werror.patch"
-)
-
-EPYTEST_DESELECT=(
-       tests/integration/test_hint.py::test_hashmap_old_version
-       tests/integration/test_hint.py::test_mute_tx_msgs
-       tests/integration/test_hint.py::test_type1_supported
-       tests/integration/test_mmhint.py::test_vfotf
-       tests/integration/test_cli.py::test_multi_outpath
-       tests/integration/test_cli.py::test_multi_different_formats
-)
-
-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}"
-}
-
-src_unpack() {
-       default
-       use test && edo mv "${WORKDIR}"/psautohint-testdata-${COMMIT}/* 
"${S}"/tests/integration/data
-}
-
-python_prepare_all() {
-       # error: unrecognized arguments: -n
-       sed "/^  /d" -i pytest.ini || die
-
-       distutils-r1_python_prepare_all
-}
-
-src_configure() {
-       MESON_BUILD_DIR="${WORKDIR}/${P}-build"
-       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
-}

Reply via email to