dev-python/uharfbuzz: fix patch, no optimize

Closes: https://bugs.gentoo.org/835473
Closes: https://bugs.gentoo.org/836356
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-03-29 10:41:10 +02:00
parent 1fb20ec61c
commit d056143695
5 changed files with 10 additions and 78 deletions

View File

@@ -1,2 +1 @@
DIST uharfbuzz-0.22.0.tar.gz 34454 BLAKE2B 32bbb07f94ed532cfd153bac8164c0444cae9ff0b0d5af870a7e656cf7493926b8c78f868e70e111df9f4286a4779872be5430e020e59527e92843365cb42eb9 SHA512 c30b7d6f4981defd88cda4c178adbab31262bcedd9ccc0969ae1b7bee02b4846e69cecd33ab240af84581d1a34d54167fd8603ade7403f898cf03b4936287792
DIST uharfbuzz-0.23.0.tar.gz 36287 BLAKE2B 6f03aa991d53b6fe093879a0cb5d09b5065ad4fb31453f74323f540aadcdace2430ccdc0a466cddc43a356bb1dd62f066537074a208c1b56d51d43c4eb2062ee SHA512 8cacb54a3d48db29f025bd9eb72133e9a11cf61f6b8064cb91c5399e875e7b46f592bb3c4b284741a161f534bea5771f9c471489c8082ee768953b5948ee2c09

View File

@@ -1,31 +0,0 @@
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
-define_macros = [('HB_NO_MT', '1'), ('HB_EXPERIMENTAL_API', '1')]
+define_macros = [('HB_EXPERIMENTAL_API', '1')]
linetrace = False
if int(os.environ.get('CYTHON_LINETRACE', '0')):
linetrace = True
@@ -21,7 +21,7 @@
extra_compile_args = []
extra_link_args = []
-libraries = []
+libraries=['harfbuzz']
if platform.system() != 'Windows':
extra_compile_args.append('-std=c++11')
define_macros.append(('HAVE_MMAP', '1'))
@@ -39,8 +39,8 @@
extension = Extension(
'uharfbuzz._harfbuzz',
define_macros=define_macros,
- include_dirs=['harfbuzz/src'],
- sources=['src/uharfbuzz/_harfbuzz.pyx', 'harfbuzz/src/harfbuzz.cc'],
+ include_dirs=['/usr/include/harfbuzz'],
+ sources=['src/uharfbuzz/_harfbuzz.pyx'],
language='c++',
libraries=libraries,
extra_compile_args=extra_compile_args,

View File

@@ -9,6 +9,15 @@
linetrace = False
if int(os.environ.get('CYTHON_LINETRACE', '0')):
linetrace = True
@@ -21,7 +21,7 @@
extra_compile_args = []
extra_link_args = []
-libraries = []
+libraries = ['harfbuzz']
if platform.system() != 'Windows':
extra_compile_args.append('-std=c++11')
define_macros.append(('HAVE_MMAP', '1'))
@@ -39,11 +39,9 @@
extension = Extension(
'uharfbuzz._harfbuzz',

View File

@@ -1,40 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1
DESCRIPTION="Streamlined Cython bindings for the HarfBuzz shaping engine"
HOMEPAGE="https://github.com/harfbuzz/uharfbuzz"
SRC_URI="https://github.com/harfbuzz/uharfbuzz/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
LICENSE="Apache-2.0"
SLOT="0"
RDEPEND=">=media-libs/harfbuzz-2.8.1[experimental(-)]"
DEPEND="
${RDEPEND}
>=dev-python/cython-0.28.1[${PYTHON_USEDEP}]
>=dev-python/setuptools_scm-2.1[${PYTHON_USEDEP}]
>=dev-python/wheel-0.31[${PYTHON_USEDEP}]
"
PATCHES=( "${FILESDIR}/${PN}-0.18.0-system-harfbuzz.patch" )
distutils_enable_tests pytest
python_prepare_all() {
distutils-r1_python_prepare_all
export SETUPTOOLS_SCM_PRETEND_VERSION="${PV%_*}"
export USE_SYSTEM_HARFBUZZ=1
}
python_install() {
distutils-r1_python_install
python_optimize "$(python_get_sitedir)/${PN}"
}

View File

@@ -16,7 +16,7 @@ KEYWORDS="~amd64"
LICENSE="Apache-2.0"
SLOT="0"
RDEPEND=">=media-libs/harfbuzz-2.8.1[experimental(-)]"
RDEPEND=">=media-libs/harfbuzz-4.0.0[experimental(-)]"
DEPEND="
${RDEPEND}
>=dev-python/cython-0.28.1[${PYTHON_USEDEP}]
@@ -33,8 +33,3 @@ python_prepare_all() {
export SETUPTOOLS_SCM_PRETEND_VERSION="${PV%_*}"
export USE_SYSTEM_HARFBUZZ=1
}
python_install() {
distutils-r1_python_install
python_optimize "$(python_get_sitedir)/${PN}"
}