WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions srcpkgs/meson/patches/musl-tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# see https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/meson/skip-broken-tests.patch
# more specifically https://github.com/mesonbuild/meson/issues/8283
# previously there was a vsed in the post_patch() of the template
--- a/mesonbuild/utils/universal.py
+++ b/mesonbuild/utils/universal.py
@@ -19,6 +19,7 @@
from functools import lru_cache, wraps
from itertools import tee
from tempfile import TemporaryDirectory, NamedTemporaryFile
+from packaging.tags import sys_tags
import typing as T
import textwrap
import pickle
@@ -115,6 +116,7 @@
'is_aix',
'is_android',
'is_ascii_string',
+ 'is_musl',
'is_cygwin',
'is_debianlike',
'is_dragonflybsd',
@@ -650,6 +652,10 @@
def is_wsl() -> bool:
return is_linux() and 'microsoft' in platform.release().lower()

+def is_musl() -> bool:
+ tags = list(sys_tags() )
+ return "musl" in tags[0].platform
Comment on lines +26 to +28

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want this upstream it needs to do something like check for __MUSL__.

Don't use third-party libraries (meson has none by design and this adds a runtime dep solely to get a testsuite hack to work) which depend on import sys; analyze_elffile(sys.executable) to check if DT_INTERP contains the word "musl" and fails when python is statically linked or CC=musl-gcc + a glibc system.

+
def is_cygwin() -> bool:
return sys.platform == 'cygwin'

--- a/unittests/linuxliketests.py
+++ b/unittests/linuxliketests.py
@@ -23,7 +23,7 @@
import mesonbuild.coredata
import mesonbuild.modules.gnome
from mesonbuild.mesonlib import (
- MachineChoice, is_windows, is_osx, is_cygwin, is_openbsd, is_haiku,
+ MachineChoice, is_windows, is_osx, is_musl, is_cygwin, is_openbsd, is_haiku,
is_sunos, windows_proof_rmtree, version_compare, is_linux,
EnvironmentException
)
@@ -309,6 +309,8 @@

@skip_if_not_base_option('b_sanitize')
def test_generate_gir_with_address_sanitizer(self):
+ if is_musl():
+ raise SkipTest('asan not available on musl')
if is_cygwin():
raise SkipTest('asan not available on Cygwin')
if is_openbsd():
@@ -453,6 +455,8 @@
included on the linker command line when c_link_args is
set but c_args is not.
'''
+ if is_musl():
+ raise SkipTest('asan not available on musl')
if is_cygwin():
raise SkipTest('asan not available on Cygwin')
if is_openbsd():
@@ -1005,6 +1009,8 @@

@skip_if_not_base_option('b_sanitize')
def test_env_cflags_ldflags(self):
+ if is_musl():
+ raise SkipTest('asan not available on musl')
if is_cygwin():
raise SkipTest('asan not available on Cygwin')
if is_openbsd():
@@ -1021,6 +1027,8 @@

@skip_if_not_base_option('b_sanitize')
def test_pch_with_address_sanitizer(self):
+ if is_musl():
+ raise SkipTest('asan not available on musl')
if is_cygwin():
raise SkipTest('asan not available on Cygwin')
if is_openbsd():
11 changes: 2 additions & 9 deletions srcpkgs/meson/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'meson'
pkgname=meson
version=1.6.1
version=1.9.1
revision=1
build_style=python3-module
hostmakedepends="python3-devel python3-setuptools"
Expand All @@ -14,20 +14,13 @@ license="Apache-2.0"
homepage="https://mesonbuild.com"
changelog="https://raw.githubusercontent.com/mesonbuild/meson/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
distfiles="https://github.com/mesonbuild/meson/releases/download/${version}/meson-${version}.tar.gz"
checksum=1eca49eb6c26d58bbee67fd3337d8ef557c0804e30a6d16bfdf269db997464de
checksum=4e076606f2afff7881d195574bddcd8d89286f35a17b4977a216f535dc0c74ac

# 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/_&/' \
-i unittests/linuxliketests.py
fi
}

do_check() {
# meson depends on trillion of things to perform actual tests
# see checkdepends=() on arch
Expand Down