Package Details: cpp-httplib-compiled 0.10.7-1

Git Clone URL: (read-only, click to copy)
Package Base: cpp-httplib-compiled
Description: A C++ HTTP/HTTPS server and client library (compiled version)
Upstream URL:
Keywords: networking requests
Licenses: MIT
Conflicts: cpp-httplib
Provides: cpp-httplib,
Submitter: sum01
Maintainer: sum01
Last Packager: sum01
Votes: 4
Popularity: 0.83
First Submitted: 2020-05-29 03:12 (UTC)
Last Updated: 2022-04-30 20:13 (UTC)

Pinned Comments

sum01 commented on 2021-04-23 19:40 (UTC)

@Spixmaster so cpp-httplib is header-only, and must be compiled in any project you use it in. cpp-httplib-compiled splits the header into an interface (header) and implementation, allowing you to just link against it. Lets you avoid having to compile it every time.

Latest Comments

sum01 commented on 2022-03-17 17:49 (UTC)

I looked into making it a split package, but since the header-only and compiled versions aren't using the same build I'm not sure it's worth doing. As far as I can tell, it would require anyone using the header-only package to still compile the whole thing, even though they don't need it.

Didn't realize having DESTDIR on the end vs front mattered, but I'll change that.

abouvier commented on 2022-02-25 00:02 (UTC) (edited on 2022-02-25 00:02 (UTC) by abouvier)

DESTDIR must be an environment variable to work with all cmake generators: DESTDIR="$pkgdir" cmake --build . --target install

abouvier commented on 2021-07-24 03:52 (UTC) (edited on 2021-07-24 04:26 (UTC) by abouvier)

You should make a split package to ease maintenance, because the source code and version are the same for both the header-only and compiled packages :p

abouvier commented on 2021-07-19 19:59 (UTC) (edited on 2021-07-19 20:36 (UTC) by abouvier)

Sorry, it's just me who finds the -compiled suffix ugly :p

Otherwise, could you add to provides=() [1] and set CMAKE_BUILD_TYPE to None [2]? :D



sum01 commented on 2021-07-19 18:02 (UTC)

@abouvier I'm not sure there's much benefit to renaming it now. libhttplib also seems a bit redundant. I believe the pinned comment is enough to explain the differences between the two (as well as what I have in the description).

See the previous conversation I had with FabioLolix about there not really being any "standard" way to go about something like this.

abouvier commented on 2021-07-19 01:21 (UTC)

And what do you think of the name libhttplib for the compiled version? :p

abouvier commented on 2021-07-16 04:48 (UTC) (edited on 2021-07-16 04:48 (UTC) by abouvier)

@sum01 Sorry I meant the public header interface of the library, not the full header-only library.

sum01 commented on 2021-07-16 04:20 (UTC)

@abouvier yes that's how I was using it. I suppose it could make sense to require them all, at least for the compiled version.

As for having both in the same package cpp-httplib, I don't think that would work, as the Cmake files vary based on if it was header-only or compiled. I could have it install only the compiled version's cmake files, but there are minor differences between them regardless (namely, it's aware it's header-only).

abouvier commented on 2021-07-16 03:05 (UTC) (edited on 2021-07-16 03:07 (UTC) by abouvier)

Are you using the optdepends array as an "optmakedepends"? It's not working because users need to manually install the required libraries before building the package.

I think you should build the library with every option enabled. Or create multiple packages for every possible combination of options :p

And I vote for the cpp-httplib package containing headers and shared lib ;)

sum01 commented on 2021-05-17 19:19 (UTC)

There are header-only packages in official with no -header suffix. Considering header-only is the default in upstream, and there's no real rule for this, I think I'll leave it as-is.

FabioLolix commented on 2021-05-17 17:09 (UTC)

Honestly I can't point to a wiki page, but all programs are shipped compiled by default and headers only packages have the -headers suffix headers compiled

About pkgbuilds name, it can't be changed. You can upload cpp-httplib-header and submit a merge request of cpp-httplib into it and later upload my revision of cpp-httplib and submit a merge request of cpp-httplib-compiled into it, so votes, comments and notification are preserved for the 'same scope' pkgbuilds

sum01 commented on 2021-05-17 16:48 (UTC)

@FabioLolix is that an AUR packaging rule? I looked when I originally created these but couldn't find anything to go by. The reason I went with the "normal" package (cpp-httplib) as the header-only version is because it's the default state of the upstream, and compilation is an alternate method that's available.

Also, I thought I can't just change the name in the PKGBUILD since a TU has to do something?

FabioLolix commented on 2021-05-17 16:33 (UTC)

Hello, this pkgbuild need to be called simply 'cpp-httplib' instead of 'cpp-httplib-compiled' since in Arch packaging is normal to ship binary, libraries and headers in the same package, while what is now 'cpp-httplib' need to be renamed 'cpp-httplib-header'

Please rename sources in a way to be 'reusable', since both cpp-httplib pkgbuild use the same sources

I have revisioned both pkgbuilds (I have also removed some not necessary things [zlib is always installed])

Spixmaster commented on 2021-04-24 11:23 (UTC) (edited on 2021-04-24 11:24 (UTC) by Spixmaster)

@sum01 I understand. The two packages just have different compile options. In this case, "-bin" is not suitable.

sum01 commented on 2021-04-23 19:40 (UTC)

@Spixmaster so cpp-httplib is header-only, and must be compiled in any project you use it in. cpp-httplib-compiled splits the header into an interface (header) and implementation, allowing you to just link against it. Lets you avoid having to compile it every time.

Spixmaster commented on 2021-04-23 18:51 (UTC)

@sum01 I looked at both PKGBUILDs and do not exactly know the difference between both. I ask myself what even needs to be compiled as it is header only.

sum01 commented on 2021-04-23 15:24 (UTC)

@Spixmaster I though -bin was only for pre-compiled packages? This is still being compiled when you build it, so I assumed the -bin didn't apply when I was naming it.

Spixmaster commented on 2021-04-23 13:34 (UTC)

The AUR convention for a compiled version would be "cpp-httplib-bin".