blob: ed677ac3186a327cf0499752ee4a51ee70a478c0 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -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=b4e3ffd607d6686c6cb2f63394370841"
7
8DEPENDS = "e2fsprogs-native"
9
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050010PACKAGECONFIG ?= "zlib bz2"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011
12PACKAGECONFIG_append_class-target = "\
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050013 libxml2 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014 ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
15 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
16 ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
17"
18
19PACKAGECONFIG_append_class-nativesdk = " largefile"
20
21PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
22PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
23PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
24PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
25PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2,"
26PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz,"
27PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
28PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
29PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
30PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
31PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
32
33SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
34 file://libarchive-CVE-2013-0211.patch \
35 file://pkgconfig.patch \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050036 file://libarchive-CVE-2015-2304.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037 file://mkdir.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050038 file://0001-Set-xattrs-after-setting-times.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039 "
40
41SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a"
42SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e"
43
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050044inherit autotools update-alternatives pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045
46CPPFLAGS += "-I${WORKDIR}/extra-includes"
47
48do_configure[cleandirs] += "${WORKDIR}/extra-includes"
49do_configure_prepend() {
50 # We just need the headers for some type constants, so no need to
51 # build all of e2fsprogs for the target
52 cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
53}
54
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050055ALTERNATIVE_PRIORITY = "100"
56
57PACKAGES =+ "bsdtar"
58FILES_bsdtar = "${bindir}/bsdtar"
59
60ALTERNATIVE_bsdtar = "tar"
61ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
62ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
63
64PACKAGES =+ "bsdcpio"
65FILES_bsdcpio = "${bindir}/bsdcpio"
66
67ALTERNATIVE_bsdcpio = "cpio"
68ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
69ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
70
Patrick Williamsc124f4f2015-09-15 14:41:29 -050071BBCLASSEXTEND = "native nativesdk"