diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-19 06:50:06 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-19 06:50:06 +0000 |
commit | 06617f385b21ef2262c88f17869c15c424e67d21 (patch) | |
tree | 3f6ea6fba81d85145b37641fb93140f3c70f57c9 /dev-build/meson/meson-9999.ebuild | |
parent | 2c18b7f7fb2885d27960657c60906ef0bac0681e (diff) |
gentoo auto-resync : 19:03:2024 - 06:50:06
Diffstat (limited to 'dev-build/meson/meson-9999.ebuild')
-rw-r--r-- | dev-build/meson/meson-9999.ebuild | 76 |
1 files changed, 65 insertions, 11 deletions
diff --git a/dev-build/meson/meson-9999.ebuild b/dev-build/meson/meson-9999.ebuild index 4e7497b5c819..76daad8a812e 100644 --- a/dev-build/meson/meson-9999.ebuild +++ b/dev-build/meson/meson-9999.ebuild @@ -6,9 +6,17 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} pypy3 ) DISTUTILS_USE_PEP517=setuptools +inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs + if [[ ${PV} = *9999* ]]; then EGIT_REPO_URI="https://github.com/mesonbuild/meson" - inherit git-r3 + inherit ninja-utils git-r3 + + BDEPEND=" + ${NINJA_DEPEND} + $(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]') + " + else inherit verify-sig @@ -19,6 +27,7 @@ else SRC_URI=" https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/meson-reference.3 -> meson-reference-${MY_PV}.3 " BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg @@ -28,8 +37,6 @@ else fi fi -inherit bash-completion-r1 distutils-r1 toolchain-funcs - DESCRIPTION="Open source build system" HOMEPAGE="https://mesonbuild.com/" @@ -52,6 +59,19 @@ RDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-python-path.patch +) + +src_unpack() { + if [[ ${PV} = *9999* ]]; then + git-r3_src_unpack + else + default + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc} + fi +} + python_prepare_all() { local disable_unittests=( # ASAN and sandbox both want control over LD_PRELOAD @@ -61,12 +81,6 @@ python_prepare_all() { # ASAN is unsupported on some targets # https://bugs.gentoo.org/692822 -e 's/test_pch_with_address_sanitizer/_&/' - - # https://github.com/mesonbuild/meson/issues/7203 - -e 's/test_templates/_&/' - - # Broken due to python2 wrapper - -e 's/test_python_module/_&/' ) sed -i "${disable_unittests[@]}" unittests/*.py || die @@ -77,6 +91,31 @@ python_prepare_all() { distutils-r1_python_prepare_all } +python_check_deps() { + if [[ ${PV} = *9999* ]]; then + python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" + fi +} + +python_configure_all() { + if [[ ${PV} = *9999* ]]; then + # We use the unsafe_yaml loader because strictyaml is not packaged. In + # theory they produce the same results, but pyyaml is faster and + # without safety checks. + edo ./meson.py setup \ + --prefix "${EPREFIX}/usr" \ + -Dhtml=false \ + -Dunsafe_yaml=true \ + docs/ docs/builddir + fi +} + +python_compile_all() { + if [[ ${PV} = *9999* ]]; then + eninja -C docs/builddir + fi +} + src_test() { tc-export PKG_CONFIG if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then @@ -88,6 +127,16 @@ src_test() { python_test() { ( + # meson has its own tests for LTO support. We don't need to verify that + # all tests work when they happen to use it. And in particular, this + # breaks rust. + filter-lto + + # remove unwanted python_wrapper_setup contents + # We actually do want to non-error if python2 is installed and tested. + remove="${T}/${EPYTHON}/bin:" + PATH=${PATH/${remove}/} + # test_meson_installed unset PYTHONDONTWRITEBYTECODE @@ -107,8 +156,7 @@ python_test() { # value in JAVA_HOME, and the tests should get skipped. export JAVA_HOME=$(java-config -O 2>/dev/null) - # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. - python3 run_tests.py + ${EPYTHON} -u run_tests.py ) || die "Testing failed with ${EPYTHON}" } @@ -122,4 +170,10 @@ python_install_all() { doins data/shell-completions/zsh/_meson dobashcomp data/shell-completions/bash/meson + + if [[ ${PV} = *9999* ]]; then + DESTDIR="${ED}" eninja -C docs/builddir install + else + newman "${DISTDIR}"/meson-reference-${PV}.3 meson-reference.3 + fi } |