blob: f078c8ad03e2e61fc73e93c91aee09f66beefa77 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001SUMMARY = "Support for reading various archive formats"
2DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
3HOMEPAGE = "http://www.libarchive.org/"
4SECTION = "devel"
5LICENSE = "BSD-2-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d499814247adaee08d88080841cb5665"
7
8DEPENDS = "e2fsprogs-native"
9
10PACKAGECONFIG ?= "zlib bz2 xz lzo zstd"
11
12PACKAGECONFIG:append:class-target = "\
13 ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
14"
15
16DEPENDS_BZIP2 = "bzip2-replacement-native"
17DEPENDS_BZIP2:class-target = "bzip2"
18
19PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
20PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
21PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
22PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,${DEPENDS_BZIP2},"
23PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz,"
24PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
25PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
26PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
27PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
28PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
29PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
30PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls,"
31PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd,"
32
33EXTRA_OECONF += "--enable-largefile"
34
35SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz"
36UPSTREAM_CHECK_URI = "http://libarchive.org/"
37
38SRC_URI[sha256sum] = "a36613695ffa2905fdedc997b6df04a3006ccfd71d747a339b78aa8412c3d852"
39
40inherit autotools update-alternatives pkgconfig
41
42CPPFLAGS += "-I${WORKDIR}/extra-includes"
43
44do_configure[cleandirs] += "${WORKDIR}/extra-includes"
45do_configure:prepend() {
46 # We just need the headers for some type constants, so no need to
47 # build all of e2fsprogs for the target
48 cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
49}
50
51ALTERNATIVE_PRIORITY = "80"
52
53PACKAGES =+ "bsdtar"
54FILES:bsdtar = "${bindir}/bsdtar"
55
56ALTERNATIVE:bsdtar = "tar"
57ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
58ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
59
60PACKAGES =+ "bsdcpio"
61FILES:bsdcpio = "${bindir}/bsdcpio"
62
63ALTERNATIVE:bsdcpio = "cpio"
64ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
65ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
66
67BBCLASSEXTEND = "native nativesdk"