# vim: ft=make ts=4 sw=4 noet
.DEFAULT_GOAL := all
NAME    = libarchive
VERSION = 3.8.1
GARTYPE = v2

MASTER_SITES =
DYNURLS = https://github.com/libarchive/libarchive/releases/download/v$(VERSION)/$(DISTNAME).tar.gz
DISTFILES   += $(DISTNAME).tar.gz
LICENSE = COPYING

BUILD_DEP_PKGS                        += OZSWbzip2 OZSWxz OZSWzlib
RUNTIME_DEP_PKGS_OZSWlibarchive       += OZSWbzip2 OZSWxz OZSWzlib
PACKAGES                    += OZSWlibarchive
SPKG_DESC_OZSWlibarchive     = Multi-format archive and compression library
CATALOGNAME_OZSWlibarchive  = libarchive

EXTENSIONS = 1

EXTRA_CONFIGURE_ARGS += --without-lzma
EXTRA_CONFIGURE_ARGS += --with-bz2lib=$(prefix)
EXTRA_CONFIGURE_ARGS += --with-zlib=$(prefix)
EXTRA_CONFIGURE_ARGS += --disable-bsdunzip
EXTRA_CONFIGURE_ARGS += --without-openssl
EXTRA_CONFIGURE_ARGS += --without-nettle
EXTRA_CONFIGURE_ARGS += --without-xml2
EXTRA_CONFIGURE_ARGS += --without-expat

post-configure:
	@find $(WORKSRC) -name "libtool" -type f -exec \
	    gsed -i 's/ECHO="print -r --"/ECHO="printf %s\\n"/g' {} \;
	@$(MAKECOOKIE)

include gar/category.mk
