blob: 7d98e573b8a8b43d543eb274d384a871ce9c079c [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "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"
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006LIC_FILES_CHKSUM = "file://COPYING;md5=d499814247adaee08d88080841cb5665"
Andrew Geissler82c905d2020-04-13 13:39:40 -05007
8DEPENDS = "e2fsprogs-native"
9
William A. Kennington IIIac69b482021-06-02 12:28:27 -070010PACKAGECONFIG ?= "zlib bz2 xz lzo zstd"
Andrew Geissler82c905d2020-04-13 13:39:40 -050011
Patrick Williams213cb262021-08-07 19:21:33 -050012PACKAGECONFIG:append:class-target = "\
Andrew Geissler82c905d2020-04-13 13:39:40 -050013 ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
14"
15
16DEPENDS_BZIP2 = "bzip2-replacement-native"
Patrick Williams213cb262021-08-07 19:21:33 -050017DEPENDS_BZIP2:class-target = "bzip2"
Andrew Geissler82c905d2020-04-13 13:39:40 -050018
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,"
William A. Kennington IIIac69b482021-06-02 12:28:27 -070031PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd,"
Andrew Geissler82c905d2020-04-13 13:39:40 -050032
33EXTRA_OECONF += "--enable-largefile"
34
35SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz"
36
Andrew Geisslerd1e89492021-02-12 15:35:20 -060037SRC_URI[sha256sum] = "9015d109ec00bb9ae1a384b172bf2fc1dff41e2c66e5a9eeddf933af9db37f5a"
Andrew Geissler82c905d2020-04-13 13:39:40 -050038
39inherit autotools update-alternatives pkgconfig
40
41CPPFLAGS += "-I${WORKDIR}/extra-includes"
42
43do_configure[cleandirs] += "${WORKDIR}/extra-includes"
Patrick Williams213cb262021-08-07 19:21:33 -050044do_configure:prepend() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050045 # We just need the headers for some type constants, so no need to
46 # build all of e2fsprogs for the target
47 cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
48}
49
50ALTERNATIVE_PRIORITY = "80"
51
52PACKAGES =+ "bsdtar"
Patrick Williams213cb262021-08-07 19:21:33 -050053FILES:bsdtar = "${bindir}/bsdtar"
Andrew Geissler82c905d2020-04-13 13:39:40 -050054
Patrick Williams213cb262021-08-07 19:21:33 -050055ALTERNATIVE:bsdtar = "tar"
Andrew Geissler82c905d2020-04-13 13:39:40 -050056ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
57ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
58
59PACKAGES =+ "bsdcpio"
Patrick Williams213cb262021-08-07 19:21:33 -050060FILES:bsdcpio = "${bindir}/bsdcpio"
Andrew Geissler82c905d2020-04-13 13:39:40 -050061
Patrick Williams213cb262021-08-07 19:21:33 -050062ALTERNATIVE:bsdcpio = "cpio"
Andrew Geissler82c905d2020-04-13 13:39:40 -050063ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
64ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
65
66BBCLASSEXTEND = "native nativesdk"