From b856e2371f5f3791a362b2a64d8dbac2ad22433a Mon Sep 17 00:00:00 2001 From: triallax Date: Tue, 1 Aug 2023 20:49:37 +0100 Subject: [PATCH 1/2] gobject-introspection: fix leaks. They cause Meson's checks to fail. --- .../patches/fix-leaks.patch | 46 +++++++++++++++++++ srcpkgs/gobject-introspection/template | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/gobject-introspection/patches/fix-leaks.patch diff --git a/srcpkgs/gobject-introspection/patches/fix-leaks.patch b/srcpkgs/gobject-introspection/patches/fix-leaks.patch new file mode 100644 index 0000000000000..fa23ee7457889 --- /dev/null +++ b/srcpkgs/gobject-introspection/patches/fix-leaks.patch @@ -0,0 +1,46 @@ +From bf96a92ef263820d40e233814a46932cae00db41 Mon Sep 17 00:00:00 2001 +From: Xavier Claessens +Date: Tue, 18 Jul 2023 11:07:59 -0400 +Subject: [PATCH] gdump: Fix leaked io streams + +This makes Meson unit test fail: +https://github.com/mesonbuild/meson/issues/11754 +--- + +MR: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/411 + + girepository/gdump.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/girepository/gdump.c b/girepository/gdump.c +index 055a8b8c1..449b260a4 100644 +--- a/girepository/gdump.c ++++ b/girepository/gdump.c +@@ -594,6 +594,7 @@ g_irepository_dump (const char *arg, GError **error) + if (output == NULL) + { + g_input_stream_close (G_INPUT_STREAM (input), NULL, NULL); ++ g_object_unref (input); + return FALSE; + } + +@@ -674,11 +675,12 @@ g_irepository_dump (const char *arg, GError **error) + ioerror = NULL; + else + ioerror = error; +- if (!g_input_stream_close (G_INPUT_STREAM (in), NULL, ioerror)) +- return FALSE; +- if (!g_output_stream_close (G_OUTPUT_STREAM (output), NULL, ioerror)) +- return FALSE; ++ caught_error |= !g_input_stream_close (G_INPUT_STREAM (in), NULL, ioerror); ++ caught_error |= !g_output_stream_close (G_OUTPUT_STREAM (output), NULL, ioerror); + } + ++ g_object_unref (in); ++ g_object_unref (output); ++ + return !caught_error; + } +-- +GitLab + diff --git a/srcpkgs/gobject-introspection/template b/srcpkgs/gobject-introspection/template index 69f59b52fa0cc..b9e1e618784da 100644 --- a/srcpkgs/gobject-introspection/template +++ b/srcpkgs/gobject-introspection/template @@ -1,7 +1,7 @@ # Template file for 'gobject-introspection' pkgname=gobject-introspection version=1.76.1 -revision=1 +revision=2 build_style=meson pycompile_dirs="usr/lib/${pkgname}/giscanner" hostmakedepends="flex pkg-config" From fed5aeb66175b27a24674e971b09f056a8dda281 Mon Sep 17 00:00:00 2001 From: triallax Date: Wed, 7 Jun 2023 14:27:53 +0100 Subject: [PATCH 2/2] meson: update to 1.2.0. --- srcpkgs/meson/patches/fix-tests.diff | 127 +++++++++++++++++++++++++++ srcpkgs/meson/template | 9 +- 2 files changed, 131 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/meson/patches/fix-tests.diff diff --git a/srcpkgs/meson/patches/fix-tests.diff b/srcpkgs/meson/patches/fix-tests.diff new file mode 100644 index 0000000000000..fcc34dc4f4d96 --- /dev/null +++ b/srcpkgs/meson/patches/fix-tests.diff @@ -0,0 +1,127 @@ +Taken from https://github.com/eli-schwartz/meson/commit/9da567b88c809250186cce4b0e8c68301852de9f, +with minor modifications. + +diff --git a/cross/armclang-linux.txt b/cross/armclang-linux.txt +index 863b355c345..36927b882b5 100644 +--- a/cross/armclang-linux.txt ++++ b/cross/armclang-linux.txt +@@ -22,7 +22,7 @@ c = ['/opt/arm/developmentstudio-2019.0/sw/ARMCompiler6.12/bin/armclang', '--tar + #cpp = '/usr/bin/arm-linux-gnueabihf-g++' + ar = '/opt/arm/developmentstudio-2019.0/sw/ARMCompiler6.12/bin/armar' + #strip = '/usr/arm-linux-gnueabihf/bin/strip' +-#pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config' ++#pkg-config = '/usr/bin/arm-linux-gnueabihf-pkg-config' + + [host_machine] + system = 'baremetal' +diff --git a/cross/linux-mingw-w64-32bit.txt b/cross/linux-mingw-w64-32bit.txt +index caf1da1a045..91ad9c5029a 100644 +--- a/cross/linux-mingw-w64-32bit.txt ++++ b/cross/linux-mingw-w64-32bit.txt +@@ -4,7 +4,7 @@ cpp = '/usr/bin/i686-w64-mingw32-g++' + objc = '/usr/bin/i686-w64-mingw32-gcc' + ar = '/usr/bin/i686-w64-mingw32-ar' + strip = '/usr/bin/i686-w64-mingw32-strip' +-pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config' ++pkg-config = '/usr/bin/i686-w64-mingw32-pkg-config' + windres = '/usr/bin/i686-w64-mingw32-windres' + exe_wrapper = 'wine' + ld = '/usr/bin/i686-w64-mingw32-ld' +diff --git a/cross/linux-mingw-w64-64bit.txt b/cross/linux-mingw-w64-64bit.txt +index 7403803b4c0..08fa7041043 100644 +--- a/cross/linux-mingw-w64-64bit.txt ++++ b/cross/linux-mingw-w64-64bit.txt +@@ -4,7 +4,7 @@ cpp = '/usr/bin/x86_64-w64-mingw32-g++' + objc = '/usr/bin/x86_64-w64-mingw32-gcc' + ar = '/usr/bin/x86_64-w64-mingw32-ar' + strip = '/usr/bin/x86_64-w64-mingw32-strip' +-pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config' ++pkg-config = '/usr/bin/x86_64-w64-mingw32-pkg-config' + windres = '/usr/bin/x86_64-w64-mingw32-windres' + exe_wrapper = 'wine' + cmake = '/usr/bin/cmake' +diff --git a/cross/none.txt b/cross/none.txt +index 1fbe4713ac0..9eadf974c32 100644 +--- a/cross/none.txt ++++ b/cross/none.txt +@@ -15,5 +15,5 @@ fc = ['false'] + objc = ['false'] + objcpp = ['false'] + ar = ['false'] +-pkgconfig = ['false'] ++pkg-config = ['false'] + cmake = ['false'] +diff --git a/cross/ubuntu-armhf.txt b/cross/ubuntu-armhf.txt +index 408c2ceaecb..6409e396b57 100644 +--- a/cross/ubuntu-armhf.txt ++++ b/cross/ubuntu-armhf.txt +@@ -6,7 +6,7 @@ cpp = ['/usr/bin/arm-linux-gnueabihf-g++'] + rust = ['rustc', '--target', 'arm-unknown-linux-gnueabihf', '-C', 'linker=/usr/bin/arm-linux-gnueabihf-gcc-7'] + ar = '/usr/arm-linux-gnueabihf/bin/ar' + strip = '/usr/arm-linux-gnueabihf/bin/strip' +-pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config' ++pkg-config = '/usr/bin/arm-linux-gnueabihf-pkg-config' + ld = '/usr/bin/arm-linux/gnueabihf-ld' + + [built-in options] +diff --git a/mesonbuild/scripts/env2mfile.py b/mesonbuild/scripts/env2mfile.py +index 27a7dd96984..df93730424d 100755 +--- a/mesonbuild/scripts/env2mfile.py ++++ b/mesonbuild/scripts/env2mfile.py +@@ -213,7 +213,7 @@ def detect_cross_debianlike(options: T.Any) -> MachineInfo: + except ValueError: + pass + try: +- infos.binaries['pkgconfig'] = locate_path("%s-pkg-config" % host_arch) ++ infos.binaries['pkg-config'] = locate_path("%s-pkg-config" % host_arch) + except ValueError: + pass # pkg-config is optional + try: +diff --git a/test cases/unit/33 cross file overrides always args/ubuntu-armhf-overrides.txt b/test cases/unit/33 cross file overrides always args/ubuntu-armhf-overrides.txt +index a00a7d1366c..d687b29817a 100644 +--- a/test cases/unit/33 cross file overrides always args/ubuntu-armhf-overrides.txt ++++ b/test cases/unit/33 cross file overrides always args/ubuntu-armhf-overrides.txt +@@ -6,7 +6,7 @@ cpp = '/usr/bin/arm-linux-gnueabihf-g++' + rust = ['rustc', '--target', 'arm-unknown-linux-gnueabihf', '-C', 'linker=/usr/bin/arm-linux-gnueabihf-gcc-7'] + ar = '/usr/arm-linux-gnueabihf/bin/ar' + strip = '/usr/arm-linux-gnueabihf/bin/strip' +-pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config' ++pkg-config = '/usr/bin/arm-linux-gnueabihf-pkg-config' + + [properties] + root = '/usr/arm-linux-gnueabihf' +diff --git a/test cases/unit/36 exe_wrapper behaviour/broken-cross.txt b/test cases/unit/36 exe_wrapper behaviour/broken-cross.txt +index a5a39318d2c..3615f92f763 100644 +--- a/test cases/unit/36 exe_wrapper behaviour/broken-cross.txt ++++ b/test cases/unit/36 exe_wrapper behaviour/broken-cross.txt +@@ -3,7 +3,7 @@ c = '/usr/bin/x86_64-w64-mingw32-gcc' + cpp = '/usr/bin/x86_64-w64-mingw32-g++' + ar = '/usr/bin/x86_64-w64-mingw32-ar' + strip = '/usr/bin/x86_64-w64-mingw32-strip' +-pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config' ++pkg-config = '/usr/bin/x86_64-w64-mingw32-pkg-config' + windres = '/usr/bin/x86_64-w64-mingw32-windres' + exe_wrapper = 'broken' + +diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py +index 12eafd59598..4327d99fcd0 100644 +--- a/unittests/allplatformstests.py ++++ b/unittests/allplatformstests.py +@@ -2722,7 +2722,7 @@ def test_native_dep_pkgconfig(self): + with tempfile.NamedTemporaryFile(mode='w', delete=False, encoding='utf-8') as crossfile: + crossfile.write(textwrap.dedent( + '''[binaries] +- pkgconfig = '{}' ++ pkg-config = '{}' + + [properties] + +@@ -2749,7 +2749,7 @@ def test_pkg_config_libdir(self): + with tempfile.NamedTemporaryFile(mode='w', delete=False, encoding='utf-8') as crossfile: + crossfile.write(textwrap.dedent( + '''[binaries] +- pkgconfig = 'pkg-config' ++ pkg-config = 'pkg-config' + + [properties] + pkg_config_libdir = ['{}'] diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template index c329092f20c0c..1c0ea62408a6a 100644 --- a/srcpkgs/meson/template +++ b/srcpkgs/meson/template @@ -1,20 +1,20 @@ # Template file for 'meson' pkgname=meson -version=1.1.0 +version=1.2.0 revision=1 build_style=python3-module hostmakedepends="python3-devel python3-setuptools" depends="ninja python3-setuptools" checkdepends="glib-devel gobject-introspection ninja - gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python3-devel - cross-arm-linux-gnueabihf" + gcc-objc++ clang qt5-devel qt6-tools cmake llvm git pkg-config vala + python3-devel cross-arm-linux-gnueabihf" short_desc="Super fast build system" maintainer="Michal Vasilek " 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=d9616c44cd6c53689ff8f05fc6958a693f2e17c3472a8daf83cee55dabff829f +checksum=1c0b634fe6b6a7072e398647f1bf392048577068a5c92ae44d04085dab0ded6f # XXX: sanitizers aren't available on musl if [ "$XBPS_TARGET_LIBC" = glibc ]; then @@ -31,7 +31,6 @@ post_patch() { do_check() { # meson depends on trillion of things to perform actual tests # see checkdepends=() on arch - # 1 test still fails ( CC=gcc ./run_unittests.py ) }