xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-extended/libarchive/libarchive_3.6.2.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Support for reading various archive formats"
2*4882a593SmuzhiyunDESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
3*4882a593SmuzhiyunHOMEPAGE = "http://www.libarchive.org/"
4*4882a593SmuzhiyunSECTION = "devel"
5*4882a593SmuzhiyunLICENSE = "BSD-2-Clause"
6*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=d499814247adaee08d88080841cb5665"
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunDEPENDS = "e2fsprogs-native"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunPACKAGECONFIG ?= "zlib bz2 xz lzo zstd"
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunPACKAGECONFIG:append:class-target = "\
13*4882a593Smuzhiyun	${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
14*4882a593Smuzhiyun"
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunDEPENDS_BZIP2 = "bzip2-replacement-native"
17*4882a593SmuzhiyunDEPENDS_BZIP2:class-target = "bzip2"
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunPACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
20*4882a593SmuzhiyunPACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
21*4882a593SmuzhiyunPACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
22*4882a593SmuzhiyunPACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,${DEPENDS_BZIP2},"
23*4882a593SmuzhiyunPACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz,"
24*4882a593SmuzhiyunPACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
25*4882a593SmuzhiyunPACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
26*4882a593SmuzhiyunPACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
27*4882a593SmuzhiyunPACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
28*4882a593SmuzhiyunPACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
29*4882a593SmuzhiyunPACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
30*4882a593SmuzhiyunPACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls,"
31*4882a593SmuzhiyunPACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd,"
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunEXTRA_OECONF += "--enable-largefile --without-iconv"
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunSRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz"
36*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "http://libarchive.org/"
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunSRC_URI[sha256sum] = "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3"
39*4882a593Smuzhiyun
40*4882a593Smuzhiyuninherit autotools update-alternatives pkgconfig
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunCPPFLAGS += "-I${WORKDIR}/extra-includes"
43*4882a593Smuzhiyun
44*4882a593Smuzhiyundo_configure[cleandirs] += "${WORKDIR}/extra-includes"
45*4882a593Smuzhiyundo_configure:prepend() {
46*4882a593Smuzhiyun	# We just need the headers for some type constants, so no need to
47*4882a593Smuzhiyun	# build all of e2fsprogs for the target
48*4882a593Smuzhiyun	cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
49*4882a593Smuzhiyun}
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunALTERNATIVE_PRIORITY = "80"
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunPACKAGES =+ "bsdtar"
54*4882a593SmuzhiyunFILES:bsdtar = "${bindir}/bsdtar"
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunALTERNATIVE:bsdtar = "tar"
57*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
58*4882a593SmuzhiyunALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunPACKAGES =+ "bsdcpio"
61*4882a593SmuzhiyunFILES:bsdcpio = "${bindir}/bsdcpio"
62*4882a593Smuzhiyun
63*4882a593SmuzhiyunALTERNATIVE:bsdcpio = "cpio"
64*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
65*4882a593SmuzhiyunALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
68