commit:     2970dff819432bd2a14e323e5fabeee69fb98e68
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sun Dec  7 20:50:42 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Dec  9 15:17:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2970dff8

dev-cpp/cpp-httplib: add 0.28.0

Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Closes: https://github.com/gentoo/gentoo/pull/44944
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-cpp/cpp-httplib/Manifest                  |  1 +
 dev-cpp/cpp-httplib/cpp-httplib-0.28.0.ebuild | 88 +++++++++++++++++++++++++++
 2 files changed, 89 insertions(+)

diff --git a/dev-cpp/cpp-httplib/Manifest b/dev-cpp/cpp-httplib/Manifest
index d35601efcc0e..2ba636110844 100644
--- a/dev-cpp/cpp-httplib/Manifest
+++ b/dev-cpp/cpp-httplib/Manifest
@@ -1,2 +1,3 @@
 DIST cpp-httplib-0.26.0.tar.gz 1305573 BLAKE2B 
4fcb11a4d3af71fa5b67f2dac7c0f3e0a5cae6ed2bf527686ca05dd03b4a91042dfdcfb068b5dc7dd58fd31a537a44ae6f38df7c5d87a1973e3ff738a51dd946
 SHA512 
b364500f76e2ecb0fe21b032d831272e3f1dfeea71af74e325f8fc4ce9dcdb3c941b97a5b422bdeafb9facd058597b90f8bfc284fb9afe3c33fefa15dd5a010b
 DIST cpp-httplib-0.27.0.tar.gz 1311061 BLAKE2B 
b273d9ac6a79d74b47d27b49357f0d9ae61501cecba21b61cd53a74d056b9acdaeba530cdfd02111debaadab15c9076e44727997be32de3947eaf16ecdc846c5
 SHA512 
884d6be8209d8128af2b11c35d7fc592d8a236a65cdcd9b123a77aa73fbd0dbd03c1cbe17cf4dd92797b06d312c9476d59646b9034d8e559095852b021138acc
+DIST cpp-httplib-0.28.0.tar.gz 1312543 BLAKE2B 
af3d76280bf7299575e04cafd058f7bc223481d5c0316cc8a5d87850de6243174e138be0625e5939ff1c815003ba45c556d14f04b20a26c67bdca313b75e133c
 SHA512 
e7a8877d489c97669a8ee536e1498575be921e558ed947253013fe6b67a49d4569eedd01f543caa70183b92d8ac0e8687d662a70d880954412e387317008a239

diff --git a/dev-cpp/cpp-httplib/cpp-httplib-0.28.0.ebuild 
b/dev-cpp/cpp-httplib/cpp-httplib-0.28.0.ebuild
new file mode 100644
index 000000000000..6d76f85f4637
--- /dev/null
+++ b/dev-cpp/cpp-httplib/cpp-httplib-0.28.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+
+inherit cmake-multilib python-any-r1 toolchain-funcs
+
+DESCRIPTION="C++ HTTP/HTTPS server and client library"
+HOMEPAGE="https://github.com/yhirose/cpp-httplib/";
+
+if [[ "${PV}" == *9999* ]] ; then
+       inherit git-r3
+
+       EGIT_REPO_URI="https://github.com/yhirose/${PN}.git";
+else
+       SRC_URI="https://github.com/yhirose/${PN}/archive/v${PV}.tar.gz
+               -> ${P}.tar.gz"
+
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 0-2)"  # soversion
+
+IUSE="brotli ssl test zlib zstd"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       brotli? (
+               app-arch/brotli:=[${MULTILIB_USEDEP}]
+       )
+       ssl? (
+               >=dev-libs/openssl-3.0.13:=[${MULTILIB_USEDEP}]
+       )
+       zlib? (
+               virtual/zlib:=[${MULTILIB_USEDEP}]
+       )
+       zstd? (
+               app-arch/zstd[${MULTILIB_USEDEP}]
+       )
+"
+DEPEND="
+       ${RDEPEND}
+"
+BDEPEND="
+       ${PYTHON_DEPS}
+       virtual/pkgconfig
+"
+
+src_configure() {
+       local -a mycmakeargs=(
+               -DHTTPLIB_COMPILE=yes
+               -DHTTPLIB_SHARED=yes
+               -DHTTPLIB_USE_BROTLI_IF_AVAILABLE=no
+               -DHTTPLIB_USE_OPENSSL_IF_AVAILABLE=no
+               -DHTTPLIB_USE_ZLIB_IF_AVAILABLE=no
+               -DHTTPLIB_USE_ZSTD_IF_AVAILABLE=no
+               -DHTTPLIB_REQUIRE_BROTLI=$(usex brotli)
+               -DHTTPLIB_REQUIRE_OPENSSL=$(usex ssl)
+               -DHTTPLIB_REQUIRE_ZLIB=$(usex zlib)
+               -DHTTPLIB_REQUIRE_ZSTD=$(usex zstd)
+               -DPython3_EXECUTABLE="${PYTHON}"
+       )
+       cmake-multilib_src_configure
+}
+
+multilib_src_test() {
+       cp -p -R --reflink=auto "${S}/test" ./test || die
+
+       local -a failing_tests=(
+               # Disable all online tests.
+               "*.*_Online"
+
+               # Fails on musl x86:
+               ServerTest.GetRangeWithMaxLongLength
+               ServerTest.GetStreamedWithTooManyRanges
+       )
+
+       # Little dance to please the GTEST filter (join array using ":").
+       failing_tests_str="${failing_tests[@]}"
+       failing_tests_filter="${failing_tests_str// /:}"
+
+       # PREFIX is . to avoid calling "brew" and relying on stuff in /opt
+       GTEST_FILTER="-${failing_tests_filter}" emake -C test \
+               CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS} -I." PREFIX=.
+}

Reply via email to