From cd2fa0a1b53710d29e0042af3795619467582c0c Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Mar 05 2021 17:46:54 +0000 Subject: fixup! Update to 0.57.1 Signed-off-by: Igor Raits --- diff --git a/0001-Don-t-access-other-enum-members-from-self.patch b/0001-Don-t-access-other-enum-members-from-self.patch new file mode 100644 index 0000000..6664ced --- /dev/null +++ b/0001-Don-t-access-other-enum-members-from-self.patch @@ -0,0 +1,33 @@ +From 756ea32e068e60ece210561edc2dee523826f472 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Fri, 12 Feb 2021 12:22:20 +0100 +Subject: [PATCH] Don't access other enum members from self + +This is deprecated in Python 3.10. +Instead, acces them from the class. + +Fixes https://github.com/mesonbuild/meson/issues/8318 +--- + mesonbuild/backend/backends.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py +index ecd506789d..743574b110 100644 +--- a/mesonbuild/backend/backends.py ++++ b/mesonbuild/backend/backends.py +@@ -69,11 +69,12 @@ def from_str(cls, string: str) -> 'TestProtocol': + raise MesonException('unknown test format {}'.format(string)) + + def __str__(self) -> str: +- if self is self.EXITCODE: ++ cls = type(self) ++ if self is cls.EXITCODE: + return 'exitcode' +- elif self is self.GTEST: ++ elif self is cls.GTEST: + return 'gtest' +- elif self is self.RUST: ++ elif self is cls.RUST: + return 'rust' + return 'tap' + diff --git a/meson-gcc11.patch b/meson-gcc11.patch deleted file mode 100644 index 11f34c9..0000000 --- a/meson-gcc11.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py -index 1faa128..3c7f378 100644 ---- a/mesonbuild/modules/gnome.py -+++ b/mesonbuild/modules/gnome.py -@@ -1417,7 +1417,7 @@ class GnomeModule(ExtensionModule): - GType - %s@enum_name@_get_type (void) - { -- static volatile gsize gtype_id = 0; -+ static gsize gtype_id = 0; - static const G@Type@Value values[] = {''' % func_prefix - - c_file_kwargs['vprod'] = ' { C_@TYPE@(@VALUENAME@), "@VALUENAME@", "@valuenick@" },' diff --git a/meson-python3.10.patch b/meson-python3.10.patch deleted file mode 100644 index 9cfddc5..0000000 --- a/meson-python3.10.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py -index a322d5f..12fbbe1 100644 ---- a/mesonbuild/backend/backends.py -+++ b/mesonbuild/backend/backends.py -@@ -56,9 +56,10 @@ class TestProtocol(enum.Enum): - raise MesonException('unknown test format {}'.format(string)) - - def __str__(self) -> str: -- if self is self.EXITCODE: -+ cls = type(self) -+ if self is cls.EXITCODE: - return 'exitcode' -- elif self is self.GTEST: -+ elif self is cls.GTEST: - return 'gtest' - return 'tap' - diff --git a/meson.spec b/meson.spec index a8792ca..5a5fc90 100644 --- a/meson.spec +++ b/meson.spec @@ -13,9 +13,7 @@ Summary: High productivity build system License: ASL 2.0 URL: https://mesonbuild.com/ Source: https://github.com/mesonbuild/meson/releases/download/%{version_no_tilde .}/meson-%{version_no_tilde %{quote:}}.tar.gz -Patch0: %{name}-gcc11.patch -# https://github.com/mesonbuild/meson/pull/8332 -Patch1: %{name}-python3.10.patch +Patch0001: https://github.com/mesonbuild/meson/commit/756ea32e068e60ece210561edc2dee523826f472.patch#/0001-Don-t-access-other-enum-members-from-self.patch BuildArch: noarch