mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-29 22:28:08 -07:00
dev-cpp/cpp-httplib: add 0.36.0
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Part-of: https://codeberg.org/gentoo/gentoo/pulls/182 Merges: https://codeberg.org/gentoo/gentoo/pulls/182 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
a0e69eee77
commit
ca758b752f
@@ -2,3 +2,4 @@ DIST cpp-httplib-0.26.0.tar.gz 1305573 BLAKE2B 4fcb11a4d3af71fa5b67f2dac7c0f3e0a
|
||||
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
|
||||
DIST cpp-httplib-0.32.0.tar.gz 1380621 BLAKE2B 501e9f6f4076d2a6b2b1526d9b2d39effdd382d9967d546f157472ac4ec9943d6b35fdb66825a3e000698f6be5b7ead6d5ddd658841f24c6da0e8babc424a89f SHA512 09ab022b36ac6a7faf73863a504c460edb975669edfbf6323a4d42d3e4e38e4b6e63bc95ee39b29871730abf5205f9a3bd1ff9a04fc8ba921f1ecf6c357deef4
|
||||
DIST cpp-httplib-0.36.0.tar.gz 1559469 BLAKE2B 83548b85c25e28b90dbd596695189c20e9ef0c98384b133a51a3de0d56ef223895582effb0918df520f69c9fbaa0e970396da63255470f6fa44d99e40964bad3 SHA512 e7d87596c919296ccb07f0b2b8efd286c8b872994d2a83c039db83c8a0620842cca0b31e54ff60e8d8c9b0c1c3c2d9b510ad7a58dd3553370aea01adebe0e211
|
||||
|
||||
100
dev-cpp/cpp-httplib/cpp-httplib-0.36.0.ebuild
Normal file
100
dev-cpp/cpp-httplib/cpp-httplib-0.36.0.ebuild
Normal file
@@ -0,0 +1,100 @@
|
||||
# Copyright 2022-2026 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 mbedtls ssl test zlib zstd"
|
||||
REQUIRED_USE="test? ( brotli zlib zstd )"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
brotli? (
|
||||
app-arch/brotli:=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
ssl? (
|
||||
mbedtls? ( net-libs/mbedtls:3=[${MULTILIB_USEDEP}] )
|
||||
!mbedtls? ( >=dev-libs/openssl-3.0.13:=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
zlib? (
|
||||
virtual/zlib:=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
zstd? (
|
||||
app-arch/zstd[${MULTILIB_USEDEP}]
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
test? (
|
||||
dev-cpp/gtest
|
||||
dev-libs/openssl
|
||||
net-misc/curl
|
||||
)
|
||||
"
|
||||
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_MBEDTLS_IF_AVAILABLE=no
|
||||
-DHTTPLIB_USE_WOLFSSL_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 $(usex mbedtls no yes))
|
||||
-DHTTPLIB_REQUIRE_MBEDTLS=$(usex ssl $(usex mbedtls))
|
||||
-DHTTPLIB_REQUIRE_ZLIB=$(usex zlib)
|
||||
-DHTTPLIB_REQUIRE_ZSTD=$(usex zstd)
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
)
|
||||
cmake-multilib_src_configure
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
if [[ ${ABI} == x86 ]]; then
|
||||
ewarn "Upstream no longer supports 32 bits:"
|
||||
ewarn https://github.com/yhirose/cpp-httplib/issues/2148
|
||||
return
|
||||
fi
|
||||
|
||||
cp -p -R --reflink=auto "${S}/test" ./test || die
|
||||
|
||||
local -a failing_tests=(
|
||||
# Disable all online tests.
|
||||
"*.*_Online"
|
||||
)
|
||||
|
||||
# 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=.
|
||||
}
|
||||
Reference in New Issue
Block a user