b0d949d7a89b94189690b44b9ba8257da30ade18
[vlc.git] / contrib / src / libarchive / rules.mak
1 # LIBARCHIVE
2 LIBARCHIVE_VERSION := 3.3.1
3 LIBARCHIVE_URL := http://www.libarchive.org/downloads/libarchive-$(LIBARCHIVE_VERSION).tar.gz
4
5 PKGS += libarchive
6 ifeq ($(call need_pkg,"libarchive >= 3.2.0"),)
7 PKGS_FOUND += libarchive
8 endif
9
10 DEPS_libarchive = zlib
11
12 $(TARBALLS)/libarchive-$(LIBARCHIVE_VERSION).tar.gz:
13         $(call download_pkg,$(LIBARCHIVE_URL),libarchive)
14
15 .sum-libarchive: libarchive-$(LIBARCHIVE_VERSION).tar.gz
16
17 libarchive: libarchive-$(LIBARCHIVE_VERSION).tar.gz .sum-libarchive
18         $(UNPACK)
19         $(APPLY) $(SRC)/libarchive/0001-Fix-build-failure-without-STATVFS.patch
20 ifdef HAVE_ANDROID
21         $(APPLY) $(SRC)/libarchive/android.patch
22 endif
23 ifdef HAVE_WINSTORE
24         $(APPLY) $(SRC)/libarchive/no-windows-files.patch
25         $(APPLY) $(SRC)/libarchive/winrt.patch
26 endif
27         $(APPLY) $(SRC)/libarchive/fix-types.patch
28         $(call pkg_static,"build/pkgconfig/libarchive.pc.in")
29         $(MOVE)
30
31 .libarchive: libarchive
32         cd $< && $(HOSTVARS) ./configure $(HOSTCONF) \
33                 --disable-bsdcpio --disable-bsdtar --disable-bsdcat \
34                 --without-nettle \
35                 --without-xml2 --without-lzma --without-iconv --without-expat
36         cd $< && $(MAKE) install
37         touch $@