mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-04 13:47:35 -08:00
dev-cpp/cpp-httplib: fix build with zstd
Closes: https://bugs.gentoo.org/952844 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Closes: https://github.com/gentoo/gentoo/pull/41354 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
8e47ed1340
commit
4abc2fca7c
@ -46,8 +46,13 @@ DEPEND="
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-zstd.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local -a mycmakeargs=(
|
||||
-DHTTPLIB_COMPILE=yes
|
||||
|
||||
22
dev-cpp/cpp-httplib/files/cpp-httplib-0.20.0-zstd.patch
Normal file
22
dev-cpp/cpp-httplib/files/cpp-httplib-0.20.0-zstd.patch
Normal file
@ -0,0 +1,22 @@
|
||||
https://github.com/yhirose/cpp-httplib/pull/2121
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -159,10 +159,16 @@ elseif(HTTPLIB_USE_BROTLI_IF_AVAILABLE)
|
||||
endif()
|
||||
|
||||
if(HTTPLIB_REQUIRE_ZSTD)
|
||||
- find_package(zstd REQUIRED)
|
||||
+ find_package(zstd)
|
||||
+ if(NOT zstd_FOUND)
|
||||
+ find_package(PkgConfig REQUIRED)
|
||||
+ pkg_check_modules(zstd REQUIRED IMPORTED_TARGET libzstd)
|
||||
+ add_library(zstd::libzstd ALIAS PkgConfig::zstd)
|
||||
+ endif()
|
||||
set(HTTPLIB_IS_USING_ZSTD TRUE)
|
||||
elseif(HTTPLIB_USE_ZSTD_IF_AVAILABLE)
|
||||
find_package(zstd QUIET)
|
||||
+ # TODO: try to find it via pkg-config
|
||||
set(HTTPLIB_IS_USING_ZSTD ${zstd_FOUND})
|
||||
endif()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user