summaryrefslogtreecommitdiff
path: root/dev-cpp
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-07-23 06:21:42 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-07-23 06:21:42 +0000
commita1156cc8d56496f79fb6ed94288abdef1fff9ced (patch)
treec25f23605ea0dc5034d21066c2a99f72291d9e2b /dev-cpp
parent397911122960c256c8c40222cdc704693badb90c (diff)
downloadbaldeagleos-repo-a1156cc8d56496f79fb6ed94288abdef1fff9ced.tar.gz
baldeagleos-repo-a1156cc8d56496f79fb6ed94288abdef1fff9ced.tar.xz
baldeagleos-repo-a1156cc8d56496f79fb6ed94288abdef1fff9ced.zip
Adding metadata
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/coeurl/coeurl-0.3.0.ebuild35
1 files changed, 33 insertions, 2 deletions
diff --git a/dev-cpp/coeurl/coeurl-0.3.0.ebuild b/dev-cpp/coeurl/coeurl-0.3.0.ebuild
index c80a52c336c3..79d358e89d91 100644
--- a/dev-cpp/coeurl/coeurl-0.3.0.ebuild
+++ b/dev-cpp/coeurl/coeurl-0.3.0.ebuild
@@ -3,7 +3,8 @@
EAPI=8
-inherit meson
+PYTHON_COMPAT=( python3_{7,8,9,10,11} )
+inherit edo meson python-any-r1
DESCRIPTION="A simple async wrapper around CURL for C++"
HOMEPAGE="https://nheko.im/nheko-reborn/coeurl"
@@ -14,7 +15,8 @@ LICENSE="MIT"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
IUSE="ssl test"
-RESTRICT="test" # Tests turned off because they need a local webserver.
+REQUIRED_USE="test? ( ssl )"
+RESTRICT="!test? ( test )"
RDEPEND="
net-misc/curl[ssl?]
@@ -26,6 +28,21 @@ DEPEND="
${RDEPEND}
test? ( dev-cpp/doctest )
"
+BDEPEND="
+ test? (
+ dev-libs/openssl
+ $(python_gen_any_dep 'dev-python/flask[${PYTHON_USEDEP}]')
+ )
+"
+
+python_check_deps() {
+ python_has_version "dev-python/flask[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ default
+ rm -r subprojects || die
+}
src_configure() {
local -a emesonargs=(
@@ -33,3 +50,17 @@ src_configure() {
)
meson_src_configure
}
+
+src_test() {
+ openssl req -x509 -newkey rsa:4096 -nodes \
+ -out "${T}"/cert.pem -keyout "${T}"/key.pem \
+ -days 365 -subj "/CN=localhost" || die
+
+ edo ${EPYTHON} ./tests/testserver.py &
+ sleep 3
+
+ edo ${EPYTHON} ./tests/testserver.py "${T}" &
+ sleep 3
+
+ meson_src_test
+}