Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Support for reading various archive formats" |
| 2 | DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats" |
| 3 | HOMEPAGE = "http://www.libarchive.org/" |
| 4 | SECTION = "devel" |
| 5 | LICENSE = "BSD-2-Clause" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d499814247adaee08d88080841cb5665" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 7 | |
| 8 | DEPENDS = "e2fsprogs-native" |
| 9 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 10 | PACKAGECONFIG ?= "zlib bz2 xz lzo zstd" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 12 | PACKAGECONFIG:append:class-target = "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \ |
| 14 | " |
| 15 | |
| 16 | DEPENDS_BZIP2 = "bzip2-replacement-native" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | DEPENDS_BZIP2:class-target = "bzip2" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | |
| 19 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," |
| 20 | PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," |
| 21 | PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," |
| 22 | PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,${DEPENDS_BZIP2}," |
| 23 | PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz," |
| 24 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," |
| 25 | PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2," |
| 26 | PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat," |
| 27 | PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo," |
| 28 | PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle," |
| 29 | PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4," |
| 30 | PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls," |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 31 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd," |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | |
| 33 | EXTRA_OECONF += "--enable-largefile" |
| 34 | |
| 35 | SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz" |
| 36 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 37 | SRC_URI[sha256sum] = "9015d109ec00bb9ae1a384b172bf2fc1dff41e2c66e5a9eeddf933af9db37f5a" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 38 | |
| 39 | inherit autotools update-alternatives pkgconfig |
| 40 | |
| 41 | CPPFLAGS += "-I${WORKDIR}/extra-includes" |
| 42 | |
| 43 | do_configure[cleandirs] += "${WORKDIR}/extra-includes" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 44 | do_configure:prepend() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 45 | # 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 | |
| 50 | ALTERNATIVE_PRIORITY = "80" |
| 51 | |
| 52 | PACKAGES =+ "bsdtar" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | FILES:bsdtar = "${bindir}/bsdtar" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | ALTERNATIVE:bsdtar = "tar" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" |
| 57 | ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar" |
| 58 | |
| 59 | PACKAGES =+ "bsdcpio" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | FILES:bsdcpio = "${bindir}/bsdcpio" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 61 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | ALTERNATIVE:bsdcpio = "cpio" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 63 | ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" |
| 64 | ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio" |
| 65 | |
| 66 | BBCLASSEXTEND = "native nativesdk" |