mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
libcpr port (#13924)
This commit is contained in:
68
net-libs/cpr/cpr-1.14.2.recipe
Normal file
68
net-libs/cpr/cpr-1.14.2.recipe
Normal file
@@ -0,0 +1,68 @@
|
||||
SUMMARY="C++ Requests is a modern HTTP library for C++, built for people"
|
||||
DESCRIPTION="C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. \
|
||||
Despite its name, libcurl’s easy interface is anything but, and making mistakes misusing it \
|
||||
is a common source of error and frustration. Using the more expressive language facilities of C++17, \
|
||||
this library captures the essence of making network calls into a few concise idioms."
|
||||
HOMEPAGE="https://docs.libcpr.dev/"
|
||||
COPYRIGHT="2026 libcpr contributors"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/libcpr/cpr/archive/refs/tags/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="b9b529b47083bfe80bba855ca5308d12d767ae7c7b629aef5ef018c4343cf62b"
|
||||
PATCHES="cpr-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion=$portVersion
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
cpr$secondaryArchSuffix = $portVersion
|
||||
lib:libcpr$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
cpr${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libcpr$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
cpr$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix >= 3
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -Bbuild -S. $cmakeDirArgs -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCPR_USE_SYSTEM_CURL=ON -DBUILD_SHARED_LIBS=ON
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLib libcpr
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
Reference in New Issue
Block a user