From af28466512fe4238752fd7a0b09a3d59f8023af7 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Tue, 31 Jul 2018 03:55:19 +0000 Subject: New port: www/cpr: Curl for people, a simple wrapper around libcurl PR: 229962 Submitted by: Maxim Filimonov --- www/cpr/Makefile | 30 ++++++++++++++++++++++++++++++ www/cpr/distinfo | 7 +++++++ www/cpr/files/patch-cpr_session.cpp | 11 +++++++++++ www/cpr/pkg-descr | 7 +++++++ www/cpr/pkg-plist | 23 +++++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 www/cpr/Makefile create mode 100644 www/cpr/distinfo create mode 100644 www/cpr/files/patch-cpr_session.cpp create mode 100644 www/cpr/pkg-descr create mode 100644 www/cpr/pkg-plist (limited to 'www/cpr') diff --git a/www/cpr/Makefile b/www/cpr/Makefile new file mode 100644 index 000000000000..d32c8279be1b --- /dev/null +++ b/www/cpr/Makefile @@ -0,0 +1,30 @@ +# $FreeBSD$ + +PORTNAME= cpr +DISTVERSION= 1.3.0-57 +DISTVERSIONSUFFIX= -g3d14e61 +CATEGORIES= www + +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES= 8eb16e267843d18834bf42d9ae4ccfb58f34bdb5.patch:-p1 + +MAINTAINER= che@bein.link +COMMENT= Curl for people, a simple wrapper around libcurl + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libcurl.so:ftp/curl + +USES= cmake:outsource +USE_GITHUB= yes +GH_ACCOUNT= whoshuu +GH_TUPLE= whoshuu:mongoose:df9f7a7:mongoose/opt/mongoose +USE_LDCONFIG= yes + +CMAKE_OFF= BUILD_CPR_TESTS +CMAKE_ON= BUILD_SHARED_LIBS USE_SYSTEM_CURL + +INSTALL_TARGET= install + +.include diff --git a/www/cpr/distinfo b/www/cpr/distinfo new file mode 100644 index 000000000000..fb4cb7b9adaf --- /dev/null +++ b/www/cpr/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1533009130 +SHA256 (whoshuu-cpr-1.3.0-57-g3d14e61_GH0.tar.gz) = 14c91766e2f2e2a594212ebcb71b41851402865800f4626559a618a3fd93a2e0 +SIZE (whoshuu-cpr-1.3.0-57-g3d14e61_GH0.tar.gz) = 34678 +SHA256 (whoshuu-mongoose-df9f7a7_GH0.tar.gz) = 3bebbb71bf30a9524dba2a434087965e237c86018906dc2af4eaee8bc273b55f +SIZE (whoshuu-mongoose-df9f7a7_GH0.tar.gz) = 114812 +SHA256 (8eb16e267843d18834bf42d9ae4ccfb58f34bdb5.patch) = 240d8eee48d5602c1b6dd69f69e33335da642b618a18002514326ae075e1aa47 +SIZE (8eb16e267843d18834bf42d9ae4ccfb58f34bdb5.patch) = 1715 diff --git a/www/cpr/files/patch-cpr_session.cpp b/www/cpr/files/patch-cpr_session.cpp new file mode 100644 index 000000000000..67da3040fb32 --- /dev/null +++ b/www/cpr/files/patch-cpr_session.cpp @@ -0,0 +1,11 @@ +--- cpr/session.cpp.orig 2018-07-18 20:02:06 UTC ++++ cpr/session.cpp +@@ -350,7 +350,7 @@ Response Session::Impl::Patch() { + Response Session::Impl::Post() { + auto curl = curl_->handle; + if (curl) { +- curl_easy_setopt(curl, CURLOPT_HTTPGET, 0L); ++ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); + curl_easy_setopt(curl, CURLOPT_NOBODY, 0L); + } + diff --git a/www/cpr/pkg-descr b/www/cpr/pkg-descr new file mode 100644 index 000000000000..46dd16ad6cc6 --- /dev/null +++ b/www/cpr/pkg-descr @@ -0,0 +1,7 @@ +C++ Requests is a simple wrapper around libcurl inspired by the excellent +Python Requests project. + +Using the more expressive language facilities of C++11, this library captures +the essence of making network calls into a few concise idioms. + +WWW: https://github.com/whoshuu/cpr diff --git a/www/cpr/pkg-plist b/www/cpr/pkg-plist new file mode 100644 index 000000000000..22eea02bf68c --- /dev/null +++ b/www/cpr/pkg-plist @@ -0,0 +1,23 @@ +include/cpr/api.h +include/cpr/auth.h +include/cpr/body.h +include/cpr/cookies.h +include/cpr/cpr.h +include/cpr/cprtypes.h +include/cpr/curlholder.h +include/cpr/defines.h +include/cpr/digest.h +include/cpr/error.h +include/cpr/low_speed.h +include/cpr/max_redirects.h +include/cpr/multipart.h +include/cpr/parameters.h +include/cpr/payload.h +include/cpr/proxies.h +include/cpr/response.h +include/cpr/session.h +include/cpr/ssl_options.h +include/cpr/timeout.h +include/cpr/util.h +lib/cmake/cpr/cpr-config.cmake +lib/libcpr.so -- cgit v1.2.3