-
Notifications
You must be signed in to change notification settings - Fork 514
Test updated glib vcpkg library #6890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| diff --git a/meson.build b/meson.build | ||
| index 5677fa8..6407c64 100644 | ||
| --- a/meson.build | ||
| +++ b/meson.build | ||
| @@ -2307,8 +2307,9 @@ endif | ||
| # implementations. This could be extended if issues are found in some platforms. | ||
| libintl_deps = [] | ||
| libintl_prefix = '#include <libintl.h>' | ||
| -libintl = dependency('intl', required: false) | ||
| -if libintl.found() and libintl.type_name() != 'internal' | ||
| +libintl = dependency('intl', required : true) | ||
| +libintl_deps = [libintl] | ||
| +if false | ||
| # libintl supports different threading APIs, which may not | ||
| # require additional flags, but it defaults to using pthreads if | ||
| # found. Meson's "threads" dependency does not allow you to | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,163 @@ | ||||||
| string(REGEX MATCH "^([0-9]*[.][0-9]*)" VERSION_MAJOR_MINOR "${VERSION}") | ||||||
| # https://github.com/GNOME/glib/blob/main/SECURITY.md#supported-versions | ||||||
| if(NOT VERSION_MAJOR_MINOR MATCHES "[02468]\$") | ||||||
| message("${Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL}" "glib ${VERSION_MAJOR_MINOR} is a not a \"stable release series\".") | ||||||
|
||||||
| message("${Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL}" "glib ${VERSION_MAJOR_MINOR} is a not a \"stable release series\".") | |
| message("${Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL}" "glib ${VERSION_MAJOR_MINOR} is not a \"stable release series\".") |
Copilot
AI
Feb 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing the embedded absolute path with a hard-coded non-existent path (unuseable/share) risks breaking gdbus-codegen at runtime if that branch is executed. Instead, adjust the script to compute the correct share directory relative to its installed location (e.g., relative to the tools directory) rather than forcing an invalid fallback. (Also, if you keep a placeholder, the word appears misspelled.)
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,28 @@ | ||||||||||||||||||||||
| diff --git a/glib/gconvert.c b/glib/gconvert.c | ||||||||||||||||||||||
| index 53b2065..3e29bee 100644 | ||||||||||||||||||||||
| --- a/glib/gconvert.c | ||||||||||||||||||||||
| +++ b/glib/gconvert.c | ||||||||||||||||||||||
| @@ -33,7 +33,8 @@ | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| #ifdef G_OS_WIN32 | ||||||||||||||||||||||
| #include <windows.h> | ||||||||||||||||||||||
| -#include "win_iconv.c" | ||||||||||||||||||||||
| +#define USE_LIBICONV_GNU | ||||||||||||||||||||||
| +#include <iconv.h> | ||||||||||||||||||||||
| #endif | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| #include "gconvert.h" | ||||||||||||||||||||||
| diff --git a/meson.build b/meson.build | ||||||||||||||||||||||
| index f30ca58..5677fa8 100644 | ||||||||||||||||||||||
| --- a/meson.build | ||||||||||||||||||||||
| +++ b/meson.build | ||||||||||||||||||||||
| @@ -2233,7 +2233,8 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack) | ||||||||||||||||||||||
| if host_system == 'windows' | ||||||||||||||||||||||
| # We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need | ||||||||||||||||||||||
| # any external library for it | ||||||||||||||||||||||
| - libiconv = [] | ||||||||||||||||||||||
| + libiconv = [cc.find_library('iconv')] | ||||||||||||||||||||||
| + found_iconv = true | ||||||||||||||||||||||
|
Comment on lines
+21
to
+25
|
||||||||||||||||||||||
| # We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need | |
| # any external library for it | |
| - libiconv = [] | |
| + libiconv = [cc.find_library('iconv')] | |
| + found_iconv = true | |
| # Use external libiconv on Windows | |
| # Make iconv a required dependency so the build fails if it's missing | |
| - libiconv = [] | |
| + libiconv = cc.find_library('iconv', required : true) | |
| + found_iconv = libiconv.found() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "name": "glib", | ||
| "version": "2.86.4", | ||
| "description": "Portable, general-purpose utility library.", | ||
| "homepage": "https://developer.gnome.org/glib/", | ||
| "license": "LGPL-2.1-or-later", | ||
| "supports": "!uwp & !xbox", | ||
| "dependencies": [ | ||
| "dirent", | ||
| { | ||
| "name": "gettext", | ||
| "host": true, | ||
| "default-features": false, | ||
| "features": [ | ||
| "tools" | ||
| ] | ||
| }, | ||
| "gettext-libintl", | ||
| "libffi", | ||
| "libiconv", | ||
| "pcre2", | ||
| { | ||
| "name": "vcpkg-tool-meson", | ||
| "host": true | ||
| }, | ||
| "zlib" | ||
| ], | ||
| "features": { | ||
| "libmount": { | ||
| "description": "Build with libmount support.", | ||
| "supports": "linux", | ||
| "dependencies": [ | ||
| "libmount" | ||
| ] | ||
| }, | ||
| "selinux": { | ||
| "description": "Build with selinux support.", | ||
| "supports": "linux" | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
if falseto disable a block leaves dead code in the patched Meson file, making the port harder to maintain/debug when upstream changes. Instead of hard-disabling the block, prefer either removing the unreachable block in the patch or replacing it with a meaningful condition (e.g., driven bylibintl.type_name()or platform/toolchain constraints) that documents when the logic should apply.