Created attachment 513872 [details, diff] Adds support for xxhash installation Some external software, like ROOT-6 (available also as sci-physics/root) is checking for system lz4 to omit installation of built-in lz4. However, ROOT is checking for lz4.h, liblz4.so and *xxhash.h* whereas standard lz4 installation doesn't installs xxhash.h. Therefore even if lz4 is installed, ROOT-6 still compiles its own lz4 built-in copy. I am proposing patch for lz4-1.8.0.ebuild (bump to -r1) which modifies original CMakeLists.txt and, if USE=xxhash is set, installs also this missing header. With this, ROOT-6 properly recognizes system's lz4 and skips its own installation.
Of course, sci-physics/root-6.12.04-r1 should now require app-arch/lz4[xxhash]
This is the wrong solution. xxHash is a separate project, and we shouldn't make random assumptions that packages should link to lz4 for it. If at all, we should look into packaging it separately, and possibly making lz4 link to it.
That said, I think xxHash is generally meant to be bundled with software, supposedly for performance reasons.
I am aware of this problem, and I agree with Michał. I will package xxhash as its own package (see https://github.com/Cyan4973/xxHash/issues/111). Once that's done I will make ROOT use the externally provided xxhash. The real problem is how LZ4 is currently integrated in ROOT. ROOT uses xxhash independently of LZ4 to hash the compressed contents of ROOT files, so this needs to be resolved upstream too, to avoid this problem on other operating systems as well when LZ4 is present.
I added xxhash as dev-libs/xxhash. Maybe app-crypt is a better category for it in hindsight. Now sci-physics/root depends on xxhash and we can make app-arch/lz4 depend on it too. Not sure what to do for this bug, but I'm closing bug 644434 as fixed.