commit: 12b14e09f8258030ca7005f7d1cebc749ac752c6
Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sun Dec 25 17:06:53 2022 +0000
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Thu Jan 5 14:31:09 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12b14e09
dev-cpp/cpp-httplib: build the library
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
dev-cpp/cpp-httplib/cpp-httplib-0.11.3.ebuild | 32 ++++++++++++++++++++++++---
dev-cpp/cpp-httplib/metadata.xml | 12 +++++++++-
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>[email protected]</email>
+ <name>Alexey Sokolov</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>[email protected]</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>