configs: atmel: at91sam9260eknf: update defconfig
[buildroot-gz.git] / package / libarchive / libarchive.mk
blobbcf92f907a6c934b2fc01885dd7ecd38172b302a
1 ################################################################################
3 # libarchive
5 ################################################################################
7 LIBARCHIVE_VERSION = 3.2.1
8 LIBARCHIVE_SITE = http://www.libarchive.org/downloads
9 LIBARCHIVE_INSTALL_STAGING = YES
10 LIBARCHIVE_LICENSE = BSD-2c, BSD-3c
11 LIBARCHIVE_LICENSE_FILES = COPYING
13 ifeq ($(BR2_PACKAGE_LIBARCHIVE_BSDTAR),y)
14 ifeq ($(BR2_STATIC_LIBS),y)
15 LIBARCHIVE_CONF_OPTS += --enable-bsdtar=static
16 else
17 LIBARCHIVE_CONF_OPTS += --enable-bsdtar=shared
18 endif
19 else
20 LIBARCHIVE_CONF_OPTS += --disable-bsdtar
21 endif
23 ifeq ($(BR2_PACKAGE_LIBARCHIVE_BSDCPIO),y)
24 ifeq ($(BR2_STATIC_LIBS),y)
25 LIBARCHIVE_CONF_OPTS += --enable-bsdcpio=static
26 else
27 LIBARCHIVE_CONF_OPTS += --enable-bsdcpio=shared
28 endif
29 else
30 LIBARCHIVE_CONF_OPTS += --disable-bsdcpio
31 endif
33 ifeq ($(BR2_PACKAGE_LIBARCHIVE_BSDCAT),y)
34 ifeq ($(BR2_STATIC_LIBS),y)
35 LIBARCHIVE_CONF_OPTS += --enable-bsdcat=static
36 else
37 LIBARCHIVE_CONF_OPTS += --enable-bsdcat=shared
38 endif
39 else
40 LIBARCHIVE_CONF_OPTS += --disable-bsdcat
41 endif
43 ifeq ($(BR2_PACKAGE_ACL),y)
44 LIBARCHIVE_DEPENDENCIES += acl
45 else
46 LIBARCHIVE_CONF_OPTS += --disable-acl
47 endif
49 ifeq ($(BR2_PACKAGE_ATTR),y)
50 LIBARCHIVE_DEPENDENCIES += attr
51 else
52 LIBARCHIVE_CONF_OPTS += --disable-xattr
53 endif
55 ifeq ($(BR2_PACKAGE_BZIP2),y)
56 LIBARCHIVE_CONF_OPTS += --with-bz2lib
57 LIBARCHIVE_DEPENDENCIES += bzip2
58 else
59 LIBARCHIVE_CONF_OPTS += --without-bz2lib
60 endif
62 ifeq ($(BR2_PACKAGE_EXPAT),y)
63 LIBARCHIVE_DEPENDENCIES += expat
64 else
65 LIBARCHIVE_CONF_OPTS += --without-expat
66 endif
68 ifeq ($(BR2_PACKAGE_LIBICONV),y)
69 LIBARCHIVE_DEPENDENCIES += libiconv
70 else
71 LIBARCHIVE_CONF_OPTS += --without-libiconv-prefix
72 endif
74 ifeq ($(BR2_PACKAGE_LIBXML2),y)
75 LIBARCHIVE_DEPENDENCIES += libxml2
76 LIBARCHIVE_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config
77 else
78 LIBARCHIVE_CONF_OPTS += --without-xml2
79 endif
81 ifeq ($(BR2_PACKAGE_LZO),y)
82 LIBARCHIVE_DEPENDENCIES += lzo
83 else
84 LIBARCHIVE_CONF_OPTS += --without-lzo2
85 endif
87 ifeq ($(BR2_PACKAGE_NETTLE),y)
88 LIBARCHIVE_DEPENDENCIES += nettle
89 else
90 LIBARCHIVE_CONF_OPTS += --without-nettle
91 endif
93 ifeq ($(BR2_PACKAGE_OPENSSL),y)
94 LIBARCHIVE_DEPENDENCIES += openssl
95 else
96 LIBARCHIVE_CONF_OPTS += --without-openssl
97 endif
99 ifeq ($(BR2_PACKAGE_ZLIB),y)
100 LIBARCHIVE_DEPENDENCIES += zlib
101 else
102 LIBARCHIVE_CONF_OPTS += --without-zlib
103 endif
105 # libarchive requires LZMA with thread support in the toolchain
106 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_PACKAGE_XZ),yy)
107 LIBARCHIVE_DEPENDENCIES += xz
108 LIBARCHIVE_CONF_OPTS += --with-lzma
109 else
110 LIBARCHIVE_CONF_OPTS += --without-lzma
111 endif
113 # The only user of host-libarchive needs zlib support
114 HOST_LIBARCHIVE_DEPENDENCIES = host-zlib
115 HOST_LIBARCHIVE_CONF_OPTS = \
116 --disable-bsdtar \
117 --disable-bsdcpio \
118 --disable-bsdcat \
119 --disable-acl \
120 --disable-xattr \
121 --without-bz2lib \
122 --without-expat \
123 --without-libiconv-prefix \
124 --without-xml2 \
125 --without-lzo2 \
126 --without-nettle \
127 --without-openssl \
128 --without-lzma
130 $(eval $(autotools-package))
131 $(eval $(host-autotools-package))