summaryrefslogtreecommitdiff
path: root/dev-cpp/cpp-httplib/files
diff options
context:
space:
mode:
authorAlexey Sokolov <alexey+gentoo@asokolov.org>2025-04-04 22:47:19 +0100
committerSam James <sam@gentoo.org>2025-04-28 21:42:00 +0100
commit24c2c7655e0800006754698e54505ad99ff3290e (patch)
tree79e5207a29f13cf4b49968815c7f1a98b47453d7 /dev-cpp/cpp-httplib/files
parentb2db8dd194d82f1e58079f051f651a937d591a46 (diff)
downloadgentoo-24c2c7655e0800006754698e54505ad99ff3290e.tar.gz
gentoo-24c2c7655e0800006754698e54505ad99ff3290e.tar.bz2
gentoo-24c2c7655e0800006754698e54505ad99ff3290e.zip
dev-cpp/cpp-httplib: fix dependency on zstd for users of library
Closes: https://bugs.gentoo.org/953066 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Part-of: https://github.com/gentoo/gentoo/pull/41458 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp/cpp-httplib/files')
-rw-r--r--dev-cpp/cpp-httplib/files/cpp-httplib-0.20.0-zstd2.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-cpp/cpp-httplib/files/cpp-httplib-0.20.0-zstd2.patch b/dev-cpp/cpp-httplib/files/cpp-httplib-0.20.0-zstd2.patch
new file mode 100644
index 000000000000..73f33e64268f
--- /dev/null
+++ b/dev-cpp/cpp-httplib/files/cpp-httplib-0.20.0-zstd2.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/953066
+https://github.com/yhirose/cpp-httplib/pull/2126
+
+--- a/cmake/httplibConfig.cmake.in
++++ b/cmake/httplibConfig.cmake.in
+@@ -39,7 +39,25 @@ if(@HTTPLIB_IS_USING_BROTLI@)
+ endif()
+
+ if(@HTTPLIB_IS_USING_ZSTD@)
+- find_dependency(zstd)
++ set(httplib_fd_zstd_quiet_arg)
++ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
++ set(httplib_fd_zstd_quiet_arg QUIET)
++ endif()
++ set(httplib_fd_zstd_required_arg)
++ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
++ set(httplib_fd_zstd_required_arg REQUIRED)
++ endif()
++ find_package(zstd QUIET)
++ if(NOT zstd_FOUND)
++ find_package(PkgConfig ${httplib_fd_zstd_quiet_arg} ${httplib_fd_zstd_required_arg})
++ if(PKG_CONFIG_FOUND)
++ pkg_check_modules(zstd ${httplib_fd_zstd_quiet_arg} ${httplib_fd_zstd_required_arg} IMPORTED_TARGET libzstd)
++
++ if(TARGET PkgConfig::zstd)
++ add_library(zstd::libzstd ALIAS PkgConfig::zstd)
++ endif()
++ endif()
++ endif()
+ set(httplib_zstd_FOUND ${zstd_FOUND})
+ endif()
+