[patch] Add curlpp C++ bindings to curl package

  • Done
  • quality assurance status badge
Details
3 participants
  • Dale Mellor
  • Ludovic Courtès
  • Marius Bakke
Owner
unassigned
Submitted by
Dale Mellor
Severity
normal
D
D
Dale Mellor wrote on 17 Jun 2020 14:02
(address . guix-patches@gnu.org)
b2d4e1834d7a43222aa606c623cc662fa047fb98.camel@rdmp.org

From 36c628cd27c2c6f281ec800767ba0e514fae13b1 Mon Sep 17 00:00:00 2001
From: Dale Mellor <guix-devel-0brg6b@rdmp.org>
Date: Wed, 17 Jun 2020 12:42:54 +0100
Subject: [PATCH] gnu: Add curlpp library.

* gnu/packages/curl.scm (curlpp): New variable.
---
gnu/packages/curl.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 48d7dd40bd..f7dc7161de 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
+;;; Copyright © 2020 Dale Mellor <guix-devel-0brg6b@rdmp.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,10 +33,12 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (gnu packages)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages golang)
#:use-module (gnu packages guile)
#:use-module (gnu packages kerberos)
@@ -258,3 +261,32 @@ not offer a replacement for libcurl.")
Guile to do client-side URL transfers, like requesting documents from HTTP or
FTP servers. It is based on the curl library.")
(license license:gpl3+)))
+
+(define-public curlpp
+ (package
+ (name "curlpp")
+ (version "0.8.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jpbarrette/curlpp.git")
+ (commit "v0.8.1")))
+ (sha256
+ (base32 "1b0ylnnrhdax4kwjq64r1fk0i24n5ss6zfzf4hxwgslny01xiwrk"))))
+ (build-system cmake-build-system)
+ (arguments `(#:phases (modify-phases %standard-phases (delete 'check))))
+ (propagated-inputs `(("curl" ,curl)))
+ (synopsis "C++ wrapper around libcURL")
+ (description
+ "A free and easy-to-use client-side C++ URL transfer library,
+supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. The
+curlpp library supports HTTPS certificates, HTTP POST, HTTP PUT, FTP
+uploading, kerberos, HTTP form based upload, proxies, cookies, user+password
+authentication, file transfer resume, http proxy tunneling and more! The
+curlpp library is highly portable, it builds and works identically on numerous
+platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX,
+AIX, Tru64, Linux, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS,
+RISC OS, Novell NetWare, DOS and more... curlpp is free, thread-safe, IPv6
+compatible, feature rich, well supported and fast.")
+ (home-page "http://www.curlpp.org")
+ (license license:x11-style)))
--
2.20.1
L
L
Ludovic Courtès wrote on 18 Jun 2020 14:43
(name . Dale Mellor)(address . guix-devel-0brg6b@rdmp.org)(address . 41919@debbugs.gnu.org)
87v9jolf33.fsf@gnu.org
Hi Dale,

Dale Mellor <guix-devel-0brg6b@rdmp.org> skribis:

Toggle quote (7 lines)
> From 36c628cd27c2c6f281ec800767ba0e514fae13b1 Mon Sep 17 00:00:00 2001
> From: Dale Mellor <guix-devel-0brg6b@rdmp.org>
> Date: Wed, 17 Jun 2020 12:42:54 +0100
> Subject: [PATCH] gnu: Add curlpp library.
>
> * gnu/packages/curl.scm (curlpp): New variable.

Nice! A couple of comments:

[...]

Toggle quote (4 lines)
> +(define-public curlpp
> + (package
> + (name "curlpp")

Please pass the package through ./etc/indent-code.el:


Toggle quote (11 lines)
> + (version "0.8.1")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/jpbarrette/curlpp.git")
> + (commit "v0.8.1")))
> + (sha256
> + (base32 "1b0ylnnrhdax4kwjq64r1fk0i24n5ss6zfzf4hxwgslny01xiwrk"))))
> + (build-system cmake-build-system)
> + (arguments `(#:phases (modify-phases %standard-phases (delete 'check))))

To disable tests, use #:tests? #f.

However, we only disable tests when there’s a compelling reason to do
so, in which case there should be a comment indicating why they’re
disabled.

What’s the reason here? Perhaps name-lookup errors? (There’s no
networking in the isolated build environment.)

Toggle quote (2 lines)
> + (propagated-inputs `(("curl" ,curl)))

Do we need to propagate due to cURL headers being included in public
headers?

Toggle quote (13 lines)
> + (synopsis "C++ wrapper around libcURL")
> + (description
> + "A free and easy-to-use client-side C++ URL transfer library,
> +supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. The
> +curlpp library supports HTTPS certificates, HTTP POST, HTTP PUT, FTP
> +uploading, kerberos, HTTP form based upload, proxies, cookies, user+password
> +authentication, file transfer resume, http proxy tunneling and more! The
> +curlpp library is highly portable, it builds and works identically on numerous
> +platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX,
> +AIX, Tru64, Linux, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS,
> +RISC OS, Novell NetWare, DOS and more... curlpp is free, thread-safe, IPv6
> +compatible, feature rich, well supported and fast.")

Please write full sentences and remove the list of supported operating
systems, which is not useful info in the context of Guix:


Thanks for the patch!

Ludo’.
D
D
Dale Mellor wrote on 22 Jun 2020 01:16
Re: [patch] Add curlpp C++ bindings to curl package
(address . 41919@debbugs.gnu.org)
96308bdb48d4329a55b2201b64839b1aae5da160.camel@rdmp.org
On Thu, 2020-06-18 at 14:43 +0200, Ludovic Courtès wrote:
Toggle quote (15 lines)
> Hi Dale,
>
> Dale Mellor <guix-devel-0brg6b@rdmp.org> skribis:
>
> > From 36c628cd27c2c6f281ec800767ba0e514fae13b1 Mon Sep 17 00:00:00 2001
> > From: Dale Mellor <guix-devel-0brg6b@rdmp.org>
> > Date: Wed, 17 Jun 2020 12:42:54 +0100
> > Subject: [PATCH] gnu: Add curlpp library.
> >
> > * gnu/packages/curl.scm (curlpp): New variable.
>
> Nice! A couple of comments:
> ...


Hi Ludo, I took all your comments on board; the attached patch replaces
the one I sent earlier.

Thanks,
Dale
From b1506404e27552a171fe535144b2d11b6aa67cfa Mon Sep 17 00:00:00 2001
From: Dale Mellor <guix-devel-0brg6b@rdmp.org>
Date: Sun, 21 Jun 2020 23:53:07 +0100
Subject: [PATCH] gnu: Add curlpp library.

* gnu/packages/curl.scm (curlpp): New variable.
---
gnu/packages/curl.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 48d7dd40bd..c8db551b00 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
+;;; Copyright © 2020 Dale Mellor <guix-devel-0brg6b@rdmp.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,10 +33,12 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (gnu packages)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages golang)
#:use-module (gnu packages guile)
#:use-module (gnu packages kerberos)
@@ -258,3 +261,33 @@ not offer a replacement for libcurl.")
Guile to do client-side URL transfers, like requesting documents from HTTP or
FTP servers. It is based on the curl library.")
(license license:gpl3+)))
+
+(define-public curlpp
+ (package
+ (name "curlpp")
+ (version "0.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/jpbarrette/curlpp.git")
+ (commit "v0.8.1")))
+ (sha256
+ (base32 "1b0ylnnrhdax4kwjq64r1fk0i24n5ss6zfzf4hxwgslny01xiwrk"))))
+ (build-system cmake-build-system)
+ ;; There are no build tests to be had.
+ (arguments
+ '(#:tests? #f))
+ ;; The installed version needs the header files from the C library.
+ (propagated-inputs
+ `(("curl" ,curl)))
+ (synopsis "C++ wrapper around libcURL")
+ (description
+ "A free and easy-to-use client-side C++ URL transfer library,
+supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP; in
+particular it supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
+kerberos, HTTP form based upload, proxies, cookies, user+password
+authentication, file transfer resume, http proxy tunneling and more!")
+ (home-page "http://www.curlpp.org")
+ (license license:x11-style)))
--
2.26.2
M
M
Marius Bakke wrote on 24 Jun 2020 20:58
Re: [bug#41919] [patch] Add curlpp C++ bindings to curl package
875zbg8f5b.fsf@gnu.org
Hello Dale,

Thanks for the updated patch. I will suggest another few improvements,
then I think it should be good to go. :-)

Dale Mellor <guix-devel-0brg6b@rdmp.org> writes:

Toggle quote (7 lines)
> From b1506404e27552a171fe535144b2d11b6aa67cfa Mon Sep 17 00:00:00 2001
> From: Dale Mellor <guix-devel-0brg6b@rdmp.org>
> Date: Sun, 21 Jun 2020 23:53:07 +0100
> Subject: [PATCH] gnu: Add curlpp library.
>
> * gnu/packages/curl.scm (curlpp): New variable.

[...]

Toggle quote (11 lines)
> @@ -32,10 +33,12 @@
> #:use-module (guix download)
> #:use-module (guix git-download)
> #:use-module (guix utils)
> + #:use-module (guix build-system cmake)
> #:use-module (guix build-system gnu)
> #:use-module (guix build-system go)
> #:use-module (gnu packages)
> #:use-module (gnu packages compression)
> + #:use-module (gnu packages gawk)

This import is unused.

Toggle quote (9 lines)
> #:use-module (gnu packages golang)
> #:use-module (gnu packages guile)
> #:use-module (gnu packages kerberos)
> @@ -258,3 +261,33 @@ not offer a replacement for libcurl.")
> Guile to do client-side URL transfers, like requesting documents from HTTP or
> FTP servers. It is based on the curl library.")
> (license license:gpl3+)))
> +
> +(define-public curlpp
^^
Extra space _____|

Toggle quote (7 lines)
> + (package
> + (name "curlpp")
> + (version "0.8.1")
> + (source
> + (origin
> + (method git-fetch)

What happened with the indentation here? Also, there is an extra space
between 'method' and 'git-fetch'.

Toggle quote (3 lines)
> + (uri
> + (git-reference

Place git-reference on the same line as uri.

Toggle quote (3 lines)
> + (commit "v0.8.1")))

Use (string-append "v" version) here instead of hard-coding. Also, you
should add a (file-name (git-file-name name version)) in this vicinity.

Toggle quote (3 lines)
> + (sha256
> + (base32 "1b0ylnnrhdax4kwjq64r1fk0i24n5ss6zfzf4hxwgslny01xiwrk"))))
> + (build-system cmake-build-system)
^^
Another extra space.

Toggle quote (7 lines)
> + ;; There are no build tests to be had.
> + (arguments
> + '(#:tests? #f))
> + ;; The installed version needs the header files from the C library.
> + (propagated-inputs
> + `(("curl" ,curl)))
> + (synopsis "C++ wrapper around libcURL")
^^
Here too ______|

Toggle quote (3 lines)
> + (description
> + "A free and easy-to-use client-side C++ URL transfer library,

Please use full sentences in the description. In particular, start with
"This package provides a ..." instead of jumping to the "A ...".

Toggle quote (7 lines)
> +supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP; in
> +particular it supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
> +kerberos, HTTP form based upload, proxies, cookies, user+password
> +authentication, file transfer resume, http proxy tunneling and more!")
> + (home-page "http://www.curlpp.org")
> + (license license:x11-style)))

There are extra spaces after 'home-page' and 'license'. Also,
license:x11-style is a procedure that takes two arguments: an URI and
optionally a comment. However reading the source files, it looks like
the standard "Expat" license, so you can use license:expat instead.

Can you send an updated patch? TIA!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl7zolEACgkQoqBt8qM6
VPrtNQf+Ou8/wN3R6sGXzjTIoZeF8SpTfA92CVd2+JTYB+vL8oESC2/17zhzLIGK
pbbRwwaLitUbp8SEhHtR70ntk2M95mjKkF9eP99WVVWZTWjvEpKB2BQNw4v7Pdpp
9aI3MqJ2x+xA7/nucOp9uUvmerDD52oVtR1YC3or9nHeIQVpOFOd5dhHY/NiG/we
H2irwKOYYYY6cspbD++VgZ4UUG5w3G3Yjgs9KLvFgzkl7KMBYTmdB0lohwPTgitk
HETcYkkHV1MAUwHDL+gHLBfp2kRiufGtT9s7heEBZIRPwUyG/AMf2N2QyvEY0ZMT
pd/wjN484DDXYxLXPe6WFC+Wk0sVzw==
=hIqj
-----END PGP SIGNATURE-----

D
D
Dale Mellor wrote on 28 Jun 2020 23:43
8505866a62c4f727a4bfb34e5e3ee76bc2aeabe2.camel@rdmp.org
On Wed, 2020-06-24 at 20:58 +0200, Marius Bakke wrote:
Toggle quote (6 lines)
> Hello Dale,
>
> Thanks for the updated patch. I will suggest another few improvements,
> then I think it should be good to go. :-)


All suggestions taken on board.

Thank you for checking over it,
Dale
From 16bff1a7c18ead5bb923f2b75e38371718660abb Mon Sep 17 00:00:00 2001
From: Dale Mellor <guix-devel-0brg6b@rdmp.org>
Date: Sun, 21 Jun 2020 23:53:07 +0100
Subject: [PATCH] gnu: Add curlpp library.

* gnu/packages/curl.scm (curlpp): New variable.
---
gnu/packages/curl.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 48d7dd40bd..86fd9a8c10 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
+;;; Copyright © 2020 Dale Mellor <guix-devel-0brg6b@rdmp.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (gnu packages)
@@ -258,3 +260,34 @@ not offer a replacement for libcurl.")
Guile to do client-side URL transfers, like requesting documents from HTTP or
FTP servers. It is based on the curl library.")
(license license:gpl3+)))
+
+(define-public curlpp
+ (package
+ (name "curlpp")
+ (version "0.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jpbarrette/curlpp.git")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1b0ylnnrhdax4kwjq64r1fk0i24n5ss6zfzf4hxwgslny01xiwrk"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ ;; There are no build tests to be had.
+ (arguments
+ '(#:tests? #f))
+ ;; The installed version needs the header files from the C library.
+ (propagated-inputs
+ `(("curl" ,curl)))
+ (synopsis "C++ wrapper around libcURL")
+ (description
+ "This package provides a free and easy-to-use client-side C++ URL
+transfer library, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT,
+FILE and LDAP; in particular it supports HTTPS certificates, HTTP POST, HTTP
+PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies,
+user+password authentication, file transfer resume, http proxy tunneling and
+more!")
+ (home-page "http://www.curlpp.org")
+ (license license:expat)))
--
2.26.2
L
L
Ludovic Courtès wrote on 3 Jul 2020 23:48
(name . Dale Mellor)(address . guix-devel-0brg6b@rdmp.org)
87fta8mfqt.fsf@gnu.org
Hi Dale,

Dale Mellor <guix-devel-0brg6b@rdmp.org> skribis:

Toggle quote (7 lines)
> From 16bff1a7c18ead5bb923f2b75e38371718660abb Mon Sep 17 00:00:00 2001
> From: Dale Mellor <guix-devel-0brg6b@rdmp.org>
> Date: Sun, 21 Jun 2020 23:53:07 +0100
> Subject: [PATCH] gnu: Add curlpp library.
>
> * gnu/packages/curl.scm (curlpp): New variable.

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 41919@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 41919
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch