From 9c2e20419bc93d8309982292aa6b0e3fea5c3a0b Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 11 Jul 2025 18:42:22 +0530 Subject: [PATCH] win-pkgconfig: Bump to 0.29.2 The older 0.28 version has a buggy --msvc-syntax option: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8717#note_3001648 This 32-bit version was compiled from our meson port of pkg-config: https://gitlab.freedesktop.org/gstreamer/meson-ports/pkg-config The toolchain used was MSYS2's mingw32-gcc toolchain `mingw-w64-i686-gcc` so that it uses 32-bit MSVCRT, which gives it maximum compatibility with all Windows versions. UCRT DLLs are specific to the VS version and Windows version. This version will also not insert any system library or include paths, like the previous 0.28 version. The build commands were: ``` meson setup --optimization=s --strip \ --wrap-mode=forcefallback \ -Dpc_path='' \ -Dsystem_include_path='' \ -Dsystem_library_path='' \ _mingw32 meson install --destdir $PWD/install -C _mingw32 cp install/bin/pkg-config.exe . zip pkg-config-$VERSION.zip pkg-config.exe ``` Part-of: --- subprojects/win-pkgconfig/download-binary.py | 12 ++++++------ subprojects/win-pkgconfig/meson.build | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/subprojects/win-pkgconfig/download-binary.py b/subprojects/win-pkgconfig/download-binary.py index baca7d6ca8..74beab1dcb 100644 --- a/subprojects/win-pkgconfig/download-binary.py +++ b/subprojects/win-pkgconfig/download-binary.py @@ -14,13 +14,14 @@ ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE -BASENAME = 'pkg-config.zip' -GSTREAMER_URL = 'https://gstreamer.freedesktop.org/src/mirror/pkg-config.zip' +MIRROR_URL = 'https://gstreamer.freedesktop.org/src/mirror/pkg-config/pkg-config-{}.zip' -zip_sha256 = sys.argv[1] +version = sys.argv[1] +zip_sha256 = sys.argv[2] source_dir = os.path.join( os.environ['MESON_SOURCE_ROOT'], os.environ['MESON_SUBDIR']) -dest = BASENAME +url = MIRROR_URL.format(version) +dest = os.path.basename(url) dest_path = os.path.join(source_dir, dest) @@ -39,8 +40,7 @@ if os.path.isfile(dest_path): else: print('{} checksum mismatch, redownloading'.format(dest)) -url = GSTREAMER_URL.format(dest) -print('Downloading {} to {}'.format(GSTREAMER_URL.format(dest), dest)) +print('Downloading {} to {}'.format(url, dest)) try: with open(dest_path, 'wb') as d: f = urllib.request.urlopen(url, context=ctx) diff --git a/subprojects/win-pkgconfig/meson.build b/subprojects/win-pkgconfig/meson.build index b5d64c65ab..99c052895a 100644 --- a/subprojects/win-pkgconfig/meson.build +++ b/subprojects/win-pkgconfig/meson.build @@ -1,4 +1,4 @@ -project('win-pkgconfig', version : '0.28') +project('win-pkgconfig', version : '0.29.2') py3 = import('python3').find_python() @@ -8,9 +8,9 @@ endif message('Downloading pkg-config.exe binary for Windows...') -zip_hash = 'b74be141a53f193727fdcb33e9a052a38d9b79c6262326d264e502796b73dfe1' +zip_hash = '28fe807d3f9ee06e995388aacf7421b5e3fab08a6e24f3f0d6e9a7921b944bc7' -ret = run_command(py3, files('download-binary.py'), zip_hash, check: true) +ret = run_command(py3, files('download-binary.py'), meson.project_version(), zip_hash, check: true) if ret.returncode() != 0 message(ret.stdout()) error(ret.stderr())