unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Tai <atai@atai.org>
To: 61448@debbugs.gnu.org
Cc: Andy Tai <atai@atai.org>
Subject: [bug#61448] [PATCH v5] gnu: Add opencv-next
Date: Wed, 15 Feb 2023 08:10:22 -0800	[thread overview]
Message-ID: <20230215161022.18686-1-atai@atai.org> (raw)
In-Reply-To: <20230212052208.3568-1-atai@atai.org>

* 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





  parent reply	other threads:[~2023-02-15 16:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Andy Tai [this message]
2023-03-22 18:21   ` bug#61448: [PATCH] ignu: opencv: Update to 4.6.0 Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230215161022.18686-1-atai@atai.org \
    --to=atai@atai.org \
    --cc=61448@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).