Skip to content

Commit 867d9b1

Browse files
committed
Merge branch 'ps/meson-cleanups'
Meson-based build update. * ps/meson-cleanups: ci: use Meson's new `--slice` option meson: update subproject wrappers meson: fix lookup of shell on MINGW64 meson: clean up unnecessary variables meson: improve summary of auto-detected features meson: stop printing 'https' option twice in our summaries meson: stop discovering native version of Python
2 parents 5f2b826 + d3d6493 commit 867d9b1

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ jobs:
298298
path: build
299299
- name: Test
300300
shell: pwsh
301-
run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }
301+
run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"
302302

303303
regular:
304304
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ test:msvc-meson:
178178
- job: "build:msvc-meson"
179179
artifacts: true
180180
script:
181-
- meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }
181+
- meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
182182
parallel: 10
183183

184184
test:fuzz-smoke-tests:

Documentation/meson.build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,7 @@ foreach manpage, category : manpages
375375
output: fs.stem(manpage) + '.xml',
376376
)
377377

378-
manpage_path = fs.stem(manpage) + '.' + category.to_string()
379-
manpage_target = custom_target(
378+
custom_target(
380379
command: [
381380
xmlto,
382381
'-m', '@INPUT0@',
@@ -392,7 +391,7 @@ foreach manpage, category : manpages
392391
'manpage-normal.xsl',
393392
'manpage-bold-literal.xsl',
394393
],
395-
output: manpage_path,
394+
output: fs.stem(manpage) + '.' + category.to_string(),
396395
install: true,
397396
install_dir: get_option('mandir') / 'man' + category.to_string(),
398397
)

meson.build

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ time = find_program('time', dirs: program_path, required: get_option('benchmarks
245245
# "/bin/sh" over a PATH-based lookup, which provides a working shell on most
246246
# supported systems. This path is also the default shell path used by our
247247
# Makefile. This lookup can be overridden via `program_path`.
248-
target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)
248+
target_shell = find_program('/bin/sh', 'sh', dirs: program_path, native: false)
249249

250250
# Sanity-check that programs required for the build exist.
251251
foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']
@@ -866,9 +866,11 @@ if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
866866
endif
867867
build_options_config.set_quoted('X', executable_suffix)
868868

869-
python = import('python').find_installation('python3', required: get_option('python'))
870-
target_python = find_program('python3', native: false, required: python.found())
871-
if python.found()
869+
# Python is not used for our build system, but exclusively for git-p4.
870+
# Consequently we only need to determine whether Python is available for the
871+
# build target.
872+
target_python = find_program('python3', native: false, required: get_option('python'))
873+
if target_python.found()
872874
build_options_config.set('NO_PYTHON', '')
873875
else
874876
libgit_c_args += '-DNO_PYTHON'
@@ -1970,7 +1972,7 @@ if perl_features_enabled
19701972
subdir('perl')
19711973
endif
19721974

1973-
if python.found()
1975+
if target_python.found()
19741976
scripts_python = [
19751977
'git-p4.py'
19761978
]
@@ -2197,16 +2199,15 @@ meson.add_dist_script(
21972199

21982200
summary({
21992201
'benchmarks': get_option('tests') and perl.found() and time.found(),
2200-
'curl': curl.found(),
2201-
'expat': expat.found(),
2202-
'gettext': intl.found(),
2202+
'curl': curl,
2203+
'expat': expat,
2204+
'gettext': intl,
22032205
'gitweb': gitweb_option.allowed(),
2204-
'https': https_backend,
2205-
'iconv': iconv.found(),
2206-
'pcre2': pcre2.found(),
2206+
'iconv': iconv,
2207+
'pcre2': pcre2,
22072208
'perl': perl_features_enabled,
2208-
'python': python.found(),
2209-
}, section: 'Auto-detected features')
2209+
'python': target_python.found(),
2210+
}, section: 'Auto-detected features', bool_yn: true)
22102211

22112212
summary({
22122213
'csprng': csprng_backend,

subprojects/expat.wrap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[wrap-file]
2-
directory = expat-2.6.3
3-
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz
4-
source_filename = expat-2.6.3.tar.bz2
5-
source_hash = 274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc
6-
patch_filename = expat_2.6.3-1_patch.zip
7-
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.3-1/get_patch
8-
patch_hash = cf017fbe105e31428b2768360bd9be39094df4e948a1e8d1c54b6f7c76460cb1
9-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.3-1/expat-2.6.3.tar.bz2
10-
wrapdb_version = 2.6.3-1
2+
directory = expat-2.7.1
3+
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz
4+
source_filename = expat-2.7.1.tar.bz2
5+
source_hash = 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30
6+
patch_filename = expat_2.7.1-1_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.7.1-1/get_patch
8+
patch_hash = fe28cbbc427a7c9787d08b969ad54d19f59d8dd18294b4a18651cecfc789d4ef
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.7.1-1/expat-2.7.1.tar.bz2
10+
wrapdb_version = 2.7.1-1
1111

1212
[provide]
1313
expat = expat_dep

subprojects/pcre2.wrap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[wrap-file]
2-
directory = pcre2-10.44
3-
source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.bz2
4-
source_filename = pcre2-10.44.tar.bz2
5-
source_hash = d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96
6-
patch_filename = pcre2_10.44-2_patch.zip
7-
patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.44-2/get_patch
8-
patch_hash = 4336d422ee9043847e5e10dbbbd01940d4c9e5027f31ccdc33a7898a1ca94009
9-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.44-2/pcre2-10.44.tar.bz2
10-
wrapdb_version = 10.44-2
2+
directory = pcre2-10.45
3+
source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.tar.bz2
4+
source_filename = pcre2-10.45.tar.bz2
5+
source_hash = 21547f3516120c75597e5b30a992e27a592a31950b5140e7b8bfde3f192033c4
6+
patch_filename = pcre2_10.45-2_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.45-2/get_patch
8+
patch_hash = 7c6f34b703708652a404f9dc2769c67658c437b6043573295fa3428a9b7a6807
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.45-2/pcre2-10.45.tar.bz2
10+
wrapdb_version = 10.45-2
1111

1212
[provide]
1313
libpcre2-8 = libpcre2_8

0 commit comments

Comments
 (0)