Skip to content

portextract: add use_zstd option for .tar.zst distfiles#379

Open
herbygillot wants to merge 1 commit intomacports:masterfrom
herbygillot:use-zstd
Open

portextract: add use_zstd option for .tar.zst distfiles#379
herbygillot wants to merge 1 commit intomacports:masterfrom
herbygillot:use-zstd

Conversation

@herbygillot
Copy link
Member

Adds native support for extracting zstandard-compressed distfiles via a new use_zstd option, following the same pattern as use_xz, use_lzip, etc. The zstd binary is located at runtime via PATH (same approach as lzip and 7za, since zstd is not a macOS system tool).

  • portextract.tcl: add use_zstd to all_use_options; wire up get_extract_cmd (binaryInPath zstd), get_extract_suffix (.tar.zst), and add_extract_deps (bin:zstd:zstd)
  • doc/portfile.7: document use_zstd between use_xz and use_7z
  • tests/portextract.test: new test file covering get_extract_suffix and get_extract_pre_args for all use_* options, plus a mocked get_extract_cmd test for use_zstd

Closes: https://trac.macports.org/ticket/72713

Adds native support for extracting zstandard-compressed distfiles via
a new use_zstd option, following the same pattern as use_xz, use_lzip,
etc. The zstd binary is located at runtime via PATH (same approach as
lzip and 7za, since zstd is not a macOS system tool).

- portextract.tcl: add use_zstd to all_use_options; wire up
  get_extract_cmd (binaryInPath zstd), get_extract_suffix (.tar.zst),
  and add_extract_deps (bin:zstd:zstd)
- doc/portfile.7: document use_zstd between use_xz and use_7z
- tests/portextract.test: new test file covering get_extract_suffix
  and get_extract_pre_args for all use_* options, plus a mocked
  get_extract_cmd test for use_zstd

Closes: https://trac.macports.org/ticket/72713

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant