From 4fb8af188fe6ec8906b53909923e7fa13213450d Mon Sep 17 00:00:00 2001 From: David Seifert Date: Fri, 20 Feb 2026 10:34:01 +0100 Subject: [PATCH] bzip2: make more robust to downstream warning flags --- releases.json | 1 + subprojects/packagefiles/bzip2/meson.build | 12 +++++++++++- subprojects/packagefiles/bzip2/meson_options.txt | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 subprojects/packagefiles/bzip2/meson_options.txt diff --git a/releases.json b/releases.json index 053535dfc4..d327dfcc55 100644 --- a/releases.json +++ b/releases.json @@ -382,6 +382,7 @@ "bzip2" ], "versions": [ + "1.0.8-2", "1.0.8-1" ] }, diff --git a/subprojects/packagefiles/bzip2/meson.build b/subprojects/packagefiles/bzip2/meson.build index 32ee80d843..b8db44de28 100644 --- a/subprojects/packagefiles/bzip2/meson.build +++ b/subprojects/packagefiles/bzip2/meson.build @@ -3,6 +3,11 @@ project( 'c', version: '1.0.8', meson_version: '>=1.0.0', + default_options: [ + meson.version().version_compare('>=1.3.0') ? 'c_std=gnu11,c11' : 'c_std=gnu11', + 'warning_level=0', + ], + license: 'bzip2-1.0.6', ) libbz2_lib = static_library( @@ -18,13 +23,18 @@ libbz2_lib = static_library( install: true, ) +c_args = meson.get_compiler('c').get_supported_arguments( + '-Wno-unused-result', +) + bzip2_exe = executable( 'bzip2', 'bzip2.c', + c_args: c_args, link_with: libbz2_lib, ) -if meson.can_run_host_binaries() +if get_option('tests') and meson.can_run_host_binaries() python = find_program( 'python3', native: true, diff --git a/subprojects/packagefiles/bzip2/meson_options.txt b/subprojects/packagefiles/bzip2/meson_options.txt new file mode 100644 index 0000000000..ec53264662 --- /dev/null +++ b/subprojects/packagefiles/bzip2/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'tests', + type: 'boolean', + description: 'build and run tests', +)