meta.yaml.template 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. {% set version = "3.6.2" %}
  2. package:
  3. name: libarchive
  4. version: {{ version }}
  5. source:
  6. url: https://github.com/libarchive/libarchive/releases/download/v{{ version }}/libarchive-{{ version }}.tar.gz
  7. sha256: ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3
  8. patches:
  9. - patches/0001-Add-lib-to-CMAKE_FIND_LIBRARY_PREFIXES-for-lzma.patch
  10. - patches/0003-VC9-compatibility-test-for-BCryptDeriveKeyPBKDF2.patch
  11. - patches/0004-VC9-compatibility-define-BCRYPT_SUCCESS.patch
  12. - patches/0006-VC-openssl-define-inline-as-__inline.patch
  13. # These warnings are errors when compiling lz-4 support
  14. - patches/0007-CMake-VC9-compatibility-ignore-some-warnings.patch
  15. - patches/0008-VC9-compatibility-remove-C99.patch
  16. - patches/0009-CMake-Force-Multi-threaded-DLL-runtime.patch
  17. build:
  18. number: 2
  19. #skip: true # [win and vc<14]
  20. run_exports:
  21. # https://abi-laboratory.pro/index.php?view=timeline&l=libarchive
  22. - {{ pin_subpackage('libarchive', max_pin='x.x') }}
  23. # macOS' native crypto gets used here, but the headers are needed
  24. ignore_run_exports: # [osx]
  25. - openssl # [osx]
  26. requirements:
  27. build:
  28. - {{ compiler('c') }}
  29. - cmake
  30. - ninja-base
  31. - patch # [not win]
  32. - m2-patch # [win]
  33. host:
  34. - msinttypes # [win and vc<14]
  35. - bzip2
  36. - libiconv # [not linux]
  37. - lz4-c
  38. - xz
  39. # This is GPL-v2+, the libarchive authors explicitly ask that
  40. # people do not link to this (and if we do, this would need to
  41. # also be released as GPL-v2+, and that is against their wishes
  42. # and it is not clear if that is even possible)
  43. # https://github.com/libarchive/libarchive/releases/tag/v3.3.2
  44. # "Linking libarchive against liblzo violates LZO GPL licence.
  45. # Please don't distribute binary packages of libarchive linked
  46. # against liblzo."
  47. # - lzo
  48. - openssl {{ openssl }} # [not osx]
  49. - libxml2 2.10
  50. - zlib {{ zlib }}
  51. - zstd {{ zstd }}
  52. run:
  53. - openssl 3.*
  54. test:
  55. requires:
  56. - ripgrep
  57. files:
  58. - test-archives/hello_world.xar
  59. - test-archives/archive.7z
  60. - test-archives/hello_world.tar.zst
  61. commands:
  62. # Verify pkg-config file is in place.
  63. - test -f "${PREFIX}/lib/pkgconfig/libarchive.pc" # [unix]
  64. # Verify headers are in place.
  65. - test -f "${PREFIX}/include/archive.h" # [unix]
  66. - test -f "${PREFIX}/include/archive_entry.h" # [unix]
  67. # Verify libraries are in place.
  68. - test -f "${PREFIX}/lib/libarchive.a" # [unix]
  69. - test -f "${PREFIX}/lib/libarchive${SHLIB_EXT}" # [unix]
  70. # Check for commands
  71. - if not exist "%LIBRARY_BIN%\\bsdcat.exe" exit 1 # [win32]
  72. - if not exist "%LIBRARY_BIN%\\bsdcpio.exe" exit 1 # [win32]
  73. - bsdcat --version # [unix or win64]
  74. - bsdcpio --version # [unix or win64]
  75. - bsdtar --version # [unix or win64]
  76. - pushd test-archives # [unix or win64]
  77. - bsdtar -vxf hello_world.xar 2>&1 | rg "x hello_world" # [unix or win64]
  78. - bsdtar -vxf archive.7z 2>&1 | rg "x 7zip-archive" # [unix or win64]
  79. - bsdtar -vxf hello_world.tar.zst 2>&1 | rg "greets" # [unix or win64]
  80. - popd # [unix or win64]
  81. about:
  82. home: https://libarchive.org/
  83. license: BSD-2-Clause
  84. license_file: COPYING
  85. license_family: BSD
  86. summary: Multi-format archive and compression library
  87. description: |
  88. Libarchive is an open-source BSD-licensed C programming library that provides streaming access
  89. to a variety of different archive formats, including tar, cpio, pax, Zip, and ISO9660 images.
  90. The distribution also includes bsdtar and bsdcpio, full-featured implementations of tar and cpio
  91. that use libarchive.
  92. When reading archives, libarchive uses a robust automatic format detector that can automatically handle archives
  93. that have been compressed with gzip, bzip2, xz, lzip, and several other popular compression algorithms.
  94. dev_url: https://github.com/libarchive/libarchive
  95. doc_url: https://github.com/libarchive/libarchive/wiki
  96. extra:
  97. recipe-maintainers:
  98. - jakirkham
  99. - mingwandroid
  100. - ocefpaf
  101. skip-lints:
  102. - missing_tests
  103. - host_section_needs_exact_pinnings