unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#61448] [PATCH] ignu: opencv: Update to 4.6.0
@ 2023-02-12  5:22 Andy Tai
  2023-02-12  5:24 ` [bug#61448] [PATCH v2] gnu: " Andy Tai
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Andy Tai @ 2023-02-12  5:22 UTC (permalink / raw)
  To: 61448; +Cc: Andy Tai

* gnu/packages/image-processing.scm (opencv): Update to 4.6.0
---
 gnu/packages/image-processing.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 70c820e76b..1ae474b6cd 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -460,7 +460,7 @@ (define-public vtk-7
 (define-public opencv
   (package
     (name "opencv")
-    (version "4.5.4")
+    (version "4.6.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -469,7 +469,7 @@ (define-public opencv
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0gf2xs3r4s51m20mpf0wdidpk0xzp3m2w6jx72fwldhn0pshlmcj"))
+                "1avd51fxmy0jp09qgxj5x3dpbl3n9x7hg2mm7ma6ak9g52ayrdl5"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -617,7 +617,7 @@ (define-public opencv
                  (commit version)))
            (file-name (git-file-name "opencv_extra" version))
            (sha256
-            (base32 "1fg2hxdvphdvagc2fkmhqk7qql9mp7pj2bmp8kmd7vicpr72qk82"))))
+            (base32 "17658qwpjn0s4zcn5q0sca7fzkcihzrs9lddvbn78wa8w496gwpp"))))
        ("opencv-contrib"
         ,(origin
            (method git-fetch)
@@ -626,7 +626,7 @@ (define-public opencv
                  (commit version)))
            (file-name (git-file-name "opencv_contrib" version))
            (sha256
-            (base32 "0ga0l4ranp1834gxgp487ll1amvmssa02l2nk5ja5w0rx4d8hh26"))))))
+            (base32 "1layhlajm2v5y22vl1cvcg3z9rikg78z6cl1w3nkwjvqnm7nld46"))))))
     (inputs
      (list ffmpeg-4
            gtk+
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#61448] [PATCH v2] gnu: opencv: Update to 4.6.0
  2023-02-12  5:22 [bug#61448] [PATCH] ignu: opencv: Update to 4.6.0 Andy Tai
@ 2023-02-12  5:24 ` Andy Tai
  2023-02-12 22:12 ` [bug#61448] aiscm build error Andy Tai
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Andy Tai @ 2023-02-12  5:24 UTC (permalink / raw)
  To: 61448; +Cc: Andy Tai

* gnu/packages/image-processing.scm (opencv): Update to 4.6.0
---
 gnu/packages/image-processing.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 70c820e76b..1ae474b6cd 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -460,7 +460,7 @@ (define-public vtk-7
 (define-public opencv
   (package
     (name "opencv")
-    (version "4.5.4")
+    (version "4.6.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -469,7 +469,7 @@ (define-public opencv
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0gf2xs3r4s51m20mpf0wdidpk0xzp3m2w6jx72fwldhn0pshlmcj"))
+                "1avd51fxmy0jp09qgxj5x3dpbl3n9x7hg2mm7ma6ak9g52ayrdl5"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -617,7 +617,7 @@ (define-public opencv
                  (commit version)))
            (file-name (git-file-name "opencv_extra" version))
            (sha256
-            (base32 "1fg2hxdvphdvagc2fkmhqk7qql9mp7pj2bmp8kmd7vicpr72qk82"))))
+            (base32 "17658qwpjn0s4zcn5q0sca7fzkcihzrs9lddvbn78wa8w496gwpp"))))
        ("opencv-contrib"
         ,(origin
            (method git-fetch)
@@ -626,7 +626,7 @@ (define-public opencv
                  (commit version)))
            (file-name (git-file-name "opencv_contrib" version))
            (sha256
-            (base32 "0ga0l4ranp1834gxgp487ll1amvmssa02l2nk5ja5w0rx4d8hh26"))))))
+            (base32 "1layhlajm2v5y22vl1cvcg3z9rikg78z6cl1w3nkwjvqnm7nld46"))))))
     (inputs
      (list ffmpeg-4
            gtk+
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#61448] aiscm build error
  2023-02-12  5:22 [bug#61448] [PATCH] ignu: opencv: Update to 4.6.0 Andy Tai
  2023-02-12  5:24 ` [bug#61448] [PATCH v2] gnu: " Andy Tai
@ 2023-02-12 22:12 ` Andy Tai
  2023-02-12 23:36 ` [bug#61448] [PATCH v3] gnu: opencv: Update to 4.7.0 Andy Tai
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Andy Tai @ 2023-02-12 22:12 UTC (permalink / raw)
  To: 61448

Per GUix QA, OpenCV 4.6.0  caues AISCM, which uses OpenCV, to fail to build:

https://bordeaux.guix.gnu.org/build/6d64c5dc-818b-470d-b55c-be5b4cccf643

due to reference to unstable API

cv::aruco::drawAxis(img, camera, distortion, rvec, tvec,
scm_to_double(scm_len));

that no longer exists as of OpenCV 4.6.0

bug filed against AISCM:

https://github.com/wedesoft/aiscm/issues/30#issue-158142743




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#61448] [PATCH v3] gnu: opencv: Update to 4.7.0
  2023-02-12  5:22 [bug#61448] [PATCH] ignu: opencv: Update to 4.6.0 Andy Tai
  2023-02-12  5:24 ` [bug#61448] [PATCH v2] gnu: " Andy Tai
  2023-02-12 22:12 ` [bug#61448] aiscm build error Andy Tai
@ 2023-02-12 23:36 ` Andy Tai
  2023-02-15 16:08 ` [bug#61448] [PATCH v4] gnu: Add opemncv-next Andy Tai
  2023-02-15 16:10 ` [bug#61448] [PATCH v5] gnu: Add opencv-next Andy Tai
  4 siblings, 0 replies; 7+ messages in thread
From: Andy Tai @ 2023-02-12 23:36 UTC (permalink / raw)
  To: 61448; +Cc: Andy Tai

* gnu/packages/image-processing.scm (opencv): Update to 4.7.0
---
 gnu/packages/image-processing.scm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 70c820e76b..c6c3b34705 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -460,7 +460,7 @@ (define-public vtk-7
 (define-public opencv
   (package
     (name "opencv")
-    (version "4.5.4")
+    (version "4.7.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -469,7 +469,7 @@ (define-public opencv
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0gf2xs3r4s51m20mpf0wdidpk0xzp3m2w6jx72fwldhn0pshlmcj"))
+                "0l45v41nns2jmn9nr9fb0yvhqzfjpxjxn75i1c02rsfy3r3lv22v"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -498,9 +498,6 @@ (define-public opencv
                                 "tbb"
                                 "zlib")))
 
-                  ;; Milky icon set is non-free:
-                  (delete-file-recursively "modules/highgui/src/files_Qt/Milky")
-
                   ;; Some jars found:
                   (for-each delete-file
                             '("modules/java/test/pure_test/lib/junit-4.11.jar"
@@ -583,7 +580,8 @@ (define-public opencv
              ;; opencv-extra/testdata.
              (substitute* "modules/dnn/test/test_layers.cpp"
                (("(TEST_P\\(Test_Caffe_layers, )\
-(Accum\\).*|DataAugmentation\\).*|Resample\\).*|Correlation\\).*)" all pre post)
+(Accum\\).*|DataAugmentation\\).*|Resample\\).*|Correlation\\).*|Interp\\).*)"
+                   all pre post)
                 (string-append pre "DISABLED_" post)))))
          (add-after 'unpack 'unpack-submodule-sources
            (lambda* (#:key inputs #:allow-other-keys)
@@ -617,7 +615,7 @@ (define-public opencv
                  (commit version)))
            (file-name (git-file-name "opencv_extra" version))
            (sha256
-            (base32 "1fg2hxdvphdvagc2fkmhqk7qql9mp7pj2bmp8kmd7vicpr72qk82"))))
+            (base32 "0bdg5kwwdimnl2zp4ry5cmfxr9xb7zk2ml59853d90llsqjis47a"))))
        ("opencv-contrib"
         ,(origin
            (method git-fetch)
@@ -626,7 +624,7 @@ (define-public opencv
                  (commit version)))
            (file-name (git-file-name "opencv_contrib" version))
            (sha256
-            (base32 "0ga0l4ranp1834gxgp487ll1amvmssa02l2nk5ja5w0rx4d8hh26"))))))
+            (base32 "0hbfn835kxh3hwmwvzgdglm2np1ri3z7nfnf60gf4x6ikp89mv4r"))))))
     (inputs
      (list ffmpeg-4
            gtk+
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#61448] [PATCH v4] gnu: Add opemncv-next
  2023-02-12  5:22 [bug#61448] [PATCH] ignu: opencv: Update to 4.6.0 Andy Tai
                   ` (2 preceding siblings ...)
  2023-02-12 23:36 ` [bug#61448] [PATCH v3] gnu: opencv: Update to 4.7.0 Andy Tai
@ 2023-02-15 16:08 ` Andy Tai
  2023-02-15 16:10 ` [bug#61448] [PATCH v5] gnu: Add opencv-next Andy Tai
  4 siblings, 0 replies; 7+ messages in thread
From: Andy Tai @ 2023-02-15 16:08 UTC (permalink / raw)
  To: 61448; +Cc: Andy Tai

* gnu/packages/image-processing.scm (opencv-next): New variable
  as opencv (4.5.4) is depended on by aiscm which does not build
  with later opencv (4.6.0 and later) so make later opencv release
  as opencv-next, now at version 4.7.0
---
 gnu/packages/image-processing.scm | 79 +++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 70c820e76b..0482984e32 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -673,6 +673,85 @@ (define-public opencv
     (home-page "https://opencv.org/")
     (license license:bsd-3)))
 
+;; aiscm depends on opencv 4.5.4 so we cannot just update opencv to 4.7.0
+;; for now we place newer opencv as opencv-next
+(define-public opencv-next
+  (package
+    (inherit opencv)
+    (name "opencv-next")
+    (version "4.7.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/opencv/opencv")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0l45v41nns2jmn9nr9fb0yvhqzfjpxjxn75i1c02rsfy3r3lv22v"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Remove external libraries. We have almost all available
+                          ;; in Guix:
+                          (with-directory-excursion "3rdparty"
+                            (for-each delete-file-recursively
+                                      '("carotene" "cpufeatures"
+                                        "ffmpeg"
+                                        "include"
+                                        "ippicv"
+                                        "ittnotify"
+                                        "libjasper"
+                                        "libjpeg"
+                                        "libjpeg-turbo"
+                                        "libpng"
+                                        "libtengine"
+                                        "libtiff"
+                                        "libwebp"
+                                        "openexr"
+                                        "openjpeg"
+                                        "openvx"
+                                        "protobuf"
+                                        ;; "quirc"
+                                        "tbb"
+                                        "zlib")))
+
+                          ;; Some jars found:
+                          (for-each delete-file
+                                    '("modules/java/test/pure_test/lib/junit-4.11.jar"
+                                      "samples/java/sbt/sbt/sbt-launch.jar"))))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("xorg-server" ,xorg-server-for-tests) ;For running the tests
+                     ("opencv-extra" ,(origin
+                                        (method git-fetch)
+                                        (uri (git-reference (url
+                                                             "https://github.com/opencv/opencv_extra")
+                                                            (commit version)))
+                                        (file-name (git-file-name
+                                                    "opencv_extra" version))
+                                        (sha256 (base32
+                                                 "0bdg5kwwdimnl2zp4ry5cmfxr9xb7zk2ml59853d90llsqjis47a"))))
+                     ("opencv-contrib" ,(origin
+                                          (method git-fetch)
+                                          (uri (git-reference (url
+                                                               "https://github.com/opencv/opencv_contrib")
+                                                              (commit version)))
+                                          (file-name (git-file-name
+                                                      "opencv_contrib" version))
+                                          (sha256 (base32
+                                                   "0hbfn835kxh3hwmwvzgdglm2np1ri3z7nfnf60gf4x6ikp89mv4r"))))))
+
+    (arguments
+     (substitute-keyword-arguments (package-arguments opencv)
+       ((#:phases phases
+         '%standard-phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'disable-broken-tests-opencv-4.7-specific
+             (lambda _
+               (substitute* "modules/dnn/test/test_layers.cpp"
+                 (("(TEST_P\\(Test_Caffe_layers, )(Interp\\).*)"
+                   all pre post)
+                  (string-append pre "DISABLED_" post)))))))))))
+
 (define-public vips
   (package
     (name "vips")

base-commit: a97a102d21edc0c9624cf92c1fbc0c01b1067290
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#61448] [PATCH v5] gnu: Add opencv-next
  2023-02-12  5:22 [bug#61448] [PATCH] ignu: opencv: Update to 4.6.0 Andy Tai
                   ` (3 preceding siblings ...)
  2023-02-15 16:08 ` [bug#61448] [PATCH v4] gnu: Add opemncv-next Andy Tai
@ 2023-02-15 16:10 ` Andy Tai
  2023-03-22 18:21   ` bug#61448: [PATCH] ignu: opencv: Update to 4.6.0 Maxim Cournoyer
  4 siblings, 1 reply; 7+ messages in thread
From: Andy Tai @ 2023-02-15 16:10 UTC (permalink / raw)
  To: 61448; +Cc: Andy Tai

* gnu/packages/image-processing.scm (opencv-next): New variable
  as opencv (4.5.4) is depended on by aiscm which does not build
  with later opencv (4.6.0 and later) so make later opencv release
  as opencv-next, now at version 4.7.0
---
 gnu/packages/image-processing.scm | 79 +++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 70c820e76b..0482984e32 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -673,6 +673,85 @@ (define-public opencv
     (home-page "https://opencv.org/")
     (license license:bsd-3)))
 
+;; aiscm depends on opencv 4.5.4 so we cannot just update opencv to 4.7.0
+;; for now we place newer opencv as opencv-next
+(define-public opencv-next
+  (package
+    (inherit opencv)
+    (name "opencv-next")
+    (version "4.7.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/opencv/opencv")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0l45v41nns2jmn9nr9fb0yvhqzfjpxjxn75i1c02rsfy3r3lv22v"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Remove external libraries. We have almost all available
+                          ;; in Guix:
+                          (with-directory-excursion "3rdparty"
+                            (for-each delete-file-recursively
+                                      '("carotene" "cpufeatures"
+                                        "ffmpeg"
+                                        "include"
+                                        "ippicv"
+                                        "ittnotify"
+                                        "libjasper"
+                                        "libjpeg"
+                                        "libjpeg-turbo"
+                                        "libpng"
+                                        "libtengine"
+                                        "libtiff"
+                                        "libwebp"
+                                        "openexr"
+                                        "openjpeg"
+                                        "openvx"
+                                        "protobuf"
+                                        ;; "quirc"
+                                        "tbb"
+                                        "zlib")))
+
+                          ;; Some jars found:
+                          (for-each delete-file
+                                    '("modules/java/test/pure_test/lib/junit-4.11.jar"
+                                      "samples/java/sbt/sbt/sbt-launch.jar"))))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("xorg-server" ,xorg-server-for-tests) ;For running the tests
+                     ("opencv-extra" ,(origin
+                                        (method git-fetch)
+                                        (uri (git-reference (url
+                                                             "https://github.com/opencv/opencv_extra")
+                                                            (commit version)))
+                                        (file-name (git-file-name
+                                                    "opencv_extra" version))
+                                        (sha256 (base32
+                                                 "0bdg5kwwdimnl2zp4ry5cmfxr9xb7zk2ml59853d90llsqjis47a"))))
+                     ("opencv-contrib" ,(origin
+                                          (method git-fetch)
+                                          (uri (git-reference (url
+                                                               "https://github.com/opencv/opencv_contrib")
+                                                              (commit version)))
+                                          (file-name (git-file-name
+                                                      "opencv_contrib" version))
+                                          (sha256 (base32
+                                                   "0hbfn835kxh3hwmwvzgdglm2np1ri3z7nfnf60gf4x6ikp89mv4r"))))))
+
+    (arguments
+     (substitute-keyword-arguments (package-arguments opencv)
+       ((#:phases phases
+         '%standard-phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'disable-broken-tests-opencv-4.7-specific
+             (lambda _
+               (substitute* "modules/dnn/test/test_layers.cpp"
+                 (("(TEST_P\\(Test_Caffe_layers, )(Interp\\).*)"
+                   all pre post)
+                  (string-append pre "DISABLED_" post)))))))))))
+
 (define-public vips
   (package
     (name "vips")

base-commit: a97a102d21edc0c9624cf92c1fbc0c01b1067290
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#61448: [PATCH] ignu: opencv: Update to 4.6.0
  2023-02-15 16:10 ` [bug#61448] [PATCH v5] gnu: Add opencv-next Andy Tai
@ 2023-03-22 18:21   ` Maxim Cournoyer
  0 siblings, 0 replies; 7+ messages in thread
From: Maxim Cournoyer @ 2023-03-22 18:21 UTC (permalink / raw)
  To: Andy Tai; +Cc: 61448-done

Hello,

Andy Tai <atai@atai.org> writes:

> * gnu/packages/image-processing.scm (opencv-next): New variable
>   as opencv (4.5.4) is depended on by aiscm which does not build
>   with later opencv (4.6.0 and later) so make later opencv release
>   as opencv-next, now at version 4.7.0

There's no need to repeat the explanation in the change log, as it's
written in the code as a comment, where it belongs.

> ---
>  gnu/packages/image-processing.scm | 79 +++++++++++++++++++++++++++++++
>  1 file changed, 79 insertions(+)
>
> diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
> index 70c820e76b..0482984e32 100644
> --- a/gnu/packages/image-processing.scm
> +++ b/gnu/packages/image-processing.scm
> @@ -673,6 +673,85 @@ (define-public opencv
>      (home-page "https://opencv.org/")
>      (license license:bsd-3)))
>  
> +;; aiscm depends on opencv 4.5.4 so we cannot just update opencv to 4.7.0
> +;; for now we place newer opencv as opencv-next
> +(define-public opencv-next
> +  (package
> +    (inherit opencv)
> +    (name "opencv-next")

You can leave the name as "opencv", so users doing 'guix install opencv'
will get the latest version.  The only time where it may be better use
use "-next" in the name, is when both versions are expected to be
propagated together and found in the same profile, where they'd conflict
if same-named (that's very niche though).

> +    (version "4.7.0")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/opencv/opencv")
> +                    (commit version)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "0l45v41nns2jmn9nr9fb0yvhqzfjpxjxn75i1c02rsfy3r3lv22v"))
> +              (modules '((guix build utils)))
> +              (snippet '(begin
> +                          ;; Remove external libraries. We have almost all available
> +                          ;; in Guix:
> +                          (with-directory-excursion "3rdparty"
> +                            (for-each delete-file-recursively
> +                                      '("carotene" "cpufeatures"
> +                                        "ffmpeg"
> +                                        "include"
> +                                        "ippicv"
> +                                        "ittnotify"
> +                                        "libjasper"
> +                                        "libjpeg"
> +                                        "libjpeg-turbo"
> +                                        "libpng"
> +                                        "libtengine"
> +                                        "libtiff"
> +                                        "libwebp"
> +                                        "openexr"
> +                                        "openjpeg"
> +                                        "openvx"
> +                                        "protobuf"
> +                                        ;; "quirc"
> +                                        "tbb"
> +                                        "zlib")))
> +
> +                          ;; Some jars found:
> +                          (for-each delete-file
> +                                    '("modules/java/test/pure_test/lib/junit-4.11.jar"

[...]

> +    (native-inputs `(("pkg-config" ,pkg-config)
> +                     ("xorg-server" ,xorg-server-for-tests) ;For running the tests
> +                     ("opencv-extra" ,(origin
> +                                        (method git-fetch)
> +                                        (uri (git-reference (url
> +                                                             "https://github.com/opencv/opencv_extra")
> +                                                            (commit version)))
> +                                        (file-name (git-file-name
> +                                                    "opencv_extra" version))
> +                                        (sha256 (base32
> +                                                 "0bdg5kwwdimnl2zp4ry5cmfxr9xb7zk2ml59853d90llsqjis47a"))))
> +                     ("opencv-contrib" ,(origin
> +                                          (method git-fetch)
> +                                          (uri (git-reference (url
> +                                                               "https://github.com/opencv/opencv_contrib")
> +                                                              (commit version)))
> +                                          (file-name (git-file-name
> +                                                      "opencv_contrib" version))
> +                                          (sha256 (base32
> +                                                   "0hbfn835kxh3hwmwvzgdglm2np1ri3z7nfnf60gf4x6ikp89mv4r"))))))

This indentation is way off; was this 'guix style'?

> +    (arguments
> +     (substitute-keyword-arguments (package-arguments opencv)
> +       ((#:phases phases
> +         '%standard-phases)
> +        `(modify-phases ,phases
> +           (add-after 'unpack 'disable-broken-tests-opencv-4.7-specific
> +             (lambda _
> +               (substitute* "modules/dnn/test/test_layers.cpp"
> +                 (("(TEST_P\\(Test_Caffe_layers, )(Interp\\).*)"
> +                   all pre post)
> +                  (string-append pre "DISABLED_" post)))))))))))
> +
>  (define-public vips
>    (package
>      (name "vips")
>
> base-commit: a97a102d21edc0c9624cf92c1fbc0c01b1067290

I've made the adjustments below;

--8<---------------cut here---------------start------------->8---
@@ -699,11 +699,11 @@ (define-public opencv
     (home-page "https://opencv.org/")
     (license license:bsd-3)))
 
-;; TODO: Make the default opencv after aiscm can use a newer one.
+;; TODO: Make this the default opencv after aiscm is able to use it.
 (define-public opencv-next
   (package
     (inherit opencv)
-    (name "opencv-next")
+    (name "opencv")
     (version "4.7.0")
     (source (origin
               (method git-fetch)
@@ -711,71 +711,70 @@ (define-public opencv-next
                     (url "https://github.com/opencv/opencv")
                     (commit version)))
               (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0l45v41nns2jmn9nr9fb0yvhqzfjpxjxn75i1c02rsfy3r3lv22v"))
               (modules '((guix build utils)))
-              (snippet '(begin
-                          ;; Remove external libraries. We have almost all available
-                          ;; in Guix:
-                          (with-directory-excursion "3rdparty"
-                            (for-each delete-file-recursively
-                                      '("carotene" "cpufeatures"
-                                        "ffmpeg"
-                                        "include"
-                                        "ippicv"
-                                        "ittnotify"
-                                        "libjasper"
-                                        "libjpeg"
-                                        "libjpeg-turbo"
-                                        "libpng"
-                                        "libtengine"
-                                        "libtiff"
-                                        "libwebp"
-                                        "openexr"
-                                        "openjpeg"
-                                        "openvx"
-                                        "protobuf"
-                                        ;; "quirc"
-                                        "tbb"
-                                        "zlib")))
-
-                          ;; Some jars found:
-                          (for-each delete-file
-                                    '("modules/java/test/pure_test/lib/junit-4.11.jar"
-                                      "samples/java/sbt/sbt/sbt-launch.jar"))))))
-    (native-inputs `(("pkg-config" ,pkg-config)
-                     ("xorg-server" ,xorg-server-for-tests) ;For running the tests
-                     ("opencv-extra" ,(origin
-                                        (method git-fetch)
-                                        (uri (git-reference (url
-                                                             "https://github.com/opencv/opencv_extra")
-                                                            (commit version)))
-                                        (file-name (git-file-name
-                                                    "opencv_extra" version))
-                                        (sha256 (base32
-                                                 "0bdg5kwwdimnl2zp4ry5cmfxr9xb7zk2ml59853d90llsqjis47a"))))
-                     ("opencv-contrib" ,(origin
-                                          (method git-fetch)
-                                          (uri (git-reference (url
-                                                               "https://github.com/opencv/opencv_contrib")
-                                                              (commit version)))
-                                          (file-name (git-file-name
-                                                      "opencv_contrib" version))
-                                          (sha256 (base32
-                                                   "0hbfn835kxh3hwmwvzgdglm2np1ri3z7nfnf60gf4x6ikp89mv4r"))))))
+              (snippet
+               '(begin
+                  ;; Remove external libraries.  Almost all of them are
+                  ;; available in Guix.
+                  (with-directory-excursion "3rdparty"
+                    (for-each delete-file-recursively
+                              '("carotene"
+                                "cpufeatures"
+                                "ffmpeg"
+                                "include"
+                                "ippicv"
+                                "ittnotify"
+                                "libjasper"
+                                "libjpeg"
+                                "libjpeg-turbo"
+                                "libpng"
+                                "libtengine"
+                                "libtiff"
+                                "libwebp"
+                                "openexr"
+                                "openjpeg"
+                                "openvx"
+                                "protobuf"
+                                ;;"quirc"
+                                "tbb"
+                                "zlib")))
 
+                  ;; Delete any bundled .jar files.
+                  (for-each delete-file (find-files "." "\\.jar$"))))
+              (sha256
+               (base32
+                "0l45v41nns2jmn9nr9fb0yvhqzfjpxjxn75i1c02rsfy3r3lv22v"))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("xorg-server" ,xorg-server-for-tests) ;For running the tests
+       ("opencv-extra"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/opencv/opencv_extra")
+                 (commit version)))
+           (file-name (git-file-name "opencv_extra" version))
+           (sha256
+            (base32
+             "0bdg5kwwdimnl2zp4ry5cmfxr9xb7zk2ml59853d90llsqjis47a"))))
+       ("opencv-contrib"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference (url "https://github.com/opencv/opencv_contrib")
+                               (commit version)))
+           (file-name (git-file-name "opencv_contrib" version))
+           (sha256
+            (base32
+             "0hbfn835kxh3hwmwvzgdglm2np1ri3z7nfnf60gf4x6ikp89mv4r"))))))
     (arguments
      (substitute-keyword-arguments (package-arguments opencv)
-       ((#:phases phases
-         '%standard-phases)
-        `(modify-phases ,phases
-           (add-after 'unpack 'disable-broken-tests-opencv-4.7-specific
-             (lambda _
-               (substitute* "modules/dnn/test/test_layers.cpp"
-                 (("(TEST_P\\(Test_Caffe_layers, )(Interp\\).*)"
-                   all pre post)
-                  (string-append pre "DISABLED_" post)))))))))))
+       ((#:phases phases '%standard-phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'disable-broken-tests-opencv-4.7-specific
+              (lambda _
+                (substitute* "modules/dnn/test/test_layers.cpp"
+                  (("(TEST_P\\(Test_Caffe_layers, )(Interp\\).*)" _ pre post)
+                   (string-append pre "DISABLED_" post)))))))))))
 
 (define-public vips
   (package
--8<---------------cut here---------------end--------------->8---

And installed the change.  Thank you!

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-22 18:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12  5:22 [bug#61448] [PATCH] ignu: opencv: Update to 4.6.0 Andy Tai
2023-02-12  5:24 ` [bug#61448] [PATCH v2] gnu: " Andy Tai
2023-02-12 22:12 ` [bug#61448] aiscm build error Andy Tai
2023-02-12 23:36 ` [bug#61448] [PATCH v3] gnu: opencv: Update to 4.7.0 Andy Tai
2023-02-15 16:08 ` [bug#61448] [PATCH v4] gnu: Add opemncv-next Andy Tai
2023-02-15 16:10 ` [bug#61448] [PATCH v5] gnu: Add opencv-next Andy Tai
2023-03-22 18:21   ` bug#61448: [PATCH] ignu: opencv: Update to 4.6.0 Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).