summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2019-05-31 14:37:16 +0200
committerJulien Lepiller <julien@lepiller.eu>2019-05-31 14:41:38 +0200
commitdb6dd04c3dc0f893931f5cb823755eb792f2e9ee (patch)
tree64887e80eac95db7337aec0aee61681abd07da59
parent27489e7f73b812e13f52e4c9026b1175103ba7e7 (diff)
gnu: gtksourceview-2: Fix finding default data.
* gnu/packages/patches/gtksourceview-2-add-default-directory.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gtk.scm (gtksourceview-2)[source]: Use it.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/gtk.scm5
-rw-r--r--gnu/packages/patches/gtksourceview-2-add-default-directory.patch33
3 files changed, 38 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 3a199f82f8..55fa90f926 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -897,6 +897,7 @@ dist_patch_DATA = \
%D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \
%D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \
%D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
+ %D%/packages/patches/gtksourceview-2-add-default-directory.patch \
%D%/packages/patches/gzdoom-search-in-installed-share.patch \
%D%/packages/patches/haskell-mode-unused-variables.patch \
%D%/packages/patches/haskell-mode-make-check.patch \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 62b33a45ba..b864225e3d 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -348,7 +348,10 @@ diagrams.")
name "-" version ".tar.bz2"))
(sha256
(base32
- "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
+ "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
+ (patches
+ (search-patches
+ "gtksourceview-2-add-default-directory.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("intltool" ,intltool)
diff --git a/gnu/packages/patches/gtksourceview-2-add-default-directory.patch b/gnu/packages/patches/gtksourceview-2-add-default-directory.patch
new file mode 100644
index 0000000000..c4b5052b81
--- /dev/null
+++ b/gnu/packages/patches/gtksourceview-2-add-default-directory.patch
@@ -0,0 +1,33 @@
+From fc401acb15f15d487c942437b6fb429289dd3c67 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Fri, 31 May 2019 13:22:25 +0200
+Subject: [PATCH] Add installation directory as a default directory.
+
+In Guix, this library is installed in a separate directory in the store,
+and it's typically not installed system-wide in a fixed directory. Add
+the store path to the set of default directories so dependents can find
+default langs and source highlighting scheme.
+---
+ gtksourceview/gtksourceview-utils.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/gtksourceview/gtksourceview-utils.c b/gtksourceview/gtksourceview-utils.c
+index 6f06bab..c3467d5 100644
+--- a/gtksourceview/gtksourceview-utils.c
++++ b/gtksourceview/gtksourceview-utils.c
+@@ -66,6 +66,12 @@ _gtk_source_view_get_default_dirs (const char *basename,
+ basename,
+ NULL));
+
++ /* installed dir */
++ g_ptr_array_add (dirs, g_build_filename (DATADIR,
++ SOURCEVIEW_DIR,
++ basename,
++ NULL));
++
+ g_ptr_array_add (dirs, NULL);
+
+ return (gchar**) g_ptr_array_free (dirs, FALSE);
+--
+2.21.0
+