summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackFreeBSDGenerator.cxx
diff options
context:
space:
mode:
authorAdriaan de Groot <groot@kde.org>2022-07-05 09:42:00 (GMT)
committerAdriaan de Groot <groot@kde.org>2022-07-05 09:42:00 (GMT)
commit57e8cd1a8172f864a9341f5842726f98aef908c2 (patch)
treea82219943a84bc64841039d8660951e45466c3ab /Source/CPack/cmCPackFreeBSDGenerator.cxx
parentacf3fe632cb0fde088e443c4f8738f40c15937e5 (diff)
downloadCMake-57e8cd1a8172f864a9341f5842726f98aef908c2.zip
CMake-57e8cd1a8172f864a9341f5842726f98aef908c2.tar.gz
CMake-57e8cd1a8172f864a9341f5842726f98aef908c2.tar.bz2
FreeBSD: drop support for libpkg before 1.17
All supported FreeBSD versions are now using 1.17 or later
Diffstat (limited to 'Source/CPack/cmCPackFreeBSDGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackFreeBSDGenerator.cxx29
1 files changed, 1 insertions, 28 deletions
diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx
index 607d797..9f04925 100644
--- a/Source/CPack/cmCPackFreeBSDGenerator.cxx
+++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx
@@ -23,8 +23,6 @@
// 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()
@@ -416,42 +414,17 @@ int cmCPackFreeBSDGenerator::PackageFiles()
return 0;
}
- // Specifically looking for packages suffixed with the TAG, either extension
- std::string broken_suffix_10 =
- cmStrCat('-', var_lookup("CPACK_TOPLEVEL_TAG"), FreeBSDPackageSuffix_10);
+ // Specifically looking for packages suffixed with the TAG
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_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 badSuffix(FreeBSDPackageSuffix_17);
- const std::string goodSuffix(FreeBSDPackageSuffix_10);
- std::string repairedName(name);
- repairedName.replace(repairedName.size() - badSuffix.size(),
- std::string::npos, goodSuffix);
- if (cmSystemTools::FileExists(repairedName)) {
- name = repairedName;
- cmCPackLogger(cmCPackLog::LOG_DEBUG,
- "Repaired packagefile " << name << std::endl);
- }
- }
- }
return 1;
}