Merge #235823: libclc: fix .pc paths

...into staging
This commit is contained in:
Vladimír Čunát
2023-06-17 16:19:49 +02:00
2 changed files with 14 additions and 3 deletions
@@ -14,6 +14,10 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
patches = [
./libclc-gnu-install-dirs.patch
];
# cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch
postPatch = ''
substituteInPlace CMakeLists.txt \
@@ -35,9 +39,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ninja python3 ];
buildInputs = [ llvm_14 ];
strictDeps = true;
cmakeFlags = [
"-DCMAKE_INSTALL_INCLUDEDIR=include"
];
postInstall = ''
install -Dt $dev/bin prepare_builtins
@@ -0,0 +1,10 @@
--- a/libclc.pc.in
+++ b/libclc.pc.in
@@ -1,5 +1,5 @@
-includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
-libexecdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/clc
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+libexecdir=@CMAKE_INSTALL_FULL_DATADIR@/clc
Name: libclc
Description: Library requirements of the OpenCL C programming language