diff --git a/dev-cpp/cpprest/Manifest b/dev-cpp/cpprest/Manifest new file mode 100644 index 0000000..6647131 --- /dev/null +++ b/dev-cpp/cpprest/Manifest @@ -0,0 +1 @@ +DIST cpprest-2.10.18.tar.gz 1747792 BLAKE2B c2ea22cb09c39cb3c1d0936ae896c79172b92b5c4db46d9204988ec0012d74e901bcc24232b6971faae8adc03a41e4563fcc2a6d4aade2a33cdc3a1c9e36fff0 SHA512 5f0699e7ba509e16d6a3000e6ac448f6dbc134b8e03de9ab174ba749ad7efa76cbfccb623b226d82f5dba35ef6292f0cdf121b5315d524a5a28454038d420fab diff --git a/dev-cpp/cpprest/cpprest-2.10.18.ebuild b/dev-cpp/cpprest/cpprest-2.10.18.ebuild new file mode 100644 index 0000000..5127288 --- /dev/null +++ b/dev-cpp/cpprest/cpprest-2.10.18.ebuild @@ -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] + ) + 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 +} diff --git a/dev-cpp/cpprest/metadata.xml b/dev-cpp/cpprest/metadata.xml new file mode 100644 index 0000000..7e8ab60 --- /dev/null +++ b/dev-cpp/cpprest/metadata.xml @@ -0,0 +1,15 @@ + + + + + gentoo@tastytea.de + tastytea + + + https://github.com/microsoft/cpprestsdk/issues + + + Support the WebSocket protocol + Enable brotli compression/decompression support + +