summaryrefslogtreecommitdiff
path: root/dev-util/cmake
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-12 04:40:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-12 04:40:07 +0100
commit5d5e56d92268c2b9b6ccc38eeaa3516ce9b1e8fd (patch)
tree587e467a631661f0e4786a584d79db3a9eeab5d7 /dev-util/cmake
parentf8399e5cf87087ab3b9f8b1ed2955c0bd5469a9b (diff)
gentoo auto-resync : 12:09:2023 - 04:40:07
Diffstat (limited to 'dev-util/cmake')
-rw-r--r--dev-util/cmake/Manifest2
-rw-r--r--dev-util/cmake/cmake-3.27.4-r1.ebuild291
-rw-r--r--dev-util/cmake/files/cmake-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch38
3 files changed, 331 insertions, 0 deletions
diff --git a/dev-util/cmake/Manifest b/dev-util/cmake/Manifest
index 2ce940e7af3a..b7ac6547be6e 100644
--- a/dev-util/cmake/Manifest
+++ b/dev-util/cmake/Manifest
@@ -11,6 +11,7 @@ AUX cmake-3.27.0_rc1-0003-Prefer-pkgconfig-in-FindBLAS.patch 841 BLAKE2B a22d3d3
AUX cmake-3.27.0_rc1-0004-Ensure-that-the-correct-version-of-Qt-is-always-used.patch 1928 BLAKE2B 846494710a32979cd08e0e8a0e855e4adae288ecc2d7bcde4408e253bfd0ad5bcdd25d429f87b76d641377a70931f6b03b14ce586c99dfe68c4aad1dbf9121cb SHA512 eabc78e3298954064867f3c8cf294224aa2f1a75222d399298996309cd838fe90eff034f96fcb44906be784d57533c2d2330dc39aa6515f586607105d22df8ec
AUX cmake-3.27.0_rc1-0005-Respect-Gentoo-s-Python-eclasses.patch 2339 BLAKE2B d9d1a8326dd9018e5d8138997f0d52eacbd953b6da51e04a1232974a3371c5349c285c5fb8b8e9b3786f4be0f20062ebe19f3a15ed802982bf1c4e95e78220a7 SHA512 06aa209c6057b7f9c0bbdd0086c01adc44bd613d57b97f90811c6ef8e65dfb51a37effe154672067d82ece2fc8f39d488d3f31f97848b150a6a0d1628c435bb4
AUX cmake-3.27.0_rc1-0006-Filter-out-distcc-warnings-to-avoid-confusing-CMake.patch 1207 BLAKE2B 4cd68da953268521965e04810e9b76a97dbc68c6c7e81cb23e0257166886787519122e425991c9bc9c9fd2d4d23a6a221206a8a3edc888adf58b1fe312cea149 SHA512 da5e897e7b8cc0973fb36ad82ac145c3cc790eadd10c1b7283decec67ede42d3ce132b1a71a3daa362941bd24208d9a3923af7331faac93ebda96df6aaf297dc
+AUX cmake-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch 1600 BLAKE2B e2d381c5d81a5d8b5668eab8e1fb31f7c4d489c5900a4102983c1f573d5660c1281af5d8e1bf4d6b55839f609046e0ca6ba9781affe2a66b373833696dc45675 SHA512 c2e04ed6594892fa4a35cd67f0442184be76b5b9248e30cb6f316efccb5861c493e9151edf7ff2d40a03d18a871a612647e10c3b674cfc5dfa9859e5c149c3d3
AUX cmake-3.5.2-FindQt4.patch 1585 BLAKE2B 8cfda84c419515be57f65be7b4b22d7937b656eb7f58d61c7d9e30db9dac36e934f2a529b4ea20d69c5f8a653c727bae34374ebcb7f5017fd70df41abd538164 SHA512 bab8960bfea3c29416bdc8f39c7dee59b89bd7951752401f24eeb9161ac7bc2c6dd200cb62c6b9f964d763b5d257a94d8b04dc7090d6fa947a04f2d0c2e8c479
AUX cmake-3.9.0_rc2-FindPythonInterp.patch 1458 BLAKE2B a70945921738f00952b40a73d9ea26ecc86614aa3f12c94226aac4710dd0b9723c365b6f5def965069a54919bab13a33490facc6c5e64fad69d2e05a97d2812f SHA512 8adcb75cc035f64521e85229eb8dfa1e627326f8e189f66b707b3a0448ed3ae6acf306643026f7cbc7b924edcef73cad7a107d83162b4ca46bd6bbdc7a58af12
AUX cmake.vim 217 BLAKE2B 5d2cf8b4101a7204fd27a9f21d82fea4d86fc4eeed54e062b543452dc574e73d1c80167c83eb482d9eec310950ac811ba35d3eeb97b51958f12f3adf575ddbe7 SHA512 2f7e9e949f8f3030a0dfcef56f4effea703ee60555c22f6a2d1dfeaf3334f33a3e88910c666f704e4ab60cde4ebb509c7d85d812a3c1627010e52fc757f15cdf
@@ -43,6 +44,7 @@ EBUILD cmake-3.27.0-r1.ebuild 8849 BLAKE2B ed6173861ae15105593bf630c3607deb052eb
EBUILD cmake-3.27.1-r1.ebuild 8850 BLAKE2B ed2824ad05508ae192ad1fe569a6d7687f969203681a8fdbe4c11ba0098bd962f46c3e5b5a9a3d7190666db0ee144778d451da9d0ca05e1f96937cae6e0ec5e5 SHA512 d2b68386b06ba232bb340d46c1e9159b314fa4027eaa3efb151db22211148dc608a70fdc4b3690fb1030c9538b929697abb42015e30f2aa1f8d1271c936a2840
EBUILD cmake-3.27.2.ebuild 8850 BLAKE2B ed2824ad05508ae192ad1fe569a6d7687f969203681a8fdbe4c11ba0098bd962f46c3e5b5a9a3d7190666db0ee144778d451da9d0ca05e1f96937cae6e0ec5e5 SHA512 d2b68386b06ba232bb340d46c1e9159b314fa4027eaa3efb151db22211148dc608a70fdc4b3690fb1030c9538b929697abb42015e30f2aa1f8d1271c936a2840
EBUILD cmake-3.27.3-r1.ebuild 8861 BLAKE2B e2a142d9721dc64c1d067d297e67331327a4074cb04a9f18429e2f517967edbff3da7be8327d387515f10a5e32437235f3084a58033b52d8c86da6fc0cf98e1f SHA512 79b678f96b0aae1a30be53c975d97c42b624e5b4d7d20477459d6f548945fb954b6ec1f2629c12ce82ff7739ae2e5dd01d5a1302fade808a19f247e59d824880
+EBUILD cmake-3.27.4-r1.ebuild 9011 BLAKE2B c16ac6b71f644eb646545b0ce775bcf9158a50b4abea1d99f5cd4999d27bd60970bdfd146e2510c88892e806601a52559b32f28021648a726d0056db60cd1679 SHA512 5d425473d8e5f4db781fdc1c92a6303f5881cd8a46144b3fb360d0d73406f0b1c0d5edb1f5e28fdec260ba362ca0df6b6a74e05d4307a8a455086653644a34ab
EBUILD cmake-3.27.4.ebuild 8861 BLAKE2B e2a142d9721dc64c1d067d297e67331327a4074cb04a9f18429e2f517967edbff3da7be8327d387515f10a5e32437235f3084a58033b52d8c86da6fc0cf98e1f SHA512 79b678f96b0aae1a30be53c975d97c42b624e5b4d7d20477459d6f548945fb954b6ec1f2629c12ce82ff7739ae2e5dd01d5a1302fade808a19f247e59d824880
EBUILD cmake-9999.ebuild 8860 BLAKE2B d91222af272d47dd1941eebecd08dd6abd1bea77f7f9f6d81d374ab7d799e4af13f6bb8f213f4eeb42fb8ec913c7eefb995a65c0c661e946916416582a6f0c43 SHA512 09f3fd9cf07aa8f147278394a319eef057d25da09e4e8ff3dc40d5fd1477473c79886c89b641445beac41cfed32407004824eb4295c84f6d44af50a678b2b2d3
MISC metadata.xml 588 BLAKE2B 59754f6dd52986589583b875b48cdfb28f0d22e97fd6cdac9763ed2aa8981c692d81f6cfe73a93f7defde3e58fc0df60fba647760e9f20d00bd8141e4c39055e SHA512 ac463b9402727ba83b276fc206d2ea9101c6edc85142957c9be33bd8841c0396262ceaad545d133a84f6c294b5beee289e84c3226a1aac2d1f041dbfe08c047f
diff --git a/dev-util/cmake/cmake-3.27.4-r1.ebuild b/dev-util/cmake/cmake-3.27.4-r1.ebuild
new file mode 100644
index 000000000000..f89c4e78a7d9
--- /dev/null
+++ b/dev-util/cmake/cmake-3.27.4-r1.ebuild
@@ -0,0 +1,291 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-cmake-docs
+# Set to 1 if prebuilt, 0 if not
+# (the construct below is to allow overriding from env for script)
+: ${CMAKE_DOCS_PREBUILT:=1}
+
+CMAKE_DOCS_PREBUILT_DEV=sam
+#CMAKE_DOCS_VERSION=$(ver_cut 1-3)
+CMAKE_DOCS_VERSION=3.27.0
+# Default to generating docs (inc. man pages) if no prebuilt; overridden later
+# See bug #784815
+CMAKE_DOCS_USEFLAG="+doc"
+
+# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
+# ... but seems fine as of 3.22.3?
+# TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759.
+CMAKE_MAKEFILE_GENERATOR="emake"
+CMAKE_REMOVE_MODULES_LIST=( none )
+inherit bash-completion-r1 cmake elisp-common flag-o-matic multiprocessing \
+ toolchain-funcs virtualx xdg-utils
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="Cross platform Make"
+HOMEPAGE="https://cmake.org/"
+if [[ ${PV} == 9999 ]] ; then
+ CMAKE_DOCS_PREBUILT=0
+
+ EGIT_REPO_URI="https://gitlab.kitware.com/cmake/cmake.git"
+ inherit git-r3
+else
+ SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz"
+
+ if [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then
+ SRC_URI+=" !doc? ( https://dev.gentoo.org/~${CMAKE_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${CMAKE_DOCS_VERSION}-docs.tar.xz )"
+ fi
+
+ if [[ ${PV} != *_rc* ]] ; then
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bradking.asc
+ inherit verify-sig
+
+ SRC_URI+=" verify-sig? (
+ https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt
+ https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt.asc
+ )"
+
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+
+ BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-bradking-20230817 )"
+ fi
+fi
+
+[[ ${CMAKE_DOCS_PREBUILT} == 1 ]] && CMAKE_DOCS_USEFLAG="doc"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="${CMAKE_DOCS_USEFLAG} dap emacs ncurses qt5 test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=app-arch/libarchive-3.3.3:=
+ app-crypt/rhash:0=
+ >=dev-libs/expat-2.0.1
+ >=dev-libs/jsoncpp-1.9.2-r2:0=
+ >=dev-libs/libuv-1.10.0:=
+ >=net-misc/curl-7.21.5[ssl]
+ sys-libs/zlib
+ virtual/pkgconfig
+ dap? ( dev-cpp/cppdap )
+ emacs? ( >=app-editors/emacs-23.1:* )
+ ncurses? ( sys-libs/ncurses:0= )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND+="
+ doc? (
+ dev-python/requests
+ dev-python/sphinx
+ )
+ test? ( app-arch/libarchive[zstd] )
+"
+
+SITEFILE="50${PN}-gentoo.el"
+
+PATCHES=(
+ # Prefix
+ "${FILESDIR}"/${PN}-3.27.0_rc1-0001-Don-t-use-.so-for-modules-on-darwin-macos.-Use-.bund.patch
+ "${FILESDIR}"/${PN}-3.27.0_rc1-0002-Set-some-proper-paths-to-make-cmake-find-our-tools.patch
+ # Misc
+ "${FILESDIR}"/${PN}-3.27.0_rc1-0003-Prefer-pkgconfig-in-FindBLAS.patch
+ "${FILESDIR}"/${PN}-3.27.0_rc1-0004-Ensure-that-the-correct-version-of-Qt-is-always-used.patch
+ "${FILESDIR}"/${PN}-3.27.0_rc1-0005-Respect-Gentoo-s-Python-eclasses.patch
+ "${FILESDIR}"/${PN}-3.27.0_rc1-0006-Filter-out-distcc-warnings-to-avoid-confusing-CMake.patch
+ # pkgconf
+ # fixes https://github.com/pkgconf/pkgconf/issues/317
+ "${FILESDIR}/${P}-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch"
+
+ # Upstream fixes (can usually be removed with a version bump)
+)
+
+cmake_src_bootstrap() {
+ # disable running of cmake in bootstrap command
+ sed -i \
+ -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
+ bootstrap || die "sed failed"
+
+ # execinfo.h on Solaris isn't quite what it is on Darwin
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ sed -i -e 's/execinfo\.h/blablabla.h/' \
+ Source/kwsys/CMakeLists.txt || die
+ fi
+
+ # bootstrap script isn't exactly /bin/sh compatible
+ tc-env_build ${CONFIG_SHELL:-sh} ./bootstrap \
+ --prefix="${T}/cmakestrap/" \
+ --parallel=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") \
+ || die "Bootstrap failed"
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ elif [[ ${PV} == *_rc* ]] || ! use verify-sig ; then
+ default
+ else
+ cd "${DISTDIR}" || die
+
+ # See https://mgorny.pl/articles/verify-sig-by-example.html#verifying-using-a-checksum-file-with-a-detached-signature
+ verify-sig_verify_detached ${MY_P}-SHA-256.txt{,.asc}
+ verify-sig_verify_unsigned_checksums ${MY_P}-SHA-256.txt sha256 ${MY_P}.tar.gz
+
+ cd "${WORKDIR}" || die
+
+ default
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # Disable Xcode hooks, bug #652134
+ sed -i -e 's/cm\(\|Global\|Local\)XCode[^.]\+\.\(cxx\|h\)//' \
+ Source/CMakeLists.txt || die
+ sed -i -e '/define CMAKE_USE_XCODE/s/XCODE/NO_XCODE/' \
+ -e '/cmGlobalXCodeGenerator.h/d' \
+ Source/cmake.cxx || die
+
+ # Disable isysroot usage with GCC, we've properly instructed
+ # where things are via GCC configuration and ldwrapper
+ sed -i -e '/cmake_gnu_set_sysroot_flag/d' \
+ Modules/Platform/Apple-GNU-*.cmake || die
+ # Disable isysroot usage with clang as well
+ sed -i -e '/_SYSROOT_FLAG/d' \
+ Modules/Platform/Apple-Clang.cmake || die
+ # Don't set a POSIX standard, system headers don't like that, #757426
+ sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
+ Source/cmLoadCommandCommand.cxx \
+ Source/cmStandardLexer.h \
+ Source/cmSystemTools.cxx \
+ Source/cmTimestamp.cxx
+ sed -i -e 's/^#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
+ Source/cmStandardLexer.h
+ fi
+
+ # Add gcc libs to the default link paths
+ sed -i \
+ -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
+ -e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \
+ -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
+ Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
+
+ if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then
+ CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
+ cmake_src_bootstrap
+ fi
+}
+
+src_configure() {
+ # Fix linking on Solaris
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl
+
+ # ODR warnings, bug #858335
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/20740
+ filter-lto
+
+ local mycmakeargs=(
+ -DCMAKE_USE_SYSTEM_LIBRARIES=ON
+ -DCMake_ENABLE_DEBUGGER=$(usex dap)
+ -DCMAKE_DOC_DIR=/share/doc/${PF}
+ -DCMAKE_MAN_DIR=/share/man
+ -DCMAKE_DATA_DIR=/share/${PN}
+ -DSPHINX_MAN=$(usex doc)
+ -DSPHINX_HTML=$(usex doc)
+ -DBUILD_CursesDialog="$(usex ncurses)"
+ -DBUILD_TESTING=$(usex test)
+ )
+ use qt5 && mycmakeargs+=( -DBUILD_QtDialog=ON )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ use emacs && elisp-compile Auxiliary/cmake-mode.el
+}
+
+src_test() {
+ # Fix OutDir and SelectLibraryConfigurations tests
+ # these are altered thanks to our eclass
+ sed -i -e 's:^#_cmake_modify_IGNORE ::g' \
+ "${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
+ || die
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+
+ # Excluded tests:
+ # BootstrapTest: we actualy bootstrap it every time so why test it.
+ # BundleUtilities: bundle creation broken
+ # CMakeOnly.AllFindModules: pthread issues
+ # CTest.updatecvs: which fails to commit as root
+ # Fortran: requires fortran
+ # RunCMake.CompilerLauncher: also requires fortran
+ # RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
+ # debugedit binary is not in the expected location
+ # RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because
+ # it can't find a deb package that owns libc
+ # TestUpload, which requires network access
+ # RunCMake.CMP0125, known failure reported upstream (bug #829414)
+ local myctestargs=(
+ --output-on-failure
+ -E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.CPack_(DEB|RPM)|TestUpload|RunCMake.CMP0125)" \
+ )
+
+ virtx cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+
+ # If USE=doc, there'll be newly generated docs which we install instead.
+ if ! use doc && [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then
+ doman "${WORKDIR}"/${PN}-${CMAKE_DOCS_VERSION}-docs/man*/*.[0-8]
+ fi
+
+ if use emacs; then
+ elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ insinto /usr/share/vim/vimfiles/syntax
+ doins Auxiliary/vim/syntax/cmake.vim
+
+ insinto /usr/share/vim/vimfiles/indent
+ doins Auxiliary/vim/indent/cmake.vim
+
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins "${FILESDIR}/${PN}.vim"
+
+ dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+
+ if use qt5; then
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+
+ if use qt5; then
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ fi
+}
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
+