dev-python/conda-libmamba-solver: bump version to 24.11.1
[gentoo-zh.git] / dev-build / gyp / gyp-20230914150222.ebuild
blob184cc0e10cfa84c65a90228fcf6de9066e47474c
1 # Copyright 2017-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI="8"
5 PYTHON_COMPAT=( python3_{10..12} )
6 DISTUTILS_SINGLE_IMPL="1"
7 DISTUTILS_USE_PEP517=setuptools
9 inherit distutils-r1
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
16 inherit git-r3
18 EGIT_REPO_URI="https://chromium.googlesource.com/external/gyp"
19 else
20 inherit vcs-snapshot
22 SRC_URI="https://github.com/chromium/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
25 LICENSE="BSD"
26 SLOT="0"
27 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
29 RDEPEND="$(python_gen_cond_dep 'dev-python/six[${PYTHON_USEDEP}]')"
31 PATCHES=(
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
42 sed \
43 -e "s/os\.environ\['PRESERVE'\] is not ''/os.environ['PRESERVE'] != ''/" \
44 -e "s/conditions is ()/conditions == ()/" \
45 -i test/lib/TestCmd.py || die
48 python_test() {
49 # More errors with DeprecationWarnings enabled.
50 local -x PYTHONWARNINGS=""
52 "${PYTHON}" gyptest.py --all --verbose