dev-cpp/cpprest: New package.
REST SDK using an asynchronous C++ API design. Dependency for app-i18n/poedit.
This commit is contained in:
parent
776898dfaf
commit
21c8cf6d12
1
dev-cpp/cpprest/Manifest
Normal file
1
dev-cpp/cpprest/Manifest
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DIST cpprest-2.10.18.tar.gz 1747792 BLAKE2B c2ea22cb09c39cb3c1d0936ae896c79172b92b5c4db46d9204988ec0012d74e901bcc24232b6971faae8adc03a41e4563fcc2a6d4aade2a33cdc3a1c9e36fff0 SHA512 5f0699e7ba509e16d6a3000e6ac448f6dbc134b8e03de9ab174ba749ad7efa76cbfccb623b226d82f5dba35ef6292f0cdf121b5315d524a5a28454038d420fab
|
68
dev-cpp/cpprest/cpprest-2.10.18.ebuild
Normal file
68
dev-cpp/cpprest/cpprest-2.10.18.ebuild
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# Copyright 2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit cmake
|
||||||
|
|
||||||
|
DESCRIPTION="REST SDK using an asynchronous C++ API design"
|
||||||
|
HOMEPAGE="https://github.com/Microsoft/cpprestsdk"
|
||||||
|
SRC_URI="https://github.com/microsoft/cpprestsdk/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
S="${WORKDIR}/cpprestsdk-${PV}"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
IUSE="brotli test +websockets"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
|| (
|
||||||
|
<dev-libs/boost-1.77.0[nls,threads]
|
||||||
|
>=dev-libs/boost-1.77.0[nls]
|
||||||
|
)
|
||||||
|
dev-libs/openssl
|
||||||
|
sys-libs/zlib
|
||||||
|
brotli? ( app-arch/brotli )
|
||||||
|
websockets? ( dev-cpp/websocketpp )
|
||||||
|
"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
my_disable_tests() {
|
||||||
|
local my_cmake_file="${1}"
|
||||||
|
local -n my_tests="${2}"
|
||||||
|
|
||||||
|
for file in "${my_tests[@]}"; do
|
||||||
|
sed -i "/${file}/d" "Release/tests/${my_cmake_file}" || die
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
local -a my_http_client_tests=(
|
||||||
|
"authentication_tests.cpp"
|
||||||
|
"connections_and_errors.cpp"
|
||||||
|
"outside_tests.cpp"
|
||||||
|
"redirect_tests.cpp"
|
||||||
|
)
|
||||||
|
my_disable_tests "functional/http/client/CMakeLists.txt" my_http_client_tests
|
||||||
|
|
||||||
|
local -a my_websockets_tests=(
|
||||||
|
"authentication_tests.cpp"
|
||||||
|
)
|
||||||
|
my_disable_tests "functional/websockets/CMakeLists.txt" my_websockets_tests
|
||||||
|
|
||||||
|
cmake_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local -a mycmakeargs=(
|
||||||
|
"-DWERROR=OFF"
|
||||||
|
"-DBUILD_SAMPLES=OFF"
|
||||||
|
"-DCPPREST_EXCLUDE_WEBSOCKETS=$(usex websockets OFF ON)"
|
||||||
|
"-DBUILD_TESTS=$(usex test ON OFF)"
|
||||||
|
"-DCPPREST_EXCLUDE_BROTLI=$(usex brotli OFF ON)"
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake_src_configure
|
||||||
|
}
|
15
dev-cpp/cpprest/metadata.xml
Normal file
15
dev-cpp/cpprest/metadata.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>gentoo@tastytea.de</email>
|
||||||
|
<name>tastytea</name>
|
||||||
|
</maintainer>
|
||||||
|
<upstream>
|
||||||
|
<bugs-to>https://github.com/microsoft/cpprestsdk/issues</bugs-to>
|
||||||
|
</upstream>
|
||||||
|
<use>
|
||||||
|
<flag name="websockets">Support the WebSocket protocol</flag>
|
||||||
|
<flag name="brotli">Enable brotli compression/decompression support</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
Reference in New Issue
Block a user