gnu: Update shogun to 6.1.3.
* gnu/packages/machine-learning.scm (shogun): Update to 6.1.3. [source]: Update snippet to remove proprietary software. [arguments]: Rewrite list of symlinks in 'delete-broken-symlinks' phase. Rewrite file lists given to substitute* in 'change-R-target-path' and 'fix-octave-modules' phases. Adjust 'fix-octave-modules' for the update. Add 'move-rxcpp' phase. Rewrite configure-flags for the update. [inputs]: Add eigen. [native-inputs]: Add rxcpp.master
parent
3771000f89
commit
5a14e81e41
|
@ -37,6 +37,7 @@
|
||||||
#:use-module (guix build-system r)
|
#:use-module (guix build-system r)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages algebra)
|
||||||
#:use-module (gnu packages autotools)
|
#:use-module (gnu packages autotools)
|
||||||
#:use-module (gnu packages boost)
|
#:use-module (gnu packages boost)
|
||||||
#:use-module (gnu packages check)
|
#:use-module (gnu packages check)
|
||||||
|
@ -367,7 +368,7 @@ sample proximities between pairs of cases.")
|
||||||
(define-public shogun
|
(define-public shogun
|
||||||
(package
|
(package
|
||||||
(name "shogun")
|
(name "shogun")
|
||||||
(version "4.0.0")
|
(version "6.1.3")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
|
@ -377,7 +378,7 @@ sample proximities between pairs of cases.")
|
||||||
"/sources/shogun-" version ".tar.bz2"))
|
"/sources/shogun-" version ".tar.bz2"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"159nlijnb7mnrv9za80wnm1shwvy45hgrqzn51hxy7gw4z6d6fdb"))
|
"1rn9skm3nw6hr7mr3lgp2gfqhi7ii0lyxck7qmqnf8avq349s5jp"))
|
||||||
(modules '((guix build utils)
|
(modules '((guix build utils)
|
||||||
(ice-9 rdelim)))
|
(ice-9 rdelim)))
|
||||||
(snippet
|
(snippet
|
||||||
|
@ -409,8 +410,20 @@ sample proximities between pairs of cases.")
|
||||||
(and skipping? (not skip-next?)))
|
(and skipping? (not skip-next?)))
|
||||||
(display line out))
|
(display line out))
|
||||||
(loop (read-line in 'concat) skip-next?)))))))
|
(loop (read-line in 'concat) skip-next?)))))))
|
||||||
(for-each delete-ifdefs (find-files "src/shogun/kernel/"
|
(for-each delete-ifdefs
|
||||||
"^Kernel\\.(cpp|h)"))))))
|
(append
|
||||||
|
(find-files "src/shogun/classifier/mkl"
|
||||||
|
"^MKLClassification\\.cpp")
|
||||||
|
(find-files "src/shogun/classifier/svm"
|
||||||
|
"^SVMLightOneClass\\.(cpp|h)")
|
||||||
|
(find-files "src/shogun/multiclass"
|
||||||
|
"^ScatterSVM\\.(cpp|h)")
|
||||||
|
(find-files "src/shogun/kernel/"
|
||||||
|
"^(Kernel|CombinedKernel|ProductKernel)\\.(cpp|h)")
|
||||||
|
(find-files "src/shogun/regression/svr"
|
||||||
|
"^(MKLRegression|SVRLight)\\.(cpp|h)")
|
||||||
|
(find-files "src/shogun/transfer/domain_adaptation"
|
||||||
|
"^DomainAdaptationSVM\\.(cpp|h)")))))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:tests? #f ;no check target
|
'(#:tests? #f ;no check target
|
||||||
|
@ -423,62 +436,59 @@ sample proximities between pairs of cases.")
|
||||||
"applications/easysvm/data"
|
"applications/easysvm/data"
|
||||||
"applications/msplicer/data"
|
"applications/msplicer/data"
|
||||||
"applications/ocr/data"
|
"applications/ocr/data"
|
||||||
"examples/documented/data"
|
"examples/meta/data"
|
||||||
"examples/documented/matlab_static"
|
"examples/undocumented/data"))
|
||||||
"examples/documented/octave_static"
|
|
||||||
"examples/undocumented/data"
|
|
||||||
"examples/undocumented/matlab_static"
|
|
||||||
"examples/undocumented/octave_static"
|
|
||||||
"tests/integration/data"
|
|
||||||
"tests/integration/matlab_static"
|
|
||||||
"tests/integration/octave_static"
|
|
||||||
"tests/integration/python_modular/tests"))
|
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'change-R-target-path
|
(add-after 'unpack 'change-R-target-path
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(substitute* '("src/interfaces/r_modular/CMakeLists.txt"
|
(substitute* '("src/interfaces/r/CMakeLists.txt"
|
||||||
"src/interfaces/r_static/CMakeLists.txt"
|
"examples/meta/r/CMakeLists.txt")
|
||||||
"examples/undocumented/r_modular/CMakeLists.txt")
|
|
||||||
(("\\$\\{R_COMPONENT_LIB_PATH\\}")
|
(("\\$\\{R_COMPONENT_LIB_PATH\\}")
|
||||||
(string-append (assoc-ref outputs "out")
|
(string-append (assoc-ref outputs "out")
|
||||||
"/lib/R/library/")))
|
"/lib/R/library/")))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'fix-octave-modules
|
(add-after 'unpack 'fix-octave-modules
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(substitute* '("src/interfaces/octave_modular/CMakeLists.txt"
|
(substitute* "src/interfaces/octave/CMakeLists.txt"
|
||||||
"src/interfaces/octave_static/CMakeLists.txt")
|
|
||||||
(("^include_directories\\(\\$\\{OCTAVE_INCLUDE_DIRS\\}")
|
(("^include_directories\\(\\$\\{OCTAVE_INCLUDE_DIRS\\}")
|
||||||
"include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLUDE_DIRS}/octave"))
|
"include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLUDE_DIRS}/octave")
|
||||||
|
;; change target directory
|
||||||
;; change target directory
|
|
||||||
(substitute* "src/interfaces/octave_modular/CMakeLists.txt"
|
|
||||||
(("\\$\\{OCTAVE_OCT_LOCAL_API_FILE_DIR\\}")
|
(("\\$\\{OCTAVE_OCT_LOCAL_API_FILE_DIR\\}")
|
||||||
(string-append (assoc-ref outputs "out")
|
(string-append (assoc-ref outputs "out")
|
||||||
"/share/octave/packages")))
|
"/share/octave/packages")))
|
||||||
|
(substitute* '("src/interfaces/octave/swig_typemaps.i"
|
||||||
|
"src/interfaces/octave/sg_print_functions.cpp")
|
||||||
|
;; "octave/config.h" and "octave/oct-obj.h" deprecated in Octave.
|
||||||
|
(("octave/config\\.h") "octave/octave-config.h")
|
||||||
|
(("octave/oct-obj.h") "octave/ovl.h"))
|
||||||
#t))
|
#t))
|
||||||
|
(add-after 'unpack 'move-rxcpp
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((rxcpp-dir "shogun/third-party/rxcpp"))
|
||||||
|
(mkdir-p rxcpp-dir)
|
||||||
|
(install-file (assoc-ref inputs "rxcpp") rxcpp-dir)
|
||||||
|
#t)))
|
||||||
(add-before 'build 'set-HOME
|
(add-before 'build 'set-HOME
|
||||||
;; $HOME needs to be set at some point during the build phase
|
;; $HOME needs to be set at some point during the build phase
|
||||||
(lambda _ (setenv "HOME" "/tmp") #t)))
|
(lambda _ (setenv "HOME" "/tmp") #t)))
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
|
(list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
|
||||||
"-DUSE_SVMLIGHT=OFF" ;disable proprietary SVMLIGHT
|
"-DUSE_SVMLIGHT=OFF" ;disable proprietary SVMLIGHT
|
||||||
;;"-DJavaModular=ON" ;requires unpackaged jblas
|
"-DBUILD_META_EXAMPLES=OFF" ;requires unpackaged ctags
|
||||||
;;"-DRubyModular=ON" ;requires unpackaged ruby-narray
|
;;"-DINTERFACE_JAVA=ON" ;requires unpackaged jblas
|
||||||
;;"-DPerlModular=ON" ;"FindPerlLibs" does not exist
|
;;"-DINTERFACE_RUBY=ON" ;requires unpackaged ruby-narray
|
||||||
;;"-DLuaModular=ON" ;fails because lua doesn't build pkgconfig file
|
;;"-DINTERFACE_PERL=ON" ;"FindPerlLibs" does not exist
|
||||||
"-DOctaveModular=ON"
|
;;"-DINTERFACE_LUA=ON" ;fails because lua doesn't build pkgconfig file
|
||||||
"-DOctaveStatic=ON"
|
"-DINTERFACE_OCTAVE=ON"
|
||||||
"-DPythonModular=ON"
|
"-DINTERFACE_PYTHON=ON"
|
||||||
"-DPythonStatic=ON"
|
"-DINTERFACE_R=ON")))
|
||||||
"-DRModular=ON"
|
|
||||||
"-DRStatic=ON"
|
|
||||||
"-DCmdLineStatic=ON")))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("python" ,python)
|
`(("python" ,python)
|
||||||
("numpy" ,python-numpy)
|
("numpy" ,python-numpy)
|
||||||
("r-minimal" ,r-minimal)
|
("r-minimal" ,r-minimal)
|
||||||
("octave" ,octave)
|
("octave" ,octave)
|
||||||
("swig" ,swig)
|
("swig" ,swig)
|
||||||
|
("eigen" ,eigen)
|
||||||
("hdf5" ,hdf5)
|
("hdf5" ,hdf5)
|
||||||
("atlas" ,atlas)
|
("atlas" ,atlas)
|
||||||
("arpack" ,arpack-ng)
|
("arpack" ,arpack-ng)
|
||||||
|
@ -488,7 +498,8 @@ sample proximities between pairs of cases.")
|
||||||
("lzo" ,lzo)
|
("lzo" ,lzo)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config)))
|
`(("pkg-config" ,pkg-config)
|
||||||
|
("rxcpp" ,rxcpp)))
|
||||||
;; Non-portable SSE instructions are used so building fails on platforms
|
;; Non-portable SSE instructions are used so building fails on platforms
|
||||||
;; other than x86_64.
|
;; other than x86_64.
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
|
|
Reference in New Issue