blob: af5ca65297be974c0c474618bb04166772fc6954 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "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"
6LIC_FILES_CHKSUM = "file://COPYING;md5=ed99aca006bc346974bb745a35336425"
7
8DEPENDS = "e2fsprogs-native"
9
10PACKAGECONFIG ?= "zlib bz2 xz lzo"
11
12PACKAGECONFIG_append_class-target = "\
13 libxml2 \
14 ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
15"
16
17DEPENDS_BZIP2 = "bzip2-replacement-native"
18DEPENDS_BZIP2_class-target = "bzip2"
19
20PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
21PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
22PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
23PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,${DEPENDS_BZIP2},"
24PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz,"
25PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
26PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
27PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
28PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
29PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
30PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
31
32EXTRA_OECONF += "--enable-largefile"
33
34SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
35 file://non-recursive-extract-and-list.patch \
36 file://bug1066.patch \
Brad Bishop19323692019-04-05 15:28:33 -040037 file://CVE-2018-1000877.patch \
38 file://CVE-2018-1000878.patch \
39 file://CVE-2018-1000879.patch \
40 file://CVE-2018-1000880.patch \
41 file://CVE-2019-1000019.patch \
42 file://CVE-2019-1000020.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043"
44
45SRC_URI[md5sum] = "4038e366ca5b659dae3efcc744e72120"
46SRC_URI[sha256sum] = "ba7eb1781c9fbbae178c4c6bad1c6eb08edab9a1496c64833d1715d022b30e2e"
47
48inherit autotools update-alternatives pkgconfig
49
50CPPFLAGS += "-I${WORKDIR}/extra-includes"
51
52do_configure[cleandirs] += "${WORKDIR}/extra-includes"
53do_configure_prepend() {
54 # We just need the headers for some type constants, so no need to
55 # build all of e2fsprogs for the target
56 cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
57}
58
59ALTERNATIVE_PRIORITY = "80"
60
61PACKAGES =+ "bsdtar"
62FILES_bsdtar = "${bindir}/bsdtar"
63
64ALTERNATIVE_bsdtar = "tar"
65ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
66ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
67
68PACKAGES =+ "bsdcpio"
69FILES_bsdcpio = "${bindir}/bsdcpio"
70
71ALTERNATIVE_bsdcpio = "cpio"
72ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
73ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
74
75BBCLASSEXTEND = "native nativesdk"