blob: aafede3da8c44d9249b2ff7aa48a457b0ee4fb3c [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "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
Patrick Williams8e7b46e2023-05-01 14:19:06 -050010PACKAGECONFIG ?= "zlib bz2 xz zstd ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)}"
Andrew Geissler517393d2023-01-13 08:55:19 -060011
12DEPENDS_BZIP2 = "bzip2-replacement-native"
13DEPENDS_BZIP2:class-target = "bzip2"
14
15PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
16PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
17PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
18PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,${DEPENDS_BZIP2},"
19PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz,"
20PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
21PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
22PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
23PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
24PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
25PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
26PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls,"
27PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd,"
28
29EXTRA_OECONF += "--enable-largefile --without-iconv"
30
31SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz"
32UPSTREAM_CHECK_URI = "http://libarchive.org/"
33
34SRC_URI[sha256sum] = "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3"
35
36inherit autotools update-alternatives pkgconfig
37
38CPPFLAGS += "-I${WORKDIR}/extra-includes"
39
40do_configure[cleandirs] += "${WORKDIR}/extra-includes"
41do_configure:prepend() {
42 # We just need the headers for some type constants, so no need to
43 # build all of e2fsprogs for the target
44 cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
45}
46
47ALTERNATIVE_PRIORITY = "80"
48
49PACKAGES =+ "bsdtar"
50FILES:bsdtar = "${bindir}/bsdtar"
51
52ALTERNATIVE:bsdtar = "tar"
53ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
54ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
55
56PACKAGES =+ "bsdcpio"
57FILES:bsdcpio = "${bindir}/bsdcpio"
58
59ALTERNATIVE:bsdcpio = "cpio"
60ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
61ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
62
63BBCLASSEXTEND = "native nativesdk"