public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2023-12-27 13:32 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2023-12-27 13:32 UTC (permalink / raw
  To: gentoo-commits

commit:     d5b75d996d0dae84bdca47d4fff6dad756a1fe80
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Dec 27 06:10:05 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 27 13:31:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5b75d99

dev-util/meson: add 1.3.1

Drop a backported patch, and add a new backport instead. Progress!

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/meson/Manifest                            |   2 +
 ...vert-clike-Deduplicate-rpath-linker-flags.patch |  55 +++++++++
 dev-util/meson/meson-1.3.1.ebuild                  | 135 +++++++++++++++++++++
 3 files changed, 192 insertions(+)

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
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2023-12-06  5:42 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2023-12-06  5:42 UTC (permalink / raw
  To: gentoo-commits

commit:     92d6b34449e631c904cc0c30c7d99853647c3ea2
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Dec  6 04:40:13 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec  6 05:41:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92d6b344

dev-util/meson: backport patch to stop hiding vala compiler warnings

This is especially bad because it makes these packages disappear
entirely from QA checks for, say, Modern C. Although it's only a matter
of adding more warnings, and doesn't really affect the resulting
packages, we need this live in order to do proper QA.

Bug: https://bugs.gentoo.org/870412
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34141
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...nd-don-t-hide-all-compiler-warnings-for-t.patch | 250 +++++++++++++++++++++
 dev-util/meson/meson-1.3.0-r2.ebuild               | 135 +++++++++++
 2 files changed, 385 insertions(+)

diff --git a/dev-util/meson/files/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch b/dev-util/meson/files/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch
new file mode 100644
index 000000000000..652ffd25228b
--- /dev/null
+++ b/dev-util/meson/files/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch
@@ -0,0 +1,250 @@
+From 5f659af870011e74299d1455a65c2cd5f5ace51f Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Tue, 5 Dec 2023 14:26:54 -0500
+Subject: [PATCH] ninja backend: don't hide all compiler warnings for
+ transpiled languages
+
+This was originally added for vala only, with the rationale that vala
+generates bad code that has warnings. Unfortunately, the rationale was
+fatally flawed. The compiler warns about a number of things, which the
+user can control depending on their code (or their code generator's
+code), but some of those things are absolutely critical to warn about.
+
+In particular, GCC 14 and clang 17 are updating their defaults to warn
+-- and error by default for -- invalid C code that breaks the standard,
+but has been silently accepted for over 20 years "because lots of people
+do it". The code in question is UB, and compilers will generate faulty
+machine code that behaves erroneously and probably has a mass of CVEs
+waiting to happen.
+
+Compiler warnings are NOT safe to just... universally turn off. Compiler
+warnings could be either:
+
+- coding style lints
+
+- threatening statements that the code is factually and behaviorally wrong
+
+There is no magic bullet to ignore the former while respecting the
+latter. And the very last thing we should ever do is pass `-w`, since
+that causes ALL warnings to be disabled, even the manually added
+`-Werror=XXX`.
+
+If vala generated code creates warnings, then the vala compiler can
+decrease the log level by generating better code, or by adding warning
+suppression pragmas for *specific* issues, such as unused functions.
+---
+ mesonbuild/backend/backends.py                | 13 ++-----
+ mesonbuild/backend/ninjabackend.py            | 19 ++++------
+ .../failing build/1 vala c werror/meson.build | 10 -----
+ .../failing build/1 vala c werror/prog.vala   |  7 ----
+ .../1 vala c werror/unused-var.c              |  8 ----
+ test cases/vala/5 target glib/meson.build     |  4 --
+ unittests/linuxliketests.py                   | 37 -------------------
+ 7 files changed, 11 insertions(+), 87 deletions(-)
+ delete mode 100644 test cases/failing build/1 vala c werror/meson.build
+ delete mode 100644 test cases/failing build/1 vala c werror/prog.vala
+ delete mode 100644 test cases/failing build/1 vala c werror/unused-var.c
+
+diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
+index 2c24e4c31..639e07b2a 100644
+--- a/mesonbuild/backend/backends.py
++++ b/mesonbuild/backend/backends.py
+@@ -986,7 +986,7 @@ class Backend:
+             return compiler.get_no_stdinc_args()
+         return []
+ 
+-    def generate_basic_compiler_args(self, target: build.BuildTarget, compiler: 'Compiler', no_warn_args: bool = False) -> 'CompilerArgs':
++    def generate_basic_compiler_args(self, target: build.BuildTarget, compiler: 'Compiler') -> 'CompilerArgs':
+         # Create an empty commands list, and start adding arguments from
+         # various sources in the order in which they must override each other
+         # starting from hard-coded defaults followed by build options and so on.
+@@ -999,17 +999,12 @@ class Backend:
+         commands += self.get_no_stdlib_args(target, compiler)
+         # Add things like /NOLOGO or -pipe; usually can't be overridden
+         commands += compiler.get_always_args()
+-        # Only add warning-flags by default if the buildtype enables it, and if
+-        # we weren't explicitly asked to not emit warnings (for Vala, f.ex)
+-        if no_warn_args:
+-            commands += compiler.get_no_warn_args()
+-        else:
+-            # warning_level is a string, but mypy can't determine that
+-            commands += compiler.get_warn_args(T.cast('str', target.get_option(OptionKey('warning_level'))))
++        # warning_level is a string, but mypy can't determine that
++        commands += compiler.get_warn_args(T.cast('str', target.get_option(OptionKey('warning_level'))))
+         # Add -Werror if werror=true is set in the build options set on the
+         # command-line or default_options inside project(). This only sets the
+         # action to be done for warnings if/when they are emitted, so it's ok
+-        # to set it after get_no_warn_args() or get_warn_args().
++        # to set it after or get_warn_args().
+         if target.get_option(OptionKey('werror')):
+             commands += compiler.get_werror_args()
+         # Add compile args for c_* or cpp_* build options set on the
+diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
+index 049ae253f..cdb747d73 100644
+--- a/mesonbuild/backend/ninjabackend.py
++++ b/mesonbuild/backend/ninjabackend.py
+@@ -1939,7 +1939,7 @@ class NinjaBackend(backends.Backend):
+         if cratetype in {'bin', 'dylib'}:
+             args.extend(rustc.get_linker_always_args())
+ 
+-        args += self.generate_basic_compiler_args(target, rustc, False)
++        args += self.generate_basic_compiler_args(target, rustc)
+         # Rustc replaces - with _. spaces or dots are not allowed, so we replace them with underscores
+         args += ['--crate-name', target.name.replace('-', '_').replace(' ', '_').replace('.', '_')]
+         depfile = os.path.join(target.subdir, target.name + '.d')
+@@ -2804,10 +2804,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
+             bargs = []
+         return (sargs, bargs)
+ 
+-    def _generate_single_compile(self, target: build.BuildTarget, compiler: 'Compiler',
+-                                 is_generated: bool = False) -> 'CompilerArgs':
++    def _generate_single_compile(self, target: build.BuildTarget, compiler: Compiler) -> CompilerArgs:
+         commands = self._generate_single_compile_base_args(target, compiler)
+-        commands += self._generate_single_compile_target_args(target, compiler, is_generated)
++        commands += self._generate_single_compile_target_args(target, compiler)
+         return commands
+ 
+     def _generate_single_compile_base_args(self, target: build.BuildTarget, compiler: 'Compiler') -> 'CompilerArgs':
+@@ -2825,14 +2824,10 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
+         return commands
+ 
+     @lru_cache(maxsize=None)
+-    def _generate_single_compile_target_args(self, target: build.BuildTarget, compiler: 'Compiler',
+-                                             is_generated: bool = False) -> 'ImmutableListProtocol[str]':
+-        # The code generated by valac is usually crap and has tons of unused
+-        # variables and such, so disable warnings for Vala C sources.
+-        no_warn_args = is_generated == 'vala'
++    def _generate_single_compile_target_args(self, target: build.BuildTarget, compiler: Compiler) -> ImmutableListProtocol[str]:
+         # Add compiler args and include paths from several sources; defaults,
+         # build options, external dependencies, etc.
+-        commands = self.generate_basic_compiler_args(target, compiler, no_warn_args)
++        commands = self.generate_basic_compiler_args(target, compiler)
+         # Add custom target dirs as includes automatically, but before
+         # target-specific include directories.
+         if target.implicit_include_directories:
+@@ -2901,7 +2896,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
+             if use_pch and 'mw' not in compiler.id:
+                 commands += self.get_pch_include_args(compiler, target)
+ 
+-            commands += self._generate_single_compile_target_args(target, compiler, is_generated=False)
++            commands += self._generate_single_compile_target_args(target, compiler)
+ 
+             # Metrowerks compilers require PCH include args to come after intraprocedural analysis args
+             if use_pch and 'mw' in compiler.id:
+@@ -2935,7 +2930,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
+         if use_pch and 'mw' not in compiler.id:
+             commands += self.get_pch_include_args(compiler, target)
+ 
+-        commands += self._generate_single_compile_target_args(target, compiler, is_generated)
++        commands += self._generate_single_compile_target_args(target, compiler)
+ 
+         # Metrowerks compilers require PCH include args to come after intraprocedural analysis args
+         if use_pch and 'mw' in compiler.id:
+diff --git a/test cases/failing build/1 vala c werror/meson.build b/test cases/failing build/1 vala c werror/meson.build
+deleted file mode 100644
+index 736d7aa43..000000000
+--- a/test cases/failing build/1 vala c werror/meson.build	
++++ /dev/null
+@@ -1,10 +0,0 @@
+-project('valatest', 'c', default_options : 'werror=true')
+-
+-if find_program('valac', required : false).found()
+-  add_languages('vala')
+-  valadeps = [dependency('glib-2.0'), dependency('gobject-2.0')]
+-  # Must fail due to -Werror and unused variable in C file
+-  executable('valaprog', 'prog.vala', 'unused-var.c', dependencies : valadeps)
+-else
+-  executable('failprog', 'unused-var.c')
+-endif
+diff --git a/test cases/failing build/1 vala c werror/prog.vala b/test cases/failing build/1 vala c werror/prog.vala
+deleted file mode 100644
+index 638e77660..000000000
+--- a/test cases/failing build/1 vala c werror/prog.vala	
++++ /dev/null
+@@ -1,7 +0,0 @@
+-class MainProg : GLib.Object {
+-
+-    public static int main(string[] args) {
+-        stdout.printf("Vala is working.\n");
+-        return 0;
+-    }
+-}
+diff --git a/test cases/failing build/1 vala c werror/unused-var.c b/test cases/failing build/1 vala c werror/unused-var.c
+deleted file mode 100644
+index 6b85078c9..000000000
+--- a/test cases/failing build/1 vala c werror/unused-var.c	
++++ /dev/null
+@@ -1,8 +0,0 @@
+-#warning "something"
+-
+-int
+-somelib(void)
+-{
+-  int unused_var;
+-  return 33;
+-}
+diff --git a/test cases/vala/5 target glib/meson.build b/test cases/vala/5 target glib/meson.build
+index f285d9f16..089bb3c97 100644
+--- a/test cases/vala/5 target glib/meson.build	
++++ b/test cases/vala/5 target glib/meson.build	
+@@ -1,9 +1,5 @@
+ project('valatest', 'vala', 'c')
+ 
+-if not meson.is_unity()
+-  add_global_arguments('-Werror', language : 'c')
+-endif
+-
+ valadeps = [dependency('glib-2.0', version : '>=2.32'), dependency('gobject-2.0')]
+ 
+ e = executable('valaprog', 'GLib.Thread.vala', 'retcode.c', dependencies : valadeps)
+diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py
+index 4fcf52e09..a02c99e8f 100644
+--- a/unittests/linuxliketests.py
++++ b/unittests/linuxliketests.py
+@@ -298,43 +298,6 @@ class LinuxlikeTests(BasePlatformTests):
+         self.build()
+         self._run(self.mtest_command)
+ 
+-    def test_vala_c_warnings(self):
+-        '''
+-        Test that no warnings are emitted for C code generated by Vala. This
+-        can't be an ordinary test case because we need to inspect the compiler
+-        database.
+-        https://github.com/mesonbuild/meson/issues/864
+-        '''
+-        if not shutil.which('valac'):
+-            raise SkipTest('valac not installed.')
+-        testdir = os.path.join(self.vala_test_dir, '5 target glib')
+-        self.init(testdir)
+-        compdb = self.get_compdb()
+-        vala_command = None
+-        c_command = None
+-        for each in compdb:
+-            if each['file'].endswith('GLib.Thread.c'):
+-                vala_command = each['command']
+-            elif each['file'].endswith('GLib.Thread.vala'):
+-                continue
+-            elif each['file'].endswith('retcode.c'):
+-                c_command = each['command']
+-            else:
+-                m = 'Unknown file {!r} in vala_c_warnings test'.format(each['file'])
+-                raise AssertionError(m)
+-        self.assertIsNotNone(vala_command)
+-        self.assertIsNotNone(c_command)
+-        # -w suppresses all warnings, should be there in Vala but not in C
+-        self.assertIn(" -w ", vala_command)
+-        self.assertNotIn(" -w ", c_command)
+-        # -Wall enables all warnings, should be there in C but not in Vala
+-        self.assertNotIn(" -Wall ", vala_command)
+-        self.assertIn(" -Wall ", c_command)
+-        # -Werror converts warnings to errors, should always be there since it's
+-        # injected by an unrelated piece of code and the project has werror=true
+-        self.assertIn(" -Werror ", vala_command)
+-        self.assertIn(" -Werror ", c_command)
+-
+     @skipIfNoPkgconfig
+     def test_qtdependency_pkgconfig_detection(self):
+         '''
+-- 
+2.41.0
+

diff --git a/dev-util/meson/meson-1.3.0-r2.ebuild b/dev-util/meson/meson-1.3.0-r2.ebuild
new file mode 100644
index 000000000000..af208ef34bdc
--- /dev/null
+++ b/dev-util/meson/meson-1.3.0-r2.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 broken configure_file()
+	"${FILESDIR}"/0001-Only-convert-boolean-values-for-cmake-formats.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
+)
+
+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
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2023-09-24  4:13 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2023-09-24  4:13 UTC (permalink / raw
  To: gentoo-commits

commit:     41f439c2e9964de598ac976e41dc68924b338bc5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 24 04:12:53 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 24 04:13:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41f439c2

dev-util/meson: backport LLVM 17 fixes

1.2.2 is hopefully coming Real Soon Now but Eli already pointed out precisely
which PR it is and meson "rebuilds" are extremely cheap so there's no real
reason to not throw it in now.

Closes: https://bugs.gentoo.org/914576
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/meson/files/meson-1.2.1-llvm-17.patch |  41 +++++++++
 dev-util/meson/meson-1.2.1-r2.ebuild           | 122 +++++++++++++++++++++++++
 2 files changed, 163 insertions(+)

diff --git a/dev-util/meson/files/meson-1.2.1-llvm-17.patch b/dev-util/meson/files/meson-1.2.1-llvm-17.patch
new file mode 100644
index 000000000000..ceee1dcd292b
--- /dev/null
+++ b/dev-util/meson/files/meson-1.2.1-llvm-17.patch
@@ -0,0 +1,41 @@
+https://bugs.gentoo.org/914576
+https://github.com/mesonbuild/meson/commit/d0b09898c703f6c10ec5a6b2aeace0df2e3570aa
+https://github.com/mesonbuild/meson/commit/9c74c73bc7107c794e7f9896cc4220e50ad32bba
+
+From d0b09898c703f6c10ec5a6b2aeace0df2e3570aa Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat, 23 Sep 2023 17:21:43 +0200
+Subject: [PATCH] get_llvm_tool_names: add llvm 17
+
+this fixes the "frameworks: 15 llvm" tests with llvm 17
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -157,6 +157,7 @@ def get_llvm_tool_names(tool: str) -> T.List[str]:
+     # unless it becomes a stable release.
+     suffixes = [
+         '', # base (no suffix)
++        '-17',  '17',
+         '-16',  '16',
+         '-15',  '15',
+         '-14',  '14',
+
+From 9c74c73bc7107c794e7f9896cc4220e50ad32bba Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat, 23 Sep 2023 14:10:29 +0200
+Subject: [PATCH] openmp: add 5.1/5.2, fixes openmp with llvm v17
+
+llvm v17 defaults to 5.1 and without this meson fails to find
+openmp: 'ERROR: Dependency "openmp" not found, tried system'
+
+Add 5.2 as well while at it.
+--- a/mesonbuild/dependencies/misc.py
++++ b/mesonbuild/dependencies/misc.py
+@@ -85,6 +85,8 @@ def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]):
+ class OpenMPDependency(SystemDependency):
+     # Map date of specification release (which is the macro value) to a version.
+     VERSIONS = {
++        '202111': '5.2',
++        '202011': '5.1',
+         '201811': '5.0',
+         '201611': '5.0-revision1',  # This is supported by ICC 19.x
+         '201511': '4.5',

diff --git a/dev-util/meson/meson-1.2.1-r2.ebuild b/dev-util/meson/meson-1.2.1-r2.ebuild
new file mode 100644
index 000000000000..48e351394586
--- /dev/null
+++ b/dev-util/meson/meson-1.2.1-r2.ebuild
@@ -0,0 +1,122 @@
+# 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 pypi
+
+	MY_P=${P/_/}
+	S=${WORKDIR}/${MY_P}
+
+	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}"/${P}-python-path.patch
+	"${FILESDIR}"/${P}-llvm-17.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
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2023-08-17  7:42 James Le Cuirot
  0 siblings, 0 replies; 15+ messages in thread
From: James Le Cuirot @ 2023-08-17  7:42 UTC (permalink / raw
  To: gentoo-commits

commit:     0686381dfc3d39c0f844d25aeb8471b9a5de657e
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 16 21:34:25 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 17 07:41:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0686381d

dev-util/meson: Backport fix to respect PATH when finding Python

Closes: https://bugs.gentoo.org/912051
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 dev-util/meson/files/meson-1.2.1-python-path.patch | 26 ++++++++++++++++++++++
 .../{meson-1.2.1.ebuild => meson-1.2.1-r1.ebuild}  |  4 ++++
 2 files changed, 30 insertions(+)

diff --git a/dev-util/meson/files/meson-1.2.1-python-path.patch b/dev-util/meson/files/meson-1.2.1-python-path.patch
new file mode 100644
index 000000000000..d6151881f83f
--- /dev/null
+++ b/dev-util/meson/files/meson-1.2.1-python-path.patch
@@ -0,0 +1,26 @@
+From 2b33c94e6315e9a397dd48a58a5becb0df3b8aba Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 12 Aug 2023 09:56:44 +0100
+Subject: [PATCH 2/2] python module: Respect PATH when python is not given in
+ machine file
+
+We should only fall back to the Python interpreter running Meson itself
+if `python3` is not found in the PATH.
+
+https://github.com/mesonbuild/meson/pull/12116
+
+diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
+index 5654e4231..2b2395a9b 100644
+--- a/mesonbuild/modules/python.py
++++ b/mesonbuild/modules/python.py
+@@ -381,7 +381,9 @@ class PythonModule(ExtensionModule):
+ 
+     def _find_installation_impl(self, state: 'ModuleState', display_name: str, name_or_path: str, required: bool) -> MaybePythonProg:
+         if not name_or_path:
+-            python = PythonExternalProgram('python3', mesonlib.python_command)
++            python = PythonExternalProgram('python3')
++            if not python.found():
++                python = PythonExternalProgram('python3', mesonlib.python_command)
+         else:
+             tmp_python = ExternalProgram.from_entry(display_name, name_or_path)
+             python = PythonExternalProgram(display_name, ext_prog=tmp_python)

diff --git a/dev-util/meson/meson-1.2.1.ebuild b/dev-util/meson/meson-1.2.1-r1.ebuild
similarity index 98%
rename from dev-util/meson/meson-1.2.1.ebuild
rename to dev-util/meson/meson-1.2.1-r1.ebuild
index fefd68d177e5..2f54a0120763 100644
--- a/dev-util/meson/meson-1.2.1.ebuild
+++ b/dev-util/meson/meson-1.2.1-r1.ebuild
@@ -44,6 +44,10 @@ RDEPEND="
 	virtual/pkgconfig
 "
 
+PATCHES=(
+	"${FILESDIR}"/${P}-python-path.patch
+)
+
 python_prepare_all() {
 	local disable_unittests=(
 		# ASAN and sandbox both want control over LD_PRELOAD


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2022-09-11 15:09 Fabian Groffen
  0 siblings, 0 replies; 15+ messages in thread
From: Fabian Groffen @ 2022-09-11 15:09 UTC (permalink / raw
  To: gentoo-commits

commit:     e87a1383004c856e74741f682c556bc3e8c67990
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 11 15:08:10 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Sep 11 15:09:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e87a1383

dev-util/meson-0.63.2-r1: teach meson to detect xtools linkers

Unbreak x86_64 and ppc based darwin targets.

Closes: https://bugs.gentoo.org/868516
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 .../meson/files/meson-0.63-xtools-support.patch    | 26 ++++++++++++++++++++++
 ...{meson-0.63.2.ebuild => meson-0.63.2-r1.ebuild} |  4 ++++
 dev-util/meson/meson-9999.ebuild                   |  4 ++++
 3 files changed, 34 insertions(+)

diff --git a/dev-util/meson/files/meson-0.63-xtools-support.patch b/dev-util/meson/files/meson-0.63-xtools-support.patch
new file mode 100644
index 000000000000..ea1e8597b00a
--- /dev/null
+++ b/dev-util/meson/files/meson-0.63-xtools-support.patch
@@ -0,0 +1,26 @@
+linkers_detect: detect xtools (Apple ld64 derivative)
+
+xtools is in use on x86_64 and ppc based darwin Prefix installs.  Pick
+it up as a valid linker.
+
+Meson is the only thing known at this point to try and figure out what
+linker is in use exactly, so instead of changing the linker (xtools),
+just teach Meson about xtools.
+
+Author: Fabian Groffen <grobian@gentoo.org>
+Bug: https://bugs.gentoo.org/868516
+
+--- a/mesonbuild/linkers/detect.py
++++ b/mesonbuild/linkers/detect.py
+@@ -188,6 +188,11 @@
+             v = search_version(o)
+ 
+         linker = LLVMDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
++    # detect xtools first, bug #868516
++    elif 'xtools-' in o.split('\n')[0]:
++        xtools = o.split(' ')[0]
++        v = xtools.split('-')[1]
++        linker = AppleDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
+     # first might be apple clang, second is for real gcc, the third is icc
+     elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e or 'ld: unknown option:' in e:
+         if isinstance(comp_class.LINKER_PREFIX, str):

diff --git a/dev-util/meson/meson-0.63.2.ebuild b/dev-util/meson/meson-0.63.2-r1.ebuild
similarity index 97%
rename from dev-util/meson/meson-0.63.2.ebuild
rename to dev-util/meson/meson-0.63.2-r1.ebuild
index 14ecaa4f465b..f2e31397c003 100644
--- a/dev-util/meson/meson-0.63.2.ebuild
+++ b/dev-util/meson/meson-0.63.2-r1.ebuild
@@ -37,6 +37,10 @@ DEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.63-xtools-support.patch
+)
+
 python_prepare_all() {
 	local disable_unittests=(
 		# ASAN and sandbox both want control over LD_PRELOAD

diff --git a/dev-util/meson/meson-9999.ebuild b/dev-util/meson/meson-9999.ebuild
index 14ecaa4f465b..f2e31397c003 100644
--- a/dev-util/meson/meson-9999.ebuild
+++ b/dev-util/meson/meson-9999.ebuild
@@ -37,6 +37,10 @@ DEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.63-xtools-support.patch
+)
+
 python_prepare_all() {
 	local disable_unittests=(
 		# ASAN and sandbox both want control over LD_PRELOAD


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2021-11-26  2:29 Mike Gilbert
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Gilbert @ 2021-11-26  2:29 UTC (permalink / raw
  To: gentoo-commits

commit:     d4eb421dfbf11992695da541c4dae5535235bd88
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 26 02:28:37 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Nov 26 02:28:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4eb421d

dev-util/meson: fix legacy soname behavior for shared_module targets

Closes: https://bugs.gentoo.org/827143
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/meson-0.60.2-check-module-linking.patch  | 28 ++++++++++++++++++++++
 ...{meson-0.60.2.ebuild => meson-0.60.2-r1.ebuild} |  4 ++++
 2 files changed, 32 insertions(+)

diff --git a/dev-util/meson/files/meson-0.60.2-check-module-linking.patch b/dev-util/meson/files/meson-0.60.2-check-module-linking.patch
new file mode 100644
index 000000000000..b192a454c28a
--- /dev/null
+++ b/dev-util/meson/files/meson-0.60.2-check-module-linking.patch
@@ -0,0 +1,28 @@
+From df7ddc7ec19886ccdc433f42379c04c1df793565 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Thu, 25 Nov 2021 21:19:32 -0500
+Subject: [PATCH] Remove premature return in build.check_module_linking()
+
+We want to loop over all link_targets to update
+backwards_compat_want_soname if necessary.
+
+Fixes: ec9bdc6edb17d1d9da5df2d6525025242c119f3a
+---
+ mesonbuild/build.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/mesonbuild/build.py b/mesonbuild/build.py
+index ad18a7f6a..263942556 100644
+--- a/mesonbuild/build.py
++++ b/mesonbuild/build.py
+@@ -1601,7 +1601,6 @@ You probably should put it in link_with instead.''')
+                             '\n             '
+                             'use shared_libary() with `override_options: [\'b_lundef=false\']` instead.')
+                     link_target.backwards_compat_want_soname = True
+-                return
+ 
+ class Generator(HoldableObject):
+     def __init__(self, exe: T.Union['Executable', programs.ExternalProgram],
+-- 
+2.34.0
+

diff --git a/dev-util/meson/meson-0.60.2.ebuild b/dev-util/meson/meson-0.60.2-r1.ebuild
similarity index 97%
rename from dev-util/meson/meson-0.60.2.ebuild
rename to dev-util/meson/meson-0.60.2-r1.ebuild
index b1532c0364e4..dae5370ccd0e 100644
--- a/dev-util/meson/meson-0.60.2.ebuild
+++ b/dev-util/meson/meson-0.60.2-r1.ebuild
@@ -33,6 +33,10 @@ DEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/meson-0.60.2-check-module-linking.patch"
+)
+
 python_prepare_all() {
 	local disable_unittests=(
 		# ASAN and sandbox both want control over LD_PRELOAD


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2021-10-01 19:48 Mike Gilbert
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Gilbert @ 2021-10-01 19:48 UTC (permalink / raw
  To: gentoo-commits

commit:     234f7d10f49f8f60a400d808cdbf1f28ebb3b7d7
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  1 18:59:21 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Oct  1 19:41:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=234f7d10

dev-util/meson: fix testing with rust 1.55

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../meson/files/meson-tests-rust-add-libm.patch    | 22 ++++++++++++++++++++++
 dev-util/meson/meson-0.59.1-r1.ebuild              |  1 +
 2 files changed, 23 insertions(+)

diff --git a/dev-util/meson/files/meson-tests-rust-add-libm.patch b/dev-util/meson/files/meson-tests-rust-add-libm.patch
new file mode 100644
index 00000000000..45803976bb9
--- /dev/null
+++ b/dev-util/meson/files/meson-tests-rust-add-libm.patch
@@ -0,0 +1,22 @@
+From 7ad54cce49ce22b063e0cd56edb4b7f722dc5e8e Mon Sep 17 00:00:00 2001
+From: Dominique Leuenberger <dimstar@opensuse.org>
+Date: Wed, 29 Sep 2021 14:20:53 +0200
+Subject: [PATCH] tests/rust: add libm to fix build with rust 1.55
+
+Fixes #9309
+---
+ test cases/rust/5 polyglot static/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test cases/rust/5 polyglot static/meson.build b/test cases/rust/5 polyglot static/meson.build
+index de2e61bcbc3..a6e9550b6e2 100644
+--- a/test cases/rust/5 polyglot static/meson.build	
++++ b/test cases/rust/5 polyglot static/meson.build	
+@@ -2,6 +2,7 @@ project('static rust and c polyglot executable', 'c', 'rust')
+ 
+ deps = [
+   meson.get_compiler('c').find_library('dl', required: false),
++  meson.get_compiler('c').find_library('m', required: false),
+   dependency('threads'),
+ ]
+ 

diff --git a/dev-util/meson/meson-0.59.1-r1.ebuild b/dev-util/meson/meson-0.59.1-r1.ebuild
index a7a64972a73..b11b19c5d08 100644
--- a/dev-util/meson/meson-0.59.1-r1.ebuild
+++ b/dev-util/meson/meson-0.59.1-r1.ebuild
@@ -35,6 +35,7 @@ DEPEND="
 
 PATCHES=(
 	"${FILESDIR}/meson-mcompile-treat-load-average-as-a-float.patch"
+	"${FILESDIR}/meson-tests-rust-add-libm.patch"
 )
 
 python_prepare_all() {


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2020-10-11 18:16 William Hubbs
  0 siblings, 0 replies; 15+ messages in thread
From: William Hubbs @ 2020-10-11 18:16 UTC (permalink / raw
  To: gentoo-commits

commit:     faf2d76c7df7528bf6ee206b57a739004657eb48
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 11 18:10:32 2020 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 18:15:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faf2d76c

dev-util/meson: remove old

Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 dev-util/meson/Manifest                            |   1 -
 dev-util/meson/files/0.54.2-multilib-clang.patch   | 181 ---------------------
 .../files/0.54.2-prefix-dont-strip-rpath.patch     |  25 ---
 dev-util/meson/meson-0.54.3.ebuild                 |  98 -----------
 4 files changed, 305 deletions(-)

diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest
index 3d7d3160aa7..56d8beb192c 100644
--- a/dev-util/meson/Manifest
+++ b/dev-util/meson/Manifest
@@ -1,2 +1 @@
-DIST meson-0.54.3.tar.gz 1690919 BLAKE2B 5d71731fb33397f470e2440d4d45f828d28d56351843a35b575f8b386f0b1c90faf654289e22ba7c2c4bf6c3be72d3dc8a2257d4a688bcbf9a1f2522394e7728 SHA512 2e62bf992bf337ae5a01f7a0fb842ea0cefcdbc81f5675235e41d8182f37df2e003b0a8a90d650c6cca4ff79898f7888474f75e5103a48d7ca14f51a024e4f2b
 DIST meson-0.55.3.tar.gz 1740465 BLAKE2B 7d121f5d2bf487ae3c38be5ddccde6900134b9d0ea47868aac5625449e18a1a97ae0012849b795187221632cd3ac343097ef29b282753a1e8bd871c393d5c0e8 SHA512 afb0bb25b367e681131d920995124df4b06f6d144ae1a95ebec27be13e06fefbd95840e0287cd1d84bdbb8d9c115b589a833d847c60926f55e0f15749cf66bae

diff --git a/dev-util/meson/files/0.54.2-multilib-clang.patch b/dev-util/meson/files/0.54.2-multilib-clang.patch
deleted file mode 100644
index b3aa3693e69..00000000000
--- a/dev-util/meson/files/0.54.2-multilib-clang.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 9dc3ca2c1c9fbb47e731551c6432df144f725261 Mon Sep 17 00:00:00 2001
-From: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
-Date: Thu, 21 May 2020 18:58:47 +0300
-Subject: [PATCH] compilers: add fetching of define list for clang
-
-Simmilar to gcc, the list of pre-processor defines can be fetched with
-`-dM -E` option. The way cpu_family is determined on linux relies on
-this list.
-
-Fixes incorrect value of cpu_family on linux, when crosscompiling:
-
-```
-CC="clang -m32" meson ./build
-```
-
-Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
-Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
----
- mesonbuild/compilers/c.py            |  5 +++--
- mesonbuild/compilers/cpp.py          |  5 +++--
- mesonbuild/compilers/fortran.py      |  2 +-
- mesonbuild/compilers/mixins/clang.py |  9 ++++++++-
- mesonbuild/compilers/objc.py         |  2 +-
- mesonbuild/compilers/objcpp.py       |  2 +-
- mesonbuild/environment.py            | 26 +++++++++++++++++++++++++-
- 7 files changed, 42 insertions(+), 9 deletions(-)
-
-diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
-index 1bc9e84998..aac99b4269 100644
---- a/mesonbuild/compilers/c.py
-+++ b/mesonbuild/compilers/c.py
-@@ -86,9 +86,10 @@ class ClangCCompiler(ClangCompiler, CCompiler):
-     _C18_VERSION = '>=8.0.0'
- 
-     def __init__(self, exelist, version, for_machine: MachineChoice,
--                 is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs):
-+                 is_cross, info: 'MachineInfo', exe_wrapper=None,
-+                 defines: T.Optional[T.List[str]] = None, **kwargs):
-         CCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs)
--        ClangCompiler.__init__(self)
-+        ClangCompiler.__init__(self, defines)
-         default_warn_args = ['-Wall', '-Winvalid-pch']
-         self.warn_args = {'0': [],
-                           '1': default_warn_args,
-diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
-index f4bcfa9f89..478a68c13c 100644
---- a/mesonbuild/compilers/cpp.py
-+++ b/mesonbuild/compilers/cpp.py
-@@ -155,10 +155,11 @@ def _find_best_cpp_std(self, cpp_std):
- 
- class ClangCPPCompiler(ClangCompiler, CPPCompiler):
-     def __init__(self, exelist, version, for_machine: MachineChoice,
--                 is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs):
-+                 is_cross, info: 'MachineInfo', exe_wrapper=None,
-+                 defines : T.Optional[T.List[str]] = None, **kwargs):
-         CPPCompiler.__init__(self, exelist, version, for_machine, is_cross,
-                              info, exe_wrapper, **kwargs)
--        ClangCompiler.__init__(self)
-+        ClangCompiler.__init__(self, defines)
-         default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor']
-         self.warn_args = {'0': [],
-                           '1': default_warn_args,
-diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py
-index c155b5b4f3..af83c0e564 100644
---- a/mesonbuild/compilers/fortran.py
-+++ b/mesonbuild/compilers/fortran.py
-@@ -424,7 +424,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice,
-                  **kwargs):
-         FortranCompiler.__init__(self, exelist, version, for_machine,
-                                  is_cross, info, exe_wrapper, **kwargs)
--        ClangCompiler.__init__(self)
-+        ClangCompiler.__init__(self, [])
-         self.id = 'flang'
-         default_warn_args = ['-Minform=inform']
-         self.warn_args = {'0': [],
-diff --git a/mesonbuild/compilers/mixins/clang.py b/mesonbuild/compilers/mixins/clang.py
-index 1c0ee452f4..0ee10ad5d5 100644
---- a/mesonbuild/compilers/mixins/clang.py
-+++ b/mesonbuild/compilers/mixins/clang.py
-@@ -42,9 +42,10 @@
- }  # type: T.Dict[str, T.List[str]]
- 
- class ClangCompiler(GnuLikeCompiler):
--    def __init__(self):
-+    def __init__(self, defines: T.Optional[T.Dict[str, str]]):
-         super().__init__()
-         self.id = 'clang'
-+        self.defines = defines or {}
-         self.base_options.append('b_colorout')
-         # TODO: this really should be part of the linker base_options, but
-         # linkers don't have base_options.
-@@ -56,6 +57,12 @@ def __init__(self):
-     def get_colorout_args(self, colortype: str) -> T.List[str]:
-         return clang_color_args[colortype][:]
- 
-+    def has_builtin_define(self, define: str) -> bool:
-+        return define in self.defines
-+
-+    def get_builtin_define(self, define: str) -> T.Optional[str]:
-+        return self.defines.get(define)
-+
-     def get_optimization_args(self, optimization_level: str) -> T.List[str]:
-         return clang_optimization_args[optimization_level]
- 
-diff --git a/mesonbuild/compilers/objc.py b/mesonbuild/compilers/objc.py
-index 52d258dcdb..d351c8826a 100644
---- a/mesonbuild/compilers/objc.py
-+++ b/mesonbuild/compilers/objc.py
-@@ -86,7 +86,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice,
-                  **kwargs):
-         ObjCCompiler.__init__(self, exelist, version, for_machine, is_cross,
-                               info, exe_wrapper, **kwargs)
--        ClangCompiler.__init__(self)
-+        ClangCompiler.__init__(self, [])
-         default_warn_args = ['-Wall', '-Winvalid-pch']
-         self.warn_args = {'0': [],
-                           '1': default_warn_args,
-diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py
-index c8b422b35d..10555b4551 100644
---- a/mesonbuild/compilers/objcpp.py
-+++ b/mesonbuild/compilers/objcpp.py
-@@ -84,7 +84,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice,
-                  is_cross, info: 'MachineInfo', exe_wrapper=None,
-                  **kwargs):
-         ObjCPPCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs)
--        ClangCompiler.__init__(self)
-+        ClangCompiler.__init__(self, [])
-         default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor']
-         self.warn_args = {'0': [],
-                           '1': default_warn_args,
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 8fad6288b1..cb6ae7d514 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -726,6 +726,28 @@ def get_lcc_version_from_defines(defines):
-         minor = defines.get('__LCC_MINOR__', '0')
-         return dot.join((generation, major, minor))
- 
-+    @staticmethod
-+    def get_clang_compiler_defines(compiler):
-+        """
-+        Get the list of Clang pre-processor defines
-+        """
-+        args = compiler + ['-E', '-dM', '-']
-+        p, output, error = Popen_safe(args, write='', stdin=subprocess.PIPE)
-+        if p.returncode != 0:
-+            raise EnvironmentException('Unable to get clang pre-processor defines:\n' + output + error)
-+        defines = {}
-+        for line in output.split('\n'):
-+            if not line:
-+                continue
-+            d, *rest = line.split(' ', 2)
-+            if d != '#define':
-+                continue
-+            if len(rest) == 1:
-+                defines[rest] = True
-+            if len(rest) == 2:
-+                defines[rest[0]] = rest[1]
-+        return defines
-+
-     def _get_compilers(self, lang, for_machine):
-         '''
-         The list of compilers is detected in the exact same way for
-@@ -1043,6 +1065,8 @@ def sanitize(p):
-             if 'clang' in out:
-                 linker = None
- 
-+                defines = self.get_clang_compiler_defines(compiler)
-+
-                 # Even if the for_machine is darwin, we could be using vanilla
-                 # clang.
-                 if 'Apple' in out:
-@@ -1063,7 +1087,7 @@ def sanitize(p):
- 
-                 return cls(
-                     ccache + compiler, version, for_machine, is_cross, info,
--                    exe_wrap, full_version=full_version, linker=linker)
-+                    exe_wrap, defines, full_version=full_version, linker=linker)
- 
-             if 'Intel(R) C++ Intel(R)' in err:
-                 version = search_version(err)

diff --git a/dev-util/meson/files/0.54.2-prefix-dont-strip-rpath.patch b/dev-util/meson/files/0.54.2-prefix-dont-strip-rpath.patch
deleted file mode 100644
index 1fe2e1ac4cc..00000000000
--- a/dev-util/meson/files/0.54.2-prefix-dont-strip-rpath.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://bz-attachments.freebsd.org/attachment.cgi?id=204611
-https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238128
-
-Stripping RPATH on Prefix is really bad, because it means the default
-RPATH entries disappear, and any installed binaries don't work (get
-kernel traps).
-
-Extracted the minstall patch from the FreeBSD full patch.
-
---- a/mesonbuild/minstall.py
-+++ b/mesonbuild/minstall.py
-@@ -488,8 +488,11 @@
-                         printed_symlink_error = True
-             if os.path.isfile(outname):
-                 try:
--                    depfixer.fix_rpath(outname, install_rpath, final_path,
--                                       install_name_mappings, verbose=False)
-+                    if install_rpath:
-+                        depfixer.fix_rpath(outname, install_rpath, final_path,
-+                                           install_name_mappings, verbose=False)
-+                    else:
-+                        print("RPATH changes at install time disabled")
-                 except SystemExit as e:
-                     if isinstance(e.code, int) and e.code == 0:
-                         pass

diff --git a/dev-util/meson/meson-0.54.3.ebuild b/dev-util/meson/meson-0.54.3.ebuild
deleted file mode 100644
index e91ba990d3a..00000000000
--- a/dev-util/meson/meson-0.54.3.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 2016-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
-DISTUTILS_USE_SETUPTOOLS="rdepend"
-
-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 ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-inherit 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
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}"/0.54.2-multilib-clang.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[@]}" run_unittests.py || die
-
-	# Broken due to python2 script created by python_wrapper_setup
-	rm -r "test cases/frameworks/1 boost" || die
-
-	use prefix && eapply "${FILESDIR}"/0.54.2-prefix-dont-strip-rpath.patch
-
-	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
-		# https://bugs.gentoo.org/687792
-		unset PKG_CONFIG
-		distutils-r1_src_test
-	fi
-}
-
-python_test() {
-	(
-		# test_meson_installed
-		unset PYTHONDONTWRITEBYTECODE
-
-		# test_cross_file_system_paths
-		unset XDG_DATA_HOME
-
-		${EPYTHON} -u 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
-}


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2020-02-15 20:01 William Hubbs
  0 siblings, 0 replies; 15+ messages in thread
From: William Hubbs @ 2020-02-15 20:01 UTC (permalink / raw
  To: gentoo-commits

commit:     ed2b0ce5a79be885ef18d5198e14c6bf236b9e23
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 15 19:37:36 2020 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Feb 15 19:55:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed2b0ce5

dev-util/meson: 0.53.1 bump

Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 dev-util/meson/Manifest                            |  1 +
 .../files/0.53.1-remove-asan-ld_preload.patch      | 27 +++++++
 dev-util/meson/files/0.53.1-remove-asan.patch      | 27 +++++++
 dev-util/meson/meson-0.53.1.ebuild                 | 84 ++++++++++++++++++++++
 4 files changed, 139 insertions(+)

diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest
index ace970ee088..6200ecdf855 100644
--- a/dev-util/meson/Manifest
+++ b/dev-util/meson/Manifest
@@ -1,2 +1,3 @@
 DIST meson-0.52.1.tar.gz 1507764 BLAKE2B 8daf43d84186905d5c32629ab6a250955bdffda502d2d79f991111d0ae7e3a21b3f9bc09ef5258f709eee4e17b09c6f09e7685a72153efcf8daaaec2645eef8a SHA512 fea3e85191782999de3a9431ec1d2cfacea32cf9598205443855042dca50ddac92eb3e74be4dd6a62bd80a606b73e76a04877b2c8efb275d9de5f87e3f9f8f41
 DIST meson-0.53.0.tar.gz 1548138 BLAKE2B 42340645f3417930856e05da9b479e9352e1fe3ea567929215f433a04fe3b0216d6de8693428be058048d2bd9c8d21031b19d0d5599a99e8f61aa9b6da689bf7 SHA512 e79a093aba5df137d463ac1334199833b8374689b2aba1cfd935fc484fff524d84bf6c2b3fcd9371b67daade0e18d1fe5e47dccdb7cf416932e86b83f49fec73
+DIST meson-0.53.1.tar.gz 1552121 BLAKE2B 3f0bbbeba6307397dfe5e49c1f978d6246d8e18317d0361b6f013f5c2ba55ad7cba53c985418686c20db159b7790b45a0c2e05d86f861cd0280fb07afdbeb847 SHA512 0c96c354bcd7e6945473c7df0ddff929ef2bae9c2dfc7b48c6c6174c7f2be4f798398929f9c4d5986aa5fc882305ff76371ad0d65a499f058b33b05ff7025859

diff --git a/dev-util/meson/files/0.53.1-remove-asan-ld_preload.patch b/dev-util/meson/files/0.53.1-remove-asan-ld_preload.patch
new file mode 100644
index 00000000000..4ee11829904
--- /dev/null
+++ b/dev-util/meson/files/0.53.1-remove-asan-ld_preload.patch
@@ -0,0 +1,27 @@
+From 75f2d7a004387edc7a7e73da5097bf01daf38769 Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Sat, 15 Feb 2020 12:24:42 -0600
+Subject: [PATCH 1/2] remove asan ld_preload
+
+ASAN and sandbox both want control over LD_PRELOAD
+https://bugs.gentoo.org/673016
+---
+ run_unittests.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/run_unittests.py b/run_unittests.py
+index 676604f4..1c9aaf0c 100755
+--- a/run_unittests.py
++++ b/run_unittests.py
+@@ -4985,7 +4985,7 @@ class LinuxlikeTests(BasePlatformTests):
+                              r'Run-time dependency qt5 \(modules: Core\) found: YES 5.* \(pkg-config\)\n')
+ 
+     @skip_if_not_base_option('b_sanitize')
+-    def test_generate_gir_with_address_sanitizer(self):
++    def _test_generate_gir_with_address_sanitizer(self):
+         if is_cygwin():
+             raise unittest.SkipTest('asan not available on Cygwin')
+         if is_openbsd():
+-- 
+2.24.1
+

diff --git a/dev-util/meson/files/0.53.1-remove-asan.patch b/dev-util/meson/files/0.53.1-remove-asan.patch
new file mode 100644
index 00000000000..4cc2aead0ba
--- /dev/null
+++ b/dev-util/meson/files/0.53.1-remove-asan.patch
@@ -0,0 +1,27 @@
+From 9ddb289ca9611281a45734d92fdfd2d5fb83f050 Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Sat, 15 Feb 2020 12:28:35 -0600
+Subject: [PATCH 2/2] remove asan
+
+ASAN is unsupported on some targets
+https://bugs.gentoo.org/692822
+---
+ run_unittests.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/run_unittests.py b/run_unittests.py
+index 1c9aaf0c..171ee0f0 100755
+--- a/run_unittests.py
++++ b/run_unittests.py
+@@ -5475,7 +5475,7 @@ class LinuxlikeTests(BasePlatformTests):
+         self.assertEqual(install_rpath, 'baz')
+ 
+     @skip_if_not_base_option('b_sanitize')
+-    def test_pch_with_address_sanitizer(self):
++    def _test_pch_with_address_sanitizer(self):
+         if is_cygwin():
+             raise unittest.SkipTest('asan not available on Cygwin')
+         if is_openbsd():
+-- 
+2.24.1
+

diff --git a/dev-util/meson/meson-0.53.1.ebuild b/dev-util/meson/meson-0.53.1.ebuild
new file mode 100644
index 00000000000..0d807167558
--- /dev/null
+++ b/dev-util/meson/meson-0.53.1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 2016-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7,8} )
+DISTUTILS_USE_SETUPTOOLS="rdepend"
+
+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 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+fi
+
+inherit distutils-r1 toolchain-funcs
+
+DESCRIPTION="Open source build system"
+HOMEPAGE="http://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
+	)
+"
+
+PATCHES=(
+	# ASAN and sandbox both want control over LD_PRELOAD
+	# https://bugs.gentoo.org/673016
+	"${FILESDIR}"/0.53.1-remove-asan-ld_preload.patch
+	# ASAN is unsupported on some targets
+	# https://bugs.gentoo.org/692822
+	"${FILESDIR}"/0.53.1-remove-asan.patch
+	)
+
+python_prepare_all() {
+
+	# 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
+		# https://bugs.gentoo.org/687792
+		unset PKG_CONFIG
+		distutils-r1_src_test
+	fi
+}
+
+python_test() {
+	(
+		# test_meson_installed
+		unset PYTHONDONTWRITEBYTECODE
+
+		# test_cross_file_system_paths
+		unset XDG_DATA_HOME
+
+		${EPYTHON} -u 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
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2020-01-14  5:18 Mike Gilbert
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Gilbert @ 2020-01-14  5:18 UTC (permalink / raw
  To: gentoo-commits

commit:     f6f893c3222bf5c86d67f8df17db501a7cb624fc
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 14 05:17:47 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jan 14 05:18:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6f893c3

dev-util/meson: fix test_pkgconfig_gen_deps

Closes: https://bugs.gentoo.org/705352
Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/0.52.1-test_pkgconfig_gen_deps.patch     | 46 ++++++++++++++++++++++
 dev-util/meson/meson-0.52.1.ebuild                 |  4 ++
 dev-util/meson/meson-0.53.0.ebuild                 |  4 ++
 3 files changed, 54 insertions(+)

diff --git a/dev-util/meson/files/0.52.1-test_pkgconfig_gen_deps.patch b/dev-util/meson/files/0.52.1-test_pkgconfig_gen_deps.patch
new file mode 100644
index 00000000000..ec753e00230
--- /dev/null
+++ b/dev-util/meson/files/0.52.1-test_pkgconfig_gen_deps.patch
@@ -0,0 +1,46 @@
+From 1ce668f9163e1c912382eeb0e6ae40d123c0cca9 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 13 Jan 2020 23:46:09 -0500
+Subject: [PATCH] test_pkgconfig_gen_deps: set
+ PKG_CONFIG_SYSTEM_LIBRARY_PATH=/usr/lib
+
+pkgconf automatically prunes "system library paths" from its output. The
+system library paths depend on the system toolchain. A common value on a
+64-bit system is as follows:
+
+/lib64:/usr/lib64:/usr/local/lib64
+
+So, if -L/usr/lib64 appears in the Libs section, it will be pruned from
+the output of pkg-config --libs.
+
+The pc files generated for this test contain something like this:
+
+libdir=/usr/lib
+Libs: -L${libdir} ...
+
+pkgconf may not consider /usr/lib to be a system library path, so it is
+not pruned as the test expects. To work around this, override the
+compiled-in list of paths via the PKG_CONFIG_SYSTEM_LIBRARY_PATH
+environment variable.
+
+Fixes: https://github.com/mesonbuild/meson/issues/6004
+---
+ run_unittests.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/run_unittests.py b/run_unittests.py
+index 898f05e54d..5a60b9b6a4 100755
+--- a/run_unittests.py
++++ b/run_unittests.py
+@@ -4832,7 +4832,10 @@ def test_pkgconfig_gen_deps(self):
+         privatedir2 = self.privatedir
+ 
+         os.environ
+-        env = {'PKG_CONFIG_LIBDIR': os.pathsep.join([privatedir1, privatedir2])}
++        env = {
++            'PKG_CONFIG_LIBDIR': os.pathsep.join([privatedir1, privatedir2]),
++            'PKG_CONFIG_SYSTEM_LIBRARY_PATH': '/usr/lib',
++        }
+         self._run(['pkg-config', 'dependency-test', '--validate'], override_envvars=env)
+ 
+         # pkg-config strips some duplicated flags so we have to parse the

diff --git a/dev-util/meson/meson-0.52.1.ebuild b/dev-util/meson/meson-0.52.1.ebuild
index 85edd45c7d1..3b5f7e24d00 100644
--- a/dev-util/meson/meson-0.52.1.ebuild
+++ b/dev-util/meson/meson-0.52.1.ebuild
@@ -35,6 +35,10 @@ DEPEND="${RDEPEND}
 "
 
 python_prepare_all() {
+	local PATCHES=(
+		"${FILESDIR}"/0.52.1-test_pkgconfig_gen_deps.patch
+	)
+
 	# ASAN and sandbox both want control over LD_PRELOAD
 	# https://bugs.gentoo.org/673016
 	sed -i -e 's/test_generate_gir_with_address_sanitizer/_&/' run_unittests.py || die

diff --git a/dev-util/meson/meson-0.53.0.ebuild b/dev-util/meson/meson-0.53.0.ebuild
index e7ca1f73f7b..c9252fd5abd 100644
--- a/dev-util/meson/meson-0.53.0.ebuild
+++ b/dev-util/meson/meson-0.53.0.ebuild
@@ -35,6 +35,10 @@ DEPEND="${RDEPEND}
 "
 
 python_prepare_all() {
+	local PATCHES=(
+		"${FILESDIR}"/0.52.1-test_pkgconfig_gen_deps.patch
+	)
+
 	# ASAN and sandbox both want control over LD_PRELOAD
 	# https://bugs.gentoo.org/673016
 	sed -i -e 's/test_generate_gir_with_address_sanitizer/_&/' run_unittests.py || die


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2019-03-04 14:57 Mike Gilbert
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Gilbert @ 2019-03-04 14:57 UTC (permalink / raw
  To: gentoo-commits

commit:     9f8c659431bbe554bbe96cb074c9e3fe957b72ce
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  4 14:56:45 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Mar  4 14:56:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f8c6594

dev-util/meson: backport Python 3.5 tests fix

Package-Manager: Portage-2.3.59_p2, Repoman-2.3.12_p67
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../meson/files/meson-0.49-python3.5-tests.patch   | 34 ++++++++++++++++++++++
 dev-util/meson/meson-0.49.2.ebuild                 |  9 +++---
 dev-util/meson/meson-9999.ebuild                   |  5 ----
 3 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/dev-util/meson/files/meson-0.49-python3.5-tests.patch b/dev-util/meson/files/meson-0.49-python3.5-tests.patch
new file mode 100644
index 00000000000..640348b2bc2
--- /dev/null
+++ b/dev-util/meson/files/meson-0.49-python3.5-tests.patch
@@ -0,0 +1,34 @@
+From 65192af2ff62a032a3f19d065c95e12b83aae709 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@collabora.com>
+Date: Fri, 11 Jan 2019 18:03:15 +0000
+Subject: [PATCH] run_unittests: Use Python 3.5-compatible subprocess
+ invocation
+
+subprocess.run() didn't get the encoding parameter until 3.6.
+
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+---
+ run_unittests.py | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/run_unittests.py b/run_unittests.py
+index 342ad883..e1246140 100755
+--- a/run_unittests.py
++++ b/run_unittests.py
+@@ -5029,10 +5029,9 @@ class NativeFileTests(BasePlatformTests):
+                     ret = subprocess.run(
+                         ["{}"] + extra_args,
+                         stdout=subprocess.PIPE,
+-                        stderr=subprocess.PIPE,
+-                        encoding='utf-8')
+-                    print(ret.stdout)
+-                    print(ret.stderr, file=sys.stderr)
++                        stderr=subprocess.PIPE)
++                    print(ret.stdout.decode('utf-8'))
++                    print(ret.stderr.decode('utf-8'), file=sys.stderr)
+                     sys.exit(ret.returncode)
+ 
+                 if __name__ == '__main__':
+-- 
+2.21.0
+

diff --git a/dev-util/meson/meson-0.49.2.ebuild b/dev-util/meson/meson-0.49.2.ebuild
index af2f0b75de8..09b40845cc6 100644
--- a/dev-util/meson/meson-0.49.2.ebuild
+++ b/dev-util/meson/meson-0.49.2.ebuild
@@ -33,6 +33,10 @@ DEPEND="${RDEPEND}
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/meson-0.49-python3.5-tests.patch"
+)
+
 python_prepare_all() {
 	# ASAN and sandbox both want control over LD_PRELOAD
 	# https://bugs.gentoo.org/673016
@@ -51,11 +55,6 @@ src_test() {
 }
 
 python_test() {
-	if [[ ${EPYTHON} == python3.5 ]]; then
-		ewarn "Skipping tests with ${EPYTHON}"
-		return 0
-	fi
-
 	(
 		# test_meson_installed
 		unset PYTHONDONTWRITEBYTECODE

diff --git a/dev-util/meson/meson-9999.ebuild b/dev-util/meson/meson-9999.ebuild
index af2f0b75de8..89b176910cb 100644
--- a/dev-util/meson/meson-9999.ebuild
+++ b/dev-util/meson/meson-9999.ebuild
@@ -51,11 +51,6 @@ src_test() {
 }
 
 python_test() {
-	if [[ ${EPYTHON} == python3.5 ]]; then
-		ewarn "Skipping tests with ${EPYTHON}"
-		return 0
-	fi
-
 	(
 		# test_meson_installed
 		unset PYTHONDONTWRITEBYTECODE


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2019-01-26 17:41 William Hubbs
  0 siblings, 0 replies; 15+ messages in thread
From: William Hubbs @ 2019-01-26 17:41 UTC (permalink / raw
  To: gentoo-commits

commit:     418feef19a1a3027c12ec552909ee0f9cf49ff87
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 26 17:38:56 2019 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jan 26 17:41:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=418feef1

dev-util/meson: remove old versions

Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 dev-util/meson/Manifest                    |  4 ---
 dev-util/meson/files/0.48.0-multilib.patch | 48 ---------------------------
 dev-util/meson/files/0.48.0-test-u.patch   | 28 ----------------
 dev-util/meson/files/test-llvm.patch       | 26 ---------------
 dev-util/meson/meson-0.46.1.ebuild         | 39 ----------------------
 dev-util/meson/meson-0.47.1.ebuild         | 39 ----------------------
 dev-util/meson/meson-0.48.0-r2.ebuild      | 52 ------------------------------
 dev-util/meson/meson-0.48.1.ebuild         | 50 ----------------------------
 8 files changed, 286 deletions(-)

diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest
index 36ecd30f910..caeb19cb6c6 100644
--- a/dev-util/meson/Manifest
+++ b/dev-util/meson/Manifest
@@ -1,7 +1,3 @@
-DIST meson-0.46.1.tar.gz 1203731 BLAKE2B 3b6b78e24a4d1ff3166db5546dda80e8b29236babec51fd5f1e70ba4139f13c4e7b6d2985daccf9ef1bc2e33516b1278ab9c9ea4c7fce775d187450c2498dc76 SHA512 beacd5431f9d6abd85a72b2609cbd913f67829b2eef4712a5b9a151e2d0cad6e2c16b5e42819b93f986705305ed874d26211c315aa930b1695552a9e30de8b98
-DIST meson-0.47.1.tar.gz 1250211 BLAKE2B a1ef5852b432e6856733c25a7ccd225f1a9ff2d1a8f65a38375d13c2c1d93d8e756b2cc2d3528783f18b90598e3f056363822d2400773369457d0801a6e3dd58 SHA512 e5042f0553057eb3a723fd2e17994ff05c2856c0dc22f39f5c5eb68fb56281894a5d13fe9f2e0852b4c934f3f3cbc41e0639ff25db4ab9f352eff95e7d552b8b
-DIST meson-0.48.0.tar.gz 1307251 BLAKE2B cafae408a219a8f31b756cae28178480eeadac877a6a694c1369c7524b68b88e606d51823aacde177410fd97c1ad14793a11a6d1a1a97c131d33b1014ca2d5f9 SHA512 99ba4ca4899a3174803e41fe5a010d4be304cf85d7392107c2a6ad65f03d758382b1b9104a0cc54bf6fdba28e7742ecd2b0c299d43be3a66fb1381b77418036b
-DIST meson-0.48.1.tar.gz 1310408 BLAKE2B e90c5c0b396883ac516eb3a5de04a1caff084a7f018e3f9b7565ec91e520bf4c0e05a72855b3b35e361623c6bf792e471846a7bac13fabd8b42c5256af017703 SHA512 248856cbab0aba959a01a9759261108baf93eef92d454b9ebb7f54edf1aa3e26f6050e389c9889ca23b19321d835617bacd361fc598b7185f6485bc6a403534c
 DIST meson-0.48.2.tar.gz 1311011 BLAKE2B 54cb8ca4164238f1c2b77327c330a7615a8d62c63c0cbedcdbe395bf2a99c454407fbc61af8d61d38a85de5dee18e73b98b534a2c9d19cc8f622e25549b84bbf SHA512 beebc90df420c15255c49a13e2f4917934fec8fb2c5b878a59ee0cd2ae46eb05571e995e12b3110b72be89fd11ab4c534ed72aa6d6fe72719ef060df5e75695f
 DIST meson-0.49.0.tar.gz 1338576 BLAKE2B 6ae3152af337591928232c5dea8331185c8aa7f712019ed3635269544e4506fc0d9195d3d59128c5e5a286aff8ad1e3a0edf3afe28ab469989753c3c988ddae3 SHA512 6aba2a1c1dbf247fc30526215dd499b7c918c19f7f16a7216f5762e95cde39b7cfae2a1ebca1e2ea5323f2f855ed98c99af1b9048aa00bd1ffbe8da20ef2121b
 DIST meson-0.49.1.tar.gz 1340585 BLAKE2B 7df52f68948c74d4d713d57406a7b496e33740e43ea069b5cb6474a80b94800f8af7983413f3154eb2e6b7f0ea8df51e7359b8b7c6661f454dbb9a21ccf9bdc6 SHA512 cc955509d2c82b12d347f7a670a0e2abf5f6a4455dda3d53ec4abb0930b5f1c4a0ff996223ba5a5333bfec66e5d3fb3448a8187d4640e4b65397fc3e0e43dc72

diff --git a/dev-util/meson/files/0.48.0-multilib.patch b/dev-util/meson/files/0.48.0-multilib.patch
deleted file mode 100644
index 0b488f50cd5..00000000000
--- a/dev-util/meson/files/0.48.0-multilib.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 3bb300a76ed4d7a614c4a83ddefe86425040ec13 Mon Sep 17 00:00:00 2001
-From: Dylan Baker <dylan@pnwbakers.com>
-Date: Mon, 24 Sep 2018 11:08:19 -0700
-Subject: [PATCH] backends: allow running host arch binaries on compatible
- build machines
-
-Meson 0.48.0 some validation for using compiled binaries in custom
-targets and generators, which is nice. It didn't take into account
-though that as long as the OS is the same, some architectures support
-running a related architecture natively (x86_64 can run x86 natively,
-for example).
-
-Fortunately we already have a method for covering this case available
-through the Environment class.
-
-Fixes #4254
----
- mesonbuild/backend/backends.py | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
-index 0e7e8e0fe3..ccbbe173fd 100644
---- a/mesonbuild/backend/backends.py
-+++ b/mesonbuild/backend/backends.py
-@@ -13,6 +13,7 @@
- # limitations under the License.
- 
- import os, pickle, re
-+import textwrap
- from .. import build
- from .. import dependencies
- from .. import mesonlib
-@@ -731,10 +732,11 @@ def get_regen_filelist(self):
-     def exe_object_to_cmd_array(self, exe):
-         if self.environment.is_cross_build() and \
-            isinstance(exe, build.BuildTarget) and exe.is_cross:
--            if self.environment.exe_wrapper is None:
--                s = 'Can not use target %s as a generator because it is cross-built\n'
--                s += 'and no exe wrapper is defined. You might want to set it to native instead.'
--                s = s % exe.name
-+            if self.environment.exe_wrapper is None and self.environment.cross_info.need_exe_wrapper():
-+                s = textwrap.dedent('''
-+                    Can not use target {} as a generator because it is cross-built
-+                    and no exe wrapper is defined or needs_exe_wrapper is true.
-+                    You might want to set it to native instead.'''.format(exe.name))
-                 raise MesonException(s)
-         if isinstance(exe, build.BuildTarget):
-             exe_arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))]

diff --git a/dev-util/meson/files/0.48.0-test-u.patch b/dev-util/meson/files/0.48.0-test-u.patch
deleted file mode 100644
index 099d4686b96..00000000000
--- a/dev-util/meson/files/0.48.0-test-u.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 99ecedc0930a99fb4d084208964e4c7922a6efec Mon Sep 17 00:00:00 2001
-From: Masanori Kakura <kakurasan@gmail.com>
-Date: Tue, 25 Sep 2018 18:04:06 +0900
-Subject: [PATCH] environment: Use os.path.basename() when checking
- mesonlib.meson_command
-
-Without this, when one of Meson's parent directories contains
-"python", unexpected option "-u" will be passed to Meson.
----
- mesonbuild/environment.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 7a44f2fd..a0c2fda4 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -375,7 +375,7 @@ class Environment:
- 
-     def get_build_command(self, unbuffered=False):
-         cmd = mesonlib.meson_command[:]
--        if unbuffered and 'python' in cmd[0]:
-+        if unbuffered and 'python' in os.path.basename(cmd[0]):
-             cmd.insert(1, '-u')
-         return cmd
- 
--- 
-2.19.0
-

diff --git a/dev-util/meson/files/test-llvm.patch b/dev-util/meson/files/test-llvm.patch
deleted file mode 100644
index af7b9834bf3..00000000000
--- a/dev-util/meson/files/test-llvm.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 40457b1faa2c5b274447838ff1a041a8030c6c22 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sat, 6 Oct 2018 21:11:36 -0400
-Subject: [PATCH] Disable testing of static llvm linkage
-
-Gentoo doesn't provide static libs for llvm.
----
- test cases/frameworks/15 llvm/meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/test cases/frameworks/15 llvm/meson.build b/test cases/frameworks/15 llvm/meson.build
-index e05fddd2..9b38a454 100644
---- a/test cases/frameworks/15 llvm/meson.build	
-+++ b/test cases/frameworks/15 llvm/meson.build	
-@@ -20,7 +20,7 @@ if not dep_tinfo.found()
-   dep_tinfo = cpp.find_library('tinfo', required: false)
- endif
- 
--foreach static : [true, false]
-+foreach static : [false]
-   llvm_dep = dependency(
-     'llvm',
-     modules : ['bitwriter', 'asmprinter', 'executionengine', 'target',
--- 
-2.19.0
-

diff --git a/dev-util/meson/meson-0.46.1.ebuild b/dev-util/meson/meson-0.46.1.ebuild
deleted file mode 100644
index cabc6b2b4e6..00000000000
--- a/dev-util/meson/meson-0.46.1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_{5,6} )
-
-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 s390 sh sparc x86 ~amd64-fbsd ~x64-macos ~x64-solaris"
-fi
-
-inherit distutils-r1
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="http://mesonbuild.com/"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE=""
-RESTRICT="test"
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND=""
-
-python_test() {
-	${EPYTHON} run_tests.py || die
-}
-
-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
-}

diff --git a/dev-util/meson/meson-0.47.1.ebuild b/dev-util/meson/meson-0.47.1.ebuild
deleted file mode 100644
index 6a61d5bc666..00000000000
--- a/dev-util/meson/meson-0.47.1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_{5,6} )
-
-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 s390 sh sparc x86 ~amd64-fbsd ~x64-macos ~x64-solaris"
-fi
-
-inherit distutils-r1
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="http://mesonbuild.com/"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE=""
-RESTRICT="test"
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND=""
-
-python_test() {
-	${EPYTHON} run_tests.py || die
-}
-
-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
-}

diff --git a/dev-util/meson/meson-0.48.0-r2.ebuild b/dev-util/meson/meson-0.48.0-r2.ebuild
deleted file mode 100644
index e7fe15297da..00000000000
--- a/dev-util/meson/meson-0.48.0-r2.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_{5,6,7} )
-
-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 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x64-macos ~x64-solaris"
-fi
-
-inherit distutils-r1
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="http://mesonbuild.com/"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE=""
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}"/test-llvm.patch
-	"${FILESDIR}"/0.48.0-multilib.patch
-	"${FILESDIR}"/0.48.0-test-u.patch
-)
-
-python_test() {
-	(
-		# test_meson_installed
-		unset PYTHONDONTWRITEBYTECODE
-
-		# test_cross_file_system_paths
-		unset XDG_DATA_HOME
-
-		${EPYTHON} -u 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
-}

diff --git a/dev-util/meson/meson-0.48.1.ebuild b/dev-util/meson/meson-0.48.1.ebuild
deleted file mode 100644
index 882072a2fad..00000000000
--- a/dev-util/meson/meson-0.48.1.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_{5,6,7} )
-
-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 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x64-macos ~x64-solaris"
-fi
-
-inherit distutils-r1
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="http://mesonbuild.com/"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE=""
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}"/0.48.0-multilib.patch
-)
-
-python_test() {
-	(
-		# test_meson_installed
-		unset PYTHONDONTWRITEBYTECODE
-
-		# test_cross_file_system_paths
-		unset XDG_DATA_HOME
-
-		${EPYTHON} -u 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
-}


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2018-09-27 15:08 Mike Gilbert
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Gilbert @ 2018-09-27 15:08 UTC (permalink / raw
  To: gentoo-commits

commit:     9b68392fb39e8639b4858eed9e13af13b8e29988
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 27 15:06:57 2018 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Sep 27 15:06:57 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b68392f

dev-util/meson: fix multilib builds

Closes: https://bugs.gentoo.org/666968
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
Package-Manager: Portage-2.3.50_p2, Repoman-2.3.11_p9

 dev-util/meson/files/0.48.0-multilib.patch         | 48 ++++++++++++++++++++++
 ...{meson-0.48.0.ebuild => meson-0.48.0-r1.ebuild} |  6 ++-
 2 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/dev-util/meson/files/0.48.0-multilib.patch b/dev-util/meson/files/0.48.0-multilib.patch
new file mode 100644
index 00000000000..0b488f50cd5
--- /dev/null
+++ b/dev-util/meson/files/0.48.0-multilib.patch
@@ -0,0 +1,48 @@
+From 3bb300a76ed4d7a614c4a83ddefe86425040ec13 Mon Sep 17 00:00:00 2001
+From: Dylan Baker <dylan@pnwbakers.com>
+Date: Mon, 24 Sep 2018 11:08:19 -0700
+Subject: [PATCH] backends: allow running host arch binaries on compatible
+ build machines
+
+Meson 0.48.0 some validation for using compiled binaries in custom
+targets and generators, which is nice. It didn't take into account
+though that as long as the OS is the same, some architectures support
+running a related architecture natively (x86_64 can run x86 natively,
+for example).
+
+Fortunately we already have a method for covering this case available
+through the Environment class.
+
+Fixes #4254
+---
+ mesonbuild/backend/backends.py | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
+index 0e7e8e0fe3..ccbbe173fd 100644
+--- a/mesonbuild/backend/backends.py
++++ b/mesonbuild/backend/backends.py
+@@ -13,6 +13,7 @@
+ # limitations under the License.
+ 
+ import os, pickle, re
++import textwrap
+ from .. import build
+ from .. import dependencies
+ from .. import mesonlib
+@@ -731,10 +732,11 @@ def get_regen_filelist(self):
+     def exe_object_to_cmd_array(self, exe):
+         if self.environment.is_cross_build() and \
+            isinstance(exe, build.BuildTarget) and exe.is_cross:
+-            if self.environment.exe_wrapper is None:
+-                s = 'Can not use target %s as a generator because it is cross-built\n'
+-                s += 'and no exe wrapper is defined. You might want to set it to native instead.'
+-                s = s % exe.name
++            if self.environment.exe_wrapper is None and self.environment.cross_info.need_exe_wrapper():
++                s = textwrap.dedent('''
++                    Can not use target {} as a generator because it is cross-built
++                    and no exe wrapper is defined or needs_exe_wrapper is true.
++                    You might want to set it to native instead.'''.format(exe.name))
+                 raise MesonException(s)
+         if isinstance(exe, build.BuildTarget):
+             exe_arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))]

diff --git a/dev-util/meson/meson-0.48.0.ebuild b/dev-util/meson/meson-0.48.0-r1.ebuild
similarity index 91%
rename from dev-util/meson/meson-0.48.0.ebuild
rename to dev-util/meson/meson-0.48.0-r1.ebuild
index a02f93d684e..fec1d8e3fd8 100644
--- a/dev-util/meson/meson-0.48.0.ebuild
+++ b/dev-util/meson/meson-0.48.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -25,6 +25,10 @@ RESTRICT="test"
 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 RDEPEND=""
 
+PATCHES=(
+	"${FILESDIR}"/0.48.0-multilib.patch
+)
+
 python_test() {
 	${EPYTHON} run_tests.py || die
 }


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2017-01-30 17:16 William Hubbs
  0 siblings, 0 replies; 15+ messages in thread
From: William Hubbs @ 2017-01-30 17:16 UTC (permalink / raw
  To: gentoo-commits

commit:     14d47fa7ebc291429c97a48af7682883a50f9c61
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 30 17:14:49 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jan 30 17:16:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14d47fa7

dev-util/meson: remove old versions

Package-Manager: portage-2.3.3

 dev-util/meson/Manifest                         |  2 -
 dev-util/meson/files/meson-0.33.0-runpath.patch | 96 -------------------------
 dev-util/meson/meson-0.33.0.ebuild              | 36 ----------
 dev-util/meson/meson-0.35.0.ebuild              | 31 --------
 4 files changed, 165 deletions(-)

diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest
index fc09ec8..c59018f 100644
--- a/dev-util/meson/Manifest
+++ b/dev-util/meson/Manifest
@@ -1,5 +1,3 @@
-DIST meson-0.33.0.tar.gz 482221 SHA256 2417fd27cbb1e9b1006fe9e5a1f3896285d4c925ffffdf9478638b5fe3ea7fc5 SHA512 de4bdc40574dfbbc5a29861c32984dc1c97d28992e849c32f1ec0e314d3c69861768583c29eea2b9708ec6b734759d7eac60a53015fd321e29f1e9b1dbbffc22 WHIRLPOOL f12522765dcdf035f873625c3f8dca3d5800e7f12907ac80e65b76d6f7dd54469cd91060d5b89e16b1ca088c94808901706aa98a1d53ff65429bf1b733246dcf
-DIST meson-0.35.0.tar.gz 510855 SHA256 8316f1b24f2b4375673b0b7fcd88f0402567bf1ac77e5caad88cb352ac8a9b70 SHA512 285e3370307ee1e7b26af4ad0e50765dd19491fdcd85e3abb97c5892b02b57b3fa9537258d941711cb4a1012a326ae16c144f535079c8a4e427f9f0cf79cc45f WHIRLPOOL e4b6947aec49faa17c39b0c04f7bab6dc8ba64a77654f73afa283ca93e0645ba8893c76b913e6a3823e325ccd977047b3c8b83bfb3b94980a5694b254e727366
 DIST meson-0.36.0.tar.gz 459007 SHA256 17e3fb4ac697c2bd2ba7f555e5830ac13257b2250f4922e6bec504303b2830d5 SHA512 162c27fe0bf1e61422cefe3ff4397a9a426d9cabbadfe358c3c440ba746784d64c4d689c2dc22b0456e6c6631b2e92874a85ee597d58614ee45e932b9285c9f8 WHIRLPOOL 05bb5cafc919e73c02f0d6a484d439d79f94f2ff5367d33a277e0b07af668daa8871c6c140c6fcfd64b5a099a2f13597eb31946b044b64acf726f1fa4a8cd596
 DIST meson-0.37.1.tar.gz 487233 SHA256 32515e2bdbd9c5774941f74f7c87513bcdc08a6b1e5307eac1e2ae5aa6966b91 SHA512 6d112736bb485e6a0206143f38b83afae1e3e709e3a8f42415621b956cf313cc52a7a21dc52d099ccf746ebcc097f0ba3addc0141f0e90ee4df399f8745c95bf WHIRLPOOL 87a2e7902aa0f5dc12266095275cd7f3d86da774a1a918050f43975e4ef40a8b88608ede2d0e525e8f2c865f5ca1c78e7d5a0e7f7474b6dad537563c52a0666a
 DIST meson-0.38.0.tar.gz 514051 SHA256 462ee047c48102a83ed9c3a48e3b9b29ec5da4c4a92b517cac2bffb87caf4455 SHA512 c9907ac018c0ec7c047a6deabedb376b39cac494773a17387f8465616a9b52d977bf4f5271db3f9fba412e6dcf015cdab677ab9fb8d874ef431c79d83adcd1e1 WHIRLPOOL c01d01403a327e96f321e3d180a4f65e03017e3a52238b8b1f31d3ae42cc52171d2b677641d2d56f56cd4f7984bcb296d39293726451c956c05aa4ef56c372f6

diff --git a/dev-util/meson/files/meson-0.33.0-runpath.patch b/dev-util/meson/files/meson-0.33.0-runpath.patch
deleted file mode 100644
index 2081cd3..00000000
--- a/dev-util/meson/files/meson-0.33.0-runpath.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From b42c0555ca35ebf6e97438ef414a3de62eaa2ced Mon Sep 17 00:00:00 2001
-From: Jussi Pakkanen <jpakkane@gmail.com>
-Date: Tue, 2 Aug 2016 21:45:45 +0300
-Subject: [PATCH] Handle both DT_RPATH as well as DT_RUNPATH when fixing rpath
- settings.
-
----
- mesonbuild/scripts/depfixer.py | 30 +++++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 7 deletions(-)
-
-diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
-index 8ff0dd1..cb136f4 100644
---- a/mesonbuild/scripts/depfixer.py
-+++ b/mesonbuild/scripts/depfixer.py
-@@ -20,6 +20,7 @@
- SHT_STRTAB = 3
- DT_NEEDED = 1
- DT_RPATH = 15
-+DT_RUNPATH = 29
- DT_STRTAB = 5
- DT_SONAME = 14
- 
-@@ -211,21 +212,29 @@ def print_soname(self):
-         self.bf.seek(strtab.val + soname.val)
-         print(self.read_str())
- 
--    def get_rpath_offset(self):
-+    def get_entry_offset(self, entrynum):
-         sec = self.find_section(b'.dynstr')
-         for i in self.dynamic:
--            if i.d_tag == DT_RPATH:
-+            if i.d_tag == entrynum:
-                 return sec.sh_offset + i.val
-         return None
- 
-     def print_rpath(self):
--        offset = self.get_rpath_offset()
-+        offset = self.get_entry_offset(DT_RPATH)
-         if offset is None:
-             print("This file does not have an rpath.")
-         else:
-             self.bf.seek(offset)
-             print(self.read_str())
- 
-+    def print_runpath(self):
-+        offset = self.get_entry_offset(DT_RUNPATH)
-+        if offset is None:
-+            print("This file does not have a runpath.")
-+        else:
-+            self.bf.seek(offset)
-+            print(self.read_str())
-+
-     def print_deps(self):
-         sec = self.find_section(b'.dynstr')
-         deps = []
-@@ -257,9 +266,15 @@ def fix_deps(self, prefix):
-                 self.bf.write(newname)
- 
-     def fix_rpath(self, new_rpath):
-+        # The path to search for can be either rpath or runpath.
-+        # Fix both of them to be sure.
-+        self.fix_rpathtype_entry(new_rpath, DT_RPATH)
-+        self.fix_rpathtype_entry(new_rpath, DT_RUNPATH)
-+
-+    def fix_rpathtype_entry(self, new_rpath, entrynum):
-         if isinstance(new_rpath, str):
-             new_rpath = new_rpath.encode('utf8')
--        rp_off = self.get_rpath_offset()
-+        rp_off = self.get_entry_offset(entrynum)
-         if rp_off is None:
-             if self.verbose:
-                 print('File does not have rpath. It should be a fully static executable.')
-@@ -272,12 +287,12 @@ def fix_rpath(self, new_rpath):
-         self.bf.write(new_rpath)
-         self.bf.write(b'\0'*(len(old_rpath) - len(new_rpath) + 1))
-         if len(new_rpath) == 0:
--            self.remove_rpath_entry()
-+            self.remove_rpath_entry(entrynum)
- 
--    def remove_rpath_entry(self):
-+    def remove_rpath_entry(self, entrynum):
-         sec = self.find_section(b'.dynamic')
-         for (i, entry) in enumerate(self.dynamic):
--            if entry.d_tag == DT_RPATH:
-+            if entry.d_tag == entrynum:
-                 rpentry = self.dynamic[i]
-                 rpentry.d_tag = 0
-                 self.dynamic = self.dynamic[:i] + self.dynamic[i+1:] + [rpentry]
-@@ -296,6 +311,7 @@ def run(args):
-     e = Elf(args[0])
-     if len(args) == 1:
-         e.print_rpath()
-+        e.print_runpath()
-     else:
-         new_rpath = args[1]
-         e.fix_rpath(new_rpath)

diff --git a/dev-util/meson/meson-0.33.0.ebuild b/dev-util/meson/meson-0.33.0.ebuild
deleted file mode 100644
index f863b64..00000000
--- a/dev-util/meson/meson-0.33.0.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-PYTHON_COMPAT=( python3_{4,5} )
-
-inherit distutils-r1
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="http://mesonbuild.com/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-DEPEND="${PYTHON_DEPS}
-	>=dev-util/ninja-1.6.0
-"
-RDEPEND="${DEPEND}"
-
-DOCS=( authors.txt contributing.txt )
-
-PATCHES=(
-	# https://github.com/mesonbuild/meson/pull/663
-	"${FILESDIR}"/${P}-runpath.patch
-)
-
-src_install() {
-	distutils-r1_src_install
-	for i in mesonconf mesonintrospect meson wraptool; do
-		dosym "${i}.py" "/usr/bin/${i}"
-	done
-}

diff --git a/dev-util/meson/meson-0.35.0.ebuild b/dev-util/meson/meson-0.35.0.ebuild
deleted file mode 100644
index 44eeaec..00000000
--- a/dev-util/meson/meson-0.35.0.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-PYTHON_COMPAT=( python3_{4,5} )
-
-inherit distutils-r1
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="http://mesonbuild.com/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="${PYTHON_DEPS}
-	>=dev-util/ninja-1.6.0
-"
-RDEPEND="${DEPEND}"
-
-DOCS=( authors.txt contributing.txt )
-
-src_install() {
-	distutils-r1_src_install
-	for i in mesonconf mesonintrospect meson wraptool; do
-		dosym "${i}.py" "/usr/bin/${i}"
-	done
-}


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
@ 2016-08-06  7:05 Pacho Ramos
  0 siblings, 0 replies; 15+ messages in thread
From: Pacho Ramos @ 2016-08-06  7:05 UTC (permalink / raw
  To: gentoo-commits

commit:     288a728fc408f7a20cff8422f4660749eaf1091f
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  6 06:47:53 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Aug  6 07:05:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=288a728f

dev-util/meson: new package needed by gst-transcoder (and probably needed by more gstreamer stuff in the future).

Package-Manager: portage-2.3.0

 dev-util/meson/Manifest                         |  1 +
 dev-util/meson/files/meson-0.33.0-runpath.patch | 96 +++++++++++++++++++++++++
 dev-util/meson/meson-0.33.0.ebuild              | 36 ++++++++++
 dev-util/meson/metadata.xml                     |  8 +++
 4 files changed, 141 insertions(+)

diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest
new file mode 100644
index 0000000..10dce1e
--- /dev/null
+++ b/dev-util/meson/Manifest
@@ -0,0 +1 @@
+DIST meson-0.33.0.tar.gz 482221 SHA256 2417fd27cbb1e9b1006fe9e5a1f3896285d4c925ffffdf9478638b5fe3ea7fc5 SHA512 de4bdc40574dfbbc5a29861c32984dc1c97d28992e849c32f1ec0e314d3c69861768583c29eea2b9708ec6b734759d7eac60a53015fd321e29f1e9b1dbbffc22 WHIRLPOOL f12522765dcdf035f873625c3f8dca3d5800e7f12907ac80e65b76d6f7dd54469cd91060d5b89e16b1ca088c94808901706aa98a1d53ff65429bf1b733246dcf

diff --git a/dev-util/meson/files/meson-0.33.0-runpath.patch b/dev-util/meson/files/meson-0.33.0-runpath.patch
new file mode 100644
index 0000000..2081cd3
--- /dev/null
+++ b/dev-util/meson/files/meson-0.33.0-runpath.patch
@@ -0,0 +1,96 @@
+From b42c0555ca35ebf6e97438ef414a3de62eaa2ced Mon Sep 17 00:00:00 2001
+From: Jussi Pakkanen <jpakkane@gmail.com>
+Date: Tue, 2 Aug 2016 21:45:45 +0300
+Subject: [PATCH] Handle both DT_RPATH as well as DT_RUNPATH when fixing rpath
+ settings.
+
+---
+ mesonbuild/scripts/depfixer.py | 30 +++++++++++++++++++++++-------
+ 1 file changed, 23 insertions(+), 7 deletions(-)
+
+diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
+index 8ff0dd1..cb136f4 100644
+--- a/mesonbuild/scripts/depfixer.py
++++ b/mesonbuild/scripts/depfixer.py
+@@ -20,6 +20,7 @@
+ SHT_STRTAB = 3
+ DT_NEEDED = 1
+ DT_RPATH = 15
++DT_RUNPATH = 29
+ DT_STRTAB = 5
+ DT_SONAME = 14
+ 
+@@ -211,21 +212,29 @@ def print_soname(self):
+         self.bf.seek(strtab.val + soname.val)
+         print(self.read_str())
+ 
+-    def get_rpath_offset(self):
++    def get_entry_offset(self, entrynum):
+         sec = self.find_section(b'.dynstr')
+         for i in self.dynamic:
+-            if i.d_tag == DT_RPATH:
++            if i.d_tag == entrynum:
+                 return sec.sh_offset + i.val
+         return None
+ 
+     def print_rpath(self):
+-        offset = self.get_rpath_offset()
++        offset = self.get_entry_offset(DT_RPATH)
+         if offset is None:
+             print("This file does not have an rpath.")
+         else:
+             self.bf.seek(offset)
+             print(self.read_str())
+ 
++    def print_runpath(self):
++        offset = self.get_entry_offset(DT_RUNPATH)
++        if offset is None:
++            print("This file does not have a runpath.")
++        else:
++            self.bf.seek(offset)
++            print(self.read_str())
++
+     def print_deps(self):
+         sec = self.find_section(b'.dynstr')
+         deps = []
+@@ -257,9 +266,15 @@ def fix_deps(self, prefix):
+                 self.bf.write(newname)
+ 
+     def fix_rpath(self, new_rpath):
++        # The path to search for can be either rpath or runpath.
++        # Fix both of them to be sure.
++        self.fix_rpathtype_entry(new_rpath, DT_RPATH)
++        self.fix_rpathtype_entry(new_rpath, DT_RUNPATH)
++
++    def fix_rpathtype_entry(self, new_rpath, entrynum):
+         if isinstance(new_rpath, str):
+             new_rpath = new_rpath.encode('utf8')
+-        rp_off = self.get_rpath_offset()
++        rp_off = self.get_entry_offset(entrynum)
+         if rp_off is None:
+             if self.verbose:
+                 print('File does not have rpath. It should be a fully static executable.')
+@@ -272,12 +287,12 @@ def fix_rpath(self, new_rpath):
+         self.bf.write(new_rpath)
+         self.bf.write(b'\0'*(len(old_rpath) - len(new_rpath) + 1))
+         if len(new_rpath) == 0:
+-            self.remove_rpath_entry()
++            self.remove_rpath_entry(entrynum)
+ 
+-    def remove_rpath_entry(self):
++    def remove_rpath_entry(self, entrynum):
+         sec = self.find_section(b'.dynamic')
+         for (i, entry) in enumerate(self.dynamic):
+-            if entry.d_tag == DT_RPATH:
++            if entry.d_tag == entrynum:
+                 rpentry = self.dynamic[i]
+                 rpentry.d_tag = 0
+                 self.dynamic = self.dynamic[:i] + self.dynamic[i+1:] + [rpentry]
+@@ -296,6 +311,7 @@ def run(args):
+     e = Elf(args[0])
+     if len(args) == 1:
+         e.print_rpath()
++        e.print_runpath()
+     else:
+         new_rpath = args[1]
+         e.fix_rpath(new_rpath)

diff --git a/dev-util/meson/meson-0.33.0.ebuild b/dev-util/meson/meson-0.33.0.ebuild
new file mode 100644
index 0000000..56c2ab9
--- /dev/null
+++ b/dev-util/meson/meson-0.33.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python3_{3,4,5} )
+
+inherit distutils-r1
+
+DESCRIPTION="Open source build system"
+HOMEPAGE="http://mesonbuild.com/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}
+	dev-util/ninja
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( authors.txt contributing.txt )
+
+PATCHES=(
+	# https://github.com/mesonbuild/meson/pull/663
+	"${FILESDIR}"/${P}-runpath.patch
+)
+
+src_install() {
+	distutils-r1_src_install
+	for i in mesonconf mesonintrospect meson wraptool; do
+		dosym "${i}.py" "/usr/bin/${i}"
+	done
+}

diff --git a/dev-util/meson/metadata.xml b/dev-util/meson/metadata.xml
new file mode 100644
index 0000000..fb1ea72
--- /dev/null
+++ b/dev-util/meson/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+	<email>gstreamer@gentoo.org</email>
+	<name>GStreamer package maintainers</name>
+</maintainer>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-12-27 13:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-27 13:32 [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-12-06  5:42 Sam James
2023-09-24  4:13 Sam James
2023-08-17  7:42 James Le Cuirot
2022-09-11 15:09 Fabian Groffen
2021-11-26  2:29 Mike Gilbert
2021-10-01 19:48 Mike Gilbert
2020-10-11 18:16 William Hubbs
2020-02-15 20:01 William Hubbs
2020-01-14  5:18 Mike Gilbert
2019-03-04 14:57 Mike Gilbert
2019-01-26 17:41 William Hubbs
2018-09-27 15:08 Mike Gilbert
2017-01-30 17:16 William Hubbs
2016-08-06  7:05 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox