dev-cpp/cpr - 1.14.2 (parona-overlay)

Search

Package Information

Description:
C++ Requests: Curl for People, a spiritual port of Python Requests.
Homepage:
https://docs.libcpr.org/ https://github.com/libcpr/cpr/
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
1.14.2 8 ~amd64 0
View Raw Ebuild
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="C++ Requests: Curl for People, a spiritual port of Python Requests."
HOMEPAGE="
	https://docs.libcpr.org/
	https://github.com/libcpr/cpr/
"

MONGOOSE_VER="7.7"

SRC_URI="
	https://github.com/libcpr/cpr/archive/refs/tags/${PV}.tar.gz
		-> ${P}.tar.gz
	test? (
		https://github.com/cesanta/mongoose/archive/${MONGOOSE_VER}.tar.gz
			-> mongoose-${MONGOOSE_VER}.tar.gz
	)
"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

IUSE="test"

RESTRICT="test"
PROPERTIES="test_network"

#TODO: other ssl backends
RDEPEND="
	dev-libs/openssl:=
	net-libs/libpsl
	net-misc/curl[psl(-)]
"
DEPEND="
	${RDEPEND}
	test? (
		dev-cpp/gtest
	)
"

src_prepare() {
	cmake_src_prepare

	sed -i -e 's/-Werror//' CMakeLists.txt || die
}

src_configure() {
	local mycmakeargs=(
		-DCPR_USE_SYSTEM_GTEST=ON
		-DCPR_USE_SYSTEM_CURL=ON
		-DCPR_USE_SYSTEM_LIB_PSL=ON
		-DCPR_FORCE_OPENSSL_BACKEND=ON
		-DCPR_BUILD_TESTS=$(usex test)
	)
	use test && mycmakeargs+=(
		-DFETCHCONTENT_SOURCE_DIR_MONGOOSE="${WORKDIR}/mongoose-${MONGOOSE_VER}"
	)
	cmake_src_configure
}

src_test() {
	# Flaky tests otherwise
	cmake_src_test -j1 --timeout=10 --repeat until-pass:5
}

USE Flags

Dependencies

DEPEND

	
	dev-libs/openssl:=
	net-libs/libpsl
	net-misc/curl[psl(-)]

	test? (
		dev-cpp/gtest
	)

RDEPEND

	dev-libs/openssl:=
	net-libs/libpsl
	net-misc/curl[psl(-)]

Manifest for 1.14.2

Type File Size Source URLs
DIST cpr-1.14.2.tar.gz 156989 bytes https://github.com/libcpr/cpr/archive/refs/tags/1.14.2.tar.gz
DIST mongoose-7.7.tar.gz 2117251 bytes https://github.com/cesanta/mongoose/archive/7.7.tar.gz