# Contributor: Sergey Lukin # Maintainer: A. Wilcox pkgname=libarchive pkgver=3.8.0 pkgrel=0 pkgdesc="Multi-format archive and compression library" url="https://www.libarchive.org/" arch="all" license="BSD-2-Clause AND BSD-3-Clause AND Public-Domain" depends="" makedepends="acl-dev attr-dev bzip2-dev expat-dev lz4-dev openssl-dev pcre2-dev xz-dev zlib-dev zstd-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-tools" source="https://github.com/libarchive/libarchive/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz disable-locale-tests.patch disable-unaligned-access-arm32-xxhash.patch test-fix.patch " # secfixes: # 3.6.2-r0: # - CVE-2022-36227 # 3.6.1-r0: # - CVE-2022-26280 # 3.4.2-r0: # - CVE-2020-9308 # 3.3.2-r1: # - CVE-2017-14166 build () { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --with-expat \ --without-xml2 \ --with-bz2lib \ --with-zlib \ --with-lzma \ --with-lz4 \ --enable-acl \ --enable-xattr \ --enable-posix-regex-lib=libpcre2posix \ ac_cv_header_linux_fiemap_h=no make } check() { make check } package() { make DESTDIR="$pkgdir" install } tools() { pkgdesc="libarchive tools - bsdtar and bsdcpio" mkdir -p "$subpkgdir"/usr/ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ ln -s bsdtar "$subpkgdir"/usr/bin/tar ln -s bsdcpio "$subpkgdir"/usr/bin/cpio } sha512sums="e563cd10cd447daf7c5d11c657cbc3d8971add4440264fb4754ea7670a249e8b7b1c31f62f78259867960392623dba73c2d20efc57dc02564c8f55841dc8f2cc libarchive-3.8.0.tar.gz 0360eb38364af93ebe81fc59e6a2b1bdb9c1d42487560c3565c5723a57f8f5ee85638ad6906f761d9b41f7d6ad03bad800810394ea1bfcfc70e6c07b25bcfad6 disable-locale-tests.patch 56a2b13b6cd7b127c04ac50ebf49994ec91ff2467d5d0f32b8428bd4df82b167459d4630dee5d1b5119f70b04ea6fe4411d44b768e0f313fa302c9e5fe51b7cd disable-unaligned-access-arm32-xxhash.patch 1eee8588058ce1de122d20de1ac67f8294be5b8d1ea28dc7adf28cee86eb45e697983a051f25a38d2e0ca92b9996e1d13707b985b86ff1647c8960ffca965fea test-fix.patch"