diff options
author | Mike Gilbert <floppym@gentoo.org> | 2022-04-25 21:41:59 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2022-04-25 21:54:36 -0400 |
commit | 63355397f4fd4701683b666cececfab3aad987fa (patch) | |
tree | 808bae972c245a2ad0dd5767dd61da430e0fc0b7 /dev-util/meson | |
parent | dev-util/meson: make test_meson_uninstalled work again (diff) | |
download | gentoo-63355397f4fd4701683b666cececfab3aad987fa.tar.gz gentoo-63355397f4fd4701683b666cececfab3aad987fa.tar.bz2 gentoo-63355397f4fd4701683b666cececfab3aad987fa.zip |
dev-util/meson: add 0.62.1
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-util/meson')
-rw-r--r-- | dev-util/meson/Manifest | 1 | ||||
-rw-r--r-- | dev-util/meson/meson-0.62.1.ebuild | 108 | ||||
-rw-r--r-- | dev-util/meson/meson-9999.ebuild | 7 |
3 files changed, 113 insertions, 3 deletions
diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest index bbf8f6bc17b6..3cf416367b46 100644 --- a/dev-util/meson/Manifest +++ b/dev-util/meson/Manifest @@ -1,2 +1,3 @@ DIST meson-0.60.3.tar.gz 2001124 BLAKE2B f66fb29d309f5dea9c0b1934e8b5dfc2b33586e06c6a2d616798d5724216035fe03a3f9b1c6976546d5d5c069734357d61a92aa43de01161cf1fe4297a1d1f2e SHA512 0aa6ef71c20cd899ebb0b202c6319e093e1df1c39fa58c94a1bb479efe630213272127346eab589948898d115d02d64f4bdffd892fbb9700884c1edf2dc6c6dc DIST meson-0.61.4.tar.gz 2014265 BLAKE2B 09e6630f8a1786143832007c929e652e743bbf11d1b55ffcf366dd127779f61e8fd4a8be5cb23fa6bc949938a3bd0222f19ad1fec883f0ca6ed8cd6d4bbd6aef SHA512 005f52c678016f3183d36b69254cceab16c682d2389ec9cae41889955a13cb643aea03f2247f3473cfeca9c4dd6c1cc8b9b8b9906dc324c08016c72380a5f195 +DIST meson-0.62.1.tar.gz 2034805 BLAKE2B 6370b6bf07e6e875f6a0cabbf6284f97c89a4653b62c4765f365fbf083e607853094aa37d5dc97042f086ca1db569b2f8dabd14b37f674615d3b9d267d3d0d0f SHA512 52d2d06c27275b824046164403908be8555faed33aef862940623cef3e4f84b4c9b8d461c291642e6ea2c0db30b2ec4a99f46bde5d54945a26c1dbeca219cc32 diff --git a/dev-util/meson/meson-0.62.1.ebuild b/dev-util/meson/meson-0.62.1.ebuild new file mode 100644 index 000000000000..a88263806484 --- /dev/null +++ b/dev-util/meson/meson-0.62.1.ebuild @@ -0,0 +1,108 @@ +# Copyright 2016-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8,9,10} ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + dev-util/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # 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 + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # 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 + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-util/meson/meson-9999.ebuild b/dev-util/meson/meson-9999.ebuild index 7eb1c4f33e6c..080d0f136b5d 100644 --- a/dev-util/meson/meson-9999.ebuild +++ b/dev-util/meson/meson-9999.ebuild @@ -52,7 +52,7 @@ python_prepare_all() { -e 's/test_python_module/_&/' ) - sed -i "${disable_unittests[@]}" run_unittests.py || die + sed -i "${disable_unittests[@]}" unittests/*.py || die # Broken due to python2 script created by python_wrapper_setup rm -r "test cases/frameworks/1 boost" || die @@ -65,8 +65,6 @@ src_test() { if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then ewarn "Found Qt5Core but not Qt5Gui; skipping tests" else - # https://bugs.gentoo.org/687792 - unset PKG_CONFIG distutils-r1_src_test fi } @@ -76,6 +74,9 @@ python_test() { # test_meson_installed unset PYTHONDONTWRITEBYTECODE + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + # test_cross_file_system_paths unset XDG_DATA_HOME |