1 # Copyright 2016-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,7} )
7 if [[ ${PV} = *9999* ]]; then
8 EGIT_REPO_URI="https://github.com/mesonbuild/meson"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
15 inherit distutils-r1 toolchain-funcs
17 DESCRIPTION="Open source build system"
18 HOMEPAGE="http://mesonbuild.com/"
23 RESTRICT="!test? ( test )"
25 RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
29 dev-libs/gobject-introspection
32 sys-libs/zlib[static-libs(+)]
37 python_prepare_all() {
38 # ASAN and sandbox both want control over LD_PRELOAD
39 # https://bugs.gentoo.org/673016
40 sed -i -e 's/test_generate_gir_with_address_sanitizer/_&/' run_unittests.py || die
42 # ASAN is unsupported on some targets
43 # https://bugs.gentoo.org/692822
44 sed -i -e 's/test_pch_with_address_sanitizer/_&/' run_unittests.py || die
46 distutils-r1_python_prepare_all
51 if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
52 ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
54 # https://bugs.gentoo.org/687792
62 # test_meson_installed
63 unset PYTHONDONTWRITEBYTECODE
65 # test_cross_file_system_paths
68 ${EPYTHON} -u run_tests.py
69 ) || die "Testing failed with ${EPYTHON}"
72 python_install_all() {
73 distutils-r1_python_install_all
75 insinto /usr/share/vim/vimfiles
76 doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
77 insinto /usr/share/zsh/site-functions
78 doins data/shell-completions/zsh/_meson