dev-cpp/cpp-httplib: build the library

Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Alexey Sokolov
2022-12-25 17:06:53 +00:00
committed by Maciej Barć
parent 912d1b68db
commit 12b14e09f8
2 changed files with 40 additions and 4 deletions

View File

@@ -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
}

View File

@@ -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>