From 4be7222f98f0d838a2f99ac7720b3eac4e539b15 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 28 Feb 2025 08:21:04 +0000 Subject: [PATCH] emgucv: remove unused inputs --- pkgs/by-name/emgucv/package.nix | 125 +++----------------------------- 1 file changed, 10 insertions(+), 115 deletions(-) diff --git a/pkgs/by-name/emgucv/package.nix b/pkgs/by-name/emgucv/package.nix index 3147f459d..59b347b99 100644 --- a/pkgs/by-name/emgucv/package.nix +++ b/pkgs/by-name/emgucv/package.nix @@ -1,33 +1,4 @@ -# package configures with notes: -# -- Could not find csc -# -- Could not find gacutil -# -- Could not find al -# -- Could not find resgen -# -- Could not find msbuild -# -- Could not find vstool -# -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.2") -# -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) (Required is at least version "1.2.3") -# -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) -# -- Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources -# -- OpenJPEG: VERSION = 2.5.0, BUILD = opencv-4.10.0-openjp2-2.5.0 -# -- OpenJPEG libraries will be built from sources: libopenjp2 (version "2.5.0") -# -- libva: missing va.h header (VA_INCLUDE_DIR) -# -- IPPICV: Downloading ippicv_2021.11.0_lnx_intel64_20240201_general.tgz from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fd27188235d85e552de31425e7ea0f53ba73ba53/ippicv/ippicv_2021.11.0_lnx_intel64_20240201_general.tgz -# -- Try 1 failed -# -- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off -# -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off -# -- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY) -# -- Could NOT find BLAS (missing: BLAS_LIBRARIES) -# -- Could NOT find LAPACK (missing: LAPACK_LIBRARIES) -# Reason given by package: LAPACK could not be found because dependency BLAS could not be found. -# -- Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) -# -- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT JVM) -# -- Could NOT find VTK (missing: VTK_DIR) -# -- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file -# -- ADE: Downloading v0.1.2d.zip from https://github.com/opencv/ade/archive/v0.1.2d.zip -# -- Try 1 failed -# -- Could NOT find GEOTIFF (missing: GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR) -# -- CVEXTERN: GEOTIFF not found. Building from source +# # # package build fails with: # [100%] Built target cvextern @@ -38,7 +9,6 @@ # /build/source/Emgu.CV/NetStandard/Emgu.CV.csproj : error NU1301: Resource temporarily unavailable # Failed to restore /build/source/Emgu.CV/NetStandard/Emgu.CV.csproj (in 5.78 sec). - { buildDotnetModule, cmake, @@ -53,14 +23,8 @@ libpng, libtiff, libva, - mono, - msbuild, - openblas, openjpeg, - opencv, - pkg-config, stdenv, - # vsbuild, vtk, }: buildDotnetModule rec { @@ -77,83 +41,26 @@ buildDotnetModule rec { nativeBuildInputs = [ cmake - # dotnetConfigureHook # configures (hopefully) dotnet "tools", i.e. .config/dotnet-tools.json - pkg-config - # mono - # msbuild - # vsbuild stdenv.cc ]; buildInputs = [ - eigen #< TODO: doesn't it ship eigen as a submodule? - lapack - libgeotiff #< TODO: necessary? - libjpeg #< TODO: necessary? + eigen #< yes, this *does* impact the build, even though emgucv vendors its own + lapack #< TODO: necessary? + libgeotiff + libjpeg libpng libtiff - libva - openblas + libva #< TODO: necessary? + # openblas openjpeg # opencv - vtk + vtk #< TODO: necessary? ]; dotnet-sdk = dotnetCorePackages.sdk_9_0; dotnet-runtime = dotnetCorePackages.runtime_9_0; - # cmakeOptions = [ - # # options set by emgucv platforms/ubuntu/24.04/cmake_configure: - # "-DWITH_CUDA=FALSE" - # "-DOPENCV_DNN_CUDA=FALSE" - # "-DBUILD_SHARED_LIBS=FALSE" - # # -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -DCMAKE_BUILD_TYPE:STRING="Release" -DCMAKE_INSTALL_PREFIX:STRING="$INSTALL_FOLDER" -DCMAKE_FIND_ROOT_PATH:STRING="$INSTALL_FOLDER" -DCMAKE_CXX_STANDARD:String="17" - # "-DEMGU_CV_WITH_TESSERACT=FALSE" - # "-DBUILD_opencv_3d=FALSE" - # "-DBUILD_opencv_calib=FALSE" - # "-DBUILD_opencv_dnn=FALSE" - # "-DBUILD_opencv_ml=FALSE" - # "-DBUILD_opencv_photo=FALSE" - # "-DBUILD_opencv_features2d=FALSE" - # "-DBUILD_opencv_gapi=FALSE" - # "-DBUILD_opencv_flann=FALSE" - # "-DBUILD_opencv_video=FALSE" - # "-DEMGU_CV_WITH_FREETYPE=FALSE" - # "-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE" - # "-DBUILD_TESTS=FALSE" - # "-DBUILD_PNG=TRUE" - # "-DBUILD_JPEG=TRUE" - # "-DBUILD_WEBP=TRUE" - # "-DBUILD_JASPER=TRUE" - # "-DBUILD_JAVA=FALSE" - # "-DBUILD_TIFF=TRUE" - # "-DBUILD_OPENEXR=TRUE" - # "-DBUILD_ZLIB=TRUE" - # "-DBUILD_PERF_TESTS=FALSE" - # "-DBUILD_opencv_apps=FALSE" - # "-DBUILD_DOCS=FALSE" - # "-DBUILD_opencv_ts=FALSE" - # "-DBUILD_opencv_java=FALSE" - # "-DBUILD_opencv_python2=FALSE" - # "-DBUILD_opencv_python3=FALSE" - # "-DWITH_EIGEN=TRUE" - - # # options set by UVtools: - # "-DWITH_V4L=FALSE" - # "-DWITH_FFMPEG=FALSE" - # "-DWITH_GSTREAMER=FALSE" - # "-DWITH_1394=FALSE" - # "-DVIDEOIO_ENABLE_PLUGINS=FALSE" - # "-DBUILD_opencv_videoio=FALSE" - # "-DBUILD_opencv_gapi=FALSE" - # "-DWITH_PROTOBUF=FALSE" - # "-DBUILD_PROTOBUF=FALSE" - # ]; - - # NIX_CFLAGS_COMPILE = toString [ - # "-I${opencv.out}/include/opencv4" - # ]; - # we only need libcvextern.so, and some of the other targets fail to build postPatch = lib.concatMapStrings (d: '' substituteInPlace CMakeLists.txt --replace-fail \ @@ -161,25 +68,13 @@ buildDotnetModule rec { '# ADD_SUBDIRECTORY(${d})' '') [ # "Emgu.Util" - # Building Emgu.CV with command: "/nix/store/0j7yyvgrx15f8bvinl9drrh5ibgr187d-dotnet-runtime-wrapped-9.0.2/bin/dotnet" build -c Release /p:Platform="AnyCPU" "/build/source/Emgu.CV/NetStandard/Emgu.CV.csproj" - # The command could not be loaded, possibly because: - # * You intended to execute a .NET application: - # The application 'build' does not exist. - # * You intended to execute a .NET SDK command: - # No .NET SDKs were found. - # - # Download a .NET SDK: - # https://aka.ms/dotnet/download - # - # Learn about SDK resolution: - # https://aka.ms/dotnet/sdk-not-found - # # > Determining projects to restore... # > /build/source/Emgu.CV/NetStandard/Emgu.CV.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. # > /build/source/Emgu.CV/NetStandard/Emgu.CV.csproj : error NU1301: Resource temporarily unavailable (api.nuget.org:443) # > /build/source/Emgu.CV/NetStandard/Emgu.CV.csproj : error NU1301: Resource temporarily unavailable # > Failed to restore /build/source/Emgu.CV/NetStandard/Emgu.CV.csproj (in 5.86 sec). - + # TODO: with enough rangling, `nugetDeps` _should_ allow fixing this. + # but it needs a slightly custom approach because of the mix of CMake + nuget "Emgu.CV" "Emgu.CV.Bitmap"