summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriaan de Groot <groot@kde.org>2022-07-05 12:24:31 (GMT)
committerAdriaan de Groot <groot@kde.org>2022-07-05 12:24:45 (GMT)
commit1b61cd1597068dbba2ef1ac6018339cf91c19b70 (patch)
tree239daa3ffd579a39090917592970da021ff7d2ae
parent57e8cd1a8172f864a9341f5842726f98aef908c2 (diff)
downloadCMake-1b61cd1597068dbba2ef1ac6018339cf91c19b70.zip
CMake-1b61cd1597068dbba2ef1ac6018339cf91c19b70.tar.gz
CMake-1b61cd1597068dbba2ef1ac6018339cf91c19b70.tar.bz2
FreeBSD: explain the pkg_create() call
- the upstream API is undocumented, so dig in the C sources to get parameter names.
-rw-r--r--Source/CPack/cmCPackFreeBSDGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx
index 9f04925..4f07ad4 100644
--- a/Source/CPack/cmCPackFreeBSDGenerator.cxx
+++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx
@@ -81,6 +81,14 @@ public:
{
if (!isValid())
return false;
+ // The API in the FreeBSD sources (the header has no documentation),
+ // is as follows:
+ //
+ // int pkg_create(struct pkg_create *pc, const char *metadata, const char
+ // *plist, bool hash)
+ //
+ // We let the plist be determined from what is installed, and all
+ // the rest comes from the manifest data.
int r = pkg_create(d, manifest.c_str(), nullptr, false);
return r == 0;
}