aboutsummaryrefslogtreecommitdiff
path: root/www/cpr
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-07-31 03:55:19 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-07-31 03:55:19 +0000
commitaf28466512fe4238752fd7a0b09a3d59f8023af7 (patch)
treec8cd395218ed5a2f884f751b5bd474ea8aeafe0b /www/cpr
parentdde2d7ff939ad684da939cfc87d21027ce6eb8db (diff)
downloadports-af28466512fe4238752fd7a0b09a3d59f8023af7.tar.gz
ports-af28466512fe4238752fd7a0b09a3d59f8023af7.zip
New port: www/cpr: Curl for people, a simple wrapper around libcurl
PR: 229962 Submitted by: Maxim Filimonov <che@bein.link>
Notes
Notes: svn path=/head/; revision=475967
Diffstat (limited to 'www/cpr')
-rw-r--r--www/cpr/Makefile30
-rw-r--r--www/cpr/distinfo7
-rw-r--r--www/cpr/files/patch-cpr_session.cpp11
-rw-r--r--www/cpr/pkg-descr7
-rw-r--r--www/cpr/pkg-plist23
5 files changed, 78 insertions, 0 deletions
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 <bsd.port.mk>
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