2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2010-05-31 12:20:44 +01:00
|
|
|
|
|
|
|
PKG := libarchive
|
2017-03-05 03:41:39 +00:00
|
|
|
$(PKG)_WEBSITE := https://www.libarchive.org/
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_DESCR := Libarchive
|
2010-05-31 12:20:44 +01:00
|
|
|
$(PKG)_IGNORE :=
|
2017-07-24 06:37:45 +01:00
|
|
|
$(PKG)_VERSION := 3.3.2
|
|
|
|
$(PKG)_CHECKSUM := ed2dbd6954792b2c054ccf8ec4b330a54b85904a80cef477a1c74643ddafa0ce
|
2010-05-31 12:20:44 +01:00
|
|
|
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
|
|
|
|
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
|
2017-03-05 03:41:39 +00:00
|
|
|
$(PKG)_URL := https://www.libarchive.org/downloads/$($(PKG)_FILE)
|
2017-08-13 04:20:13 +01:00
|
|
|
$(PKG)_DEPS := gcc bzip2 libiconv libxml2 nettle openssl xz zlib
|
2010-05-31 12:20:44 +01:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2017-03-05 03:41:39 +00:00
|
|
|
$(WGET) -q -O- 'https://www.libarchive.org/downloads/' | \
|
2010-05-31 12:20:44 +01:00
|
|
|
$(SED) -n 's,.*libarchive-\([0-9][^<]*\)\.tar.*,\1,p' | \
|
2014-04-10 18:56:12 +01:00
|
|
|
$(SORT) -V | \
|
|
|
|
tail -1
|
2010-05-31 12:20:44 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2014-04-15 12:24:07 +01:00
|
|
|
$(if $(BUILD_STATIC),\
|
|
|
|
$(SED) -i '1i#ifndef LIBARCHIVE_STATIC\n#define LIBARCHIVE_STATIC\n#endif' -i '$(1)/libarchive/archive.h'
|
|
|
|
$(SED) -i '1i#ifndef LIBARCHIVE_STATIC\n#define LIBARCHIVE_STATIC\n#endif' -i '$(1)/libarchive/archive_entry.h')
|
2017-08-13 04:20:13 +01:00
|
|
|
|
|
|
|
# use nettle instead of bcrypt for CNG(Crypto Next Generation)
|
2017-08-13 04:31:25 +01:00
|
|
|
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
|
2014-04-15 12:24:07 +01:00
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2010-05-31 12:20:44 +01:00
|
|
|
--disable-bsdtar \
|
|
|
|
--disable-bsdcpio \
|
2014-04-10 18:56:12 +01:00
|
|
|
--disable-bsdcat \
|
2017-08-13 04:20:13 +01:00
|
|
|
--without-cng \
|
|
|
|
--with-nettle \
|
2010-05-31 12:20:44 +01:00
|
|
|
XML2_CONFIG='$(PREFIX)/$(TARGET)'/bin/xml2-config
|
2017-08-13 04:31:25 +01:00
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' man_MANS=
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j 1 install man_MANS=
|
2010-06-15 17:36:52 +01:00
|
|
|
|
|
|
|
'$(TARGET)-gcc' \
|
|
|
|
-W -Wall -Werror -ansi -pedantic \
|
2016-07-30 20:14:38 +01:00
|
|
|
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libarchive.exe' \
|
2012-02-14 11:47:28 +00:00
|
|
|
`'$(TARGET)-pkg-config' --libs-only-l libarchive`
|
2010-05-31 12:20:44 +01:00
|
|
|
endef
|