aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/system-package-manager-archive.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/bpkg/system-package-manager-archive.cxx b/bpkg/system-package-manager-archive.cxx
index 2639bb1..311893b 100644
--- a/bpkg/system-package-manager-archive.cxx
+++ b/bpkg/system-package-manager-archive.cxx
@@ -139,7 +139,17 @@ namespace bpkg
const char* c (nullptr);
if (e == "tar.gz") { c = "gzip"; l = "-9"; }
- else if (e == "tar.xz") { c = "xz"; l = "-9"; }
+ else if (e == "tar.xz")
+ {
+ // At least as of Mac OS 13 and Xcode 15, there is no standalone xz
+ // utility but tar seem to be capable of producing .tar.xz.
+ //
+#ifdef __APPLE__
+ l = "--options=compression-level=9";
+#else
+ c = "xz"; l = "-9";
+#endif
+ }
if (c != nullptr)
{