From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E8A971382C5 for ; Sat, 12 Dec 2020 18:02:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 652DEE09ED; Sat, 12 Dec 2020 18:02:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4AE0EE09ED for ; Sat, 12 Dec 2020 18:02:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EB10B340EFA for ; Sat, 12 Dec 2020 18:02:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DB0BF487 for ; Sat, 12 Dec 2020 18:02:46 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1607795903.814b6b0d056d858c629720ca1a97400688d2542f.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cmake/files/, dev-util/cmake/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/cmake/cmake-3.19.1-r1.ebuild dev-util/cmake/files/cmake-3.19.1-use-FPHSA-outside-find_package.patch X-VCS-Directories: dev-util/cmake/ dev-util/cmake/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 814b6b0d056d858c629720ca1a97400688d2542f X-VCS-Branch: master Date: Sat, 12 Dec 2020 18:02:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2abf29d5-1305-4231-a702-15d6cd357b38 X-Archives-Hash: fdfd7eb984aa0c21beed84f30787e944 commit: 814b6b0d056d858c629720ca1a97400688d2542f Author: Adrian Grigo yahoo com au> AuthorDate: Tue Dec 8 03:19:22 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Dec 12 17:58:23 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=814b6b0d dev-util/cmake: Backport FPHSA fix Changes to Find Package Handle Standard Args in 3.19.0 result in an error when compiling openvdb-7.1.0. This is a known problem in cmake and the fix has been merged into 3.19.2 upstream. See https://gitlab.kitware.com/cmake/cmake/-/issues/21505 To produce the bug: emerge dev-util/cmake-3.19.0 or 3.19.1 (the bug not exist in <= 3.18) emerge media-gfx/openvdb-7.1.0-r1 Compilation fails with find_package_check_version(): Cannot be used outside a 'Find Module' To fix the bug: Apply the patch provided in this bug fix to cmake, then repeat the above steps and compilation of openvdb succeeds. The patch ensures that the CMAKE_FPHSA_PACKAGE_NAME package is made available outside find_package. Thanks to Dennis Schridde for finding the upstream fix, produced by Marc Chevrier. * committer-comment: use Gentoo bug ref; git format-patch 14ecf9c2f Signed-off-by: Adrian Grigo yahoo.com.au> Closes: https://bugs.gentoo.org/755743 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Closes: https://github.com/gentoo/gentoo/pull/18560 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-util/cmake/cmake-3.19.1-r1.ebuild | 1 + ...ake-3.19.1-use-FPHSA-outside-find_package.patch | 40 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/dev-util/cmake/cmake-3.19.1-r1.ebuild b/dev-util/cmake/cmake-3.19.1-r1.ebuild index 97f173f95a8..2726694149e 100644 --- a/dev-util/cmake/cmake-3.19.1-r1.ebuild +++ b/dev-util/cmake/cmake-3.19.1-r1.ebuild @@ -70,6 +70,7 @@ PATCHES=( # upstream fixes (can usually be removed with a version bump) "${FILESDIR}"/${P}-fix-spurious-include-target.patch # bug 759271 + "${FILESDIR}"/${P}-use-FPHSA-outside-find_package.patch # bug 755743 ) cmake_src_bootstrap() { diff --git a/dev-util/cmake/files/cmake-3.19.1-use-FPHSA-outside-find_package.patch b/dev-util/cmake/files/cmake-3.19.1-use-FPHSA-outside-find_package.patch new file mode 100644 index 00000000000..8cde769ce8f --- /dev/null +++ b/dev-util/cmake/files/cmake-3.19.1-use-FPHSA-outside-find_package.patch @@ -0,0 +1,40 @@ +From 14ecf9c2f6edfae4033d9311f79d79d0d07fc1cf Mon Sep 17 00:00:00 2001 +From: Marc Chevrier +Date: Wed, 25 Nov 2020 16:36:12 +0100 +Subject: [PATCH] FPHSA: ensure it can be used outside 'find_package' + +Fixes: #21505 +--- + Modules/FindPackageHandleStandardArgs.cmake | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake +index 7af017136d..7e172779e4 100644 +--- a/Modules/FindPackageHandleStandardArgs.cmake ++++ b/Modules/FindPackageHandleStandardArgs.cmake +@@ -275,8 +275,10 @@ function(FIND_PACKAGE_CHECK_VERSION version result) + unset (${FPCV_RESULT_MESSAGE_VARIABLE} PARENT_SCOPE) + endif() + +- if (CMAKE_FIND_PACKAGE_NAME) +- set (package ${CMAKE_FIND_PACKAGE_NAME}) ++ if (_CMAKE_FPHSA_PACKAGE_NAME) ++ set (package "${_CMAKE_FPHSA_PACKAGE_NAME}") ++ elseif (CMAKE_FIND_PACKAGE_NAME) ++ set (package "${CMAKE_FIND_PACKAGE_NAME}") + else() + message (FATAL_ERROR "find_package_check_version(): Cannot be used outside a 'Find Module'") + endif() +@@ -436,6 +438,9 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) + "will be used.") + endif() + ++ # to propagate package name to FIND_PACKAGE_CHECK_VERSION ++ set(_CMAKE_FPHSA_PACKAGE_NAME "${_NAME}") ++ + # now that we collected all arguments, process them + + if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG") +-- +GitLab +