{% set name = "libarchive" %} {% set version = "3.8.2" %} package: name: {{ name }} version: {{ version }} source: url: https://github.com/{{ name }}/{{ name }}/releases/download/v{{ version }}/{{ name }}-{{ version }}.tar.gz sha256: 5f2d3c2fde8dc44583a61165549dc50ba8a37c5947c90fc02c8e5ce7f1cfb80d patches: - patches/0001-Add-lib-to-CMAKE_FIND_LIBRARY_PREFIXES-for-lzma.patch build: number: 0 run_exports: - {{ pin_subpackage('libarchive', max_pin='x.x') }} # macOS' native crypto gets used here, but the headers are needed ignore_run_exports: # [osx] - openssl # [osx] requirements: build: - {{ stdlib('c') }} - {{ compiler('c') }} - cmake - ninja-base host: - bzip2 {{ bzip2 }} - libiconv {{ libiconv }} # [not linux] - lz4-c {{ lz4_c }} - xz {{ xz }} # This is GPL-v2+, the libarchive authors explicitly ask that # people do not link to this (and if we do, this would need to # also be released as GPL-v2+, and that is against their wishes # and it is not clear if that is even possible) # https://github.com/libarchive/libarchive/releases/tag/v3.3.2 # "Linking libarchive against liblzo violates LZO GPL licence. # Please don't distribute binary packages of libarchive linked # against liblzo." # - lzo - openssl {{ openssl }} # [not osx] - libxml2 {{ libxml2 }} - zlib {{ zlib }} - zstd {{ zstd }} run: - openssl # [not osx] test: requires: - ripgrep files: - test-archives/hello_world.xar - test-archives/archive.7z - test-archives/hello_world.tar.zst commands: # Verify pkg-config file is in place. - test -f "${PREFIX}/lib/pkgconfig/libarchive.pc" # [unix] # Verify headers are in place. - test -f "${PREFIX}/include/archive.h" # [unix] - test -f "${PREFIX}/include/archive_entry.h" # [unix] # Verify libraries are in place. - test -f "${PREFIX}/lib/libarchive.a" # [unix] - test -f "${PREFIX}/lib/libarchive${SHLIB_EXT}" # [unix] # Check for commands - bsdcat --version - bsdcpio --version - bsdtar --version - pushd test-archives - bsdtar -vxf hello_world.xar 2>&1 | rg "x hello_world" - bsdtar -vxf archive.7z 2>&1 | rg "x 7zip-archive" - bsdtar -vxf hello_world.tar.zst 2>&1 | rg "greets" - popd about: home: https://libarchive.org license: BSD-2-Clause license_file: COPYING license_family: BSD summary: Multi-format archive and compression library description: | Libarchive is an open-source BSD-licensed C programming library that provides streaming access to a variety of different archive formats, including tar, cpio, pax, Zip, and ISO9660 images. The distribution also includes bsdtar and bsdcpio, full-featured implementations of tar and cpio that use libarchive. When reading archives, libarchive uses a robust automatic format detector that can automatically handle archives that have been compressed with gzip, bzip2, xz, lzip, and several other popular compression algorithms. dev_url: https://github.com/libarchive/libarchive doc_url: https://github.com/libarchive/libarchive/wiki extra: recipe-maintainers: - jakirkham - mingwandroid - ocefpaf