mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-29 22:28:08 -07:00
dev-cpp/cpp-httplib: add 0.38.0
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Part-of: https://codeberg.org/gentoo/gentoo/pulls/328 Merges: https://codeberg.org/gentoo/gentoo/pulls/328 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
f7221036b2
commit
e1820e62fc
@@ -3,3 +3,4 @@ DIST cpp-httplib-0.27.0.tar.gz 1311061 BLAKE2B b273d9ac6a79d74b47d27b49357f0d9ae
|
||||
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.37.0.tar.gz 1448679 BLAKE2B 393286afc934b9ee2355cea504ff9ddcbecab3b3237c3c35292737a73e20c6f2338157abc8b8922126c3a360eeb43475262bf3f24250751374082cf172412d90 SHA512 5efa8140aadffe105dcf39935b732476e95755f6c7473ada3d0b64df2bc02c557633ae3948a25b45e1cf67e89a3ff6329fb30362e4ac033b9a1d1e453aa2eded
|
||||
DIST cpp-httplib-0.38.0.tar.gz 1458103 BLAKE2B d94aad7aeef09770473e93c7ef88951a9911f98a2d0d77bc3a0ae9bd0e7868eb92ad57b49d381c1e6b5ea8229e1f3c5a9f28823277c20daa994d17e212176bbd SHA512 d8dfd5a447db4d6eb2a92c498af18cb3bf999ed43ef9a9552a8781f9c23597a3d178d2a15f5fa0afb68f2ec278080e6d4808cef5cfa68a8ed5f0c57b42bdbee7
|
||||
|
||||
100
dev-cpp/cpp-httplib/cpp-httplib-0.38.0.ebuild
Normal file
100
dev-cpp/cpp-httplib/cpp-httplib-0.38.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