commit:     4b2d9697bf3aee5c6dd0bec2c379131106cdc394
Author:     Jan-Espen Oversand <sigsegv <AT> radiotube <DOT> org>
AuthorDate: Thu Dec 14 20:31:13 2023 +0000
Commit:     Jan-Espen Oversand <sigsegv <AT> radiotube <DOT> org>
CommitDate: Thu Dec 14 20:31:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4b2d9697

dev-cpp/cpprestsdk: new package, add 2.10.19

Signed-off-by: Jan-Espen Oversand <sigsegv <AT> radiotube.org>

 dev-cpp/cpprestsdk/Manifest                        |  1 +
 dev-cpp/cpprestsdk/cpprestsdk-2.10.19.ebuild       | 46 ++++++++++++++++++++++
 .../files/cpprestsdk-2.10.19-warnings.patch        | 11 ++++++
 dev-cpp/cpprestsdk/metadata.xml                    | 22 +++++++++++
 4 files changed, 80 insertions(+)

diff --git a/dev-cpp/cpprestsdk/Manifest b/dev-cpp/cpprestsdk/Manifest
new file mode 100644
index 0000000000..625524b0cd
--- /dev/null
+++ b/dev-cpp/cpprestsdk/Manifest
@@ -0,0 +1 @@
+DIST cpprestsdk-2.10.19.tar.gz 1749647 BLAKE2B 
4f6863c490df083c39e7e4fdb714ca380b1f28636bb8c446e9627bb31259160d2d30f00fb474caffb0d06f0d7f8c86db3f6eac959bfa738318dfabf52def8339
 SHA512 
2d8fa213f492236e2fd912349bf81951c1e618dd8eab4f665f909d75b5aeeda18b8f70dce3a4db50d67bdb3e372888132481701163de6c27716dfd750bff9781

diff --git a/dev-cpp/cpprestsdk/cpprestsdk-2.10.19.ebuild 
b/dev-cpp/cpprestsdk/cpprestsdk-2.10.19.ebuild
new file mode 100644
index 0000000000..2024e804e2
--- /dev/null
+++ b/dev-cpp/cpprestsdk/cpprestsdk-2.10.19.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="A Microsoft project for cloud-based client-server communication."
+HOMEPAGE="https://github.com/microsoft/cpprestsdk";
+SRC_URI="https://github.com/microsoft/cpprestsdk/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=">=dev-libs/openssl-1.1.1q
+               >=dev-libs/boost-1.80.0-r1
+               >=sys-libs/zlib-1.2.13-r1"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND=">=dev-util/cmake-3.23
+               >=dev-util/ninja-1.11.1-r2
+               >=sys-devel/gcc-11.3.0
+               >=virtual/pkgconfig-2-r1
+               >=dev-cpp/websocketpp-0.8.2"
+
+PATCHES=(
+       "${FILESDIR}"/cpprestsdk-${PV}-warnings.patch
+)
+
+src_prepare(){
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=( -DCMAKE_BUILD_TYPE=Release )
+       cmake_src_configure
+}
+
+src_compile(){
+       cmake_src_compile
+}
+
+src_install(){
+       cmake_src_install
+}

diff --git a/dev-cpp/cpprestsdk/files/cpprestsdk-2.10.19-warnings.patch 
b/dev-cpp/cpprestsdk/files/cpprestsdk-2.10.19-warnings.patch
new file mode 100644
index 0000000000..dc663ec0c7
--- /dev/null
+++ b/dev-cpp/cpprestsdk/files/cpprestsdk-2.10.19-warnings.patch
@@ -0,0 +1,11 @@
+--- a/Release/src/http/common/http_helpers.cpp 2021-02-02 05:03:00.000000000 
+0100
++++ b/Release/src/http/common/http_helpers.cpp 2022-12-08 08:42:47.321677974 
+0100
+@@ -84,7 +84,7 @@
+     }
+     else
+     {
+-        char buffer[9];
++        char buffer[17];
+ #ifdef _WIN32
+         sprintf_s(buffer, sizeof(buffer), "%8IX", bytes_read);
+ #else

diff --git a/dev-cpp/cpprestsdk/metadata.xml b/dev-cpp/cpprestsdk/metadata.xml
new file mode 100644
index 0000000000..00e1a920aa
--- /dev/null
+++ b/dev-cpp/cpprestsdk/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<!--
+  This is the example metadata file.
+  The root element of this file is <pkgmetadata>. Within this element a
+  number of subelements are allowed, the most common being maintainer.
+
+  For a full description look at:
+  https://devmanual.gentoo.org/ebuild-writing/misc-files/metadata/
+
+  Before committing, please remove the comments from this file. They are
+  not relevant for general metadata.xml files.
+-->
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <description>Jan-Espen Oversand</description>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">microsoft/cpprestsdk</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to