diff options
author | Eli Schwartz <eschwartz93@gmail.com> | 2023-12-27 01:10:05 -0500 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-12-27 13:31:01 +0000 |
commit | d5b75d996d0dae84bdca47d4fff6dad756a1fe80 (patch) | |
tree | 6002b531783c6966d8b1d44b52ed913ccc6cfcbb /dev-util/meson | |
parent | dev-python/pdm-backend: Bump to 2.1.8 (diff) | |
download | gentoo-d5b75d996d0dae84bdca47d4fff6dad756a1fe80.tar.gz gentoo-d5b75d996d0dae84bdca47d4fff6dad756a1fe80.tar.bz2 gentoo-d5b75d996d0dae84bdca47d4fff6dad756a1fe80.zip |
dev-util/meson: add 1.3.1
Drop a backported patch, and add a new backport instead. Progress!
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/meson')
-rw-r--r-- | dev-util/meson/Manifest | 2 | ||||
-rw-r--r-- | dev-util/meson/files/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch | 55 | ||||
-rw-r--r-- | dev-util/meson/meson-1.3.1.ebuild | 135 |
3 files changed, 192 insertions, 0 deletions
diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest index 56b3c11d6c2d..67d0986b387c 100644 --- a/dev-util/meson/Manifest +++ b/dev-util/meson/Manifest @@ -8,3 +8,5 @@ DIST meson-1.2.3.tar.gz 2184484 BLAKE2B 7d76c54bddba249ab97ebd5dd0afc448177ff9fa DIST meson-1.2.3.tar.gz.asc 833 BLAKE2B 1416c49302aab80b5f647cc1d6cd18c36f6199e79c7d13ea284143b2423267b5823850218578626937c14589ebcdf19069b310394c63bc762ab8f59d7ebe3780 SHA512 852c031ecfe032cb48d284bb270597d114294b7d1be5dd0df6ec2f78a62e1a5ba82711bc14ae410e47ced54f99a639055a1628b0acf7aa07a3a80034fce5ebc9 DIST meson-1.3.0.tar.gz 2222383 BLAKE2B cb9ac8e00fe924df67166938687584a9de35e784e1e52bff281649d787695d37e3044ea3d6d5869181fe1e9676b5136548293dbd5cdbd091a6de0c449b8932f5 SHA512 fbcbdd9551ad12b7be84411b96357e01c7c0c38a8e9933093d2e71ed7e12bd4278245798684d389c332eb75dd50c99310affc9acb01cf8bedd45265335083a32 DIST meson-1.3.0.tar.gz.asc 833 BLAKE2B d83b819e75e732d694ac98412717af39a8115defc7371f1983e4619cf990b5cdfd7ab7c93911f2a8b6c7055c7252ebeba04d15f508f4278b506e326fa1801a25 SHA512 8c72bfe5f3bdec9c9f787dd5a7186599bb44079a89d0a87a535a6e890adb7718cbf570b2ac74583b72b92aa05160823a8571ca530384787c428e49d6fbe095ba +DIST meson-1.3.1.tar.gz 2222386 BLAKE2B 64d53eddc8cb321a4e2dabaa4b7499798a7b68764b1a7a5182bfa21d081dc07105acab616119b88ff610e5d75504f03d1c0aefee3602ddf538fc491ff3d0204a SHA512 6e694beb70329535faca9405358c04e2fd5a490b0c0d2678d5831b7de3477e0fcf4f6a242f1bc6218da04ac4f6e096ee53cdf273c6b6a38a35d370e8c16694ba +DIST meson-1.3.1.tar.gz.asc 833 BLAKE2B 1db7aabe3b7d491dfcd288a780d10784517a73e07348f2d5b98d1fa347dd08b2afa210511c7f5ff867b10ecd3ce470ea764b5ce6907aa7dcaa4d619f705e339c SHA512 0f652d375fa7700f3048266330d783664593c08da47d4f0d87af0be5d8b5e21113521651fb923c6a1cfe88aef7067ebd85b27946f19e71133d7c9805839fc873 diff --git a/dev-util/meson/files/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch b/dev-util/meson/files/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch new file mode 100644 index 000000000000..3d40616fec1f --- /dev/null +++ b/dev-util/meson/files/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch @@ -0,0 +1,55 @@ +From 2fbc7b5ce3aced483b196dd10ca9eee1713b7494 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Tue, 26 Dec 2023 15:06:12 -0500 +Subject: [PATCH] Revert "clike: Deduplicate rpath linker flags" + +This reverts commit 53ea59ad8455277797117d225f326851fe7d369c. + +This breaks at least: +- frameworks/17 mpi +- frameworks/30 scalapack + +The problem is that openmpi's pkg-config emitted link arguments +includes: + +``` +-Wl,-rpath -Wl,/path/to/libdir +``` + +The deduplication logic in meson doesn't contain sufficient information +to tell when the compiler is passing an argument that requires values, +and definitely cannot tell when that argument is split across argv. But +for arguments that *can* do this, it is not possible to deduplicate a +single argument as standalone, because it is not standalone. + +The argument for deduplicating rpath here was that if you have multiple +dependencies that all add the same rpath, the Apple ld64 emits a +non-fatal warning "duplicate -rpath ignored". Since this is non-fatal, +it's not a major issue. A major issue is when builds fatally error out +with: + +``` +FAILED: scalapack_c +cc -o scalapack_c scalapack_c.p/main.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib64/libscalapack.so /usr/lib64/liblapack.so /usr/lib64/libblas.so -Wl,-rpath -Wl,/usr/lib64 -Wl,/usr/lib64 -Wl,--enable-new-dtags /usr/lib64/libmpi.so -Wl,--end-group +/usr/libexec/gcc/x86_64-pc-linux-gnu/ld: error: /usr/lib64: read: Is a directory +``` +--- + mesonbuild/compilers/mixins/clike.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py +index b3fc96cec..76c8e0413 100644 +--- a/mesonbuild/compilers/mixins/clike.py ++++ b/mesonbuild/compilers/mixins/clike.py +@@ -54,7 +54,7 @@ class CLikeCompilerArgs(arglist.CompilerArgs): + + # NOTE: not thorough. A list of potential corner cases can be found in + # https://github.com/mesonbuild/meson/pull/4593#pullrequestreview-182016038 +- dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,--export-dynamic', '-Wl,-rpath') ++ dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,--export-dynamic') + dedup1_suffixes = ('.lib', '.dll', '.so', '.dylib', '.a') + dedup1_args = ('-c', '-S', '-E', '-pipe', '-pthread') + +-- +2.41.0 + diff --git a/dev-util/meson/meson-1.3.1.ebuild b/dev-util/meson/meson-1.3.1.ebuild new file mode 100644 index 000000000000..03ce81fbfb01 --- /dev/null +++ b/dev-util/meson/meson-1.3.1.ebuild @@ -0,0 +1,135 @@ +# Copyright 2016-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + 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 ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +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 + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-python-path.patch + + # backport fix for hiding compiler warnings (such as Modern C) in vala and cython + "${FILESDIR}"/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch + + # backport revert for broken rpath changes: https://github.com/mesonbuild/meson/pull/12672 + "${FILESDIR}"/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch +) + +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 +} |