Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] meson: update to 0.56.2.
@ 2021-01-29  7:14 ericonr
  2021-01-29  7:21 ` [PR PATCH] [Updated] " ericonr
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: ericonr @ 2021-01-29  7:14 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 5cc5e33e048f9dd200dc76df4c7022a86cd0b2e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH] meson: update to 0.56.2.

---
 srcpkgs/meson/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..48e8b7d6c32 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,7 +1,7 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
@@ -12,9 +12,9 @@ short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
@ 2021-01-29  7:21 ` ericonr
  2021-01-29  7:34 ` ericonr
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-01-29  7:21 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From be77d2a1b3de73cf4aba18ea6ec83ce10b0644c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH] meson: update to 0.56.2.

Fix checkdepends on musl.
---
 srcpkgs/meson/template | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..77c0ab9e790 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,25 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests

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

* Re: meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
  2021-01-29  7:21 ` [PR PATCH] [Updated] " ericonr
@ 2021-01-29  7:34 ` ericonr
  2021-01-29  9:52 ` unspecd
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-01-29  7:34 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/28300#issuecomment-769634227

Comment:
Ok, tests fail on musl due to lack of libsanitizer. Not sure how to fix.

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

* Re: meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
  2021-01-29  7:21 ` [PR PATCH] [Updated] " ericonr
  2021-01-29  7:34 ` ericonr
@ 2021-01-29  9:52 ` unspecd
  2021-02-01  3:37 ` [PR PATCH] [Updated] " ericonr
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unspecd @ 2021-01-29  9:52 UTC (permalink / raw)
  To: ml

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

New comment by unspecd on void-packages repository

https://github.com/void-linux/void-packages/pull/28300#issuecomment-769701896

Comment:
Meson also includes shell completions for bash:
```diff
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
```

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (2 preceding siblings ...)
  2021-01-29  9:52 ` unspecd
@ 2021-02-01  3:37 ` ericonr
  2021-02-01  3:42 ` ericonr
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-01  3:37 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From fc3c226e50ec9ef02e0157188ce77cf90ec7c2cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.
---
 srcpkgs/meson/patches/fix-unittest.py | 77 +++++++++++++++++++++++++++
 srcpkgs/meson/template                | 25 ++++++---
 2 files changed, 96 insertions(+), 6 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.py

diff --git a/srcpkgs/meson/patches/fix-unittest.py b/srcpkgs/meson/patches/fix-unittest.py
new file mode 100644
index 00000000000..d222b970ddd
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.py
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/37 has function/meson.build	
++++ test cases/common/37 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..84114e0041a 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (3 preceding siblings ...)
  2021-02-01  3:37 ` [PR PATCH] [Updated] " ericonr
@ 2021-02-01  3:42 ` ericonr
  2021-02-01  4:25 ` ericonr
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-01  3:42 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 172a503212b4025bf65f33897942a17045c1b039 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.py | 77 +++++++++++++++++++++++++++
 srcpkgs/meson/template                | 29 +++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.py

diff --git a/srcpkgs/meson/patches/fix-unittest.py b/srcpkgs/meson/patches/fix-unittest.py
new file mode 100644
index 00000000000..d222b970ddd
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.py
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/37 has function/meson.build	
++++ test cases/common/37 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (4 preceding siblings ...)
  2021-02-01  3:42 ` ericonr
@ 2021-02-01  4:25 ` ericonr
  2021-02-01  4:51 ` ericonr
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-01  4:25 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 819423f212ebf325df84f6af5e29f821d8a9e777 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..d222b970ddd
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/37 has function/meson.build	
++++ test cases/common/37 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (5 preceding siblings ...)
  2021-02-01  4:25 ` ericonr
@ 2021-02-01  4:51 ` ericonr
  2021-02-02 19:26 ` ericonr
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-01  4:51 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From b022b4d3966f4955827c4d273f46f86e5e33f85c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (6 preceding siblings ...)
  2021-02-01  4:51 ` ericonr
@ 2021-02-02 19:26 ` ericonr
  2021-02-02 20:07 ` ericonr
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-02 19:26 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (7 preceding siblings ...)
  2021-02-02 19:26 ` ericonr
@ 2021-02-02 20:07 ` ericonr
  2021-02-02 20:20 ` ericonr
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-02 20:07 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/2] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 24f61b7152e246d64474d80f79f8fec2b423ecf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 2/2] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (8 preceding siblings ...)
  2021-02-02 20:07 ` ericonr
@ 2021-02-02 20:20 ` ericonr
  2021-02-02 21:05 ` ericonr
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-02 20:20 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/3] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 24f61b7152e246d64474d80f79f8fec2b423ecf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 2/3] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From 7247358da6376050230172c07faa65cad6ef491c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 3/3] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (9 preceding siblings ...)
  2021-02-02 20:20 ` ericonr
@ 2021-02-02 21:05 ` ericonr
  2021-02-02 21:15 ` ericonr
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-02 21:05 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/5] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 24f61b7152e246d64474d80f79f8fec2b423ecf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 2/5] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From 7247358da6376050230172c07faa65cad6ef491c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 3/5] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From 4e0db55a2e745f61fad185efb43968b9973974bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 4/5] pixman: nocross on glibc due to libdl shenanigans.

FIXME
---
 srcpkgs/pixman/template | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..84e95abd478 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -23,6 +23,11 @@ if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
 fi
 
+# FIXME: has to be fixed for next update!!!
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	nocross="meson 0.56.2 isn't adding -ldl to linking command"
+fi
+
 post_install() {
 	vlicense COPYING LICENSE
 }

From be3645307860ca084008c8b55fb34b54f154b618 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 5/5] wlroots: fix build for meson 0.56.x.

New warnings were added.
---
 srcpkgs/wlroots/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..124b4c9c22b 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -5,7 +5,7 @@ revision=1
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (10 preceding siblings ...)
  2021-02-02 21:05 ` ericonr
@ 2021-02-02 21:15 ` ericonr
  2021-02-02 22:44 ` ericonr
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-02 21:15 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/5] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 24f61b7152e246d64474d80f79f8fec2b423ecf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 2/5] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From 7247358da6376050230172c07faa65cad6ef491c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 3/5] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From 095bb05820bf0222ae9ac0cbe2d2e3e3f90f0685 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 4/5] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c17be9b303f 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,11 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From ba1c8da7db9a5e535062a1a3d26d3fdf36757e47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 5/5] pixman: nocross on glibc due to libdl shenanigans.

FIXME
---
 srcpkgs/pixman/template | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..84e95abd478 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -23,6 +23,11 @@ if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
 fi
 
+# FIXME: has to be fixed for next update!!!
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	nocross="meson 0.56.2 isn't adding -ldl to linking command"
+fi
+
 post_install() {
 	vlicense COPYING LICENSE
 }

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (11 preceding siblings ...)
  2021-02-02 21:15 ` ericonr
@ 2021-02-02 22:44 ` ericonr
  2021-02-02 22:59 ` ericonr
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-02 22:44 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/7] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 24f61b7152e246d64474d80f79f8fec2b423ecf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 2/7] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From 7247358da6376050230172c07faa65cad6ef491c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 3/7] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From 095bb05820bf0222ae9ac0cbe2d2e3e3f90f0685 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 4/7] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c17be9b303f 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,11 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From ba1c8da7db9a5e535062a1a3d26d3fdf36757e47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 5/7] pixman: nocross on glibc due to libdl shenanigans.

FIXME
---
 srcpkgs/pixman/template | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..84e95abd478 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -23,6 +23,11 @@ if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
 fi
 
+# FIXME: has to be fixed for next update!!!
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	nocross="meson 0.56.2 isn't adding -ldl to linking command"
+fi
+
 post_install() {
 	vlicense COPYING LICENSE
 }

From 129bff1ef9f537df8af031d18d2b348ff3f9e886 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:30:18 -0300
Subject: [PATCH 6/7] efl: don't build examples.

Avoids wasting build time.
---
 srcpkgs/efl/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/efl/template b/srcpkgs/efl/template
index a8b26fff25c..345bd22ccde 100644
--- a/srcpkgs/efl/template
+++ b/srcpkgs/efl/template
@@ -4,6 +4,7 @@ version=1.24.4
 revision=1
 build_style=meson
 configure_args="
+ -Dbuild-examples=false
  -Dembedded-lz4=false
  -Dcrypto=openssl
  -Dnetwork-backend=none

From 2da1f9444779e0872d650a7d1588568b0ce1a8b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:42:48 -0300
Subject: [PATCH 7/7] mako: fix build with meson 0.56.x.

---
 srcpkgs/mako/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mako/template b/srcpkgs/mako/template
index 299305acd78..18c18def196 100644
--- a/srcpkgs/mako/template
+++ b/srcpkgs/mako/template
@@ -3,7 +3,7 @@ pkgname=mako
 version=1.4.1
 revision=1
 build_style=meson
-configure_args="-Dzsh-completions=true -Dapparmor=true"
+configure_args="-Dzsh-completions=true -Dapparmor=true -Dwerror=false"
 hostmakedepends="pkg-config scdoc wayland-devel wayland-protocols"
 makedepends="wayland-devel wayland-protocols pango-devel cairo-devel
  elogind-devel gdk-pixbuf-devel"

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (12 preceding siblings ...)
  2021-02-02 22:44 ` ericonr
@ 2021-02-02 22:59 ` ericonr
  2021-02-03  0:00 ` ericonr
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-02 22:59 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/8] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 24f61b7152e246d64474d80f79f8fec2b423ecf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 2/8] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From 7247358da6376050230172c07faa65cad6ef491c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 3/8] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From 095bb05820bf0222ae9ac0cbe2d2e3e3f90f0685 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 4/8] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c17be9b303f 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,11 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From ba1c8da7db9a5e535062a1a3d26d3fdf36757e47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 5/8] pixman: nocross on glibc due to libdl shenanigans.

FIXME
---
 srcpkgs/pixman/template | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..84e95abd478 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -23,6 +23,11 @@ if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
 fi
 
+# FIXME: has to be fixed for next update!!!
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	nocross="meson 0.56.2 isn't adding -ldl to linking command"
+fi
+
 post_install() {
 	vlicense COPYING LICENSE
 }

From 129bff1ef9f537df8af031d18d2b348ff3f9e886 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:30:18 -0300
Subject: [PATCH 6/8] efl: don't build examples.

Avoids wasting build time.
---
 srcpkgs/efl/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/efl/template b/srcpkgs/efl/template
index a8b26fff25c..345bd22ccde 100644
--- a/srcpkgs/efl/template
+++ b/srcpkgs/efl/template
@@ -4,6 +4,7 @@ version=1.24.4
 revision=1
 build_style=meson
 configure_args="
+ -Dbuild-examples=false
  -Dembedded-lz4=false
  -Dcrypto=openssl
  -Dnetwork-backend=none

From 2da1f9444779e0872d650a7d1588568b0ce1a8b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:42:48 -0300
Subject: [PATCH 7/8] mako: fix build with meson 0.56.x.

---
 srcpkgs/mako/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mako/template b/srcpkgs/mako/template
index 299305acd78..18c18def196 100644
--- a/srcpkgs/mako/template
+++ b/srcpkgs/mako/template
@@ -3,7 +3,7 @@ pkgname=mako
 version=1.4.1
 revision=1
 build_style=meson
-configure_args="-Dzsh-completions=true -Dapparmor=true"
+configure_args="-Dzsh-completions=true -Dapparmor=true -Dwerror=false"
 hostmakedepends="pkg-config scdoc wayland-devel wayland-protocols"
 makedepends="wayland-devel wayland-protocols pango-devel cairo-devel
  elogind-devel gdk-pixbuf-devel"

From a89783c74c1517f06c50908eda446e17df5edcca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:59:11 -0300
Subject: [PATCH 8/8] grim: fix build for meson 0.56.x.

---
 srcpkgs/grim/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grim/template b/srcpkgs/grim/template
index 896434db405..61844769456 100644
--- a/srcpkgs/grim/template
+++ b/srcpkgs/grim/template
@@ -3,7 +3,7 @@ pkgname=grim
 version=1.3.1
 revision=1
 build_style=meson
-configure_args="-Djpeg=enabled"
+configure_args="-Djpeg=enabled -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols cairo-devel libjpeg-turbo-devel"
 short_desc="Grab images from a Wayland compositor"

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (13 preceding siblings ...)
  2021-02-02 22:59 ` ericonr
@ 2021-02-03  0:00 ` ericonr
  2021-02-03  0:32 ` ericonr
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-03  0:00 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/9] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 582e1b30f30796ee3d292361eba767330e0653fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 2/9] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From e383b2ebc18282a2e59f574d409d9d2209fe86f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 3/9] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c17be9b303f 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,11 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From 80078d72c6895e9c43c8824bccc867877974e668 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:30:18 -0300
Subject: [PATCH 4/9] efl: don't build examples.

Avoids wasting build time.

Also gate tests, since they aren't working great yet.
---
 srcpkgs/efl/template | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/srcpkgs/efl/template b/srcpkgs/efl/template
index a8b26fff25c..513cb4dfff4 100644
--- a/srcpkgs/efl/template
+++ b/srcpkgs/efl/template
@@ -4,6 +4,7 @@ version=1.24.4
 revision=1
 build_style=meson
 configure_args="
+ -Dbuild-examples=false
  -Dembedded-lz4=false
  -Dcrypto=openssl
  -Dnetwork-backend=none
@@ -46,6 +47,7 @@ makedepends="
  $(vopt_if pulseaudio pulseaudio-devel)
  $(vopt_if lottie rlottie-devel)
  $(vopt_if ibus ibus-devel)"
+checkdepends="dbus xvfb-run"
 short_desc="Enlightenment Foundation Libraries"
 maintainer="q66 <daniel@octaforge.org>"
 license="LGPL-2.1-only"
@@ -104,6 +106,13 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+do_check() {
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# FIXME: tests fail in weird places
+		xvfb-run dbus-run-session ninja -C build test
+	fi
+}
+
 post_install() {
 	# don't want service file junk
 	rm -rf ${DESTDIR}/usr/lib/systemd

From 9b3cc3bc2c679f14fcf7f3f10820fb0f7e54901d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 5/9] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From ec7e382a233ca9fb3003158371c3be2d09508b4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:42:48 -0300
Subject: [PATCH 6/9] mako: fix build with meson 0.56.x.

---
 srcpkgs/mako/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mako/template b/srcpkgs/mako/template
index 299305acd78..18c18def196 100644
--- a/srcpkgs/mako/template
+++ b/srcpkgs/mako/template
@@ -3,7 +3,7 @@ pkgname=mako
 version=1.4.1
 revision=1
 build_style=meson
-configure_args="-Dzsh-completions=true -Dapparmor=true"
+configure_args="-Dzsh-completions=true -Dapparmor=true -Dwerror=false"
 hostmakedepends="pkg-config scdoc wayland-devel wayland-protocols"
 makedepends="wayland-devel wayland-protocols pango-devel cairo-devel
  elogind-devel gdk-pixbuf-devel"

From e105835242fe028e0871e8d339a06d06a35a3cc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:59:11 -0300
Subject: [PATCH 7/9] grim: fix build for meson 0.56.x.

---
 srcpkgs/grim/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grim/template b/srcpkgs/grim/template
index 896434db405..61844769456 100644
--- a/srcpkgs/grim/template
+++ b/srcpkgs/grim/template
@@ -3,7 +3,7 @@ pkgname=grim
 version=1.3.1
 revision=1
 build_style=meson
-configure_args="-Djpeg=enabled"
+configure_args="-Djpeg=enabled -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols cairo-devel libjpeg-turbo-devel"
 short_desc="Grab images from a Wayland compositor"

From db76cea01cf7caf6cbea813febd2ca2b88ec0b49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 20:40:19 -0300
Subject: [PATCH 8/9] swayidle: fix build with meson 0.56.x.

---
 srcpkgs/swayidle/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/swayidle/template b/srcpkgs/swayidle/template
index b6f51f47927..e415051946a 100644
--- a/srcpkgs/swayidle/template
+++ b/srcpkgs/swayidle/template
@@ -3,7 +3,7 @@ pkgname=swayidle
 version=1.6
 revision=1
 build_style=meson
-configure_args="-Dlogind-provider=elogind"
+configure_args="-Dlogind-provider=elogind -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols elogind-devel"
 short_desc="Idle management daemon for Wayland"

From 689bc306cb4195cf449264d2691462ba8783a15c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 9/9] pixman: nocross on glibc due to libdl shenanigans.

FIXME: wasn't an issue with meson 0.55.3.
---
 srcpkgs/pixman/template | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..84e95abd478 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -23,6 +23,11 @@ if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
 fi
 
+# FIXME: has to be fixed for next update!!!
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	nocross="meson 0.56.2 isn't adding -ldl to linking command"
+fi
+
 post_install() {
 	vlicense COPYING LICENSE
 }

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (14 preceding siblings ...)
  2021-02-03  0:00 ` ericonr
@ 2021-02-03  0:32 ` ericonr
  2021-02-03  0:49 ` ericonr
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-03  0:32 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/9] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 582e1b30f30796ee3d292361eba767330e0653fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 2/9] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From e383b2ebc18282a2e59f574d409d9d2209fe86f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 3/9] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c17be9b303f 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,11 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From 80078d72c6895e9c43c8824bccc867877974e668 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:30:18 -0300
Subject: [PATCH 4/9] efl: don't build examples.

Avoids wasting build time.

Also gate tests, since they aren't working great yet.
---
 srcpkgs/efl/template | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/srcpkgs/efl/template b/srcpkgs/efl/template
index a8b26fff25c..513cb4dfff4 100644
--- a/srcpkgs/efl/template
+++ b/srcpkgs/efl/template
@@ -4,6 +4,7 @@ version=1.24.4
 revision=1
 build_style=meson
 configure_args="
+ -Dbuild-examples=false
  -Dembedded-lz4=false
  -Dcrypto=openssl
  -Dnetwork-backend=none
@@ -46,6 +47,7 @@ makedepends="
  $(vopt_if pulseaudio pulseaudio-devel)
  $(vopt_if lottie rlottie-devel)
  $(vopt_if ibus ibus-devel)"
+checkdepends="dbus xvfb-run"
 short_desc="Enlightenment Foundation Libraries"
 maintainer="q66 <daniel@octaforge.org>"
 license="LGPL-2.1-only"
@@ -104,6 +106,13 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+do_check() {
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# FIXME: tests fail in weird places
+		xvfb-run dbus-run-session ninja -C build test
+	fi
+}
+
 post_install() {
 	# don't want service file junk
 	rm -rf ${DESTDIR}/usr/lib/systemd

From 9b3cc3bc2c679f14fcf7f3f10820fb0f7e54901d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 5/9] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From ec7e382a233ca9fb3003158371c3be2d09508b4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:42:48 -0300
Subject: [PATCH 6/9] mako: fix build with meson 0.56.x.

---
 srcpkgs/mako/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mako/template b/srcpkgs/mako/template
index 299305acd78..18c18def196 100644
--- a/srcpkgs/mako/template
+++ b/srcpkgs/mako/template
@@ -3,7 +3,7 @@ pkgname=mako
 version=1.4.1
 revision=1
 build_style=meson
-configure_args="-Dzsh-completions=true -Dapparmor=true"
+configure_args="-Dzsh-completions=true -Dapparmor=true -Dwerror=false"
 hostmakedepends="pkg-config scdoc wayland-devel wayland-protocols"
 makedepends="wayland-devel wayland-protocols pango-devel cairo-devel
  elogind-devel gdk-pixbuf-devel"

From e105835242fe028e0871e8d339a06d06a35a3cc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:59:11 -0300
Subject: [PATCH 7/9] grim: fix build for meson 0.56.x.

---
 srcpkgs/grim/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grim/template b/srcpkgs/grim/template
index 896434db405..61844769456 100644
--- a/srcpkgs/grim/template
+++ b/srcpkgs/grim/template
@@ -3,7 +3,7 @@ pkgname=grim
 version=1.3.1
 revision=1
 build_style=meson
-configure_args="-Djpeg=enabled"
+configure_args="-Djpeg=enabled -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols cairo-devel libjpeg-turbo-devel"
 short_desc="Grab images from a Wayland compositor"

From db76cea01cf7caf6cbea813febd2ca2b88ec0b49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 20:40:19 -0300
Subject: [PATCH 8/9] swayidle: fix build with meson 0.56.x.

---
 srcpkgs/swayidle/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/swayidle/template b/srcpkgs/swayidle/template
index b6f51f47927..e415051946a 100644
--- a/srcpkgs/swayidle/template
+++ b/srcpkgs/swayidle/template
@@ -3,7 +3,7 @@ pkgname=swayidle
 version=1.6
 revision=1
 build_style=meson
-configure_args="-Dlogind-provider=elogind"
+configure_args="-Dlogind-provider=elogind -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols elogind-devel"
 short_desc="Idle management daemon for Wayland"

From 6cc3a9eee4443fb4f3509d5c92a7e726e0c65514 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 9/9] pixman: fix build with meson 0.56.x.

Apparently meson detects OpenMP as available on cross builds because it
can find the omp.h header, even though the library seems to be
available.

For reference, what the configure output of a native build looks like:

WARNING: OpenMP found but omp.h missing.
Run-time dependency OpenMP found: NO
---
 srcpkgs/pixman/template | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..7c8823907a0 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -20,7 +20,14 @@ LDFLAGS="-Wl,-z,stack-size=2097152"
 if [ "$XBPS_CHECK_PKGS" ]; then
 	# libpng and openmp are used only for testing; the make-blue-noise.c file isn't built
 	# https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c
-	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+	configure_args+=" -Dtests=enabled -Dlibpng=enabled -Dopenmp=enabled"
+else
+	# dynamic libgomp is available only when running tests.
+	# unfortunately, at least meson 0.56.2+ detects openmp as available anyway,
+	# due to a static library and header provided somewhere inside GCC.
+	# this makes linking the tests fail (with weird errors about not finding dlopen and dlerr)
+	# on glibc targets - -Dtests will only take effect on the next release.
+	configure_args+=" -Dtests=disabled -Dopenmp=disabled"
 fi
 
 post_install() {

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (15 preceding siblings ...)
  2021-02-03  0:32 ` ericonr
@ 2021-02-03  0:49 ` ericonr
  2021-02-03  0:55 ` ericonr
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-03  0:49 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 1/9] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 582e1b30f30796ee3d292361eba767330e0653fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 2/9] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From e383b2ebc18282a2e59f574d409d9d2209fe86f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 3/9] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c17be9b303f 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,11 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From 80078d72c6895e9c43c8824bccc867877974e668 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:30:18 -0300
Subject: [PATCH 4/9] efl: don't build examples.

Avoids wasting build time.

Also gate tests, since they aren't working great yet.
---
 srcpkgs/efl/template | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/srcpkgs/efl/template b/srcpkgs/efl/template
index a8b26fff25c..513cb4dfff4 100644
--- a/srcpkgs/efl/template
+++ b/srcpkgs/efl/template
@@ -4,6 +4,7 @@ version=1.24.4
 revision=1
 build_style=meson
 configure_args="
+ -Dbuild-examples=false
  -Dembedded-lz4=false
  -Dcrypto=openssl
  -Dnetwork-backend=none
@@ -46,6 +47,7 @@ makedepends="
  $(vopt_if pulseaudio pulseaudio-devel)
  $(vopt_if lottie rlottie-devel)
  $(vopt_if ibus ibus-devel)"
+checkdepends="dbus xvfb-run"
 short_desc="Enlightenment Foundation Libraries"
 maintainer="q66 <daniel@octaforge.org>"
 license="LGPL-2.1-only"
@@ -104,6 +106,13 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+do_check() {
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# FIXME: tests fail in weird places
+		xvfb-run dbus-run-session ninja -C build test
+	fi
+}
+
 post_install() {
 	# don't want service file junk
 	rm -rf ${DESTDIR}/usr/lib/systemd

From 9b3cc3bc2c679f14fcf7f3f10820fb0f7e54901d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 5/9] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From ec7e382a233ca9fb3003158371c3be2d09508b4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:42:48 -0300
Subject: [PATCH 6/9] mako: fix build with meson 0.56.x.

---
 srcpkgs/mako/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mako/template b/srcpkgs/mako/template
index 299305acd78..18c18def196 100644
--- a/srcpkgs/mako/template
+++ b/srcpkgs/mako/template
@@ -3,7 +3,7 @@ pkgname=mako
 version=1.4.1
 revision=1
 build_style=meson
-configure_args="-Dzsh-completions=true -Dapparmor=true"
+configure_args="-Dzsh-completions=true -Dapparmor=true -Dwerror=false"
 hostmakedepends="pkg-config scdoc wayland-devel wayland-protocols"
 makedepends="wayland-devel wayland-protocols pango-devel cairo-devel
  elogind-devel gdk-pixbuf-devel"

From e105835242fe028e0871e8d339a06d06a35a3cc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:59:11 -0300
Subject: [PATCH 7/9] grim: fix build for meson 0.56.x.

---
 srcpkgs/grim/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grim/template b/srcpkgs/grim/template
index 896434db405..61844769456 100644
--- a/srcpkgs/grim/template
+++ b/srcpkgs/grim/template
@@ -3,7 +3,7 @@ pkgname=grim
 version=1.3.1
 revision=1
 build_style=meson
-configure_args="-Djpeg=enabled"
+configure_args="-Djpeg=enabled -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols cairo-devel libjpeg-turbo-devel"
 short_desc="Grab images from a Wayland compositor"

From db76cea01cf7caf6cbea813febd2ca2b88ec0b49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 20:40:19 -0300
Subject: [PATCH 8/9] swayidle: fix build with meson 0.56.x.

---
 srcpkgs/swayidle/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/swayidle/template b/srcpkgs/swayidle/template
index b6f51f47927..e415051946a 100644
--- a/srcpkgs/swayidle/template
+++ b/srcpkgs/swayidle/template
@@ -3,7 +3,7 @@ pkgname=swayidle
 version=1.6
 revision=1
 build_style=meson
-configure_args="-Dlogind-provider=elogind"
+configure_args="-Dlogind-provider=elogind -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols elogind-devel"
 short_desc="Idle management daemon for Wayland"

From 0e299c43d4b83a7e0e9fd23287c13667711fd0ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 9/9] pixman: fix potential build errors with meson 0.56.x.

I couldn't reproduce the errors, so this commit is not entirely
necessary. It still works as a precaution.

The below is slightly erroneous, since the issue didn't repeat itself.

Apparently meson detects OpenMP as available on cross builds because it
can find the omp.h header, even though the library seems to be
available.

For reference, what the configure output of a native build looks like:

WARNING: OpenMP found but omp.h missing.
Run-time dependency OpenMP found: NO
---
 srcpkgs/pixman/template | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..26c65462af6 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -20,7 +20,11 @@ LDFLAGS="-Wl,-z,stack-size=2097152"
 if [ "$XBPS_CHECK_PKGS" ]; then
 	# libpng and openmp are used only for testing; the make-blue-noise.c file isn't built
 	# https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c
-	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+	configure_args+=" -Dtests=enabled -Dlibpng=enabled -Dopenmp=enabled"
+else
+	# dynamic libgomp is available only when running tests, better to disable explicitly.
+	# -Dtests will only take effect on the next release.
+	configure_args+=" -Dtests=disabled -Dopenmp=disabled"
 fi
 
 post_install() {

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (16 preceding siblings ...)
  2021-02-03  0:49 ` ericonr
@ 2021-02-03  0:55 ` ericonr
  2021-02-03  4:39 ` ericonr
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-03  0:55 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 01/11] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 582e1b30f30796ee3d292361eba767330e0653fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 02/11] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From e383b2ebc18282a2e59f574d409d9d2209fe86f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 03/11] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c17be9b303f 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,11 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From 80078d72c6895e9c43c8824bccc867877974e668 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:30:18 -0300
Subject: [PATCH 04/11] efl: don't build examples.

Avoids wasting build time.

Also gate tests, since they aren't working great yet.
---
 srcpkgs/efl/template | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/srcpkgs/efl/template b/srcpkgs/efl/template
index a8b26fff25c..513cb4dfff4 100644
--- a/srcpkgs/efl/template
+++ b/srcpkgs/efl/template
@@ -4,6 +4,7 @@ version=1.24.4
 revision=1
 build_style=meson
 configure_args="
+ -Dbuild-examples=false
  -Dembedded-lz4=false
  -Dcrypto=openssl
  -Dnetwork-backend=none
@@ -46,6 +47,7 @@ makedepends="
  $(vopt_if pulseaudio pulseaudio-devel)
  $(vopt_if lottie rlottie-devel)
  $(vopt_if ibus ibus-devel)"
+checkdepends="dbus xvfb-run"
 short_desc="Enlightenment Foundation Libraries"
 maintainer="q66 <daniel@octaforge.org>"
 license="LGPL-2.1-only"
@@ -104,6 +106,13 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+do_check() {
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# FIXME: tests fail in weird places
+		xvfb-run dbus-run-session ninja -C build test
+	fi
+}
+
 post_install() {
 	# don't want service file junk
 	rm -rf ${DESTDIR}/usr/lib/systemd

From 9b3cc3bc2c679f14fcf7f3f10820fb0f7e54901d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 05/11] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From ec7e382a233ca9fb3003158371c3be2d09508b4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:42:48 -0300
Subject: [PATCH 06/11] mako: fix build with meson 0.56.x.

---
 srcpkgs/mako/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mako/template b/srcpkgs/mako/template
index 299305acd78..18c18def196 100644
--- a/srcpkgs/mako/template
+++ b/srcpkgs/mako/template
@@ -3,7 +3,7 @@ pkgname=mako
 version=1.4.1
 revision=1
 build_style=meson
-configure_args="-Dzsh-completions=true -Dapparmor=true"
+configure_args="-Dzsh-completions=true -Dapparmor=true -Dwerror=false"
 hostmakedepends="pkg-config scdoc wayland-devel wayland-protocols"
 makedepends="wayland-devel wayland-protocols pango-devel cairo-devel
  elogind-devel gdk-pixbuf-devel"

From e105835242fe028e0871e8d339a06d06a35a3cc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:59:11 -0300
Subject: [PATCH 07/11] grim: fix build for meson 0.56.x.

---
 srcpkgs/grim/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grim/template b/srcpkgs/grim/template
index 896434db405..61844769456 100644
--- a/srcpkgs/grim/template
+++ b/srcpkgs/grim/template
@@ -3,7 +3,7 @@ pkgname=grim
 version=1.3.1
 revision=1
 build_style=meson
-configure_args="-Djpeg=enabled"
+configure_args="-Djpeg=enabled -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols cairo-devel libjpeg-turbo-devel"
 short_desc="Grab images from a Wayland compositor"

From db76cea01cf7caf6cbea813febd2ca2b88ec0b49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 20:40:19 -0300
Subject: [PATCH 08/11] swayidle: fix build with meson 0.56.x.

---
 srcpkgs/swayidle/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/swayidle/template b/srcpkgs/swayidle/template
index b6f51f47927..e415051946a 100644
--- a/srcpkgs/swayidle/template
+++ b/srcpkgs/swayidle/template
@@ -3,7 +3,7 @@ pkgname=swayidle
 version=1.6
 revision=1
 build_style=meson
-configure_args="-Dlogind-provider=elogind"
+configure_args="-Dlogind-provider=elogind -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols elogind-devel"
 short_desc="Idle management daemon for Wayland"

From 0e299c43d4b83a7e0e9fd23287c13667711fd0ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 09/11] pixman: fix potential build errors with meson 0.56.x.

I couldn't reproduce the errors, so this commit is not entirely
necessary. It still works as a precaution.

The below is slightly erroneous, since the issue didn't repeat itself.

Apparently meson detects OpenMP as available on cross builds because it
can find the omp.h header, even though the library seems to be
available.

For reference, what the configure output of a native build looks like:

WARNING: OpenMP found but omp.h missing.
Run-time dependency OpenMP found: NO
---
 srcpkgs/pixman/template | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..26c65462af6 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -20,7 +20,11 @@ LDFLAGS="-Wl,-z,stack-size=2097152"
 if [ "$XBPS_CHECK_PKGS" ]; then
 	# libpng and openmp are used only for testing; the make-blue-noise.c file isn't built
 	# https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c
-	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+	configure_args+=" -Dtests=enabled -Dlibpng=enabled -Dopenmp=enabled"
+else
+	# dynamic libgomp is available only when running tests, better to disable explicitly.
+	# -Dtests will only take effect on the next release.
+	configure_args+=" -Dtests=disabled -Dopenmp=disabled"
 fi
 
 post_install() {

From 4480138f9187ea036079f2fb3e90c19af58dc25d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 21:51:21 -0300
Subject: [PATCH 10/11] nautilus: mark nocross.

Likely because of the libdir changes. It probably works fine when cross
building on a machine with the same word size as the target, but I'm
leaving as nocross entirely while I investigate.
---
 srcpkgs/nautilus/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/nautilus/template b/srcpkgs/nautilus/template
index f7108f9b062..ae0944791a9 100644
--- a/srcpkgs/nautilus/template
+++ b/srcpkgs/nautilus/template
@@ -18,6 +18,8 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Nautilus"
 distfiles="${GNOME_SITE}/${pkgname}/${version::4}/${pkgname}-${version}.tar.xz"
 checksum=0a3e812b13b774b7fd6f222f55acd1f87fb2973d9af60c04b7d25cb52222d0fd
+# FIXME
+nocross="On a 64-bit builder: Program /usr/lib32/tracker-3.0/trackertestutils/tracker-sandbox found: NO"
 
 build_options="gir"
 build_options_default="gir"

From 3c43224bfd6a87d83dc7ed3f330eb30be8cc6fab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 21:50:26 -0300
Subject: [PATCH 11/11] grilo-plugins: mark nocross.

Likely caused by the libdir changes.

See previous commit for details.
---
 srcpkgs/grilo-plugins/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/grilo-plugins/template b/srcpkgs/grilo-plugins/template
index 2de976a082b..6f25207b62a 100644
--- a/srcpkgs/grilo-plugins/template
+++ b/srcpkgs/grilo-plugins/template
@@ -17,6 +17,8 @@ license="LGPL-2.1-or-later"
 homepage="http://live.gnome.org/Grilo"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
 checksum=c6b6df086a164d65c206d70139ce80591f8feca3545612e45b823fb4fe4b2577
+# FIXME
+nocross="On a 64-bit builder: Program /usr/lib32/tracker-3.0/trackertestutils/tracker-sandbox found: NO"
 
 # feel free to fix
 do_check() {

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (17 preceding siblings ...)
  2021-02-03  0:55 ` ericonr
@ 2021-02-03  4:39 ` ericonr
  2021-02-03  5:23 ` ericonr
  2021-02-03  5:24 ` [PR PATCH] [Merged]: " ericonr
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-03  4:39 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 4c2c719b27107d0d18901b0a6ffd74e6aaf91383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 01/11] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 582e1b30f30796ee3d292361eba767330e0653fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 02/11] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From e383b2ebc18282a2e59f574d409d9d2209fe86f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 03/11] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c17be9b303f 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,11 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From 80078d72c6895e9c43c8824bccc867877974e668 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:30:18 -0300
Subject: [PATCH 04/11] efl: don't build examples.

Avoids wasting build time.

Also gate tests, since they aren't working great yet.
---
 srcpkgs/efl/template | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/srcpkgs/efl/template b/srcpkgs/efl/template
index a8b26fff25c..513cb4dfff4 100644
--- a/srcpkgs/efl/template
+++ b/srcpkgs/efl/template
@@ -4,6 +4,7 @@ version=1.24.4
 revision=1
 build_style=meson
 configure_args="
+ -Dbuild-examples=false
  -Dembedded-lz4=false
  -Dcrypto=openssl
  -Dnetwork-backend=none
@@ -46,6 +47,7 @@ makedepends="
  $(vopt_if pulseaudio pulseaudio-devel)
  $(vopt_if lottie rlottie-devel)
  $(vopt_if ibus ibus-devel)"
+checkdepends="dbus xvfb-run"
 short_desc="Enlightenment Foundation Libraries"
 maintainer="q66 <daniel@octaforge.org>"
 license="LGPL-2.1-only"
@@ -104,6 +106,13 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+do_check() {
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# FIXME: tests fail in weird places
+		xvfb-run dbus-run-session ninja -C build test
+	fi
+}
+
 post_install() {
 	# don't want service file junk
 	rm -rf ${DESTDIR}/usr/lib/systemd

From 9b3cc3bc2c679f14fcf7f3f10820fb0f7e54901d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 05/11] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From ec7e382a233ca9fb3003158371c3be2d09508b4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:42:48 -0300
Subject: [PATCH 06/11] mako: fix build with meson 0.56.x.

---
 srcpkgs/mako/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mako/template b/srcpkgs/mako/template
index 299305acd78..18c18def196 100644
--- a/srcpkgs/mako/template
+++ b/srcpkgs/mako/template
@@ -3,7 +3,7 @@ pkgname=mako
 version=1.4.1
 revision=1
 build_style=meson
-configure_args="-Dzsh-completions=true -Dapparmor=true"
+configure_args="-Dzsh-completions=true -Dapparmor=true -Dwerror=false"
 hostmakedepends="pkg-config scdoc wayland-devel wayland-protocols"
 makedepends="wayland-devel wayland-protocols pango-devel cairo-devel
  elogind-devel gdk-pixbuf-devel"

From e105835242fe028e0871e8d339a06d06a35a3cc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:59:11 -0300
Subject: [PATCH 07/11] grim: fix build for meson 0.56.x.

---
 srcpkgs/grim/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grim/template b/srcpkgs/grim/template
index 896434db405..61844769456 100644
--- a/srcpkgs/grim/template
+++ b/srcpkgs/grim/template
@@ -3,7 +3,7 @@ pkgname=grim
 version=1.3.1
 revision=1
 build_style=meson
-configure_args="-Djpeg=enabled"
+configure_args="-Djpeg=enabled -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols cairo-devel libjpeg-turbo-devel"
 short_desc="Grab images from a Wayland compositor"

From db76cea01cf7caf6cbea813febd2ca2b88ec0b49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 20:40:19 -0300
Subject: [PATCH 08/11] swayidle: fix build with meson 0.56.x.

---
 srcpkgs/swayidle/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/swayidle/template b/srcpkgs/swayidle/template
index b6f51f47927..e415051946a 100644
--- a/srcpkgs/swayidle/template
+++ b/srcpkgs/swayidle/template
@@ -3,7 +3,7 @@ pkgname=swayidle
 version=1.6
 revision=1
 build_style=meson
-configure_args="-Dlogind-provider=elogind"
+configure_args="-Dlogind-provider=elogind -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols elogind-devel"
 short_desc="Idle management daemon for Wayland"

From 0e299c43d4b83a7e0e9fd23287c13667711fd0ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 09/11] pixman: fix potential build errors with meson 0.56.x.

I couldn't reproduce the errors, so this commit is not entirely
necessary. It still works as a precaution.

The below is slightly erroneous, since the issue didn't repeat itself.

Apparently meson detects OpenMP as available on cross builds because it
can find the omp.h header, even though the library seems to be
available.

For reference, what the configure output of a native build looks like:

WARNING: OpenMP found but omp.h missing.
Run-time dependency OpenMP found: NO
---
 srcpkgs/pixman/template | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..26c65462af6 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -20,7 +20,11 @@ LDFLAGS="-Wl,-z,stack-size=2097152"
 if [ "$XBPS_CHECK_PKGS" ]; then
 	# libpng and openmp are used only for testing; the make-blue-noise.c file isn't built
 	# https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c
-	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+	configure_args+=" -Dtests=enabled -Dlibpng=enabled -Dopenmp=enabled"
+else
+	# dynamic libgomp is available only when running tests, better to disable explicitly.
+	# -Dtests will only take effect on the next release.
+	configure_args+=" -Dtests=disabled -Dopenmp=disabled"
 fi
 
 post_install() {

From 3b739ff629a5e3a95d2d0288e29182dd01f3d3cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 21:51:21 -0300
Subject: [PATCH 10/11] nautilus: fix build after libdir changes.

Also gate tests.
---
 srcpkgs/nautilus/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/srcpkgs/nautilus/template b/srcpkgs/nautilus/template
index f7108f9b062..e38755f0806 100644
--- a/srcpkgs/nautilus/template
+++ b/srcpkgs/nautilus/template
@@ -19,9 +19,23 @@ homepage="https://wiki.gnome.org/Nautilus"
 distfiles="${GNOME_SITE}/${pkgname}/${version::4}/${pkgname}-${version}.tar.xz"
 checksum=0a3e812b13b774b7fd6f222f55acd1f87fb2973d9af60c04b7d25cb52222d0fd
 
+if [ "$CROSS_BUILD" ]; then
+	# tests try to use tracker-sandbox from the wrong path, because of some confusion with libdir:
+	# "Program /usr/lib32/tracker-3.0/trackertestutils/tracker-sandbox found: NO"
+	configure_args+=" -Dtests=none"
+fi
+
 build_options="gir"
 build_options_default="gir"
 
+do_check() {
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# tests timeout:
+		# 11/11 test-nautilus-search-engine-tracker            TIMEOUT        480.00s
+		ninja -C builddir test
+	fi
+}
+
 libnautilus_package() {
 	short_desc+=" - shared libraries"
 	pkg_install() {

From b13376d017d44cc701834f89b5da043a17717750 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 21:50:26 -0300
Subject: [PATCH 11/11] grilo-plugins: fix build for libdir changes.

---
 srcpkgs/grilo-plugins/template | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/srcpkgs/grilo-plugins/template b/srcpkgs/grilo-plugins/template
index 2de976a082b..9631b2941a7 100644
--- a/srcpkgs/grilo-plugins/template
+++ b/srcpkgs/grilo-plugins/template
@@ -18,6 +18,14 @@ homepage="http://live.gnome.org/Grilo"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
 checksum=c6b6df086a164d65c206d70139ce80591f8feca3545612e45b823fb4fe4b2577
 
+post_patch() {
+	if [ "$CROSS_BUILD" ]; then
+		# tests try to use tracker-sandbox from the wrong path:
+		# "Program /usr/lib32/tracker-3.0/trackertestutils/tracker-sandbox found: NO"
+		vsed -e "/subdir('tests')/d" -i meson.build
+	fi
+}
+
 # feel free to fix
 do_check() {
 	:

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

* Re: [PR PATCH] [Updated] meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (18 preceding siblings ...)
  2021-02-03  4:39 ` ericonr
@ 2021-02-03  5:23 ` ericonr
  2021-02-03  5:24 ` [PR PATCH] [Merged]: " ericonr
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-03  5:23 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages meson
https://github.com/void-linux/void-packages/pull/28300

meson: update to 0.56.2.
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 40a8c1b4864612a56195463ef4c28b06b7243577 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 28 Jan 2021 01:17:40 -0300
Subject: [PATCH 01/11] meson: update to 0.56.2.

Fix checkdepends and tests in general on musl.

Add bash completions.
---
 srcpkgs/meson/patches/fix-unittest.patch | 77 ++++++++++++++++++++++++
 srcpkgs/meson/template                   | 29 ++++++---
 2 files changed, 99 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/meson/patches/fix-unittest.patch

diff --git a/srcpkgs/meson/patches/fix-unittest.patch b/srcpkgs/meson/patches/fix-unittest.patch
new file mode 100644
index 00000000000..746de056ed7
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-unittest.patch
@@ -0,0 +1,77 @@
+commit 777cbe9c0faa018bafccf3e7adb8dad162276e35
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Mon Feb 1 00:26:49 2021 -0300
+
+    tests/common: fix " 37 has function" test on musl systems.
+    
+    This commit fixes the test that asserts on whether the lchmod() function
+    should have been detected as available by Meson. It does so by assuming
+    that on Linux systems not using glibc, the function will be available.
+    
+    - fix comment about lchmod on Linux: musl has implemented the function
+    correctly since 2013, so the assumption in the test wasn't correct.
+    Furthermore, musl doesn't use glibc's stub mechanism.
+    - fix include to receive __GLIBC__ definition: including almost any
+    header in glibc will end up defining __GLIBC__, since most headers
+    include <features.h>. The <gnu/libc-version.h> header was probably
+    chosen because of its name, but its actual purpose is defining functions
+    for checking glibc version at runtime (instead of what the binary was
+    built with), so it isn't necessary to use it. Since it is a completely
+    non standard header, including it makes the test suite fail on musl due
+    to not finding the header.
+
+diff --git test cases/common/37 has function/meson.build test cases/common/37 has function/meson.build
+index 26f13d6fa..a59480c2d 100644
+--- test cases/common/39 has function/meson.build	
++++ test cases/common/39 has function/meson.build	
+@@ -44,11 +44,13 @@ foreach cc : compilers
+     error('Found non-existent function "hfkerhisadf".')
+   endif
+ 
+-  # With glibc on Linux lchmod is a stub that will always return an error,
+-  # we want to detect that and declare that the function is not available.
+-  # We can't check for the C library used here of course, but if it's not
+-  # implemented in glibc it's probably not implemented in any other 'slimmer'
+-  # C library variants either, so the check should be safe either way hopefully.
++  # With glibc (before 2.32, see below) on Linux, lchmod is a stub that will
++  # always return an error, we want to detect that and declare that the
++  # function is not available.
++  # We can't check for the C library used here of course, but the main
++  # alternative Linux C library (musl) doesn't use glibc's stub mechanism;
++  # also, it has implemented lchmod since 2013, so it should be safe to check
++  # that lchmod is available on Linux when not using glibc.
+   if host_system == 'linux' or host_system == 'darwin'
+     assert (cc.has_function('poll', prefix : '#include <poll.h>',
+                             args : unit_test_args),
+@@ -57,15 +59,24 @@ foreach cc : compilers
+     has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args)
+ 
+     if host_system == 'linux'
+-      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <gnu/libc-version.h>', args: unit_test_args)
+-      glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
+-      message('GLIBC vetsion:', glibc_vers)
++      # __GLIBC__ macro can be retrieved by including almost any C library header
++      glibc_major = cc.get_define('__GLIBC__', prefix: '#include <unistd.h>', args: unit_test_args)
++      # __GLIBC__ will only be set for glibc
++      if glibc_major != ''
++        glibc_print = 'hi "@0@" hi'.format(glibc_major)
++        message(glibc_print)
++        glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include <unistd.h>', args: unit_test_args)
++        glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor)
++        message('GLIBC version:', glibc_vers)
+ 
+-      # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
+-      if glibc_vers.version_compare('<2.32')
+-        assert (not has_lchmod, '"lchmod" check should have failed')
++        # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html)
++        if glibc_vers.version_compare('<2.32')
++          assert (not has_lchmod, '"lchmod" check should have failed')
++        else
++          assert (has_lchmod, '"lchmod" check should have succeeded')
++        endif
+       else
++        # Other C libraries for Linux should have lchmod
+         assert (has_lchmod, '"lchmod" check should have succeeded')
+       endif
+     else
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index 9a1afce0cfc..64a12e6d7a9 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,20 +1,33 @@
 # Template file for 'meson'
 pkgname=meson
-version=0.55.3
-revision=3
+version=0.56.2
+revision=1
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"
-checkdepends="glib-devel gobject-introspection libsanitizer-devel ninja
+checkdepends="glib-devel gobject-introspection ninja
  gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
  cross-arm-linux-gnueabihf"
 short_desc="Super fast build system"
 maintainer="John <me@johnnynator.dev>"
 license="Apache-2.0"
 homepage="https://mesonbuild.com"
-changelog="https://github.com/mesonbuild/$pkgname/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
-distfiles="https://github.com/mesonbuild/$pkgname/releases/download/$version/$pkgname-$version.tar.gz"
-checksum=6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5
+changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
+distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
+checksum=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
+
+# XXX: sanitizers aren't available on musl
+if [ "$XBPS_TARGET_LIBC" = glibc ]; then
+	checkdepends+=" libsanitizer-devel"
+fi
+
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		vsed -e 's/test_pch_with_address_sanitizer/_&/' \
+			-e 's/test_generate_gir_with_address_sanitizer/_&/' \
+			-i run_unittests.py
+	fi
+}
 
 do_check() {
 	# meson depends on trillion of things to perform actual tests
@@ -35,5 +48,7 @@ post_install() {
 	done
 
 	vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
-	vinstall data/shell-completions/zsh/_meson 644 usr/share/zsh/site-functions
+
+	vcompletion data/shell-completions/bash/meson bash
+	vcompletion data/shell-completions/zsh/_meson zsh
 }

From 6078d48d5d8ccb3848f8d782b79d0dc21e0249b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:20:22 -0300
Subject: [PATCH 02/11] kanshi: add patch to fix ndebug build.

Caught by new warnings enabled by meson update.
---
 srcpkgs/kanshi/patches/assert.patch | 37 +++++++++++++++++++++++++++++
 srcpkgs/kanshi/template             |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kanshi/patches/assert.patch

diff --git a/srcpkgs/kanshi/patches/assert.patch b/srcpkgs/kanshi/patches/assert.patch
new file mode 100644
index 00000000000..90e8e3c7bab
--- /dev/null
+++ b/srcpkgs/kanshi/patches/assert.patch
@@ -0,0 +1,37 @@
+commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Tue Feb 2 17:18:42 2021 -0300
+
+    parser: use abort() instead of assert(0).
+    
+    assert(0) has no effect on NDEBUG builds, and means the program will
+    continue running in an unexpected state.
+
+diff --git parser.c parser.c
+index 40146e8..0ed1ba1 100644
+--- parser.c
++++ parser.c
+@@ -1,5 +1,4 @@
+ #define _POSIX_C_SOURCE 200809L
+-#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
+@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
+ 	case KANSHI_TOKEN_NEWLINE:
+ 		return "newline";
+ 	}
+-	assert(0);
++	abort();
+ }
+ 
+ static int parser_read_char(struct kanshi_parser *parser) {
+@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
+ 					}
+ 					break;
+ 				default:
+-					assert(0);
++					abort();
+ 				}
+ 				has_key = false;
+ 				output->fields |= key;
diff --git a/srcpkgs/kanshi/template b/srcpkgs/kanshi/template
index fbef9a7e59b..e6fe40f4a69 100644
--- a/srcpkgs/kanshi/template
+++ b/srcpkgs/kanshi/template
@@ -1,7 +1,7 @@
 # Template file for 'kanshi'
 pkgname=kanshi
 version=1.1.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-devel"

From 61d0a30dc3e522cc211cc747a86cee88eac29f39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 18:05:10 -0300
Subject: [PATCH 03/11] wlroots: follow upstream recommendation for ndebug.

Assertions in this case are desirable at runtime.

Fix build for meson 0.56.x, since new warnings were added.
---
 srcpkgs/wlroots/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wlroots/template b/srcpkgs/wlroots/template
index a73b5f21a13..c4d3bad99c6 100644
--- a/srcpkgs/wlroots/template
+++ b/srcpkgs/wlroots/template
@@ -1,11 +1,12 @@
 # Template file for 'wlroots'
 pkgname=wlroots
 version=0.12.0
-revision=1
+revision=2
 build_style=meson
+# enable assertions - upstream uses them only for unreachable situations
 configure_args="-Dlogind=disabled -Dlibseat=enabled
  -Dxcb-errors=enabled -Dxcb-icccm=enabled -Dxwayland=enabled
- -Dx11-backend=enabled -Dexamples=false"
+ -Dx11-backend=enabled -Dexamples=false -Dwerror=false -Db_ndebug=false"
 hostmakedepends="pkg-config wayland-devel"
 _devel_depends="MesaLib-devel libseat-devel eudev-libudev-devel libdrm-devel
  libinput-devel libxkbcommon-devel pixman-devel wayland-devel wayland-protocols

From e662fe495868bdc2ee47d890da7bae4212035f5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:30:18 -0300
Subject: [PATCH 04/11] efl: don't build examples.

Avoids wasting build time.

Also gate tests, since they aren't working great yet.
---
 srcpkgs/efl/template | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/srcpkgs/efl/template b/srcpkgs/efl/template
index a8b26fff25c..513cb4dfff4 100644
--- a/srcpkgs/efl/template
+++ b/srcpkgs/efl/template
@@ -4,6 +4,7 @@ version=1.24.4
 revision=1
 build_style=meson
 configure_args="
+ -Dbuild-examples=false
  -Dembedded-lz4=false
  -Dcrypto=openssl
  -Dnetwork-backend=none
@@ -46,6 +47,7 @@ makedepends="
  $(vopt_if pulseaudio pulseaudio-devel)
  $(vopt_if lottie rlottie-devel)
  $(vopt_if ibus ibus-devel)"
+checkdepends="dbus xvfb-run"
 short_desc="Enlightenment Foundation Libraries"
 maintainer="q66 <daniel@octaforge.org>"
 license="LGPL-2.1-only"
@@ -104,6 +106,13 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+do_check() {
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# FIXME: tests fail in weird places
+		xvfb-run dbus-run-session ninja -C build test
+	fi
+}
+
 post_install() {
 	# don't want service file junk
 	rm -rf ${DESTDIR}/usr/lib/systemd

From 62d47cd1b65574f053b3505469d1049620bde075 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:04:39 -0300
Subject: [PATCH 05/11] seatd: fix build with meson 0.56.x.

meson added some new warnings to the warning level used by seatd,
including for unused arguments. This made the build generate warnings,
and seatd's default of werror=true caused the build to fail.
---
 srcpkgs/seatd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/seatd/template b/srcpkgs/seatd/template
index d76d4d3a658..e6b6b387444 100644
--- a/srcpkgs/seatd/template
+++ b/srcpkgs/seatd/template
@@ -3,7 +3,7 @@ pkgname=seatd
 version=0.4.0
 revision=1
 build_style=meson
-configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled)"
+configure_args="-Dexamples=disabled $(vopt_if elogind -Dlogind=enabled) -Dwerror=false"
 hostmakedepends="pkg-config scdoc"
 makedepends="$(vopt_if elogind elogind-devel)"
 short_desc="Minimal seat management daemon"

From 7c60d009bcb2b89990220ef417f3293c7cdec56f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:42:48 -0300
Subject: [PATCH 06/11] mako: fix build with meson 0.56.x.

---
 srcpkgs/mako/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mako/template b/srcpkgs/mako/template
index 299305acd78..18c18def196 100644
--- a/srcpkgs/mako/template
+++ b/srcpkgs/mako/template
@@ -3,7 +3,7 @@ pkgname=mako
 version=1.4.1
 revision=1
 build_style=meson
-configure_args="-Dzsh-completions=true -Dapparmor=true"
+configure_args="-Dzsh-completions=true -Dapparmor=true -Dwerror=false"
 hostmakedepends="pkg-config scdoc wayland-devel wayland-protocols"
 makedepends="wayland-devel wayland-protocols pango-devel cairo-devel
  elogind-devel gdk-pixbuf-devel"

From de47235da691cbc1a18b72725e7adfd127e6f599 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 19:59:11 -0300
Subject: [PATCH 07/11] grim: fix build for meson 0.56.x.

---
 srcpkgs/grim/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grim/template b/srcpkgs/grim/template
index 896434db405..61844769456 100644
--- a/srcpkgs/grim/template
+++ b/srcpkgs/grim/template
@@ -3,7 +3,7 @@ pkgname=grim
 version=1.3.1
 revision=1
 build_style=meson
-configure_args="-Djpeg=enabled"
+configure_args="-Djpeg=enabled -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols cairo-devel libjpeg-turbo-devel"
 short_desc="Grab images from a Wayland compositor"

From 38f5865275d96377084a1cc179f2bd843e4ffed2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 20:40:19 -0300
Subject: [PATCH 08/11] swayidle: fix build with meson 0.56.x.

---
 srcpkgs/swayidle/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/swayidle/template b/srcpkgs/swayidle/template
index b6f51f47927..e415051946a 100644
--- a/srcpkgs/swayidle/template
+++ b/srcpkgs/swayidle/template
@@ -3,7 +3,7 @@ pkgname=swayidle
 version=1.6
 revision=1
 build_style=meson
-configure_args="-Dlogind-provider=elogind"
+configure_args="-Dlogind-provider=elogind -Dwerror=false"
 hostmakedepends="pkg-config wayland-devel scdoc"
 makedepends="wayland-devel wayland-protocols elogind-devel"
 short_desc="Idle management daemon for Wayland"

From 47ab8b9528b11658ebc1c12e83c7361cf0d71ddf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 17:57:20 -0300
Subject: [PATCH 09/11] pixman: fix potential build errors with meson 0.56.x.

I couldn't reproduce the errors, so this commit is not entirely
necessary. It still works as a precaution.

The below is slightly erroneous, since the issue didn't repeat itself.

Apparently meson detects OpenMP as available on cross builds because it
can find the omp.h header, even though the library seems to be
available.

For reference, what the configure output of a native build looks like:

WARNING: OpenMP found but omp.h missing.
Run-time dependency OpenMP found: NO
---
 srcpkgs/pixman/template | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index ca5bf9632b0..26c65462af6 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -20,7 +20,11 @@ LDFLAGS="-Wl,-z,stack-size=2097152"
 if [ "$XBPS_CHECK_PKGS" ]; then
 	# libpng and openmp are used only for testing; the make-blue-noise.c file isn't built
 	# https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c
-	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+	configure_args+=" -Dtests=enabled -Dlibpng=enabled -Dopenmp=enabled"
+else
+	# dynamic libgomp is available only when running tests, better to disable explicitly.
+	# -Dtests will only take effect on the next release.
+	configure_args+=" -Dtests=disabled -Dopenmp=disabled"
 fi
 
 post_install() {

From a0c93409909878abaa4e632f47d417a3ef0e1d74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 21:51:21 -0300
Subject: [PATCH 10/11] nautilus: fix build after libdir changes.

Also gate tests.
---
 srcpkgs/nautilus/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/srcpkgs/nautilus/template b/srcpkgs/nautilus/template
index f7108f9b062..e38755f0806 100644
--- a/srcpkgs/nautilus/template
+++ b/srcpkgs/nautilus/template
@@ -19,9 +19,23 @@ homepage="https://wiki.gnome.org/Nautilus"
 distfiles="${GNOME_SITE}/${pkgname}/${version::4}/${pkgname}-${version}.tar.xz"
 checksum=0a3e812b13b774b7fd6f222f55acd1f87fb2973d9af60c04b7d25cb52222d0fd
 
+if [ "$CROSS_BUILD" ]; then
+	# tests try to use tracker-sandbox from the wrong path, because of some confusion with libdir:
+	# "Program /usr/lib32/tracker-3.0/trackertestutils/tracker-sandbox found: NO"
+	configure_args+=" -Dtests=none"
+fi
+
 build_options="gir"
 build_options_default="gir"
 
+do_check() {
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# tests timeout:
+		# 11/11 test-nautilus-search-engine-tracker            TIMEOUT        480.00s
+		ninja -C builddir test
+	fi
+}
+
 libnautilus_package() {
 	short_desc+=" - shared libraries"
 	pkg_install() {

From b17da6a3240f53f3672be9c517009ea093c5fab1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 2 Feb 2021 21:50:26 -0300
Subject: [PATCH 11/11] grilo-plugins: fix build for libdir changes.

---
 srcpkgs/grilo-plugins/template | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/srcpkgs/grilo-plugins/template b/srcpkgs/grilo-plugins/template
index 2de976a082b..9631b2941a7 100644
--- a/srcpkgs/grilo-plugins/template
+++ b/srcpkgs/grilo-plugins/template
@@ -18,6 +18,14 @@ homepage="http://live.gnome.org/Grilo"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
 checksum=c6b6df086a164d65c206d70139ce80591f8feca3545612e45b823fb4fe4b2577
 
+post_patch() {
+	if [ "$CROSS_BUILD" ]; then
+		# tests try to use tracker-sandbox from the wrong path:
+		# "Program /usr/lib32/tracker-3.0/trackertestutils/tracker-sandbox found: NO"
+		vsed -e "/subdir('tests')/d" -i meson.build
+	fi
+}
+
 # feel free to fix
 do_check() {
 	:

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

* Re: [PR PATCH] [Merged]: meson: update to 0.56.2.
  2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
                   ` (19 preceding siblings ...)
  2021-02-03  5:23 ` ericonr
@ 2021-02-03  5:24 ` ericonr
  20 siblings, 0 replies; 22+ messages in thread
From: ericonr @ 2021-02-03  5:24 UTC (permalink / raw)
  To: ml

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

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

meson: update to 0.56.2.
https://github.com/void-linux/void-packages/pull/28300

Description:
<!-- Mark items with [x] where applicable -->

@Johnnynator 

Maybe we can look into adding the CMake stuff from https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.56.0.md#cmake-subproject-cross-compilation-support into our buld style.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

end of thread, other threads:[~2021-02-03  5:24 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29  7:14 [PR PATCH] meson: update to 0.56.2 ericonr
2021-01-29  7:21 ` [PR PATCH] [Updated] " ericonr
2021-01-29  7:34 ` ericonr
2021-01-29  9:52 ` unspecd
2021-02-01  3:37 ` [PR PATCH] [Updated] " ericonr
2021-02-01  3:42 ` ericonr
2021-02-01  4:25 ` ericonr
2021-02-01  4:51 ` ericonr
2021-02-02 19:26 ` ericonr
2021-02-02 20:07 ` ericonr
2021-02-02 20:20 ` ericonr
2021-02-02 21:05 ` ericonr
2021-02-02 21:15 ` ericonr
2021-02-02 22:44 ` ericonr
2021-02-02 22:59 ` ericonr
2021-02-03  0:00 ` ericonr
2021-02-03  0:32 ` ericonr
2021-02-03  0:49 ` ericonr
2021-02-03  0:55 ` ericonr
2021-02-03  4:39 ` ericonr
2021-02-03  5:23 ` ericonr
2021-02-03  5:24 ` [PR PATCH] [Merged]: " ericonr

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).