otb: init at 9.0.0 (#325630)
This commit is contained in:
@@ -4993,6 +4993,12 @@
|
||||
githubId = 7589338;
|
||||
name = "Daniel Șerbănescu";
|
||||
};
|
||||
daspk04 = {
|
||||
email = "dpratyush.k@gmail.com";
|
||||
github = "daspk04";
|
||||
githubId = 28738918;
|
||||
name = "Pratyush Das";
|
||||
};
|
||||
datafoo = {
|
||||
github = "datafoo";
|
||||
githubId = 34766150;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
diff -burN InsightToolkit-4.10.0.orig/CMake/FindFFTW.cmake InsightToolkit-4.10.0/CMake/FindFFTW.cmake
|
||||
--- InsightToolkit-4.10.0.orig/CMake/FindFFTW.cmake 2016-06-16 14:21:15.226203872 +0200
|
||||
+++ InsightToolkit-4.10.0/CMake/FindFFTW.cmake 2016-06-16 14:23:48.966202670 +0200
|
||||
@@ -35,14 +35,12 @@
|
||||
set(FFTW_LIB_SEARCHPATH
|
||||
${FFTW_INSTALL_BASE_PATH}/lib
|
||||
${FFTW_INSTALL_BASE_PATH}/lib64
|
||||
- /usr/lib/fftw
|
||||
- /usr/local/lib/fftw
|
||||
)
|
||||
|
||||
if(ITK_USE_FFTWD)
|
||||
mark_as_advanced(FFTWD_LIB)
|
||||
- find_library(FFTWD_LIB fftw3 ${FFTW_LIB_SEARCHPATH}) #Double Precision Lib
|
||||
- find_library(FFTWD_THREADS_LIB fftw3_threads ${FFTW_LIB_SEARCHPATH}) #Double Precision Lib only if compiled with threads support
|
||||
+ find_library(FFTWD_LIB fftw3 ${FFTW_LIB_SEARCHPATH} NO_DEFAULT_PATH) #Double Precision Lib
|
||||
+ find_library(FFTWD_THREADS_LIB fftw3_threads ${FFTW_LIB_SEARCHPATH} NO_DEFAULT_PATH) #Double Precision Lib only if compiled with threads support
|
||||
|
||||
if(FFTWD_LIB)
|
||||
set(FFTWD_FOUND 1)
|
||||
@@ -55,8 +53,8 @@
|
||||
|
||||
if(ITK_USE_FFTWF)
|
||||
mark_as_advanced(FFTWF_LIB)
|
||||
- find_library(FFTWF_LIB fftw3f ${FFTW_LIB_SEARCHPATH}) #Single Precision Lib
|
||||
- find_library(FFTWF_THREADS_LIB fftw3f_threads ${FFTW_LIB_SEARCHPATH}) #Single Precision Lib only if compiled with threads support
|
||||
+ find_library(FFTWF_LIB fftw3f ${FFTW_LIB_SEARCHPATH} NO_DEFAULT_PATH) #Single Precision Lib
|
||||
+ find_library(FFTWF_THREADS_LIB fftw3f_threads ${FFTW_LIB_SEARCHPATH} NO_DEFAULT_PATH) #Single Precision Lib only if compiled with threads support
|
||||
|
||||
if(FFTWF_LIB)
|
||||
set(FFTWF_FOUND 1)
|
||||
@@ -0,0 +1,35 @@
|
||||
diff -burN InsightToolkit-4.12.0.orig/Modules/ThirdParty/VNL/src/CMakeLists.txt InsightToolkit-4.12.0/Modules/ThirdParty/VNL/src/CMakeLists.txt
|
||||
--- InsightToolkit-4.12.0.orig/Modules/ThirdParty/VNL/src/CMakeLists.txt 2017-08-22 11:53:55.960938649 +0200
|
||||
+++ InsightToolkit-4.12.0/Modules/ThirdParty/VNL/src/CMakeLists.txt 2017-08-22 11:56:07.289820954 +0200
|
||||
@@ -18,10 +18,14 @@
|
||||
# Retrive the variable type to CACHE.
|
||||
set(BUILD_EXAMPLES ${BUILD_EXAMPLES} CACHE BOOL "Build the examples from the ITK Software Guide." FORCE)
|
||||
|
||||
-foreach(lib itkvcl itkv3p_netlib itktestlib itkvnl itkvnl_algo itknetlib)
|
||||
+foreach(lib itkvcl itkv3p_netlib itkvnl itkvnl_algo itknetlib)
|
||||
itk_module_target(${lib} NO_INSTALL)
|
||||
endforeach()
|
||||
|
||||
+if(BUILD_TESTING)
|
||||
+ itk_module_target(itktestlib NO_INSTALL)
|
||||
+endif()
|
||||
+
|
||||
foreach(exe
|
||||
netlib_integral_test
|
||||
netlib_lbfgs_example
|
||||
diff -burN InsightToolkit-4.12.0.orig/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt InsightToolkit-4.12.0/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt
|
||||
--- InsightToolkit-4.12.0.orig/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt 2017-08-22 11:53:55.960938649 +0200
|
||||
+++ InsightToolkit-4.12.0/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt 2017-08-22 11:56:56.410150930 +0200
|
||||
@@ -131,8 +131,10 @@
|
||||
set(CORE_VIDEO_FOUND OFF CACHE INTERNAL "VXL core video libraries built")
|
||||
endif ()
|
||||
|
||||
-# common test executable
|
||||
-add_subdirectory(testlib)
|
||||
+# common test executable if testing enabled
|
||||
+if(BUILD_TESTING)
|
||||
+ add_subdirectory(testlib)
|
||||
+endif()
|
||||
|
||||
# Tests that check and output the vxl configuration
|
||||
# NOTE: some external projects remove the tests directory (aka ITK)
|
||||
@@ -0,0 +1,104 @@
|
||||
--- a/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h
|
||||
+++ b/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h
|
||||
@@ -43,85 +43,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(__ICC) // icc 8.0 defines __GNUC__
|
||||
-# define VCL_GCC
|
||||
-# if (__GNUC__ < 4)
|
||||
-# error "forget it."
|
||||
-# elif (__GNUC__==4)
|
||||
-# define VCL_GCC_4
|
||||
-# if (__GNUC_MINOR__ > 0 )
|
||||
-# define VCL_GCC_41
|
||||
-# else
|
||||
-# define VCL_GCC_40
|
||||
-# endif
|
||||
-# elif (__GNUC__==5)
|
||||
-# define VCL_GCC_5
|
||||
-# if (__GNUC_MINOR__ > 2 )
|
||||
-# define VCL_GCC_53
|
||||
-# elif (__GNUC_MINOR__ > 1 )
|
||||
-# define VCL_GCC_52
|
||||
-# elif (__GNUC_MINOR__ > 0 )
|
||||
-# define VCL_GCC_51
|
||||
-# else
|
||||
-# define VCL_GCC_50
|
||||
-# endif
|
||||
-# elif (__GNUC__==6)
|
||||
-# define VCL_GCC_6
|
||||
-# if (__GNUC_MINOR__ > 2 )
|
||||
-# define VCL_GCC_63
|
||||
-# elif (__GNUC_MINOR__ > 1 )
|
||||
-# define VCL_GCC_62
|
||||
-# elif (__GNUC_MINOR__ > 0 )
|
||||
-# define VCL_GCC_61
|
||||
-# else
|
||||
-# define VCL_GCC_60
|
||||
-# endif
|
||||
-# elif (__GNUC__==7)
|
||||
-# define VCL_GCC_7
|
||||
-# if (__GNUC_MINOR__ > 2 )
|
||||
-# define VCL_GCC_73
|
||||
-# elif (__GNUC_MINOR__ > 1 )
|
||||
-# define VCL_GCC_72
|
||||
-# elif (__GNUC_MINOR__ > 0 )
|
||||
-# define VCL_GCC_71
|
||||
-# else
|
||||
-# define VCL_GCC_70
|
||||
-# endif
|
||||
-# elif (__GNUC__==8)
|
||||
-# define VCL_GCC_8
|
||||
-# if (__GNUC_MINOR__ > 2 )
|
||||
-# define VCL_GCC_83
|
||||
-# elif (__GNUC_MINOR__ > 1 )
|
||||
-# define VCL_GCC_82
|
||||
-# elif (__GNUC_MINOR__ > 0 )
|
||||
-# define VCL_GCC_81
|
||||
-# else
|
||||
-# define VCL_GCC_80
|
||||
-# endif
|
||||
-# elif (__GNUC__==9)
|
||||
-# define VCL_GCC_9
|
||||
-# if (__GNUC_MINOR__ > 2 )
|
||||
-# define VCL_GCC_93
|
||||
-# elif (__GNUC_MINOR__ > 1 )
|
||||
-# define VCL_GCC_92
|
||||
-# elif (__GNUC_MINOR__ > 0 )
|
||||
-# define VCL_GCC_91
|
||||
-# else
|
||||
-# define VCL_GCC_90
|
||||
-# endif
|
||||
-# elif (__GNUC__==10)
|
||||
-# define VCL_GCC_10
|
||||
-# if (__GNUC_MINOR__ > 2 )
|
||||
-# define VCL_GCC_103
|
||||
-# elif (__GNUC_MINOR__ > 1 )
|
||||
-# define VCL_GCC_102
|
||||
-# elif (__GNUC_MINOR__ > 0 )
|
||||
-# define VCL_GCC_101
|
||||
-# else
|
||||
-# define VCL_GCC_100
|
||||
-# endif
|
||||
-# else
|
||||
-# error "Dunno about this gcc"
|
||||
-# endif
|
||||
+# define VCL_GCC_73
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
--- a/Modules/ThirdParty/VNL/src/vxl/vcl/tests/test_preprocessor.cxx
|
||||
+++ b/Modules/ThirdParty/VNL/src/vxl/vcl/tests/test_preprocessor.cxx
|
||||
@@ -64,6 +64,12 @@
|
||||
++minor_count;
|
||||
#endif
|
||||
|
||||
+#ifdef VCL_GCC_73
|
||||
+ ++compiler_count;
|
||||
+ ++major_count;
|
||||
+ ++minor_count;
|
||||
+#endif
|
||||
+
|
||||
#ifdef VCL_VC
|
||||
++compiler_count;
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
expat,
|
||||
fftw,
|
||||
fftwFloat,
|
||||
hdf5-cpp,
|
||||
libjpeg,
|
||||
libtiff,
|
||||
libpng,
|
||||
libuuid,
|
||||
xz,
|
||||
vtk,
|
||||
zlib,
|
||||
}:
|
||||
# this ITK version is old and is only required for OTB package
|
||||
# https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/blob/develop/SuperBuild/CMake/External_itk.cmake?ref_type=heads#L149
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "itk";
|
||||
version = "4.13.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "InsightSoftwareConsortium";
|
||||
repo = "ITK";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-lcoJ+H+nVlvleBqbmupu+yg+4iZQ4mTs9pt1mQac+xg=";
|
||||
};
|
||||
|
||||
# https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/tree/develop/SuperBuild/patches/ITK?ref_type=heads
|
||||
patches = [
|
||||
./itk-1-fftw-all.diff
|
||||
./itk-2-itktestlib-all.diff
|
||||
./itk-3-remove-gcc-version-debian-medteam-all.diff
|
||||
];
|
||||
|
||||
# https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/blob/develop/SuperBuild/CMake/External_itk.cmake?ref_type=heads
|
||||
cmakeFlags = [
|
||||
"-DBUILD_TESTING=OFF"
|
||||
"-DBUILD_EXAMPLES=OFF"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DITK_BUILD_DEFAULT_MODULES=OFF"
|
||||
"-DITKGroup_Core=OFF"
|
||||
"-DITK_FORBID_DOWNLOADS=ON"
|
||||
"-DITK_USE_SYSTEM_LIBRARIES=ON" # finds common libraries e.g. hdf5, libpng, libtiff, libjpeg, zlib etc
|
||||
"-DModule_ITKCommon=ON"
|
||||
"-DModule_ITKFiniteDifference=ON"
|
||||
"-DModule_ITKGPUCommon=ON"
|
||||
"-DModule_ITKGPUFiniteDifference=ON"
|
||||
"-DModule_ITKImageAdaptors=ON"
|
||||
"-DModule_ITKImageFunction=ON"
|
||||
"-DModule_ITKMesh=ON"
|
||||
"-DModule_ITKQuadEdgeMesh=ON"
|
||||
"-DModule_ITKSpatialObjects=ON"
|
||||
"-DModule_ITKTransform=ON"
|
||||
"-DModule_ITKTransformFactory=ON"
|
||||
"-DModule_ITKIOTransformBase=ON"
|
||||
"-DModule_ITKIOTransformInsightLegacy=ON"
|
||||
"-DModule_ITKIOTransformMatlab=ON"
|
||||
"-DModule_ITKAnisotropicSmoothing=ON"
|
||||
"-DModule_ITKAntiAlias=ON"
|
||||
"-DModule_ITKBiasCorrection=ON"
|
||||
"-DModule_ITKBinaryMathematicalMorphology=ON"
|
||||
"-DModule_ITKColormap=ON"
|
||||
"-DModule_ITKConvolution=ON"
|
||||
"-DModule_ITKCurvatureFlow=ON"
|
||||
"-DModule_ITKDeconvolution=ON"
|
||||
"-DModule_ITKDenoising=ON"
|
||||
"-DModule_ITKDisplacementField=ON"
|
||||
"-DModule_ITKDistanceMap=ON"
|
||||
"-DModule_ITKFastMarching=ON"
|
||||
"-DModule_ITKFFT=ON"
|
||||
"-DModule_ITKGPUAnisotropicSmoothing=ON"
|
||||
"-DModule_ITKGPUImageFilterBase=ON"
|
||||
"-DModule_ITKGPUSmoothing=ON"
|
||||
"-DModule_ITKGPUThresholding=ON"
|
||||
"-DModule_ITKImageCompare=ON"
|
||||
"-DModule_ITKImageCompose=ON"
|
||||
"-DModule_ITKImageFeature=ON"
|
||||
"-DModule_ITKImageFilterBase=ON"
|
||||
"-DModule_ITKImageFusion=ON"
|
||||
"-DModule_ITKImageGradient=ON"
|
||||
"-DModule_ITKImageGrid=ON"
|
||||
"-DModule_ITKImageIntensity=ON"
|
||||
"-DModule_ITKImageLabel=ON"
|
||||
"-DModule_ITKImageSources=ON"
|
||||
"-DModule_ITKImageStatistics=ON"
|
||||
"-DModule_ITKLabelMap=ON"
|
||||
"-DModule_ITKMathematicalMorphology=ON"
|
||||
"-DModule_ITKPath=ON"
|
||||
"-DModule_ITKQuadEdgeMeshFiltering=ON"
|
||||
"-DModule_ITKSmoothing=ON"
|
||||
"-DModule_ITKSpatialFunction=ON"
|
||||
"-DModule_ITKThresholding=ON"
|
||||
"-DModule_ITKEigen=ON"
|
||||
"-DModule_ITKNarrowBand=ON"
|
||||
"-DModule_ITKNeuralNetworks=ON"
|
||||
"-DModule_ITKOptimizers=ON"
|
||||
"-DModule_ITKOptimizersv4=ON"
|
||||
"-DModule_ITKPolynomials=ON"
|
||||
"-DModule_ITKStatistics=ON"
|
||||
"-DModule_ITKRegistrationCommon=ON"
|
||||
"-DModule_ITKGPURegistrationCommon=ON"
|
||||
"-DModule_ITKGPUPDEDeformableRegistration=ON"
|
||||
"-DModule_ITKMetricsv4=ON"
|
||||
"-DModule_ITKPDEDeformableRegistration=ON"
|
||||
"-DModule_ITKRegistrationMethodsv4=ON"
|
||||
"-DModule_ITKClassifiers=ON"
|
||||
"-DModule_ITKConnectedComponents=ON"
|
||||
"-DModule_ITKDeformableMesh=ON"
|
||||
"-DModule_ITKKLMRegionGrowing=ON"
|
||||
"-DModule_ITKLabelVoting=ON"
|
||||
"-DModule_ITKLevelSets=ON"
|
||||
"-DModule_ITKLevelSetsv4=ON"
|
||||
"-DModule_ITKMarkovRandomFieldsClassifiers=ON"
|
||||
"-DModule_ITKRegionGrowing=ON"
|
||||
"-DModule_ITKSignedDistanceFunction=ON"
|
||||
"-DModule_ITKVoronoi=ON"
|
||||
"-DModule_ITKWatersheds=ON"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
xz
|
||||
];
|
||||
buildInputs = [ libuuid ];
|
||||
propagatedBuildInputs = [
|
||||
# similar to 5.2.x, we progagate these inputs for OTB
|
||||
expat
|
||||
fftw
|
||||
fftwFloat
|
||||
hdf5-cpp
|
||||
libjpeg
|
||||
libpng
|
||||
libtiff
|
||||
zlib
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Insight Segmentation and Registration Toolkit";
|
||||
homepage = "https://www.itk.org";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ daspk04 ];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,108 @@
|
||||
{
|
||||
cmake,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
lib,
|
||||
stdenv,
|
||||
swig,
|
||||
which,
|
||||
boost,
|
||||
curl,
|
||||
gdal,
|
||||
libsvm,
|
||||
libgeotiff,
|
||||
muparser,
|
||||
muparserx,
|
||||
opencv,
|
||||
perl,
|
||||
python3,
|
||||
shark,
|
||||
tinyxml,
|
||||
enableFeatureExtraction ? true,
|
||||
enableHyperspectral ? true,
|
||||
enableLearning ? true,
|
||||
enableMiscellaneous ? true,
|
||||
enableOpenMP ? false,
|
||||
enablePython ? true,
|
||||
extraPythonPackages ? ps: with ps; [ ],
|
||||
enableRemote ? true,
|
||||
enableSAR ? true,
|
||||
enableSegmentation ? true,
|
||||
enableStereoProcessing ? true,
|
||||
}:
|
||||
let
|
||||
inherit (lib) optionalString optionals optional;
|
||||
pythonInputs =
|
||||
optionals enablePython (with python3.pkgs; [ numpy ]) ++ (extraPythonPackages python3.pkgs);
|
||||
|
||||
otb-itk = callPackage ./itk_4_13/package.nix { };
|
||||
otb-shark = shark.override { enableOpenMP = enableOpenMP; };
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "otb";
|
||||
version = "9.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "orfeotoolbox";
|
||||
repo = "otb";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-Ut2aimQL6Reg62iceoaM7/nRuEV8PBWtOK7KFHKp0ws=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
swig
|
||||
which
|
||||
];
|
||||
|
||||
# https://www.orfeo-toolbox.org/CookBook/CompilingOTBFromSource.html#native-build-with-system-dependencies
|
||||
# activates all modules and python by default
|
||||
cmakeFlags =
|
||||
optional enableFeatureExtraction "-DOTB_BUILD_FeaturesExtraction=ON"
|
||||
++ optional enableHyperspectral "-DOTB_BUILD_Hyperspectral=ON"
|
||||
++ optional enableLearning "-DOTB_BUILD_Learning=ON"
|
||||
++ optional enableMiscellaneous "-DOTB_BUILD_Miscellaneous=ON"
|
||||
++ optional enableOpenMP "-DOTB_USE_OPENMP=ON"
|
||||
++ optional enableRemote "-DOTB_BUILD_RemoteModules=ON"
|
||||
++ optional enableSAR "-DOTB_BUILD_SAR=ON"
|
||||
++ optional enableSegmentation "-DOTB_BUILD_Segmentation=ON"
|
||||
++ optional enableStereoProcessing "-DOTB_BUILD_StereoProcessing=ON"
|
||||
++ optional enablePython "-DOTB_WRAP_PYTHON=ON"
|
||||
++ optional finalAttrs.doInstallCheck "-DBUILD_TESTING=ON";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
boost
|
||||
curl
|
||||
gdal
|
||||
libgeotiff
|
||||
libsvm
|
||||
muparser
|
||||
muparserx
|
||||
opencv
|
||||
otb-itk
|
||||
otb-shark
|
||||
perl
|
||||
swig
|
||||
tinyxml
|
||||
] ++ optionals enablePython ([ python3 ] ++ pythonInputs);
|
||||
|
||||
doInstallCheck = false;
|
||||
|
||||
pythonPath = optionals enablePython pythonInputs;
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/otbcli \
|
||||
--set OTB_INSTALL_DIR "$out" \
|
||||
--set OTB_APPLICATION_PATH "$out/lib/otb/applications"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Open Source processing of remote sensing images";
|
||||
homepage = "https://www.orfeo-toolbox.org/";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ daspk04 ];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
boost,
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
openssl,
|
||||
stdenv,
|
||||
enableOpenMP ? false,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "shark";
|
||||
version = "4.0-unstable-2024-05-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Shark-ML";
|
||||
repo = "Shark";
|
||||
rev = "16a7cecf1c012ceaa406e3a5af54d1a6a47d5cda";
|
||||
hash = "sha256-xwniI2+Kry04zQqlYjMTp60O6YLibFy+Q/2CY0PHpqs=";
|
||||
};
|
||||
|
||||
# https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/tree/develop/SuperBuild/patches/SHARK?ref_type=heads
|
||||
# patch of hdf5 seems to be not needed based on latest master branch of shark as HDF5 has been removed
|
||||
# c.f https://github.com/Shark-ML/Shark/commit/221c1f2e8abfffadbf3c5ef7cf324bc6dc9b4315
|
||||
patches = [ ./shark-2-ext-num-literals-all.diff ];
|
||||
|
||||
# https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/blob/develop/SuperBuild/CMake/External_shark.cmake?ref_type=heads
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DBUILD_EXAMPLES=OFF"
|
||||
"-DBUILD_DOCS=OFF"
|
||||
"-DBUILD_TESTING=OFF"
|
||||
"-DENABLE_CBLAS=OFF"
|
||||
] ++ lib.optionals (!enableOpenMP) [ "-DENABLE_OPENMP=OFF" ];
|
||||
buildInputs = [
|
||||
boost
|
||||
openssl
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = {
|
||||
description = "Fast, modular, general open-source C++ machine learning library";
|
||||
homepage = "https://shark-ml.github.io/Shark/";
|
||||
license = lib.licenses.lgpl3Only;
|
||||
maintainers = with lib.maintainers; [ daspk04 ];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,21 @@
|
||||
diff -burN Shark.orig/CMakeLists.txt Shark/CMakeLists.txt
|
||||
--- Shark.orig/CMakeLists.txt 2016-09-02 17:04:54.000000000 +0200
|
||||
+++ Shark/CMakeLists.txt 2017-07-31 16:41:18.563473752 +0200
|
||||
@@ -194,6 +194,8 @@
|
||||
#####################################################################
|
||||
# HDF5 configuration
|
||||
#####################################################################
|
||||
+option(ENABLE_HDF5 "Use HDF5" ON)
|
||||
+if(ENABLE_HDF5)
|
||||
find_package(HDF5 COMPONENTS C CXX HL QUIET)
|
||||
mark_as_advanced(HDF5_DIR)
|
||||
if(HDF5_FOUND)
|
||||
@@ -215,7 +217,7 @@
|
||||
else()
|
||||
message(STATUS "HDF5 not found, skip")
|
||||
endif()
|
||||
-
|
||||
+endif() #ENABLE_HDF5
|
||||
#####################################################################
|
||||
# ATLAS configuration
|
||||
#####################################################################
|
||||
@@ -0,0 +1,13 @@
|
||||
diff -burN Shark.orig/CMakeLists.txt Shark/CMakeLists.txt
|
||||
--- Shark.orig/CMakeLists.txt 2018-02-05 18:04:58.012612932 +0100
|
||||
+++ Shark/CMakeLists.txt 2018-02-05 18:20:50.032233165 +0100
|
||||
@@ -415,6 +415,9 @@
|
||||
#####################################################################
|
||||
# General Path settings
|
||||
#####################################################################
|
||||
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
+ add_definitions(-fext-numeric-literals)
|
||||
+endif()
|
||||
include_directories( ${shark_SOURCE_DIR}/include )
|
||||
include_directories( ${shark_BINARY_DIR}/include )
|
||||
add_subdirectory( include )
|
||||
Reference in New Issue
Block a user