Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package meson for openSUSE:Factory checked in at 2025-02-19 15:58:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/meson (Old) and /work/SRC/openSUSE:Factory/.meson.new.25061 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "meson" Wed Feb 19 15:58:16 2025 rev:122 rq:1246701 version:1.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/meson/meson.changes 2025-01-29 16:10:18.235279673 +0100 +++ /work/SRC/openSUSE:Factory/.meson.new.25061/meson.changes 2025-02-19 15:58:18.351465430 +0100 @@ -1,0 +2,5 @@ +Thu Jan 30 11:48:21 UTC 2025 - Dominique Leuenberger <dims...@opensuse.org> + +- Add 14001.patch: Add meson BuildRequires generator. + +------------------------------------------------------------------- New: ---- 14001.patch BETA DEBUG BEGIN: New: - Add 14001.patch: Add meson BuildRequires generator. BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ meson.spec ++++++ --- /var/tmp/diff_new_pack.HlRjbZ/_old 2025-02-19 15:58:20.031535498 +0100 +++ /var/tmp/diff_new_pack.HlRjbZ/_new 2025-02-19 15:58:20.031535498 +0100 @@ -48,6 +48,8 @@ Patch0: meson-test-installed-bin.patch # PATCH-FIX-OPENSUSE give more time to testsuites that run emulated Patch1: extend-test-timeout-on-qemu-builds.patch +# PATCH-FEATURE-UPSTREAM -- based on https://github.com/mesonbuild/meson/pull/14001/commits +Patch2: 14001.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} @@ -216,6 +218,9 @@ install -Dpm 0644 data/macros.meson \ %{buildroot}%{_rpmconfigdir}/macros.d/macros.meson +install -Dpm 0755 data//mesongenbuildreq.py \ + %{buildroot}%{_rpmconfigdir}/mesongenbuildreq + install -Dpm 0644 data/syntax-highlighting/vim/ftdetect/meson.vim \ -t %{buildroot}%{vim_data_dir}/site/ftdetect/ install -Dpm 0644 data/syntax-highlighting/vim/indent/meson.vim \ @@ -263,6 +268,7 @@ %dir %{_datadir}/polkit-1/actions/ %{_datadir}/polkit-1/actions/com.mesonbuild.install.policy %{_rpmconfigdir}/macros.d/macros.meson +%{_rpmconfigdir}/mesongenbuildreq %{_mandir}/man1/meson.1%{?ext_man} %files vim ++++++ 14001.patch ++++++ >From 8679ea9525672d74030303be062d9545c92b5840 Mon Sep 17 00:00:00 2001 From: solomoncyj <solomon...@gmail.com> Date: Sun, 15 Dec 2024 21:00:42 +0800 Subject: [PATCH 1/2] feat: set up dependencies generation for fedora --- data/macros.meson | 5 +++++ data/mesongenbuildreq.py | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 data/mesongenbuildreq.py Index: meson-1.7.0/data/macros.meson =================================================================== --- meson-1.7.0.orig/data/macros.meson +++ meson-1.7.0/data/macros.meson @@ -47,6 +47,11 @@ %{?qemu_user_space_build: -t 10} \ %{nil}} +%meson_buildrequires \ + %{shrink: python3 %{_rpmconfigdir}/mesongenbuildreq %{__meson} \ + %{nil}} + + # Declarative buildsystem, requires RPM 4.20+ to work # https://rpm-software-management.github.io/rpm/manual/buildsystem.html %buildsystem_meson_conf() %meson %* Index: meson-1.7.0/data/mesongenbuildreq.py =================================================================== --- /dev/null +++ meson-1.7.0/data/mesongenbuildreq.py @@ -0,0 +1,19 @@ +import subprocess +import json +import sys +deps_json = json.loads(subprocess.run([sys.argv[1], "introspect", "--dependencies", "meson.build"], capture_output=True).stdout) +unsorted_deps = dict(zip([x['name'] for x in deps_json],[x['version'] for x in deps_json])) +unsorted_deps.pop('', None) +deps = {} +for lib in list(unsorted_deps.keys()) : + deps[lib] = unsorted_deps[lib] +for lib, versions in deps.items() : + # Prepare version constraint + version_str = ' ' + ' '.join(versions) if versions else '' + line = [] + for prefix in ["cmake", "pkgconfig", "qmake"] : + buildreq = (f"{prefix}({lib}){version_str}") + if buildreq.split('=')[-1] == '' and '=' in buildreq : + buildreq = buildreq.split('=')[0] + line.append(buildreq) + print(f"({' or '.join(line)})")