← Back to team overview

kicad-developers team mailing list archive

[rfc patch] replace avhttp with libcurl

 

Given that this:
#include <avhttp.hpp>                       // chinese SSL magic

is literally in the source code on github_plugin.cpp:94

I have written a replacement implementation that drops avhttp in favor
of libcurl.

All the linux distros have curl, even Windows has curl binaries(though
msys2 will take care of it), OSX as well. Even git uses curl.

Benefits:
No more need to link against openssl, ever, I hope.
No need to deal with unpacking avhttp to build.
Less boost usage!
Documentation is in english
Its API is extremely stable and mature


So this patch
1. Removes avhttp and openssl dependency
2. Replaces avhttp logic in github plugin
3. Adds a KICAD_CURL_EASY wrapper class to /common/ for consumption in
other parts of kicad.
4. Adds curl linkage in common
5. A KICAD_CURL::Init and Cleanup static functions were added to
PGM_Base, in effect all the kicad apps are linking against libcurl.
This was needed because curl_global_init must be called before any
threads start using the rest of the curl functions which are thread
safe. And you get the mess where cvpcb, pcbnew and kicad all end up
using the github plugin through the whole process loading scheme.


>From my testing it works via MSYS2/Windows, I can't imagine it being
any different on a different OS as its libcurl afterall :)


Opinions,etc, etc. You probably still need to enable the github plugin
to build it. curl is being linked regardless however.

Attachment: 0001-Replace-avhttp-with-libcurl-implementation.patch
Description: Binary data


Follow ups