Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] meson: backport a regression fix to unbreak various builds
@ 2019-10-16 14:52 voidlinux-github
  2019-10-16 14:54 ` [PR PATCH] [Merged]: " voidlinux-github
  0 siblings, 1 reply; 2+ messages in thread
From: voidlinux-github @ 2019-10-16 14:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages meson
https://github.com/void-linux/void-packages/pull/15532

meson: backport a regression fix to unbreak various builds
Without this wlroots fails to build and possibly others too.

A patch file from https://github.com/void-linux/void-packages/pull/15532.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-meson-15532.patch --]
[-- Type: text/x-diff, Size: 5501 bytes --]

From 35fe3a4cfbb2c84769b3efcab8f49d557ca98717 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Wed, 16 Oct 2019 16:50:54 +0200
Subject: [PATCH] meson: backport a regression fix to unbreak various builds

Without this wlroots fails to build and possibly others too.

[ci skip]
---
 .../meson/patches/fix-if-not-disabler.patch   | 123 ++++++++++++++++++
 srcpkgs/meson/template                        |   2 +-
 2 files changed, 124 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/meson/patches/fix-if-not-disabler.patch

diff --git a/srcpkgs/meson/patches/fix-if-not-disabler.patch b/srcpkgs/meson/patches/fix-if-not-disabler.patch
new file mode 100644
index 00000000000..55d581fc8a6
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-if-not-disabler.patch
@@ -0,0 +1,123 @@
+https://github.com/mesonbuild/meson/issues/6010
+
+This breaks build for wlroots and possibly other things.
+
+From 1930fc82e24a72625cd851903c22d893e4817a3c Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Tue, 8 Oct 2019 11:02:00 -0400
+Subject: [PATCH 1/2] Fix `if not disabler()` case
+
+Closes: #6010
+---
+ mesonbuild/interpreterbase.py              |  2 ++
+ test cases/common/163 disabler/meson.build | 22 ++++++++++++++++++++++
+ 2 files changed, 24 insertions(+)
+
+diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
+index 082515c45a..5c83900292 100644
+--- mesonbuild/interpreterbase.py
++++ mesonbuild/interpreterbase.py
+@@ -500,6 +500,8 @@ def evaluate_dictstatement(self, cur):
+ 
+     def evaluate_notstatement(self, cur):
+         v = self.evaluate_statement(cur.value)
++        if is_disabler(v):
++            return v
+         if not isinstance(v, bool):
+             raise InterpreterException('Argument to "not" is not a boolean.')
+         return not v
+diff --git a/test cases/common/163 disabler/meson.build b/test cases/common/163 disabler/meson.build
+index 5eb24ba11c..8da2a0bd14 100644
+--- test cases/common/163 disabler/meson.build	
++++ test cases/common/163 disabler/meson.build	
+@@ -76,3 +76,25 @@ else
+     has_not_changed = true
+ endif
+ assert(has_not_changed, 'App has changed.')
++
++if_is_disabled = true
++if disabler()
++  if_is_disabled = false
++else
++  if_is_disabled = false
++endif
++assert(if_is_disabled, 'Disabler in "if condition" must skip both blocks')
++
++if not disabler()
++  if_is_disabled = false
++else
++  if_is_disabled = false
++endif
++assert(if_is_disabled, 'Disabler in "if not condition" must skip both blocks')
++
++if disabler() == 1
++  if_is_disabled = false
++else
++  if_is_disabled = false
++endif
++assert(if_is_disabled, 'Disabler in "if a==b" must skip both blocks')
+
+From 9855b2d3c58800f485355229102212eaebf6645a Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Tue, 8 Oct 2019 12:09:01 -0400
+Subject: [PATCH 2/2] Test disabler in foreach loops
+
+The is_disabler() check in evaluate_foreach() was useless because we
+already checked that items is a list.
+---
+ mesonbuild/interpreterbase.py              |  4 ----
+ test cases/common/163 disabler/meson.build | 22 ++++++++++++++++++++++
+ 2 files changed, 22 insertions(+), 4 deletions(-)
+
+diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
+index 5c83900292..562ba273c4 100644
+--- mesonbuild/interpreterbase.py
++++ mesonbuild/interpreterbase.py
+@@ -682,8 +682,6 @@ def evaluate_foreach(self, node):
+             if len(node.varnames) != 1:
+                 raise InvalidArguments('Foreach on array does not unpack')
+             varname = node.varnames[0].value
+-            if is_disabler(items):
+-                return items
+             for item in items:
+                 self.set_variable(varname, item)
+                 try:
+@@ -695,8 +693,6 @@ def evaluate_foreach(self, node):
+         elif isinstance(items, dict):
+             if len(node.varnames) != 2:
+                 raise InvalidArguments('Foreach on dict unpacks key and value')
+-            if is_disabler(items):
+-                return items
+             for key, value in items.items():
+                 self.set_variable(node.varnames[0].value, key)
+                 self.set_variable(node.varnames[1].value, value)
+diff --git a/test cases/common/163 disabler/meson.build b/test cases/common/163 disabler/meson.build
+index 8da2a0bd14..1f0580cb52 100644
+--- test cases/common/163 disabler/meson.build	
++++ test cases/common/163 disabler/meson.build	
+@@ -98,3 +98,25 @@ else
+   if_is_disabled = false
+ endif
+ assert(if_is_disabled, 'Disabler in "if a==b" must skip both blocks')
++
++loops = 0
++disablers = 0
++foreach i : [true, disabler(), true]
++  loops += 1
++  if is_disabler(i)
++    disablers += 1
++  endif
++endforeach
++assert(loops == 3, 'Disabler in foreach array')
++assert(disablers == 1, 'Disabler in foreach array')
++
++loops = 0
++disablers = 0
++foreach k, i : {'a': true, 'b': disabler(), 'c': true}
++  loops += 1
++  if is_disabler(i)
++    disablers += 1
++  endif
++endforeach
++assert(loops == 3, 'Disabler in foreach dict')
++assert(disablers == 1, 'Disabler in foreach dict')
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 19b8fe2e063..2ca35815208 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,7 +1,7 @@
 # Template file for 'meson'
 pkgname=meson
 version=0.52.0
-revision=1
+revision=2
 archs=noarch
 build_style=python3-module
 pycompile_module="mesonbuild"

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

* Re: [PR PATCH] [Merged]: meson: backport a regression fix to unbreak various builds
  2019-10-16 14:52 [PR PATCH] meson: backport a regression fix to unbreak various builds voidlinux-github
@ 2019-10-16 14:54 ` voidlinux-github
  0 siblings, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2019-10-16 14:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

There's a merged pull request on the void-packages repository

meson: backport a regression fix to unbreak various builds
https://github.com/void-linux/void-packages/pull/15532

Description:
Without this wlroots fails to build and possibly others too.

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

end of thread, other threads:[~2019-10-16 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 14:52 [PR PATCH] meson: backport a regression fix to unbreak various builds voidlinux-github
2019-10-16 14:54 ` [PR PATCH] [Merged]: " voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).