FS#42206 - [jsoncpp] No way of guessing the custom include path

Attached to Project: Arch Linux
Opened by ux (ubitux) - Wednesday, 01 October 2014, 15:45 GMT
Last edited by Andrea Scarpino (BaSh) - Saturday, 10 January 2015, 11:28 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andrea Scarpino (BaSh)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Using jsoncpp 0.6.0rc2-1, no .pc file are deployed by the package, even though it seems to be deployed by the project (https://github.com/open-source-parsers/jsoncpp/tree/master/pkg-config).

This is problematic because the headers are copied in a custom Archlinux specific directory (a "jsoncpp" directory), so the official way of including the header (#include <json/json.h> according to https://github.com/open-source-parsers/jsoncpp#using-jsoncpp-in-your-project) doesn't work.

pkg-config --cflags jsoncpp should raise -I/usr/include/jsoncpp, or simply make the headers deployed in the standard location (though, a "json" directory kind of sucks).

A pkg-config would be extremely welcome anyway.
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Saturday, 10 January 2015, 11:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  jsoncpp 0.7.1-1
Comment by Jan de Groot (JGC) - Wednesday, 01 October 2014, 17:29 GMT
If upstream made a release with pc files included, we would have those too.
Headee location isn't archlinux specific, just the default as shipped from upstream release.
Comment by ux (ubitux) - Wednesday, 01 October 2014, 17:38 GMT
from the PKGBUILD:
install -d "${pkgdir}"/usr/include/jsoncpp
cp -r include/json "${pkgdir}"/usr/include/jsoncpp/json

This path looks very archlinux specific to me.

But indeed, pkg-config support was added only recently.
Comment by Andrea Scarpino (BaSh) - Wednesday, 01 October 2014, 18:04 GMT Comment by Jan de Groot (JGC) - Thursday, 02 October 2014, 11:23 GMT
All other distributions install the libraries and include files the way we do, so it's not "Archlinux-specific". As upstream includes a .pc file now, we could add one aswel.
Comment by ux (ubitux) - Thursday, 02 October 2014, 12:06 GMT
I just looked at Ubuntu, and while they do indeed deploy the headers into /usr/include/jsoncpp, they also ship a jsoncpp.pc file pointing to that specific directory:

# grep include /usr/lib/pkgconfig/jsoncpp.pc
includedir=${prefix}/include/jsoncpp
Cflags: -I${includedir}

I have no other distribution to compare with, but they probably do something very similar.
Comment by Bartłomiej Piotrowski (Barthalion) - Saturday, 04 October 2014, 10:27 GMT
Fedora deals with the problem as Ubuntu.

Loading...