From bbc08b15ae60c3008fb8cbff59dc329d8357c563 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 16 Sep 2023 17:10:15 +0200 Subject: [PATCH] package/libarchive: add bsdunzip option Add bsdunzip option to avoid the following build failure raised since bump to version 3.7.1 in commit 7991d2c48a859f9c0333ade8192868c21b1a8a31 and https://github.com/libarchive/libarchive/commit/c157e4ce8eb170a92945cc2d292fd7106bdfcce1: CCLD bsdunzip /home/autobuild/autobuild/instance-4/output-1/host/lib/gcc/powerpc-buildroot-linux-musl/12.3.0/../../../../powerpc-buildroot-linux-musl/bin/ld: cannot find -lz: No such file or directory By handling it explicitly, we can specify whether the dynamic or static library should be used, according to what we actually have available. Fixes: - http://autobuild.buildroot.org/results/aaf7fdefa0b7bd7e5ac743487c197544c1a2ce6f Signed-off-by: Fabrice Fontaine Tested-by: Bernd Kuhls Signed-off-by: Arnout Vandecappelle --- package/libarchive/Config.in | 6 ++++++ package/libarchive/libarchive.mk | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/package/libarchive/Config.in b/package/libarchive/Config.in index ffa4cff7b3..2c8d813ccb 100644 --- a/package/libarchive/Config.in +++ b/package/libarchive/Config.in @@ -30,4 +30,10 @@ config BR2_PACKAGE_LIBARCHIVE_BSDCAT The 'bsdcat' program is a simple replacement tool for zcat, bzcat, xzcat, and such. +config BR2_PACKAGE_LIBARCHIVE_BSDUNZIP + bool "bsdunzip" + help + The 'bsdunzip' program is a simple replacement tool + for Info-ZIP. + endif diff --git a/package/libarchive/libarchive.mk b/package/libarchive/libarchive.mk index 1a50b0472d..7d58b5c69f 100644 --- a/package/libarchive/libarchive.mk +++ b/package/libarchive/libarchive.mk @@ -46,6 +46,16 @@ else LIBARCHIVE_CONF_OPTS += --disable-bsdcat endif +ifeq ($(BR2_PACKAGE_LIBARCHIVE_BSDUNZIP),y) +ifeq ($(BR2_STATIC_LIBS),y) +LIBARCHIVE_CONF_OPTS += --enable-bsdunzip=static +else +LIBARCHIVE_CONF_OPTS += --enable-bsdunzip=shared +endif +else +LIBARCHIVE_CONF_OPTS += --disable-bsdunzip +endif + ifeq ($(BR2_PACKAGE_ACL),y) LIBARCHIVE_DEPENDENCIES += acl else