summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-cpp/cpp-httplib/cpp-httplib-0.11.3.ebuild32
-rw-r--r--dev-cpp/cpp-httplib/metadata.xml12
2 files changed, 40 insertions, 4 deletions
diff --git a/dev-cpp/cpp-httplib/cpp-httplib-0.11.3.ebuild b/dev-cpp/cpp-httplib/cpp-httplib-0.11.3.ebuild
index 69ebbe1db747..b7916da7774e 100644
--- a/dev-cpp/cpp-httplib/cpp-httplib-0.11.3.ebuild
+++ b/dev-cpp/cpp-httplib/cpp-httplib-0.11.3.ebuild
@@ -3,12 +3,38 @@
EAPI=8
-inherit cmake
+PYTHON_COMPAT=( python3_{8..11} )
+inherit cmake-multilib python-any-r1
-DESCRIPTION="C++ header-only HTTP/HTTPS server and client library"
+DESCRIPTION="C++ HTTP/HTTPS server and client library"
HOMEPAGE="https://github.com/yhirose/cpp-httplib"
SRC_URI="https://github.com/yhirose/cpp-httplib/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
-SLOT="0"
+SLOT="0/0.11" # soversion
KEYWORDS="~amd64 ~x86"
+
+IUSE="brotli ssl zlib"
+
+RDEPEND="
+ brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
+ ssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
+ zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DHTTPLIB_COMPILE=yes
+ -DBUILD_SHARED_LIBS=yes
+ -DHTTPLIB_USE_BROTLI_IF_AVAILABLE=no
+ -DHTTPLIB_USE_OPENSSL_IF_AVAILABLE=no
+ -DHTTPLIB_USE_ZLIB_IF_AVAILABLE=no
+ -DHTTPLIB_REQUIRE_BROTLI=$(usex brotli)
+ -DHTTPLIB_REQUIRE_OPENSSL=$(usex ssl)
+ -DHTTPLIB_REQUIRE_ZLIB=$(usex zlib)
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ cmake-multilib_src_configure
+}
diff --git a/dev-cpp/cpp-httplib/metadata.xml b/dev-cpp/cpp-httplib/metadata.xml
index 69c77c0d5d18..f4f5863299df 100644
--- a/dev-cpp/cpp-httplib/metadata.xml
+++ b/dev-cpp/cpp-httplib/metadata.xml
@@ -1,7 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>alexey+gentoo@asokolov.org</email>
+ <name>Alexey Sokolov</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="brotli">Enable <pkg>app-arch/brotli</pkg> support</flag>
+ </use>
<upstream>
<remote-id type="github">yhirose/cpp-httplib</remote-id>
<bugs-to>https://github.com/yhirose/cpp-httplib/issues</bugs-to>