From owner-dev-commits-ports-all@freebsd.org Tue Sep 21 09:27:26 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A49666EBE8; Tue, 21 Sep 2021 09:27:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HDGKn6s50z3r7W; Tue, 21 Sep 2021 09:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB637216C1; Tue, 21 Sep 2021 09:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18L9RPld086619; Tue, 21 Sep 2021 09:27:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18L9RPSJ086618; Tue, 21 Sep 2021 09:27:25 GMT (envelope-from git) Date: Tue, 21 Sep 2021 09:27:25 GMT Message-Id: <202109210927.18L9RPSJ086618@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Adriaan de Groot Subject: git: aeb5f9cf181c - main - devel/cmake: fix CPack .pkg support, jump to 3.21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adridg X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aeb5f9cf181c597d6c2c5fcb0497b2bce116896f Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2021 09:27:26 -0000 The branch main has been updated by adridg: URL: https://cgit.FreeBSD.org/ports/commit/?id=aeb5f9cf181c597d6c2c5fcb0497b2bce116896f commit aeb5f9cf181c597d6c2c5fcb0497b2bce116896f Author: Adriaan de Groot AuthorDate: 2021-09-21 09:16:05 +0000 Commit: Adriaan de Groot CommitDate: 2021-09-21 09:27:23 +0000 devel/cmake: fix CPack .pkg support, jump to 3.21.3 Update the patch for FreeBSD .pkg support in CPack to handle libpkg 1.17 and later's use of .pkg as package-suffix rather than .tgz. The PR below refers to this fix. I've kept code for older libpkg in case there are systems with weirdly mismatched current CMake and last-quarter's libpkg. The patch is still being upstreamed. The PR mentioned below is for this fix. While here, update to 3.21.3. I've decided to -- unusual, for sure -- bump CMake without the usual exp-run, because: A regression in CMake 3.21.2 prompted a quick release of 3.21.3 from upstream. The regression applies to the AMD ROCm platform, so that's not us. Other fixes in 3.21.3 apply to supported MSVC versions -- again, not us. There is new support for Boost 1.77 -- not in our ports yet. In other words, the git diff on CMake sources does not show anything that could affect us (famous last words). Release notes are at https://cmake.org/cmake/help/v3.21/release/3.21.html#id3 PR: 257615 Reported by: Peter Laursen --- devel/cmake-doc/Makefile | 2 +- devel/cmake-gui/Makefile | 2 +- devel/cmake/Makefile | 2 +- devel/cmake/distinfo | 6 +-- devel/cmake/files/patch-cmake-issue-18031 | 64 +++++++++++++++++++++++-------- devel/cmake/pkg-plist | 10 ----- 6 files changed, 53 insertions(+), 33 deletions(-) diff --git a/devel/cmake-doc/Makefile b/devel/cmake-doc/Makefile index 690dab27afb3..7ccd22f540d4 100644 --- a/devel/cmake-doc/Makefile +++ b/devel/cmake-doc/Makefile @@ -1,5 +1,5 @@ PORTNAME= cmake -DISTVERSION= 3.21.2 +DISTVERSION= 3.21.3 CATEGORIES= devel MASTER_SITES= https://www.cmake.org/files/v${PORTVERSION:R}/ PKGNAMESUFFIX= -doc diff --git a/devel/cmake-gui/Makefile b/devel/cmake-gui/Makefile index 360f30c71b7f..ee63aa5b37f7 100644 --- a/devel/cmake-gui/Makefile +++ b/devel/cmake-gui/Makefile @@ -1,5 +1,5 @@ PORTNAME= cmake -DISTVERSION= 3.21.2 +DISTVERSION= 3.21.3 CATEGORIES= devel MASTER_SITES= https://www.cmake.org/files/v${PORTVERSION:R}/ PKGNAMESUFFIX= -gui diff --git a/devel/cmake/Makefile b/devel/cmake/Makefile index b3c4c52435f0..85be41cc8087 100644 --- a/devel/cmake/Makefile +++ b/devel/cmake/Makefile @@ -2,7 +2,7 @@ PORTNAME= cmake # Remember to update devel/cmake-doc and devel/cmake-gui as well. -DISTVERSION= 3.21.2 +DISTVERSION= 3.21.3 CATEGORIES= devel MASTER_SITES= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ https://www.cmake.org/files/v${PORTVERSION}/ diff --git a/devel/cmake/distinfo b/devel/cmake/distinfo index dd0522d81cd3..fcf240a07331 100644 --- a/devel/cmake/distinfo +++ b/devel/cmake/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1631212166 -SHA256 (cmake-3.21.2.tar.gz) = 94275e0b61c84bb42710f5320a23c6dcb2c6ee032ae7d2a616f53f68b3d21659 -SIZE (cmake-3.21.2.tar.gz) = 9630492 +TIMESTAMP = 1632174000 +SHA256 (cmake-3.21.3.tar.gz) = d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f +SIZE (cmake-3.21.3.tar.gz) = 9630442 diff --git a/devel/cmake/files/patch-cmake-issue-18031 b/devel/cmake/files/patch-cmake-issue-18031 index 89681cf0b022..4185603c947e 100644 --- a/devel/cmake/files/patch-cmake-issue-18031 +++ b/devel/cmake/files/patch-cmake-issue-18031 @@ -1,4 +1,6 @@ ---- Modules/Internal/CPack/CPackFreeBSD.cmake.orig 2021-03-23 15:43:17 UTC +diff --git Modules/Internal/CPack/CPackFreeBSD.cmake Modules/Internal/CPack/CPackFreeBSD.cmake +index ae40532017..c35089cbcf 100644 +--- Modules/Internal/CPack/CPackFreeBSD.cmake +++ Modules/Internal/CPack/CPackFreeBSD.cmake @@ -34,7 +34,7 @@ function(_cpack_freebsd_fallback_var OUTPUT_VAR_NAME) endif() @@ -9,23 +11,28 @@ endif() endfunction() ---- Source/CPack/cmCPackFreeBSDGenerator.cxx.orig 2021-03-23 15:43:17 UTC +diff --git Source/CPack/cmCPackFreeBSDGenerator.cxx Source/CPack/cmCPackFreeBSDGenerator.cxx +index 39ec3c83ed..c09989ceed 100644 +--- Source/CPack/cmCPackFreeBSDGenerator.cxx +++ Source/CPack/cmCPackFreeBSDGenerator.cxx -@@ -21,8 +21,12 @@ +@@ -21,8 +21,15 @@ #include -+// Suffix including the '.', used to tell libpkg what compression to use -+static const char FreeBSDPackageSuffix[] = ".txz"; ++// Suffix used to tell libpkg what compression to use ++static const char FreeBSDPackageCompression[] = "txz"; ++// Resulting package file-suffix, for < 1.17 and >= 1.17 versions of libpkg ++static const char FreeBSDPackageSuffix_10[] = ".txz"; ++static const char FreeBSDPackageSuffix_17[] = ".pkg"; + cmCPackFreeBSDGenerator::cmCPackFreeBSDGenerator() - : cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr", ".txz") + : cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr", -+ FreeBSDPackageSuffix) ++ FreeBSDPackageSuffix_17 /* old-style, updated if an old-style package is created */) { } -@@ -35,6 +39,56 @@ int cmCPackFreeBSDGenerator::InitializeInternal() +@@ -35,6 +42,56 @@ int cmCPackFreeBSDGenerator::InitializeInternal() cmCPackFreeBSDGenerator::~cmCPackFreeBSDGenerator() = default; @@ -51,7 +58,7 @@ + + { + if (d) { -+ pkg_create_set_format(d, FreeBSDPackageSuffix + 1); // Skip over the '.' ++ pkg_create_set_format(d, FreeBSDPackageCompression); // Skip over the '.' + pkg_create_set_compression_level(d, 0); // Explicitly set default + pkg_create_set_overwrite(d, false); + pkg_create_set_rootdir(d, toplevel_dir.c_str()); @@ -82,7 +89,7 @@ // This is a wrapper, for use only in stream-based output, // that will output a string in UCL escaped fashion (in particular, // quotes and backslashes are escaped). The list of characters -@@ -271,7 +325,7 @@ void write_manifest_files(cmGeneratedFileStream& s, +@@ -271,7 +328,7 @@ void write_manifest_files(cmGeneratedFileStream& s, s << "\"files\": {\n"; for (std::string const& file : files) { s << " \"/" << cmSystemTools::RelativePath(toplevel, file) << "\": \"" @@ -91,7 +98,7 @@ << "\",\n"; } s << " },\n"; -@@ -281,11 +335,10 @@ int cmCPackFreeBSDGenerator::PackageFiles() +@@ -281,11 +338,10 @@ int cmCPackFreeBSDGenerator::PackageFiles() { if (!this->ReadListFile("Internal/CPack/CPackFreeBSD.cmake")) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -104,7 +111,7 @@ cmWorkingDirectory wd(toplevel); files.erase(std::remove_if(files.begin(), files.end(), ignore_file), -@@ -317,17 +370,59 @@ int cmCPackFreeBSDGenerator::PackageFiles() +@@ -317,20 +373,79 @@ int cmCPackFreeBSDGenerator::PackageFiles() ONE_PACKAGE_PER_COMPONENT); } @@ -125,7 +132,7 @@ + ? std::string(currentPackage, 0, lastSlash + 1) + : std::string()) + + var_lookup("CPACK_FREEBSD_PACKAGE_NAME") + '-' + -+ var_lookup("CPACK_FREEBSD_PACKAGE_VERSION") + FreeBSDPackageSuffix; ++ var_lookup("CPACK_FREEBSD_PACKAGE_VERSION") + FreeBSDPackageSuffix_17; + + this->packageFileNames.clear(); + this->packageFileNames.emplace_back(actualPackage); @@ -156,15 +163,38 @@ + return 0; + } - std::string broken_suffix = +- std::string broken_suffix = - cmStrCat('-', var_lookup("CPACK_TOPLEVEL_TAG"), ".txz"); -+ cmStrCat('-', var_lookup("CPACK_TOPLEVEL_TAG"), FreeBSDPackageSuffix); ++ // Specifically looking for packages suffixed with the TAG, either extension ++ std::string broken_suffix_10 = ++ cmStrCat('-', var_lookup("CPACK_TOPLEVEL_TAG"), FreeBSDPackageSuffix_10); ++ std::string broken_suffix_17 = ++ cmStrCat('-', var_lookup("CPACK_TOPLEVEL_TAG"), FreeBSDPackageSuffix_17); for (std::string& name : packageFileNames) { cmCPackLogger(cmCPackLog::LOG_DEBUG, "Packagefile " << name << std::endl); - if (cmHasSuffix(name, broken_suffix)) { - name.replace(name.size() - broken_suffix.size(), std::string::npos, +- if (cmHasSuffix(name, broken_suffix)) { +- name.replace(name.size() - broken_suffix.size(), std::string::npos, - ".txz"); -+ FreeBSDPackageSuffix); ++ if (cmHasSuffix(name, broken_suffix_10)) { ++ name.replace(name.size() - broken_suffix_10.size(), std::string::npos, ++ FreeBSDPackageSuffix_10); ++ break; ++ } ++ if (cmHasSuffix(name, broken_suffix_17)) { ++ name.replace(name.size() - broken_suffix_17.size(), std::string::npos, ++ FreeBSDPackageSuffix_17); break; } } ++ // If the name uses a *new* style name, which doesn't exist, but there ++ // is an *old* style name, then use that instead. This indicates we used ++ // an older libpkg, which still creates .txz instead of .pkg files. ++ for (std::string& name : packageFileNames) { ++ if (cmHasSuffix(name, FreeBSDPackageSuffix_17) && !cmSystemTools::FileExists(name)) { ++ const std::string suffix(FreeBSDPackageSuffix_17); ++ name.replace(name.size() - suffix.size(), std::string::npos, suffix); ++ } ++ } + + return 1; + } diff --git a/devel/cmake/pkg-plist b/devel/cmake/pkg-plist index b4f4383ecf21..ea210f640265 100644 --- a/devel/cmake/pkg-plist +++ b/devel/cmake/pkg-plist @@ -1933,7 +1933,6 @@ share/bash-completion/completions/ctest %%DATADIR%%/Modules/CMakeHIPCompilerABI.hip %%DATADIR%%/Modules/CMakeHIPCompilerId.hip.in %%DATADIR%%/Modules/CMakeHIPInformation.cmake -%%DATADIR%%/Modules/CMakeHIPRuntime.cmake.in %%DATADIR%%/Modules/CMakeIOSInstallCombined.cmake %%DATADIR%%/Modules/CMakeISPCCompiler.cmake.in %%DATADIR%%/Modules/CMakeISPCCompilerABI.ispc @@ -2201,15 +2200,6 @@ share/bash-completion/completions/ctest %%DATADIR%%/Modules/Compiler/QCC-CXX-FeatureTests.cmake %%DATADIR%%/Modules/Compiler/QCC-CXX.cmake %%DATADIR%%/Modules/Compiler/QCC.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang-ASM.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang-C.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang-CXX.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang-DetermineCompiler.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang-FindBinUtils.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang-HIP.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang-OBJC.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang-OBJCXX.cmake -%%DATADIR%%/Modules/Compiler/ROCMClang.cmake %%DATADIR%%/Modules/Compiler/SCO-C.cmake %%DATADIR%%/Modules/Compiler/SCO-CXX.cmake %%DATADIR%%/Modules/Compiler/SCO-DetermineCompiler.cmake