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"
7 DISTUTILS_USE_PEP517
=setuptools
11 DESCRIPTION
="GYP (Generate Your Projects) meta-build system"
12 HOMEPAGE
="https://gyp.gsrc.io/ https://chromium.googlesource.com/external/gyp"
13 COMMIT
="a03d7413becefc8d55c8aa3df58b55b9bd0e9052"
15 if [[ "${PV}" == "99999999999999" ]]; then
18 EGIT_REPO_URI
="https://chromium.googlesource.com/external/gyp"
22 SRC_URI
="https://github.com/chromium/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
27 KEYWORDS
="~amd64 ~arm64 ~ppc64 ~x86"
29 RDEPEND
="$(python_gen_cond_dep 'dev-python/six[${PYTHON_USEDEP}]')"
32 "${FILESDIR}"/0001-${PN}-20220404165439-python38.
patch
33 "${FILESDIR}"/0002-${PN}-20220404165439-fix-cmake.
patch
34 "${FILESDIR}"/0003-${PN}-20220404165439-fips.
patch
37 python_prepare_all
() {
38 distutils-r1_python_prepare_all
40 sed -e "s/' Linux %s' % ' '\.join(platform.linux_distribution())/' Linux'/" -i gyptest.py || die
41 sed -e "s/the_dict_key is 'variables'/the_dict_key == 'variables'/" -i pylib
/gyp
/input.py || die
43 -e "s/os\.environ\['PRESERVE'\] is not ''/os.environ['PRESERVE'] != ''/" \
44 -e "s/conditions is ()/conditions == ()/" \
45 -i test
/lib
/TestCmd.py || die
49 # More errors with DeprecationWarnings enabled.
50 local -x PYTHONWARNINGS
=""
52 "${PYTHON}" gyptest.py
--all --verbose