blob: 326971647394da783de19d303745ad9264ca1009 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -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"
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://bug929.patch \
36 file://CVE-2017-14166.patch \
37 file://CVE-2017-14502.patch \
38 file://non-recursive-extract-and-list.patch \
Brad Bishop220d5532018-08-14 00:59:39 +010039 file://CVE-2017-14503.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050040 "
41
42SRC_URI[md5sum] = "4583bd6b2ebf7e0e8963d90879eb1b27"
43SRC_URI[sha256sum] = "ed2dbd6954792b2c054ccf8ec4b330a54b85904a80cef477a1c74643ddafa0ce"
44
45inherit autotools update-alternatives pkgconfig
46
47CPPFLAGS += "-I${WORKDIR}/extra-includes"
48
49do_configure[cleandirs] += "${WORKDIR}/extra-includes"
50do_configure_prepend() {
51 # We just need the headers for some type constants, so no need to
52 # build all of e2fsprogs for the target
53 cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
54}
55
56ALTERNATIVE_PRIORITY = "80"
57
58PACKAGES =+ "bsdtar"
59FILES_bsdtar = "${bindir}/bsdtar"
60
61ALTERNATIVE_bsdtar = "tar"
62ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
63ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
64
65PACKAGES =+ "bsdcpio"
66FILES_bsdcpio = "${bindir}/bsdcpio"
67
68ALTERNATIVE_bsdcpio = "cpio"
69ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
70ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
71
72BBCLASSEXTEND = "native nativesdk"