mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 14:19:58 +03:00
Merge pull request #40286 from LumiGuide/opencv.pc
opencv3: fix $out/lib/pkgconfig/opencv.pc
This commit is contained in:
commit
16517b81cd
@ -254,6 +254,21 @@ stdenv.mkDerivation rec {
|
||||
make doxygen
|
||||
'';
|
||||
|
||||
# By default $out/lib/pkgconfig/opencv.pc looks something like this:
|
||||
#
|
||||
# prefix=/nix/store/10pzq1a8fkh8q4sysj8n6mv0w0nl0miq-opencv-3.4.1
|
||||
# exec_prefix=${prefix}
|
||||
# libdir=${exec_prefix}//nix/store/10pzq1a8fkh8q4sysj8n6mv0w0nl0miq-opencv-3.4.1/lib
|
||||
# ...
|
||||
# Libs: -L${exec_prefix}//nix/store/10pzq1a8fkh8q4sysj8n6mv0w0nl0miq-opencv-3.4.1/lib ...
|
||||
#
|
||||
# Note that ${exec_prefix} is set to $out but that $out is also appended to
|
||||
# ${exec_prefix}. This causes linker errors in downstream packages so we strip
|
||||
# of $out after the ${exec_prefix} prefix:
|
||||
postInstall = ''
|
||||
sed -i "s|\''${exec_prefix}/$out|\''${exec_prefix}|" "$out/lib/pkgconfig/opencv.pc"
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
|
||||
passthru = lib.optionalAttrs enablePython { pythonPath = []; };
|
||||
|
Loading…
Reference in New Issue
Block a user