gnu: guile-cv: Update to 0.4.0.

* gnu/packages/guile-xyz.scm (guile-cv): Update to 0.4.0.
[arguments]: Set GUILE_AUTO_COMPILE to prevent warnings, fix and
separate phase modifications into different tasks. Use G-expression.
Remove trailing #t.
[inputs]: Replace guile-2.0 with guile-3.0.
[native-inputs]: Update syntax. Add autoconf, automake, texinfo,
libtool and gettext-minimal.
[propagated-inputs]: Update syntax.

Change-Id: I0a4141740de7cdadbe103c62831f11474cb4ddb2
This commit is contained in:
Sébastien Lerique 2024-10-04 22:21:54 +02:00 committed by Zheng Junjie
parent fb3a390bea
commit 9460c7ed8a
No known key found for this signature in database
GPG key ID: 3B5AA993E1A2DFF0

View file

@ -4494,56 +4494,64 @@ feature-set, fully programmable in Guile Scheme.")
(define-public guile-cv (define-public guile-cv
(package (package
(name "guile-cv") (name "guile-cv")
(version "0.2.1") (version "0.4.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnu/guile-cv/guile-cv-" (uri (string-append "mirror://gnu/guile-cv/guile-cv-"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0qdf0s2h1xj5lbhnc1pfw69i3zg08pqy2y6869b92ydfis8r82j9")))) "00620zxm1rxlws7vn1zp2zzcb6y6r3szzj6b4b9fyjb86k972izb"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:make-flags
(add-after 'unpack 'prepare-build #~(list "GUILE_AUTO_COMPILE=0") ; to prevent guild warnings
(lambda* (#:key inputs outputs #:allow-other-keys) #:phases
(substitute* "configure" #~(modify-phases %standard-phases
(("SITEDIR=\"\\$datadir/guile-cv\"") (add-after 'unpack 'fix-guile-site-directory
"SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"") (lambda _
(("SITECCACHEDIR=\"\\$libdir/guile-cv/") (substitute* "configure.ac"
"SITECCACHEDIR=\"$libdir/")) (("SITEDIR=\"\\$datadir/guile-cv\"")
(substitute* "cv/init.scm" "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
(("\\(dynamic-link \"libvigra_c\"\\)") (("SITECCACHEDIR=\"\\$libdir/guile-cv/")
(string-append "(dynamic-link \"" "SITECCACHEDIR=\"$libdir/"))))
(assoc-ref inputs "vigra-c") (add-after 'unpack 'substitute-libs
"/lib/libvigra_c\")")) (lambda* (#:key inputs outputs #:allow-other-keys)
(("\\(dynamic-link \"libguile-cv\"\\)") (substitute* "cv/init.scm"
(format #f "~s" (("\\(dynamic-link \"libvigra_c\"\\)")
`(dynamic-link (string-append "(dynamic-link \""
(format #f "~alibguile-cv" (assoc-ref inputs "vigra-c")
(if (getenv "GUILE_CV_UNINSTALLED") "/lib/libvigra_c\")"))
"" (("\\(dynamic-link \"libguile-cv\"\\)")
,(format #f "~a/lib/" (format #f "~s"
(assoc-ref outputs "out")))))))) `(dynamic-link
(setenv "GUILE_CV_UNINSTALLED" "1") (format #f "~alibguile-cv"
;; Only needed to satisfy the configure script. (if (getenv "GUILE_CV_UNINSTALLED")
(setenv "LD_LIBRARY_PATH" ""
(string-append (assoc-ref inputs "vigra-c") "/lib")) ,(string-append #$output "/lib/")))))))
#t))))) (setenv "GUILE_CV_UNINSTALLED" "1")
;; Only needed to satisfy the configure script.
(setenv "LD_LIBRARY_PATH"
(string-append (assoc-ref inputs "vigra-c") "/lib")))))))
(inputs (inputs
(list vigra vigra-c guile-2.2)) (list vigra vigra-c guile-3.0))
(native-inputs (native-inputs
`(("texlive" ,(texlive-updmap.cfg (list (texlive-updmap.cfg
(list texlive-booktabs (list texlive-booktabs
texlive-iwona texlive-iwona
texlive-lm texlive-lm
texlive-siunitx texlive-siunitx
texlive-standalone texlive-standalone
texlive-xcolor))) texlive-xcolor))
("pkg-config" ,pkg-config))) pkg-config
autoconf
automake
texinfo
libtool
gettext-minimal))
(propagated-inputs (propagated-inputs
`(("guile-lib" ,guile2.2-lib))) (list guile-lib))
(home-page "https://www.gnu.org/software/guile-cv/") (home-page "https://www.gnu.org/software/guile-cv/")
(synopsis "Computer vision library for Guile") (synopsis "Computer vision library for Guile")
(description "Guile-CV is a Computer Vision functional programming library (description "Guile-CV is a Computer Vision functional programming library