From 95fd1c47f03dcd65a48123741b81c12f619829413c63248d6b28600d986cae86 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 27 Apr 2022 07:57:10 +0000 Subject: [PATCH] Accepting request 972950 from home:susnux:branches:GNOME:Factory Update to 0.62.1 OBS-URL: https://build.opensuse.org/request/show/972950 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=224 --- ...e-Use-doc-install_tag-for-gnome.yelp.patch | 84 +++++++++++++++++++ 34daa53a.patch | 26 ------ meson-0.61.4.tar.gz | 3 - meson-0.61.4.tar.gz.asc | 16 ---- meson-0.62.1.tar.gz | 3 + meson-0.62.1.tar.gz.asc | 16 ++++ meson-distutils.patch | 29 +++++-- meson-test-installed-bin.patch | 11 ++- meson.changes | 56 +++++++++++++ meson.spec | 69 ++++++++------- 10 files changed, 217 insertions(+), 96 deletions(-) create mode 100644 0001-gnome-Use-doc-install_tag-for-gnome.yelp.patch delete mode 100644 34daa53a.patch delete mode 100644 meson-0.61.4.tar.gz delete mode 100644 meson-0.61.4.tar.gz.asc create mode 100644 meson-0.62.1.tar.gz create mode 100644 meson-0.62.1.tar.gz.asc diff --git a/0001-gnome-Use-doc-install_tag-for-gnome.yelp.patch b/0001-gnome-Use-doc-install_tag-for-gnome.yelp.patch new file mode 100644 index 0000000..6d10964 --- /dev/null +++ b/0001-gnome-Use-doc-install_tag-for-gnome.yelp.patch @@ -0,0 +1,84 @@ +From 92741a72e1e8f6af2674a695c5f3752161626d74 Mon Sep 17 00:00:00 2001 +From: Ferdinand Thiessen +Date: Sat, 23 Apr 2022 13:28:07 +0200 +Subject: gnome: Use 'doc' install_tag for gnome.yelp + +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py +index 8c6364740..ed07aa849 100644 +--- a/mesonbuild/modules/gnome.py ++++ b/mesonbuild/modules/gnome.py +@@ -1281,7 +1281,7 @@ class GnomeModule(ExtensionModule): + install_dir = os.path.join(state.environment.get_datadir(), 'help') + c_install_dir = os.path.join(install_dir, 'C', project_id) + c_data = build.Data(sources_files, c_install_dir, c_install_dir, +- mesonlib.FileMode(), state.subproject) ++ mesonlib.FileMode(), state.subproject, install_tag='doc') + targets.append(c_data) + + media_files: T.List[mesonlib.File] = [] +@@ -1291,7 +1291,7 @@ class GnomeModule(ExtensionModule): + media_files.append(f) + m_install_dir = os.path.join(c_install_dir, os.path.dirname(m)) + m_data = build.Data([f], m_install_dir, m_install_dir, +- mesonlib.FileMode(), state.subproject) ++ mesonlib.FileMode(), state.subproject, install_tag='doc') + targets.append(m_data) + + pot_file = os.path.join('@SOURCE_ROOT@', state.subdir, 'C', project_id + '.pot') +@@ -1314,14 +1314,14 @@ class GnomeModule(ExtensionModule): + if symlinks: + link_target = os.path.join(os.path.relpath(c_install_dir, start=m_install_dir), m) + l_data = build.SymlinkData(link_target, os.path.basename(m), +- m_install_dir, state.subproject) ++ m_install_dir, state.subproject, install_tag='doc') + else: + try: + m_file = mesonlib.File.from_source_file(state.environment.source_dir, l_subdir, m) + except MesonException: + m_file = media_files[i] + l_data = build.Data([m_file], m_install_dir, m_install_dir, +- mesonlib.FileMode(), state.subproject) ++ mesonlib.FileMode(), state.subproject, install_tag='doc') + targets.append(l_data) + + po_file = l + '.po' +@@ -1344,6 +1344,7 @@ class GnomeModule(ExtensionModule): + [msgfmt, '@INPUT@', '-o', '@OUTPUT@'], + [po_file], + [gmo_file], ++ install_tag=['doc'], + ) + targets.append(gmotarget) + +@@ -1358,6 +1359,7 @@ class GnomeModule(ExtensionModule): + extra_depends=[gmotarget], + install=True, + install_dir=[l_install_dir], ++ install_tag=['doc'], + ) + targets.append(mergetarget) + +diff --git a/mesonbuild/build.py b/mesonbuild/build.py +index 22927f9f2..c223dc88d 100644 +--- a/mesonbuild/build.py ++++ b/mesonbuild/build.py +@@ -2450,13 +2450,9 @@ class CustomTarget(Target, CommandBase): + self.install = install + self.install_dir = list(install_dir or []) + self.install_mode = install_mode +- _install_tag: T.List[T.Optional[str]] +- if not install_tag: +- _install_tag = [None] * len(self.outputs) +- elif len(install_tag) == 1: +- _install_tag = list(install_tag) * len(self.outputs) +- else: +- _install_tag = list(install_tag) ++ _install_tag = [None] if not install_tag else stringlistify(install_tag) ++ if len(_install_tag) == 1: ++ _install_tag = list(_install_tag) * len(self.outputs) + self.install_tag = _install_tag + self.name = name if name else self.outputs[0] + +-- +2.36.0 + diff --git a/34daa53a.patch b/34daa53a.patch deleted file mode 100644 index 64826a6..0000000 --- a/34daa53a.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 34daa53aa6e6714f906f20bcc17f5300c21abcde Mon Sep 17 00:00:00 2001 -From: Antoine Jacoutot -Date: Wed, 23 Mar 2022 22:15:11 +0100 -Subject: [PATCH] gnome module: properly fallback to gtk-update-icon-cache - -Commit a0cade8f introduced a typo and wrongly check for -gtk4-update-icon-cache twice. -If gtk4-update-icon-cache (gtk4) is not found, look for -gtk-update-icon-cache (gtk3) instead. ---- - mesonbuild/modules/gnome.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py -index 673a781a41d..501be9ae4da 100644 ---- a/mesonbuild/modules/gnome.py -+++ b/mesonbuild/modules/gnome.py -@@ -371,7 +371,7 @@ def post_install(self, state: 'ModuleState', args: T.List['TYPE_var'], kwargs: ' - prog = state.find_program('gtk4-update-icon-cache', required=False) - found = isinstance(prog, build.Executable) or prog.found() - if not found: -- prog = state.find_program('gtk4-update-icon-cache') -+ prog = state.find_program('gtk-update-icon-cache') - icondir = os.path.join(datadir_abs, 'icons', 'hicolor') - script = state.backend.get_executable_serialisation([prog, '-q', '-t', '-f', icondir]) - script.skip_if_destdir = True diff --git a/meson-0.61.4.tar.gz b/meson-0.61.4.tar.gz deleted file mode 100644 index b6b7935..0000000 --- a/meson-0.61.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e3733ddc66bac38e38c63b739c9b8b8fc5a866de5333396b0c85c2b144ddee9 -size 2014265 diff --git a/meson-0.61.4.tar.gz.asc b/meson-0.61.4.tar.gz.asc deleted file mode 100644 index 531d0f9..0000000 --- a/meson-0.61.4.tar.gz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEEGeLW2bRtjapiiPh3wk5jG6ux/nAFAmI+Im8ACgkQwk5jG6ux -/nAx1A//ahO5t+1WhvVbNqUS4vqpkEi4SeG5oeg/K1LURjoNYUek3t+FGB1Yn278 -zwQ55vH9FNyT18LrV3LcKBKAAF0Ja+j7o+LQcG9zF6g31QOAzVW4ACF7TK5XXaMn -1mSPuzlF1s81SP4SMpaTdAEk1XJfS0b913YPvBcxvkG5ti1/pdQ9ORuX37cax3XF -OaWppWmkRKiNPOScZdLprOC+RrHitdaTyEmZ5idudy+HeqZ733yoGaBgel7hxdgn -u9GVQJj2oKL2HR1Vaoc/iyd7khiXQHA3GqcDkGP4jWEFwaQ02l3mohGhq333325s -9dO+tm4y29BZ5NFzaXm9B0sUqrEPHJggdl/+ylwzf5WtI30UTPYlF2u+UpIStVIX -Ta+Xq/wtaUO5469IYX7CFHY0qNr0rGq+s3XpMjqdHk+Sjhuk2Ff6bSeky+3z29C8 -aWYW7cWFcHzPRTy0BX4S2ZC6gsuAnHgsoqOn05oPNbbKMMzlaR5O31ugQh2KYVVb -N+ujIDzfyMQfq2acZ4SbX8gBmfOFC1KADqmUMc8MUVyDFLTiNCEFkzrJCOXFAeMb -pUgFon6s+VimPxTUM+rdSqQdt6Mh5dU90dLiPV7rXvJx3rupCiJO8zu7ncI3+Dm2 -Nz6Rl05j+hAwctC23EIQNwoKYJafeYwuIHD0yd30vLG2ZaASxkw= -=WxQj ------END PGP SIGNATURE----- diff --git a/meson-0.62.1.tar.gz b/meson-0.62.1.tar.gz new file mode 100644 index 0000000..33bda0c --- /dev/null +++ b/meson-0.62.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0f5caa1e70da12d5e63aa6a9504273759b891af36c8d87de381a4ed1380e845 +size 2034805 diff --git a/meson-0.62.1.tar.gz.asc b/meson-0.62.1.tar.gz.asc new file mode 100644 index 0000000..cf05f36 --- /dev/null +++ b/meson-0.62.1.tar.gz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEGeLW2bRtjapiiPh3wk5jG6ux/nAFAmJj2HgACgkQwk5jG6ux +/nAEuQ/+ON+vX54n+H9HCczGoyhKOiZM0KU02lco1H654LU8IhXCrgvJP7HzJJml +0mOL9zaLMNTG5tTRY2VmsEhRoKj33xxxVgc5eByqAZa8YMte/UocVt28+laKIWfM +AozfGeDeh/LZz16GoclbbfWtnSL/SyYauNCI9YDPH0QRhU/bH9CLbUwk9L9GHCQn +MkgMEDdwPY1nrdfy70rq01SFkvH+D66pcy1m1hs1TRVUuEZhObXDRVxWHCd3UEEO +q3Vm3QEDfrCboEAfFtjOztu7iy8xXe25B/CDzDln1YCMbhzhO0QxkQTb9SX6CBQA +4QeVQ9wzYbYqLkC3/+ifu7or1e9H8aqX8KrPSc6jgbYmxgSVtG6efRETaXbPoZXC +aNjBcg92j2kOlU7eVg3zCUAAeRlUrPmMsbpPyx36sFaYsi5KidspczmMKzwtVI5Z +YIXSlQ1wOk0RkJ/KVhKHeSYDCABg1mtboJO85EWaT7mlPrxcUo7yLIRl/6dEjIBS +sEo1IAJIH+uFgzpPOZ0J/eM2WYjXMpmVWY4FYprh+QM4Gr0SarZrzRLOdUE/t2U/ +HtuL95EBt+c9fTPI6ESUEwqhItChhL5J4nP9ih2Cm8K8oHe8CwJ6/YNm1ur+LiWA +fa5YbxAQdwhj3iVTCo5pakV4+9O3sJpBbe5yWUlhkk2JEIGNt7Y= +=H4nw +-----END PGP SIGNATURE----- diff --git a/meson-distutils.patch b/meson-distutils.patch index 79af79b..be56944 100644 --- a/meson-distutils.patch +++ b/meson-distutils.patch @@ -1,17 +1,25 @@ -Index: meson-0.58.1/setup.py -=================================================================== ---- meson-0.58.1.orig/setup.py -+++ meson-0.58.1/setup.py -@@ -20,7 +20,7 @@ if sys.version_info < (3, 6): +diff -Nur meson-0.62.1/MANIFEST.in new/MANIFEST.in +--- meson-0.62.1/MANIFEST.in 2022-04-20 17:32:16.000000000 +0200 ++++ new/MANIFEST.in 2022-04-26 16:59:11.579219774 +0200 +@@ -17,3 +17,5 @@ + include run_meson_command_tests.py + include run_project_tests.py + include meson.py ++ ++include mesonbuild/dependencies/data/*.txt +diff -Nur meson-0.62.1/setup.py new/setup.py +--- meson-0.62.1/setup.py 2022-04-20 17:32:16.000000000 +0200 ++++ new/setup.py 2022-04-26 16:58:46.507097203 +0200 +@@ -20,7 +20,7 @@ raise SystemExit('ERROR: Tried to install Meson with an unsupported Python version: \n{}' - '\nMeson requires Python 3.6.0 or greater'.format(sys.version)) + '\nMeson requires Python 3.7.0 or greater'.format(sys.version)) -from setuptools import setup +from distutils.core import setup data_files = [] if sys.platform != 'win32': -@@ -28,4 +28,12 @@ if sys.platform != 'win32': +@@ -28,4 +28,16 @@ data_files = [('share/man/man1', ['man/meson.1']), ('share/polkit-1/actions', ['data/com.mesonbuild.install.policy'])] @@ -24,5 +32,8 @@ Index: meson-0.58.1/setup.py + for root, dirs, files in os.walk('mesonbuild') + if '__init__.py' in files] + -+setup(packages=packages, data_files=data_files,) - ++setup( ++ packages=packages, ++ package_data={'mesonbuild.dependencies.data': ['mesonbuild/dependencies/data/*.txt']}, ++ data_files=data_files, ++) diff --git a/meson-test-installed-bin.patch b/meson-test-installed-bin.patch index 1dcea5b..ed736bf 100644 --- a/meson-test-installed-bin.patch +++ b/meson-test-installed-bin.patch @@ -1,8 +1,7 @@ -Index: meson-0.59.0/run_tests.py -=================================================================== ---- meson-0.59.0.orig/run_tests.py -+++ meson-0.59.0/run_tests.py -@@ -163,18 +163,10 @@ def get_meson_script() -> str: +diff -Nur meson-0.62.1/run_tests.py new/run_tests.py +--- meson-0.62.1/run_tests.py 2022-04-23 11:53:34.000000000 +0200 ++++ new/run_tests.py 2022-04-23 14:30:53.079730407 +0200 +@@ -175,18 +175,10 @@ Also used by run_unittests.py to determine what meson to run when not running in-process (which is the default). ''' @@ -23,7 +22,7 @@ Index: meson-0.59.0/run_tests.py def get_backend_args_for_dir(backend: Backend, builddir: str) -> T.List[str]: ''' -@@ -345,12 +337,12 @@ def main(): +@@ -356,12 +348,12 @@ # Can't pass arguments to unit tests, so set the backend to use in the environment env = os.environ.copy() if not options.cross: diff --git a/meson.changes b/meson.changes index 5d89ea6..a51bbf1 100644 --- a/meson.changes +++ b/meson.changes @@ -1,3 +1,59 @@ +------------------------------------------------------------------- +Tue Apr 26 12:49:05 UTC 2022 - Ferdinand Thiessen + +- Added 0001-gnome-Use-doc-install_tag-for-gnome.yelp.patch + * Upstream reported feature to add files created by `gnome.yelp` + to the `doc` install_tag, similar to `gnome.gtk_doc` this + allows installing created files using the `meson --tags doc` + syntax. Simplifies packaging of various packages, esp. gtk-doc. +- Rebased meson-distutils.patch to also install required data files + (mesonbuild/dependencies/data/*.txt). +- Drop conditionals for outdated openSUSE versions (older than Leap 15.x) + +------------------------------------------------------------------- +Mon Apr 25 18:48:43 UTC 2022 - Ferdinand Thiessen + +- Update to 0.62.1 + * Bash completion scripts sourced in meson devenv + If bash-completion scripts are being installed and the shell is bash, + they will be automatically sourced. + * Setup GDB auto-load for meson devenv + When GDB helper scripts are installed with a library name that + matches one being built, Meson adds the needed auto-load commands + into /.gdbinit file. + * Print modified environment variables with meson devenv --dump + * New custom dependency for libdl, will now check for the + functionality of libdl.so + * pkgconfig.generate will now include variables for builtin + directories when referenced + * New keyword argument verbose for tests and benchmarks + * CMake support for versions <3.17.0 is deprecated + * Removal of the RPM module + * CMake server API support is removed + * The return value of find_program() can now check the exact + version of the found program + * XML files can now be translated easier by using itstool + via i18n.itstool_join(). + * JNI system dependency now supports a modules keyword (jvm, awt) + * New unstable wayland module + * Meson has a new command env2mfile to convert + "environment variable based" cross and native compilation + environments to Meson machine files. + * This system will detect if the _FOR_BUILD environment + variables are enabled and then uses them as needed. + * Added optional '--allow-dirty' flag for the 'dist' command + * Meson now supports the TI MSP430 and ARM toolchains. + * Deprecated java.generate_native_header() in favor of the + new java.generate_native_headers() + * New option to choose python installation environment + * JDK System Dependency Renamed from jdk to jni + * New custom dependency for OpenSSL + * The default install path for dataonly pkgconfig files has + changed from ${libdir}/pkgconfig to ${datadir}/pkgconfig. + * JAR default install dir changed from libdir to datadir/java. +- Rebased meson-test-installed-bin.patch +- Drop upstream fixed 34daa53a.patch + ------------------------------------------------------------------- Mon Apr 25 07:08:30 UTC 2022 - Dominique Leuenberger diff --git a/meson.spec b/meson.spec index 165e094..8ba1735 100644 --- a/meson.spec +++ b/meson.spec @@ -24,11 +24,12 @@ %define name_ext %{nil} %bcond_with test %endif + +%bcond_with setuptools %define _name mesonbuild %{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim} -%bcond_with setuptools Name: meson%{name_ext} -Version: 0.61.4 +Version: 0.62.1 Release: 0 Summary: Python-based build system License: Apache-2.0 @@ -37,25 +38,23 @@ URL: https://mesonbuild.com/ Source: https://github.com/%{_name}/meson/releases/download/%{version}/meson-%{version}.tar.gz Source1: https://github.com/%{_name}/meson/releases/download/%{version}/meson-%{version}.tar.gz.asc Source2: meson.keyring -# PATCH-FIX-UPSTREAM 34daa53a.patch dimstar@opensuse.org -- gnome module: properly fallback to gtk-update-icon-cache -Patch0: https://github.com/mesonbuild/meson/commit/34daa53a.patch # PATCH-FIX-OPENSUSE meson-test-installed-bin.patch dimstar@opensuse.org -- We want the test suite to run against /usr/bin/meson coming from our meson package. -Patch1: meson-test-installed-bin.patch -# PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal@suse.com -- build and install using distutils instead of full setuptools +Patch0: meson-test-installed-bin.patch +# PATCH-FEATURE-UPSTREAM 0001-gnome-Use-doc-install_tag-for-gnome.yelp.patch -- https://github.com/mesonbuild/meson/pull/10304 +Patch1: 0001-gnome-Use-doc-install_tag-for-gnome.yelp.patch +# PATCH-FIX-OPENSUSE meson-distutils.patch -- meson is ring0 and therefor setuptools is not available Patch2: meson-distutils.patch BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python3-base -%if "%{flavor}" != "test" -BuildArch: noarch -%endif +BuildRequires: python3-base >= 3.7 %if %{with setuptools} BuildRequires: python3-setuptools Requires: python3-setuptools %endif -%if !%{with test} -Requires: ninja >= 1.7 -Requires: python3-base +%if "%{flavor}" != "test" +BuildArch: noarch +Requires: ninja >= 1.8.2 +Requires: python3-base >= 3.7 # meson-gui was last used in openSUSE Leap 42.1. Provides: meson-gui = %{version} Obsoletes: meson-gui < %{version} @@ -75,6 +74,12 @@ BuildRequires: gmock BuildRequires: gnustep-make BuildRequires: googletest-devel BuildRequires: itstool +BuildRequires: java-headless +BuildRequires: libboost_log-devel +BuildRequires: libboost_python3-devel +BuildRequires: libboost_system-devel +BuildRequires: libboost_test-devel +BuildRequires: libboost_thread-devel BuildRequires: libjpeg-devel BuildRequires: libpcap-devel BuildRequires: libqt5-qtbase-common-devel @@ -84,8 +89,11 @@ BuildRequires: llvm-devel BuildRequires: meson = %{version} BuildRequires: ninja BuildRequires: pkgconfig +BuildRequires: python3-devel BuildRequires: python3-gobject BuildRequires: python3-pytest-xdist +BuildRequires: rust +BuildRequires: wxWidgets-any-devel BuildRequires: zlib-devel-static BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5Gui) @@ -96,38 +104,20 @@ BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(gtk-doc) BuildRequires: pkgconfig(ncurses) -BuildRequires: pkgconfig(python3) >= 3.5 BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(vapigen) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(zlib) -%if 0%{?suse_version} <= 1500 -BuildRequires: python2-PyYAML -%endif %if 0%{?suse_version} < 1550 +# Leap / SLE 15.x +BuildRequires: python2-PyYAML +BuildRequires: libboost_python-devel BuildRequires: python2-devel %endif -%if 0%{?suse_version} >= 1500 -BuildRequires: java-headless -BuildRequires: libboost_log-devel -BuildRequires: libboost_python3-devel -BuildRequires: libboost_system-devel -BuildRequires: libboost_test-devel -BuildRequires: libboost_thread-devel -BuildRequires: rust -BuildRequires: wxWidgets-any-devel -%if 0%{?suse_version} < 1550 -BuildRequires: libboost_python-devel -%endif -# csharp is not on s390 machines %ifnarch s390x +# csharp is not on s390 machines BuildRequires: mono(csharp) %endif -%else -BuildRequires: boost-devel -BuildRequires: mono-core -BuildRequires: wxWidgets-devel -%endif %endif # meson makes use of macros that were only defined with rpm 4.15 %if (0%{?suse_version} < 1550 && 0%{?sle_version} < 150400) @@ -210,8 +200,8 @@ install -Dpm 0644 data/syntax-highlighting/vim/syntax/meson.vim \ mkdir -p %{buildroot}%{_bindir} echo """#!%{_bindir}/python3 import sys - from mesonbuild.mesonmain import main + sys.exit(main()) """ > %{buildroot}%{_bindir}/%{name} chmod +x %{buildroot}%{_bindir}/%{name} @@ -219,6 +209,13 @@ chmod +x %{buildroot}%{_bindir}/%{name} # ensure egg-info is a directory rm %{buildroot}%{python3_sitelib}/*.egg-info cp -r meson.egg-info %{buildroot}%{python3_sitelib}/meson-%{version}-py%{python3_version}.egg-info +# Fix missing data files with distutils +while read line; do + if [[ "$line" = %{_name}/* ]]; then + [[ "$line" = *.py ]] && continue + cp "$line" "%{buildroot}%{python3_sitelib}/$line" + fi +done < meson.egg-info/SOURCES.txt %endif %endif