libarchive: -> 3.7.2; cherry picked commit from upstream for lzma_stream detection, disabled iconv and testing
This commit is contained in:
parent
262c98c5ac
commit
f4cc55feb7
@ -1,5 +1,6 @@
|
|||||||
untrusted comment: verify with /etc/ports/core.pub
|
untrusted comment: verify with /etc/ports/core.pub
|
||||||
RWRJc1FUaeVeqpUoqDHBO4S9qLSIogDEX0QYwCUcGmUNLX9aEJ9THPiLvttAaWPSl/2GMek3+QucC90TUf6wf8djD80T6+M/EAE=
|
RWRJc1FUaeVeqrG9uutGWP6Pevs2GjvVrFAjzplIdI/O/FdPmyN3FZd283Iu1MPyKwpOZOaWUVK3Yc46mpWNKibQHFJ8kcIPzQ0=
|
||||||
SHA256 (Pkgfile) = 4cdd1cf60e4a9503f3a90145a876fce26226a5bbcf96fe7eff3f141c1d7f3fd3
|
SHA256 (Pkgfile) = f0a9ed1e345c630ae26637a350cbdf0df292d3db29dce6c4cb595fcc1b0e09af
|
||||||
SHA256 (.footprint) = d29a69eb36c351c70aecd8daa017736c3849dad5a2445fe682a50540a787c042
|
SHA256 (.footprint) = d29a69eb36c351c70aecd8daa017736c3849dad5a2445fe682a50540a787c042
|
||||||
SHA256 (libarchive-3.7.2.tar.xz) = 04357661e6717b6941682cde02ad741ae4819c67a260593dfb2431861b251acb
|
SHA256 (libarchive-3.7.2.tar.xz) = 04357661e6717b6941682cde02ad741ae4819c67a260593dfb2431861b251acb
|
||||||
|
SHA256 (lzma_stream.patch) = 0ef35ac67530d5ae3e4e39d968c4ba72a7a9806e4d98aa16aa8b608c76eb32c8
|
||||||
|
@ -5,20 +5,27 @@
|
|||||||
|
|
||||||
name=libarchive
|
name=libarchive
|
||||||
version=3.7.2
|
version=3.7.2
|
||||||
release=1
|
release=2
|
||||||
source=(https://github.com/libarchive/libarchive/releases/download/v$version/$name-$version.tar.xz)
|
source=(https://github.com/libarchive/libarchive/releases/download/v$version/$name-$version.tar.xz
|
||||||
|
lzma_stream.patch)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
patch -Np1 -d $name-$version -i $SRC/lzma_stream.patch
|
||||||
|
|
||||||
cmake -S $name-$version -B build -G Ninja \
|
cmake -S $name-$version -B build -G Ninja \
|
||||||
-D CMAKE_INSTALL_PREFIX=/usr \
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
||||||
-D CMAKE_BUILD_TYPE=Release \
|
-D CMAKE_BUILD_TYPE=Release \
|
||||||
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS -DHAVE_LZMA_STREAM_ENCODER_MT=1" \
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
||||||
-D ENABLE_TAR_SHARED=ON \
|
-D ENABLE_TAR_SHARED=ON \
|
||||||
|
-D ENABLE_ICONV=OFF \
|
||||||
-D ENABLE_LIBB2=OFF \
|
-D ENABLE_LIBB2=OFF \
|
||||||
-D ENABLE_LIBXML2=OFF \
|
-D ENABLE_LIBXML2=OFF \
|
||||||
-D ENABLE_NETTLE=OFF \
|
-D ENABLE_NETTLE=OFF \
|
||||||
|
-D ENABLE_TEST=OFF \
|
||||||
|
-D BUILD_TESTING=OFF \
|
||||||
-Wno-dev
|
-Wno-dev
|
||||||
cmake --build build -j ${JOBS:-1}
|
cmake --build build -j ${JOBS:-1}
|
||||||
DESTDIR=$PKG cmake --install build
|
DESTDIR=$PKG cmake --install build
|
||||||
|
|
||||||
ln -s $name.so.20 $PKG/usr/lib/$name.so.19
|
ln -s $name.so.20 $PKG/usr/lib/$name.so.19
|
||||||
}
|
}
|
||||||
|
39
libarchive/lzma_stream.patch
Normal file
39
libarchive/lzma_stream.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 2ba3d92706384be14cd376734f3f7ebe5648591e Mon Sep 17 00:00:00 2001
|
||||||
|
From: alice <alice@ayaya.dev>
|
||||||
|
Date: Sat, 23 Sep 2023 01:57:55 +0200
|
||||||
|
Subject: [PATCH] fix detection of lzma_stream_encoder_mt with Werror (#1965)
|
||||||
|
|
||||||
|
the function is marked as warn-unused-result, so by default in a Debug
|
||||||
|
build with cmake, when Werror is set, this fails to detect. do the same
|
||||||
|
for autotools.
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 2 +-
|
||||||
|
configure.ac | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index dc1fcc72a..6211fd8ac 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -523,7 +523,7 @@ IF(LIBLZMA_FOUND)
|
||||||
|
"#include <lzma.h>\nint main() {return (int)lzma_version_number(); }"
|
||||||
|
"WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC")
|
||||||
|
CHECK_C_SOURCE_COMPILES(
|
||||||
|
- "#include <lzma.h>\n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}"
|
||||||
|
+ "#include <lzma.h>\n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){int ignored __attribute__((unused)); ignored = lzma_stream_encoder_mt(0, 0); return 0;}"
|
||||||
|
HAVE_LZMA_STREAM_ENCODER_MT)
|
||||||
|
IF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC)
|
||||||
|
ADD_DEFINITIONS(-DLZMA_API_STATIC)
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 67235c5d9..79a13b53d 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -482,7 +482,7 @@ if test "x$with_lzma" != "xno"; then
|
||||||
|
[#if LZMA_VERSION < 50020000]
|
||||||
|
[#error unsupported]
|
||||||
|
[#endif]],
|
||||||
|
- [[lzma_stream_encoder_mt(0, 0);]])],
|
||||||
|
+ [[int ignored __attribute__((unused)); ignored = lzma_stream_encoder_mt(0, 0);]])],
|
||||||
|
[ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])])
|
||||||
|
if test "x$ac_cv_lzma_has_mt" != xno; then
|
||||||
|
AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.])
|
Loading…
x
Reference in New Issue
Block a user