gnu: Add ocrodjvu.
[jackhill/guix/guix.git] / gnu / packages / wxwidgets.scm
index 69257a6..f3a7fdd 100644 (file)
@@ -6,7 +6,7 @@
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -35,7 +35,9 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gl)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
@@ -52,7 +54,7 @@
 (define-public wxwidgets
   (package
     (name "wxwidgets")
-    (version "3.0.4")
+    (version "3.0.5.1")
     (source
      (origin
        (method url-fetch)
@@ -60,7 +62,7 @@
                            "releases/download/v" version
                            "/wxWidgets-" version ".tar.bz2"))
        (sha256
-        (base32 "1w7pgfqjab7n84lc4aarydl3g55d1hdgl2ilwml766r6inc7y5cn"))))
+        (base32 "01y89999jw5q7njrhxajincx7lydls6yq37ikazjryssrxrnw3s4"))))
     (build-system glib-or-gtk-build-system)
     (inputs
      `(("glu" ,glu)
@@ -73,7 +75,9 @@
        ("libtiff" ,libtiff)
        ("mesa" ,mesa)
        ("webkitgtk" ,webkitgtk)
-       ("sdl" ,sdl)))
+       ("sdl" ,sdl)
+       ("shared-mime-info" ,shared-mime-info)
+       ("xdg-utils" ,xdg-utils)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (arguments
        (list (string-append "LDFLAGS=-Wl,-rpath="
                             (assoc-ref %outputs "out") "/lib"))
        ;; No 'check' target.
-       #:tests? #f))
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'refer-to-inputs
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((mime (string-append (assoc-ref inputs "shared-mime-info")
+                                         "/share/mime")))
+               (substitute* "src/unix/utilsx11.cpp"
+                 (("wxExecute\\(xdg_open \\+")
+                  (string-append "wxExecute(\"" (which "xdg-open") "\"")))
+               (substitute* "src/unix/mimetype.cpp"
+                 (("/usr(/local)?/share/mime") mime))
+               #t))))))
     (home-page "https://www.wxwidgets.org/")
     (synopsis "Widget toolkit for creating graphical user interfaces")
     (description
@@ -152,7 +168,7 @@ and many other languages.")
             (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/wxWidgets/wxWidgets.git")
+                    (url "https://github.com/wxWidgets/wxWidgets")
                     (commit (string-append "v" version))))
               (file-name (git-file-name "wxwidgets" version))
               (sha256
@@ -225,7 +241,7 @@ and many other languages.")
      `(("python-numpy" ,python-numpy)
        ("python-pillow" ,python-pillow)
        ("python-six" ,python-six)))
-    (home-page "http://wxPython.org/")
+    (home-page "https://wxpython.org/")
     (synopsis "Cross platform GUI toolkit for Python")
     (description "wxPython is a cross-platform GUI toolkit for the Python
 programming language.  It is implemented as a set of Python extension modules