Tuesday, October 05, 2021

UPDATE: devel/cmake

Update CMake to the latest version. The diff below is currently in an
amd64 bulk. More and other bulks/tests are welcome.

Rafael

diff --git a/devel/cmake/Makefile b/devel/cmake/Makefile
index 51227096bb2..a747682c334 100644
--- a/devel/cmake/Makefile
+++ b/devel/cmake/Makefile
@@ -4,15 +4,16 @@ DPB_PROPERTIES = parallel

COMMENT = portable build system

-VER = 3.20.3
+V = 3.21.3
EPOCH = 0
-DISTNAME = cmake-${VER}
+DISTNAME = cmake-${V}
CATEGORIES = devel
-REVISION = 0

HOMEPAGE = https://www.cmake.org/

-MASTER_SITES = https://www.cmake.org/files/v${VER:R}/
+MAINTAINER = Rafael Sadowski <rsadowski@openbsd.org>
+
+MASTER_SITES = https://www.cmake.org/files/v${V:R}/

# BSD
PERMIT_PACKAGE = Yes
diff --git a/devel/cmake/distinfo b/devel/cmake/distinfo
index b1a80390a39..dacdef1a235 100644
--- a/devel/cmake/distinfo
+++ b/devel/cmake/distinfo
@@ -1,2 +1,2 @@
-SHA256 (cmake-3.20.3.tar.gz) = TQCKw0YeJx/PrCagWTb3f8erZEAhVvs3HUEoSFGmUbg=
-SIZE (cmake-3.20.3.tar.gz) = 9440009
+SHA256 (cmake-3.21.3.tar.gz) = 0U0G30JlE07kLE1Q9aYMuLRxt7akfajl2RTUndeDeU8=
+SIZE (cmake-3.21.3.tar.gz) = 9630442
diff --git a/devel/cmake/patches/patch-Source_cmComputeLinkInformation_cxx b/devel/cmake/patches/patch-Source_cmComputeLinkInformation_cxx
index 42a93134dec..74f8e81d78e 100644
--- a/devel/cmake/patches/patch-Source_cmComputeLinkInformation_cxx
+++ b/devel/cmake/patches/patch-Source_cmComputeLinkInformation_cxx
@@ -2,7 +2,7 @@ $OpenBSD: patch-Source_cmComputeLinkInformation_cxx,v 1.27 2021/05/09 14:46:15 r
Index: Source/cmComputeLinkInformation.cxx
--- Source/cmComputeLinkInformation.cxx.orig
+++ Source/cmComputeLinkInformation.cxx
-@@ -371,8 +371,9 @@ cmComputeLinkInformation::cmComputeLinkInformation(
+@@ -378,8 +378,9 @@ cmComputeLinkInformation::cmComputeLinkInformation(
this->OrderRuntimeSearchPath->AddUserDirectories(directories);

// Set up the implicit link directories.
@@ -13,15 +13,13 @@ Index: Source/cmComputeLinkInformation.cxx
this->OrderRuntimeSearchPath->SetImplicitDirectories(this->ImplicitLinkDirs);
if (this->OrderDependentRPath) {
this->OrderDependentRPath->SetImplicitDirectories(this->ImplicitLinkDirs);
-@@ -488,6 +489,7 @@ cmComputeLinkInformation::GetSharedLibrariesLinked() c
+@@ -516,16 +517,25 @@ bool cmComputeLinkInformation::Compute()
+ cld.SetOldLinkDirMode(this->OldLinkDirMode);
+ cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();

- bool cmComputeLinkInformation::Compute()
- {
+ bool use_wxneeded = false;
- // Skip targets that do not link.
- if (!(this->Target->GetType() == cmStateEnums::EXECUTABLE ||
- this->Target->GetType() == cmStateEnums::SHARED_LIBRARY ||
-@@ -514,10 +516,17 @@ bool cmComputeLinkInformation::Compute()
+ // Add the link line items.
+ for (cmComputeLinkDepends::LinkEntry const& linkEntry : linkEntries) {
if (linkEntry.IsSharedDep) {
this->AddSharedDepItem(linkEntry.Item, linkEntry.Target);
} else {
@@ -29,51 +27,34 @@ Index: Source/cmComputeLinkInformation.cxx
+ transform(litem_tolower.begin(), litem_tolower.end(), litem_tolower.begin(), ::tolower);
+ if (litem_tolower.find("webkit") != std::string::npos || litem_tolower.find("webengine") != std::string::npos)
+ use_wxneeded = true;
- this->AddItem(linkEntry.Item, linkEntry.Target);
+ this->AddItem(linkEntry.Item, linkEntry.Target,
+ linkEntry.IsObject ? ItemIsObject::Yes : ItemIsObject::No);
}
}

+ if (use_wxneeded == true)
+ this->AddUserItem(std::string("-Wl,-z,wxneeded"), false);
++
+
// Restore the target link type so the correct system runtime
// libraries are found.
cmProp lss = this->Target->GetProperty("LINK_SEARCH_END_STATIC");
-@@ -713,10 +722,16 @@ void cmComputeLinkInformation::AddItem(BT<std::string>
- // This is a directory.
- this->DropDirectoryItem(item.Value);
- } else {
-- // Use the full path given to the library file.
- this->Depends.push_back(item.Value);
-- this->AddFullItem(item);
-- this->AddLibraryRuntimeInfo(item.Value);
-+ if (!this->OpenBSD) {
-+ // Use the full path given to the library file.
-+ this->AddFullItem(item);
-+ this->AddLibraryRuntimeInfo(item.Value);
-+ } else {
-+ std::string file = cmSystemTools::GetFilenameName(item.Value);
-+ this->AddUserItem(file, false);
-+ this->OrderLinkerSearchPath->AddLinkLibrary(item.Value);
-+ }
- }
- } else {
- // This is a library or option specified by the user.
-@@ -1049,11 +1064,18 @@ void cmComputeLinkInformation::AddTargetItem(BT<std::s
+@@ -1078,11 +1088,18 @@ void cmComputeLinkInformation::AddTargetItem(BT<std::s
this->SharedLibrariesLinked.insert(target);
}

+- // Handle case of an imported shared library with no soname.
+- if (this->NoSONameUsesPath &&
+- target->IsImportedSharedLibWithoutSOName(this->Config)) {
+- this->AddSharedLibNoSOName(item.Value);
+- return;
+ if (this->OpenBSD) {
+ if (target->GetType() == cmStateEnums::SHARED_LIBRARY) {
+ this->AddSharedLibNoSOName(item.Value);
+ return;
+ }
+ } else {
- // Handle case of an imported shared library with no soname.
-- if (this->NoSONameUsesPath &&
-- target->IsImportedSharedLibWithoutSOName(this->Config)) {
-- this->AddSharedLibNoSOName(item.Value);
-- return;
++ // Handle case of an imported shared library with no soname.
+ if (this->NoSONameUsesPath &&
+ target->IsImportedSharedLibWithoutSOName(this->Config)) {
+ this->AddSharedLibNoSOName(item.Value);
@@ -82,10 +63,10 @@ Index: Source/cmComputeLinkInformation.cxx
}

// For compatibility with CMake 2.4 include the item's directory in
-@@ -1066,6 +1088,27 @@ void cmComputeLinkInformation::AddTargetItem(BT<std::s
+@@ -1095,6 +1112,27 @@ void cmComputeLinkInformation::AddTargetItem(BT<std::s

// Now add the full path to the library.
- this->Items.emplace_back(item, true, target);
+ this->Items.emplace_back(item, ItemIsPath::Yes, ItemIsObject::No, target);
+}
+
+void cmComputeLinkInformation::LoadImplicitLinkInfoOpenBSD()
@@ -109,4 +90,4 @@ Index: Source/cmComputeLinkInformation.cxx
+ }
}

- void cmComputeLinkInformation::AddFullItem(BT<std::string> const& item)
+ void cmComputeLinkInformation::AddFullItem(BT<std::string> const& item,
diff --git a/devel/cmake/patches/patch-Source_cmComputeLinkInformation_h b/devel/cmake/patches/patch-Source_cmComputeLinkInformation_h
index 2de3d167c23..494d56de487 100644
--- a/devel/cmake/patches/patch-Source_cmComputeLinkInformation_h
+++ b/devel/cmake/patches/patch-Source_cmComputeLinkInformation_h
@@ -3,7 +3,7 @@ $OpenBSD: patch-Source_cmComputeLinkInformation_h,v 1.7 2020/12/30 07:17:34 rsad
Index: Source/cmComputeLinkInformation.h
--- Source/cmComputeLinkInformation.h.orig
+++ Source/cmComputeLinkInformation.h
-@@ -175,6 +175,7 @@ class cmComputeLinkInformation (private)
+@@ -204,6 +204,7 @@ class cmComputeLinkInformation (private)

// Implicit link libraries and directories for linker language.
void LoadImplicitLinkInfo();
diff --git a/devel/cmake/patches/patch-Source_cmGeneratorTarget_cxx b/devel/cmake/patches/patch-Source_cmGeneratorTarget_cxx
index 14a878c0d42..19336c36f06 100644
--- a/devel/cmake/patches/patch-Source_cmGeneratorTarget_cxx
+++ b/devel/cmake/patches/patch-Source_cmGeneratorTarget_cxx
@@ -3,7 +3,7 @@ $OpenBSD: patch-Source_cmGeneratorTarget_cxx,v 1.16 2021/05/09 14:46:15 rsadowsk
Index: Source/cmGeneratorTarget.cxx
--- Source/cmGeneratorTarget.cxx.orig
+++ Source/cmGeneratorTarget.cxx
-@@ -4810,9 +4810,14 @@ cmGeneratorTarget::Names cmGeneratorTarget::GetLibrary
+@@ -4926,9 +4926,14 @@ cmGeneratorTarget::Names cmGeneratorTarget::GetLibrary
// Check for library version properties.
cmProp version = this->GetProperty("VERSION");
cmProp soversion = this->GetProperty("SOVERSION");
@@ -18,7 +18,7 @@ Index: Source/cmGeneratorTarget.cxx
// Versioning is supported only for shared libraries and modules,
// and then only when the platform supports an soname flag.
version = nullptr;
-@@ -4836,6 +4841,36 @@ cmGeneratorTarget::Names cmGeneratorTarget::GetLibrary
+@@ -4952,6 +4957,36 @@ cmGeneratorTarget::Names cmGeneratorTarget::GetLibrary

// The library name.
targetNames.Output = prefix + targetNames.Base + suffix;
diff --git a/devel/cmake/patches/patch-Source_cmGlobalGenerator_cxx b/devel/cmake/patches/patch-Source_cmGlobalGenerator_cxx
index 3902cafa905..21f1a6e554e 100644
--- a/devel/cmake/patches/patch-Source_cmGlobalGenerator_cxx
+++ b/devel/cmake/patches/patch-Source_cmGlobalGenerator_cxx
@@ -3,7 +3,7 @@ $OpenBSD: patch-Source_cmGlobalGenerator_cxx,v 1.16 2021/05/09 14:46:15 rsadowsk
Index: Source/cmGlobalGenerator.cxx
--- Source/cmGlobalGenerator.cxx.orig
+++ Source/cmGlobalGenerator.cxx
-@@ -2601,6 +2601,9 @@ void cmGlobalGenerator::AddGlobalTarget_Test(
+@@ -2607,6 +2607,9 @@ void cmGlobalGenerator::AddGlobalTarget_Test(
cmCustomCommandLine singleLine;
singleLine.push_back(cmSystemTools::GetCTestCommand());
singleLine.push_back("--force-new-ctest-process");
diff --git a/devel/cmake/patches/patch-Source_cmInstallCommand_cxx b/devel/cmake/patches/patch-Source_cmInstallCommand_cxx
index 4540529cd50..b23aca9821e 100644
--- a/devel/cmake/patches/patch-Source_cmInstallCommand_cxx
+++ b/devel/cmake/patches/patch-Source_cmInstallCommand_cxx
@@ -2,7 +2,7 @@ $OpenBSD: patch-Source_cmInstallCommand_cxx,v 1.18 2021/05/09 14:46:15 rsadowski
Index: Source/cmInstallCommand.cxx
--- Source/cmInstallCommand.cxx.orig
+++ Source/cmInstallCommand.cxx
-@@ -393,6 +393,9 @@ bool HandleTargetsMode(std::vector<std::string> const&
+@@ -581,6 +581,9 @@ bool HandleTargetsMode(std::vector<std::string> const&
}

// Select the mode for installing symlinks to versioned shared libraries.
@@ -12,7 +12,7 @@ Index: Source/cmInstallCommand.cxx
cmInstallTargetGenerator::NamelinkModeType namelinkMode =
cmInstallTargetGenerator::NamelinkModeNone;
if (libraryArgs.GetNamelinkOnly()) {
-@@ -400,6 +403,10 @@ bool HandleTargetsMode(std::vector<std::string> const&
+@@ -588,6 +591,10 @@ bool HandleTargetsMode(std::vector<std::string> const&
} else if (libraryArgs.GetNamelinkSkip()) {
namelinkMode = cmInstallTargetGenerator::NamelinkModeSkip;
}
diff --git a/devel/cmake/patches/patch-Source_cmMessenger_cxx b/devel/cmake/patches/patch-Source_cmMessenger_cxx
index ec28ba769c3..f1716b227ef 100644
--- a/devel/cmake/patches/patch-Source_cmMessenger_cxx
+++ b/devel/cmake/patches/patch-Source_cmMessenger_cxx
@@ -2,7 +2,7 @@ $OpenBSD: patch-Source_cmMessenger_cxx,v 1.3 2020/01/11 08:01:09 rsadowski Exp $
Index: Source/cmMessenger.cxx
--- Source/cmMessenger.cxx.orig
+++ Source/cmMessenger.cxx
-@@ -67,7 +67,7 @@ static bool printMessagePreamble(MessageType t, std::o
+@@ -70,7 +70,7 @@ static bool printMessagePreamble(MessageType t, std::o
if (t == MessageType::FATAL_ERROR) {
msg << "CMake Error";
} else if (t == MessageType::INTERNAL_ERROR) {
@@ -11,7 +11,7 @@ Index: Source/cmMessenger.cxx
} else if (t == MessageType::LOG) {
msg << "CMake Debug Log";
} else if (t == MessageType::DEPRECATION_ERROR) {
-@@ -105,19 +105,6 @@ void displayMessage(MessageType t, std::ostringstream&
+@@ -123,19 +123,6 @@ void displayMessage(MessageType t, std::ostringstream&

// Add a terminating blank line.
msg << "\n";
@@ -30,4 +30,4 @@ Index: Source/cmMessenger.cxx
-

No comments:

Post a Comment