tbb: add pkg-config file

Gazebo does not list the tbb dependency in its pkg-config file otherwise.
This commit is contained in:
Jan Tojnar 2021-05-11 16:00:03 +02:00
parent d2f30b0b11
commit d8258b513d
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -51,6 +51,23 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
postInstall = let
pcTemplate = fetchurl {
url = "https://github.com/oneapi-src/oneTBB/raw/master/integration/pkg-config/tbb.pc.in";
sha256 = "2pCad9txSpNbzac0vp/VY3x7HNySaYkbH3Rx8LK53pI=";
};
in ''
# Generate pkg-config file based on upstream template.
# It should not be necessary with tbb after 2021.2.
mkdir -p "$out/lib/pkgconfig"
substitute "${pcTemplate}" "$out/lib/pkgconfig/tbb.pc" \
--subst-var-by CMAKE_INSTALL_PREFIX "$out" \
--subst-var-by CMAKE_INSTALL_LIBDIR "lib" \
--subst-var-by CMAKE_INSTALL_INCLUDEDIR "include" \
--subst-var-by TBB_VERSION "${version}" \
--subst-var-by TBB_LIB_NAME "tbb"
'';
meta = with lib; {
description = "Intel Thread Building Blocks C++ Library";
homepage = "http://threadingbuildingblocks.org/";