diff options
author | Sam James <sam@gentoo.org> | 2023-02-14 23:57:32 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-15 01:29:23 +0000 |
commit | 59467b8282469d3878a8096c3d36422fc9d2d90f (patch) | |
tree | cfb6309c18a2e307bc0320c0836b12fd614cfcaa /app-arch | |
parent | dev-lang/go: make sure gold is available on arm/arm64 (diff) | |
download | gentoo-59467b8282469d3878a8096c3d36422fc9d2d90f.tar.gz gentoo-59467b8282469d3878a8096c3d36422fc9d2d90f.tar.bz2 gentoo-59467b8282469d3878a8096c3d36422fc9d2d90f.zip |
app-arch/zstd: fix build w/ USE=-zlib
Closes: https://bugs.gentoo.org/894058
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/zstd/files/zstd-1.5.4-fix-no-zlib-build.patch | 61 | ||||
-rw-r--r-- | app-arch/zstd/zstd-1.5.4-r2.ebuild | 15 |
2 files changed, 75 insertions, 1 deletions
diff --git a/app-arch/zstd/files/zstd-1.5.4-fix-no-zlib-build.patch b/app-arch/zstd/files/zstd-1.5.4-fix-no-zlib-build.patch new file mode 100644 index 000000000000..c6e65cbe2b16 --- /dev/null +++ b/app-arch/zstd/files/zstd-1.5.4-fix-no-zlib-build.patch @@ -0,0 +1,61 @@ +https://bugs.gentoo.org/894058 +https://github.com/facebook/zstd/pull/3497 + +From cc94fac7c879c47984bba7d60d5ce0c9834ff4c7 Mon Sep 17 00:00:00 2001 +From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca> +Date: Fri, 10 Feb 2023 19:30:30 -0500 +Subject: [PATCH] Use correct types in LZMA comp/decomp + +Bytef and uInt are zlib types, not available when zlib is disabled + +Fixes: 1598e6c634ac ("Async write for decompression") +Fixes: cc0657f27d81 ("AsyncIO compression part 2 - added async read and asyncio to compression code (#3022)") +--- + programs/fileio.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/programs/fileio.c b/programs/fileio.c +index 9a8300cdd8..d3ed9217d5 100644 +--- a/programs/fileio.c ++++ b/programs/fileio.c +@@ -1173,8 +1173,8 @@ FIO_compressLzmaFrame(cRess_t* ress, + } + + writeJob =AIO_WritePool_acquireJob(ress->writeCtx); +- strm.next_out = (Bytef*)writeJob->buffer; +- strm.avail_out = (uInt)writeJob->bufferSize; ++ strm.next_out = (BYTE*)writeJob->buffer; ++ strm.avail_out = writeJob->bufferSize; + strm.next_in = 0; + strm.avail_in = 0; + +@@ -1201,7 +1201,7 @@ FIO_compressLzmaFrame(cRess_t* ress, + writeJob->usedBufferSize = compBytes; + AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob); + outFileSize += compBytes; +- strm.next_out = (Bytef*)writeJob->buffer; ++ strm.next_out = (BYTE*)writeJob->buffer; + strm.avail_out = writeJob->bufferSize; + } } + if (srcFileSize == UTIL_FILESIZE_UNKNOWN) +@@ -2316,8 +2316,8 @@ FIO_decompressLzmaFrame(dRess_t* ress, + } + + writeJob = AIO_WritePool_acquireJob(ress->writeCtx); +- strm.next_out = (Bytef*)writeJob->buffer; +- strm.avail_out = (uInt)writeJob->bufferSize; ++ strm.next_out = (BYTE*)writeJob->buffer; ++ strm.avail_out = writeJob->bufferSize; + strm.next_in = (BYTE const*)ress->readCtx->srcBuffer; + strm.avail_in = ress->readCtx->srcBufferLoaded; + +@@ -2345,7 +2345,7 @@ FIO_decompressLzmaFrame(dRess_t* ress, + writeJob->usedBufferSize = decompBytes; + AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob); + outFileSize += decompBytes; +- strm.next_out = (Bytef*)writeJob->buffer; ++ strm.next_out = (BYTE*)writeJob->buffer; + strm.avail_out = writeJob->bufferSize; + } } + if (ret == LZMA_STREAM_END) break; + diff --git a/app-arch/zstd/zstd-1.5.4-r2.ebuild b/app-arch/zstd/zstd-1.5.4-r2.ebuild index fc646ce06670..3d848f5e471a 100644 --- a/app-arch/zstd/zstd-1.5.4-r2.ebuild +++ b/app-arch/zstd/zstd-1.5.4-r2.ebuild @@ -25,13 +25,26 @@ RDEPEND=" " DEPEND="${RDEPEND}" -PATCHES=( +MESON_PATCHES=( # Workaround until Valgrind bugfix lands "${FILESDIR}"/${PN}-1.5.4-no-find-valgrind.patch # Allow building tests w/o programs (useful for multilib) "${FILESDIR}"/${PN}-1.5.4-tests-no-programs.patch ) +PATCHES=( + # Fix build w/o zlib, bug #894058 + "${FILESDIR}"/${P}-fix-no-zlib-build.patch +) + +src_prepare() { + cd "${WORKDIR}"/${P} || die + default + + cd "${S}" || die + eapply "${MESON_PATCHES[@]}" +} + multilib_src_configure() { local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local |