diff options
author | 2023-09-09 14:15:51 +0200 | |
---|---|---|
committer | 2023-09-12 00:53:06 +0100 | |
commit | 6e764dd986e19eeb65e440de5b1b8734f5b3adc5 (patch) | |
tree | 13921b666d5091dcaf049a60a412c506b7737535 /dev-util/cmake/files | |
parent | app-misc/yq: drop 3.1.1, 3.2.1 (diff) | |
download | gentoo-6e764dd986e19eeb65e440de5b1b8734f5b3adc5.tar.gz gentoo-6e764dd986e19eeb65e440de5b1b8734f5b3adc5.tar.bz2 gentoo-6e764dd986e19eeb65e440de5b1b8734f5b3adc5.zip |
dev-util/cmake: remove extra whitespaces from pkg-config call
Due to poor parsing cmake adds extra whitespaces to the package name and
package version, breaking pkgconf-2.0.3.
This fixes this incorrect behaviour.
Upstream merge request is at https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8789.
Closes: https://bugs.gentoo.org/913644
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32700
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/cmake/files')
-rw-r--r-- | dev-util/cmake/files/cmake-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dev-util/cmake/files/cmake-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch b/dev-util/cmake/files/cmake-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch new file mode 100644 index 000000000000..9ee8a1c9fcbf --- /dev/null +++ b/dev-util/cmake/files/cmake-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch @@ -0,0 +1,38 @@ +https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8789 + +From d47771bbb96a8435401950fb504b06003ec0babb Mon Sep 17 00:00:00 2001 +From: Paul Zander <negril.nx+gentoo@gmail.com> +Date: Sat, 9 Sep 2023 13:45:19 +0200 +Subject: [PATCH] FindPkgConfig: ignore whitespace separators in version check + +The regex used to split up the version if it contains an operator fails +if the string contains whitespaces. Resulting in an extra whitespace +after the package name and before the package version leading to +breakage in pkgconf and thus webkit-gtk. + +See: +https://github.com/pkgconf/pkgconf/issues/317 +https://bugs.webkit.org/show_bug.cgi?id=261125 +https://bugs.gentoo.org/913644 +--- + Modules/FindPkgConfig.cmake | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake +index 4d29f4505..6e8b78441 100644 +--- a/Modules/FindPkgConfig.cmake ++++ b/Modules/FindPkgConfig.cmake +@@ -563,8 +563,8 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma + foreach (_pkg_check_modules_pkg ${_pkg_check_modules_list}) + set(_pkg_check_modules_exist_query) + +- # check whether version is given +- if (_pkg_check_modules_pkg MATCHES "(.*[^><])(=|[><]=?)(.*)") ++ # check whether version is given while ignoring whitespace ++ if (_pkg_check_modules_pkg MATCHES "(.*[^>< \t])[ \t]*(=|[><]=?)[ \t]*(.*)") + set(_pkg_check_modules_pkg_name "${CMAKE_MATCH_1}") + set(_pkg_check_modules_pkg_op "${CMAKE_MATCH_2}") + set(_pkg_check_modules_pkg_ver "${CMAKE_MATCH_3}") +-- +2.42.0 + |