From: Mostyn Bramley-Moore Date: Sun, 1 Dec 2024 23:29:46 +0000 (+0100) Subject: Test with XZ Utils 5.6.3 on windows CI jobs (#2417) X-Git-Tag: v3.8.0~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=84ad8745308463d0e2e7e067b1eda99db5a661b1;p=thirdparty%2Flibarchive.git Test with XZ Utils 5.6.3 on windows CI jobs (#2417) This change fixes the autotools build to work with xz-utils 5.6.3, which changed library names on windows, and fixes a couple of tests that I noticed had dependencies on liblzma. --- diff --git a/build/ci/github_actions/ci.cmd b/build/ci/github_actions/ci.cmd index 515e6c732..ac3a7dd37 100755 --- a/build/ci/github_actions/ci.cmd +++ b/build/ci/github_actions/ci.cmd @@ -1,7 +1,7 @@ @ECHO OFF SET ZLIB_VERSION=1.3 SET BZIP2_VERSION=1ea1ac188ad4b9cb662e3f8314673c63df95a589 -SET XZ_VERSION=5.4.4 +SET XZ_VERSION=5.6.3 IF NOT "%BE%"=="mingw-gcc" ( IF NOT "%BE%"=="msvc" ( ECHO Environment variable BE must be mingw-gcc or msvc diff --git a/configure.ac b/configure.ac index 0fdfaf06a..6c7ed74ef 100644 --- a/configure.ac +++ b/configure.ac @@ -491,8 +491,16 @@ AC_ARG_WITH([lzma], AS_HELP_STRING([--without-lzma], [Don't build support for xz through lzma])) if test "x$with_lzma" != "xno"; then + PKG_PROG_PKG_CONFIG + PKG_CHECK_MODULES(LZMA_PC, [liblzma], [ + CPPFLAGS="${CPPFLAGS} ${LZMA_PC_CFLAGS}" + LIBS="${LIBS} ${LZMA_PC_LIBS}" + AC_DEFINE(HAVE_LIBLZMA, [1], [Define to 1 if you have the `lzma' library.]) + ], [ + AC_CHECK_LIB(lzma,lzma_stream_decoder) + ]) AC_CHECK_HEADERS([lzma.h]) - AC_CHECK_LIB(lzma,lzma_stream_decoder) + # Some pre-release (but widely distributed) versions of liblzma # included a disabled version of lzma_stream_encoder_mt that # fools a naive AC_CHECK_LIB or AC_CHECK_FUNC, so we need diff --git a/libarchive/test/test_read_format_7zip.c b/libarchive/test/test_read_format_7zip.c index e2eaf4889..8f990e49e 100644 --- a/libarchive/test/test_read_format_7zip.c +++ b/libarchive/test/test_read_format_7zip.c @@ -929,6 +929,10 @@ DEFINE_TEST(test_read_format_7zip_zstd) if (ARCHIVE_OK != archive_read_support_filter_zstd(a)) { skipping( "7zip:zstd decoding is not supported on this platform"); + } else if (ARCHIVE_OK != archive_read_support_filter_xz(a)) { + // The directory header entries in the test file uses lzma. + skipping( + "7zip:lzma decoding is not supported on this platform"); } else { test_extract_all_files_zstd("test_read_format_7zip_zstd.7z"); } @@ -946,6 +950,10 @@ DEFINE_TEST(test_read_format_7zip_zstd_solid) if (ARCHIVE_OK != archive_read_support_filter_zstd(a)) { skipping( "7zip:zstd decoding is not supported on this platform"); + } else if (ARCHIVE_OK != archive_read_support_filter_xz(a)) { + // The directory header entries in the test file uses lzma. + skipping( + "7zip:lzma decoding is not supported on this platform"); } else { test_extract_all_files_zstd("test_read_format_7zip_solid_zstd.7z"); }