From 725d271102964f20a03dfe26ad26e7beadedc021 Mon Sep 17 00:00:00 2001 From: Peppersawce <157759066+Peppersawce@users.noreply.github.com> Date: Wed, 8 Apr 2026 18:29:33 +0200 Subject: [PATCH] libcpr port (#13924) --- net-libs/cpr/cpr-1.14.2.recipe | 68 ++++++++++++++++++++++++ net-libs/cpr/patches/cpr-1.14.2.patchset | 22 ++++++++ 2 files changed, 90 insertions(+) create mode 100644 net-libs/cpr/cpr-1.14.2.recipe create mode 100644 net-libs/cpr/patches/cpr-1.14.2.patchset diff --git a/net-libs/cpr/cpr-1.14.2.recipe b/net-libs/cpr/cpr-1.14.2.recipe new file mode 100644 index 000000000..d6f8def13 --- /dev/null +++ b/net-libs/cpr/cpr-1.14.2.recipe @@ -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 +} diff --git a/net-libs/cpr/patches/cpr-1.14.2.patchset b/net-libs/cpr/patches/cpr-1.14.2.patchset new file mode 100644 index 000000000..9bb0c8688 --- /dev/null +++ b/net-libs/cpr/patches/cpr-1.14.2.patchset @@ -0,0 +1,22 @@ +From c85babbc732b8da71559b08461097e7b817b5d7d Mon Sep 17 00:00:00 2001 +From: Peppersawce +Date: Wed, 8 Apr 2026 17:58:59 +0200 +Subject: Save include dir + + +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index 74eedd7..455001b 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.15) + + target_include_directories(cpr PUBLIC +- $ ++ $ + $ + $) + +-- +2.52.0 +