1 # Copyright 2017-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{10..12} )
6 DISTUTILS_SINGLE_IMPL="1"
10 if [[ "${PV}" == "99999999999999" ]]; then
13 EGIT_REPO_URI="https://chromium.googlesource.com/external/gyp"
16 DESCRIPTION="GYP (Generate Your Projects) meta-build system"
17 HOMEPAGE="https://gyp.gsrc.io/ https://chromium.googlesource.com/external/gyp"
18 COMMIT="9ecf45e37677743503342ee4c6a76eaee80e4a7f"
19 if [[ "${PV}" != "99999999999999" ]]; then
22 SRC_URI="https://github.com/chromium/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
27 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
32 RDEPEND="$(python_gen_cond_dep 'dev-python/six[${PYTHON_USEDEP}]')"
35 "${FILESDIR}"/0001-${P}-python38.patch
36 "${FILESDIR}"/0002-${P}-fix-cmake.patch
37 "${FILESDIR}"/0003-${P}-fips.patch
40 python_prepare_all() {
41 distutils-r1_python_prepare_all
43 sed -e "s/' Linux %s' % ' '\.join(platform.linux_distribution())/' Linux'/" -i gyptest.py || die
44 sed -e "s/the_dict_key is 'variables'/the_dict_key == 'variables'/" -i pylib/gyp/input.py || die
46 -e "s/os\.environ\['PRESERVE'\] is not ''/os.environ['PRESERVE'] != ''/" \
47 -e "s/conditions is ()/conditions == ()/" \
48 -i test/lib/TestCmd.py || die
52 # More errors with DeprecationWarnings enabled.
53 local -x PYTHONWARNINGS=""
55 "${PYTHON}" gyptest.py --all --verbose