diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-06-26 09:22:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-06-26 09:22:21 +0200 |
commit | 7f52becc9a627d64c558b8a6a4210d2cca5cbe0c (patch) | |
tree | 7e894b7faef3ed072dae1393e90d644b72102759 | |
parent | 5d815d5959fd4be096423772a8019f3dbdd536af (diff) |
Make sure pkg-bindist can produce .tar.xz on Mac OS
-rw-r--r-- | bpkg/system-package-manager-archive.cxx | 12 |
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) { |