mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #27674 from Hodapp87/opencv_contrib_py
opencv: Work around build failure with enableContrib & Python
This commit is contained in:
commit
a99c2556f4
1 changed files with 6 additions and 1 deletions
|
@ -90,9 +90,14 @@ stdenv.mkDerivation rec {
|
|||
done
|
||||
'');
|
||||
|
||||
# This prevents cmake from using libraries in impure paths (which causes build failure on non NixOS)
|
||||
# This prevents cmake from using libraries in impure paths (which
|
||||
# causes build failure on non NixOS)
|
||||
# Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with
|
||||
# what appears to be some stray headers in dnn/misc/tensorflow
|
||||
# in contrib when generating the Python bindings:
|
||||
postPatch = ''
|
||||
sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt
|
||||
sed -i -e 's|if len(decls) == 0:|if len(decls) == 0 or "opencv2/" not in hdr:|' ./modules/python/src2/gen2.py
|
||||
'';
|
||||
|
||||
preConfigure =
|
||||
|
|
Loading…
Reference in a new issue