[gnome-sdk-images] Add yelp to the sdk



commit 4ac1cc563d94d4a54b76664b6cb3c3da3d97a0a6
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Mar 17 10:54:19 2017 +0100

    Add yelp to the sdk

 org.gnome.Sdk.json.in     |   14 +++++++++++++
 yelp-use-in-sandbox.patch |   46 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 0 deletions(-)
---
diff --git a/org.gnome.Sdk.json.in b/org.gnome.Sdk.json.in
index dc7191b..cf1a753 100644
--- a/org.gnome.Sdk.json.in
+++ b/org.gnome.Sdk.json.in
@@ -777,6 +777,20 @@
             ]
         },
         {
+            "name": "yelp",
+            "sources": [
+                {
+                    "type": "archive",
+                    "url": "https://download.gnome.org/sources/yelp/3.22/yelp-3.22.0.tar.xz";,
+                    "sha256": "8616b77c239aaa731312609f192c9b2c71d54b2cae42ff23efa23b5b3188778e"
+                },
+                {
+                    "type": "patch",
+                    "path": "yelp-use-in-sandbox.patch"
+                }
+            ]
+        },
+        {
             "name": "pycairo",
             "build-options" : {
                 "env": {
diff --git a/yelp-use-in-sandbox.patch b/yelp-use-in-sandbox.patch
new file mode 100644
index 0000000..1907cb5
--- /dev/null
+++ b/yelp-use-in-sandbox.patch
@@ -0,0 +1,46 @@
+From 1a9ddf907792de0778f13248b6f0bd7e8d211562 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen redhat com>
+Date: Thu, 16 Mar 2017 15:44:48 -0400
+Subject: [PATCH] Try to fit in a sandbox
+
+When running in another apps sandbox, use an app name that works.
+---
+ src/yelp-application.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/yelp-application.c b/src/yelp-application.c
+index 47a69991..c7fd646c 100644
+--- a/src/yelp-application.c
++++ b/src/yelp-application.c
+@@ -370,12 +370,27 @@ YelpApplication *
+ yelp_application_new (void)
+ {
+     YelpApplication *app;
++    char *app_id = NULL;
++    char *yelp = NULL;
++
++    if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS)) {
++        GKeyFile *kf = g_key_file_new ();
++        g_key_file_load_from_file (kf, "/.flatpak-info", G_KEY_FILE_NONE, NULL);
++        app_id = g_key_file_get_string (kf, "Application", "name", NULL);
++        yelp = g_strconcat (app_id, ".Help", NULL);
++        g_key_file_unref (kf);
++    }
++    else {
++        yelp = g_strdup ("org.gnome.Yelp");
++    }
+ 
+     app = g_object_new (YELP_TYPE_APPLICATION,
+-                        "application-id", "org.gnome.Yelp",
++                        "application-id", yelp,
+                         "flags", G_APPLICATION_HANDLES_COMMAND_LINE,
+                         "inactivity-timeout", 5000,
+                         NULL);
++    g_free (app_id);
++    g_free (yelp);
+ 
+     return app;
+ }
+-- 
+2.12.0
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]