Skip to content

Commit c32c0dd

Browse files
committed
opencv3,opencv4: disable some unnecessary vendoring on Darwin
1 parent 3ce358d commit c32c0dd

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

pkgs/development/libraries/opencv/3.x.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,16 @@ stdenv.mkDerivation {
252252
] ++ lib.optionals stdenv.isDarwin [
253253
"-DWITH_OPENCL=OFF"
254254
"-DWITH_LAPACK=OFF"
255+
256+
# Disable unnecessary vendoring that's enabled by default only for Darwin.
257+
# Note that the opencvFlag feature flags listed above still take
258+
# precedence, so we can safely list everything here.
259+
"-DBUILD_ZLIB=OFF"
260+
"-DBUILD_TIFF=OFF"
261+
"-DBUILD_JASPER=OFF"
262+
"-DBUILD_JPEG=OFF"
263+
"-DBUILD_PNG=OFF"
264+
"-DBUILD_WEBP=OFF"
255265
] ++ lib.optionals enablePython [
256266
"-DOPENCV_SKIP_PYTHON_LOADER=ON"
257267
] ++ lib.optionals enableEigen [

pkgs/development/libraries/opencv/4.x.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,17 @@ stdenv.mkDerivation {
424424
] ++ lib.optionals stdenv.isDarwin [
425425
"-DWITH_OPENCL=OFF"
426426
"-DWITH_LAPACK=OFF"
427+
428+
# Disable unnecessary vendoring that's enabled by default only for Darwin.
429+
# Note that the opencvFlag feature flags listed above still take
430+
# precedence, so we can safely list everything here.
431+
"-DBUILD_ZLIB=OFF"
432+
"-DBUILD_TIFF=OFF"
433+
"-DBUILD_OPENJPEG=OFF"
434+
"-DBUILD_JASPER=OFF"
435+
"-DBUILD_JPEG=OFF"
436+
"-DBUILD_PNG=OFF"
437+
"-DBUILD_WEBP=OFF"
427438
] ++ lib.optionals (!stdenv.isDarwin) [
428439
"-DOPENCL_LIBRARY=${ocl-icd}/lib/libOpenCL.so"
429440
] ++ lib.optionals enablePython [

0 commit comments

Comments
 (0)