mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 08:58:27 -07:00
dev-cpp/cpp-httplib: add 0.50.1
Closes: https://bugs.gentoo.org/972361 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1335 Merges: https://codeberg.org/gentoo/gentoo/pulls/1335 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
9a1c7a9dcf
commit
0d4e89a0a1
@@ -1 +1,2 @@
|
||||
DIST cpp-httplib-0.38.0.tar.gz 1458103 BLAKE2B d94aad7aeef09770473e93c7ef88951a9911f98a2d0d77bc3a0ae9bd0e7868eb92ad57b49d381c1e6b5ea8229e1f3c5a9f28823277c20daa994d17e212176bbd SHA512 d8dfd5a447db4d6eb2a92c498af18cb3bf999ed43ef9a9552a8781f9c23597a3d178d2a15f5fa0afb68f2ec278080e6d4808cef5cfa68a8ed5f0c57b42bdbee7
|
||||
DIST cpp-httplib-0.50.1.tar.gz 1896535 BLAKE2B 00b0942cc296c24b342cfec62126801766dbd8f1d6f983fef81fb75b6bc57a0cbf5eb457c9d9a30488ec4ae58803962b84f52c87d3f05e84fcda97ead8fbed84 SHA512 7f670f1ecf31590b8dba671b4cc18982d5c4e1c31d2edda635397872a3c58b69e067dddb7ac9fe8a5be48b850b40ff5b57eae93bd29c3fded1c6b0f27824b980
|
||||
|
||||
100
dev-cpp/cpp-httplib/cpp-httplib-0.50.1.ebuild
Normal file
100
dev-cpp/cpp-httplib/cpp-httplib-0.50.1.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_{12..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 ~arm64 ~hppa ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc"
|
||||
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 [[ $(tc-get-ptr-size) == 4 ]] ; 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