Patchwork gnu: wxmaxima: Wrap with GSETTINGS_SCHEMA_DIR and XDG_DATA_DIRS.

login
register
mail settings
Submitter 宋文武
Date May 15, 2016, 7:50 a.m.
Message ID <1463298606-20584-1-git-send-email-iyzsong@gmail.com>
Download mbox | patch
Permalink /patch/12281/
State New
Headers show

Comments

宋文武 - May 15, 2016, 7:50 a.m.
Fixes <http://bugs.gnu.org/22709> and <http://bugs.gnu.org/23260>.

* gnu/packages/math.scm (wxmaxima)[arguments]: Wrap with
GSETTINGS_SCHEMA_DIR and XDG_DATA_DIRS.
---
 gnu/packages/maths.scm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
Ludovic Courtès - May 17, 2016, 9:14 p.m.
宋文武 <iyzsong@gmail.com> skribis:

> Fixes <http://bugs.gnu.org/22709> and <http://bugs.gnu.org/23260>.
>
> * gnu/packages/math.scm (wxmaxima)[arguments]: Wrap with
> GSETTINGS_SCHEMA_DIR and XDG_DATA_DIRS.

Would ‘glib-or-gtk-build-system’ solve the problem?

If not, this option looks good to me.

Thanks!

Ludo’.

Patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 73104a3..3da6e35 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1600,7 +1600,11 @@  point numbers.")
     (build-system gnu-build-system)
     (inputs
      `(("wxwidgets" ,wxwidgets)
-       ("maxima" ,maxima)))
+       ("maxima" ,maxima)
+       ;; Runtime support.
+       ("adwaita-icon-theme" ,adwaita-icon-theme)
+       ("gtk+" ,gtk+)
+       ("shared-mime-info" ,shared-mime-info)))
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (add-after
@@ -1610,7 +1614,18 @@  point numbers.")
                                                   "/bin/wxmaxima")
                        `("PATH" ":" prefix
                          (,(string-append (assoc-ref inputs "maxima")
-                                          "/bin"))))
+                                          "/bin")))
+                       ;; For GtkFileChooserDialog.
+                       `("GSETTINGS_SCHEMA_DIR" =
+                         (,(string-append (assoc-ref inputs "gtk+")
+                                          "/share/glib-2.0/schemas")))
+                       `("XDG_DATA_DIRS" ":" prefix
+                         (;; Needed by gdk-pixbuf to know supported icon formats.
+                          ,(string-append
+                            (assoc-ref inputs "shared-mime-info") "/share")
+                          ;; The default icon theme of GTK+.
+                          ,(string-append
+                            (assoc-ref inputs "adwaita-icon-theme") "/share"))))
                      #t)))))
     (home-page "https://andrejv.github.io/wxmaxima/")
     (synopsis "Graphical user interface for the Maxima computer algebra system")