Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] meson: update to 0.56.2.
Date: Mon, 01 Feb 2021 05:51:46 +0100	[thread overview]
Message-ID: <20210201045146._M8E89AEYPhp8VRoYZCWbursbYe3VgurfoLogfvB_YI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28300@inbox.vuxu.org>

[-- 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
 }

  parent reply	other threads:[~2021-02-01  4:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29  7:14 [PR PATCH] " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210201045146._M8E89AEYPhp8VRoYZCWbursbYe3VgurfoLogfvB_YI@z \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).